Skip to content

Commit 8617b57

Browse files
authored
Change energy weapons to be reloadable by default (#93)
* Reloadable energy weapons as default * Add that return from 3 months ago.
1 parent d69a10b commit 8617b57

File tree

3 files changed

+104
-0
lines changed

3 files changed

+104
-0
lines changed

icons/obj/power.dmi

-123 Bytes
Binary file not shown.

mods/content/polaris/_polaris.dme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "items\overrides.dm"
1717
#include "items\suit.dm"
1818
#include "items\under.dm"
19+
#include "items\guns\overrides.dm"
1920
#include "structures\flora.dm"
2021
#include "structures\furniture.dm"
2122
#include "turfs\floors.dm"
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
2+
/obj/item/gun/energy/gun/setup_power_supply(loaded_cell_type, accepted_cell_type, power_supply_extension_type, charge_value)
3+
if(!istype(src,/obj/item/gun/energy/gun/nuclear))
4+
return ..(/obj/item/cell/gun, /obj/item/cell/gun, /datum/extension/loaded_cell, charge_value)
5+
else return ..()
6+
7+
/obj/item/gun/energy/laser/setup_power_supply(loaded_cell_type, accepted_cell_type, power_supply_extension_type, charge_value)
8+
return ..(/obj/item/cell/gun, /obj/item/cell/gun, /datum/extension/loaded_cell, charge_value)
9+
10+
/obj/item/gun/energy/ionrifle/setup_power_supply(loaded_cell_type, accepted_cell_type, power_supply_extension_type, charge_value)
11+
return ..(/obj/item/cell/gun, /obj/item/cell/gun, /datum/extension/loaded_cell, charge_value)
12+
13+
/obj/item/gun/energy/taser/setup_power_supply(loaded_cell_type, accepted_cell_type, power_supply_extension_type, charge_value)
14+
return ..(/obj/item/cell/gun, /obj/item/cell/gun, /datum/extension/loaded_cell, charge_value)
15+
16+
/obj/item/gun/energy/sniperrifle/setup_power_supply(loaded_cell_type, accepted_cell_type, power_supply_extension_type, charge_value)
17+
return ..(/obj/item/cell/gun, /obj/item/cell/gun, /datum/extension/loaded_cell, charge_value)
18+
19+
/obj/item/gun/energy/captain/setup_power_supply(loaded_cell_type, accepted_cell_type, power_supply_extension_type, charge_value)
20+
return ..(/obj/item/cell/gun, /obj/item/cell/gun, /datum/extension/loaded_cell/unremovable, charge_value)
21+
22+
/obj/item/gun/energy/gun/nuclear/setup_power_supply(loaded_cell_type, accepted_cell_type, power_supply_extension_type, charge_value)
23+
return ..(/obj/item/cell/gun, /obj/item/cell/gun, /datum/extension/loaded_cell/unremovable, charge_value)
24+
25+
26+
/obj/item/gun
27+
wieldsound = null
28+
unwieldsound = null
29+
30+
/obj/item/cell/gun
31+
desc = "A high-density battery, expected to deplete after a few hundred complete charge cycles."
32+
maxcharge = 2400 //Increased for more granularity + longer charge times
33+
34+
/obj/item/cell/gun/on_update_icon()
35+
. = ..()
36+
add_overlay(overlay_image(icon, "gunbattery_charge", gradient("#e2111c", "#9cdb43", clamp(percent(), 0, 100) )))
37+
38+
//Cell charge costs and refluff for base Neb types
39+
40+
/obj/item/gun/energy/gun
41+
desc = "Another bestseller of Lawson Arms, the LAEP90 Perun is a versatile energy based sidearm, capable of switching between low, medium and high power projectile settings. In other words: Stun, Shock or Kill."
42+
charge_cost = 240
43+
firemodes = list(
44+
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, indicator_color=COLOR_CYAN, charge_cost = 240), //10
45+
list(mode_name="shock", projectile_type=/obj/item/projectile/beam/stun/shock, indicator_color=COLOR_YELLOW, charge_cost = 340), //7
46+
list(mode_name="kill", projectile_type=/obj/item/projectile/beam, indicator_color=COLOR_RED,charge_cost = 480), //5
47+
)
48+
49+
/obj/item/gun/energy/gun/small
50+
name = "subcompact energy gun"
51+
desc = "The LAEP90-C Perunika is a subcompact variant of the versatile Perun energy sidearm, for use by plainclothes security personnel with a desire for concealability."
52+
firemodes = list(
53+
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, indicator_color=COLOR_CYAN, charge_cost = 240), // 10
54+
list(mode_name="shock", projectile_type=/obj/item/projectile/beam/stun/shock, indicator_color=COLOR_YELLOW, charge_cost = 340), //7
55+
list(mode_name="kill", projectile_type=/obj/item/projectile/beam/smalllaser,indicator_color=COLOR_RED,charge_cost = 480), //5
56+
)
57+
58+
/obj/item/gun/energy/sniperrifle
59+
name = "marksman energy rifle"
60+
desc = "The HI DMR 9E is an older design of Hephaestus Industries. A designated marksman rifle capable of shooting powerful \
61+
ionized beams, this is a weapon to kill from a distance."
62+
charge_cost = 600 //4
63+
64+
65+
/obj/item/gun/energy/laser
66+
desc = "A Hephaestus Industries G40E rifle, designed to kill with concentrated energy blasts. This variant has the ability to \
67+
switch between standard fire and a more efficient but weaker 'suppressive' fire."
68+
charge_cost = 240 //10
69+
firemodes = list(
70+
list(mode_name = "normal", fire_delay = 6, accuracy = 0, projectile_type = /obj/item/projectile/beam/midlaser, charge_cost = 240),
71+
list(mode_name = "suppressive", fire_delay = 0.6 SECONDS, accuracy = -2, projectile_type = /obj/item/projectile/beam/smalllaser, charge_cost = 60),
72+
)
73+
74+
/obj/item/gun/energy/laser/practice
75+
firemodes = list(
76+
list(mode_name = "normal", fire_delay = 6, accuracy = 0, projectile_type = /obj/item/projectile/beam/practice, charge_cost = 48),
77+
list(mode_name = "suppressive", fire_delay = 0.6 SECONDS, accuracy = -2, projectile_type = /obj/item/projectile/beam/practice, charge_cost = 12),
78+
)
79+
80+
/obj/item/gun/energy/laser/practice/handle_post_fire(atom/movable/firer, atom/target, var/pointblank=0, var/reflex=0)
81+
..()
82+
if(hacked())
83+
max_shots--
84+
if(!max_shots) //uh hoh gig is up
85+
to_chat(firer, SPAN_DANGER("\The [src] sizzles in your hands, acrid smoke rising from the firing end!"))
86+
desc += " The optical pathway is melted and useless."
87+
projectile_type = null
88+
firemodes = null
89+
90+
/obj/item/gun/energy/captain
91+
desc = "A rare weapon, produced by the Lunar Arms Company around 2105 - one of humanity's first wholly extra-terrestrial weapon designs. It's certainly aged well."
92+
charge_cost = 480 //5
93+
94+
/obj/item/gun/energy/lasercannon
95+
charge_cost = 600 //4
96+
97+
/obj/item/gun/energy/ionrifle
98+
desc = "The RayZar Mk60 EW Halicon is a man portable anti-armor weapon designed to disable mechanical threats, produced by NT. Not the best of its type."
99+
charge_cost = 240 //10
100+
101+
/obj/item/gun/energy/taser
102+
charge_cost = 480 //5
103+
desc = "The NT Mk30 NL is a small gun used for non-lethal takedowns. Produced by NT, it's actually a licensed version of a W-T RayZar design."

0 commit comments

Comments
 (0)