From 9ccc08a518bce9d5201660fd6a29ddab9b5ff592 Mon Sep 17 00:00:00 2001 From: Segrain Date: Fri, 2 Aug 2013 19:24:55 +0300 Subject: [PATCH 1/5] Mapping advanced medkits. --- maps/tgstation.2.1.0.0.1.dmm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/maps/tgstation.2.1.0.0.1.dmm b/maps/tgstation.2.1.0.0.1.dmm index 35d839fa22..807825435b 100644 --- a/maps/tgstation.2.1.0.0.1.dmm +++ b/maps/tgstation.2.1.0.0.1.dmm @@ -3544,7 +3544,7 @@ "bqh" = (/obj/machinery/firealarm{dir = 8; pixel_x = -24},/obj/machinery/camera{c_tag = "Toxins Storage"; dir = 4; network = list("SS13","Research")},/turf/simulated/floor,/area/toxins/storage) "bqi" = (/obj/structure/table,/obj/item/weapon/storage/box/bodybags{pixel_x = 3; pixel_y = 3},/obj/item/weapon/storage/box/rxglasses,/turf/simulated/floor{icon_state = "white"},/area/medical/sleeper) "bqj" = (/obj/machinery/camera{c_tag = "Bar Storage"},/obj/structure/table/woodentable,/obj/machinery/reagentgrinder,/turf/simulated/floor/wood,/area/crew_quarters/bar) -"bqk" = (/obj/structure/table,/obj/item/weapon/storage/box/beakers{pixel_x = -1; pixel_y = -1; pixel_x = 2; pixel_y = 2},/obj/item/weapon/storage/box/syringes,/turf/simulated/floor{icon_state = "white"},/area/medical/sleeper) +"bqk" = (/obj/structure/table,/obj/item/weapon/storage/box/beakers{pixel_x = -1; pixel_y = -1; pixel_x = 2; pixel_y = 2},/obj/item/weapon/storage/box/syringes,/obj/item/weapon/storage/box/cdeathalarm_kit,/turf/simulated/floor{icon_state = "white"},/area/medical/sleeper) "bql" = (/obj/machinery/atmospherics/pipe/simple{dir = 4},/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating,/area/medical/medbay) "bqm" = (/obj/structure/stool/bed/chair/comfy/teal{tag = "icon-comfychair_teal (EAST)"; icon_state = "comfychair_teal"; dir = 4},/turf/simulated/floor{tag = "icon-cafeteria (NORTHEAST)"; icon_state = "cafeteria"; dir = 5},/area/medical/medbay) "bqn" = (/turf/simulated/floor{tag = "icon-cafeteria (NORTHEAST)"; icon_state = "cafeteria"; dir = 5},/area/medical/medbay) @@ -3936,7 +3936,7 @@ "bxJ" = (/obj/machinery/atmospherics/unary/vent_pump{on = 1},/turf/simulated/floor{icon_state = "white"},/area/medical/medbay) "bxK" = (/obj/structure/table,/obj/item/weapon/storage/firstaid/fire{pixel_x = 2; pixel_y = 6},/obj/item/weapon/storage/firstaid/fire{pixel_x = -2; pixel_y = 4},/obj/item/device/radio/intercom{broadcasting = 0; freerange = 0; frequency = 1485; listening = 1; name = "Station Intercom (Medbay)"; pixel_x = 0; pixel_y = -30},/turf/simulated/floor{icon_state = "white"},/area/medical/sleeper) "bxL" = (/obj/structure/table,/obj/item/weapon/storage/firstaid/toxin{pixel_x = 2; pixel_y = 6},/obj/item/weapon/storage/firstaid/toxin{pixel_x = -2; pixel_y = 4},/obj/machinery/requests_console{announcementConsole = 0; department = "Medbay"; departmentType = 1; name = "Medbay RC"; pixel_x = 0; pixel_y = -30; pixel_z = 0},/turf/simulated/floor{icon_state = "white"},/area/medical/sleeper) -"bxM" = (/obj/structure/table,/obj/item/weapon/storage/firstaid/regular{pixel_x = 2; pixel_y = 6},/obj/item/weapon/storage/firstaid/regular{pixel_x = -2; pixel_y = 4},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor{icon_state = "white"},/area/medical/sleeper) +"bxM" = (/obj/structure/table,/obj/item/weapon/storage/firstaid/regular{pixel_x = 2; pixel_y = 6},/obj/item/weapon/storage/firstaid/regular{pixel_x = -2; pixel_y = 4},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/obj/item/weapon/storage/firstaid/adv{pixel_x = 2; pixel_y = 2},/obj/item/weapon/storage/firstaid/adv{pixel_x = -2},/turf/simulated/floor{icon_state = "white"},/area/medical/sleeper) "bxN" = (/obj/machinery/disposal,/obj/structure/disposalpipe/trunk{dir = 1},/obj/machinery/light,/turf/simulated/floor{icon_state = "white"},/area/medical/sleeper) "bxO" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/obj/structure/stool/bed,/obj/item/weapon/bedsheet/medical,/turf/simulated/floor{icon_state = "white"},/area/medical/sleeper) "bxP" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 4},/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/turf/simulated/floor/plating,/area/maintenance/asmaint2) @@ -6790,7 +6790,7 @@ "cAD" = (/obj/structure/table,/obj/item/weapon/storage/toolbox/syndicate,/obj/effect/spawner/newbomb/timer/syndicate,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/syndicate_station/start) "cAE" = (/obj/machinery/door/window{base_state = "right"; dir = 4; icon_state = "right"; name = "Infirmary"; req_access_txt = "150"},/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/syndicate_station/start) "cAF" = (/obj/machinery/door/window{dir = 8; name = "Tool Storage"; req_access_txt = "150"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/syndicate_station/start) -"cAG" = (/obj/structure/closet/crate/medical,/obj/item/weapon/storage/firstaid/fire,/obj/item/weapon/storage/firstaid/o2,/obj/item/weapon/storage/firstaid/regular,/obj/item/weapon/storage/firstaid/toxin,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/syndicate_station/start) +"cAG" = (/obj/structure/closet/crate/medical,/obj/item/weapon/storage/firstaid/fire,/obj/item/weapon/storage/firstaid/o2,/obj/item/weapon/storage/firstaid/regular,/obj/item/weapon/storage/firstaid/toxin,/obj/item/weapon/storage/firstaid/adv,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/syndicate_station/start) "cAH" = (/obj/machinery/door/airlock/external{id_tag = "riso3"; name = "Access Airlock"; req_access_txt = "65"},/obj/machinery/door/firedoor/border_only{layer = 2.8; name = "\improper Firelock South"},/obj/machinery/door/firedoor/border_only{dir = 1; layer = 2.8; name = "Firelock North"},/obj/machinery/atmospherics/pipe/simple{color = "red"; icon_state = "intact-r-f"; level = 1; name = "pipe"},/turf/simulated/floor,/area/research_outpost/iso3) "cAI" = (/obj/item/weapon/weldingtool,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 1},/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/syndicate_station/start) "cAJ" = (/obj/machinery/door/window{dir = 1; name = "Secure Storage"; req_access_txt = "150"},/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/syndicate_station/start) @@ -10065,7 +10065,7 @@ "dLC" = (/obj/structure/rack,/obj/item/weapon/plastique,/obj/item/weapon/plastique,/obj/item/weapon/plastique,/obj/item/weapon/plastique,/obj/item/weapon/plastique,/obj/item/weapon/plastique,/turf/unsimulated/floor{tag = "icon-vault (NORTH)"; icon_state = "vault"; dir = 1},/area/centcom) "dLD" = (/obj/structure/rack,/obj/item/ammo_magazine/c9mm,/obj/item/ammo_magazine/c9mm,/obj/item/ammo_magazine/c9mm,/obj/item/ammo_magazine/c9mm,/obj/item/ammo_magazine/c9mm,/obj/item/ammo_magazine/c9mm,/obj/item/weapon/gun/projectile/automatic,/obj/item/weapon/gun/projectile/automatic,/obj/item/weapon/gun/projectile/automatic,/turf/unsimulated/floor{tag = "icon-vault (NORTH)"; icon_state = "vault"; dir = 1},/area/centcom) "dLE" = (/obj/structure/stool/bed/chair,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/specops/centcom) -"dLF" = (/obj/structure/table/reinforced,/obj/item/weapon/storage/box/bodybags,/obj/item/weapon/storage/firstaid/o2,/obj/item/weapon/storage/firstaid/regular,/obj/item/device/flash,/obj/item/clothing/glasses/hud/health,/obj/item/clothing/glasses/hud/health,/obj/item/clothing/glasses/hud/health,/obj/item/device/flash,/obj/item/weapon/storage/firstaid/regular,/obj/item/weapon/storage/firstaid/regular,/obj/item/weapon/storage/pill_bottle/antitox,/obj/item/weapon/storage/pill_bottle/kelotane,/obj/item/weapon/storage/pill_bottle/kelotane,/obj/item/weapon/storage/pill_bottle/antitox,/obj/item/weapon/storage/pill_bottle/kelotane,/obj/item/weapon/storage/firstaid/regular,/obj/item/weapon/storage/firstaid/regular,/turf/unsimulated/floor{tag = "icon-vault (NORTH)"; icon_state = "vault"; dir = 1},/area/centcom/specops) +"dLF" = (/obj/structure/table/reinforced,/obj/item/weapon/storage/box/bodybags,/obj/item/weapon/storage/firstaid/o2,/obj/item/weapon/storage/firstaid/regular,/obj/item/device/flash,/obj/item/clothing/glasses/hud/health,/obj/item/clothing/glasses/hud/health,/obj/item/clothing/glasses/hud/health,/obj/item/device/flash,/obj/item/weapon/storage/firstaid/regular,/obj/item/weapon/storage/firstaid/regular,/obj/item/weapon/storage/pill_bottle/antitox,/obj/item/weapon/storage/pill_bottle/kelotane,/obj/item/weapon/storage/pill_bottle/kelotane,/obj/item/weapon/storage/pill_bottle/antitox,/obj/item/weapon/storage/pill_bottle/kelotane,/obj/item/weapon/storage/firstaid/adv,/obj/item/weapon/storage/firstaid/adv,/turf/unsimulated/floor{tag = "icon-vault (NORTH)"; icon_state = "vault"; dir = 1},/area/centcom/specops) "dLG" = (/obj/structure/table/reinforced,/obj/item/clothing/mask/gas,/obj/item/weapon/storage/backpack/security,/obj/item/weapon/grenade/chem_grenade/cleaner,/obj/item/weapon/grenade/chem_grenade/cleaner,/obj/item/weapon/grenade/chem_grenade/cleaner,/obj/item/weapon/reagent_containers/glass/bucket,/obj/item/weapon/storage/box,/obj/item/weapon/tank/emergency_oxygen/double,/turf/unsimulated/floor{tag = "icon-vault (NORTH)"; icon_state = "vault"; dir = 1},/area/centcom/specops) "dLH" = (/obj/structure/rack,/obj/item/clothing/under/syndicate/combat,/obj/item/clothing/shoes/galoshes,/obj/item/clothing/gloves/purple,/obj/item/clothing/suit/bio_suit/janitor,/obj/item/clothing/head/bio_hood/janitor,/obj/item/device/radio/headset/ert,/obj/item/clothing/mask/breath,/obj/item/clothing/glasses/science,/turf/unsimulated/floor{tag = "icon-vault (NORTH)"; icon_state = "vault"; dir = 1},/area/centcom/specops) "dLI" = (/obj/structure/rack,/obj/item/weapon/tank/emergency_oxygen/double,/obj/item/weapon/tank/emergency_oxygen/double,/obj/item/weapon/tank/emergency_oxygen/double,/obj/item/weapon/tank/emergency_oxygen/double,/obj/item/weapon/tank/emergency_oxygen/double,/obj/item/weapon/tank/emergency_oxygen/double,/obj/item/weapon/tank/emergency_oxygen/double,/obj/item/weapon/tank/emergency_oxygen/double,/obj/item/weapon/tank/emergency_oxygen/double,/obj/item/weapon/tank/emergency_oxygen/double,/obj/item/weapon/tank/emergency_oxygen/double,/turf/unsimulated/floor{tag = "icon-vault (NORTH)"; icon_state = "vault"; dir = 1},/area/centcom/specops) From dd3a8fc56886cc4d783f0c387d2afdbfc2b08351 Mon Sep 17 00:00:00 2001 From: Segrain Date: Fri, 2 Aug 2013 19:27:23 +0300 Subject: [PATCH 2/5] Advanced medical equipment for NanoMeds. --- code/game/machinery/vending.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index d98d57de30..5e33df7f56 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -707,7 +707,8 @@ products = list(/obj/item/weapon/reagent_containers/glass/bottle/antitoxin = 4,/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline = 4, /obj/item/weapon/reagent_containers/glass/bottle/stoxin = 4,/obj/item/weapon/reagent_containers/glass/bottle/toxin = 4, /obj/item/weapon/reagent_containers/syringe/antiviral = 4,/obj/item/weapon/reagent_containers/syringe = 12, - /obj/item/device/healthanalyzer = 5,/obj/item/weapon/reagent_containers/glass/beaker = 4, /obj/item/weapon/reagent_containers/dropper = 2) + /obj/item/device/healthanalyzer = 5,/obj/item/weapon/reagent_containers/glass/beaker = 4, /obj/item/weapon/reagent_containers/dropper = 2, + /obj/item/stack/medical/advanced/bruise_pack = 3, /obj/item/stack/medical/advanced/ointment = 3, /obj/item/stack/medical/splint = 2) contraband = list(/obj/item/weapon/reagent_containers/pill/tox = 3,/obj/item/weapon/reagent_containers/pill/stox = 4,/obj/item/weapon/reagent_containers/pill/antitox = 6) @@ -727,7 +728,7 @@ icon_deny = "wallmed-deny" req_access_txt = "5" density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude - products = list(/obj/item/stack/medical/bruise_pack = 2,/obj/item/stack/medical/ointment = 2,/obj/item/weapon/reagent_containers/syringe/inaprovaline = 4,/obj/item/device/healthanalyzer = 1) + products = list(/obj/item/stack/medical/bruise_pack = 2,/obj/item/stack/medical/ointment = 2,/obj/item/weapon/reagent_containers/hypospray/autoinjector = 4,/obj/item/device/healthanalyzer = 1) contraband = list(/obj/item/weapon/reagent_containers/syringe/antitoxin = 4,/obj/item/weapon/reagent_containers/syringe/antiviral = 4,/obj/item/weapon/reagent_containers/pill/tox = 1) /obj/machinery/vending/wallmed2 @@ -737,7 +738,7 @@ icon_deny = "wallmed-deny" req_access_txt = "5" density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude - products = list(/obj/item/weapon/reagent_containers/syringe/inaprovaline = 5,/obj/item/weapon/reagent_containers/syringe/antitoxin = 3,/obj/item/stack/medical/bruise_pack = 3, + products = list(/obj/item/weapon/reagent_containers/hypospray/autoinjector = 5,/obj/item/weapon/reagent_containers/syringe/antitoxin = 3,/obj/item/stack/medical/bruise_pack = 3, /obj/item/stack/medical/ointment =3,/obj/item/device/healthanalyzer = 3) contraband = list(/obj/item/weapon/reagent_containers/pill/tox = 3) From d51809faa2925e2e52f6db06110e770e004c698b Mon Sep 17 00:00:00 2001 From: Segrain Date: Fri, 2 Aug 2013 19:30:02 +0300 Subject: [PATCH 3/5] Separating autoinjectors box from injector box. --- code/datums/supplypacks.dm | 2 +- code/game/objects/items/weapons/storage/boxes.dm | 3 ++- .../structures/crates_lockers/closets/secure/medical.dm | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 6fda24ee59..b3b03e6ac2 100755 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -361,7 +361,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /obj/item/weapon/reagent_containers/glass/bottle/inaprovaline, /obj/item/weapon/reagent_containers/glass/bottle/stoxin, /obj/item/weapon/storage/box/syringes, - /obj/item/weapon/storage/box/injectors) + /obj/item/weapon/storage/box/autoinjectors) cost = 10 containertype = /obj/structure/closet/crate/medical containername = "Medical crate" diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 5020a86c1c..c29a12f3b7 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -439,9 +439,10 @@ W.update_icon() return -/obj/item/weapon/storage/box/injectors +/obj/item/weapon/storage/box/autoinjectors name = "box of injectors" desc = "Contains autoinjectors." + icon_state = "syringe" New() ..() for (var/i; i < storage_slots; i++) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm index a9fa0253b1..f202b48e6e 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm @@ -13,7 +13,7 @@ New() ..() sleep(2) - new /obj/item/weapon/storage/box/injectors + new /obj/item/weapon/storage/box/autoinjectors(src) new /obj/item/weapon/storage/box/syringes(src) new /obj/item/weapon/reagent_containers/dropper(src) new /obj/item/weapon/reagent_containers/dropper(src) From 826ce1c0f153df7829b524db71a81a055f35b79c Mon Sep 17 00:00:00 2001 From: Segrain Date: Fri, 2 Aug 2013 19:32:58 +0300 Subject: [PATCH 4/5] Fixes for handling embedded objects. --- code/modules/mob/living/carbon/human/human.dm | 7 +++++-- code/modules/mob/living/carbon/human/human_movement.dm | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 119ee1f1cf..c67476f52c 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1198,6 +1198,8 @@ mob/living/carbon/human/yank_out_object() /mob/living/carbon/human/proc/handle_embedded_objects() for(var/datum/organ/external/organ in src.organs) + if(organ.status & ORGAN_SPLINTED) //Splints prevent movement. + continue for(var/obj/item/weapon/O in organ.implants) if(!istype(O,/obj/item/weapon/implant) && prob(5)) //Moving with things stuck in you could be bad. // All kinds of embedded objects cause bleeding. @@ -1211,9 +1213,10 @@ mob/living/carbon/human/yank_out_object() msg ="[O] in your [organ.display_name] twists painfully as you move." src << msg - organ.status |= ORGAN_BLEEDING organ.take_damage(rand(1,3), 0, 0) - src.adjustToxLoss(rand(1,3)) + if(!(organ.status & ORGAN_ROBOT)) //There is no blood in protheses. + organ.status |= ORGAN_BLEEDING + src.adjustToxLoss(rand(1,3)) /mob/living/carbon/human/verb/check_pulse() set category = "Object" diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 22ea3b9400..3424bdb562 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -1,14 +1,14 @@ /mob/living/carbon/human/movement_delay() var/tally = 0 - if(reagents.has_reagent("hyperzine")) return -1 - - if(reagents.has_reagent("nuka_cola")) return -1 - if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything handle_embedded_objects() //Moving with objects stuck in you can cause bad times. + if(reagents.has_reagent("hyperzine")) return -1 + + if(reagents.has_reagent("nuka_cola")) return -1 + var/health_deficiency = (100 - health - halloss) if(health_deficiency >= 40) tally += (health_deficiency / 25) From cf5d3f9a2e9475ac82a2246bf4c80adf3c052f4d Mon Sep 17 00:00:00 2001 From: Segrain Date: Fri, 2 Aug 2013 19:34:10 +0300 Subject: [PATCH 5/5] Variable inject amounts for sleepers. --- code/game/machinery/Sleeper.dm | 98 +++++++++------------------------- 1 file changed, 25 insertions(+), 73 deletions(-) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 9f9ff56f78..a4158218a1 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -70,12 +70,14 @@ dat += text("[]\t-Burn Severity %: []
", (occupant.getFireLoss() < 60 ? "" : ""), occupant.getFireLoss()) dat += text("
Paralysis Summary %: [] ([] seconds left!)
", occupant.paralysis, round(occupant.paralysis / 4)) if(occupant.reagents) - dat += text("Inaprovaline units: [] units
", occupant.reagents.get_reagent_amount("inaprovaline")) - dat += text("Soporific: [] units
", occupant.reagents.get_reagent_amount("stoxin")) - dat += text("Dermaline: [] units
", occupant.reagents.get_reagent_amount("dermaline")) - dat += text("Bicaridine: [] units
", occupant.reagents.get_reagent_amount("bicaridine")) - dat += text("Dexalin: [] units
", occupant.reagents.get_reagent_amount("dexalin")) - dat += text("
Refresh meter readings each second
Inject Inaprovaline
Inject Soporific
Inject Dermaline
Inject Bicaridine
Inject Dexalin", src, src, src, src, src, src) + for(var/chemical in connected.available_chemicals) + dat += "[connected.available_chemicals[chemical]]: [occupant.reagents.get_reagent_amount(chemical)] units
" + dat += "
Refresh meter readings each second
" + for(var/chemical in connected.available_chemicals) + dat += "Inject [connected.available_chemicals[chemical]]: " + for(var/amount in connected.amounts) + dat += "[amount] units " + dat += "
" else dat += "The sleeper is empty." dat += text("

