mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
Blood dialysis
This commit is contained in:
@@ -73,6 +73,15 @@
|
||||
for(var/chemical in connected.available_chemicals)
|
||||
dat += "[connected.available_chemicals[chemical]]: [occupant.reagents.get_reagent_amount(chemical)] units<br>"
|
||||
dat += "<HR><A href='?src=\ref[src];refresh=1'>Refresh meter readings each second</A><BR>"
|
||||
if(src.connected.beaker)
|
||||
if(src.connected.filtering)
|
||||
dat += "<HR><A href='?src=\ref[src];togglefilter=1'>Stop Dialysis</A><BR>"
|
||||
dat += text("Output Beaker has [] units of free space remaining<BR><HR>", src.connected.beaker.reagents.maximum_volume - src.connected.beaker.reagents.total_volume)
|
||||
else
|
||||
dat += "<HR><A href='?src=\ref[src];togglefilter=1'>Start Dialysis</A><BR>"
|
||||
dat += text("Output Beaker has [] units of free space remaining<BR><HR>", src.connected.beaker.reagents.maximum_volume - src.connected.beaker.reagents.total_volume)
|
||||
else
|
||||
dat += "<HR>No Dialysis Output Beaker is present.<BR><HR>"
|
||||
for(var/chemical in connected.available_chemicals)
|
||||
dat += "Inject [connected.available_chemicals[chemical]]: "
|
||||
for(var/amount in connected.amounts)
|
||||
@@ -101,6 +110,9 @@
|
||||
usr << "\red \b This person is not in good enough condition for sleepers to be effective! Use another means of treatment, such as cryogenics!"
|
||||
if (href_list["refresh"])
|
||||
src.updateUsrDialog()
|
||||
if (href_list["togglefilter"])
|
||||
src.connected.toggle_filter()
|
||||
src.updateUsrDialog()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
@@ -131,13 +143,15 @@
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/orient = "LEFT" // "RIGHT" changes the dir suffix to "-r"
|
||||
var/mob/living/occupant = null
|
||||
var/mob/living/carbon/human/occupant = null
|
||||
var/available_chemicals = list("inaprovaline" = "Inaprovaline", "stoxin" = "Soporific", "dermaline" = "Dermaline", "bicaridine" = "Bicaridine", "dexalin" = "Dexalin")
|
||||
var/amounts = list(10, 20)
|
||||
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/filtering = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large()
|
||||
spawn( 5 )
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_0-r"
|
||||
@@ -150,6 +164,14 @@
|
||||
|
||||
|
||||
process()
|
||||
if(filtering > 0)
|
||||
if(beaker)
|
||||
if(beaker.reagents.total_volume < beaker.reagents.maximum_volume)
|
||||
src.occupant.vessel.trans_to(beaker, 1)
|
||||
for(var/datum/reagent/x in src.occupant.reagents.reagent_list)
|
||||
// world << "FILTERING CHEMS"
|
||||
src.occupant.reagents.trans_to(beaker, 3)
|
||||
src.occupant.vessel.trans_to(beaker, 1)
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
@@ -163,46 +185,57 @@
|
||||
return
|
||||
|
||||
|
||||
attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
|
||||
if((!( istype(G, /obj/item/weapon/grab)) || !( ismob(G.affecting))))
|
||||
return
|
||||
if(src.occupant)
|
||||
user << "\blue <B>The sleeper is already occupied!</B>"
|
||||
return
|
||||
|
||||
for(var/mob/living/carbon/slime/M in range(1,G.affecting))
|
||||
if(M.Victim == G.affecting)
|
||||
usr << "[G.affecting.name] will not fit into the sleeper because they have a slime latched onto their head."
|
||||
attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
|
||||
if(istype(G, /obj/item/weapon/reagent_containers/glass))
|
||||
if(!beaker)
|
||||
beaker = G
|
||||
user.drop_item()
|
||||
G.loc = src
|
||||
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
||||
return
|
||||
else
|
||||
user << "\red The sleeper has a beaker already."
|
||||
return
|
||||
|
||||
visible_message("[user] starts putting [G.affecting.name] into the sleeper.", 3)
|
||||
|
||||
if(do_after(user, 20))
|
||||
else if(istype(G, /obj/item/weapon/grab))
|
||||
if(!ismob(G:affecting))
|
||||
return
|
||||
if(src.occupant)
|
||||
user << "\blue <B>The sleeper is already occupied!</B>"
|
||||
return
|
||||
if(!G || !G.affecting) return
|
||||
var/mob/M = G.affecting
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
src.occupant = M
|
||||
src.icon_state = "sleeper_1"
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_1-r"
|
||||
for(var/mob/living/carbon/slime/M in range(1,G:affecting))
|
||||
if(M.Victim == G:affecting)
|
||||
usr << "[G:affecting.name] will not fit into the sleeper because they have a slime latched onto their head."
|
||||
return
|
||||
|
||||
M << "\blue <b>You feel cool air surround you. You go numb as your senses turn inward.</b>"
|
||||
visible_message("[user] starts putting [G:affecting:name] into the sleeper.", 3)
|
||||
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
src.add_fingerprint(user)
|
||||
del(G)
|
||||
if(do_after(user, 20))
|
||||
if(src.occupant)
|
||||
user << "\blue <B>The sleeper is already occupied!</B>"
|
||||
return
|
||||
if(!G || !G:affecting) return
|
||||
var/mob/M = G:affecting
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
src.occupant = M
|
||||
src.icon_state = "sleeper_1"
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_1-r"
|
||||
|
||||
M << "\blue <b>You feel cool air surround you. You go numb as your senses turn inward.</b>"
|
||||
|
||||
src.add_fingerprint(user)
|
||||
del(G)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
if(filtering)
|
||||
toggle_filter()
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
@@ -226,6 +259,8 @@
|
||||
return
|
||||
return
|
||||
emp_act(severity)
|
||||
if(filtering)
|
||||
toggle_filter()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
return
|
||||
@@ -251,12 +286,17 @@
|
||||
M:reagents.add_reagent("inaprovaline", 5)
|
||||
return
|
||||
|
||||
proc/toggle_filter()
|
||||
if(filtering)
|
||||
filtering = 0
|
||||
else
|
||||
filtering = 1
|
||||
|
||||
proc/go_out()
|
||||
if(filtering)
|
||||
toggle_filter()
|
||||
if(!src.occupant)
|
||||
return
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
if(src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
@@ -297,6 +337,10 @@
|
||||
user << text("[]\t -Burn Severity %: []", (src.occupant.getFireLoss() < 60 ? "\blue " : "\red "), src.occupant.getFireLoss())
|
||||
user << "\blue Expected time till occupant can safely awake: (note: If health is below 20% these times are inaccurate)"
|
||||
user << text("\blue \t [] second\s (if around 1 or 2 the sleeper is keeping them asleep.)", src.occupant.paralysis / 5)
|
||||
if(src.beaker)
|
||||
user << text("\blue \t Dialysis Output Beaker has [] of free space remaining.", src.beaker.reagents.maximum_volume - src.beaker.reagents.total_volume)
|
||||
else
|
||||
user << "\blue No Dialysis Output Beaker loaded."
|
||||
else
|
||||
user << "\blue There is no one inside!"
|
||||
return
|
||||
@@ -315,6 +359,18 @@
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
verb/remove_beaker()
|
||||
set name = "Remove Beaker"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if(usr.stat != 0)
|
||||
return
|
||||
if(beaker)
|
||||
filtering = 0
|
||||
beaker.loc = usr.loc
|
||||
beaker = null
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
verb/move_inside()
|
||||
set name = "Enter Sleeper"
|
||||
@@ -346,6 +402,8 @@
|
||||
if(orient == "RIGHT")
|
||||
icon_state = "sleeper_1-r"
|
||||
|
||||
usr << "\blue <b>You feel cool air surround you. You go numb as your senses turn inward.</b>"
|
||||
|
||||
for(var/obj/O in src)
|
||||
del(O)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/path = 0
|
||||
var/obj/item/device/assembly_holder/detonator = null
|
||||
var/list/beakers = new/list()
|
||||
var/list/allowed_containers = list(/obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
|
||||
var/list/allowed_containers = list(/obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/beaker/large, /obj/item/weapon/reagent_containers/glass/bottle)
|
||||
var/affected_area = 3
|
||||
|
||||
New()
|
||||
@@ -176,7 +176,7 @@
|
||||
name = "Large Chem Grenade"
|
||||
desc = "An oversized grenade that affects a larger area."
|
||||
icon_state = "large_grenade"
|
||||
allowed_containers = list(/obj/item/weapon/reagent_containers/glass)
|
||||
allowed_containers = list(/obj/item/weapon/reagent_containers/glass/beaker/bluespace)
|
||||
origin_tech = "combat=3;materials=3"
|
||||
affected_area = 4
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ var/const/speed = -1
|
||||
/mob/living/simple_animal/hostile/zombie
|
||||
name = "zombie"
|
||||
desc = "Cannablism at its best."
|
||||
icon = 'icons/mob//otherHuman/human.dmi'
|
||||
icon = 'icons/mob/otherHuman/human.dmi'
|
||||
icon_state = "zombie_s"
|
||||
icon_living = "zombie_s"
|
||||
icon_dead = "zombie_l"
|
||||
|
||||
@@ -120,41 +120,25 @@
|
||||
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
|
||||
msg_admin_attack("UNKNOWN shot [M] ([M.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
|
||||
|
||||
spawn(0)
|
||||
|
||||
if(A)
|
||||
if(firer && istype(A, /obj/structure/stool/bed/chair/cart))//This is very sloppy but there's no way to get the firer after its passed to bullet_act, we'll just have to assume the admins will use their judgement
|
||||
var/obj/structure/stool/bed/chair/cart/JC = A
|
||||
if(JC.buckled_mob)
|
||||
var/mob/BM = JC.buckled_mob
|
||||
if(istype(firer, /mob))
|
||||
BM.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[BM]/[BM.ckey]</b> with a <b>[src.type]</b>"
|
||||
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[BM]/[BM.ckey]</b> with a <b>[src.type]</b>"
|
||||
log_attack("<font color='red'>[firer] ([firer.ckey]) shot [BM] ([BM.ckey]) with a [src.type]</font>")
|
||||
msg_admin_attack("ATTACK: [firer] ([firer.ckey]) shot [BM] ([BM.ckey]) with a [src]") //BS12 EDIT ALG
|
||||
else
|
||||
BM.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[BM]/[BM.ckey]</b> with a <b>[src]</b>"
|
||||
log_attack("<font color='red'>UNKNOWN shot [BM] ([BM.ckey]) with a [src.type]</font>")
|
||||
msg_admin_attack("ATTACK: UNKNOWN shot [BM] ([BM.ckey]) with a [src]") //BS12 EDIT ALG
|
||||
if (!forcedodge)
|
||||
forcedodge = A.bullet_act(src, def_zone) // searches for return value
|
||||
if(forcedodge == -1) // the bullet passes through a dense object!
|
||||
bumped = 0 // reset bumped variable!
|
||||
if(istype(A, /turf))
|
||||
loc = A
|
||||
else
|
||||
loc = A.loc
|
||||
permutated.Add(A)
|
||||
return 0
|
||||
if(istype(A,/turf))
|
||||
for(var/obj/O in A)
|
||||
O.bullet_act(src)
|
||||
for(var/mob/M in A)
|
||||
M.bullet_act(src, def_zone)
|
||||
if(!istype(src, /obj/item/projectile/beam/lightning))
|
||||
density = 0
|
||||
invisibility = 101
|
||||
del(src)
|
||||
if(A)
|
||||
if (!forcedodge)
|
||||
forcedodge = A.bullet_act(src, def_zone) // searches for return value
|
||||
if(forcedodge == -1) // the bullet passes through a dense object!
|
||||
bumped = 0 // reset bumped variable!
|
||||
if(istype(A, /turf))
|
||||
loc = A
|
||||
else
|
||||
loc = A.loc
|
||||
permutated.Add(A)
|
||||
return 0
|
||||
if(istype(A,/turf))
|
||||
for(var/obj/O in A)
|
||||
O.bullet_act(src)
|
||||
for(var/mob/M in A)
|
||||
M.bullet_act(src, def_zone)
|
||||
density = 0
|
||||
invisibility = 101
|
||||
del(src)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
/obj/machinery/apiary,
|
||||
/mob/living/simple_animal/cow,
|
||||
/mob/living/simple_animal/hostile/retaliate/goat,
|
||||
/obj/machinery/computer/centrifuge )
|
||||
/obj/machinery/computer/centrifuge,
|
||||
/obj/machinery/sleeper )
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user