diff --git a/code/datums/outfits/_defines.dm b/code/datums/outfits/_defines.dm index ae07595c505..8d406ce1e03 100644 --- a/code/datums/outfits/_defines.dm +++ b/code/datums/outfits/_defines.dm @@ -1,6 +1,7 @@ #define OUTFIT_HAS_JETPACK 1 #define OUTFIT_HAS_BACKPACK 2 #define OUTFIT_EXTENDED_SURVIVAL 4 +#define OUTFIT_COMPREHENSIVE_SURVIVAL 8 #define OUTFIT_JOB_NAME(job_name) ("Job - " + job_name) #define OUTFIT_MILITARY(job_name) ("Military Uniform - " + job_name) diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm index 8a7d677d0be..a37c339e213 100644 --- a/code/datums/outfits/outfit.dm +++ b/code/datums/outfits/outfit.dm @@ -145,7 +145,7 @@ var/list/outfits_decls_by_type_ if(r_hand) H.put_in_r_hand(new r_hand(H)) if(H.species) - H.species.equip_survival_gear(H, flags&OUTFIT_EXTENDED_SURVIVAL) + H.species.equip_survival_gear(H, flags&OUTFIT_EXTENDED_SURVIVAL, flags&OUTFIT_COMPREHENSIVE_SURVIVAL) /decl/hierarchy/outfit/proc/equip_id(mob/living/carbon/human/H, rank, assignment) if(!id_slot || !id_type) diff --git a/code/game/antagonist/outsider/mercenary.dm b/code/game/antagonist/outsider/mercenary.dm index ed2964cfad5..157d590b788 100644 --- a/code/game/antagonist/outsider/mercenary.dm +++ b/code/game/antagonist/outsider/mercenary.dm @@ -42,8 +42,8 @@ var/datum/antagonist/mercenary/mercs if(player.backbag == 3) player.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(player), slot_back) if(player.backbag == 4) player.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(player), slot_back) if(player.backbag == 5) player.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger(player), slot_back) - player.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(player.back), slot_in_backpack) player.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/pill/cyanide(player), slot_in_backpack) + player.mind.tcrystals = DEFAULT_TELECRYSTAL_AMOUNT player.mind.accept_tcrystals = 1 diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index a2d6ce33412..2040f22a990 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -46,9 +46,15 @@ var/mob/living/carbon/human/H = loc - var/efficiency = 1 - H.get_pressure_weakness() //you need to have a good seal for effective cooling - var/env_temp = get_environment_temperature() //wont save you from a fire - var/temp_adj = min(H.bodytemperature - max(thermostat, env_temp), max_cooling) + var/efficiency = 1 - H.get_pressure_weakness() // You need to have a good seal for effective cooling + var/temp_adj = 0 // How much the unit cools you. Adjusted later on. + var/env_temp = get_environment_temperature() // This won't save you from a fire + var/thermal_protection = H.get_heat_protection(env_temp) // ... unless you've got a good suit. + + if(thermal_protection < 0.99) //For some reason, < 1 returns false if the value is 1. + temp_adj = min(H.bodytemperature - max(thermostat, env_temp), max_cooling) + else + temp_adj = min(H.bodytemperature - thermostat, max_cooling) if (temp_adj < 0.5) //only cools, doesn't heat, also we don't need extreme precision return diff --git a/code/game/objects/items/stacks/marker_beacons.dm b/code/game/objects/items/stacks/marker_beacons.dm index 9978ef6b0d9..2194b84fbd5 100644 --- a/code/game/objects/items/stacks/marker_beacons.dm +++ b/code/game/objects/items/stacks/marker_beacons.dm @@ -25,6 +25,7 @@ var/list/marker_beacon_colors = list( icon_state = "marker" max_amount = 100 no_variants = TRUE + w_class = ITEMSIZE_SMALL var/picked_color = "random" /obj/item/stack/marker_beacon/ten diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 33552762c16..3cbce393f31 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -52,37 +52,26 @@ new foldable(get_turf(src)) qdel(src) -/obj/item/weapon/storage/box/survival //VOREStation Add for Tether Size boxes - max_w_class = ITEMSIZE_NORMAL - max_storage_space = 6 //This is just the right number, there's no constant. +/obj/item/weapon/storage/box/survival + name = "emergency supply box" + desc = "A survival box issued to crew members for use in emergency situations." + starts_with = list( + /obj/item/clothing/glasses/goggles, //VOREStation Add - Goggles for the phoron atmosphere, + /obj/item/clothing/mask/breath + ) -/obj/item/weapon/storage/box/survival/New() - ..() - new /obj/item/clothing/mask/breath(src) - new /obj/item/weapon/tank/emergency/oxygen(src) - new /obj/item/clothing/glasses/goggles(src) +/obj/item/weapon/storage/box/survival/comp + name = "emergency supply box" + desc = "A comprehensive survival box issued to crew members for use in emergency situations. Contains additional supplies." + icon_state = "survival" + starts_with = list( + /obj/item/weapon/reagent_containers/hypospray/autoinjector, + /obj/item/stack/medical/bruise_pack, + /obj/item/device/flashlight/glowstick, + /obj/item/weapon/reagent_containers/food/snacks/candy/proteinbar, + /obj/item/clothing/mask/breath + ) -/obj/item/weapon/storage/box/synth //VOREStation Add for Tether Size boxes - max_w_class = ITEMSIZE_NORMAL - max_storage_space = 6 //This is just the right number, there's no constant. - -/obj/item/weapon/storage/box/synth/New() - ..() - new /obj/item/clothing/glasses/goggles(src) - -//VOREStation Edit -/obj/item/weapon/storage/box/vox/New() - ..() - new /obj/item/clothing/mask/breath(src) - new /obj/item/weapon/tank/emergency/phoron_double(src) - new /obj/item/clothing/glasses/goggles(src) - -/obj/item/weapon/storage/box/engineer/New() - ..() - new /obj/item/clothing/mask/breath(src) - new /obj/item/weapon/tank/emergency/oxygen/engi(src) - new /obj/item/clothing/glasses/goggles(src) -//VOREStation Edit End /obj/item/weapon/storage/box/gloves name = "box of latex gloves" desc = "Contains white gloves." diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 448602d6656..6309a0a3f3d 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -35,6 +35,7 @@ var/allow_quick_gather //Set this variable to allow the object to have the 'toggle mode' verb, which quickly collects all items from a tile. var/collection_mode = 1; //0 = pick one at a time, 1 = pick all on tile var/use_sound = "rustle" //sound played when used. null for no sound. + var/list/starts_with //Things to spawn on the box on spawn /obj/item/weapon/storage/Destroy() close_all() @@ -52,7 +53,7 @@ if(!canremove) return - if (ishuman(usr) || issmall(usr) || isanimal(usr) || isobserver(usr)) //so monkeys can take off their backpacks -- Urist + if (isliving(usr) || isobserver(usr)) if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why? return @@ -523,7 +524,8 @@ for(var/obj/item/I in contents) remove_from_storage(I, T) -/obj/item/weapon/storage/New() +/obj/item/weapon/storage/initialize() + . = ..() if(allow_quick_empty) verbs += /obj/item/weapon/storage/verb/quick_empty @@ -535,12 +537,6 @@ else verbs -= /obj/item/weapon/storage/verb/toggle_gathering_mode - spawn(5) - var/total_storage_space = 0 - for(var/obj/item/I in contents) - total_storage_space += I.get_storage_cost() - max_storage_space = max(total_storage_space,max_storage_space) //Prevents spawned containers from being too small for their contents. - src.boxes = new /obj/screen/storage( ) src.boxes.name = "storage" src.boxes.master = src @@ -579,7 +575,21 @@ src.closer.icon_state = "storage_close" src.closer.hud_layerise() orient2hud() - return + + if(LAZYLEN(starts_with)) + for(var/newtype in starts_with) + var/count = starts_with[newtype] || 1 //Could have left it blank. + while(count) + count-- + new newtype(src) + + calibrate_size() + +/obj/item/weapon/storage/proc/calibrate_size() + var/total_storage_space = 0 + for(var/obj/item/I in contents) + total_storage_space += I.get_storage_cost() + max_storage_space = max(total_storage_space,max_storage_space) //Prevents spawned containers from being too small for their contents. /obj/item/weapon/storage/emp_act(severity) if(!istype(src.loc, /mob/living)) diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index 0ff657e9cc6..efacad49424 100644 --- a/code/game/objects/items/weapons/tanks/tank_types.dm +++ b/code/game/objects/items/weapons/tanks/tank_types.dm @@ -186,8 +186,8 @@ src.air_contents.adjust_gas("phoron", (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) /obj/item/weapon/tank/emergency/phoron/double - name = "double emergency nitrogen tank" - icon_state = "emergency_double_nitrogen" + name = "double emergency phoron tank" + icon_state = "emergency_double_nitro" gauge_icon = "indicator_emergency_double" volume = 10 diff --git a/code/game/objects/random/random.dm b/code/game/objects/random/random.dm index 6686950735b..903750cbcff 100644 --- a/code/game/objects/random/random.dm +++ b/code/game/objects/random/random.dm @@ -646,7 +646,6 @@ something, make sure it's not in one of the other lists.*/ prob(2);/obj/item/weapon/storage/box/sinpockets, prob(1);/obj/item/weapon/storage/box/cups, prob(3);/obj/item/weapon/storage/box/mousetraps, - prob(3);/obj/item/weapon/storage/box/engineer, prob(3);/obj/item/weapon/storage/wallet, prob(1);/obj/item/device/paicard, prob(2);/obj/item/clothing/shoes/galoshes, @@ -816,7 +815,6 @@ something, make sure it's not in one of the other lists.*/ prob(5);/obj/item/weapon/storage/backpack/messenger/engi, prob(3);/obj/item/weapon/storage/backpack/dufflebag/eng, prob(5);/obj/item/weapon/storage/box, - prob(3);/obj/item/weapon/storage/box/engineer, prob(2);/obj/item/weapon/storage/belt/utility/full, prob(3);/obj/item/weapon/storage/belt/utility, prob(3);/obj/item/clothing/head/beret/engineering, diff --git a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm index eb2ab38b522..de7f85c91e0 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm @@ -67,3 +67,34 @@ new /obj/item/clothing/suit/storage/hooded/wintercoat/cargo(src) new /obj/item/clothing/shoes/boots/winter/supply(src) return + +/obj/structure/closet/secure_closet/miner + name = "miner's equipment" + icon_state = "miningsec1" + icon_closed = "miningsec" + icon_locked = "miningsec1" + icon_opened = "miningsecopen" + icon_broken = "miningsecbroken" + icon_off = "miningsecoff" + req_access = list(access_mining) + +/obj/structure/closet/secure_closet/miner/New() + ..() + sleep(2) + if(prob(50)) + new /obj/item/weapon/storage/backpack/industrial(src) + else + new /obj/item/weapon/storage/backpack/satchel/eng(src) + new /obj/item/device/radio/headset/headset_cargo(src) + new /obj/item/clothing/under/rank/miner(src) + new /obj/item/clothing/gloves/black(src) + new /obj/item/clothing/shoes/black(src) + new /obj/item/device/analyzer(src) + new /obj/item/weapon/storage/bag/ore(src) + new /obj/item/device/flashlight/lantern(src) + new /obj/item/weapon/shovel(src) + new /obj/item/weapon/pickaxe(src) + new /obj/item/clothing/glasses/material(src) + new /obj/item/clothing/suit/storage/hooded/wintercoat/miner(src) + new /obj/item/clothing/shoes/boots/winter/mining(src) + new /obj/item/stack/marker_beacon/thirty(src) \ No newline at end of file diff --git a/code/game/objects/structures/loot_piles.dm b/code/game/objects/structures/loot_piles.dm index c9565dc90a9..43369fb2fa6 100644 --- a/code/game/objects/structures/loot_piles.dm +++ b/code/game/objects/structures/loot_piles.dm @@ -278,7 +278,6 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh /obj/item/weapon/storage/box/donut, /obj/item/weapon/storage/box/donut/empty, /obj/item/weapon/storage/box/evidence, - /obj/item/weapon/storage/box/engineer, /obj/item/weapon/storage/box/lights/mixed, /obj/item/weapon/storage/box/lights/tubes, /obj/item/weapon/storage/box/lights/bulbs, diff --git a/code/game/objects/structures/trash_pile.dm b/code/game/objects/structures/trash_pile.dm index 83fbc013780..727dcbb9f4f 100644 --- a/code/game/objects/structures/trash_pile.dm +++ b/code/game/objects/structures/trash_pile.dm @@ -169,7 +169,6 @@ prob(3);/obj/item/weapon/spacecash/c20, prob(3);/obj/item/weapon/storage/backpack/dufflebag, prob(3);/obj/item/weapon/storage/box/donkpockets, - prob(3);/obj/item/weapon/storage/box/engineer, prob(3);/obj/item/weapon/storage/box/mousetraps, prob(3);/obj/item/weapon/storage/wallet, prob(2);/obj/item/clothing/glasses/meson/prescription, diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 7980c2f8e29..f6315296f10 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -1,35 +1,3 @@ -/**********************Miner Lockers**************************/ - -/obj/structure/closet/secure_closet/miner - name = "miner's equipment" - icon_state = "miningsec1" - icon_closed = "miningsec" - icon_locked = "miningsec1" - icon_opened = "miningsecopen" - icon_broken = "miningsecbroken" - icon_off = "miningsecoff" - req_access = list(access_mining) - -/obj/structure/closet/secure_closet/miner/New() - ..() - sleep(2) - if(prob(50)) - new /obj/item/weapon/storage/backpack/industrial(src) - else - new /obj/item/weapon/storage/backpack/satchel/eng(src) - new /obj/item/device/radio/headset/headset_cargo(src) - new /obj/item/clothing/under/rank/miner(src) - new /obj/item/clothing/gloves/black(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/device/analyzer(src) - new /obj/item/weapon/storage/bag/ore(src) - new /obj/item/device/flashlight/lantern(src) - new /obj/item/weapon/shovel(src) - new /obj/item/weapon/pickaxe(src) - new /obj/item/clothing/glasses/material(src) - new /obj/item/clothing/suit/storage/hooded/wintercoat/miner(src) - new /obj/item/clothing/shoes/boots/winter/mining(src) - /******************************Lantern*******************************/ /obj/item/device/flashlight/lantern diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 566a6fa5434..a3117ee4151 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -616,11 +616,11 @@ var/temp_adj = 0 if(loc_temp < bodytemperature) //Place is colder than we are var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to. - if(thermal_protection < 1) + if(thermal_protection < 0.99) //For some reason, < 1 returns false if the value is 1. temp_adj = (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR) //this will be negative else if (loc_temp > bodytemperature) //Place is hotter than we are var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to. - if(thermal_protection < 1) + if(thermal_protection < 0.99) //For some reason, < 1 returns false if the value is 1. temp_adj = (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR) //Use heat transfer as proportional to the gas density. However, we only care about the relative density vs standard 101 kPa/20 C air. Therefore we can use mole ratios diff --git a/code/modules/mob/living/carbon/human/species/outsider/vox.dm b/code/modules/mob/living/carbon/human/species/outsider/vox.dm index 6e95330bf36..37a631dc46f 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/vox.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/vox.dm @@ -83,15 +83,15 @@ var/datum/language/species_language = all_languages[default_language] return species_language.get_random_name(gender) -/datum/species/vox/equip_survival_gear(var/mob/living/carbon/human/H) +/datum/species/vox/equip_survival_gear(var/mob/living/carbon/human/H, var/extendedtank = 0,var/comprehensive = 0) + . = ..() + H.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(H), slot_wear_mask) if(H.backbag == 1) H.equip_to_slot_or_del(new /obj/item/weapon/tank/vox(H), slot_back) - H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/vox(H), slot_r_hand) H.internal = H.back else H.equip_to_slot_or_del(new /obj/item/weapon/tank/vox(H), slot_r_hand) - H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/vox(H.back), slot_in_backpack) H.internal = H.r_hand H.internal = locate(/obj/item/weapon/tank) in H.contents if(istype(H.internal,/obj/item/weapon/tank) && H.internals) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 6075cf788ca..e40583316e8 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -233,19 +233,39 @@ /datum/species/proc/sanitize_name(var/name, var/robot = 0) return sanitizeName(name, MAX_NAME_LEN, robot) -/datum/species/proc/equip_survival_gear(var/mob/living/carbon/human/H,var/extendedtank = 1) +/datum/species/proc/equip_survival_gear(var/mob/living/carbon/human/H,var/extendedtank = 0,var/comprehensive = 0) var/boxtype = /obj/item/weapon/storage/box/survival //Default survival box + if(H.isSynthetic()) - boxtype = /obj/item/weapon/storage/box/synth //VOREStation Edit - Synth survival box on Tether - else if(extendedtank) - boxtype = /obj/item/weapon/storage/box/engineer //Special box for engineers + boxtype = /obj/item/weapon/storage/box //Empty box for synths + + //Special box for engineers + if(comprehensive) + boxtype = /obj/item/weapon/storage/box/survival/comp + + //Create the box + var/obj/item/weapon/storage/box/box = new boxtype(H) + + //Create a tank (if such a thing exists for this species) + var/tanktext = "/obj/item/weapon/tank/emergency/" + "[breath_type]" + var/obj/item/weapon/tank/emergency/tankpath //Will force someone to come look here if they ever alter this path. + if(extendedtank) + tankpath = text2path(tanktext + "/engi") + if(!tankpath) //Is it just that there's no /engi? + tankpath = text2path(tanktext + "/double") + + if(!tankpath) + tankpath = text2path(tanktext) + + if(tankpath) + new tankpath(box) + + box.calibrate_size() if(H.backbag == 1) - if (extendedtank) H.equip_to_slot_or_del(new boxtype(H), slot_r_hand) - else H.equip_to_slot_or_del(new boxtype(H), slot_r_hand) + H.equip_to_slot_or_del(box, slot_r_hand) else - if (extendedtank) H.equip_to_slot_or_del(new boxtype(H.back), slot_in_backpack) - else H.equip_to_slot_or_del(new boxtype(H.back), slot_in_backpack) + H.equip_to_slot_or_del(box, slot_in_backpack) /datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs. diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 4b625e15f1a..a7b965d74f7 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -328,7 +328,7 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT) set name = "a-intent" set hidden = 1 - if(isliving(src)) + if(isliving(src) && !isrobot(src)) switch(input) if(I_HELP,I_DISARM,I_GRAB,I_HURT) a_intent = input diff --git a/code/modules/nano/modules/power_monitor.dm b/code/modules/nano/modules/power_monitor.dm index 89e1dbda62f..fc32b6e58e8 100644 --- a/code/modules/nano/modules/power_monitor.dm +++ b/code/modules/nano/modules/power_monitor.dm @@ -43,8 +43,11 @@ /datum/nano_module/power_monitor/proc/refresh_sensors() grid_sensors = list() var/turf/T = get_turf(nano_host()) + var/list/levels = list() + if(T) + levels += using_map.get_map_levels(T.z, FALSE) for(var/obj/machinery/power/sensor/S in machines) - if((T && S.loc.z == T.z) || (S.long_range)) // Consoles have range on their Z-Level. Sensors with long_range var will work between Z levels. + if(T && (S.loc.z == T.z) || (S.loc.z in levels) || (S.long_range)) // Consoles have range on their Z-Level. Sensors with long_range var will work between Z levels. if(S.name_tag == "#UNKN#") // Default name. Shouldn't happen! warning("Powernet sensor with unset ID Tag! [S.x]X [S.y]Y [S.z]Z") else diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index e7e19b9e02e..d9d85ad92cf 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -1,6 +1,6 @@ /obj/item/weapon/gun/energy/gun name = "energy gun" - desc = "Another bestseller of Lawson Arms and the FTU, the LAEP90 Perun is a versatile energy based sidearm, capable of switching between low and high capacity projectile settings. In other words: Stun or Kill." + desc = "Another bestseller of Lawson Arms and "+TSC_HEPH+", the LAEP90 Perun is a versatile energy based sidearm, capable of switching between low and high capacity projectile settings. In other words: Stun or Kill." icon_state = "energystun100" item_state = null //so the human update icon uses the icon_state instead. fire_delay = 10 // Handguns should be inferior to two-handed weapons. @@ -64,4 +64,4 @@ firemodes = list( list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, modifystate="nucgunstun", charge_cost = 240), list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="nucgunkill", charge_cost = 480), - ) \ No newline at end of file + ) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 5288843f577..d59982d256a 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -15,8 +15,6 @@ flags = OPENCONTAINER slot_flags = SLOT_BELT preserve_item = 1 - var/reusable = 1 - var/used = 0 var/filled = 0 var/list/filled_reagents = list() @@ -64,9 +62,6 @@ admin_inject_log(user, M, src, contained, trans) to_chat(user, "[trans] units injected. [reagents.total_volume] units remaining in \the [src].") - if(!reusable && !used) - used = !used - return //A vial-loaded hypospray. Cartridge-based! /obj/item/weapon/reagent_containers/hypospray/vial @@ -122,11 +117,10 @@ /obj/item/weapon/reagent_containers/hypospray/autoinjector name = "autoinjector" desc = "A rapid and safe way to administer small amounts of drugs by untrained or trained personnel." - icon_state = "autoinjector" - item_state = "autoinjector" + icon_state = "blue" + item_state = "blue" amount_per_transfer_from_this = 5 volume = 5 - reusable = 0 filled = 1 filled_reagents = list("inaprovaline" = 5) preserve_item = 0 @@ -139,33 +133,35 @@ filled = 0 filled_reagents = list() -/obj/item/weapon/reagent_containers/hypospray/autoinjector/used - used = 1 - filled_reagents = list() +/obj/item/weapon/reagent_containers/hypospray/autoinjector/used/New() + ..() + flags &= ~OPENCONTAINER + icon_state = "[initial(icon_state)]0" /obj/item/weapon/reagent_containers/hypospray/autoinjector/attack(mob/M as mob, mob/user as mob) ..() - if(used) //Prevents autoinjectors to be refilled. + if(reagents.total_volume <= 0) //Prevents autoinjectors to be refilled. flags &= ~OPENCONTAINER update_icon() return /obj/item/weapon/reagent_containers/hypospray/autoinjector/update_icon() - if(!used && reagents.reagent_list.len) + if(reagents.total_volume > 0) icon_state = "[initial(icon_state)]1" - else if(used) - icon_state = "[initial(icon_state)]0" else - icon_state = "[initial(icon_state)]2" + icon_state = "[initial(icon_state)]0" /obj/item/weapon/reagent_containers/hypospray/autoinjector/examine(mob/user) - ..(user) + . = ..(user) if(reagents && reagents.reagent_list.len) - user << "It is currently loaded." - else if(used) - user << "It is spent." + to_chat(user, "It is currently loaded.") else - user << "It is currently unloaded." + to_chat(user, "It is spent.") + +/obj/item/weapon/reagent_containers/hypospray/autoinjector/detox + name = "autoinjector (antitox)" + icon_state = "green" + filled_reagents = list("anti_toxin" = 5) /obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/clotting name = "clotting agent" diff --git a/html/changelog.html b/html/changelog.html index 629a7c1c020..c6a3dd049dc 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -53,6 +53,39 @@ -->
+

17 February 2018

+

Anewbe updated:

+ +

PrismaticGynoid updated:

+ +

Schnayy updated:

+ +

battlefieldCommander updated:

+ +

10 February 2018

Atermonera updated: