Energy weapons can be reloaded

This commit is contained in:
Anewbe
2016-10-06 21:17:40 -05:00
parent 62b02e8e05
commit 0f51fda83a
22 changed files with 218 additions and 141 deletions

View File

@@ -94,4 +94,8 @@
/datum/uplink_item/item/ammo/g12/flash
name = "12g Shotgun Ammo Box (Flash)"
path = /obj/item/weapon/storage/box/flashshells
item_cost = 10 // Discount due to it being LTL.
item_cost = 10 // Discount due to it being LTL.
/datum/uplink_item/item/ammo/cell
name = "weapon cell"
path = /obj/item/weapon/cell/device

View File

@@ -41,6 +41,9 @@
return
if(istype(W, /obj/item/weapon/cell) && anchored)
if(istype(W, /obj/item/weapon/cell/device))
user << "<span class='warning'> The charger isn't fitted for that type of cell.</span>"
return
if(charging)
user << "<span class='warning'>There is already a cell in the charger.</span>"
return

View File

@@ -39,9 +39,14 @@ obj/machinery/recharger
if(!powered())
user << "<span class='warning'>The [name] blinks red as you try to insert the item!</span>"
return
if(istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
user << "<span class='notice'>Your gun's recharge port was removed to make room for a miniaturized reactor.</span>"
return
if(istype(G, /obj/item/weapon/gun/energy))
var/obj/item/weapon/gun/energy/E = G
if(!E.power_supply)
user << "<span class='notice'>Your gun has no power cell.</span>"
return
if(E.self_recharge)
user << "<span class='notice'>Your gun has no recharge port.</span>"
return
if(istype(G, /obj/item/weapon/gun/energy/staff))
return
if(istype(G, /obj/item/device/laptop))

View File

@@ -24,19 +24,15 @@
/obj/item/weapon/cell/device
name = "device power cell"
desc = "A small power cell designed to power handheld devices."
icon_state = "cell" //placeholder
icon_state = "dcell"
item_state = "egg6"
w_class = ITEMSIZE_SMALL
force = 0
throw_speed = 5
throw_range = 7
maxcharge = 1000
maxcharge = 2400
matter = list("metal" = 350, "glass" = 50)
/obj/item/weapon/cell/device/variable/New(newloc, charge_amount)
..(newloc)
maxcharge = charge_amount
charge = maxcharge
/obj/item/weapon/cell/crap
name = "\improper rechargable AA battery"
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT

View File

@@ -126,6 +126,7 @@
/obj/item/clothing/glasses,
/obj/item/ammo_casing/shotgun,
/obj/item/ammo_magazine,
/obj/item/weapon/cell/device,
/obj/item/weapon/reagent_containers/food/snacks/donut/,
/obj/item/weapon/melee/baton,
/obj/item/weapon/gun/energy/taser,

View File

@@ -17,7 +17,7 @@
var/agonyforce = 60
var/status = 0 //whether the thing is on or not
var/obj/item/weapon/cell/bcell = null
var/hitcost = 1000 //oh god why do power cells carry so much charge? We probably need to make a distinction between "industrial" sized power cells for APCs and power cells for everything else.
var/hitcost = 240
/obj/item/weapon/melee/baton/suicide_act(mob/user)
user.visible_message("<span class='suicide'>\The [user] is putting the live [name] in \his mouth! It looks like \he's trying to commit suicide.</span>")
@@ -30,7 +30,7 @@
/obj/item/weapon/melee/baton/loaded/New() //this one starts with a cell pre-installed.
..()
bcell = new/obj/item/weapon/cell/high(src)
bcell = new/obj/item/weapon/cell/device(src)
update_icon()
return
@@ -40,11 +40,15 @@
if(bcell.checked_use(chrgdeductamt))
return 1
else
status = 0
update_icon()
return 0
return null
/obj/item/weapon/melee/baton/proc/powercheck(var/chrgdeductamt)
if(bcell)
if(bcell.charge < chrgdeductamt)
status = 0
update_icon()
/obj/item/weapon/melee/baton/update_icon()
if(status)
icon_state = "[initial(name)]_active"
@@ -69,26 +73,31 @@
/obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/cell))
if(!bcell)
user.drop_item()
W.loc = src
bcell = W
user << "<span class='notice'>You install a cell in [src].</span>"
update_icon()
if(istype(W, /obj/item/weapon/cell/device))
if(!bcell)
user.drop_item()
W.loc = src
bcell = W
user << "<span class='notice'>You install a cell in [src].</span>"
update_icon()
else
user << "<span class='notice'>[src] already has a cell.</span>"
else
user << "<span class='notice'>[src] already has a cell.</span>"
user << "<span class='notice'>This cell is not fitted for [src].</span>"
else if(istype(W, /obj/item/weapon/screwdriver))
/obj/item/weapon/melee/baton/attack_hand(mob/user as mob)
if(user.get_inactive_hand() == src)
if(bcell)
bcell.update_icon()
bcell.loc = get_turf(src.loc)
user.put_in_hands(bcell)
bcell = null
user << "<span class='notice'>You remove the cell from the [src].</span>"
status = 0
update_icon()
return
..()
return
else
return ..()
/obj/item/weapon/melee/baton/attack_self(mob/user)
if(bcell && bcell.charge > hitcost)
@@ -149,6 +158,7 @@
if(ishuman(target))
var/mob/living/carbon/human/H = target
H.forcesay(hit_appends)
powercheck(hitcost)
/obj/item/weapon/melee/baton/emp_act(severity)
if(bcell)
@@ -157,7 +167,7 @@
//secborg stun baton module
/obj/item/weapon/melee/baton/robot
hitcost = 500
hitcost = 120
/obj/item/weapon/melee/baton/robot/attack_self(mob/user)
//try to find our power cell
@@ -182,3 +192,17 @@
hitcost = 2500
attack_verb = list("poked")
slot_flags = null
/obj/item/weapon/melee/baton/cattleprod/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/cell))
if(!istype(W, /obj/item/weapon/cell/device))
if(!bcell)
user.drop_item()
W.loc = src
bcell = W
user << "<span class='notice'>You install a cell in [src].</span>"
update_icon()
else
user << "<span class='notice'>[src] already has a cell.</span>"
else
user << "<span class='notice'>This cell is not fitted for [src].</span>"