Close", user) @@ -88,27 +90,15 @@ return if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai))) usr.set_machine(src) - if (src.connected) - if (src.connected.occupant) - if(src.connected.occupant.health > 0) - if (href_list["inap"]) - src.connected.inject_inap(usr) - if (href_list["stox"]) - src.connected.inject_stox(usr) - if (href_list["derm"]) - src.connected.inject_dermaline(usr) - if (href_list["bic"]) - src.connected.inject_bicaridine(usr) - if (href_list["dex"]) - src.connected.inject_dexalin(usr) - else - if(src.connected.occupant.health > -100) - if (href_list["inap"]) - src.connected.inject_inap(usr) - if (href_list["stox"] || href_list["derm"] || href_list["bic"] || href_list["dex"]) - usr << "\red \b this person is not in good enough condition for sleepers to be effective! Use another means of treatment, such as cryogenics!" - else + if (href_list["chemical"]) + if (src.connected) + if (src.connected.occupant) + if (src.connected.occupant.stat == DEAD) usr << "\red \b This person has no life for to preserve anymore. Take them to a department capable of reanimating them." + else if(src.connected.occupant.health > 0 || href_list["chemical"] == "inaprovaline") + src.connected.inject_chemical(usr,href_list["chemical"],text2num(href_list["amount"])) + else + 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() src.add_fingerprint(usr) @@ -142,6 +132,8 @@ anchored = 1 var/orient = "LEFT" // "RIGHT" changes the dir suffix to "-r" var/mob/living/occupant = null + var/available_chemicals = list("inaprovaline" = "Inaprovaline", "stoxin" = "Soporific", "dermaline" = "Dermaline", "bicaridine" = "Bicaridine", "dexalin" = "Dexalin") + var/amounts = list(10, 20) New() @@ -275,53 +267,13 @@ return - proc/inject_inap(mob/living/user as mob) + proc/inject_chemical(mob/living/user as mob, chemical, amount) if(src.occupant && src.occupant.reagents) - if(src.occupant.reagents.get_reagent_amount("inaprovaline") + 30 <= 60) - src.occupant.reagents.add_reagent("inaprovaline", 30) - user << text("Occupant now has [] units of Inaprovaline in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("inaprovaline")) - else - user << "There's no occupant in the sleeper or the subject rejects the chemicals!" - return - - - proc/inject_stox(mob/living/user as mob) - if(src.occupant && src.occupant.reagents) - if(src.occupant.reagents.get_reagent_amount("stoxin") + 20 <= 40) - src.occupant.reagents.add_reagent("stoxin", 20) - user << text("Occupant now has [] units of soporifics in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("stoxin")) - else - user << "There's no occupant in the sleeper or the subject rejects the chemicals!" - return - - - proc/inject_dermaline(mob/living/user as mob) - if(src.occupant && src.occupant.reagents) - if(src.occupant.reagents.get_reagent_amount("dermaline") + 20 <= 40) - src.occupant.reagents.add_reagent("dermaline", 20) - user << text("Occupant now has [] units of Dermaline in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("dermaline")) - else - user << "There's no occupant in the sleeper or the subject rejects the chemicals!" - return - - - proc/inject_bicaridine(mob/living/user as mob) - if(src.occupant && src.occupant.reagents) - if(src.occupant.reagents.get_reagent_amount("bicaridine") + 10 <= 20) - src.occupant.reagents.add_reagent("bicaridine", 10) - user << text("Occupant now has [] units of Bicaridine in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("bicaridine")) - else - user << "There's no occupant in the sleeper or the subject rejects the chemicals!" - return - - - proc/inject_dexalin(mob/living/user as mob) - if(src.occupant && src.occupant.reagents) - if(src.occupant.reagents.get_reagent_amount("dexalin") + 20 <= 40) - src.occupant.reagents.add_reagent("dexalin", 20) - user << text("Occupant now has [] units of Dexalin in his/her bloodstream.", src.occupant.reagents.get_reagent_amount("dexalin")) - else - user << "There's no occupant in the sleeper or the subject rejects the chemicals!" + if(src.occupant.reagents.get_reagent_amount(chemical) + amount <= 40) + src.occupant.reagents.add_reagent(chemical, amount) + user << "Occupant now has [src.occupant.reagents.get_reagent_amount(chemical)] units of [available_chemicals[chemical]] in his/her bloodstream." + return + user << "There's no occupant in the sleeper or the subject rejects the chemicals!" return @@ -398,4 +350,4 @@ del(O) src.add_fingerprint(usr) return - return + return \ No newline at end of file