mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 08:03:43 +01:00
Defib update, cell path update
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
var/on = 0 //is it turned on?
|
||||
var/cover_open = 0 //is the cover open?
|
||||
var/obj/item/weapon/cell/cell
|
||||
var/obj/item/weapon/stock_parts/cell/cell
|
||||
var/max_cooling = 12 //in degrees per second - probably don't need to mess with heat capacity here
|
||||
var/charge_consumption = 16.6 //charge per second at max_cooling
|
||||
var/thermostat = T20C
|
||||
@@ -25,7 +25,7 @@
|
||||
//TODO: make it heat up the surroundings when not in space
|
||||
|
||||
/obj/item/device/suit_cooling_unit/New()
|
||||
cell = new/obj/item/weapon/cell() //comes with the crappy default power cell - high-capacity ones shouldn't be hard to find
|
||||
cell = new/obj/item/weapon/stock_parts/cell() //comes with the crappy default power cell - high-capacity ones shouldn't be hard to find
|
||||
cell.loc = src
|
||||
|
||||
/obj/item/device/suit_cooling_unit/proc/cool_mob(mob/M)
|
||||
@@ -132,7 +132,7 @@
|
||||
updateicon()
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/cell))
|
||||
if (istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
if(cover_open)
|
||||
if(cell)
|
||||
user << "There is a [cell] already installed here."
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
construction_time = 350
|
||||
construction_cost = list("metal"=40000)
|
||||
var/wires = 0.0
|
||||
var/obj/item/weapon/cell/cell = null
|
||||
var/obj/item/weapon/stock_parts/cell/cell = null
|
||||
|
||||
/obj/item/robot_parts/head
|
||||
name = "robot head"
|
||||
@@ -251,7 +251,7 @@
|
||||
|
||||
/obj/item/robot_parts/chest/attackby(obj/item/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
if(src.cell)
|
||||
user << "\blue You have already inserted a cell!"
|
||||
return
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
var/safety = 1 //if you can zap people with the defibs on harm mode
|
||||
var/powered = 0 //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise
|
||||
var/obj/item/weapon/twohanded/shockpaddles/paddles
|
||||
var/obj/item/weapon/cell/high/bcell = null
|
||||
var/obj/item/weapon/stock_parts/cell/high/bcell = null
|
||||
var/combat = 0 //can we revive through space suits?
|
||||
|
||||
/obj/item/weapon/defibrillator/New() //starts without a cell for rnd
|
||||
..()
|
||||
@@ -67,7 +68,7 @@
|
||||
overlays += "defibunit-charge[ratio]"
|
||||
|
||||
/obj/item/weapon/defibrillator/CheckParts()
|
||||
bcell = locate(/obj/item/weapon/cell) in contents
|
||||
bcell = locate(/obj/item/weapon/stock_parts/cell) in contents
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/defibrillator/ui_action_click()
|
||||
@@ -78,8 +79,8 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
var/obj/item/weapon/cell/C = W
|
||||
if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
var/obj/item/weapon/stock_parts/cell/C = W
|
||||
if(bcell)
|
||||
user << "<span class='notice'>[src] already has a cell.</span>"
|
||||
else
|
||||
@@ -195,6 +196,49 @@
|
||||
paddles.cooldown = 0
|
||||
paddles.update_icon()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/defibrillator/compact
|
||||
name = "compact defibrillator"
|
||||
desc = "A belt-equipped defibrillator that can be rapidly deployed."
|
||||
icon_state = "defibcompact"
|
||||
item_state = "defibcompact"
|
||||
w_class = 3
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "biotech=4"
|
||||
|
||||
/obj/item/weapon/defibrillator/compact/ui_action_click()
|
||||
if(usr.get_item_by_slot(slot_belt) == src)
|
||||
toggle_paddles()
|
||||
else
|
||||
usr << "<span class='warning'>Strap the defibrillator's belt on first!</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/defibrillator/compact/loaded/New()
|
||||
..()
|
||||
paddles = make_paddles()
|
||||
bcell = new(src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/defibrillator/compact/combat
|
||||
name = "combat defibrillator"
|
||||
desc = "A belt-equipped blood-red defibrillator that can be rapidly deployed. Does not have the restrictions or safeties of conventional defibrillators and can revive through space suits."
|
||||
combat = 1
|
||||
safety = 0
|
||||
|
||||
/obj/item/weapon/defibrillator/compact/combat/loaded/New()
|
||||
..()
|
||||
paddles = make_paddles()
|
||||
bcell = new /obj/item/weapon/stock_parts/cell/infinite(src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/defibrillator/compact/combat/attackby(obj/item/weapon/W, mob/user)
|
||||
if(W == paddles)
|
||||
paddles.unwield()
|
||||
toggle_paddles()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
//paddles
|
||||
|
||||
@@ -254,7 +298,7 @@
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/twohanded/shockpaddles/attack(mob/M as mob, mob/user as mob)
|
||||
/obj/item/weapon/twohanded/shockpaddles/attack(mob/M, mob/user)
|
||||
var/tobehealed
|
||||
var/threshold = -config.health_threshold_dead
|
||||
var/mob/living/carbon/human/H = M
|
||||
@@ -300,18 +344,19 @@
|
||||
playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 0)
|
||||
var/mob/dead/observer/ghost = H.get_ghost()
|
||||
var/tplus = world.time - H.timeofdeath
|
||||
var/tlimit = 3000 //past this much time the patient is unrecoverable (in deciseconds)
|
||||
var/tloss = 900 //brain damage starts setting in on the patient after some time left rotting
|
||||
var/tlimit = 6000 //past this much time the patient is unrecoverable (in deciseconds)
|
||||
var/tloss = 3000 //brain damage starts setting in on the patient after some time left rotting
|
||||
var/total_burn = 0
|
||||
var/total_brute = 0
|
||||
if(do_after(user, 20)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
|
||||
for(var/obj/item/carried_item in H.contents)
|
||||
if((istype(carried_item, /obj/item/clothing/suit/armor)) || (istype(carried_item, /obj/item/clothing/suit/space)))
|
||||
user.visible_message("<span class='notice'>[defib] buzzes: Patient's chest is obscured. Operation aborted.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
busy = 0
|
||||
update_icon()
|
||||
return
|
||||
if(istype(carried_item, /obj/item/clothing/suit/space))
|
||||
if(!defib.combat)
|
||||
user.visible_message("<span class='notice'>[defib] buzzes: Patient's chest is obscured. Operation aborted.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
busy = 0
|
||||
update_icon()
|
||||
return
|
||||
if(H.stat == 2)
|
||||
var/health = H.health
|
||||
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/cyborg/attack(mob/M, var/mob/living/silicon/robot/R)
|
||||
if(R.cell)
|
||||
var/obj/item/weapon/cell/C = R.cell
|
||||
var/obj/item/weapon/stock_parts/cell/C = R.cell
|
||||
if(active && !(C.use(hitcost)))
|
||||
attack_self()
|
||||
R << "<span class='notice'>It's out of charge!</span>"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/cell
|
||||
/obj/item/weapon/stock_parts/cell
|
||||
name = "power cell"
|
||||
desc = "A rechargable electrochemical power cell."
|
||||
icon = 'icons/obj/power.dmi'
|
||||
@@ -13,7 +13,7 @@
|
||||
w_class = 3.0
|
||||
var/charge = 0 // note %age conveted to actual charge in New
|
||||
var/maxcharge = 10000
|
||||
var/rating = 1
|
||||
rating = 1
|
||||
m_amt = 700
|
||||
g_amt = 50
|
||||
var/rigged = 0 // true if rigged to explode
|
||||
@@ -25,7 +25,7 @@
|
||||
viewers(user) << "<span class='suicide'>[user] is licking the electrodes of the [src.name]! It looks like \he's trying to commit suicide.</span>"
|
||||
return (FIRELOSS)
|
||||
|
||||
/obj/item/weapon/cell/crap
|
||||
/obj/item/weapon/stock_parts/cell/crap
|
||||
name = "\improper Nanotrasen brand rechargable AA battery"
|
||||
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
|
||||
origin_tech = "powerstorage=0"
|
||||
@@ -33,22 +33,22 @@
|
||||
rating = 2
|
||||
g_amt = 40
|
||||
|
||||
/obj/item/weapon/cell/crap/empty/New()
|
||||
/obj/item/weapon/stock_parts/cell/crap/empty/New()
|
||||
..()
|
||||
charge = 0
|
||||
|
||||
/obj/item/weapon/cell/secborg
|
||||
/obj/item/weapon/stock_parts/cell/secborg
|
||||
name = "\improper Security borg rechargable D battery"
|
||||
origin_tech = "powerstorage=0"
|
||||
maxcharge = 6000 //6000 max charge / 1000 charge per shot = six shots
|
||||
rating = 2.5
|
||||
g_amt = 40
|
||||
|
||||
/obj/item/weapon/cell/secborg/empty/New()
|
||||
/obj/item/weapon/stock_parts/cell/secborg/empty/New()
|
||||
..()
|
||||
charge = 0
|
||||
|
||||
/obj/item/weapon/cell/high
|
||||
/obj/item/weapon/stock_parts/cell/high
|
||||
name = "high-capacity power cell"
|
||||
origin_tech = "powerstorage=2"
|
||||
icon_state = "hcell"
|
||||
@@ -56,11 +56,11 @@
|
||||
rating = 3
|
||||
g_amt = 60
|
||||
|
||||
/obj/item/weapon/cell/high/empty/New()
|
||||
/obj/item/weapon/stock_parts/cell/high/empty/New()
|
||||
..()
|
||||
charge = 0
|
||||
|
||||
/obj/item/weapon/cell/super
|
||||
/obj/item/weapon/stock_parts/cell/super
|
||||
name = "super-capacity power cell"
|
||||
origin_tech = "powerstorage=5"
|
||||
icon_state = "scell"
|
||||
@@ -69,11 +69,11 @@
|
||||
rating = 4
|
||||
construction_cost = list("metal"=750,"glass"=100)
|
||||
|
||||
/obj/item/weapon/cell/super/empty/New()
|
||||
/obj/item/weapon/stock_parts/cell/super/empty/New()
|
||||
..()
|
||||
charge = 0
|
||||
|
||||
/obj/item/weapon/cell/hyper
|
||||
/obj/item/weapon/stock_parts/cell/hyper
|
||||
name = "hyper-capacity power cell"
|
||||
origin_tech = "powerstorage=6"
|
||||
icon_state = "hpcell"
|
||||
@@ -82,11 +82,11 @@
|
||||
g_amt = 80
|
||||
construction_cost = list("metal"=500,"glass"=150,"gold"=200,"silver"=200)
|
||||
|
||||
/obj/item/weapon/cell/hyper/empty/New()
|
||||
/obj/item/weapon/stock_parts/cell/hyper/empty/New()
|
||||
..()
|
||||
charge = 0
|
||||
|
||||
/obj/item/weapon/cell/infinite
|
||||
/obj/item/weapon/stock_parts/cell/infinite
|
||||
name = "infinite-capacity power cell!"
|
||||
icon_state = "icell"
|
||||
origin_tech = null
|
||||
@@ -96,7 +96,7 @@
|
||||
use()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/cell/potato
|
||||
/obj/item/weapon/stock_parts/cell/potato
|
||||
name = "potato battery"
|
||||
desc = "A rechargable starch based power cell."
|
||||
origin_tech = "powerstorage=1"
|
||||
@@ -110,7 +110,7 @@
|
||||
minor_fault = 1
|
||||
|
||||
|
||||
/obj/item/weapon/cell/slime
|
||||
/obj/item/weapon/stock_parts/cell/slime
|
||||
name = "charged slime core"
|
||||
desc = "A yellow slime core infused with plasma, it crackles with power."
|
||||
origin_tech = "powerstorage=2;biotech=4"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
attack_verb = list("beaten")
|
||||
var/stunforce = 7
|
||||
var/status = 0
|
||||
var/obj/item/weapon/cell/high/bcell = null
|
||||
var/obj/item/weapon/stock_parts/cell/high/bcell = null
|
||||
var/hitcost = 1500
|
||||
|
||||
/obj/item/weapon/melee/baton/suicide_act(mob/user)
|
||||
@@ -25,7 +25,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/melee/baton/CheckParts()
|
||||
bcell = locate(/obj/item/weapon/cell) in contents
|
||||
bcell = locate(/obj/item/weapon/stock_parts/cell) in contents
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/melee/baton/loaded/New() //this one starts with a cell pre-installed.
|
||||
@@ -61,8 +61,8 @@
|
||||
user <<"<span class='warning'>The baton does not have a power source installed.</span>"
|
||||
|
||||
/obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
var/obj/item/weapon/cell/C = W
|
||||
if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
var/obj/item/weapon/stock_parts/cell/C = W
|
||||
if(bcell)
|
||||
user << "<span class='notice'>[src] already has a cell.</span>"
|
||||
else
|
||||
|
||||
@@ -56,11 +56,11 @@
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "cell"
|
||||
item_to_spawn()
|
||||
return pick(prob(10);/obj/item/weapon/cell/crap,\
|
||||
prob(40);/obj/item/weapon/cell,\
|
||||
prob(40);/obj/item/weapon/cell/high,\
|
||||
prob(9);/obj/item/weapon/cell/super,\
|
||||
prob(1);/obj/item/weapon/cell/hyper)
|
||||
return pick(prob(10);/obj/item/weapon/stock_parts/cell/crap,\
|
||||
prob(40);/obj/item/weapon/stock_parts/cell,\
|
||||
prob(40);/obj/item/weapon/stock_parts/cell/high,\
|
||||
prob(9);/obj/item/weapon/stock_parts/cell/super,\
|
||||
prob(1);/obj/item/weapon/stock_parts/cell/hyper)
|
||||
|
||||
|
||||
/obj/random/bomb_supply
|
||||
|
||||
@@ -13,5 +13,5 @@
|
||||
new /obj/item/clothing/head/helmet/space/nasavoid(src)
|
||||
new /obj/item/clothing/suit/space/nasavoid(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/cell(src)
|
||||
new /obj/item/weapon/stock_parts/cell(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
@@ -148,7 +148,7 @@
|
||||
new /obj/item/clothing/shoes/brown (src)
|
||||
new /obj/item/device/radio/headset/heads/cmo(src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/weapon/defibrillator/loaded(src)
|
||||
new /obj/item/weapon/defibrillator/compact/loaded(src)
|
||||
new /obj/item/weapon/storage/belt/medical(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/CMO(src)
|
||||
|
||||
Reference in New Issue
Block a user