View File

@@ -121,6 +121,7 @@
new /obj/item/device/flash(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/cell/device(src)
new /obj/item/clothing/accessory/holster/waist(src)
new /obj/item/weapon/melee/telebaton(src)
new /obj/item/clothing/head/beret/sec/corporate/hos(src)
@@ -166,6 +167,7 @@
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/cell/device(src)
new /obj/item/weapon/storage/box/holobadge(src)
new /obj/item/clothing/head/beret/sec/corporate/warden(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/security(src)
@@ -212,6 +214,7 @@
new /obj/item/clothing/under/rank/security/corp(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/weapon/cell/device(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/security(src)
new /obj/item/device/flashlight/maglight(src)
return

View File

@@ -371,8 +371,7 @@
fire_sound = 'sound/weapons/Gunshot.ogg'
projectile_type = /obj/item/projectile/chameleon
charge_meter = 0
charge_cost = 20 //uses next to no power, since it's just holograms
max_shots = 50
charge_cost = 48 //uses next to no power, since it's just holograms
var/obj/item/projectile/copy_projectile
var/global/list/gun_choices

View File

@@ -85,6 +85,8 @@
var/dna_lock = 0 //whether or not the gun is locked to dna
var/obj/item/dnalockingchip/attached_lock
var/last_shot = 0 //records the last shot fired
/obj/item/weapon/gun/New()
..()
for(var/i in 1 to firemodes.len)
@@ -274,6 +276,8 @@
target = targloc
pointblank = 0
last_shot = world.time
// We do this down here, so we don't get the message if we fire an empty gun.
if(requires_two_hands)
if(user.item_is_in_hands(src) && user.hands_are_full())
@@ -322,6 +326,8 @@
P.launch(target)
last_shot = world.time
if(silenced)
playsound(src, fire_sound, 10, 1)
else

View File

@@ -6,8 +6,7 @@
fire_sound_text = "laser blast"
var/obj/item/weapon/cell/power_supply //What type of power cell this uses
var/charge_cost = 200 //How much energy is needed to fire.
var/max_shots = 10 //Determines the capacity of the weapon's power cell. Specifying a cell_type overrides this value.
var/charge_cost = 240 //How much energy is needed to fire.
var/cell_type = null
var/projectile_type = /obj/item/projectile/beam/practice
var/modifystate
@@ -18,6 +17,9 @@
var/use_external_power = 0 //if set, the weapon will look for an external power source to draw from, otherwise it recharges magically
var/recharge_time = 4
var/charge_tick = 0
var/charge_delay = 75 //delay between firing and charging
var/battery_lock = 0 //If set, weapon cannot switch batteries
/obj/item/weapon/gun/energy/attackby(var/obj/item/A as obj, mob/user as mob)
..()
@@ -32,10 +34,7 @@
/obj/item/weapon/gun/energy/New()
..()
if(cell_type)
power_supply = new cell_type(src)
else
power_supply = new /obj/item/weapon/cell/device/variable(src, max_shots*charge_cost)
power_supply = new /obj/item/weapon/cell/device(src)
if(self_recharge)
processing_objects.Add(src)
update_icon()
@@ -46,21 +45,26 @@
..()
/obj/item/weapon/gun/energy/process()
if(self_recharge) //Every [recharge_time] ticks, recharge a shot for the cyborg
charge_tick++
if(charge_tick < recharge_time) return 0
charge_tick = 0
if(self_recharge) //Every [recharge_time] ticks, recharge a shot for the battery
if(world.time > last_shot + charge_delay) //Doesn't work if you've fired recently
if(!power_supply || power_supply.charge >= power_supply.maxcharge)
return 0 // check if we actually need to recharge
if(!power_supply || power_supply.charge >= power_supply.maxcharge)
return 0 // check if we actually need to recharge
charge_tick++
if(charge_tick < recharge_time) return 0
charge_tick = 0
if(use_external_power)
var/obj/item/weapon/cell/external = get_external_power_supply()
if(!external || !external.use(charge_cost)) //Take power from the borg...
return 0
var/rechargeamt = power_supply.maxcharge*0.2
power_supply.give(charge_cost) //... to recharge the shot
update_icon()
if(use_external_power)
var/obj/item/weapon/cell/external = get_external_power_supply()
if(!external || !external.use(rechargeamt)) //Take power from the borg...
return 0
power_supply.give(rechargeamt) //... to recharge 1/5th the battery
update_icon()
else
charge_tick = 0
return 1
/obj/item/weapon/gun/energy/consume_next_projectile()
@@ -69,6 +73,54 @@
if(!power_supply.checked_use(charge_cost)) return null
return new projectile_type(src)
/obj/item/weapon/gun/energy/proc/load_ammo(var/obj/item/C, mob/user)
if(istype(C, /obj/item/weapon/cell))
if(self_recharge || battery_lock)
user << "<span class='notice'>[src] does not have a battery port.</span>"
return
if(istype(C, /obj/item/weapon/cell/device))
var/obj/item/weapon/cell/device/P = C
if(power_supply)
user << "<span class='notice'>[src] already has a power cell.</span>"
else
user.visible_message("[user] is reloading [src].", "<span class='notice'>You start to insert [P] into [src].</span>")
if(do_after(user, 10))
user.remove_from_mob(P)
power_supply = P
P.loc = src
user.visible_message("[user] inserts [P] into [src].", "<span class='notice'>You insert [P] into [src].</span>")
playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1)
update_icon()
update_held_icon()
else
user << "<span class='notice'>This cell is not fitted for [src].</span>"
return
/obj/item/weapon/gun/energy/proc/unload_ammo(mob/user)
if(self_recharge || battery_lock)
user << "<span class='notice'>[src] does not have a battery port.</span>"
return
if(power_supply)
user.put_in_hands(power_supply)
power_supply.update_icon()
power_supply = null
user.visible_message("[user] removes [power_supply] from [src].", "<span class='notice'>You remove [power_supply] from [src].</span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
update_icon()
update_held_icon()
else
user << "<span class='notice'>[src] does not have a power cell.</span>"
/obj/item/weapon/gun/energy/attackby(var/obj/item/A as obj, mob/user as mob)
..()
load_ammo(A, user)
/obj/item/weapon/gun/energy/attack_hand(mob/user as mob)
if(user.get_inactive_hand() == src)
unload_ammo(user)
else
return ..()
/obj/item/weapon/gun/energy/proc/get_external_power_supply()
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
@@ -85,12 +137,21 @@
/obj/item/weapon/gun/energy/examine(mob/user)
..(user)
var/shots_remaining = round(power_supply.charge / charge_cost)
user << "Has [shots_remaining] shot\s remaining."
if(power_supply)
var/shots_remaining = round(power_supply.charge / charge_cost)
user << "Has [shots_remaining] shot\s remaining."
else
user << "Does not have a power cell."
return
/obj/item/weapon/gun/energy/update_icon(var/ignore_inhands)
if(charge_meter)
if(power_supply == null)
if(modifystate)
icon_state = "[modifystate]_open"
else
icon_state = "[initial(icon_state)]_open"
return
else if(charge_meter)
var/ratio = power_supply.charge / power_supply.maxcharge
//make sure that rounding down will not give us the empty state even if we have charge for a shot left.
@@ -104,3 +165,10 @@
else
icon_state = "[initial(icon_state)][ratio]"
if(!ignore_inhands) update_held_icon()
/obj/item/weapon/gun/energy/proc/start_recharge()
if(power_supply == null)
power_supply = new /obj/item/weapon/cell/device(src)
self_recharge = 1
processing_objects.Add(src)
update_icon()

View File

@@ -15,8 +15,8 @@
one_handed_penalty = 2
firemodes = list(
list(mode_name="normal", projectile_type=/obj/item/projectile/beam/midlaser, charge_cost = 200),
list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 50),
list(mode_name="normal", projectile_type=/obj/item/projectile/beam/midlaser, charge_cost = 240),
list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 60),
)
/obj/item/weapon/gun/energy/laser/mounted
@@ -30,8 +30,8 @@
projectile_type = /obj/item/projectile/beam/practice
firemodes = list(
list(mode_name="normal", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 200),
list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 50),
list(mode_name="normal", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 240),
list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 60),
)
obj/item/weapon/gun/energy/retro
@@ -56,8 +56,11 @@ obj/item/weapon/gun/energy/retro
w_class = ITEMSIZE_NORMAL
projectile_type = /obj/item/projectile/beam
origin_tech = null
max_shots = 5 //to compensate a bit for self-recharging
fire_delay = 10 //Old pistol
charge_cost = 480 //to compensate a bit for self-recharging
self_recharge = 1
recharge_time = 3 //Recharges a bit more quickly...
charge_delay = 100 //... but it takes a while to get started
/obj/item/weapon/gun/energy/lasercannon
name = "laser cannon"
@@ -69,13 +72,13 @@ obj/item/weapon/gun/energy/retro
origin_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 3, TECH_POWER = 3)
slot_flags = SLOT_BELT|SLOT_BACK
projectile_type = /obj/item/projectile/beam/heavylaser/cannon
max_shots = 4
battery_lock = 1
fire_delay = 20
w_class = ITEMSIZE_LARGE
// requires_two_hands = 1
one_handed_penalty = 6 // The thing's heavy and huge.
accuracy = 3
charge_cost = 400
charge_cost = 600
/obj/item/weapon/gun/energy/lasercannon/mounted
@@ -87,7 +90,6 @@ obj/item/weapon/gun/energy/retro
requires_two_hands = 0 // Not sure if two-handing gets checked for mounted weapons, but better safe than sorry.
projectile_type = /obj/item/projectile/beam/heavylaser
charge_cost = 400
max_shots = 6
fire_delay = 20
/obj/item/weapon/gun/energy/xray
@@ -99,8 +101,7 @@ obj/item/weapon/gun/energy/retro
fire_sound = 'sound/weapons/eluger.ogg'
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3, TECH_MAGNET = 2)
projectile_type = /obj/item/projectile/beam/xray
charge_cost = 100
max_shots = 12
charge_cost = 200
/obj/item/weapon/gun/energy/sniperrifle
name = "marksman energy rifle"
@@ -112,8 +113,8 @@ obj/item/weapon/gun/energy/retro
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 5, TECH_POWER = 4)
projectile_type = /obj/item/projectile/beam/sniper
slot_flags = SLOT_BACK
charge_cost = 400
max_shots = 4
battery_lock = 1
charge_cost = 600
fire_delay = 35
force = 10
w_class = ITEMSIZE_HUGE // So it can't fit in a backpack.

