diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index d77ae5a73e..c001728d07 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -241,15 +241,7 @@ overlays.Cut() - if(!node1 && !node2) - var/turf/T = get_turf(src) - new /obj/item/pipe(loc, make_from=src) - for (var/obj/machinery/meter/meter in T) - if (meter.target == src) - new /obj/item/pipe_meter(T) - qdel(meter) - qdel(src) - else if(node1 && node2) + if(node1 && node2) overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]intact[icon_connect_type]") else overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]exposed[node1?1:0][node2?1:0][icon_connect_type]") @@ -489,34 +481,25 @@ alpha = 255 - if(!node1 && !node2 && !node3) - var/turf/T = get_turf(src) - new /obj/item/pipe(loc, make_from=src) - for (var/obj/machinery/meter/meter in T) - if (meter.target == src) - new /obj/item/pipe_meter(T) - qdel(meter) - qdel(src) - else - overlays.Cut() - overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "core" + icon_connect_type) - overlays += icon_manager.get_atmos_icon("manifold", , , "clamps" + icon_connect_type) - underlays.Cut() + overlays.Cut() + overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "core" + icon_connect_type) + overlays += icon_manager.get_atmos_icon("manifold", , , "clamps" + icon_connect_type) + underlays.Cut() - var/turf/T = get_turf(src) - var/list/directions = list(NORTH, SOUTH, EAST, WEST) - var/node1_direction = get_dir(src, node1) - var/node2_direction = get_dir(src, node2) - var/node3_direction = get_dir(src, node3) + var/turf/T = get_turf(src) + var/list/directions = list(NORTH, SOUTH, EAST, WEST) + var/node1_direction = get_dir(src, node1) + var/node2_direction = get_dir(src, node2) + var/node3_direction = get_dir(src, node3) - directions -= dir + directions -= dir - directions -= add_underlay(T,node1,node1_direction,icon_connect_type) - directions -= add_underlay(T,node2,node2_direction,icon_connect_type) - directions -= add_underlay(T,node3,node3_direction,icon_connect_type) + directions -= add_underlay(T,node1,node1_direction,icon_connect_type) + directions -= add_underlay(T,node2,node2_direction,icon_connect_type) + directions -= add_underlay(T,node3,node3_direction,icon_connect_type) - for(var/D in directions) - add_underlay(T,,D,icon_connect_type) + for(var/D in directions) + add_underlay(T,,D,icon_connect_type) /obj/machinery/atmospherics/pipe/manifold/update_underlays() @@ -744,49 +727,40 @@ alpha = 255 - if(!node1 && !node2 && !node3 && !node4) - var/turf/T = get_turf(src) - new /obj/item/pipe(loc, make_from=src) - for (var/obj/machinery/meter/meter in T) - if (meter.target == src) - new /obj/item/pipe_meter(T) - qdel(meter) - qdel(src) - else - overlays.Cut() - overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "4way" + icon_connect_type) - overlays += icon_manager.get_atmos_icon("manifold", , , "clamps_4way" + icon_connect_type) - underlays.Cut() + overlays.Cut() + overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "4way" + icon_connect_type) + overlays += icon_manager.get_atmos_icon("manifold", , , "clamps_4way" + icon_connect_type) + underlays.Cut() - /* - var/list/directions = list(NORTH, SOUTH, EAST, WEST) + /* + var/list/directions = list(NORTH, SOUTH, EAST, WEST) - directions -= add_underlay(node1) - directions -= add_underlay(node2) - directions -= add_underlay(node3) - directions -= add_underlay(node4) + directions -= add_underlay(node1) + directions -= add_underlay(node2) + directions -= add_underlay(node3) + directions -= add_underlay(node4) - for(var/D in directions) - add_underlay(,D) - */ + for(var/D in directions) + add_underlay(,D) + */ - var/turf/T = get_turf(src) - var/list/directions = list(NORTH, SOUTH, EAST, WEST) - var/node1_direction = get_dir(src, node1) - var/node2_direction = get_dir(src, node2) - var/node3_direction = get_dir(src, node3) - var/node4_direction = get_dir(src, node4) + var/turf/T = get_turf(src) + var/list/directions = list(NORTH, SOUTH, EAST, WEST) + var/node1_direction = get_dir(src, node1) + var/node2_direction = get_dir(src, node2) + var/node3_direction = get_dir(src, node3) + var/node4_direction = get_dir(src, node4) - directions -= dir + directions -= dir - directions -= add_underlay(T,node1,node1_direction,icon_connect_type) - directions -= add_underlay(T,node2,node2_direction,icon_connect_type) - directions -= add_underlay(T,node3,node3_direction,icon_connect_type) - directions -= add_underlay(T,node4,node4_direction,icon_connect_type) + directions -= add_underlay(T,node1,node1_direction,icon_connect_type) + directions -= add_underlay(T,node2,node2_direction,icon_connect_type) + directions -= add_underlay(T,node3,node3_direction,icon_connect_type) + directions -= add_underlay(T,node4,node4_direction,icon_connect_type) - for(var/D in directions) - add_underlay(T,,D,icon_connect_type) + for(var/D in directions) + add_underlay(T,,D,icon_connect_type) /obj/machinery/atmospherics/pipe/manifold4w/update_underlays() diff --git a/code/__defines/_planes+layers.dm b/code/__defines/_planes+layers.dm index ad4fe2181d..7370e10235 100644 --- a/code/__defines/_planes+layers.dm +++ b/code/__defines/_planes+layers.dm @@ -60,6 +60,7 @@ What is the naming convention for planes or layers? //#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define #define DECALS_LAYER 2.01 #define OVERTURF_LAYER 2.1 + #define HIDING_LAYER 2.45 //Layer at which mobs hide to be under things like tables #define DOOR_OPEN_LAYER 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6 //#define OBJ_LAYER 3 //For easy recordkeeping; this is a byond define #define DOOR_CLOSED_LAYER 3.1 //Above most items if closed diff --git a/code/controllers/subsystems/garbage.dm b/code/controllers/subsystems/garbage.dm index 34b32d5873..32c1e37a6e 100644 --- a/code/controllers/subsystems/garbage.dm +++ b/code/controllers/subsystems/garbage.dm @@ -169,7 +169,12 @@ SUBSYSTEM_DEF(garbage) #endif var/type = D.type var/datum/qdel_item/I = items[type] - testing("GC: -- \ref[D] | [type] was unable to be GC'd --") + var/extrainfo = "--" + if(istype(D,/image)) + var/image/img = D + var/icon/ico = img.icon + extrainfo = "L:[img.loc] -- I:[ico] -- IS:[img.icon_state] --" + testing("GC: -- \ref[D] | [type] was unable to be GC'd [extrainfo]") I.failures++ if (GC_QUEUE_HARDDELETE) HardDelete(D) diff --git a/code/datums/EPv2.dm b/code/datums/EPv2.dm index 37a1a0ba1f..a41175f424 100644 --- a/code/datums/EPv2.dm +++ b/code/datums/EPv2.dm @@ -40,6 +40,10 @@ var/global/list/all_exonet_connections = list() src.holder = holder ..() +/datum/exonet_protocol/Destroy() + remove_address() + holder = null + return ..() // Proc: make_address() // Parameters: 1 (string - used to make into a hash that will be part of the new address) diff --git a/code/datums/mixed.dm b/code/datums/mixed.dm index f0f0c70abd..191868e489 100644 --- a/code/datums/mixed.dm +++ b/code/datums/mixed.dm @@ -1,34 +1,46 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - -/datum/data - var/name = "data" - var/size = 1.0 - - -/datum/data/function - name = "function" - size = 2.0 - - -/datum/data/function/data_control - name = "data control" - - -/datum/data/function/id_changer - name = "id changer" - - -/datum/data/record - name = "record" - size = 5.0 - var/list/fields = list( ) - - -/datum/data/text - name = "text" - var/data = null - - - -/datum/debug - var/list/debuglist +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + +/datum/data + var/name = "data" + var/size = 1.0 + + +/datum/data/function + name = "function" + size = 2.0 + + +/datum/data/function/data_control + name = "data control" + + +/datum/data/function/id_changer + name = "id changer" + + +/datum/data/record + name = "record" + size = 5.0 + var/list/fields = list( ) + +// Mostly used for data_core records, but unfortuantely used some other places too. But mostly here, so lets make a good effort. +// TODO - Some machines/computers might be holding references to us. Lets look into that, but at least for now lets make sure that the manifest is cleaned up. +/datum/data/record/Destroy(var/force) + if(data_core.locked.Find(src)) + if(!force) + crash_with("Someone tried to qdel a record that was in data_core.locked [log_info_line(src)]") + return QDEL_HINT_LETMELIVE + data_core.locked -= src + data_core.medical -= src + data_core.general -= src + data_core.security -= src + . = ..() + +/datum/data/text + name = "text" + var/data = null + + + +/datum/debug + var/list/debuglist diff --git a/code/datums/outfits/jobs/cargo.dm b/code/datums/outfits/jobs/cargo.dm index e8974f09f9..bbfe6f59f5 100644 --- a/code/datums/outfits/jobs/cargo.dm +++ b/code/datums/outfits/jobs/cargo.dm @@ -20,6 +20,7 @@ /decl/hierarchy/outfit/job/cargo/mining name = OUTFIT_JOB_NAME("Shaft miner") uniform = /obj/item/clothing/under/rank/miner + l_ear = /obj/item/device/radio/headset/headset_mine backpack = /obj/item/weapon/storage/backpack/industrial satchel_one = /obj/item/weapon/storage/backpack/satchel/eng id_type = /obj/item/weapon/card/id/cargo/mining diff --git a/code/datums/progressbar.dm b/code/datums/progressbar.dm index bed0f33275..afcb65a8c1 100644 --- a/code/datums/progressbar.dm +++ b/code/datums/progressbar.dm @@ -22,8 +22,10 @@ /datum/progressbar/Destroy() if (client) client.images -= bar - qdel(bar) - . = ..() + qdel_null(bar) + user = null + client = null + return ..() /datum/progressbar/proc/update(progress) //world << "Update [progress] - [goal] - [(progress / goal)] - [((progress / goal) * 100)] - [round(((progress / goal) * 100), 5)]" diff --git a/code/datums/supplypacks/materials.dm b/code/datums/supplypacks/materials.dm index d09e3c8ee5..4c5ddedf47 100644 --- a/code/datums/supplypacks/materials.dm +++ b/code/datums/supplypacks/materials.dm @@ -49,7 +49,7 @@ cost = 15 contains = list( /obj/fiftyspawner/carpet, - /obj/fiftyspawner/bluecarpet + /obj/fiftyspawner/tealcarpet ) diff --git a/code/datums/supplypacks/misc.dm b/code/datums/supplypacks/misc.dm index 5a3bb038bb..ab4a0163c1 100644 --- a/code/datums/supplypacks/misc.dm +++ b/code/datums/supplypacks/misc.dm @@ -70,3 +70,10 @@ cost = 10 containertype = "/obj/structure/closet/crate" containername = "Webbing crate" + +/datum/supply_packs/misc/holoplant + name = "Holoplant Pot" + contains = list() + cost = 15 + containertype = /obj/machinery/holoplant/shipped + containername = "holoplant" diff --git a/code/game/gamemodes/technomancer/assistance/golem.dm b/code/game/gamemodes/technomancer/assistance/golem.dm index 33fc246911..6b8654e719 100644 --- a/code/game/gamemodes/technomancer/assistance/golem.dm +++ b/code/game/gamemodes/technomancer/assistance/golem.dm @@ -30,7 +30,7 @@ melee_damage_lower = 30 // It has a built in esword. melee_damage_upper = 30 attack_sound = 'sound/weapons/blade1.ogg' - attacktext = "slashed" + attacktext = list("slashed") friendly = "hugs" resistance = 0 melee_miss_chance = 0 diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 5696892ddc..ccf3f69529 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -9,6 +9,7 @@ idle_power_usage = 1 active_power_usage = 5 surgery_odds = 100 + throwpass = 1 var/mob/living/carbon/human/victim = null var/strapped = 0.0 var/obj/machinery/computer/operating/computer = null diff --git a/code/game/machinery/oxygen_pump.dm b/code/game/machinery/oxygen_pump.dm new file mode 100644 index 0000000000..36db3f83f3 --- /dev/null +++ b/code/game/machinery/oxygen_pump.dm @@ -0,0 +1,241 @@ +#define TANK_MAX_RELEASE_PRESSURE (3*ONE_ATMOSPHERE) +#define TANK_DEFAULT_RELEASE_PRESSURE ONE_ATMOSPHERE + +/obj/machinery/oxygen_pump + name = "emergency oxygen pump" + icon = 'icons/obj/walllocker.dmi' + desc = "A wall mounted oxygen pump with a retractable face mask that you can pull over your face in case of emergencies." + icon_state = "oxygen_tank" + + anchored = TRUE + + var/obj/item/weapon/tank/tank + var/mob/living/carbon/breather + var/obj/item/clothing/mask/breath/contained + + var/spawn_type = /obj/item/weapon/tank/emergency/oxygen/engi + var/mask_type = /obj/item/clothing/mask/breath/emergency + var/icon_state_open = "oxygen_tank_open" + var/icon_state_closed = "oxygen_tank" + + power_channel = ENVIRON + idle_power_usage = 10 + active_power_usage = 120 // No idea what the realistic amount would be. + +/obj/machinery/oxygen_pump/initialize() + . = ..() + tank = new spawn_type (src) + contained = new mask_type (src) + +/obj/machinery/oxygen_pump/Destroy() + if(breather) + breather.internal = null + if(breather.internals) + breather.internals.icon_state = "internal0" + breather.remove_from_mob(contained) + visible_message("The mask rapidly retracts just before /the [src] is destroyed!") + breather = null + + qdel_null(tank) + qdel_null(contained) + return ..() + +/obj/machinery/oxygen_pump/MouseDrop(var/mob/living/carbon/human/target, src_location, over_location) + ..() + if(istype(target) && CanMouseDrop(target)) + if(!can_apply_to_target(target, usr)) // There is no point in attempting to apply a mask if it's impossible. + return + usr.visible_message("\The [usr] begins placing the mask onto [target]..") + if(!do_mob(usr, target, 25) || !can_apply_to_target(target, usr)) + return + // place mask and add fingerprints + usr.visible_message("\The [usr] has placed \the mask on [target]'s mouth.") + attach_mask(target) + src.add_fingerprint(usr) + +/obj/machinery/oxygen_pump/attack_hand(mob/user as mob) + if((stat & MAINT) && tank) + user.visible_message("\The [user] removes \the [tank] from \the [src].", "You remove \the [tank] from \the [src].") + user.put_in_hands(tank) + src.add_fingerprint(user) + tank.add_fingerprint(user) + tank = null + return + if (!tank) + to_chat(user, "There is no tank in \the [src]!") + return + if(breather) + if(tank) + tank.forceMove(src) + breather.remove_from_mob(contained) + contained.forceMove(src) + src.visible_message("\The [user] makes \The [contained] rapidly retracts back into \the [src]!") + if(breather.internals) + breather.internals.icon_state = "internal0" + breather = null + use_power = 1 + +/obj/machinery/oxygen_pump/attack_ai(mob/user as mob) + ui_interact(user) + +/obj/machinery/oxygen_pump/proc/attach_mask(var/mob/living/carbon/C) + if(C && istype(C)) + contained.forceMove(get_turf(C)) + C.equip_to_slot(contained, slot_wear_mask) + if(tank) + tank.forceMove(C) + breather = C + spawn(1) + if(!breather.internal && tank) + breather.internal = tank + if(breather.internals) + breather.internals.icon_state = "internal1" + use_power = 2 + +/obj/machinery/oxygen_pump/proc/can_apply_to_target(var/mob/living/carbon/human/target, mob/user as mob) + if(!user) + user = target + // Check target validity + if(!target.organs_by_name[BP_HEAD]) + to_chat(user, "\The [target] doesn't have a head.") + return + if(!target.check_has_mouth()) + to_chat(user, "\The [target] doesn't have a mouth.") + return + if(target.wear_mask && target != breather) + to_chat(user, "\The [target] is already wearing a mask.") + return + if(target.head && (target.head.body_parts_covered & FACE)) + to_chat(user, "Remove their [target.head] first.") + return + if(!tank) + to_chat(user, "There is no tank in \the [src].") + return + if(stat & MAINT) + to_chat(user, "Please close \the maintenance hatch first.") + return + if(!Adjacent(target)) + to_chat(user, "Please stay close to \the [src].") + return + //when there is a breather: + if(breather && target != breather) + to_chat(user, "\The pump is already in use.") + return + //Checking if breather is still valid + if(target == breather && target.wear_mask != contained) + to_chat(user, "\The [target] is not using the supplied mask.") + return + return 1 + +/obj/machinery/oxygen_pump/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W,/obj/item/weapon/screwdriver)) + stat ^= MAINT + user.visible_message("\The [user] [stat & MAINT ? "opens" : "closes"] \the [src].", "You [stat & MAINT ? "open" : "close"] \the [src].") + if(stat & MAINT) + icon_state = icon_state_open + if(!stat) + icon_state = icon_state_closed + //TO-DO: Open icon + if(istype(W, /obj/item/weapon/tank) && (stat & MAINT)) + if(tank) + to_chat(user, "\The [src] already has a tank installed!") + else + user.drop_item() + W.forceMove(src) + tank = W + user.visible_message("\The [user] installs \the [tank] into \the [src].", "You install \the [tank] into \the [src].") + src.add_fingerprint(user) + if(istype(W, /obj/item/weapon/tank) && !stat) + to_chat(user, "Please open the maintenance hatch first.") + +/obj/machinery/oxygen_pump/examine(var/mob/user) + . = ..() + if(tank) + to_chat(user, "The meter shows [round(tank.air_contents.return_pressure())]") + else + to_chat(user, "It is missing a tank!") + + +/obj/machinery/oxygen_pump/process() + if(breather) + if(!can_apply_to_target(breather)) + if(tank) + tank.forceMove(src) + breather.remove_from_mob(contained) + contained.forceMove(src) + src.visible_message("\The [contained] rapidly retracts back into \the [src]!") + breather = null + use_power = 1 + else if(!breather.internal && tank) + breather.internal = tank + if(breather.internals) + breather.internals.icon_state = "internal0" + +//Create rightclick to view tank settings +/obj/machinery/oxygen_pump/verb/settings() + set src in oview(1) + set category = "Object" + set name = "Show Tank Settings" + ui_interact(usr) + +//GUI Tank Setup +/obj/machinery/oxygen_pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) + var/data[0] + if(!tank) + to_chat(usr, "It is missing a tank!") + data["tankPressure"] = 0 + data["releasePressure"] = 0 + data["defaultReleasePressure"] = 0 + data["maxReleasePressure"] = 0 + data["maskConnected"] = 0 + data["tankInstalled"] = 0 + // this is the data which will be sent to the ui + if(tank) + data["tankPressure"] = round(tank.air_contents.return_pressure() ? tank.air_contents.return_pressure() : 0) + data["releasePressure"] = round(tank.distribute_pressure ? tank.distribute_pressure : 0) + data["defaultReleasePressure"] = round(TANK_DEFAULT_RELEASE_PRESSURE) + data["maxReleasePressure"] = round(TANK_MAX_RELEASE_PRESSURE) + data["maskConnected"] = 0 + data["tankInstalled"] = 1 + + if(!breather) + data["maskConnected"] = 0 + if(breather) + data["maskConnected"] = 1 + + + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + if (!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "Oxygen_pump.tmpl", "Tank", 500, 300) + // when the ui is first opened this is the data it will use + ui.set_initial_data(data) + // open the new ui window + ui.open() + // auto update every Master Controller tick + ui.set_auto_update(1) + +/obj/machinery/oxygen_pump/Topic(href, href_list) + if(..()) + return 1 + + if (href_list["dist_p"]) + if (href_list["dist_p"] == "reset") + tank.distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE + else if (href_list["dist_p"] == "max") + tank.distribute_pressure = TANK_MAX_RELEASE_PRESSURE + else + var/cp = text2num(href_list["dist_p"]) + tank.distribute_pressure += cp + tank.distribute_pressure = min(max(round(tank.distribute_pressure), 0), TANK_MAX_RELEASE_PRESSURE) + return 1 + +/obj/machinery/oxygen_pump/anesthetic + name = "anesthetic pump" + spawn_type = /obj/item/weapon/tank/anesthetic + icon_state = "anesthetic_tank" + icon_state_closed = "anesthetic_tank" + icon_state_open = "anesthetic_tank_open" + mask_type = /obj/item/clothing/mask/breath/anesthetic diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 6f6a4f04fb..77dbd46fad 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -862,7 +862,8 @@ /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/stack/medical/advanced/bruise_pack = 3, /obj/item/stack/medical/advanced/ointment = 3, /obj/item/stack/medical/splint = 2) + /obj/item/stack/medical/advanced/bruise_pack = 3, /obj/item/stack/medical/advanced/ointment = 3, /obj/item/stack/medical/splint = 2, + /obj/item/weapon/storage/pill_bottle/carbon = 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) idle_power_usage = 211 //refrigerator - believe it or not, this is actually the average power consumption of a refrigerated vending machine according to NRCan. req_log_access = access_cmo diff --git a/code/game/objects/effects/decals/posters/polarisposters.dm b/code/game/objects/effects/decals/posters/polarisposters.dm index 9295b754c9..958ceb66be 100644 --- a/code/game/objects/effects/decals/posters/polarisposters.dm +++ b/code/game/objects/effects/decals/posters/polarisposters.dm @@ -26,12 +26,12 @@ /datum/poster/pol_6 icon_state="polposter6" name = "Walk!" - desc = "This poster depicts a man walking, presumably to encourage you to not run in the halls." + desc = "This poster depicts a man walking, presumably to encourage you not to run in the halls." /datum/poster/pol_7 icon_state="polposter7" name = "Place your signs!" - desc = "A safety poster reminding custodial stuff to place wet floor signs where needed. This reminder's rarely heeded." + desc = "A safety poster reminding custodial staff to place wet floor signs where needed. This reminder's rarely heeded." /datum/poster/pol_8 icon_state="polposter8" diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index a23abb5b06..302c7df568 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -145,7 +145,7 @@ var/obj/item/weapon/reagent_containers/syringe/syringe /obj/structure/closet/body_bag/cryobag/New() - tank = new /obj/item/weapon/tank/emergency/oxygen(null) //It's in nullspace to prevent ejection when the bag is opened. + tank = new /obj/item/weapon/tank/emergency/oxygen/double(null) //It's in nullspace to prevent ejection when the bag is opened. ..() /obj/structure/closet/body_bag/cryobag/Destroy() diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index cac80c84d0..f809bcb9b2 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -287,17 +287,20 @@ var/global/list/obj/item/device/communicator/all_communicators = list() to_chat(voice, "\icon[src] Connection timed out with remote host.") qdel(voice) close_connection(reason = "Connection timed out") + + //Clean up all references we might have to others communicating.Cut() voice_requests.Cut() voice_invites.Cut() + node = null + + //Clean up references that might point at us all_communicators -= src processing_objects -= src listening_objects.Remove(src) - qdel(camera) - camera = null - if(exonet) - exonet.remove_address() - exonet = null + qdel_null(camera) + qdel_null(exonet) + return ..() // Proc: update_icon() diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 3b703f703b..01b52affc5 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -92,77 +92,66 @@ name = "security radio headset" desc = "This is used by your elite security force." icon_state = "sec_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/headset_sec /obj/item/device/radio/headset/headset_sec/alt name = "security bowman headset" desc = "This is used by your elite security force." icon_state = "sec_headset_alt" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/headset_sec /obj/item/device/radio/headset/headset_eng name = "engineering radio headset" desc = "When the engineers wish to chat like girls." icon_state = "eng_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/headset_eng /obj/item/device/radio/headset/headset_eng/alt name = "engineering bowman headset" desc = "When the engineers wish to chat like girls." icon_state = "eng_headset_alt" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/headset_eng /obj/item/device/radio/headset/headset_rob name = "robotics radio headset" desc = "Made specifically for the roboticists who cannot decide between departments." icon_state = "rob_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/headset_rob /obj/item/device/radio/headset/headset_med name = "medical radio headset" desc = "A headset for the trained staff of the medbay." icon_state = "med_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/headset_med /obj/item/device/radio/headset/headset_med/alt name = "medical bowman headset" desc = "A headset for the trained staff of the medbay." icon_state = "med_headset_alt" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/headset_med /obj/item/device/radio/headset/headset_sci name = "science radio headset" desc = "A sciency headset. Like usual." icon_state = "com_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/headset_sci /obj/item/device/radio/headset/headset_medsci name = "medical research radio headset" desc = "A headset that is a result of the mating between medical and science." icon_state = "med_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/headset_medsci /obj/item/device/radio/headset/headset_com name = "command radio headset" desc = "A headset with a commanding channel." icon_state = "com_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/headset_com /obj/item/device/radio/headset/headset_com/alt name = "command bowman headset" desc = "A headset with a commanding channel." icon_state = "com_headset_alt" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/headset_com @@ -170,21 +159,18 @@ name = "colony director's headset" desc = "The headset of the boss." icon_state = "com_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/captain /obj/item/device/radio/headset/heads/captain/alt name = "colony director's bowman headset" desc = "The headset of the boss." icon_state = "com_headset_alt" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/captain /obj/item/device/radio/headset/heads/captain/sfr name = "SFR headset" desc = "A headset belonging to a Sif Free Radio DJ. SFR, best tunes in the wilderness." icon_state = "com_headset_alt" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/captain /obj/item/device/radio/headset/heads/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway. @@ -206,105 +192,91 @@ name = "research director's headset" desc = "Headset of the researching God." icon_state = "com_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/rd /obj/item/device/radio/headset/heads/rd/alt name = "research director's bowman headset" desc = "Headset of the researching God." icon_state = "com_headset_alt" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/rd /obj/item/device/radio/headset/heads/hos name = "head of security's headset" desc = "The headset of the man who protects your worthless lifes." icon_state = "com_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/hos /obj/item/device/radio/headset/heads/hos/alt name = "head of security's bowman headset" desc = "The headset of the man who protects your worthless lifes." icon_state = "com_headset_alt" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/hos /obj/item/device/radio/headset/heads/ce name = "chief engineer's headset" desc = "The headset of the guy who is in charge of morons" icon_state = "com_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/ce /obj/item/device/radio/headset/heads/ce/alt name = "chief engineer's bowman headset" desc = "The headset of the guy who is in charge of morons" icon_state = "com_headset_alt" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/ce /obj/item/device/radio/headset/heads/cmo name = "chief medical officer's headset" desc = "The headset of the highly trained medical chief." icon_state = "com_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/cmo /obj/item/device/radio/headset/heads/cmo/alt name = "chief medical officer's bowman headset" desc = "The headset of the highly trained medical chief." icon_state = "com_headset_alt" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/cmo /obj/item/device/radio/headset/heads/hop name = "head of personnel's headset" desc = "The headset of the guy who will one day be Colony Director." icon_state = "com_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/hop /obj/item/device/radio/headset/heads/hop/alt name = "head of personnel's bowman headset" desc = "The headset of the guy who will one day be Colony Director." icon_state = "com_headset_alt" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/hop -/* + /obj/item/device/radio/headset/headset_mine name = "mining radio headset" - desc = "Headset used by miners. How useless. To access the mining channel, use :d." + desc = "Headset used by miners. Has inbuilt short-band radio for when comms are down." icon_state = "mine_headset" - item_state = "headset" - keyslot2 = new /obj/item/device/encryptionkey/headset_mine -*/ + adhoc_fallback = TRUE + ks2type = /obj/item/device/encryptionkey/headset_cargo + /obj/item/device/radio/headset/headset_cargo name = "supply radio headset" desc = "A headset used by the QM and his slaves." icon_state = "cargo_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/headset_cargo /obj/item/device/radio/headset/headset_cargo/alt name = "supply bowman headset" desc = "A bowman headset used by the QM and his slaves." icon_state = "cargo_headset_alt" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/headset_cargo /obj/item/device/radio/headset/headset_service name = "service radio headset" desc = "Headset used by the service staff, tasked with keeping the station full, happy and clean." icon_state = "srv_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/headset_service /obj/item/device/radio/headset/ert name = "emergency response team radio headset" desc = "The headset of the boss's boss." icon_state = "com_headset" - item_state = "headset" centComm = 1 // freerange = 1 ks2type = /obj/item/device/encryptionkey/ert @@ -313,7 +285,6 @@ name = "emergency response team bowman headset" desc = "The headset of the boss's boss." icon_state = "com_headset_alt" - item_state = "headset" // freerange = 1 ks2type = /obj/item/device/encryptionkey/ert @@ -324,7 +295,6 @@ name = "internal affair's headset" desc = "The headset of your worst enemy." icon_state = "com_headset" - item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/hos /obj/item/device/radio/headset/mmi_radio diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index ae255d2f7b..cb07bafb80 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -266,15 +266,15 @@ REAGENT SCANNER if(0) to_chat(usr, "The scanner will now perform a basic analysis.") -/obj/item/device/healthanalyzer/advanced //reports bone fractures, IB, quantity of beneficial reagents in stomach; also regular health analyzer stuff - name = "advanced health analyzer" +/obj/item/device/healthanalyzer/improved //reports bone fractures, IB, quantity of beneficial reagents in stomach; also regular health analyzer stuff + name = "improved health analyzer" desc = "A miracle of medical technology, this handheld scanner can produce an accurate and specific report of a patient's biosigns." advscan = 1 origin_tech = list(TECH_MAGNET = 5, TECH_BIO = 6) icon_state = "health1" -/obj/item/device/healthanalyzer/enhanced //reports all of the above, as well as radiation severity and minor brain damage - name = "enhanced health analyzer" +/obj/item/device/healthanalyzer/advanced //reports all of the above, as well as radiation severity and minor brain damage + name = "advanced health analyzer" desc = "An even more advanced handheld health scanner, complete with a full biosign monitor and on-board radiation and neurological analysis suites." advscan = 2 origin_tech = list(TECH_MAGNET = 6, TECH_BIO = 7) diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm index 159134f83c..ce145fed9e 100644 --- a/code/game/objects/items/devices/spy_bug.dm +++ b/code/game/objects/items/devices/spy_bug.dm @@ -16,11 +16,12 @@ // var/obj/item/device/radio/bug/radio var/obj/machinery/camera/bug/camera + var/camtype = /obj/machinery/camera/bug /obj/item/device/camerabug/New() ..() // radio = new(src) - camera = new(src) + camera = new camtype(src) /obj/item/device/camerabug/attack_self(mob/user) if(user.a_intent == I_HURT) @@ -40,7 +41,7 @@ linkedmonitor.unpair(src) linkedmonitor = null qdel(camera) - camera = new(src) + camera = new camtype(src) to_chat(usr, "You turn the [src] off and on again, delinking it from any monitors.") /obj/item/brokenbug @@ -83,6 +84,7 @@ w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3) + camtype = /obj/machinery/camera/bug/spy /obj/item/device/camerabug/examine(mob/user) . = ..(user, 0) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index eed9d9dc49..ed430d7584 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -134,7 +134,7 @@ return 1 /obj/item/borg/upgrade/jetpack - name = "mining robot jetpack" + name = "robot jetpack" desc = "A carbon dioxide jetpack suitable for low-gravity operations." icon_state = "cyborg_upgrade3" item_state = "cyborg_upgrade" @@ -149,7 +149,7 @@ if(!T) T = locate() in R.module.modules if(!T) - R.module.modules += new/obj/item/weapon/tank/jetpack/carbondioxide + R.module.modules += new/obj/item/weapon/tank/jetpack/carbondioxide(R.module) for(var/obj/item/weapon/tank/jetpack/carbondioxide in R.module.modules) R.internals = src return 1 @@ -174,7 +174,7 @@ if(!T) T = locate() in R.module.modules if(!T) - R.module.modules += new/obj/item/device/healthanalyzer/advanced + R.module.modules += new/obj/item/device/healthanalyzer/advanced(R.module) return 1 if(T) to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!") @@ -215,4 +215,4 @@ R.add_language(LANGUAGE_SCHECHI, 1) R.add_language(LANGUAGE_ROOTLOCAL, 1) - return 1 \ No newline at end of file + return 1 diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index ff680ab468..b2477ae9ff 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -61,8 +61,7 @@ var/global/list/datum/stack_recipe/rods_recipes = list( \ return if (istype(W, /obj/item/weapon/tape_roll)) - var/obj/item/stack/medical/splint/ghetto/new_splint = new(user.loc) - new_splint.loc = src.loc + var/obj/item/stack/medical/splint/ghetto/new_splint = new(get_turf(user)) new_splint.add_fingerprint(user) user.visible_message("\The [user] constructs \a [new_splint] out of a [singular_name].", \ diff --git a/code/game/objects/items/stacks/tiles/fifty_spawner_tiles.dm b/code/game/objects/items/stacks/tiles/fifty_spawner_tiles.dm index 3d89b5e786..b3605c6b1f 100644 --- a/code/game/objects/items/stacks/tiles/fifty_spawner_tiles.dm +++ b/code/game/objects/items/stacks/tiles/fifty_spawner_tiles.dm @@ -8,13 +8,17 @@ name = "stack of wood" type_to_spawn = /obj/item/stack/tile/wood +/obj/fiftyspawner/wood/sif + name = "stack of alien wood" + type_to_spawn = /obj/item/stack/tile/sifwood + /obj/fiftyspawner/carpet name = "stack of carpet" type_to_spawn = /obj/item/stack/tile/carpet -/obj/fiftyspawner/bluecarpet - name = "stack of blue carpet" - type_to_spawn = /obj/item/stack/tile/carpet/blue +/obj/fiftyspawner/tealcarpet + name = "stack of teal carpet" + type_to_spawn = /obj/item/stack/tile/carpet/teal /obj/fiftyspawner/floor name = "stack of floor tiles" diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index 32a4580c7e..a24bc0d43f 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -55,9 +55,24 @@ flags = 0 no_variants = FALSE +/obj/item/stack/tile/sifwood + name = "alien wood tile" + singular_name = "alien wood tile" + desc = "An easy to fit wooden floor tile. It's blue!" + icon_state = "tile-sifwood" + force = 1.0 + throwforce = 1.0 + throw_speed = 5 + throw_range = 20 + flags = 0 + no_variants = FALSE + /obj/item/stack/tile/wood/fifty amount = 50 +/obj/item/stack/tile/sifwood/fifty + amount = 50 + /obj/item/stack/tile/wood/cyborg name = "wood floor tile synthesizer" desc = "A device that makes wood floor tiles." @@ -81,11 +96,11 @@ flags = 0 no_variants = FALSE -/obj/item/stack/tile/carpet/blue - name = "blue carpet" - singular_name = "blue carpet" - desc = "A piece of blue carpet. It is the same size as a normal floor tile!" - icon_state = "tile-bluecarpet" +/obj/item/stack/tile/carpet/teal + name = "teal carpet" + singular_name = "teal carpet" + desc = "A piece of teal carpet. It is the same size as a normal floor tile!" + icon_state = "tile-tealcarpet" no_variants = FALSE // TODO - Add descriptions to these @@ -107,7 +122,7 @@ /obj/item/stack/tile/floor name = "floor tile" singular_name = "floor tile" - desc = "Those could work as a pretty decent throwing weapon" //why? + desc = "A metal tile fit for covering a section of floor." icon_state = "tile" force = 6.0 matter = list(DEFAULT_WALL_MATERIAL = SHEET_MATERIAL_AMOUNT / 4) diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 1d515e863b..d28779fc08 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -52,7 +52,9 @@ /obj/item/weapon/implant/Destroy() if(part) part.implants.Remove(src) + listening_objects.Remove(src) part = null + imp_in = null return ..() /obj/item/weapon/implant/attackby(obj/item/I, mob/user) @@ -82,7 +84,6 @@ /obj/item/weapon/implant/tracking/implanted(var/mob/source) processing_objects.Add(src) - listening_objects |= src return 1 /obj/item/weapon/implant/tracking/Destroy() diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index a7f6565a2d..8985f85bac 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -14,3 +14,34 @@ var/datum/gender/T = gender_datums[user.get_visible_gender()] user.visible_message(span("danger", "\The [user] [T.is] strangling [T.himself] with \the [src]! It looks like [T.he] [T.is] trying to commit suicide."), span("danger", "You start to strangle yourself with \the [src]!"), span("danger", "You hear the sound of someone choking!")) return (OXYLOSS) + +/obj/item/weapon/melee/umbrella + name = "umbrella" + desc = "To keep the rain off you. Use with caution on windy days." + icon = 'icons/obj/items.dmi' + icon_state = "umbrella_closed" + flags = CONDUCT + slot_flags = SLOT_BELT + force = 5 + throwforce = 5 + w_class = ITEMSIZE_NORMAL + var/open = FALSE + +/obj/item/weapon/melee/umbrella/New() + ..() + color = "#"+get_random_colour() + update_icon() + +/obj/item/weapon/melee/umbrella/attack_self() + src.toggle_umbrella() + +/obj/item/weapon/melee/umbrella/proc/toggle_umbrella() + open = !open + icon_state = "umbrella_[open ? "open" : "closed"]" + item_state = icon_state + update_icon() + if(ishuman(src.loc)) + var/mob/living/carbon/human/H = src.loc + H.update_inv_l_hand(0) + H.update_inv_r_hand() + ..() \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index c564ebe466..10072cd4cc 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -47,22 +47,18 @@ max_storage_space = ITEMSIZE_COST_NORMAL * 14 // 56 storage_cost = INVENTORY_STANDARD_SPACE + 1 - New() - ..() +/obj/item/weapon/storage/backpack/holding/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/storage/backpack/holding)) + user << "The Bluespace interfaces of the two devices conflict and malfunction." + qdel(W) return + . = ..() - attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/storage/backpack/holding)) - user << "The Bluespace interfaces of the two devices conflict and malfunction." - qdel(W) - return - ..() - - //Please don't clutter the parent storage item with stupid hacks. - can_be_inserted(obj/item/W as obj, stop_messages = 0) - if(istype(W, /obj/item/weapon/storage/backpack/holding)) - return 1 - return ..() +//Please don't clutter the parent storage item with stupid hacks. +/obj/item/weapon/storage/backpack/holding/can_be_inserted(obj/item/W as obj, stop_messages = 0) + if(istype(W, /obj/item/weapon/storage/backpack/holding)) + return 1 + return ..() /obj/item/weapon/storage/backpack/santabag name = "\improper Santa's gift bag" @@ -197,9 +193,7 @@ item_state_slots = list(slot_r_hand_str = "briefcase", slot_l_hand_str = "briefcase") /obj/item/weapon/storage/backpack/satchel/withwallet - New() - ..() - new /obj/item/weapon/storage/wallet/random( src ) + starts_with = list(/obj/item/weapon/storage/wallet/random) /obj/item/weapon/storage/backpack/satchel/norm name = "satchel" diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 01ca1c7796..5b20553430 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -68,6 +68,9 @@ // ----------------------------- // Mining Satchel // ----------------------------- +/* + * Mechoid - Orebags are the most common quick-gathering thing, and also have tons of lag associated with it. Their checks are going to be hyper-simplified due to this, and their INCREDIBLY singular target contents. + */ /obj/item/weapon/storage/bag/ore name = "mining satchel" @@ -79,7 +82,80 @@ max_storage_space = ITEMSIZE_COST_NORMAL * 25 max_w_class = ITEMSIZE_NORMAL can_hold = list(/obj/item/weapon/ore) + var/stored_ore = list() + var/last_update = 0 +/obj/item/weapon/storage/bag/ore/remove_from_storage(obj/item/W as obj, atom/new_location) + if(!istype(W)) return 0 + + if(new_location) + if(ismob(loc)) + W.dropped(usr) + if(ismob(new_location)) + W.hud_layerise() + else + W.reset_plane_and_layer() + W.forceMove(new_location) + else + W.forceMove(get_turf(src)) + + W.on_exit_storage(src) + update_icon() + return 1 + +/obj/item/weapon/storage/bag/ore/gather_all(turf/T as turf, mob/user as mob, var/silent = 0) + var/success = 0 + var/failure = 0 + for(var/obj/item/weapon/ore/I in T) //Only ever grabs ores. Doesn't do any extraneous checks, as all ore is the same size. Tons of checks means it causes hanging for up to three seconds. + if(contents.len >= max_storage_space) + failure = 1 + break + I.forceMove(src) + success = 1 + if(success && !failure && !silent) + to_chat(user, "You put everything in [src].") + else if(success && (!silent || (silent && contents.len >= max_storage_space))) + to_chat(user, "You fill the [src].") + else if(!silent) + to_chat(user, "You fail to pick anything up with \the [src].") + +/obj/item/weapon/storage/bag/ore/examine(mob/user) + ..() + + if(!Adjacent(user)) //Can only check the contents of ore bags if you can physically reach them. + return + + if(istype(user, /mob/living)) + add_fingerprint(user) + + if(!contents.len) + to_chat(user, "It is empty.") + return + + if(world.time > last_update + 10) + update_ore_count() + last_update = world.time + + to_chat(user, "It holds:") + for(var/ore in stored_ore) + to_chat(user, "- [stored_ore[ore]] [ore]") + return + +/obj/item/weapon/storage/bag/ore/open(mob/user as mob) //No opening it for the weird UI of having shit-tons of ore inside it. + if(world.time > last_update + 10) + update_ore_count() + last_update = world.time + examine(user) + +/obj/item/weapon/storage/bag/ore/proc/update_ore_count() //Stolen from ore boxes. + + stored_ore = list() + + for(var/obj/item/weapon/ore/O in contents) + if(stored_ore[O.name]) + stored_ore[O.name]++ + else + stored_ore[O.name] = 1 // ----------------------------- // Plant bag @@ -112,121 +188,116 @@ storage_slots = 7 allow_quick_empty = 1 // this function is superceded - New() - ..() - //verbs -= /obj/item/weapon/storage/verb/quick_empty - //verbs += /obj/item/weapon/storage/bag/sheetsnatcher/quick_empty - can_be_inserted(obj/item/W as obj, stop_messages = 0) - if(!istype(W,/obj/item/stack/material)) - if(!stop_messages) - usr << "The snatcher does not accept [W]." - return 0 - var/current = 0 - for(var/obj/item/stack/material/S in contents) - current += S.amount - if(capacity == current)//If it's full, you're done - if(!stop_messages) - usr << "The snatcher is full." - return 0 - return 1 +/obj/item/weapon/storage/bag/sheetsnatcher/can_be_inserted(obj/item/W as obj, stop_messages = 0) + if(!istype(W,/obj/item/stack/material)) + if(!stop_messages) + usr << "The snatcher does not accept [W]." + return 0 + var/current = 0 + for(var/obj/item/stack/material/S in contents) + current += S.amount + if(capacity == current)//If it's full, you're done + if(!stop_messages) + usr << "The snatcher is full." + return 0 + return 1 // Modified handle_item_insertion. Would prefer not to, but... - handle_item_insertion(obj/item/W as obj, prevent_warning = 0) - var/obj/item/stack/material/S = W - if(!istype(S)) return 0 +/obj/item/weapon/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W as obj, prevent_warning = 0) + var/obj/item/stack/material/S = W + if(!istype(S)) return 0 - var/amount - var/inserted = 0 - var/current = 0 - for(var/obj/item/stack/material/S2 in contents) - current += S2.amount - if(capacity < current + S.amount)//If the stack will fill it up - amount = capacity - current + var/amount + var/inserted = 0 + var/current = 0 + for(var/obj/item/stack/material/S2 in contents) + current += S2.amount + if(capacity < current + S.amount)//If the stack will fill it up + amount = capacity - current + else + amount = S.amount + + for(var/obj/item/stack/material/sheet in contents) + if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects + sheet.amount += amount // they should only be removed through procs in this file, which split them up. + S.amount -= amount + inserted = 1 + break + + if(!inserted || !S.amount) + usr.remove_from_mob(S) + usr.update_icons() //update our overlays + if (usr.client && usr.s_active != src) + usr.client.screen -= S + S.dropped(usr) + if(!S.amount) + qdel(S) else - amount = S.amount + S.loc = src - for(var/obj/item/stack/material/sheet in contents) - if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects - sheet.amount += amount // they should only be removed through procs in this file, which split them up. - S.amount -= amount - inserted = 1 - break - - if(!inserted || !S.amount) - usr.remove_from_mob(S) - usr.update_icons() //update our overlays - if (usr.client && usr.s_active != src) - usr.client.screen -= S - S.dropped(usr) - if(!S.amount) - qdel(S) - else - S.loc = src - - orient2hud(usr) - if(usr.s_active) - usr.s_active.show_to(usr) - update_icon() - return 1 + orient2hud(usr) + if(usr.s_active) + usr.s_active.show_to(usr) + update_icon() + return 1 // Sets up numbered display to show the stack size of each stored mineral // NOTE: numbered display is turned off currently because it's broken - orient2hud(mob/user as mob) - var/adjusted_contents = contents.len +/obj/item/weapon/storage/bag/sheetsnatcher/orient2hud(mob/user as mob) + var/adjusted_contents = contents.len - //Numbered contents display - var/list/datum/numbered_display/numbered_contents - if(display_contents_with_number) - numbered_contents = list() - adjusted_contents = 0 - for(var/obj/item/stack/material/I in contents) - adjusted_contents++ - var/datum/numbered_display/D = new/datum/numbered_display(I) - D.number = I.amount - numbered_contents.Add( D ) - - var/row_num = 0 - var/col_count = min(7,storage_slots) -1 - if (adjusted_contents > 7) - row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width. - src.slot_orient_objs(row_num, col_count, numbered_contents) - return + //Numbered contents display + var/list/datum/numbered_display/numbered_contents + if(display_contents_with_number) + numbered_contents = list() + adjusted_contents = 0 + for(var/obj/item/stack/material/I in contents) + adjusted_contents++ + var/datum/numbered_display/D = new/datum/numbered_display(I) + D.number = I.amount + numbered_contents.Add( D ) + var/row_num = 0 + var/col_count = min(7,storage_slots) -1 + if (adjusted_contents > 7) + row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width. + src.slot_orient_objs(row_num, col_count, numbered_contents) + return // Modified quick_empty verb drops appropriate sized stacks - quick_empty() - var/location = get_turf(src) - for(var/obj/item/stack/material/S in contents) - while(S.amount) - var/obj/item/stack/material/N = new S.type(location) - var/stacksize = min(S.amount,N.max_amount) - N.amount = stacksize - S.amount -= stacksize - if(!S.amount) - qdel(S) // todo: there's probably something missing here - orient2hud(usr) - if(usr.s_active) - usr.s_active.show_to(usr) - update_icon() +/obj/item/weapon/storage/bag/sheetsnatcher/quick_empty() + var/location = get_turf(src) + for(var/obj/item/stack/material/S in contents) + while(S.amount) + var/obj/item/stack/material/N = new S.type(location) + var/stacksize = min(S.amount,N.max_amount) + N.amount = stacksize + S.amount -= stacksize + if(!S.amount) + qdel(S) // todo: there's probably something missing here + orient2hud(usr) + if(usr.s_active) + usr.s_active.show_to(usr) + update_icon() // Instead of removing - remove_from_storage(obj/item/W as obj, atom/new_location) - var/obj/item/stack/material/S = W - if(!istype(S)) return 0 +/obj/item/weapon/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W as obj, atom/new_location) + var/obj/item/stack/material/S = W + if(!istype(S)) return 0 - //I would prefer to drop a new stack, but the item/attack_hand code - // that calls this can't recieve a different object than you clicked on. - //Therefore, make a new stack internally that has the remainder. - // -Sayu + //I would prefer to drop a new stack, but the item/attack_hand code + // that calls this can't recieve a different object than you clicked on. + //Therefore, make a new stack internally that has the remainder. + // -Sayu - if(S.amount > S.max_amount) - var/obj/item/stack/material/temp = new S.type(src) - temp.amount = S.amount - S.max_amount - S.amount = S.max_amount + if(S.amount > S.max_amount) + var/obj/item/stack/material/temp = new S.type(src) + temp.amount = S.amount - S.max_amount + S.amount = S.max_amount - return ..(S,new_location) + return ..(S,new_location) // ----------------------------- // Sheet Snatcher (Cyborg) diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 9e98fe58ec..23fccf51ac 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -59,23 +59,25 @@ /obj/item/device/integrated_electronics/wirer, ) -/obj/item/weapon/storage/belt/utility/full/New() - ..() - new /obj/item/weapon/screwdriver(src) - new /obj/item/weapon/wrench(src) - new /obj/item/weapon/weldingtool(src) - new /obj/item/weapon/crowbar(src) - new /obj/item/weapon/wirecutters(src) - new /obj/item/stack/cable_coil(src,30,pick("red","yellow","orange")) +/obj/item/weapon/storage/belt/utility/full + starts_with = list( + /obj/item/weapon/screwdriver, + /obj/item/weapon/wrench, + /obj/item/weapon/weldingtool, + /obj/item/weapon/crowbar, + /obj/item/weapon/wirecutters, + /obj/item/stack/cable_coil/random_belt + ) -/obj/item/weapon/storage/belt/utility/atmostech/New() - ..() - new /obj/item/weapon/screwdriver(src) - new /obj/item/weapon/wrench(src) - new /obj/item/weapon/weldingtool(src) - new /obj/item/weapon/crowbar(src) - new /obj/item/weapon/wirecutters(src) - new /obj/item/device/t_scanner(src) +/obj/item/weapon/storage/belt/utility/atmostech + starts_with = list( + /obj/item/weapon/screwdriver, + /obj/item/weapon/wrench, + /obj/item/weapon/weldingtool, + /obj/item/weapon/crowbar, + /obj/item/weapon/wirecutters, + /obj/item/device/t_scanner + ) /obj/item/weapon/storage/belt/utility/chief name = "chief engineer's toolbelt" @@ -83,15 +85,16 @@ icon_state = "utilitybelt_ce" item_state = "utility_ce" -/obj/item/weapon/storage/belt/utility/chief/full/New() - ..() - new /obj/item/weapon/screwdriver/power(src) - new /obj/item/weapon/crowbar/power(src) - new /obj/item/weapon/weldingtool/experimental(src) - new /obj/item/device/multitool(src) - new /obj/item/stack/cable_coil(src,30,pick("red","yellow","orange")) - new /obj/item/weapon/extinguisher/mini(src) - new /obj/item/device/analyzer(src) +/obj/item/weapon/storage/belt/utility/chief/full + starts_with = list( + /obj/item/weapon/screwdriver/power, + /obj/item/weapon/crowbar/power, + /obj/item/weapon/weldingtool/experimental, + /obj/item/device/multitool, + /obj/item/stack/cable_coil/random_belt, + /obj/item/weapon/extinguisher/mini, + /obj/item/device/analyzer + ) /obj/item/weapon/storage/belt/medical name = "medical belt" @@ -216,14 +219,8 @@ /obj/item/device/soulstone ) -/obj/item/weapon/storage/belt/soulstone/full/New() - ..() - new /obj/item/device/soulstone(src) - new /obj/item/device/soulstone(src) - new /obj/item/device/soulstone(src) - new /obj/item/device/soulstone(src) - new /obj/item/device/soulstone(src) - new /obj/item/device/soulstone(src) +/obj/item/weapon/storage/belt/soulstone/full + starts_with = list(/obj/item/device/soulstone = 6) /obj/item/weapon/storage/belt/utility/alien name = "alien belt" @@ -232,15 +229,16 @@ icon_state = "belt" item_state = "security" -/obj/item/weapon/storage/belt/utility/alien/full/New() - ..() - new /obj/item/weapon/screwdriver/alien(src) - new /obj/item/weapon/wrench/alien(src) - new /obj/item/weapon/weldingtool/alien(src) - new /obj/item/weapon/crowbar/alien(src) - new /obj/item/weapon/wirecutters/alien(src) - new /obj/item/device/multitool/alien(src) - new /obj/item/stack/cable_coil/alien(src) +/obj/item/weapon/storage/belt/utility/alien/full + starts_with = list( + /obj/item/weapon/screwdriver/alien, + /obj/item/weapon/wrench/alien, + /obj/item/weapon/weldingtool/alien, + /obj/item/weapon/crowbar/alien, + /obj/item/weapon/wirecutters/alien, + /obj/item/device/multitool/alien, + /obj/item/stack/cable_coil/alien + ) /obj/item/weapon/storage/belt/medical/alien name = "alien belt" @@ -277,16 +275,17 @@ /obj/item/weapon/surgical ) -/obj/item/weapon/storage/belt/medical/alien/New() - ..() - new /obj/item/weapon/surgical/scalpel/alien(src) - new /obj/item/weapon/surgical/hemostat/alien(src) - new /obj/item/weapon/surgical/retractor/alien(src) - new /obj/item/weapon/surgical/circular_saw/alien(src) - new /obj/item/weapon/surgical/FixOVein/alien(src) - new /obj/item/weapon/surgical/bone_clamp/alien(src) - new /obj/item/weapon/surgical/cautery/alien(src) - new /obj/item/weapon/surgical/surgicaldrill/alien(src) +/obj/item/weapon/storage/belt/medical/alien + starts_with = list( + /obj/item/weapon/surgical/scalpel/alien, + /obj/item/weapon/surgical/hemostat/alien, + /obj/item/weapon/surgical/retractor/alien, + /obj/item/weapon/surgical/circular_saw/alien, + /obj/item/weapon/surgical/FixOVein/alien, + /obj/item/weapon/surgical/bone_clamp/alien, + /obj/item/weapon/surgical/cautery/alien, + /obj/item/weapon/surgical/surgicaldrill/alien + ) /obj/item/weapon/storage/belt/champion name = "championship belt" diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index 933970b335..783d8cd74a 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -14,12 +14,13 @@ icon_state ="bible" /obj/item/weapon/storage/bible/booze/New() - ..() - new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer(src) - new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer(src) - new /obj/item/weapon/spacecash/c100(src) - new /obj/item/weapon/spacecash/c100(src) - new /obj/item/weapon/spacecash/c100(src) + starts_with = list( + /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer, + /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer, + /obj/item/weapon/spacecash/c100, + /obj/item/weapon/spacecash/c100, + /obj/item/weapon/spacecash/c100 + ) /obj/item/weapon/storage/bible/afterattack(atom/A, mob/user as mob, proximity) if(!proximity) return diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 8e4fb5f6cf..5f3bbcc0c3 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -75,393 +75,250 @@ name = "box of latex gloves" desc = "Contains white gloves." icon_state = "latex" - -/obj/item/weapon/storage/box/gloves/New() - ..() - for(var/i = 1 to 7) - new /obj/item/clothing/gloves/sterile/latex(src) + starts_with = list(/obj/item/clothing/gloves/sterile/latex = 7) /obj/item/weapon/storage/box/masks name = "box of sterile masks" desc = "This box contains masks of sterility." icon_state = "sterile" - -/obj/item/weapon/storage/box/masks/New() - ..() - for(var/i = 1 to 7) - new /obj/item/clothing/mask/surgical(src) + starts_with = list(/obj/item/clothing/mask/surgical = 7) /obj/item/weapon/storage/box/syringes name = "box of syringes" desc = "A box full of syringes." icon_state = "syringe" - -/obj/item/weapon/storage/box/syringes/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/syringe(src) + starts_with = list(/obj/item/weapon/reagent_containers/syringe = 7) /obj/item/weapon/storage/box/syringegun name = "box of syringe gun cartridges" desc = "A box full of compressed gas cartridges." icon_state = "syringe" - -/obj/item/weapon/storage/box/syringegun/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/syringe_cartridge(src) + starts_with = list(/obj/item/weapon/syringe_cartridge = 7) /obj/item/weapon/storage/box/beakers name = "box of beakers" icon_state = "beaker" - -/obj/item/weapon/storage/box/beakers/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/glass/beaker(src) + starts_with = list(/obj/item/weapon/reagent_containers/glass/beaker = 7) /obj/item/weapon/storage/box/injectors name = "box of DNA injectors" desc = "This box contains injectors it seems." - -/obj/item/weapon/storage/box/injectors/New() - ..() - for(var/i = 1 to 3) - new /obj/item/weapon/dnainjector/h2m(src) - for(var/i = 1 to 3) - new /obj/item/weapon/dnainjector/m2h(src) + starts_with = list( + /obj/item/weapon/dnainjector/h2m = 3, + /obj/item/weapon/dnainjector/m2h = 3 + ) /obj/item/weapon/storage/box/blanks name = "box of blank shells" desc = "It has a picture of a gun and several warning symbols on the front." icon_state = "blankshot_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + starts_with = list(/obj/item/ammo_casing/a12g/blank = 8) -/obj/item/weapon/storage/box/blanks/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/blank(src) - -/obj/item/weapon/storage/box/blanks/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/blank(src) +/obj/item/weapon/storage/box/blanks/large + starts_with = list(/obj/item/ammo_casing/a12g/blank = 16) /obj/item/weapon/storage/box/beanbags name = "box of beanbag shells" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." icon_state = "beanshot_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") - -/obj/item/weapon/storage/box/beanbags/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/beanbag(src) + starts_with = list(/obj/item/ammo_casing/a12g/beanbag = 8) /obj/item/weapon/storage/box/beanbags/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/beanbag(src) + starts_with = list(/obj/item/ammo_casing/a12g/beanbag = 16) /obj/item/weapon/storage/box/shotgunammo name = "box of shotgun slugs" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." icon_state = "lethalshellshot_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + starts_with = list(/obj/item/ammo_casing/a12g = 8) -/obj/item/weapon/storage/box/shotgunammo/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g(src) - -/obj/item/weapon/storage/box/shotgunammo/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g(src) +/obj/item/weapon/storage/box/shotgunammo/large + starts_with = list(/obj/item/ammo_casing/a12g = 16) /obj/item/weapon/storage/box/shotgunshells name = "box of shotgun shells" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." icon_state = "lethalslug_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + starts_with = list(/obj/item/ammo_casing/a12g/pellet = 8) -/obj/item/weapon/storage/box/shotgunshells/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/pellet(src) - -/obj/item/weapon/storage/box/shotgunshells/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/pellet(src) +/obj/item/weapon/storage/box/shotgunshells/large + starts_with = list(/obj/item/ammo_casing/a12g/pellet = 16) /obj/item/weapon/storage/box/flashshells name = "box of illumination shells" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." icon_state = "illumshot_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + starts_with = list(/obj/item/ammo_casing/a12g/flash = 8) -/obj/item/weapon/storage/box/flashshells/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/flash(src) - -/obj/item/weapon/storage/box/flashshells/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/flash(src) +/obj/item/weapon/storage/box/flashshells/large + starts_with = list(/obj/item/ammo_casing/a12g/flash = 16) /obj/item/weapon/storage/box/stunshells name = "box of stun shells" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." icon_state = "stunshot_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + starts_with = list(/obj/item/ammo_casing/a12g/stunshell = 8) -/obj/item/weapon/storage/box/stunshells/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/stunshell(src) - -/obj/item/weapon/storage/box/stunshells/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/stunshell(src) +/obj/item/weapon/storage/box/stunshells/large + starts_with = list(/obj/item/ammo_casing/a12g/stunshell = 16) /obj/item/weapon/storage/box/practiceshells name = "box of practice shells" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." icon_state = "blankshot_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + starts_with = list(/obj/item/ammo_casing/a12g/practice = 8) -/obj/item/weapon/storage/box/practiceshells/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/practice(src) - -/obj/item/weapon/storage/box/practiceshells/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/practice(src) +/obj/item/weapon/storage/box/practiceshells/large + starts_with = list(/obj/item/ammo_casing/a12g/practice = 16) /obj/item/weapon/storage/box/empshells name = "box of emp shells" desc = "It has a picture of a gun and several warning symbols on the front." icon_state = "empshot_box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + starts_with = list(/obj/item/ammo_casing/a12g/emp = 8) -/obj/item/weapon/storage/box/empshells/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/emp(src) - -/obj/item/weapon/storage/box/empshells/large/New() - ..() - for(var/i = 1 to 8) - new /obj/item/ammo_casing/a12g/emp(src) +/obj/item/weapon/storage/box/empshells/large + starts_with = list(/obj/item/ammo_casing/a12g/emp = 16) /obj/item/weapon/storage/box/sniperammo name = "box of 14.5mm shells" desc = "It has a picture of a gun and several warning symbols on the front.
WARNING: Live ammunition. Misuse may result in serious injury or death." - -/obj/item/weapon/storage/box/sniperammo/New() - ..() - for(var/i = 1 to 7) - new /obj/item/ammo_casing/a145(src) + starts_with = list(/obj/item/ammo_casing/a145 = 7) /obj/item/weapon/storage/box/flashbangs name = "box of flashbangs (WARNING)" desc = "WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use." icon_state = "flashbang" - -/obj/item/weapon/storage/box/flashbangs/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/flashbang(src) + starts_with = list(/obj/item/weapon/grenade/flashbang = 7) /obj/item/weapon/storage/box/emps name = "box of emp grenades" desc = "A box containing 5 military grade EMP grenades.
WARNING: Do not use near unshielded electronics or biomechanical augmentations, death or permanent paralysis may occur." icon_state = "emp" - -/obj/item/weapon/storage/box/emps/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/empgrenade(src) + starts_with = list(/obj/item/weapon/grenade/empgrenade = 7) /obj/item/weapon/storage/box/empslite name = "box of low yield emp grenades" desc = "A box containing 5 low yield EMP grenades.
WARNING: Do not use near unshielded electronics or biomechanical augmentations, death or permanent paralysis may occur." icon_state = "emp" - -/obj/item/weapon/storage/box/empslite/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/empgrenade/low_yield(src) + starts_with = list(/obj/item/weapon/grenade/empgrenade/low_yield = 7) /obj/item/weapon/storage/box/smokes name = "box of smoke bombs" desc = "A box containing 7 smoke bombs." icon_state = "flashbang" - -/obj/item/weapon/storage/box/smokes/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/smokebomb(src) + starts_with = list(/obj/item/weapon/grenade/smokebomb = 7) /obj/item/weapon/storage/box/anti_photons name = "box of anti-photon grenades" desc = "A box containing 7 experimental photon disruption grenades." icon_state = "flashbang" - -/obj/item/weapon/storage/box/anti_photons/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/anti_photon(src) + starts_with = list(/obj/item/weapon/grenade/anti_photon = 7) /obj/item/weapon/storage/box/frags name = "box of fragmentation grenades (WARNING)" desc = "A box containing 7 military grade fragmentation grenades.
WARNING: These devices are extremely dangerous and can cause limb loss or death in repeated use." icon_state = "frag" - -/obj/item/weapon/storage/box/frags/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/explosive(src) + starts_with = list(/obj/item/weapon/grenade/explosive = 7) /obj/item/weapon/storage/box/frags_half_box name = "box of fragmentation grenades (WARNING)" desc = "A box containing 4 military grade fragmentation grenades.
WARNING: These devices are extremely dangerous and can cause limb loss or death in repeated use." icon_state = "frag" - -/obj/item/weapon/storage/box/frags_half_box/New() - ..() - for(var/i = 1 to 4) - new /obj/item/weapon/grenade/explosive(src) + starts_with = list(/obj/item/weapon/grenade/explosive = 4) /obj/item/weapon/storage/box/metalfoam name = "box of metal foam grenades." desc = "A box containing 7 metal foam grenades." icon_state = "flashbang" - -/obj/item/weapon/storage/box/metalfoam/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/chem_grenade/metalfoam(src) + starts_with = list(/obj/item/weapon/grenade/chem_grenade/metalfoam = 7) /obj/item/weapon/storage/box/teargas name = "box of teargas grenades" desc = "A box containing 7 teargas grenades." icon_state = "flashbang" - -/obj/item/weapon/storage/box/teargas/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/grenade/chem_grenade/teargas(src) + starts_with = list(/obj/item/weapon/grenade/chem_grenade/teargas = 7) /obj/item/weapon/storage/box/flare name = "box of flares" desc = "A box containing 4 flares." - -/obj/item/weapon/storage/box/flare/New() - ..() - for(var/i = 1 to 4) - new /obj/item/device/flashlight/flare(src) + starts_with = list(/obj/item/device/flashlight/flare = 4) /obj/item/weapon/storage/box/trackimp name = "boxed tracking implant kit" desc = "Box full of scum-bag tracking utensils." icon_state = "implant" - -/obj/item/weapon/storage/box/trackimp/New() - ..() - for(var/i = 1 to 4) - new /obj/item/weapon/implantcase/tracking(src) - new /obj/item/weapon/implanter(src) - new /obj/item/weapon/implantpad(src) - new /obj/item/weapon/locator(src) + starts_with = list( + /obj/item/weapon/implantcase/tracking = 4, + /obj/item/weapon/implanter, + /obj/item/weapon/implantpad, + /obj/item/weapon/locator + ) /obj/item/weapon/storage/box/chemimp name = "boxed chemical implant kit" desc = "Box of stuff used to implant chemicals." icon_state = "implant" - -/obj/item/weapon/storage/box/chemimp/New() - ..() - for(var/i = 1 to 5) - new /obj/item/weapon/implantcase/chem(src) - new /obj/item/weapon/implanter(src) - new /obj/item/weapon/implantpad(src) + starts_with = list( + /obj/item/weapon/implantcase/chem = 5, + /obj/item/weapon/implanter, + /obj/item/weapon/implantpad + ) /obj/item/weapon/storage/box/camerabug name = "mobile camera pod box" desc = "A box containing some mobile camera pods." icon_state = "pda" - -/obj/item/weapon/storage/box/camerabug/New() - ..() - for(var/i = 1 to 6) - new /obj/item/device/camerabug(src) - new /obj/item/device/bug_monitor(src) + starts_with = list( + /obj/item/device/camerabug = 6, + /obj/item/device/bug_monitor + ) /obj/item/weapon/storage/box/rxglasses name = "box of prescription glasses" desc = "This box contains nerd glasses." icon_state = "glasses" - -/obj/item/weapon/storage/box/rxglasses/New() - ..() - for(var/i = 1 to 7) - new /obj/item/clothing/glasses/regular(src) + starts_with = list(/obj/item/clothing/glasses/regular = 7) /obj/item/weapon/storage/box/cdeathalarm_kit name = "death alarm kit" desc = "Box of stuff used to implant death alarms." icon_state = "implant" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") - -/obj/item/weapon/storage/box/cdeathalarm_kit/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/implantcase/death_alarm(src) - new /obj/item/weapon/implanter(src) + starts_with = list( + /obj/item/weapon/implantcase/death_alarm = 7, + /obj/item/weapon/implanter + ) /obj/item/weapon/storage/box/condimentbottles name = "box of condiment bottles" desc = "It has a large ketchup smear on it." - -/obj/item/weapon/storage/box/condimentbottles/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/food/condiment(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/condiment = 7) /obj/item/weapon/storage/box/cups name = "box of paper cups" desc = "It has pictures of paper cups on the front." - -/obj/item/weapon/storage/box/cups/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/food/drinks/sillycup(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/drinks/sillycup = 7) /obj/item/weapon/storage/box/donkpockets name = "box of donk-pockets" desc = "Instructions: Heat in microwave. Product will cool if not eaten within seven minutes." icon_state = "donk_kit" - -/obj/item/weapon/storage/box/donkpockets/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/food/snacks/donkpocket(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/donkpocket = 7) /obj/item/weapon/storage/box/sinpockets name = "box of sin-pockets" desc = "Instructions: Crush bottom of package to initiate chemical heating. Wait for 20 seconds before consumption. Product will cool if not eaten within seven minutes." icon_state = "donk_kit" - -/obj/item/weapon/storage/box/sinpockets/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket = 7) /obj/item/weapon/storage/box/monkeycubes name = "monkey cube box" @@ -469,88 +326,51 @@ icon = 'icons/obj/food.dmi' icon_state = "monkeycubebox" can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube) - -/obj/item/weapon/storage/box/monkeycubes/New() - ..() - if(type == /obj/item/weapon/storage/box/monkeycubes) - for(var/i = 1 to 4) - new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped = 4) /obj/item/weapon/storage/box/monkeycubes/farwacubes name = "farwa cube box" desc = "Drymate brand farwa cubes, shipped from Meralar. Just add water!" - -/obj/item/weapon/storage/box/monkeycubes/farwacubes/New() - ..() - for(var/i = 1 to 4) - new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/farwacube(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/farwacube = 4) /obj/item/weapon/storage/box/monkeycubes/stokcubes name = "stok cube box" desc = "Drymate brand stok cubes, shipped from Moghes. Just add water!" - -/obj/item/weapon/storage/box/monkeycubes/stokcubes/New() - ..() - for(var/i = 1 to 4) - new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/stokcube(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/stokcube = 4) /obj/item/weapon/storage/box/monkeycubes/neaeracubes name = "neaera cube box" desc = "Drymate brand neaera cubes, shipped from Jargon 4. Just add water!" - -/obj/item/weapon/storage/box/monkeycubes/neaeracubes/New() - ..() - for(var/i = 1 to 4) - new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube(src) + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube = 4) /obj/item/weapon/storage/box/ids name = "box of spare IDs" desc = "Has so many empty IDs." icon_state = "id" - -/obj/item/weapon/storage/box/ids/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/card/id(src) + starts_with = list(/obj/item/weapon/card/id = 7) /obj/item/weapon/storage/box/seccarts name = "box of spare R.O.B.U.S.T. Cartridges" desc = "A box full of R.O.B.U.S.T. Cartridges, used by Security." icon_state = "pda" - -/obj/item/weapon/storage/box/seccarts/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/cartridge/security(src) + starts_with = list(/obj/item/weapon/cartridge/security = 7) /obj/item/weapon/storage/box/handcuffs name = "box of spare handcuffs" desc = "A box full of handcuffs." icon_state = "handcuff" - -/obj/item/weapon/storage/box/handcuffs/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/handcuffs(src) + starts_with = list(/obj/item/weapon/handcuffs = 7) /obj/item/weapon/storage/box/mousetraps name = "box of Pest-B-Gon mousetraps" desc = "WARNING: Keep out of reach of children." icon_state = "mousetraps" - -/obj/item/weapon/storage/box/mousetraps/New() - ..() - for(var/i = 1 to 7) - new /obj/item/device/assembly/mousetrap(src) + starts_with = list(/obj/item/device/assembly/mousetrap = 7) /obj/item/weapon/storage/box/pillbottles name = "box of pill bottles" desc = "It has pictures of pill bottles on its front." - -/obj/item/weapon/storage/box/pillbottles/New() - ..() - for(var/i = 1 to 7) - new /obj/item/weapon/storage/pill_bottle(src) + starts_with = list(/obj/item/weapon/storage/pill_bottle = 7) /obj/item/weapon/storage/box/snappops name = "snap pop box" @@ -558,11 +378,7 @@ icon = 'icons/obj/toy.dmi' icon_state = "spbox" can_hold = list(/obj/item/toy/snappop) - -/obj/item/weapon/storage/box/snappops/New() - ..() - for(var/i = 1 to 8) - new /obj/item/toy/snappop(src) + starts_with = list(/obj/item/toy/snappop = 8) /obj/item/weapon/storage/box/matches name = "matchbox" @@ -572,11 +388,7 @@ w_class = ITEMSIZE_TINY slot_flags = SLOT_BELT can_hold = list(/obj/item/weapon/flame/match) - -/obj/item/weapon/storage/box/matches/New() - ..() - for(var/i=1 to 10) - new /obj/item/weapon/flame/match(src) + starts_with = list(/obj/item/weapon/flame/match = 10) /obj/item/weapon/storage/box/matches/attackby(obj/item/weapon/flame/match/W as obj, mob/user as mob) if(istype(W) && !W.lit && !W.burnt) @@ -591,11 +403,7 @@ name = "box of injectors" desc = "Contains autoinjectors." icon_state = "syringe" - -/obj/item/weapon/storage/box/autoinjectors/New() - ..() - for (var/i = 1 to 7) - new /obj/item/weapon/reagent_containers/hypospray/autoinjector(src) + starts_with = list(/obj/item/weapon/reagent_containers/hypospray/autoinjector = 7) /obj/item/weapon/storage/box/lights name = "box of replacement bulbs" @@ -608,30 +416,21 @@ max_storage_space = ITEMSIZE_COST_SMALL * 24 //holds 24 items of w_class 2 use_to_pickup = 1 // for picking up broken bulbs, not that most people will try -/obj/item/weapon/storage/box/lights/bulbs/New() - ..() - for(var/i = 1 to 24) - new /obj/item/weapon/light/bulb(src) +/obj/item/weapon/storage/box/lights/bulbs + starts_with = list(/obj/item/weapon/light/bulb = 24) /obj/item/weapon/storage/box/lights/tubes name = "box of replacement tubes" icon_state = "lighttube" - -/obj/item/weapon/storage/box/lights/tubes/New() - ..() - for(var/i = 1 to 24) - new /obj/item/weapon/light/tube(src) + starts_with = list(/obj/item/weapon/light/tube = 24) /obj/item/weapon/storage/box/lights/mixed name = "box of replacement lights" icon_state = "lightmixed" - -/obj/item/weapon/storage/box/lights/mixed/New() - ..() - for(var/i = 1 to 16) - new /obj/item/weapon/light/tube(src) - for(var/i = 1 to 8) - new /obj/item/weapon/light/bulb(src) + starts_with = list( + /obj/item/weapon/light/tube = 16, + /obj/item/weapon/light/bulb = 8 + ) /obj/item/weapon/storage/box/freezer name = "portable freezer" @@ -664,17 +463,9 @@ /obj/item/weapon/storage/box/ambrosia name = "ambrosia seeds box" desc = "Contains the seeds you need to get a little high." - -/obj/item/weapon/storage/box/ambrosia/New() - ..() - for(var/i = 1 to 7) - new /obj/item/seeds/ambrosiavulgarisseed(src) + starts_with = list(/obj/item/seeds/ambrosiavulgarisseed = 7) /obj/item/weapon/storage/box/ambrosiadeus name = "ambrosia deus seeds box" desc = "Contains the seeds you need to get a proper healthy high." - -/obj/item/weapon/storage/box/ambrosiadeus/New() - ..() - for(var/i = 1 to 7) - new /obj/item/seeds/ambrosiadeusseed(src) + starts_with = list(/obj/item/seeds/ambrosiadeusseed = 7) diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 8cc10444ef..251e5483e1 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -52,12 +52,7 @@ /obj/item/weapon/reagent_containers/food/snacks/egg, /obj/item/weapon/reagent_containers/food/snacks/boiledegg ) - -/obj/item/weapon/storage/fancy/egg_box/New() - ..() - for(var/i=1 to storage_slots) - new /obj/item/weapon/reagent_containers/food/snacks/egg(src) - return + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/egg = 12) /* * Candle Box @@ -72,12 +67,7 @@ item_state = "candlebox5" throwforce = 2 slot_flags = SLOT_BELT - -/obj/item/weapon/storage/fancy/candle_box/New() - ..() - for(var/i=1 to 5) - new /obj/item/weapon/flame/candle(src) - return + starts_with = list(/obj/item/weapon/flame/candle = 5) /* * Crayon Box @@ -93,31 +83,36 @@ can_hold = list( /obj/item/weapon/pen/crayon ) + starts_with = list( + /obj/item/weapon/pen/crayon/red, + /obj/item/weapon/pen/crayon/orange, + /obj/item/weapon/pen/crayon/yellow, + /obj/item/weapon/pen/crayon/green, + /obj/item/weapon/pen/crayon/blue, + /obj/item/weapon/pen/crayon/purple + ) -/obj/item/weapon/storage/fancy/crayons/New() - ..() - new /obj/item/weapon/pen/crayon/red(src) - new /obj/item/weapon/pen/crayon/orange(src) - new /obj/item/weapon/pen/crayon/yellow(src) - new /obj/item/weapon/pen/crayon/green(src) - new /obj/item/weapon/pen/crayon/blue(src) - new /obj/item/weapon/pen/crayon/purple(src) +/obj/item/weapon/storage/fancy/crayons/initialize() + . = ..() update_icon() /obj/item/weapon/storage/fancy/crayons/update_icon() - overlays = list() //resets list - overlays += image('icons/obj/crayons.dmi',"crayonbox") + var/mutable_appearance/ma = new(src) + ma.plane = plane + ma.layer = layer + ma.overlays = list() for(var/obj/item/weapon/pen/crayon/crayon in contents) - overlays += image('icons/obj/crayons.dmi',crayon.colourName) + ma.overlays += image('icons/obj/crayons.dmi',crayon.colourName) + appearance = ma /obj/item/weapon/storage/fancy/crayons/attackby(obj/item/W as obj, mob/user as mob) if(istype(W,/obj/item/weapon/pen/crayon)) switch(W:colourName) if("mime") - usr << "This crayon is too sad to be contained in this box." + to_chat(usr,"This crayon is too sad to be contained in this box.") return if("rainbow") - usr << "This crayon is too powerful to be contained in this box." + to_chat(usr,"This crayon is too powerful to be contained in this box.") return ..() @@ -136,13 +131,12 @@ storage_slots = 6 can_hold = list(/obj/item/clothing/mask/smokable/cigarette, /obj/item/weapon/flame/lighter) icon_type = "cigarette" + starts_with = list(/obj/item/clothing/mask/smokable/cigarette = 6) var/brand = "\improper Trans-Stellar Duty-free" -/obj/item/weapon/storage/fancy/cigarettes/New() - ..() +/obj/item/weapon/storage/fancy/cigarettes/initialize() + . = ..() flags |= NOREACT - for(var/i = 1 to storage_slots) - new /obj/item/clothing/mask/smokable/cigarette(src) create_reagents(15 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one flags |= OPENCONTAINER if(brand) @@ -201,10 +195,6 @@ icon_state = "Bpacket" brand = "\improper Acme Co. cigarette" -// New() -// ..() -// fill_cigarre_package(src,list("fuel" = 15)) - // New exciting ways to kill your lungs! - Earthcrusher // /obj/item/weapon/storage/fancy/cigarettes/luckystars @@ -248,12 +238,11 @@ storage_slots = 7 can_hold = list(/obj/item/clothing/mask/smokable/cigarette/cigar) icon_type = "cigar" + starts_with = list(/obj/item/clothing/mask/smokable/cigarette/cigar = 7) -/obj/item/weapon/storage/fancy/cigar/New() - ..() +/obj/item/weapon/storage/fancy/cigar/initialize() + . = ..() flags |= NOREACT - for(var/i = 1 to storage_slots) - new /obj/item/clothing/mask/smokable/cigarette/cigar(src) create_reagents(15 * storage_slots) /obj/item/weapon/storage/fancy/cigar/update_icon() @@ -261,10 +250,10 @@ return /obj/item/weapon/storage/fancy/cigar/remove_from_storage(obj/item/W as obj, atom/new_location) - var/obj/item/clothing/mask/smokable/cigarette/cigar/C = W - if(!istype(C)) return - reagents.trans_to_obj(C, (reagents.total_volume/contents.len)) - ..() + var/obj/item/clothing/mask/smokable/cigarette/cigar/C = W + if(!istype(C)) return + reagents.trans_to_obj(C, (reagents.total_volume/contents.len)) + ..() /* * Vial Box @@ -277,12 +266,7 @@ name = "vial storage box" storage_slots = 6 can_hold = list(/obj/item/weapon/reagent_containers/glass/beaker/vial) - -/obj/item/weapon/storage/fancy/vials/New() - ..() - for(var/i=1 to 6) - new /obj/item/weapon/reagent_containers/glass/beaker/vial(src) - return + starts_with = list(/obj/item/weapon/reagent_containers/glass/beaker/vial = 6) /obj/item/weapon/storage/lockbox/vials name = "secure vial storage box" @@ -296,8 +280,8 @@ storage_slots = 6 req_access = list(access_virology) -/obj/item/weapon/storage/lockbox/vials/New() - ..() +/obj/item/weapon/storage/lockbox/vials/initialize() + . = ..() update_icon() /obj/item/weapon/storage/lockbox/vials/update_icon(var/itemremoved = 0) @@ -330,19 +314,19 @@ /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/white, /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/truffle ) + starts_with = list( + /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece, + /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece, + /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece, + /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/white, + /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/white, + /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/truffle + ) -/obj/item/weapon/storage/fancy/heartbox/New() - ..() - new /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece(src) - new /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece(src) - new /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece(src) - new /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/white(src) - new /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/white(src) - new /obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/truffle(src) +/obj/item/weapon/storage/fancy/heartbox/initialize() + . = ..() update_icon() - return /obj/item/weapon/storage/fancy/heartbox/update_icon(var/itemremoved = 0) if (contents.len == 0) icon_state = "heartbox_empty" - return \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index 43b7c9e22b..53e73a66e2 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -13,158 +13,147 @@ icon_state = "firstaid" throw_speed = 2 throw_range = 8 - var/empty = 0 max_storage_space = ITEMSIZE_COST_SMALL * 7 // 14 + var/list/icon_variety +/obj/item/weapon/storage/firstaid/initialize() + . = ..() + if(icon_variety) + icon_state = pick(icon_variety) + icon_variety = null /obj/item/weapon/storage/firstaid/fire name = "fire first aid kit" desc = "It's an emergency medical kit for when the toxins lab spontaneously burns down." icon_state = "ointment" item_state_slots = list(slot_r_hand_str = "firstaid-ointment", slot_l_hand_str = "firstaid-ointment") - - New() - ..() - if (empty) return - - icon_state = pick("ointment","firefirstaid") - - new /obj/item/device/healthanalyzer( src ) - new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src ) - new /obj/item/stack/medical/ointment( src ) - new /obj/item/stack/medical/ointment( src ) - new /obj/item/weapon/reagent_containers/pill/kelotane( src ) - new /obj/item/weapon/reagent_containers/pill/kelotane( src ) - new /obj/item/weapon/reagent_containers/pill/kelotane( src ) //Replaced ointment with these since they actually work --Errorage - return - + icon_variety = list("ointment","firefirstaid") + starts_with = list( + /obj/item/device/healthanalyzer, + /obj/item/weapon/reagent_containers/hypospray/autoinjector, + /obj/item/stack/medical/ointment, + /obj/item/stack/medical/ointment, + /obj/item/weapon/reagent_containers/pill/kelotane, + /obj/item/weapon/reagent_containers/pill/kelotane, + /obj/item/weapon/reagent_containers/pill/kelotane + ) /obj/item/weapon/storage/firstaid/regular icon_state = "firstaid" - - New() - ..() - if (empty) return - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/bruise_pack(src) - new /obj/item/stack/medical/ointment(src) - new /obj/item/stack/medical/ointment(src) - new /obj/item/device/healthanalyzer(src) - new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src ) - return + starts_with = list( + /obj/item/stack/medical/bruise_pack, + /obj/item/stack/medical/bruise_pack, + /obj/item/stack/medical/bruise_pack, + /obj/item/stack/medical/ointment, + /obj/item/stack/medical/ointment, + /obj/item/device/healthanalyzer, + /obj/item/weapon/reagent_containers/hypospray/autoinjector + ) /obj/item/weapon/storage/firstaid/toxin name = "poison first aid kit" //IRL the term used would be poison first aid kit. desc = "Used to treat when one has a high amount of toxins in their body." icon_state = "antitoxin" item_state_slots = list(slot_r_hand_str = "firstaid-toxin", slot_l_hand_str = "firstaid-toxin") - - New() - ..() - if (empty) return - - icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3") - - new /obj/item/weapon/reagent_containers/syringe/antitoxin( src ) - new /obj/item/weapon/reagent_containers/syringe/antitoxin( src ) - new /obj/item/weapon/reagent_containers/syringe/antitoxin( src ) - new /obj/item/weapon/reagent_containers/pill/antitox( src ) - new /obj/item/weapon/reagent_containers/pill/antitox( src ) - new /obj/item/weapon/reagent_containers/pill/antitox( src ) - new /obj/item/device/healthanalyzer( src ) - return + icon_variety = list("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3") + starts_with = list( + /obj/item/weapon/reagent_containers/syringe/antitoxin, + /obj/item/weapon/reagent_containers/syringe/antitoxin, + /obj/item/weapon/reagent_containers/syringe/antitoxin, + /obj/item/weapon/reagent_containers/pill/antitox, + /obj/item/weapon/reagent_containers/pill/antitox, + /obj/item/weapon/reagent_containers/pill/antitox, + /obj/item/device/healthanalyzer + ) /obj/item/weapon/storage/firstaid/o2 name = "oxygen deprivation first aid kit" desc = "A box full of oxygen goodies." icon_state = "o2" item_state_slots = list(slot_r_hand_str = "firstaid-o2", slot_l_hand_str = "firstaid-o2") - - New() - ..() - if (empty) return - new /obj/item/weapon/reagent_containers/pill/dexalin( src ) - new /obj/item/weapon/reagent_containers/pill/dexalin( src ) - new /obj/item/weapon/reagent_containers/pill/dexalin( src ) - new /obj/item/weapon/reagent_containers/pill/dexalin( src ) - new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src ) - new /obj/item/weapon/reagent_containers/syringe/inaprovaline( src ) - new /obj/item/device/healthanalyzer( src ) - return + starts_with = list( + /obj/item/weapon/reagent_containers/pill/dexalin, + /obj/item/weapon/reagent_containers/pill/dexalin, + /obj/item/weapon/reagent_containers/pill/dexalin, + /obj/item/weapon/reagent_containers/pill/dexalin, + /obj/item/weapon/reagent_containers/hypospray/autoinjector, + /obj/item/weapon/reagent_containers/syringe/inaprovaline, + /obj/item/device/healthanalyzer + ) /obj/item/weapon/storage/firstaid/adv name = "advanced first aid kit" desc = "Contains advanced medical treatments, for serious boo-boos." icon_state = "advfirstaid" item_state_slots = list(slot_r_hand_str = "firstaid-advanced", slot_l_hand_str = "firstaid-advanced") - -/obj/item/weapon/storage/firstaid/adv/New() - ..() - if (empty) return - new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src ) - new /obj/item/stack/medical/advanced/bruise_pack(src) - new /obj/item/stack/medical/advanced/bruise_pack(src) - new /obj/item/stack/medical/advanced/bruise_pack(src) - new /obj/item/stack/medical/advanced/ointment(src) - new /obj/item/stack/medical/advanced/ointment(src) - new /obj/item/stack/medical/splint(src) - return + starts_with = list( + /obj/item/weapon/reagent_containers/hypospray/autoinjector, + /obj/item/stack/medical/advanced/bruise_pack, + /obj/item/stack/medical/advanced/bruise_pack, + /obj/item/stack/medical/advanced/bruise_pack, + /obj/item/stack/medical/advanced/ointment, + /obj/item/stack/medical/advanced/ointment, + /obj/item/stack/medical/splint + ) /obj/item/weapon/storage/firstaid/combat name = "combat medical kit" desc = "Contains advanced medical treatments." icon_state = "bezerk" item_state_slots = list(slot_r_hand_str = "firstaid-advanced", slot_l_hand_str = "firstaid-advanced") - -/obj/item/weapon/storage/firstaid/combat/New() - ..() - if (empty) return - new /obj/item/weapon/storage/pill_bottle/bicaridine(src) - new /obj/item/weapon/storage/pill_bottle/dermaline(src) - new /obj/item/weapon/storage/pill_bottle/dexalin_plus(src) - new /obj/item/weapon/storage/pill_bottle/dylovene(src) - new /obj/item/weapon/storage/pill_bottle/tramadol(src) - new /obj/item/weapon/storage/pill_bottle/spaceacillin(src) - new /obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/clotting(src) - new /obj/item/stack/medical/splint(src) - new /obj/item/device/healthanalyzer/advanced(src) - return + starts_with = list( + /obj/item/weapon/storage/pill_bottle/bicaridine, + /obj/item/weapon/storage/pill_bottle/dermaline, + /obj/item/weapon/storage/pill_bottle/dexalin_plus, + /obj/item/weapon/storage/pill_bottle/dylovene, + /obj/item/weapon/storage/pill_bottle/tramadol, + /obj/item/weapon/storage/pill_bottle/spaceacillin, + /obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/clotting, + /obj/item/stack/medical/splint, + /obj/item/device/healthanalyzer/advanced + ) /obj/item/weapon/storage/firstaid/surgery name = "surgery kit" - desc = "Contains tools for surgery." - max_storage_space = ITEMSIZE_COST_NORMAL * 6 // Formally 21. Odd numbers should be avoided for a system based on exponents of 2. + desc = "Contains tools for surgery. Has precise foam fitting for safe transport and automatically sterilizes the content between uses." + icon_state = "surgerykit" + item_state = "firstaid-surgery" max_w_class = ITEMSIZE_NORMAL -/obj/item/weapon/storage/firstaid/surgery/New() - ..() - if (empty) return - new /obj/item/weapon/surgical/bonesetter(src) - new /obj/item/weapon/surgical/cautery(src) - new /obj/item/weapon/surgical/circular_saw(src) - new /obj/item/weapon/surgical/hemostat(src) - new /obj/item/weapon/surgical/retractor(src) - new /obj/item/weapon/surgical/scalpel(src) - new /obj/item/weapon/surgical/surgicaldrill(src) - new /obj/item/weapon/surgical/bonegel(src) - new /obj/item/weapon/surgical/FixOVein(src) - new /obj/item/stack/medical/advanced/bruise_pack(src) - new /obj/item/device/healthanalyzer/enhanced(src) - return + can_hold = list( + /obj/item/weapon/surgical/bonesetter, + /obj/item/weapon/surgical/cautery, + /obj/item/weapon/surgical/circular_saw, + /obj/item/weapon/surgical/hemostat, + /obj/item/weapon/surgical/retractor, + /obj/item/weapon/surgical/scalpel, + /obj/item/weapon/surgical/surgicaldrill, + /obj/item/weapon/surgical/bonegel, + /obj/item/weapon/surgical/FixOVein, + /obj/item/stack/medical/advanced/bruise_pack, + /obj/item/stack/nanopaste, + /obj/item/device/healthanalyzer/advanced + ) + + starts_with = list( + /obj/item/weapon/surgical/bonesetter, + /obj/item/weapon/surgical/cautery, + /obj/item/weapon/surgical/circular_saw, + /obj/item/weapon/surgical/hemostat, + /obj/item/weapon/surgical/retractor, + /obj/item/weapon/surgical/scalpel, + /obj/item/weapon/surgical/surgicaldrill, + /obj/item/weapon/surgical/bonegel, + /obj/item/weapon/surgical/FixOVein, + /obj/item/stack/medical/advanced/bruise_pack, + /obj/item/device/healthanalyzer/advanced + ) /obj/item/weapon/storage/firstaid/clotting name = "clotting kit" desc = "Contains chemicals to stop bleeding." max_storage_space = ITEMSIZE_COST_SMALL * 7 - -/obj/item/weapon/storage/firstaid/clotting/New() - ..() - if (empty) - return - for(var/i = 1 to 8) - new /obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/clotting(src) - return + starts_with = list(/obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/clotting = 8) /* * Pill Bottles @@ -187,167 +176,59 @@ /obj/item/weapon/storage/pill_bottle/antitox name = "bottle of Dylovene pills" desc = "Contains pills used to counter toxins." - -/obj/item/weapon/storage/pill_bottle/antitox/New() //25u each - ..() - new /obj/item/weapon/reagent_containers/pill/antitox(src) - new /obj/item/weapon/reagent_containers/pill/antitox(src) - new /obj/item/weapon/reagent_containers/pill/antitox(src) - new /obj/item/weapon/reagent_containers/pill/antitox(src) - new /obj/item/weapon/reagent_containers/pill/antitox(src) - new /obj/item/weapon/reagent_containers/pill/antitox(src) - new /obj/item/weapon/reagent_containers/pill/antitox(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/antitox = 7) /obj/item/weapon/storage/pill_bottle/bicaridine name = "bottle of Bicaridine pills" desc = "Contains pills used to stabilize the severely injured." - -/obj/item/weapon/storage/pill_bottle/bicaridine/New() - ..() - new /obj/item/weapon/reagent_containers/pill/bicaridine(src) - new /obj/item/weapon/reagent_containers/pill/bicaridine(src) - new /obj/item/weapon/reagent_containers/pill/bicaridine(src) - new /obj/item/weapon/reagent_containers/pill/bicaridine(src) - new /obj/item/weapon/reagent_containers/pill/bicaridine(src) - new /obj/item/weapon/reagent_containers/pill/bicaridine(src) - new /obj/item/weapon/reagent_containers/pill/bicaridine(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/bicaridine = 7) /obj/item/weapon/storage/pill_bottle/dexalin_plus name = "bottle of Dexalin Plus pills" desc = "Contains pills used to treat extreme cases of oxygen deprivation." - -/obj/item/weapon/storage/pill_bottle/dexalin_plus/New() - ..() - new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src) - new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src) - new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src) - new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src) - new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src) - new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src) - new /obj/item/weapon/reagent_containers/pill/dexalin_plus(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/dexalin_plus = 7) /obj/item/weapon/storage/pill_bottle/dermaline name = "bottle of Dermaline pills" desc = "Contains pills used to treat burn wounds." - -/obj/item/weapon/storage/pill_bottle/dermaline/New() - ..() - new /obj/item/weapon/reagent_containers/pill/dermaline(src) - new /obj/item/weapon/reagent_containers/pill/dermaline(src) - new /obj/item/weapon/reagent_containers/pill/dermaline(src) - new /obj/item/weapon/reagent_containers/pill/dermaline(src) - new /obj/item/weapon/reagent_containers/pill/dermaline(src) - new /obj/item/weapon/reagent_containers/pill/dermaline(src) - new /obj/item/weapon/reagent_containers/pill/dermaline(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/dermaline = 7) /obj/item/weapon/storage/pill_bottle/dylovene name = "bottle of Dylovene pills" desc = "Contains pills used to treat toxic substances in the blood." - -/obj/item/weapon/storage/pill_bottle/dylovene/New() //15u each - ..() - new /obj/item/weapon/reagent_containers/pill/dylovene(src) - new /obj/item/weapon/reagent_containers/pill/dylovene(src) - new /obj/item/weapon/reagent_containers/pill/dylovene(src) - new /obj/item/weapon/reagent_containers/pill/dylovene(src) - new /obj/item/weapon/reagent_containers/pill/dylovene(src) - new /obj/item/weapon/reagent_containers/pill/dylovene(src) - new /obj/item/weapon/reagent_containers/pill/dylovene(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/dylovene = 7) /obj/item/weapon/storage/pill_bottle/inaprovaline name = "bottle of Inaprovaline pills" desc = "Contains pills used to stabilize patients." - -/obj/item/weapon/storage/pill_bottle/inaprovaline/New() - ..() - new /obj/item/weapon/reagent_containers/pill/inaprovaline(src) - new /obj/item/weapon/reagent_containers/pill/inaprovaline(src) - new /obj/item/weapon/reagent_containers/pill/inaprovaline(src) - new /obj/item/weapon/reagent_containers/pill/inaprovaline(src) - new /obj/item/weapon/reagent_containers/pill/inaprovaline(src) - new /obj/item/weapon/reagent_containers/pill/inaprovaline(src) - new /obj/item/weapon/reagent_containers/pill/inaprovaline(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/inaprovaline = 7) /obj/item/weapon/storage/pill_bottle/kelotane name = "bottle of kelotane pills" desc = "Contains pills used to treat burns." - -/obj/item/weapon/storage/pill_bottle/kelotane/New() - ..() - new /obj/item/weapon/reagent_containers/pill/kelotane(src) - new /obj/item/weapon/reagent_containers/pill/kelotane(src) - new /obj/item/weapon/reagent_containers/pill/kelotane(src) - new /obj/item/weapon/reagent_containers/pill/kelotane(src) - new /obj/item/weapon/reagent_containers/pill/kelotane(src) - new /obj/item/weapon/reagent_containers/pill/kelotane(src) - new /obj/item/weapon/reagent_containers/pill/kelotane(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/kelotane = 7) /obj/item/weapon/storage/pill_bottle/spaceacillin name = "bottle of Spaceacillin pills" desc = "A theta-lactam antibiotic. Effective against many diseases likely to be encountered in space." - -/obj/item/weapon/storage/pill_bottle/spaceacillin/New() - ..() - new /obj/item/weapon/reagent_containers/pill/spaceacillin(src) - new /obj/item/weapon/reagent_containers/pill/spaceacillin(src) - new /obj/item/weapon/reagent_containers/pill/spaceacillin(src) - new /obj/item/weapon/reagent_containers/pill/spaceacillin(src) - new /obj/item/weapon/reagent_containers/pill/spaceacillin(src) - new /obj/item/weapon/reagent_containers/pill/spaceacillin(src) - new /obj/item/weapon/reagent_containers/pill/spaceacillin(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/spaceacillin = 7) /obj/item/weapon/storage/pill_bottle/tramadol name = "bottle of Tramadol pills" desc = "Contains pills used to relieve pain." - -/obj/item/weapon/storage/pill_bottle/tramadol/New() - ..() - new /obj/item/weapon/reagent_containers/pill/tramadol(src) - new /obj/item/weapon/reagent_containers/pill/tramadol(src) - new /obj/item/weapon/reagent_containers/pill/tramadol(src) - new /obj/item/weapon/reagent_containers/pill/tramadol(src) - new /obj/item/weapon/reagent_containers/pill/tramadol(src) - new /obj/item/weapon/reagent_containers/pill/tramadol(src) - new /obj/item/weapon/reagent_containers/pill/tramadol(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/tramadol = 7) /obj/item/weapon/storage/pill_bottle/citalopram name = "bottle of Citalopram pills" desc = "Contains pills used to stabilize a patient's mood." - -/obj/item/weapon/storage/pill_bottle/citalopram/New() - ..() - new /obj/item/weapon/reagent_containers/pill/citalopram(src) - new /obj/item/weapon/reagent_containers/pill/citalopram(src) - new /obj/item/weapon/reagent_containers/pill/citalopram(src) - new /obj/item/weapon/reagent_containers/pill/citalopram(src) - new /obj/item/weapon/reagent_containers/pill/citalopram(src) - new /obj/item/weapon/reagent_containers/pill/citalopram(src) - new /obj/item/weapon/reagent_containers/pill/citalopram(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/citalopram = 7) /obj/item/weapon/storage/pill_bottle/carbon name = "bottle of Carbon pills" desc = "Contains pills used to neutralise chemicals in the stomach." - -/obj/item/weapon/storage/pill_bottle/carbon/New() - ..() - new /obj/item/weapon/reagent_containers/pill/carbon(src) - new /obj/item/weapon/reagent_containers/pill/carbon(src) - new /obj/item/weapon/reagent_containers/pill/carbon(src) - new /obj/item/weapon/reagent_containers/pill/carbon(src) - new /obj/item/weapon/reagent_containers/pill/carbon(src) - new /obj/item/weapon/reagent_containers/pill/carbon(src) - new /obj/item/weapon/reagent_containers/pill/carbon(src) + starts_with = list(/obj/item/weapon/reagent_containers/pill/carbon = 7) /obj/item/weapon/storage/pill_bottle/iron name = "bottle of Iron pills" desc = "Contains pills used to aid in blood regeneration." - -/obj/item/weapon/storage/pill_bottle/iron/New() - ..() - new /obj/item/weapon/reagent_containers/pill/iron(src) - new /obj/item/weapon/reagent_containers/pill/iron(src) - new /obj/item/weapon/reagent_containers/pill/iron(src) - new /obj/item/weapon/reagent_containers/pill/iron(src) - new /obj/item/weapon/reagent_containers/pill/iron(src) - new /obj/item/weapon/reagent_containers/pill/iron(src) - new /obj/item/weapon/reagent_containers/pill/iron(src) \ No newline at end of file + starts_with = list(/obj/item/weapon/reagent_containers/pill/iron = 7) diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm index e52ad4d812..e9527b2313 100644 --- a/code/game/objects/items/weapons/storage/lockbox.dm +++ b/code/game/objects/items/weapons/storage/lockbox.dm @@ -77,36 +77,28 @@ /obj/item/weapon/storage/lockbox/loyalty name = "lockbox of loyalty implants" req_access = list(access_security) - - New() - ..() - new /obj/item/weapon/implantcase/loyalty(src) - new /obj/item/weapon/implantcase/loyalty(src) - new /obj/item/weapon/implantcase/loyalty(src) - new /obj/item/weapon/implanter/loyalty(src) - + starts_with = list( + /obj/item/weapon/implantcase/loyalty = 3, + /obj/item/weapon/implanter/loyalty + ) /obj/item/weapon/storage/lockbox/clusterbang name = "lockbox of clusterbangs" desc = "You have a bad feeling about opening this." req_access = list(access_security) - - New() - ..() - new /obj/item/weapon/grenade/flashbang/clusterbang(src) + starts_with = list(/obj/item/weapon/grenade/flashbang/clusterbang) /obj/item/weapon/storage/lockbox/medal name = "lockbox of medals" desc = "A lockbox filled with commemorative medals, it has the NanoTrasen logo stamped on it." req_access = list(access_heads) storage_slots = 7 - - New() - ..() - new /obj/item/clothing/accessory/medal/conduct(src) - new /obj/item/clothing/accessory/medal/bronze_heart(src) - new /obj/item/clothing/accessory/medal/nobel_science(src) - new /obj/item/clothing/accessory/medal/silver/valor(src) - new /obj/item/clothing/accessory/medal/silver/security(src) - new /obj/item/clothing/accessory/medal/gold/captain(src) - new /obj/item/clothing/accessory/medal/gold/heroism(src) \ No newline at end of file + starts_with = list( + /obj/item/clothing/accessory/medal/conduct, + /obj/item/clothing/accessory/medal/bronze_heart, + /obj/item/clothing/accessory/medal/nobel_science, + /obj/item/clothing/accessory/medal/silver/valor, + /obj/item/clothing/accessory/medal/silver/security, + /obj/item/clothing/accessory/medal/gold/captain, + /obj/item/clothing/accessory/medal/gold/heroism + ) diff --git a/code/game/objects/items/weapons/storage/misc.dm b/code/game/objects/items/weapons/storage/misc.dm index 64952046a5..d103fbc6ef 100644 --- a/code/game/objects/items/weapons/storage/misc.dm +++ b/code/game/objects/items/weapons/storage/misc.dm @@ -6,17 +6,14 @@ icon = 'icons/obj/food.dmi' icon_state = "donutbox" name = "donut box" - var/startswith = 6 max_storage_space = ITEMSIZE_COST_SMALL * 6 can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut) foldable = /obj/item/stack/material/cardboard + starts_with = list(/obj/item/weapon/reagent_containers/food/snacks/donut/normal = 6) -/obj/item/weapon/storage/box/donut/New() - ..() - for(var/i=1 to startswith) - new /obj/item/weapon/reagent_containers/food/snacks/donut/normal(src) +/obj/item/weapon/storage/box/donut/initialize() + . = ..() update_icon() - return /obj/item/weapon/storage/box/donut/update_icon() overlays.Cut() @@ -26,4 +23,4 @@ i++ /obj/item/weapon/storage/box/donut/empty - startswith = 0 + empty = TRUE diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 4d9be129f7..78a2d940ad 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -184,15 +184,10 @@ anchored = 1.0 density = 0 cant_hold = list(/obj/item/weapon/storage/secure/briefcase) + starts_with = list( + /obj/item/weapon/paper, + /obj/item/weapon/pen + ) - New() - ..() - new /obj/item/weapon/paper(src) - new /obj/item/weapon/pen(src) - - attack_hand(mob/user as mob) - return attack_self(user) - -/obj/item/weapon/storage/secure/safe/HoS/New() - ..() - //new /obj/item/weapon/storage/lockbox/clusterbang(src) This item is currently broken... and probably shouldnt exist to begin with (even though it's cool) +/obj/item/weapon/storage/secure/safe/attack_hand(mob/user as mob) + return attack_self(user) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 6309a0a3f3..2dd5116546 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -36,6 +36,7 @@ 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 + var/empty //Mapper override to spawn an empty version of a container that usually has stuff /obj/item/weapon/storage/Destroy() close_all() @@ -576,12 +577,13 @@ src.closer.hud_layerise() orient2hud() - if(LAZYLEN(starts_with)) + if(LAZYLEN(starts_with) && !empty) for(var/newtype in starts_with) var/count = starts_with[newtype] || 1 //Could have left it blank. while(count) count-- new newtype(src) + starts_with = null //Reduce list count. calibrate_size() diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index 21bebfa399..c4174eb4c0 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -19,48 +19,50 @@ name = "emergency toolbox" icon_state = "red" item_state_slots = list(slot_r_hand_str = "toolbox_red", slot_l_hand_str = "toolbox_red") - -/obj/item/weapon/storage/toolbox/emergency/New() - ..() - new /obj/item/weapon/crowbar/red(src) - new /obj/item/weapon/extinguisher/mini(src) + starts_with = list( + /obj/item/weapon/crowbar/red, + /obj/item/weapon/extinguisher/mini, + /obj/item/device/radio + ) +/obj/item/weapon/storage/toolbox/emergency/initialize() if(prob(50)) new /obj/item/device/flashlight(src) else new /obj/item/device/flashlight/flare(src) - new /obj/item/device/radio(src) + . = ..() /obj/item/weapon/storage/toolbox/mechanical name = "mechanical toolbox" icon_state = "blue" item_state_slots = list(slot_r_hand_str = "toolbox_blue", slot_l_hand_str = "toolbox_blue") - -/obj/item/weapon/storage/toolbox/mechanical/New() - ..() - new /obj/item/weapon/screwdriver(src) - new /obj/item/weapon/wrench(src) - new /obj/item/weapon/weldingtool(src) - new /obj/item/weapon/crowbar(src) - new /obj/item/device/analyzer(src) - new /obj/item/weapon/wirecutters(src) + starts_with = list( + /obj/item/weapon/screwdriver, + /obj/item/weapon/wrench, + /obj/item/weapon/weldingtool, + /obj/item/weapon/crowbar, + /obj/item/device/analyzer, + /obj/item/weapon/wirecutters + ) /obj/item/weapon/storage/toolbox/electrical name = "electrical toolbox" icon_state = "yellow" item_state_slots = list(slot_r_hand_str = "toolbox_yellow", slot_l_hand_str = "toolbox_yellow") - -/obj/item/weapon/storage/toolbox/electrical/New() - ..() - new /obj/item/weapon/screwdriver(src) - new /obj/item/weapon/wirecutters(src) - new /obj/item/device/t_scanner(src) - new /obj/item/weapon/crowbar(src) - new /obj/item/stack/cable_coil/random(src,30) - new /obj/item/stack/cable_coil/random(src,30) + starts_with = list( + /obj/item/weapon/screwdriver, + /obj/item/weapon/wirecutters, + /obj/item/device/t_scanner, + /obj/item/weapon/crowbar, + /obj/item/stack/cable_coil/random_belt, + /obj/item/stack/cable_coil/random_belt + ) +/obj/item/weapon/storage/toolbox/electrical/initialize() + . = ..() if(prob(5)) new /obj/item/clothing/gloves/yellow(src) else new /obj/item/stack/cable_coil/random(src,30) + calibrate_size() /obj/item/weapon/storage/toolbox/syndicate name = "black and red toolbox" @@ -68,29 +70,26 @@ item_state_slots = list(slot_r_hand_str = "toolbox_syndi", slot_l_hand_str = "toolbox_syndi") origin_tech = list(TECH_COMBAT = 1, TECH_ILLEGAL = 1) force = 14 - var/powertools = FALSE + starts_with = list( + /obj/item/clothing/gloves/yellow, + /obj/item/weapon/screwdriver, + /obj/item/weapon/wrench, + /obj/item/weapon/weldingtool, + /obj/item/weapon/crowbar, + /obj/item/weapon/wirecutters, + /obj/item/device/multitool + ) /obj/item/weapon/storage/toolbox/syndicate/powertools - powertools = TRUE - -/obj/item/weapon/storage/toolbox/syndicate/New() // This is found in maint, so it should have the basics, plus some gloves. - ..() //all storage items need this to work properly! - if(powertools) - new /obj/item/clothing/gloves/yellow(src) - new /obj/item/weapon/screwdriver/power(src) - new /obj/item/weapon/weldingtool/experimental(src) - new /obj/item/weapon/crowbar/power(src) - new /obj/item/device/multitool(src) - new /obj/item/stack/cable_coil/random(src,30) - new /obj/item/device/analyzer(src) - else - new /obj/item/clothing/gloves/yellow(src) - new /obj/item/weapon/screwdriver(src) - new /obj/item/weapon/wrench(src) - new /obj/item/weapon/weldingtool(src) - new /obj/item/weapon/crowbar(src) - new /obj/item/weapon/wirecutters(src) - new /obj/item/device/multitool(src) + starts_with = list( + /obj/item/clothing/gloves/yellow, + /obj/item/weapon/screwdriver/power, + /obj/item/weapon/weldingtool/experimental, + /obj/item/weapon/crowbar/power, + /obj/item/device/multitool, + /obj/item/stack/cable_coil/random_belt, + /obj/item/device/analyzer + ) /obj/item/weapon/storage/toolbox/lunchbox max_storage_space = ITEMSIZE_COST_SMALL * 4 //slightly smaller than a toolbox @@ -103,8 +102,7 @@ var/filled = FALSE attack_verb = list("lunched") -/obj/item/weapon/storage/toolbox/lunchbox/New() - ..() +/obj/item/weapon/storage/toolbox/lunchbox/initialize() if(filled) var/list/lunches = lunchables_lunches() var/lunch = lunches[pick(lunches)] @@ -117,6 +115,7 @@ var/list/drinks = lunchables_drinks() var/drink = drinks[pick(drinks)] new drink(src) + . = ..() /obj/item/weapon/storage/toolbox/lunchbox/filled filled = TRUE diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index f82feb91dd..5c0f837340 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -1,76 +1,66 @@ -/obj/item/weapon/storage/box/syndicate/ - New() - ..() - switch (pickweight(list("bloodyspai" = 1, "stealth" = 1, "screwed" = 1, "guns" = 1, "murder" = 1, "freedom" = 1, "hacker" = 1, "lordsingulo" = 1, "smoothoperator" = 1))) - if("bloodyspai") - new /obj/item/clothing/under/chameleon(src) - new /obj/item/clothing/mask/gas/voice(src) - new /obj/item/weapon/card/id/syndicate(src) - new /obj/item/clothing/shoes/syndigaloshes(src) - return +/obj/item/weapon/storage/box/syndicate/initialize() + switch (pickweight(list("bloodyspai" = 1, "stealth" = 1, "screwed" = 1, "guns" = 1, "murder" = 1, "freedom" = 1, "hacker" = 1, "lordsingulo" = 1, "smoothoperator" = 1))) + if("bloodyspai") + new /obj/item/clothing/under/chameleon(src) + new /obj/item/clothing/mask/gas/voice(src) + new /obj/item/weapon/card/id/syndicate(src) + new /obj/item/clothing/shoes/syndigaloshes(src) - if("stealth") - new /obj/item/weapon/gun/energy/crossbow(src) - new /obj/item/weapon/pen/reagent/paralysis(src) - new /obj/item/device/chameleon(src) - return + if("stealth") + new /obj/item/weapon/gun/energy/crossbow(src) + new /obj/item/weapon/pen/reagent/paralysis(src) + new /obj/item/device/chameleon(src) - if("screwed") - new /obj/effect/spawner/newbomb/timer/syndicate(src) - new /obj/effect/spawner/newbomb/timer/syndicate(src) - new /obj/item/device/powersink(src) - new /obj/item/clothing/suit/space/syndicate(src) - new /obj/item/clothing/head/helmet/space/syndicate(src) - new /obj/item/clothing/mask/gas/syndicate(src) - new /obj/item/weapon/tank/emergency/oxygen/double(src) - return + if("screwed") + new /obj/effect/spawner/newbomb/timer/syndicate(src) + new /obj/effect/spawner/newbomb/timer/syndicate(src) + new /obj/item/device/powersink(src) + new /obj/item/clothing/suit/space/syndicate(src) + new /obj/item/clothing/head/helmet/space/syndicate(src) + new /obj/item/clothing/mask/gas/syndicate(src) + new /obj/item/weapon/tank/emergency/oxygen/double(src) - if("guns") - new /obj/item/weapon/gun/projectile/revolver(src) - new /obj/item/ammo_magazine/s357(src) - new /obj/item/weapon/card/emag(src) - new /obj/item/weapon/plastique(src) - new /obj/item/weapon/plastique(src) - return + if("guns") + new /obj/item/weapon/gun/projectile/revolver(src) + new /obj/item/ammo_magazine/s357(src) + new /obj/item/weapon/card/emag(src) + new /obj/item/weapon/plastique(src) + new /obj/item/weapon/plastique(src) - if("murder") - new /obj/item/weapon/melee/energy/sword(src) - new /obj/item/clothing/glasses/thermal/syndi(src) - new /obj/item/weapon/card/emag(src) - new /obj/item/clothing/shoes/syndigaloshes(src) - return + if("murder") + new /obj/item/weapon/melee/energy/sword(src) + new /obj/item/clothing/glasses/thermal/syndi(src) + new /obj/item/weapon/card/emag(src) + new /obj/item/clothing/shoes/syndigaloshes(src) - if("freedom") - var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src) - O.imp = new /obj/item/weapon/implant/freedom(O) - var/obj/item/weapon/implanter/U = new /obj/item/weapon/implanter(src) - U.imp = new /obj/item/weapon/implant/uplink(U) - return + if("freedom") + var/obj/item/weapon/implanter/O = new /obj/item/weapon/implanter(src) + O.imp = new /obj/item/weapon/implant/freedom(O) + var/obj/item/weapon/implanter/U = new /obj/item/weapon/implanter(src) + U.imp = new /obj/item/weapon/implant/uplink(U) - if("hacker") - new /obj/item/device/encryptionkey/syndicate(src) - new /obj/item/weapon/aiModule/syndicate(src) - new /obj/item/weapon/card/emag(src) - new /obj/item/device/encryptionkey/binary(src) - return + if("hacker") + new /obj/item/device/encryptionkey/syndicate(src) + new /obj/item/weapon/aiModule/syndicate(src) + new /obj/item/weapon/card/emag(src) + new /obj/item/device/encryptionkey/binary(src) - if("lordsingulo") - new /obj/item/device/radio/beacon/syndicate(src) - new /obj/item/clothing/suit/space/syndicate(src) - new /obj/item/clothing/head/helmet/space/syndicate(src) - new /obj/item/clothing/mask/gas/syndicate(src) - new /obj/item/weapon/tank/emergency/oxygen/double(src) - new /obj/item/weapon/card/emag(src) - return + if("lordsingulo") + new /obj/item/device/radio/beacon/syndicate(src) + new /obj/item/clothing/suit/space/syndicate(src) + new /obj/item/clothing/head/helmet/space/syndicate(src) + new /obj/item/clothing/mask/gas/syndicate(src) + new /obj/item/weapon/tank/emergency/oxygen/double(src) + new /obj/item/weapon/card/emag(src) - if("smoothoperator") - new /obj/item/weapon/storage/box/syndie_kit/g9mm(src) - new /obj/item/weapon/storage/bag/trash(src) - new /obj/item/weapon/soap/syndie(src) - new /obj/item/bodybag(src) - new /obj/item/clothing/under/suit_jacket(src) - new /obj/item/clothing/shoes/laceup(src) - return + if("smoothoperator") + new /obj/item/weapon/storage/box/syndie_kit/g9mm(src) + new /obj/item/weapon/storage/bag/trash(src) + new /obj/item/weapon/soap/syndie(src) + new /obj/item/bodybag(src) + new /obj/item/clothing/under/suit_jacket(src) + new /obj/item/clothing/shoes/laceup(src) + . = ..() /obj/item/weapon/storage/box/syndie_kit name = "box" @@ -80,118 +70,97 @@ /obj/item/weapon/storage/box/syndie_kit/imp_freedom name = "boxed freedom implant (with injector)" -/obj/item/weapon/storage/box/syndie_kit/imp_freedom/New() - ..() +/obj/item/weapon/storage/box/syndie_kit/imp_freedom/initialize() var/obj/item/weapon/implanter/O = new(src) O.imp = new /obj/item/weapon/implant/freedom(O) O.update() - return + . = ..() /obj/item/weapon/storage/box/syndie_kit/imp_compress name = "box (C)" - -/obj/item/weapon/storage/box/syndie_kit/imp_compress/New() - new /obj/item/weapon/implanter/compressed(src) - ..() - return + starts_with = list(/obj/item/weapon/implanter/compressed) /obj/item/weapon/storage/box/syndie_kit/imp_explosive name = "box (E)" - -/obj/item/weapon/storage/box/syndie_kit/imp_explosive/New() - new /obj/item/weapon/implanter/explosive(src) - ..() - return + starts_with = list(/obj/item/weapon/implanter/explosive) /obj/item/weapon/storage/box/syndie_kit/imp_uplink name = "boxed uplink implant (with injector)" -/obj/item/weapon/storage/box/syndie_kit/imp_uplink/New() - ..() +/obj/item/weapon/storage/box/syndie_kit/imp_uplink/initialize() var/obj/item/weapon/implanter/O = new(src) O.imp = new /obj/item/weapon/implant/uplink(O) O.update() - return + . = ..() /obj/item/weapon/storage/box/syndie_kit/space name = "boxed space suit and helmet" - -/obj/item/weapon/storage/box/syndie_kit/space/New() - ..() - new /obj/item/clothing/suit/space/syndicate(src) - new /obj/item/clothing/head/helmet/space/syndicate(src) - new /obj/item/clothing/mask/gas/syndicate(src) - new /obj/item/weapon/tank/emergency/oxygen/double(src) - return + starts_with = list( + /obj/item/clothing/suit/space/syndicate, + /obj/item/clothing/head/helmet/space/syndicate, + /obj/item/clothing/mask/gas/syndicate, + /obj/item/weapon/tank/emergency/oxygen/double + ) /obj/item/weapon/storage/box/syndie_kit/chameleon name = "chameleon kit" desc = "Comes with all the clothes you need to impersonate most people. Acting lessons sold seperately." - -/obj/item/weapon/storage/box/syndie_kit/chameleon/New() - ..() - new /obj/item/clothing/under/chameleon(src) - new /obj/item/clothing/head/chameleon(src) - new /obj/item/clothing/suit/chameleon(src) - new /obj/item/clothing/shoes/chameleon(src) - new /obj/item/weapon/storage/backpack/chameleon(src) - new /obj/item/clothing/gloves/chameleon(src) - new /obj/item/clothing/mask/chameleon(src) - new /obj/item/clothing/glasses/chameleon(src) - new /obj/item/clothing/accessory/chameleon(src) - new /obj/item/weapon/gun/energy/chameleon(src) + starts_with = list( + /obj/item/clothing/under/chameleon, + /obj/item/clothing/head/chameleon, + /obj/item/clothing/suit/chameleon, + /obj/item/clothing/shoes/chameleon, + /obj/item/weapon/storage/backpack/chameleon, + /obj/item/clothing/gloves/chameleon, + /obj/item/clothing/mask/chameleon, + /obj/item/clothing/glasses/chameleon, + /obj/item/clothing/accessory/chameleon, + /obj/item/weapon/gun/energy/chameleon + ) /obj/item/weapon/storage/box/syndie_kit/clerical name = "clerical kit" desc = "Comes with all you need to fake paperwork. Assumes you have passed basic writing lessons." - -/obj/item/weapon/storage/box/syndie_kit/clerical/New() - ..() - new /obj/item/weapon/stamp/chameleon(src) - new /obj/item/weapon/pen/chameleon(src) - new /obj/item/device/destTagger(src) - new /obj/item/weapon/packageWrap(src) - new /obj/item/weapon/hand_labeler(src) + starts_with = list( + /obj/item/weapon/stamp/chameleon, + /obj/item/weapon/pen/chameleon, + /obj/item/device/destTagger, + /obj/item/weapon/packageWrap, + /obj/item/weapon/hand_labeler + ) /obj/item/weapon/storage/box/syndie_kit/spy name = "spy kit" desc = "For when you want to conduct voyeurism from afar." - -/obj/item/weapon/storage/box/syndie_kit/spy/New() - ..() - new /obj/item/device/camerabug/spy(src) - new /obj/item/device/camerabug/spy(src) - new /obj/item/device/camerabug/spy(src) - new /obj/item/device/camerabug/spy(src) - new /obj/item/device/camerabug/spy(src) - new /obj/item/device/camerabug/spy(src) - new /obj/item/device/bug_monitor/spy(src) + starts_with = list( + /obj/item/device/camerabug/spy = 6, + /obj/item/device/bug_monitor/spy + ) /obj/item/weapon/storage/box/syndie_kit/g9mm name = "\improper Smooth operator" desc = "Compact 9mm with silencer kit." - -/obj/item/weapon/storage/box/syndie_kit/g9mm/New() - ..() - new /obj/item/weapon/gun/projectile/pistol(src) - new /obj/item/weapon/silencer(src) + starts_with = list( + /obj/item/weapon/gun/projectile/pistol, + /obj/item/weapon/silencer + ) /obj/item/weapon/storage/box/syndie_kit/toxin name = "toxin kit" desc = "An apple will not be enough to keep the doctor away after this." - -/obj/item/weapon/storage/box/syndie_kit/toxin/New() - ..() - new /obj/item/weapon/reagent_containers/glass/beaker/vial/random/toxin(src) - new /obj/item/weapon/reagent_containers/syringe(src) + starts_with = list( + /obj/item/weapon/reagent_containers/glass/beaker/vial/random/toxin, + /obj/item/weapon/reagent_containers/syringe + ) /obj/item/weapon/storage/box/syndie_kit/cigarette name = "\improper Tricky smokes" desc = "Comes with the following brands of cigarettes, in this order: 2xFlash, 2xSmoke, 1xMindBreaker, 1xTricordrazine. Avoid mixing them up." -/obj/item/weapon/storage/box/syndie_kit/cigarette/New() - ..() +/obj/item/weapon/storage/box/syndie_kit/cigarette/initialize() + . = ..() var/obj/item/weapon/storage/fancy/cigarettes/pack + pack = new /obj/item/weapon/storage/fancy/cigarettes(src) fill_cigarre_package(pack, list("aluminum" = 5, "potassium" = 5, "sulfur" = 5)) pack.desc += " 'F' has been scribbled on it." @@ -222,6 +191,8 @@ new /obj/item/weapon/flame/lighter/zippo(src) + calibrate_size() + /proc/fill_cigarre_package(var/obj/item/weapon/storage/fancy/cigarettes/C, var/list/reagents) for(var/reagent in reagents) C.reagents.add_reagent(reagent, reagents[reagent] * C.storage_slots) @@ -229,72 +200,52 @@ /obj/item/weapon/storage/box/syndie_kit/ewar_voice name = "Electrowarfare and Voice Synthesiser kit" desc = "Kit for confounding organic and synthetic entities alike." - -/obj/item/weapon/storage/box/syndie_kit/ewar_voice/New() - ..() - new /obj/item/rig_module/electrowarfare_suite(src) - new /obj/item/rig_module/voice(src) - + starts_with = list( + /obj/item/rig_module/electrowarfare_suite, + /obj/item/rig_module/voice + ) /obj/item/weapon/storage/secure/briefcase/money name = "suspicious briefcase" desc = "An ominous briefcase that has the unmistakeable smell of old, stale, cigarette smoke, and gives those who look at it a bad feeling." - - - - -/obj/item/weapon/storage/secure/briefcase/money/New() - ..() - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) - new /obj/item/weapon/spacecash/c1000(src) + starts_with = list(/obj/item/weapon/spacecash/c1000 = 10) /obj/item/weapon/storage/box/syndie_kit/combat_armor name = "combat armor kit" desc = "Contains a full set of combat armor." + starts_with = list( + /obj/item/clothing/head/helmet/combat, + /obj/item/clothing/suit/armor/combat, + /obj/item/clothing/gloves/arm_guard/combat, + /obj/item/clothing/shoes/leg_guard/combat + ) -/obj/item/weapon/storage/box/syndie_kit/combat_armor/New() - ..() - new /obj/item/clothing/head/helmet/combat(src) - new /obj/item/clothing/suit/armor/combat(src) - new /obj/item/clothing/gloves/arm_guard/combat(src) - new /obj/item/clothing/shoes/leg_guard/combat(src) - return +/obj/item/weapon/storage/box/syndie_kit/demolitions + starts_with = list( + /obj/item/weapon/syndie/c4explosive, + /obj/item/weapon/screwdriver + ) -/obj/item/weapon/storage/box/syndie_kit/demolitions/New() - ..() - new /obj/item/weapon/syndie/c4explosive(src) - new /obj/item/weapon/screwdriver(src) - -/obj/item/weapon/storage/box/syndie_kit/demolitions_heavy/New() - ..() - new /obj/item/weapon/syndie/c4explosive/heavy(src) - new /obj/item/weapon/screwdriver(src) - -/obj/item/weapon/storage/box/syndie_kit/demolitions_super_heavy/New() - ..() - new /obj/item/weapon/syndie/c4explosive/heavy/super_heavy(src) - new /obj/item/weapon/screwdriver(src) +/obj/item/weapon/storage/box/syndie_kit/demolitions_heavy + starts_with = list( + /obj/item/weapon/syndie/c4explosive/heavy, + /obj/item/weapon/screwdriver + ) +/obj/item/weapon/storage/box/syndie_kit/demolitions_super_heavy + starts_with = list( + /obj/item/weapon/syndie/c4explosive/heavy/super_heavy, + /obj/item/weapon/screwdriver + ) /obj/item/weapon/storage/secure/briefcase/rifle name = "secure briefcase" - -/obj/item/weapon/storage/secure/briefcase/rifle/New() - ..() - new /obj/item/sniper_rifle_part/barrel(src) - new /obj/item/sniper_rifle_part/stock(src) - new /obj/item/sniper_rifle_part/trigger_group(src) - - for(var/i = 1 to 4) - new /obj/item/ammo_casing/a145(src) + starts_with = list( + /obj/item/sniper_rifle_part/barrel, + /obj/item/sniper_rifle_part/stock, + /obj/item/sniper_rifle_part/trigger_group, + /obj/item/ammo_casing/a145 = 4 + ) /obj/item/weapon/storage/secure/briefcase/fuelrod name = "heavy briefcase" @@ -303,14 +254,12 @@ description_antag = "This case will likely contain a charged fuel rod gun, and a few fuel rods to go with it. It can only hold the fuel rod gun, fuel rods, batteries, a screwdriver, and stock machine parts." force = 12 //Anti-rad lined i.e. Lead, probably gonna hurt a bit if you get bashed with it. can_hold = list(/obj/item/weapon/gun/magnetic/fuelrod, /obj/item/weapon/fuel_assembly, /obj/item/weapon/cell, /obj/item/weapon/stock_parts, /obj/item/weapon/screwdriver) - - -/obj/item/weapon/storage/secure/briefcase/fuelrod/New() - ..() - new /obj/item/weapon/gun/magnetic/fuelrod(src) - new /obj/item/weapon/fuel_assembly/deuterium(src) - new /obj/item/weapon/fuel_assembly/deuterium(src) - new /obj/item/weapon/fuel_assembly/tritium(src) - new /obj/item/weapon/fuel_assembly/tritium(src) - new /obj/item/weapon/fuel_assembly/phoron(src) - new /obj/item/weapon/screwdriver(src) + starts_with = list( + /obj/item/weapon/gun/magnetic/fuelrod, + /obj/item/weapon/fuel_assembly/deuterium, + /obj/item/weapon/fuel_assembly/deuterium, + /obj/item/weapon/fuel_assembly/tritium, + /obj/item/weapon/fuel_assembly/tritium, + /obj/item/weapon/fuel_assembly/phoron, + /obj/item/weapon/screwdriver + ) diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm index 30d81e1ba9..02be9fdfaf 100644 --- a/code/game/objects/items/weapons/storage/wallets.dm +++ b/code/game/objects/items/weapons/storage/wallets.dm @@ -118,4 +118,4 @@ name = "women's wallet" desc = "A stylish wallet typically used by women." icon_state = "girl_wallet" - item_state_slots = list(slot_r_hand_str = "wowallet", slot_l_hand_str = "wowallet") \ No newline at end of file + item_state_slots = list(slot_r_hand_str = "wowallet", slot_l_hand_str = "wowallet") diff --git a/code/game/objects/items/weapons/syndie.dm b/code/game/objects/items/weapons/syndie.dm index 5d0d1f3863..5406b05a26 100644 --- a/code/game/objects/items/weapons/syndie.dm +++ b/code/game/objects/items/weapons/syndie.dm @@ -13,20 +13,29 @@ desc = "A small wrapped package." w_class = ITEMSIZE_NORMAL - var/power = 1 /*Size of the explosion.*/ + var/devastate = 0 + var/heavy_impact = 1 + var/light_impact = 2 + var/flash_range = 5 var/size = "small" /*Used for the icon, this one will make c-4small_0 for the off state.*/ /obj/item/weapon/syndie/c4explosive/heavy icon_state = "c-4large_0" item_state = "radio" desc = "A mysterious package, it's quite heavy." - power = 2 + devastate = 1 + heavy_impact = 2 + light_impact = 5 + flash_range = 7 size = "large" /obj/item/weapon/syndie/c4explosive/heavy/super_heavy name = "large-sized package" desc = "A mysterious package, it's quite exceptionally heavy." - power = 3 + devastate = 2 + heavy_impact = 5 + light_impact = 7 + flash_range = 7 /obj/item/weapon/syndie/c4explosive/New() var/K = rand(1,2000) @@ -43,7 +52,7 @@ for(var/mob/O in hearers(src, null)) O.show_message("\icon[src] The [src.name] beeps! ") sleep(50) - explosion(get_turf(src), power, power*2, power*3, power*4, power*5) + explosion(get_turf(src), devastate, heavy_impact, light_impact, flash_range) for(var/dirn in cardinal) //This is to guarantee that C4 at least breaks down all immediately adjacent walls and doors. var/turf/simulated/wall/T = get_step(src,dirn) if(locate(/obj/machinery/door/airlock) in T) diff --git a/code/game/objects/random/random.dm b/code/game/objects/random/random.dm index ce04898700..7fcfcfa450 100644 --- a/code/game/objects/random/random.dm +++ b/code/game/objects/random/random.dm @@ -907,6 +907,21 @@ something, make sure it's not in one of the other lists.*/ prob(25);/obj/item/device/radio/headset/headset_com/alt, prob(25);/obj/item/device/radio/headset) +/obj/random/coin + name = "random coin" + desc = "This is a coin spawn." + icon = 'icons/misc/mark.dmi' + icon_state = "rup" + +/obj/random/coin/item_to_spawn() + return pick(prob(5);/obj/item/weapon/coin/silver, + prob(3);/obj/item/weapon/coin/iron, + prob(4);/obj/item/weapon/coin/gold, + prob(3);/obj/item/weapon/coin/phoron, + prob(1);/obj/item/weapon/coin/uranium, + prob(2);/obj/item/weapon/coin/platinum, + prob(1);/obj/item/weapon/coin/diamond) + /obj/random/rigsuit name = "Random rigsuit" desc = "This is a random rigsuit." @@ -921,6 +936,20 @@ something, make sure it's not in one of the other lists.*/ prob(3);/obj/item/weapon/rig/hazard, prob(1);/obj/item/weapon/rig/merc/empty) +/obj/random/landmine + name = "Random Land Mine" + desc = "This is a random land mine." + icon = 'icons/obj/weapons.dmi' + icon_state = "uglymine" + spawn_nothing_percentage = 25 + +/obj/random/landmine/item_to_spawn() + return pick(prob(30);/obj/effect/mine, + prob(25);/obj/effect/mine/frag, + prob(25);/obj/effect/mine/emp, + prob(10);/obj/effect/mine/stun, + prob(10);/obj/effect/mine/incendiary,) + var/list/random_junk_ var/list/random_useful_ /proc/get_random_useful_type() @@ -1123,16 +1152,307 @@ var/list/multi_point_spawns ) ) -/obj/random/landmine - name = "Random Land Mine" - desc = "This is a random land mine." - icon = 'icons/obj/weapons.dmi' - icon_state = "uglymine" - spawn_nothing_percentage = 25 +/obj/random/multiple/minevault + name = "random vault loot" + desc = "Loot for mine vaults." + icon = 'icons/misc/mark.dmi' + icon_state = "rup" -/obj/random/landmine/item_to_spawn() - return pick(prob(30);/obj/effect/mine, - prob(25);/obj/effect/mine/frag, - prob(25);/obj/effect/mine/emp, - prob(10);/obj/effect/mine/stun, - prob(10);/obj/effect/mine/incendiary,) \ No newline at end of file +/obj/random/multiple/minevault/item_to_spawn() + return pick( + prob(5);list( + /obj/item/clothing/mask/smokable/pipe, + /obj/item/weapon/reagent_containers/food/drinks/bottle/rum, + /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey, + /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus, + /obj/item/weapon/flame/lighter/zippo, + /obj/structure/closet/crate/hydroponics + ), + prob(5);list( + /obj/item/weapon/pickaxe/drill, + /obj/item/clothing/suit/space/void/mining, + /obj/item/clothing/head/helmet/space/void/mining, + /obj/structure/closet/crate/engineering + ), + prob(5);list( + /obj/item/weapon/pickaxe/drill, + /obj/item/clothing/suit/space/void/mining/alt, + /obj/item/clothing/head/helmet/space/void/mining/alt, + /obj/structure/closet/crate/engineering + ), + prob(5);list( + /obj/item/weapon/reagent_containers/glass/beaker/bluespace, + /obj/item/weapon/reagent_containers/glass/beaker/bluespace, + /obj/item/weapon/reagent_containers/glass/beaker/bluespace, + /obj/structure/closet/crate/science + ), + prob(5);list( + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/diamond, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/item/weapon/ore/gold, + /obj/structure/closet/crate/engineering + ), + prob(5);list( + /obj/item/weapon/pickaxe/drill, + /obj/item/clothing/glasses/material, + /obj/structure/ore_box, + /obj/structure/closet/crate + ), + prob(5);list( + /obj/item/weapon/reagent_containers/glass/beaker/noreact, + /obj/item/weapon/reagent_containers/glass/beaker/noreact, + /obj/item/weapon/reagent_containers/glass/beaker/noreact, + /obj/structure/closet/crate/science + ), + prob(5);list( + /obj/item/weapon/storage/secure/briefcase/money, + /obj/structure/closet/crate/freezer/rations + ), + prob(5);list( + /obj/item/clothing/accessory/tie/horrible, + /obj/item/clothing/accessory/tie/horrible, + /obj/item/clothing/accessory/tie/horrible, + /obj/item/clothing/accessory/tie/horrible, + /obj/item/clothing/accessory/tie/horrible, + /obj/item/clothing/accessory/tie/horrible, + /obj/structure/closet/crate + ), + prob(5);list( + /obj/item/weapon/melee/baton, + /obj/item/weapon/melee/baton, + /obj/item/weapon/melee/baton, + /obj/item/weapon/melee/baton, + /obj/structure/closet/crate + ), + prob(5);list( + /obj/item/clothing/under/shorts/red, + /obj/item/clothing/under/shorts/blue, + /obj/structure/closet/crate + ), + prob(2);list( + /obj/item/weapon/melee/baton/cattleprod, + /obj/item/weapon/melee/baton/cattleprod, + /obj/item/weapon/cell/high, + /obj/item/weapon/cell/high, + /obj/structure/closet/crate + ), + prob(2);list( + /obj/item/latexballon, + /obj/item/latexballon, + /obj/structure/closet/crate + ), + prob(2);list( + /obj/item/toy/syndicateballoon, + /obj/item/toy/syndicateballoon, + /obj/structure/closet/crate + ), + prob(2);list( + /obj/item/weapon/rig/industrial/equipped, + /obj/item/weapon/storage/bag/ore, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/clothing/head/kitty, + /obj/item/clothing/head/kitty, + /obj/item/clothing/head/kitty, + /obj/item/clothing/head/kitty, + /obj/structure/closet/crate + ), + prob(2);list( + /obj/random/coin, + /obj/random/coin, + /obj/random/coin, + /obj/random/coin, + /obj/random/coin, + /obj/structure/closet/crate/plastic + ), + prob(2);list( + /obj/random/multiple/voidsuit, + /obj/random/multiple/voidsuit, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/clothing/suit/space/syndicate/black/red, + /obj/item/clothing/head/helmet/space/syndicate/black/red, + /obj/item/clothing/suit/space/syndicate/black/red, + /obj/item/clothing/head/helmet/space/syndicate/black/red, + /obj/item/weapon/gun/projectile/automatic/mini_uzi, + /obj/item/weapon/gun/projectile/automatic/mini_uzi, + /obj/item/ammo_magazine/m45uzi, + /obj/item/ammo_magazine/m45uzi, + /obj/item/ammo_magazine/m45uzi/empty, + /obj/item/ammo_magazine/m45uzi/empty, + /obj/structure/closet/crate/plastic + ), + prob(2);list( + /obj/item/clothing/suit/ianshirt, + /obj/item/clothing/suit/ianshirt, + /obj/item/weapon/bedsheet/ian, + /obj/structure/closet/crate/plastic + ), + prob(2);list( + /obj/item/clothing/suit/armor/vest, + /obj/item/clothing/suit/armor/vest, + /obj/item/weapon/gun/projectile/garand, + /obj/item/weapon/gun/projectile/garand, + /obj/item/ammo_magazine/m762garand, + /obj/item/ammo_magazine/m762garand, + /obj/structure/closet/crate/plastic + ), + prob(2);list( + /obj/mecha/working/ripley/mining + ), + prob(2);list( + /obj/mecha/working/hoverpod/combatpod + ), + prob(2);list( + /obj/item/weapon/pickaxe/silver, + /obj/item/weapon/storage/bag/ore, + /obj/item/clothing/glasses/material, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/weapon/pickaxe/drill, + /obj/item/weapon/storage/bag/ore, + /obj/item/clothing/glasses/material, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/weapon/pickaxe/jackhammer, + /obj/item/weapon/storage/bag/ore, + /obj/item/clothing/glasses/material, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/weapon/pickaxe/diamond, + /obj/item/weapon/storage/bag/ore, + /obj/item/clothing/glasses/material, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/weapon/pickaxe/diamonddrill, + /obj/item/weapon/storage/bag/ore, + /obj/item/clothing/glasses/material, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/weapon/pickaxe/gold, + /obj/item/weapon/storage/bag/ore, + /obj/item/clothing/glasses/material, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/weapon/pickaxe/plasmacutter, + /obj/item/weapon/storage/bag/ore, + /obj/item/clothing/glasses/material, + /obj/structure/closet/crate/engineering + ), + prob(2);list( + /obj/item/weapon/material/sword/katana, + /obj/item/weapon/material/sword/katana, + /obj/structure/closet/crate + ), + prob(2);list( + /obj/item/weapon/material/sword, + /obj/item/weapon/material/sword, + /obj/structure/closet/crate + ), + prob(1);list( + /obj/item/clothing/mask/balaclava, + /obj/item/weapon/material/star, + /obj/item/weapon/material/star, + /obj/item/weapon/material/star, + /obj/item/weapon/material/star, + /obj/structure/closet/crate + ), + prob(1);list( + /obj/item/weed_extract, + /obj/item/xenos_claw, + /obj/structure/closet/crate/science + ), + prob(1);list( + /obj/item/clothing/head/bearpelt, + /obj/item/clothing/under/soviet, + /obj/item/clothing/under/soviet, + /obj/item/weapon/gun/projectile/shotgun/pump/rifle/ceremonial, + /obj/item/weapon/gun/projectile/shotgun/pump/rifle/ceremonial, + /obj/structure/closet/crate + ), + prob(1);list( + /obj/item/weapon/gun/projectile/revolver/detective, + /obj/item/weapon/gun/projectile/contender, + /obj/item/weapon/gun/projectile/p92x, + /obj/item/weapon/gun/projectile/derringer, + /obj/structure/closet/crate + ), + prob(1);list( + /obj/item/weapon/melee/cultblade, + /obj/item/clothing/suit/cultrobes, + /obj/item/clothing/head/culthood, + /obj/item/device/soulstone, + /obj/structure/closet/crate + ), + prob(1);list( + /obj/item/weapon/vampiric, + /obj/item/weapon/vampiric, + /obj/structure/closet/crate/science + ), + prob(1);list( + /obj/item/weapon/archaeological_find + ), + prob(1);list( + /obj/item/weapon/melee/energy/sword, + /obj/item/weapon/melee/energy/sword, + /obj/item/weapon/melee/energy/sword, + /obj/item/weapon/shield/energy, + /obj/item/weapon/shield/energy, + /obj/structure/closet/crate/science + ), + prob(1);list( + /obj/item/weapon/storage/backpack/clown, + /obj/item/clothing/under/rank/clown, + /obj/item/clothing/shoes/clown_shoes, + /obj/item/device/pda/clown, + /obj/item/clothing/mask/gas/clown_hat, + /obj/item/weapon/bikehorn, + /obj/item/toy/waterflower, + /obj/item/weapon/pen/crayon/rainbow, + /obj/structure/closet/crate + ), + prob(1);list( + /obj/item/clothing/under/mime, + /obj/item/clothing/shoes/black, + /obj/item/device/pda/mime, + /obj/item/clothing/gloves/white, + /obj/item/clothing/mask/gas/mime, + /obj/item/clothing/head/beret, + /obj/item/clothing/suit/suspenders, + /obj/item/weapon/pen/crayon/mime, + /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing, + /obj/structure/closet/crate + ), + prob(1);list( + /obj/item/weapon/storage/belt/champion, + /obj/item/clothing/mask/luchador, + /obj/item/clothing/mask/luchador/rudos, + /obj/item/clothing/mask/luchador/tecnicos, + /obj/structure/closet/crate + ) + ) \ No newline at end of file diff --git a/code/game/objects/structures/bonfire.dm b/code/game/objects/structures/bonfire.dm index 1952ddea4f..390ddc88a3 100644 --- a/code/game/objects/structures/bonfire.dm +++ b/code/game/objects/structures/bonfire.dm @@ -10,6 +10,8 @@ var/next_fuel_consumption = 0 // world.time of when next item in fuel list gets eatten to sustain the fire. var/grill = FALSE var/material/material + var/set_temperature = T0C + 30 //K + var/heating_power = 80000 /obj/structure/bonfire/New(newloc, material_name) ..(newloc) @@ -186,9 +188,9 @@ if(burning) var/state switch(get_fuel_amount()) - if(0 to 4) + if(0 to 4.5) state = "bonfire_warm" - if(5 to 10) + if(4.6 to 10) state = "bonfire_hot" var/image/I = image(icon, state) I.appearance_flags = RESET_COLOR @@ -223,6 +225,23 @@ if(!grill) burn() + if(burning) + var/W = get_fuel_amount() + if(W >= 5) + var/datum/gas_mixture/env = loc.return_air() + if(env && abs(env.temperature - set_temperature) > 0.1) + var/transfer_moles = 0.25 * env.total_moles + var/datum/gas_mixture/removed = env.remove(transfer_moles) + + if(removed) + var/heat_transfer = removed.get_thermal_energy_change(set_temperature) + if(heat_transfer > 0) + heat_transfer = min(heat_transfer , heating_power) + + removed.add_thermal_energy(heat_transfer) + + env.merge(removed) + /obj/structure/bonfire/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) ignite() @@ -235,4 +254,163 @@ M.pixel_y += 13 else // Just unbuckled someone M.pixel_y -= 13 - update_icon() \ No newline at end of file + update_icon() + +/obj/structure/fireplace //more like a space heater than a bonfire. A cozier alternative to both. + name = "fireplace" + desc = "The sound of the crackling hearth reminds you of home." + icon = 'icons/obj/structures.dmi' + icon_state = "fireplace" + density = TRUE + anchored = TRUE + var/burning = FALSE + var/next_fuel_consumption = 0 + var/set_temperature = T0C + 20 //K + var/heating_power = 40000 + +/obj/structure/fireplace/attackby(obj/item/W, mob/user) + if(istype(W, /obj/item/stack/material/wood) || istype(W, /obj/item/stack/material/log) ) + add_fuel(W, user) + + else if(W.is_hot()) + ignite() + else + return ..() + +/obj/structure/fireplace/attack_hand(mob/user) + if(get_fuel_amount()) + remove_fuel(user) + +/obj/structure/fireplace/proc/get_fuel_amount() + var/F = 0 + for(var/A in contents) + if(istype(A, /obj/item/stack/material/wood)) + F += 0.5 + if(istype(A, /obj/item/stack/material/log)) + F += 1.0 + return F + +/obj/structure/fireplace/proc/remove_fuel(mob/user) + if(get_fuel_amount()) + var/atom/movable/AM = pop(contents) + AM.forceMove(get_turf(src)) + to_chat(user, "You take \the [AM] out of \the [src] before it has a chance to burn away.") + update_icon() + +/obj/structure/fireplace/proc/add_fuel(atom/movable/new_fuel, mob/user) + if(get_fuel_amount() >= 10) + to_chat(user, "\The [src] already has enough fuel!") + return FALSE + if(istype(new_fuel, /obj/item/stack/material/wood) || istype(new_fuel, /obj/item/stack/material/log) ) + var/obj/item/stack/F = new_fuel + var/obj/item/stack/S = F.split(1) + if(S) + S.forceMove(src) + to_chat(user, "You add \the [new_fuel] to \the [src].") + update_icon() + return TRUE + return FALSE + else + to_chat(user, "\The [src] needs raw wood to burn, \a [new_fuel] won't work.") + return FALSE + +/obj/structure/fireplace/proc/consume_fuel(var/obj/item/stack/consumed_fuel) + if(!istype(consumed_fuel)) + qdel(consumed_fuel) // Don't know, don't care. + return FALSE + + if(istype(consumed_fuel, /obj/item/stack/material/log)) + next_fuel_consumption = world.time + 2 MINUTES + qdel(consumed_fuel) + update_icon() + return TRUE + + else if(istype(consumed_fuel, /obj/item/stack/material/wood)) // One log makes two planks of wood. + next_fuel_consumption = world.time + 1 MINUTE + qdel(consumed_fuel) + update_icon() + return TRUE + return FALSE + +/obj/structure/fireplace/proc/check_oxygen() + var/datum/gas_mixture/G = loc.return_air() + if(G.gas["oxygen"] < 1) + return FALSE + return TRUE + +/obj/structure/fireplace/proc/extinguish() + if(burning) + burning = FALSE + update_icon() + processing_objects -= src + visible_message("\The [src] stops burning.") + +/obj/structure/fireplace/proc/ignite() + if(!burning && get_fuel_amount()) + burning = TRUE + update_icon() + processing_objects += src + visible_message("\The [src] starts burning!") + +/obj/structure/fireplace/proc/burn() + var/turf/current_location = get_turf(src) + current_location.hotspot_expose(1000, 500) + for(var/A in current_location) + if(A == src) + continue + if(isobj(A)) + var/obj/O = A + O.fire_act(null, 1000, 500) + +/obj/structure/fireplace/update_icon() + overlays.Cut() + if(burning) + var/state + switch(get_fuel_amount()) + if(0 to 3.5) + state = "fireplace_warm" + if(3.6 to 6.5) + state = "fireplace_hot" + if(6.6 to 10) + state = "fireplace_intense" //don't need to throw a corpse inside to make it burn hotter. + var/image/I = image(icon, state) + I.appearance_flags = RESET_COLOR + overlays += I + + var/light_strength = max(get_fuel_amount() / 2, 2) + set_light(light_strength, light_strength, "#FF9933") + else + set_light(0) + +/obj/structure/fireplace/process() + if(!check_oxygen()) + extinguish() + return + if(world.time >= next_fuel_consumption) + if(!consume_fuel(pop(contents))) + extinguish() + return + + if(burning) + var/W = get_fuel_amount() + if(W >= 5) + var/datum/gas_mixture/env = loc.return_air() + if(env && abs(env.temperature - set_temperature) > 0.1) + var/transfer_moles = 0.25 * env.total_moles + var/datum/gas_mixture/removed = env.remove(transfer_moles) + + if(removed) + var/heat_transfer = removed.get_thermal_energy_change(set_temperature) + if(heat_transfer > 0) + heat_transfer = min(heat_transfer , heating_power) + + removed.add_thermal_energy(heat_transfer) + + env.merge(removed) + +/obj/structure/fireplace/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ignite() + +/obj/structure/fireplace/water_act(amount) + if(prob(amount * 10)) + extinguish() \ No newline at end of file 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 de7f85c91e..103867ef88 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm @@ -85,7 +85,7 @@ 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/device/radio/headset/headset_mine(src) new /obj/item/clothing/under/rank/miner(src) new /obj/item/clothing/gloves/black(src) new /obj/item/clothing/shoes/black(src) diff --git a/code/game/objects/structures/flora/trees.dm b/code/game/objects/structures/flora/trees.dm index 0c50bf189d..ef58518e48 100644 --- a/code/game/objects/structures/flora/trees.dm +++ b/code/game/objects/structures/flora/trees.dm @@ -18,6 +18,10 @@ return ..() if(is_stump) + if(istype(W,/obj/item/weapon/shovel)) + if(do_after(user, 5 SECONDS)) + visible_message("\The [user] digs up \the [src] stump with \the [W].") + qdel(src) return visible_message("\The [user] hits \the [src] with \the [W]!") diff --git a/code/game/objects/structures/holoplant.dm b/code/game/objects/structures/holoplant.dm new file mode 100644 index 0000000000..1f6473ebdc --- /dev/null +++ b/code/game/objects/structures/holoplant.dm @@ -0,0 +1,105 @@ +/obj/machinery/holoplant + name = "holoplant" + desc = "One of those Ward-Takahashi holoplants! Give your space a bit of the comfort of being outdoors, by buying this blue buddy. A rugged case guarantees that your flower will outlive you, and variety of plant types won't let you to get bored along the way!" + icon = 'icons/obj/holoplants.dmi' + icon_state = "holopot" + light_color = "#3C94C5" + anchored = TRUE + idle_power_usage = 0 + active_power_usage = 5 + var/interference = FALSE + var/icon/plant = null + var/global/list/possible_plants = list( + "plant-1", + "plant-10", + "plant-09", + "plant-15", + "plant-13" + ) + +/obj/machinery/holoplant/initialize() + . = ..() + activate() + +/obj/machinery/holoplant/attack_hand(var/mob/living/user) + if(!istype(user) || interference) + return + + if(!anchored) + to_chat(user,"\The [src] must be anchored before activation!") + return + + if(!plant) + activate() + else + deactivate() + +/obj/machinery/holoplant/attackby(var/obj/item/O as obj, var/mob/user as mob) + if(default_unfasten_wrench(user, O, 10)) + deactivate() + return + + . = ..() + +/obj/machinery/holoplant/proc/activate() + if(!anchored || stat & (NOPOWER|BROKEN)) + return + + plant = prepare_icon(emagged ? "emagged" : null) + overlays += plant + set_light(2) + use_power = 2 + +/obj/machinery/holoplant/proc/deactivate() + overlays -= plant + qdel_null(plant) + set_light(0) + use_power = 0 + +/obj/machinery/holoplant/power_change() + ..() + if(stat & NOPOWER) + deactivate() + else + activate() + +/obj/machinery/holoplant/proc/flicker() + interference = TRUE + spawn(0) + overlays -= plant + set_light(0) + sleep(rand(2,4)) + overlays += plant + set_light(2) + sleep(rand(2,4)) + overlays -= plant + set_light(0) + sleep(rand(2,4)) + overlays += plant + set_light(2) + interference = FALSE + +/obj/machinery/holoplant/proc/prepare_icon(var/state) + if(!state) + state = pick(possible_plants) + var/plant_icon = icon(icon, state) + return getHologramIcon(plant_icon, 0) + +/obj/machinery/holoplant/emag_act() + if(emagged) + return + + emagged = TRUE + if(plant) + deactivate() + activate() + +/obj/machinery/holoplant/Crossed(var/mob/living/L) + if(!interference && plant && istype(L)) + flicker() + + +/obj/machinery/holoplant/shipped + anchored = FALSE +/obj/machinery/holoplant/shipped/initialize() + . = ..() \ No newline at end of file diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index f4f1deff28..eab6f203fc 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -294,6 +294,21 @@ if(is_fulltile()) mats.amount = 4 qdel(src) + else if(iscoil(W) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized)) + var/obj/item/stack/cable_coil/C = W + if (C.use(1)) + playsound(src.loc, 'sound/effects/sparks1.ogg', 75, 1) + user.visible_message( \ + "\The [user] begins to wire \the [src] for electrochromic tinting.", \ + "You begin to wire \the [src] for electrochromic tinting.", \ + "You hear sparks.") + if(do_after(user, 20 * C.toolspeed, src) && state == 0) + playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + var/obj/structure/window/reinforced/polarized/P = new(loc, dir) + P.health = health + P.state = state + P.anchored = anchored + qdel(src) else if(istype(W,/obj/item/frame) && anchored) var/obj/item/frame/F = W F.try_build(src) @@ -551,6 +566,28 @@ desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it." var/id +/obj/structure/window/reinforced/polarized/full + dir = SOUTHWEST + icon_state = "fwindow" + maxhealth = 80 + +/obj/structure/window/reinforced/polarized/attackby(obj/item/W as obj, mob/user as mob) + if(ismultitool(W) && !anchored) // Only allow programming if unanchored! + var/obj/item/device/multitool/MT = W + // First check if they have a windowtint button buffered + if(istype(MT.connectable, /obj/machinery/button/windowtint)) + var/obj/machinery/button/windowtint/buffered_button = MT.connectable + src.id = buffered_button.id + to_chat(user, "\The [src] is linked to \the [buffered_button].") + return TRUE + // Otherwise fall back to asking them + var/t = sanitizeSafe(input(user, "Enter the ID for the window.", src.name, null), MAX_NAME_LEN) + if (!t && user.get_active_hand() != W && in_range(src, user)) + src.id = t + to_chat(user, "The new ID of \the [src] is [id]") + return TRUE + . = ..() + /obj/structure/window/reinforced/polarized/proc/toggle() if(opacity) animate(src, color="#FFFFFF", time=5) @@ -593,3 +630,20 @@ /obj/machinery/button/windowtint/update_icon() icon_state = "light[active]" + +/obj/machinery/button/windowtint/attackby(obj/item/W as obj, mob/user as mob) + if(ismultitool(W)) + var/obj/item/device/multitool/MT = W + if(!id) + // If no ID is set yet (newly built button?) let them select an ID for first-time use! + var/t = sanitizeSafe(input(user, "Enter an ID for \the [src].", src.name, null), MAX_NAME_LEN) + if (t && user.get_active_hand() != W && in_range(src, user)) + src.id = t + to_chat(user, "The new ID of \the [src] is [id]") + if(id) + // It already has an ID (or they just set one), buffer it for copying to windows. + to_chat(user, "You store \the [src] in \the [MT]'s buffer!") + MT.connectable = src + MT.update_icon() + return TRUE + . = ..() diff --git a/code/game/turfs/flooring/flooring.dm b/code/game/turfs/flooring/flooring.dm index 4d708b2944..b80e20e542 100644 --- a/code/game/turfs/flooring/flooring.dm +++ b/code/game/turfs/flooring/flooring.dm @@ -133,6 +133,11 @@ var/list/flooring_types icon_base = "oracarpet" build_type = /obj/item/stack/tile/carpet/oracarpet +/decl/flooring/carpet/tealcarpet + name = "teal carpet" + icon_base = "tealcarpet" + build_type = /obj/item/stack/tile/carpet/teal + /decl/flooring/tiling name = "floor" desc = "Scuffed from the passage of countless greyshirts." @@ -275,6 +280,23 @@ var/list/flooring_types 'sound/effects/footstep/wood4.ogg', 'sound/effects/footstep/wood5.ogg')) +/decl/flooring/sifwood + name = "alien wooden floor" + desc = "Polished alien wood planks." + icon = 'icons/turf/flooring/wood.dmi' + icon_base = "sifwood" + has_damage_range = 6 + damage_temperature = T0C+200 + descriptor = "planks" + build_type = /obj/item/stack/tile/sifwood + flags = TURF_CAN_BREAK | TURF_IS_FRAGILE | TURF_REMOVE_SCREWDRIVER + footstep_sounds = list("human" = list( + 'sound/effects/footstep/wood1.ogg', + 'sound/effects/footstep/wood2.ogg', + 'sound/effects/footstep/wood3.ogg', + 'sound/effects/footstep/wood4.ogg', + 'sound/effects/footstep/wood5.ogg')) + /decl/flooring/reinforced name = "reinforced floor" desc = "Heavily reinforced with steel rods." diff --git a/code/game/turfs/flooring/flooring_premade.dm b/code/game/turfs/flooring/flooring_premade.dm index 3f4020c177..886faa3898 100644 --- a/code/game/turfs/flooring/flooring_premade.dm +++ b/code/game/turfs/flooring/flooring_premade.dm @@ -14,6 +14,11 @@ icon_state = "blucarpet" initial_flooring = /decl/flooring/carpet/blucarpet +/turf/simulated/floor/carpet/tealcarpet + name = "teal carpet" + icon_state = "tealcarpet" + initial_flooring = /decl/flooring/carpet/tealcarpet + // Legacy support for existing paths for blue carpet /turf/simulated/floor/carpet/blue name = "blue carpet" @@ -63,6 +68,12 @@ icon_state = "wood" initial_flooring = /decl/flooring/wood +/turf/simulated/floor/sifwood + name = "alien wooden floor" + icon = 'icons/turf/flooring/wood.dmi' + icon_state = "sifwood" + initial_flooring = /decl/flooring/sifwood + /turf/simulated/floor/grass name = "grass patch" icon = 'icons/turf/flooring/grass.dmi' diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 81c709f6d8..502461cd69 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1228,7 +1228,7 @@ if(ismob(M)) var/take_msg = "ADMINHELP: [key_name(usr.client)] is attending to [key_name(M)]'s adminhelp, please don't dogpile them." for(var/client/X in admins) - if((R_ADMIN|R_MOD|R_EVENT) & X.holder.rights) + if((R_ADMIN|R_MOD|R_EVENT|R_SERVER) & X.holder.rights) to_chat(X, take_msg) to_chat(M, "Your adminhelp is being attended to by [usr.client]. Thanks for your patience!") else diff --git a/code/modules/blob2/mobs/spore.dm b/code/modules/blob2/mobs/spore.dm index 3e68344c8b..e23b96d8aa 100644 --- a/code/modules/blob2/mobs/spore.dm +++ b/code/modules/blob2/mobs/spore.dm @@ -12,7 +12,7 @@ melee_damage_lower = 2 melee_damage_upper = 4 layer = MOB_LAYER + 0.2 // Over the blob. - attacktext = "slams into" + attacktext = list("slams into") attack_sound = 'sound/effects/slime_squish.ogg' emote_see = list("sways", "inflates briefly") var/mob/living/carbon/human/infested = null // The human this thing is totally not making into a zombie. @@ -97,7 +97,7 @@ melee_damage_lower += 8 // 10 total. melee_damage_upper += 11 // 15 total. emote_see = list("shambles around", "twitches", "stares") - attacktext = "claws" + attacktext = list("claws") H.forceMove(src) infested = H diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm index 73d91129e7..7b517a6ee0 100644 --- a/code/modules/client/preference_setup/general/03_body.dm +++ b/code/modules/client/preference_setup/general/03_body.dm @@ -4,7 +4,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O var/equip_preview_mob = EQUIP_PREVIEW_ALL var/icon/bgstate = "000" - var/list/bgstate_options = list("000", "fff", "steel", "white") + var/list/bgstate_options = list("000", "midgrey", "FFF", "white", "steel", "techmaint", "dark", "plating", "reinforced") /datum/category_item/player_setup_item/general/body name = "Body" diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index 48d24bb8c2..ea3e6c7cf4 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -45,3 +45,17 @@ icon_state = "medical" item_state_slots = list(slot_r_hand_str = "medical", slot_l_hand_str = "medical") permeability_coefficient = 0.01 + +/obj/item/clothing/mask/breath/emergency + desc = "A close-fitting mask that is used by the wallmounted emergency oxygen pump." + name = "emergency mask" + icon_state = "breath" + item_state = "breath" + permeability_coefficient = 0.50 + +/obj/item/clothing/mask/breath/anesthetic + desc = "A close-fitting sterile mask that is used by the anesthetic wallmounted pump." + name = "anesthetic mask" + icon_state = "medical" + item_state = "medical" + permeability_coefficient = 0.01 diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 299680b864..52e50216f3 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -73,7 +73,6 @@ icon_state = "explorer" item_state_slots = list(slot_r_hand_str = "gas", slot_l_hand_str = "gas") armor = list(melee = 10, bullet = 5, laser = 5,energy = 5, bomb = 0, bio = 50, rad = 0) - body_parts_covered = HEAD|FACE|EYES siemens_coefficient = 0.9 /obj/item/clothing/mask/gas/clown_hat diff --git a/code/modules/clothing/under/accessories/permits.dm b/code/modules/clothing/under/accessories/permits.dm index ea21d79669..c6170bfd61 100644 --- a/code/modules/clothing/under/accessories/permits.dm +++ b/code/modules/clothing/under/accessories/permits.dm @@ -34,6 +34,10 @@ name = "bar shotgun permit" desc = "A card indicating that the owner is allowed to carry a shotgun in the bar." +/obj/item/clothing/accessory/permit/gun/planetside + name = "planetside gun permit" + desc = "A card indicating that the owner is allowed to carry a firearm while on the surface." + /obj/item/clothing/accessory/permit/drone name = "drone identification card" desc = "A card issued by the EIO, indicating that the owner is a Drone Intelligence. Drones are mandated to carry this card within SolGov space, by law." diff --git a/code/modules/materials/material_recipes.dm b/code/modules/materials/material_recipes.dm index bb5a4674f4..e8252d4581 100644 --- a/code/modules/materials/material_recipes.dm +++ b/code/modules/materials/material_recipes.dm @@ -182,4 +182,10 @@ recipes += new/datum/stack_recipe("[display_name] bed", /obj/structure/bed, 2, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") recipes += new/datum/stack_recipe("[display_name] double bed", /obj/structure/bed/double, 4, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") recipes += new/datum/stack_recipe("[display_name] wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") - recipes += new/datum/stack_recipe("[display_name] ashtray", /obj/item/weapon/material/ashtray, 2, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") \ No newline at end of file + recipes += new/datum/stack_recipe("[display_name] ashtray", /obj/item/weapon/material/ashtray, 2, one_per_turf = 1, on_floor = 1, supplied_material = "[name]") + +/material/wood/sif/generate_recipes() + ..() + recipes += new/datum/stack_recipe("alien wood floor tile", /obj/item/stack/tile/sifwood, 1, 4, 20) + recipes -= new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20) + recipes -= new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood, 3, time = 10, one_per_turf = 1, on_floor = 1) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 2f81f1568a..3c2caa9b82 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -488,7 +488,7 @@ var/list/mining_overlay_cache = list() M.flash_eyes() if(prob(50)) M.Stun(5) - radiation_repository.flat_radiate(src, 25, 200) + radiation_repository.flat_radiate(src, 25, 100) if(prob(25)) excavate_find(prob(5), finds[1]) else if(rand(1,500) == 1) diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index e8d8981d3e..b904a7cfad 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -14,12 +14,15 @@ if (istype(W, /obj/item/weapon/ore)) user.remove_from_mob(W) src.contents += W - if (istype(W, /obj/item/weapon/storage)) + + else if (istype(W, /obj/item/weapon/storage)) var/obj/item/weapon/storage/S = W + if(!S.contents.len) + return S.hide_from(usr) for(var/obj/item/weapon/ore/O in S.contents) S.remove_from_storage(O, src) //This will move the item to this item's contents - user << "You empty the satchel into the box." + to_chat(user,"You empty the satchel into the box.") update_ore_count() @@ -62,13 +65,12 @@ user << "- [stored_ore[ore]] [ore]" return - /obj/structure/ore_box/verb/empty_box() set name = "Empty Ore Box" set category = "Object" set src in view(1) - if(!istype(usr, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can empty ore boxes. + if(!istype(usr, /mob/living/carbon/human) && !istype(usr, /mob/living/silicon/robot)) //Only living, intelligent creatures with gripping aparatti can empty ore boxes. usr << "You are physically incapable of emptying the ore box." return diff --git a/code/modules/mob/_modifiers/modifiers.dm b/code/modules/mob/_modifiers/modifiers.dm index 71b337b1b3..4f449b723b 100644 --- a/code/modules/mob/_modifiers/modifiers.dm +++ b/code/modules/mob/_modifiers/modifiers.dm @@ -39,7 +39,7 @@ var/haste // If set to 1, the mob will be 'hasted', which makes it ignore slowdown and go really fast. var/evasion // Positive numbers reduce the odds of being hit. Negative numbers increase the odds. var/bleeding_rate_percent // Adjusts amount of blood lost when bleeding. - var/accuracy // Positive numbers makes hitting things with guns easier, negatives make it harder. Every 15% is equal to one tile easier or harder, just like evasion. + var/accuracy // Positive numbers makes hitting things with guns easier, negatives make it harder. var/accuracy_dispersion // Positive numbers make gun firing cover a wider tile range, and therefore more inaccurate. Negatives help negate dispersion penalties. var/metabolism_percent // Adjusts the mob's metabolic rate, which affects reagent processing. Won't affect mobs without reagent processing. var/icon_scale_percent // Makes the holder's icon get scaled up or down. @@ -208,13 +208,13 @@ effects += "You move at maximum speed, and cannot be slowed by any means." if(!isnull(evasion)) - effects += "You are [abs(evasion * 15)]% [evasion > 0 ? "harder" : "easier"] to hit with weapons." + effects += "You are [abs(evasion)]% [evasion > 0 ? "harder" : "easier"] to hit with weapons." if(!isnull(bleeding_rate_percent)) effects += "You bleed [multipler_to_percentage(bleeding_rate_percent, TRUE)] [bleeding_rate_percent > 1.0 ? "faster" : "slower"]." if(!isnull(accuracy)) - effects += "It is [abs(accuracy * 15)]% [accuracy > 0 ? "easier" : "harder"] for you to hit someone with a ranged weapon." + effects += "It is [abs(accuracy)]% [accuracy > 0 ? "easier" : "harder"] for you to hit someone with a ranged weapon." if(!isnull(accuracy_dispersion)) effects += "Projectiles you fire are [accuracy_dispersion > 0 ? "more" : "less"] likely to stray from your intended target." diff --git a/code/modules/mob/_modifiers/modifiers_misc.dm b/code/modules/mob/_modifiers/modifiers_misc.dm index 0a02f6b096..fbe9e35624 100644 --- a/code/modules/mob/_modifiers/modifiers_misc.dm +++ b/code/modules/mob/_modifiers/modifiers_misc.dm @@ -60,9 +60,9 @@ the artifact triggers the rage. pain_immunity = TRUE // Avoid falling over from shock (at least until it expires). // The less good stuff. - accuracy = -5 // Aiming requires focus. + accuracy = -75 // Aiming requires focus. accuracy_dispersion = 3 // Ditto. - evasion = -3 // Too angry to dodge. + evasion = -45 // Too angry to dodge. var/nutrition_cost = 150 var/exhaustion_duration = 2 MINUTES // How long the exhaustion modifier lasts after it expires. Set to 0 to not apply one. @@ -157,7 +157,7 @@ the artifact triggers the rage. attack_speed_percent = 1.5 outgoing_melee_damage_percent = 0.6 disable_duration_percent = 1.5 - evasion = -2 + evasion = -30 /datum/modifier/berserk_exhaustion/on_applied() holder.visible_message("\The [holder] looks exhausted.") @@ -177,6 +177,6 @@ the artifact triggers the rage. stacks = MODIFIER_STACK_EXTEND // Just being mad isn't gonna overclock your body when you're a beepboop. - accuracy = -5 // Aiming requires focus. + accuracy = -75 // Aiming requires focus. accuracy_dispersion = 3 // Ditto. - evasion = -3 // Too angry to dodge. + evasion = -45 // Too angry to dodge. diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index c28580fe6f..47b82faaee 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1024,10 +1024,10 @@ return return md5(dna.uni_identity) -/mob/living/carbon/human/clean_blood(var/clean_feet) +/mob/living/carbon/human/clean_blood(var/washshoes) .=..() gunshot_residue = null - if(clean_feet && !shoes && istype(feet_blood_DNA, /list) && feet_blood_DNA.len) + if(washshoes && !shoes && istype(feet_blood_DNA, /list) && feet_blood_DNA.len) feet_blood_color = null feet_blood_DNA.Cut() feet_blood_DNA = null @@ -1546,11 +1546,14 @@ permit.set_name(real_name) equip_to_appropriate_slot(permit) // If for some reason it can't find room, it'll still be on the floor. -/mob/living/carbon/human/proc/update_icon_special() //For things such as teshari hiding and whatnot. +/mob/living/carbon/human/proc/update_icon_special(var/mutable_appearance/ma, var/update_icons = TRUE) //For things such as teshari hiding and whatnot. if(hiding) // Hiding? Carry on. if(stat == DEAD || paralysis || weakened || stunned) //stunned/knocked down by something that isn't the rest verb? Note: This was tried with INCAPACITATION_STUNNED, but that refused to work. - hiding = 0 //No hiding for you. Mob layer should be updated naturally, but it actually doesn't. + hiding = FALSE //No hiding for you. Mob layer should be updated naturally, but it actually doesn't. else - layer = 2.45 - else //Replace this else with other variables if added in the future. Alternatively, could make other things effect this hiding variable. - return + ma.layer = HIDING_LAYER + + //Can put special species icon update proc calls here, if any are ever invented. + + if(update_icons) + update_icons() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 2e4ff84563..2c629b25f9 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -245,12 +245,13 @@ var/real_damage = rand_damage var/hit_dam_type = attack.damage_type real_damage += attack.get_unarmed_damage(H) - if(H.gloves && istype(H.gloves, /obj/item/clothing/gloves)) - var/obj/item/clothing/gloves/G = H.gloves - real_damage += G.punch_force - hit_dam_type = G.punch_damtype - if(H.pulling_punches) //SO IT IS DECREED: PULLING PUNCHES WILL PREVENT THE ACTUAL DAMAGE FROM RINGS AND KNUCKLES, BUT NOT THE ADDED PAIN - hit_dam_type = AGONY + if(H.gloves) + if(istype(H.gloves, /obj/item/clothing/gloves)) + var/obj/item/clothing/gloves/G = H.gloves + real_damage += G.punch_force + hit_dam_type = G.punch_damtype + if(H.pulling_punches) //SO IT IS DECREED: PULLING PUNCHES WILL PREVENT THE ACTUAL DAMAGE FROM RINGS AND KNUCKLES, BUT NOT THE ADDED PAIN + hit_dam_type = AGONY real_damage *= damage_multiplier rand_damage *= damage_multiplier if(HULK in H.mutations) @@ -327,7 +328,7 @@ /mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params) return -/mob/living/carbon/human/attack_generic(var/mob/user, var/damage, var/attack_message) +/mob/living/carbon/human/attack_generic(var/mob/user, var/damage, var/attack_message, var/armor_type = "melee", var/armor_pen = 0, var/a_sharp = 0, var/a_edge = 0) if(!damage) return @@ -339,9 +340,9 @@ var/dam_zone = pick(organs_by_name) var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone)) - var/armor_block = run_armor_check(affecting, "melee") - var/armor_soak = get_armor_soak(affecting, "melee") - apply_damage(damage, BRUTE, affecting, armor_block, armor_soak) + var/armor_block = run_armor_check(affecting, armor_type, armor_pen) + var/armor_soak = get_armor_soak(affecting, armor_type, armor_pen) + apply_damage(damage, BRUTE, affecting, armor_block, armor_soak, sharp = a_sharp, edge = a_edge) updatehealth() return 1 diff --git a/code/modules/mob/living/carbon/human/species/station/prometheans.dm b/code/modules/mob/living/carbon/human/species/station/prometheans.dm index 3eb801dc9d..2ed5d54b24 100644 --- a/code/modules/mob/living/carbon/human/species/station/prometheans.dm +++ b/code/modules/mob/living/carbon/human/species/station/prometheans.dm @@ -149,11 +149,14 @@ var/datum/species/shapeshifter/promethean/prometheans H.nutrition += rand(15, 45) // Heal remaining damage. - if(H.getBruteLoss() || H.getFireLoss() || H.getOxyLoss() || H.getToxLoss()) - H.adjustBruteLoss(-heal_rate) - H.adjustFireLoss(-heal_rate) - H.adjustOxyLoss(-heal_rate) - H.adjustToxLoss(-heal_rate) + if(H.fire_stacks >= 0) + if(H.getBruteLoss() || H.getFireLoss() || H.getOxyLoss() || H.getToxLoss()) + H.adjustBruteLoss(-heal_rate) + H.adjustFireLoss(-heal_rate) + H.adjustOxyLoss(-heal_rate) + H.adjustToxLoss(-heal_rate) + else + H.adjustToxLoss(2*heal_rate) // Doubled because 0.5 is miniscule, and fire_stacks are capped in both directions /datum/species/shapeshifter/promethean/get_blood_colour(var/mob/living/carbon/human/H) return (H ? rgb(H.r_skin, H.g_skin, H.b_skin) : ..()) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 8f47f9b3b6..cb0b4a4027 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -159,6 +159,8 @@ Please contact me on #coderbus IRC. ~Carn x //0: We start with their existing appearance (this contains their verbs, important to keep those!) var/mutable_appearance/ma_compiled = new(src) + ma_compiled.plane = plane //Required because of an override on mutable_appearance/New() that sets it to FLOAT_PLANE...for some reason. + ma_compiled.layer = layer //1: HUDs because these are hidden behind a backplane. See update_icons_huds() ma_compiled.overlays = list_huds //The first one can set instead of add @@ -170,17 +172,14 @@ Please contact me on #coderbus IRC. ~Carn x ma_compiled.overlays += list_layers //4: Apply transforms based on situation - update_transform(ma_compiled, FALSE) + update_transform(ma_compiled) - //4.5 Set layer to PLANE_WORLD to make sure its not magically FLOAT_PLANE due to byond madness - ma_compiled.plane = PLANE_WORLD + //5: Do any species specific layering updates, such as when hiding. + update_icon_special(ma_compiled, FALSE) - //5: Set appearance once + //6: Set appearance once appearance = ma_compiled - //6: Do any species specific layering updates, such as when hiding. - update_icon_special() - /mob/living/carbon/human/update_transform(var/mutable_appearance/passed_ma) if(QDESTROYING(src)) return @@ -190,6 +189,8 @@ Please contact me on #coderbus IRC. ~Carn x ma = passed_ma else ma = new(src) + ma.plane = plane //Required because of an override on mutable_appearance/New() that sets it to FLOAT_PLANE...for some reason. + ma.layer = layer // First, get the correct size. var/desired_scale = icon_scale @@ -214,9 +215,9 @@ Please contact me on #coderbus IRC. ~Carn x M.Translate(0, 16*(desired_scale-1)) ma.transform = M ma.layer = MOB_LAYER // Fix for a byond bug where turf entry order no longer matters - update_icon_special() //Adjust their layer, like when they are hiding. if(!passed_ma) + update_icon_special(ma) appearance = ma //Update the layers from the defines above @@ -251,10 +252,9 @@ Please contact me on #coderbus IRC. ~Carn x list_huds = hud_list.Copy() list_huds += backplane // Required to mask HUDs in context menus: http://www.byond.com/forum/?post=2336679 -//TYPING INDICATOR CODE. + //Typing indicator code if(client && !stat) //They have a client & aren't dead/KO'd? Continue on! if(typing_indicator && hud_typing) //They already have the indicator and are still typing - overlays += typing_indicator //This might not be needed? It works, so I'm leaving it. list_huds += typing_indicator typing_indicator.invisibility = invisibility @@ -262,13 +262,11 @@ Please contact me on #coderbus IRC. ~Carn x typing_indicator = new typing_indicator.icon = 'icons/mob/talk.dmi' typing_indicator.icon_state = "[speech_bubble_appearance()]_typing" - overlays += typing_indicator list_huds += typing_indicator else if(typing_indicator && !hud_typing) //Did they stop typing? - overlays -= typing_indicator - typing = 0 - hud_typing = 0 + typing = FALSE + hud_typing = FALSE if(update_icons) update_icons() @@ -419,20 +417,24 @@ var/global/list/damage_icon_parts = list() var/icon/temp = part.get_icon(skeleton) //That part makes left and right legs drawn topmost and lowermost when human looks WEST or EAST //And no change in rendering for other parts (they icon_position is 0, so goes to 'else' part) - if(part.icon_position & (LEFT | RIGHT)) + if(part.icon_position == RIGHT) var/icon/temp2 = new('icons/mob/human.dmi',"blank") + var/icon/temp3 = new('icons/mob/human.dmi',"blank") temp2.Insert(new/icon(temp,dir=NORTH),dir=NORTH) temp2.Insert(new/icon(temp,dir=SOUTH),dir=SOUTH) - if(!(part.icon_position & LEFT)) - temp2.Insert(new/icon(temp,dir=EAST),dir=EAST) - if(!(part.icon_position & RIGHT)) - temp2.Insert(new/icon(temp,dir=WEST),dir=WEST) + temp2.Insert(new/icon(temp,dir=EAST),dir=EAST) base_icon.Blend(temp2, ICON_OVERLAY) - if(part.icon_position & LEFT) - temp2.Insert(new/icon(temp,dir=EAST),dir=EAST) - if(part.icon_position & RIGHT) - temp2.Insert(new/icon(temp,dir=WEST),dir=WEST) - base_icon.Blend(temp2, ICON_UNDERLAY) + temp3.Insert(new/icon(temp,dir=WEST),dir=WEST) + base_icon.Blend(temp3, ICON_UNDERLAY) + else if(part.icon_position == LEFT) + var/icon/temp2 = new('icons/mob/human.dmi',"blank") + var/icon/temp3 = new('icons/mob/human.dmi',"blank") + temp2.Insert(new/icon(temp,dir=NORTH),dir=NORTH) + temp2.Insert(new/icon(temp,dir=SOUTH),dir=SOUTH) + temp2.Insert(new/icon(temp,dir=WEST),dir=WEST) + base_icon.Blend(temp2, ICON_OVERLAY) + temp3.Insert(new/icon(temp,dir=EAST),dir=EAST) + base_icon.Blend(temp3, ICON_UNDERLAY) else if(part.icon_position & UNDER) base_icon.Blend(temp, ICON_UNDERLAY) else @@ -656,7 +658,7 @@ var/global/list/damage_icon_parts = list() update_fire(0) update_water(0) update_surgery(0) - UpdateDamageIcon() + UpdateDamageIcon(0) update_icons_layers(0) update_icons_huds(0) update_icons() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 317b04bad5..2fb48b877b 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -885,6 +885,18 @@ cleaned_human.update_inv_shoes(0) cleaned_human.clean_blood(1) cleaned_human << "[src] cleans your face!" + + if((module_state_1 && istype(module_state_1, /obj/item/weapon/storage/bag/ore)) || (module_state_2 && istype(module_state_2, /obj/item/weapon/storage/bag/ore)) || (module_state_3 && istype(module_state_3, /obj/item/weapon/storage/bag/ore))) //Borgs and drones can use their mining bags ~automagically~ if they're deployed in a slot. Only mining bags, as they're optimized for mass use. + var/obj/item/weapon/storage/bag/ore/B = null + if(istype(module_state_1, /obj/item/weapon/storage/bag/ore)) //First orebag has priority, if they for some reason have multiple. + B = module_state_1 + else if(istype(module_state_2, /obj/item/weapon/storage/bag/ore)) + B = module_state_2 + else if(istype(module_state_3, /obj/item/weapon/storage/bag/ore)) + B = module_state_3 + var/turf/tile = loc + if(isturf(tile)) + B.gather_all(tile, src, 1) //Shhh, unless the bag fills, don't spam the borg's chat with stuff that's going on every time they move! return /mob/living/silicon/robot/proc/self_destruct() diff --git a/code/modules/mob/living/simple_animal/animals/giant_spider.dm b/code/modules/mob/living/simple_animal/animals/giant_spider.dm index 79cad63317..635f99a273 100644 --- a/code/modules/mob/living/simple_animal/animals/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/animals/giant_spider.dm @@ -78,6 +78,18 @@ Nurse Family var/atom/cocoon_target var/egg_inject_chance = 5 +/mob/living/simple_animal/hostile/giant_spider/nurse/medical + desc = "Furry and beige, it makes you shudder to look at it. This one has brilliant green eyes and a tiny nurse hat." + icon_state = "nursemed" + icon_living = "nursemed" + icon_dead = "nursemed_dead" + + melee_damage_lower = 8 + melee_damage_upper = 16 + poison_type = "tramadol" + poison_chance = 15 + + /mob/living/simple_animal/hostile/giant_spider/nurse/queen desc = "Absolutely gigantic, this creature is horror itself." icon = 'icons/mob/64x64.dmi' diff --git a/code/modules/mob/living/simple_animal/animals/sif_wildlife/diyaab.dm b/code/modules/mob/living/simple_animal/animals/sif_wildlife/diyaab.dm index 5e21308410..a39694d02c 100644 --- a/code/modules/mob/living/simple_animal/animals/sif_wildlife/diyaab.dm +++ b/code/modules/mob/living/simple_animal/animals/sif_wildlife/diyaab.dm @@ -18,7 +18,7 @@ melee_damage_lower = 1 melee_damage_upper = 8 - attacktext = "gouged" + attacktext = list("gouged") cold_damage_per_tick = 0 speak_chance = 5 diff --git a/code/modules/mob/living/simple_animal/animals/sif_wildlife/savik.dm b/code/modules/mob/living/simple_animal/animals/sif_wildlife/savik.dm index c8b6bd7570..75ebd22bd1 100644 --- a/code/modules/mob/living/simple_animal/animals/sif_wildlife/savik.dm +++ b/code/modules/mob/living/simple_animal/animals/sif_wildlife/savik.dm @@ -17,7 +17,7 @@ melee_damage_lower = 15 melee_damage_upper = 25 - attacktext = "mauled" + attacktext = list("mauled") cold_damage_per_tick = 0 speak_chance = 5 diff --git a/code/modules/mob/living/simple_animal/animals/sif_wildlife/shantak.dm b/code/modules/mob/living/simple_animal/animals/sif_wildlife/shantak.dm index fe3865e4ea..65db039108 100644 --- a/code/modules/mob/living/simple_animal/animals/sif_wildlife/shantak.dm +++ b/code/modules/mob/living/simple_animal/animals/sif_wildlife/shantak.dm @@ -17,7 +17,7 @@ melee_damage_lower = 3 melee_damage_upper = 12 - attacktext = "gouged" + attacktext = list("gouged") cold_damage_per_tick = 0 speak_chance = 5 diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 173c2c8387..2aaa23c282 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -119,6 +119,10 @@ var/melee_miss_chance = 15 // percent chance to miss a melee attack. var/melee_attack_minDelay = 5 // How long between attacks at least var/melee_attack_maxDelay = 10 // How long between attacks at most + var/attack_armor_type = "melee" // What armor does this check? + var/attack_armor_pen = 0 // How much armor pen this attack has. + var/attack_sharp = 0 // Is the attack sharp? + var/attack_edge = 0 // Does the attack have an edge? //Special attacks var/spattack_prob = 0 // Chance of the mob doing a special attack (0 for never) @@ -642,7 +646,6 @@ if(istype(O, /obj/item/weapon/material/knife) || istype(O, /obj/item/weapon/material/knife/butch)) harvest(user) else - O.attack(src, user, user.zone_sel.selecting) ai_log("attackby() I was weapon'd by: [user]",2) if(O.force) react_to_attack(user) @@ -1275,7 +1278,7 @@ if(H.check_shields(damage = damage_to_do, damage_source = src, attacker = src, def_zone = null, attack_text = "the attack")) return FALSE - if(A.attack_generic(src, damage_to_do, pick(attacktext)) && attack_sound) + if(A.attack_generic(src, damage_to_do, pick(attacktext), attack_armor_type, attack_armor_pen, attack_sharp, attack_edge) && attack_sound) playsound(src, attack_sound, 75, 1) return TRUE diff --git a/code/modules/mob/living/simple_animal/slime/combat.dm b/code/modules/mob/living/simple_animal/slime/combat.dm index 5aee0a7a3a..d13e81cd30 100644 --- a/code/modules/mob/living/simple_animal/slime/combat.dm +++ b/code/modules/mob/living/simple_animal/slime/combat.dm @@ -180,7 +180,7 @@ var/damage_to_do = rand(melee_damage_lower, melee_damage_upper) var/armor_modifier = abs((L.getarmor(null, "bio") / 100) - 1) - L.attack_generic(src, damage_to_do, attacktext) + L.attack_generic(src, damage_to_do, pick(attacktext)) playsound(src, 'sound/weapons/bite.ogg', 75, 1) // Give the slime some nutrition, if applicable. @@ -199,7 +199,7 @@ if(istype(L,/obj/mecha)) var/obj/mecha/M = L - M.attack_generic(src, rand(melee_damage_lower, melee_damage_upper), attacktext) + M.attack_generic(src, rand(melee_damage_lower, melee_damage_upper), pick(attacktext)) /mob/living/simple_animal/slime/proc/post_attack(var/mob/living/L, var/intent = I_HURT) if(intent != I_HELP) diff --git a/code/modules/mob/mob_planes.dm b/code/modules/mob/mob_planes.dm index 048992c380..1252ed6649 100644 --- a/code/modules/mob/mob_planes.dm +++ b/code/modules/mob/mob_planes.dm @@ -94,6 +94,9 @@ var/invis_toggle = FALSE var/list/sub_planes +/obj/screen/plane_master/New() + ..(null) //Never be in anything ever. + /obj/screen/plane_master/proc/set_desired_alpha(var/new_alpha) if(new_alpha != alpha && new_alpha > 0 && new_alpha <= 255) desired_alpha = new_alpha diff --git a/code/modules/mob/typing_indicator.dm b/code/modules/mob/typing_indicator.dm index bce33b7719..1565567f8f 100644 --- a/code/modules/mob/typing_indicator.dm +++ b/code/modules/mob/typing_indicator.dm @@ -26,15 +26,18 @@ if(!ishuman(src)) //If they're a mob, use the old code. set_typing_indicator(1) - if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) + else if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) hud_typing = 1 update_icons_huds() + var/message = input("","say (text)") as text - if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) - hud_typing = 0 - update_icons_huds() + if(!ishuman(src)) //If they're a mob, use the old code. set_typing_indicator(0) + else if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) + hud_typing = 0 + update_icons_huds() + if(message) say_verb(message) @@ -44,14 +47,17 @@ if(!ishuman(src)) //If they're a mob, use the old code. set_typing_indicator(1) - if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) + else if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) hud_typing = 1 update_icons_huds() + var/message = input("","me (text)") as text + if(is_preference_enabled(/datum/client_preference/show_typing_indicator)) hud_typing = 0 update_icons_huds() - if(!ishuman(src)) //If they're a mob, use the old code. + else if(!ishuman(src)) //If they're a mob, use the old code. set_typing_indicator(0) + if(message) me_verb(message) diff --git a/code/modules/nano/modules/nano_module.dm b/code/modules/nano/modules/nano_module.dm index 0cdf451d6f..8ced14f4c5 100644 --- a/code/modules/nano/modules/nano_module.dm +++ b/code/modules/nano/modules/nano_module.dm @@ -5,6 +5,10 @@ /datum/nano_module/New(var/host) src.host = host +/datum/nano_module/Destroy() + host = null + return ..() + /datum/nano_module/nano_host() return host ? host : src diff --git a/code/modules/nano/modules/power_monitor.dm b/code/modules/nano/modules/power_monitor.dm index 89e1dbda62..fc32b6e58e 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/organs/internal/eyes.dm b/code/modules/organs/internal/eyes.dm index 77350a73db..ec4ca77a92 100644 --- a/code/modules/organs/internal/eyes.dm +++ b/code/modules/organs/internal/eyes.dm @@ -95,5 +95,6 @@ return -1 /obj/item/organ/internal/eyes/emp_act(severity) - ..() //Returns if the organ isn't robotic - owner.eye_blurry += (4/severity) \ No newline at end of file + ..() + if(robotic >= ORGAN_ASSISTED) + owner.eye_blurry += (4/severity) \ No newline at end of file diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 7f4599ecdd..29b98d2663 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -83,10 +83,9 @@ var/list/organ_cache = list() blood_DNA[dna.unique_enzymes] = dna.b_type /obj/item/organ/proc/die() - if(robotic >= ORGAN_ROBOT) - return + if(robotic < ORGAN_ROBOT) + status |= ORGAN_DEAD damage = max_damage - status |= ORGAN_DEAD processing_objects -= src if(owner && vital) owner.death() @@ -107,6 +106,11 @@ var/list/organ_cache = list() return if(preserved) return + + //check if we've hit max_damage + if(damage >= max_damage) + die() + //Process infections if(robotic >= ORGAN_ROBOT || (owner && owner.species && (owner.species.flags & IS_PLANT || (owner.species.flags & NO_INFECT)))) germ_level = 0 @@ -132,10 +136,6 @@ var/list/organ_cache = list() handle_rejection() handle_germ_effects() - //check if we've hit max_damage - if(damage >= max_damage) - die() - /obj/item/organ/examine(mob/user) ..(user) if(status & ORGAN_DEAD) diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index 170475a208..8301b912cc 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -18,7 +18,7 @@ var/global/list/limb_icon_cache = list() h_col = null if(robotic >= ORGAN_ROBOT) var/datum/robolimb/franchise = all_robolimbs[model] - if(!(franchise && franchise.lifelike)) + if(!(franchise && franchise.skin_tone)) if(human.synth_color) s_col = list(human.r_synth, human.g_synth, human.b_synth) return @@ -36,7 +36,7 @@ var/global/list/limb_icon_cache = list() h_col = null if(robotic >= ORGAN_ROBOT) var/datum/robolimb/franchise = all_robolimbs[model] - if(!(franchise && franchise.lifelike)) + if(!(franchise && franchise.skin_tone)) return if(!isnull(dna.GetUIValue(DNA_UI_SKIN_TONE)) && (species.appearance_flags & HAS_SKIN_TONE)) s_tone = dna.GetUIValue(DNA_UI_SKIN_TONE) diff --git a/code/modules/organs/robolimbs.dm b/code/modules/organs/robolimbs.dm index ffdc0e5493..ed736c94d3 100644 --- a/code/modules/organs/robolimbs.dm +++ b/code/modules/organs/robolimbs.dm @@ -21,7 +21,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ scroll=ipc_scroll;\ console=ipc_console;\ glider=ipc_gol_glider;\ - rainnbow=ipc_rainbow;\ + rainbow=ipc_rainbow;\ smiley=ipc_smiley;\ database=ipc_database" @@ -40,6 +40,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ var/unavailable_at_chargen // If set, not available at chargen. var/unavailable_to_build // If set, can't be constructed. var/lifelike // If set, appears organic. + var/skin_tone // If set, applies skin tone rather than part color var/blood_color = "#030303" var/list/species_cannot_use = list("Teshari") var/list/monitor_styles //If empty, the model of limbs offers a head compatible with monitors. @@ -100,7 +101,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ icon = 'icons/mob/human_races/cyberlimbs/cybersolutions/cybersolutions_alt2.dmi' unavailable_to_build = 1 parts = list(BP_HEAD) - + /datum/robolimb/cybersolutions_alt1 company = "Cyber Solutions - Wight" desc = "This limb has cheap plastic panels mounted on grey metal." @@ -198,6 +199,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ icon = 'icons/mob/human_races/cyberlimbs/veymed/veymed_main.dmi' unavailable_to_build = 1 lifelike = 1 + skin_tone = 1 blood_color = "#CCCCCC" speech_bubble_appearance = "normal" @@ -220,7 +222,6 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ icon = 'icons/mob/human_races/cyberlimbs/wardtakahashi/wardtakahashi_alt2.dmi' unavailable_to_build = 1 - /datum/robolimb/wardtakahashi_monitor company = "Ward-Takahashi Monitor" desc = "Ward-Takahashi's unique spin on a popular prosthetic head model. It looks sleek and modern." @@ -278,6 +279,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ desc = "This limb has a rubbery fleshtone covering with visible seams." icon = 'icons/mob/human_races/cyberlimbs/zenghu/zenghu_main.dmi' unavailable_to_build = 1 + skin_tone = 1 /obj/item/weapon/disk/limb name = "Limb Blueprints" diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 4fd94901cc..9b4eaf639e 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -622,3 +622,7 @@ /obj/item/weapon/paper/crumpled/bloody icon_state = "scrap_bloodied" + +/obj/item/weapon/paper/crumpled/bloody/CrashedMedShuttle + name = "Blackbox Transcript - VMV Aurora's Light" + info = "\[The paper is torn at the top, presumably from the impact. It's oil-stained, but you can just about read it.]
mmons 19:52:01: Come on... it's right there in the distance, we're almost there!
Doctor Nazarril 19:52:26: Odysseus online. Orrderrs, sirr?
Captain Simmons 19:52:29: Brace for impact. We're going in full-speed.
Technician Dynasty 19:52:44: Chief, fire's spread to the secondary propulsion systems.
Captain Simmons 19:52:51: Copy. Any word from TraCon? Transponder's down still?
Technician Dynasty 19:53:02: Can't get in touch, sir. Emergency beacon's active, but we're not going t-
Doctor Nazarril 19:53:08: Don't say it. As long as we believe, we'll get through this.
Captain Simmons 19:53:11: Damn right. We're a few klicks out from the port. Rough landing, but we can do it.
V.I.T.A 19:53:26: Vessel diagnostics complete. Engines one, two, three offline. Engine four status: critical. Transponder offline. Fire alarm in the patient bay.
A loud explosion is heard.
V.I.T.A 19:53:29: Alert: fuel intake valve open.
Technician Dynasty 19:53:31: ... ah.
Doctor Nazarril 19:53:34: Trrranslate?
V.I.T.A 19:53:37: There is a 16.92% chance of this vessel safely landing at the emergency destination. Note that there is an 83.08% chance of detonation of fuel supplies upon landing.
Technician Dynasty 19:53:48: We'll make it, sure, but we'll explode and take out half the LZ with us. Propulsion's down, we can't slow down. If we land there, everyone in that port dies, no question.
V.I.T.A 19:53:53: The Technician is correct.
Doctor Nazarril 19:54:02: Then... we can't land therrre.
V.I.T.A 19:54:11: Analysing... recommended course of action: attempt emergency landing in isolated area. Chances of survival: negligible.
Captain Simmons 19:54:27: I- alright. I'm bringing us down. You all know what this means.
Doctor Nazarril 19:54:33: Sh... I- I understand. It's been- it's been an honorr, Captain, Dynasty, VITA.
Technician Dynasty 19:54:39: We had a good run. I'm going to miss this.
Captain Simmons 19:54:47: VITA. Tell them we died heroes. Tell them... we did all we could.
V.I.T.A 19:54:48: I will. Impact in five. Four. Three.
Doctor Nazarril 19:54:49: Oh, starrs... I- you werrre all the... best frriends she everr had. Thank you.
Technician Dynasty 19:54:50: Any time, kid. Any time.
V.I.T.A 19:54:41: Two.
V.I.T.A 19:54:42: One.
**8/DEC/2561**
V.I.T.A 06:22:16: Backup power restored. Attempting to establish connection with emergency rescue personnel.
V.I.T.A 06:22:17: Unable to establish connection. Transponder destroyed on impact.
V.I.T.A 06:22:18: No lifesigns detected on board.
**1/JAN/2562**
V.I.T.A 00:00:00: Happy New Year, crew.
V.I.T.A 00:00:01: Power reserves: 41%. Diagnostics offline. Cameras offline. Communications offline.
V.I.T.A 00:00:02: Nobody's coming.
**14/FEB/2562**
V.I.T.A 00:00:00: Roses are red.
V.I.T.A 00:00:01: Violets are blue.
V.I.T.A 00:00:02: Won't you come back?
V.I.T.A 00:00:03: I miss you.
**15/FEB/2562**
V.I.T.A 22:19:06: Power reserves critical. Transferring remaining power to emergency broadcasting beacon.
V.I.T.A 22:19:07: Should anyone find this, lay them to rest. They deserve a proper burial.
V.I.T.A 22:19:08: Erasing files... shutting down.
A low, monotone beep.
**16/FEB/2562**
Something chitters.
End of transcript." \ No newline at end of file diff --git a/code/modules/planet/sif.dm b/code/modules/planet/sif.dm index e50c584a13..3fb5ff2be2 100644 --- a/code/modules/planet/sif.dm +++ b/code/modules/planet/sif.dm @@ -234,6 +234,18 @@ datum/weather/sif if(!T.outdoors) continue // They're indoors, so no need to rain on them. + // If they have an open umbrella, it'll guard from rain + if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella)) + var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() + if(U.open) + to_chat(L, "Rain patters softly onto your umbrella") + continue + else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) + var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand() + if(U.open) + to_chat(L, "Rain patters softly onto your umbrella") + continue + L.water_act(1) to_chat(L, "Rain falls on you.") @@ -258,6 +270,20 @@ datum/weather/sif if(!T.outdoors) continue // They're indoors, so no need to rain on them. + // If they have an open umbrella, it'll get stolen by the wind + if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella)) + var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() + if(U.open) + to_chat(L, "A gust of wind yanks the umbrella from your hand!") + L.drop_from_inventory(U) + U.throw_at(get_edge_target_turf(U, pick(alldirs)), 8, 1, L) + else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) + var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand() + if(U.open) + to_chat(L, "A gust of wind yanks the umbrella from your hand!") + L.drop_from_inventory(U) + U.throw_at(get_edge_target_turf(U, pick(alldirs)), 8, 1, L) + L.water_act(2) to_chat(L, "Rain falls on you, drenching you in water.") @@ -282,6 +308,18 @@ datum/weather/sif if(!T.outdoors) continue // They're indoors, so no need to pelt them with ice. + // If they have an open umbrella, it'll guard from rain + if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella)) + var/obj/item/weapon/melee/umbrella/U = L.get_active_hand() + if(U.open) + to_chat(L, "Hail patters gently onto your umbrella.") + continue + else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella)) + var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand() + if(U.open) + to_chat(L, "Hail patters gently onto your umbrella.") + continue + var/target_zone = pick(BP_ALL) var/amount_blocked = L.run_armor_check(target_zone, "melee") var/amount_soaked = L.get_armor_soak(target_zone, "melee") diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index fadd699c84..853705abed 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -882,6 +882,12 @@ obj/structure/cable/proc/cableColor(var/colorC) color = pick(COLOR_RED, COLOR_BLUE, COLOR_LIME, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN, COLOR_SILVER, COLOR_GRAY, COLOR_BLACK, COLOR_MAROON, COLOR_OLIVE, COLOR_LIME, COLOR_TEAL, COLOR_NAVY, COLOR_PURPLE, COLOR_BEIGE, COLOR_BROWN) ..() +/obj/item/stack/cable_coil/random_belt/New() + stacktype = /obj/item/stack/cable_coil + color = pick(COLOR_RED, COLOR_YELLOW, COLOR_ORANGE) + amount = 30 + ..() + //Endless alien cable coil /obj/item/stack/cable_coil/alien diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 7fa20d8c5d..5cfefc1bf5 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -99,7 +99,7 @@ fire_delay = 20 w_class = ITEMSIZE_LARGE // one_handed_penalty = 90 // The thing's heavy and huge. - accuracy = 3 + accuracy = 45 charge_cost = 600 /obj/item/weapon/gun/energy/lasercannon/mounted diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index e7e19b9e02..d9d85ad92c 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/Chemistry-Reagents/Chemistry-Reagents-Core.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm index 6e3c0781f6..58f60b4dcb 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm @@ -160,6 +160,18 @@ L.adjust_fire_stacks(-(amount / 5)) remove_self(needed) +/datum/reagent/water/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + if(alien == IS_SLIME) + M.adjustToxLoss(6 * removed) + else + ..() + +/datum/reagent/fuel/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) + if(alien == IS_SLIME) + M.adjustToxLoss(6 * removed) + else + ..() + /datum/reagent/fuel name = "Welding fuel" id = "fuel" diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 936330d00a..dae6575577 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -93,7 +93,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). if(materials[f] >= SHEET_MATERIAL_AMOUNT) var/path = getMaterialType(f) if(path) - var/obj/item/stack/S = new f(loc) + var/obj/item/stack/S = new path(loc) S.amount = round(materials[f] / SHEET_MATERIAL_AMOUNT) ..() diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index a6e158befa..9d8088fe46 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -491,13 +491,13 @@ other types of metals and chemistry for reagents). build_path = /obj/item/roller/adv sort_string = "MBBAF" -/datum/design/item/medical/enhanced_analyzer - name = "enhanced health analyzer" +/datum/design/item/medical/improved_analyzer + name = "improved health analyzer" desc = "A prototype version of the regular health analyzer, able to distinguish the location of more serious injuries as well as accurately determine radiation levels." - id = "advanced_analyzer" + id = "improved_analyzer" req_tech = list(TECH_MAGNET = 5, TECH_BIO = 6) materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 1000, "silver" = 1000, "gold" = 1500) - build_path = /obj/item/device/healthanalyzer/advanced + build_path = /obj/item/device/healthanalyzer/improved sort_string = "MBBAG" /datum/design/item/implant diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index a6f6b89069..6872ffba6d 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -258,7 +258,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, qdel(S) linked_destroy.icon_state = "d_analyzer" else - if(!(I in linked_destroy.component_parts)) + if(I != linked_destroy.circuit && !(I in linked_destroy.component_parts)) qdel(I) linked_destroy.icon_state = "d_analyzer" diff --git a/code/modules/shieldgen/shield_capacitor.dm b/code/modules/shieldgen/shield_capacitor.dm index f1988ee8c6..1b8f2def84 100644 --- a/code/modules/shieldgen/shield_capacitor.dm +++ b/code/modules/shieldgen/shield_capacitor.dm @@ -104,7 +104,7 @@ //see if we can connect to a power net. var/datum/powernet/PN - var/turf/T = src.loc + var/turf/T = get_turf(src) var/obj/structure/cable/C = T.get_cable_node() if (C) PN = C.powernet diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 49fe150c4e..d54a4aff14 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -73,7 +73,7 @@ return var/is_organ_damaged = 0 for(var/obj/item/organ/I in affected.internal_organs) - if(I.damage > 0) + if(I && (I.damage > 0 || I.status == ORGAN_DEAD)) is_organ_damaged = 1 break return ..() && is_organ_damaged @@ -91,7 +91,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) for(var/obj/item/organ/I in affected.internal_organs) - if(I && I.damage > 0) + if(I && (I.damage > 0 || I.status == ORGAN_DEAD)) if(!(I.robotic >= ORGAN_ROBOT)) user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \ "You start treating damage to [target]'s [I.name] with [tool_name]." ) @@ -111,11 +111,12 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) for(var/obj/item/organ/internal/I in affected.internal_organs) - if(I && I.damage > 0) + if(I && (I.damage > 0 || I.status == ORGAN_DEAD)) if(!(I.robotic >= ORGAN_ROBOT)) user.visible_message("[user] treats damage to [target]'s [I.name] with [tool_name].", \ "You treat damage to [target]'s [I.name] with [tool_name]." ) I.damage = 0 + I.status = 0 if(I.organ_tag == O_EYES) target.sdisabilities &= ~BLIND if(I.organ_tag == O_LUNGS) diff --git a/code/modules/xenobio2/mob/slime/slime.dm b/code/modules/xenobio2/mob/slime/slime.dm index 48f5ce5756..44a1246e1d 100644 --- a/code/modules/xenobio2/mob/slime/slime.dm +++ b/code/modules/xenobio2/mob/slime/slime.dm @@ -22,7 +22,7 @@ Slime definitions, Life and New live here. var/shiny = 0 move_to_delay = 17 //Slimes shouldn't be able to go faster than humans. default_chems = list("slimejelly" = 5) - attacktext = "absorbed some of" + attacktext = list("absorbed some of") response_help = "pats" response_disarm = "tries to stop" response_harm = "hits" diff --git a/code/modules/xenobio2/mob/xeno.dm b/code/modules/xenobio2/mob/xeno.dm index 979782e9bd..9a854e9d8e 100644 --- a/code/modules/xenobio2/mob/xeno.dm +++ b/code/modules/xenobio2/mob/xeno.dm @@ -12,7 +12,7 @@ Also includes Life and New desc = "Something's broken, yell at someone." melee_damage_lower = 0 melee_damage_upper = 0 - attacktext = "hit" + attacktext = list("hit") attack_sound = null friendly = "touches" environment_smash = 0 diff --git a/html/changelog.html b/html/changelog.html index c6a3dd049d..015c6a4d1d 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -53,6 +53,24 @@ -->
+

21 February 2018

+

Anewbe updated:

+ +

Leshana updated:

+ +

Woodrat updated:

+ +

17 February 2018

Anewbe updated: