Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
silicons committed Feb 1, 2025
1 parent 1aa8366 commit 34bb358
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@

/obj/item/gun/projectile/energy/nt_pmd/service_revolver
name = "service weapon"
icon_state = "service_grip"
#warn rename icon states, move icon over, add icon states to firemodes
icon = 'icons/content/factions/nanotrasen/items/guns/nt_pmd/service_revolver.dmi'
icon_state = "service"
base_icon_state = "service"
desc = "An anomalous weapon, long kept secure. It has recently been acquired by Nanotrasen's Paracausal Monitoring Division. How did it get here?"
damage_force = 5
slot_flags = SLOT_BELT
Expand All @@ -70,3 +71,8 @@
/datum/firemode/energy/nt_pmd/service_revolver/pierce,
/datum/firemode/energy/nt_pmd/service_revolver/charge,
)
item_renderer = /datum/gun_item_renderer/overlays{
count = 4;
use_single = TRUE;
independent_firemode = TRUE;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

//* Sidearm *//

#warn impl all ; materials

/obj/item/gun/projectile/ballistic/magnetic/nt_protomag/sidearm
name = "protomag sidearm"
Expand Down Expand Up @@ -51,9 +50,17 @@
GUN_COMPONENT_POWER_UNIT = 1,
)

//* Rifle *//
materials_base = list(
/datum/prototype/material/steel::id = 3500,
/datum/prototype/material/glass::id = 500,
/datum/prototype/material/silver::id = 750,
/datum/prototype/material/gold::id = 350,
/datum/prototype/material/copper::id = 750,
/datum/prototype/material/diamond::id = 250,
/datum/prototype/material/lead::id = 250,
)

#warn impl all ; materials
//* Rifle *//

/obj/item/gun/projectile/ballistic/magnetic/nt_protomag/rifle
name = "protomag rifle"
Expand Down Expand Up @@ -83,3 +90,13 @@
GUN_COMPONENT_ACCELERATION_COIL = 2,
GUN_COMPONENT_POWER_UNIT = 2,
)

materials_base = list(
/datum/prototype/material/steel::id = 5000,
/datum/prototype/material/glass::id = 1500,
/datum/prototype/material/silver::id = 1500,
/datum/prototype/material/gold::id = 800,
/datum/prototype/material/copper::id = 1200,
/datum/prototype/material/diamond::id = 350,
/datum/prototype/material/lead::id = 450,
)
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
* Consume next projectile hook
*/
/obj/item/gun_component/particle_array/proc/consume_next_projectile(datum/gun_firing_cycle/cycle) as /obj/projectile
#warn cycle charge cost mod
var/effective_power_use = base_energy_cost
var/effective_power_use = base_energy_cost * cycle.next_projectile_cost_multiplier
if(effective_power_use)
if(!installed.modular_use_checked_power(src, effective_power_use))
return GUN_FIRED_FAIL_EMPTY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name = /obj/item/gun_component/particle_array::name + " (particle beam)"
desc = "A particle array that emits a damaging beam. Bog-standard, really."

charge_cost = /obj/item/cell/device/weapon::maxcharge / 8
base_energy_cost = /obj/item/cell/device/weapon::maxcharge / 8 * 500
considered_lethal = TRUE

// todo: /obj/projectile/modular_energy/*
Expand Down
5 changes: 5 additions & 0 deletions code/modules/projectiles/guns/gun_firing_cycle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
var/next_dispersion_adjust
/// on this iteration, force adjust the angle by this much (pos = cw, neg = ccw); this is in degrees
var/next_angle_adjust
/// energy cost multiplier for the projectile
var/next_projectile_cost_multiplier = 1
/// blackboard for modular gun components to use
var/list/blackboard
/// multiplier to total cooldown after firing cycle
Expand All @@ -89,3 +91,6 @@
next_angle_adjust = \
next_firing_fail_result = \
null

next_projectile_cost_multiplier = \
1
4 changes: 3 additions & 1 deletion code/modules/projectiles/guns/gun_item_renderer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,14 @@
*/
/datum/gun_item_renderer/overlays
/// total count of overlays, from 1 to amount
/// * example: "[base]-[count]"
var/count
/// add "-empty" overlay when we're empty, instead of adding nothing
var/use_empty
/// only use the n-th overlay, instead of adding 1 to n
var/use_single
/// additionally, add "-[firemode]" to the segment
/// additionally, add "-[firemode]" to the overlay, before the count
/// * example: "[base]-[firemode]-[count]"
var/use_firemode
/// use gun requested render color on ammo bar
var/use_color
Expand Down
Binary file not shown.
Binary file modified icons/obj/gun/energy.dmi
Binary file not shown.

0 comments on commit 34bb358

Please sign in to comment.