View File

@@ -4,7 +4,6 @@
icon_state = "energystun100"
item_state = null //so the human update icon uses the icon_state instead.
fire_sound = 'sound/weapons/Taser.ogg'
max_shots = 10
fire_delay = 10 // Handguns should be inferior to two-handed weapons.
projectile_type = /obj/item/projectile/beam/stun
@@ -12,8 +11,8 @@
modifystate = "energystun"
firemodes = list(
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="energystun", fire_sound='sound/weapons/Taser.ogg'),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="energykill", fire_sound='sound/weapons/Laser.ogg'),
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="energystun", fire_sound='sound/weapons/Taser.ogg', charge_cost = 240),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="energykill", fire_sound='sound/weapons/Laser.ogg', charge_cost = 480),
)
/obj/item/weapon/gun/energy/gun/mounted
@@ -28,7 +27,7 @@
icon_state = "fm-2tstun100" //May resprite this to be more rifley
item_state = null //so the human update icon uses the icon_state instead.
fire_sound = 'sound/weapons/Taser.ogg'
max_shots = 18
charge_cost = 100
force = 8
w_class = ITEMSIZE_LARGE //Probably gonna make it a rifle sooner or later
fire_delay = 6
@@ -41,16 +40,16 @@
one_handed_penalty = 2
firemodes = list(
list(mode_name="stun", burst=1, projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="fm-2tstun", fire_sound='sound/weapons/Taser.ogg'),
list(mode_name="stun", burst=1, projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="fm-2tstun", fire_sound='sound/weapons/Taser.ogg', charge_cost = 100),
list(mode_name="stun burst", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,0,0), dispersion=list(0.0, 0.2, 0.5), projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="fm-2tstun", fire_sound='sound/weapons/Taser.ogg'),
list(mode_name="lethal", burst=1, projectile_type=/obj/item/projectile/beam/burstlaser, modifystate="fm-2tkill", fire_sound='sound/weapons/Laser.ogg'),
list(mode_name="lethal", burst=1, projectile_type=/obj/item/projectile/beam/burstlaser, modifystate="fm-2tkill", fire_sound='sound/weapons/Laser.ogg', charge_cost = 200),
list(mode_name="lethal burst", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,0,0), dispersion=list(0.0, 0.2, 0.5), projectile_type=/obj/item/projectile/beam/burstlaser, modifystate="fm-2tkill", fire_sound='sound/weapons/Laser.ogg'),
)
/obj/item/weapon/gun/energy/gun/nuclear
name = "advanced energy gun"
desc = "An energy gun with an experimental miniaturized reactor."
icon_state = "nucgun"
icon_state = "nucgunstun"
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 5, TECH_POWER = 3)
slot_flags = SLOT_BELT
force = 8 //looks heavier than a pistol
@@ -63,44 +62,6 @@
one_handed_penalty = 1 // It's rather bulky, so holding it in one hand is a little harder than with two, however it's not 'required'.
firemodes = list(
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg'),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg'),
)
var/lightfail = 0
//override for failcheck behaviour
/obj/item/weapon/gun/energy/gun/nuclear/process()
charge_tick++
if(charge_tick < 4) return 0
charge_tick = 0
if(!power_supply) return 0
if((power_supply.charge / power_supply.maxcharge) != 1)
power_supply.give(charge_cost)
update_icon()
return 1
/obj/item/weapon/gun/energy/gun/nuclear/proc/update_charge()
var/ratio = power_supply.charge / power_supply.maxcharge
ratio = round(ratio, 0.25) * 100
overlays += "nucgun-[ratio]"
/obj/item/weapon/gun/energy/gun/nuclear/proc/update_reactor()
if(lightfail)
overlays += "nucgun-medium"
else if ((power_supply.charge/power_supply.maxcharge) <= 0.5)
overlays += "nucgun-light"
else
overlays += "nucgun-clean"
/obj/item/weapon/gun/energy/gun/nuclear/proc/update_mode()
var/datum/firemode/current_mode = firemodes[sel_mode]
switch(current_mode.name)
if("stun") overlays += "nucgun-stun"
if("lethal") overlays += "nucgun-kill"
/obj/item/weapon/gun/energy/gun/nuclear/update_icon()
overlays.Cut()
update_charge()
update_reactor()
update_mode()
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, modifystate="nucgunstun", fire_sound='sound/weapons/Taser.ogg', charge_cost = 240),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="nucgunkill", fire_sound='sound/weapons/Laser.ogg', charge_cost = 480),
)

View File

@@ -7,14 +7,13 @@
force = 10
fire_sound='sound/weapons/Laser.ogg'
projectile_type = /obj/item/projectile/beam
charge_cost=100
max_shots = 20 // This is cut in half by "DESTROY" mode.
charge_cost = 120
sel_mode = 2
firemodes = list(
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg', fire_delay=null, charge_cost=100),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg', fire_delay=null, charge_cost=100),
list(mode_name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/gauss_shoot.ogg', fire_delay=null, charge_cost=200),
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg', fire_delay=null, charge_cost = 120),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg', fire_delay=null, charge_cost = 120),
list(mode_name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/gauss_shoot.ogg', fire_delay=null, charge_cost = 240),
)
/obj/item/weapon/gun/energy/pulse_rifle/mounted
@@ -24,11 +23,9 @@
/obj/item/weapon/gun/energy/pulse_rifle/destroyer
name = "pulse destroyer"
desc = "A heavy-duty, pulse-based energy weapon. Because of its complexity and cost, it is rarely seen in use except by specialists."
cell_type = /obj/item/weapon/cell/super
fire_delay = 25
fire_sound='sound/weapons/gauss_shoot.ogg'
projectile_type=/obj/item/projectile/beam/pulse
charge_cost=400
charge_cost = 120
/obj/item/weapon/gun/energy/pulse_rifle/destroyer/attack_self(mob/living/user as mob)
user << "<span class='warning'>[src.name] has three settings, and they are all DESTROY.</span>"
@@ -39,4 +36,10 @@
desc = "It's not the size of the gun, it's the size of the hole it puts through people."
slot_flags = SLOT_BELT|SLOT_HOLSTER
icon_state = "m1911-p"
max_shots = 5
charge_cost = 240
firemodes = list(
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg', fire_delay=null, charge_cost = 240),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg', fire_delay=null, charge_cost = 240),
list(mode_name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/gauss_shoot.ogg', fire_delay=null, charge_cost = 480),
)

View File

@@ -9,8 +9,6 @@
force = 10
flags = CONDUCT
slot_flags = SLOT_BACK
charge_cost = 300
max_shots = 10
projectile_type = /obj/item/projectile/ion
/obj/item/weapon/gun/energy/ionrifle/emp_act(severity)
@@ -30,7 +28,6 @@
item_state = "decloner"
fire_sound = 'sound/weapons/pulse3.ogg'
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 4, TECH_POWER = 3)
max_shots = 10
projectile_type = /obj/item/projectile/energy/declone
/obj/item/weapon/gun/energy/floragun
@@ -39,8 +36,6 @@
icon_state = "floramut100"
item_state = "floramut"
fire_sound = 'sound/effects/stealthoff.ogg'
charge_cost = 100
max_shots = 10
projectile_type = /obj/item/projectile/energy/floramut
origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3, TECH_POWER = 3)
modifystate = "floramut"
@@ -68,6 +63,7 @@
w_class = ITEMSIZE_LARGE
projectile_type = /obj/item/projectile/meteor
cell_type = /obj/item/weapon/cell/potato
charge_cost = 100
self_recharge = 1
recharge_time = 5 //Time it takes for shots to recharge (in ticks)
charge_meter = 0
@@ -110,7 +106,7 @@
flags = CONDUCT
slot_flags = SLOT_BACK
w_class = ITEMSIZE_LARGE
max_shots = 5
charge_cost = 480
projectile_type = /obj/item/projectile/change
origin_tech = null
self_recharge = 1
@@ -134,7 +130,7 @@
name = "staff of animation"
desc = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines."
projectile_type = /obj/item/projectile/animate
max_shots = 10
charge_cost = 240
obj/item/weapon/gun/energy/staff/focus
name = "mental focus"

View File

@@ -4,7 +4,6 @@
icon_state = "taser"
item_state = null //so the human update icon uses the icon_state instead.
fire_sound = 'sound/weapons/Taser.ogg'
max_shots = 10
projectile_type = /obj/item/projectile/beam/stun
/obj/item/weapon/gun/energy/taser/mounted
@@ -14,7 +13,7 @@
/obj/item/weapon/gun/energy/taser/mounted/cyborg
name = "taser gun"
max_shots = 6
charge_cost = 400
recharge_time = 7 //Time it takes for shots to recharge (in ticks)
@@ -26,7 +25,7 @@
fire_sound = 'sound/weapons/Gunshot.ogg'
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_POWER = 2)
projectile_type = /obj/item/projectile/energy/electrode/strong
max_shots = 8
charge_cost = 300
/obj/item/weapon/gun/energy/crossbow
@@ -41,7 +40,7 @@
silenced = 1
fire_sound = 'sound/weapons/Genhit.ogg'
projectile_type = /obj/item/projectile/energy/bolt
max_shots = 5
charge_cost = 480
self_recharge = 1
charge_meter = 0

View File

@@ -5,7 +5,7 @@
desc = "A gun that changes temperatures. It has a small label on the side, 'More extreme temperatures will cost more charge!'"
var/temperature = T20C
var/current_temperature = T20C
charge_cost = 100
charge_cost = 24
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 4, TECH_POWER = 3, TECH_MAGNET = 2)
slot_flags = SLOT_BELT|SLOT_BACK

View File

@@ -260,6 +260,15 @@ other types of metals and chemistry for reagents).
category = "Misc"
sort_string = "DAAAD"
/datum/design/item/powercell/device
name = "device"
build_type = PROTOLATHE
id = "device"
materials = list(DEFAULT_WALL_MATERIAL = 350, "glass" = 25)
build_path = /obj/item/weapon/cell/device
category = "Misc"
sort_string = "DAAAE"
/datum/design/item/hud
materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)

View File

@@ -1,11 +1,11 @@
/* What this file contains:
* A specialized stun prod, for handling fiesty slimes
* A specialized stun gun, for handling many fiesty slimes
* A stun projectile for handling xenomorphs.
*/
/obj/item/weapon/melee/baton/slime
name = "slimebaton"
@@ -27,32 +27,31 @@
else
X.stasis += (stasisforce / 6)
..()
/obj/item/weapon/melee/baton/slime/loaded/New()
..()
bcell = new/obj/item/weapon/cell/high(src)
bcell = new/obj/item/weapon/cell/device(src)
update_icon()
return
// Xeno stun gun + projectile
/obj/item/weapon/gun/energy/taser/xeno
name = "xeno taser gun"
desc = "Straight out of NT's testing laboratories, this small gun is used to subdue non-humanoid xeno life forms. While marketed towards handling slimes, it may be useful for other creatures."
icon_state = "taserold"
fire_sound = 'sound/weapons/taser2.ogg'
max_shots = 10
projectile_type = /obj/item/projectile/beam/stun/xeno
/obj/item/projectile/beam/stun/xeno
icon_state = "omni"
agony = 4
var/stasisforce = 40
muzzle_type = /obj/effect/projectile/laser_omni/muzzle
tracer_type = /obj/effect/projectile/laser_omni/tracer
impact_type = /obj/effect/projectile/laser_omni/impact
/obj/item/projectile/beam/stun/xeno/on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/simple_animal/xeno))
var/mob/living/simple_animal/xeno/X = target

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 29 KiB