diff --git a/aurorastation.dme b/aurorastation.dme index 48f613ddabf..6104bdd7b2b 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -1724,6 +1724,7 @@ #include "code\modules\mob\living\carbon\human\species\station\slime.dm" #include "code\modules\mob\living\carbon\human\species\station\station.dm" #include "code\modules\mob\living\carbon\human\species\station\tajaran_subspecies.dm" +#include "code\modules\mob\living\carbon\human\species\station\unathi_subspecies.dm" #include "code\modules\mob\living\carbon\human\species\station\vaurca_subspecies.dm" #include "code\modules\mob\living\carbon\human\species\xenomorphs\alien_embryo.dm" #include "code\modules\mob\living\carbon\human\species\xenomorphs\alien_facehugger.dm" @@ -1961,6 +1962,7 @@ #include "code\modules\organs\pain.dm" #include "code\modules\organs\robolimbs.dm" #include "code\modules\organs\wound.dm" +#include "code\modules\organs\subtypes\autakh.dm" #include "code\modules\organs\subtypes\diona.dm" #include "code\modules\organs\subtypes\industrial.dm" #include "code\modules\organs\subtypes\machine.dm" diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm index d903908f89f..a00205b1c0c 100644 --- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm +++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm @@ -86,7 +86,7 @@ return 1 /obj/machinery/atmospherics/binary/circulator/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswrench(W)) + if (W.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) anchored = !anchored user.visible_message("[user.name] [anchored ? "secures" : "unsecures"] the bolts holding [src.name] to the floor.", \ diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm index dd3dbd4ca84..60a59fbe8c4 100644 --- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm +++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm @@ -11,15 +11,15 @@ desc = "A one-way air valve that can be used to regulate input or output pressure, and flow rate. Does not require power." use_power = 0 - interact_offline = 1 + interact_offline = 1 var/unlocked = 0 //If 0, then the valve is locked closed, otherwise it is open(-able, it's a one-way valve so it closes if gas would flow backwards). var/target_pressure = ONE_ATMOSPHERE var/max_pressure_setting = 15000 //kPa var/set_flow_rate = ATMOS_DEFAULT_VOLUME_PUMP * 2.5 var/regulate_mode = REGULATE_OUTPUT - + var/flowing = 0 //for icons - becomes zero if the valve closes itself due to regulation mode - + var/frequency = 0 var/id = null var/datum/radio_frequency/radio_connection @@ -46,9 +46,9 @@ /obj/machinery/atmospherics/binary/passive_gate/machinery_process() ..() - + last_flow_rate = 0 - + if(!unlocked) return 0 @@ -61,35 +61,35 @@ pressure_delta = input_starting_pressure - target_pressure if (REGULATE_OUTPUT) pressure_delta = target_pressure - output_starting_pressure - + //-1 if pump_gas() did not move any gas, >= 0 otherwise var/returnval = -1 if((regulate_mode == REGULATE_NONE || pressure_delta > 0.01) && (air1.temperature > 0 || air2.temperature > 0)) //since it's basically a valve, it makes sense to check both temperatures flowing = 1 - + //flow rate limit var/transfer_moles = (set_flow_rate/air1.volume)*air1.total_moles - + //Figure out how much gas to transfer to meet the target pressure. switch (regulate_mode) if (REGULATE_INPUT) transfer_moles = min(transfer_moles, calculate_transfer_moles(air2, air1, pressure_delta, (network1)? network1.volume : 0)) if (REGULATE_OUTPUT) transfer_moles = min(transfer_moles, calculate_transfer_moles(air1, air2, pressure_delta, (network2)? network2.volume : 0)) - + //pump_gas() will return a negative number if no flow occurred returnval = pump_gas_passive(src, air1, air2, transfer_moles) - + if (returnval >= 0) if(network1) network1.update = 1 if(network2) network2.update = 1 - + if (last_flow_rate) flowing = 1 - + update_icon() @@ -176,7 +176,7 @@ // this is the data which will be sent to the ui var/data[0] - + data = list( "on" = unlocked, "pressure_set" = round(target_pressure*100), //Nano UI can't handle rounded non-integers, apparently. @@ -201,16 +201,16 @@ /obj/machinery/atmospherics/binary/passive_gate/Topic(href,href_list) if(..()) return 1 - + if(href_list["toggle_valve"]) unlocked = !unlocked - + if(href_list["regulate_mode"]) switch(href_list["regulate_mode"]) if ("off") regulate_mode = REGULATE_NONE if ("input") regulate_mode = REGULATE_INPUT if ("output") regulate_mode = REGULATE_OUTPUT - + switch(href_list["set_press"]) if ("min") target_pressure = 0 @@ -219,7 +219,7 @@ if ("set") var/new_pressure = input(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure Control",src.target_pressure) as num src.target_pressure = between(0, new_pressure, max_pressure_setting) - + switch(href_list["set_flow_rate"]) if ("min") set_flow_rate = 0 @@ -228,14 +228,14 @@ if ("set") var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[air1.volume]kPa)","Flow Rate Control",src.set_flow_rate) as num src.set_flow_rate = between(0, new_flow_rate, air1.volume) - + usr.set_machine(src) //Is this even needed with NanoUI? src.update_icon() src.add_fingerprint(usr) return /obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!iswrench(W)) + if (!W.iswrench()) return ..() if (unlocked) user << "You cannot unwrench \the [src], turn it off first." diff --git a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm index d70c09d2753..130860e3068 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm @@ -86,7 +86,7 @@ add_overlay("hi-turb") attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswrench(W)) + if(W.iswrench()) anchored = !anchored user << "You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor." @@ -260,7 +260,7 @@ attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswrench(W)) + if(W.iswrench()) anchored = !anchored turbine = null user << "You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor." diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index 99767fba79f..19abd9c406d 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -214,7 +214,7 @@ Thus, the two variables affect pump operation are set in New(): update_icon() /obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!iswrench(W)) + if (!W.iswrench()) return ..() if (!(stat & NOPOWER) && use_power) user << "You cannot unwrench this [src], turn it off first." diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm index ac642d46db6..da4e98112f3 100644 --- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm +++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm @@ -83,7 +83,7 @@ update_icon() /obj/machinery/atmospherics/omni/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if(!iswrench(W)) + if(!W.iswrench()) return ..() var/int_pressure = 0 @@ -115,7 +115,7 @@ /obj/machinery/atmospherics/omni/proc/update_port_icons() if(!check_icon_cache()) return - + on_states.Cut() off_states.Cut() diff --git a/code/ATMOSPHERICS/components/portables_connector.dm b/code/ATMOSPHERICS/components/portables_connector.dm index 11d9cd4485f..31928fe6a21 100644 --- a/code/ATMOSPHERICS/components/portables_connector.dm +++ b/code/ATMOSPHERICS/components/portables_connector.dm @@ -131,7 +131,7 @@ /obj/machinery/atmospherics/portables_connector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!iswrench(W)) + if (!W.iswrench()) return ..() if (connected_device) user << "You cannot unwrench \the [src], dettach \the [connected_device] first." diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index 13874d63312..2a25db5dd22 100755 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -129,7 +129,7 @@ ..() /obj/machinery/atmospherics/trinary/filter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!iswrench(W)) + if (!W.iswrench()) return ..() var/datum/gas_mixture/int_air = return_air() var/datum/gas_mixture/env_air = loc.return_air() diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm index 026d1155d0a..1856fe1bc20 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm @@ -104,7 +104,7 @@ return 1 /obj/machinery/atmospherics/trinary/mixer/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!iswrench(W)) + if (!W.iswrench()) return ..() var/datum/gas_mixture/int_air = return_air() var/datum/gas_mixture/env_air = loc.return_air() diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm index 493b62b5764..4e1fecd0000 100644 --- a/code/ATMOSPHERICS/components/tvalve.dm +++ b/code/ATMOSPHERICS/components/tvalve.dm @@ -342,7 +342,7 @@ go_to_side() /obj/machinery/atmospherics/tvalve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!iswrench(W)) + if (!W.iswrench()) return ..() if (istype(src, /obj/machinery/atmospherics/tvalve/digital)) user << "You cannot unwrench \the [src], it's too complicated." diff --git a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm index 636de1aa4d7..08e9bab664e 100644 --- a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm +++ b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm @@ -66,7 +66,7 @@ return 1 attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!iswrench(W)) + if (!W.iswrench()) return ..() var/turf/T = src.loc if (level==1 && isturf(T) && !T.is_plating()) diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index f01132dd5bd..c1258d7874d 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -345,7 +345,7 @@ return /obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/W, mob/user) - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if (!WT.welding) user << "\The [WT] must be turned on!" @@ -385,7 +385,7 @@ update_icon() /obj/machinery/atmospherics/unary/vent_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!iswrench(W)) + if (!W.iswrench()) return ..() if (!(stat & NOPOWER) && use_power) user << "You cannot unwrench \the [src], turn it off first." diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index 779e6e9301e..d240e1de9cd 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -113,7 +113,7 @@ "filter_n2o" = ("sleeping_agent" in scrubbing_gas), "sigtype" = "status" ) - + var/area/A = get_area(src) if(!A.air_scrub_names[id_tag]) var/new_name = "[A.name] Air Scrubber #[A.air_scrub_names.len+1]" @@ -253,7 +253,7 @@ update_icon() /obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (iswrench(W)) + if (W.iswrench()) if (!(stat & NOPOWER) && use_power) user << "You cannot unwrench \the [src], turn it off first." return 1 @@ -278,7 +278,7 @@ qdel(src) return 1 - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if (!WT.welding) user << "\The [WT] must be turned on!" @@ -314,5 +314,5 @@ if(initial_loc) initial_loc.air_scrub_info -= id_tag initial_loc.air_scrub_names -= id_tag - + return ..() diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm index dedf6950ccd..ae077113e4f 100644 --- a/code/ATMOSPHERICS/components/valve.dm +++ b/code/ATMOSPHERICS/components/valve.dm @@ -300,7 +300,7 @@ open() /obj/machinery/atmospherics/valve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!iswrench(W)) + if (!W.iswrench()) return ..() if (istype(src, /obj/machinery/atmospherics/valve/digital)) user << "You cannot unwrench \the [src], it's too complicated." diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index ec3e54f48c2..d3b9755c215 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -80,7 +80,7 @@ if(istype(W,/obj/item/device/pipe_painter)) return 0 - if (!iswrench(W) && !istype(W, /obj/item/weapon/pipewrench)) + if (!W.iswrench() && !istype(W, /obj/item/weapon/pipewrench)) return ..() var/turf/T = src.loc if (level==1 && isturf(T) && !T.is_plating()) diff --git a/code/__defines/_macros.dm b/code/__defines/_macros.dm index 1dba4b5b9c9..4150fea9b72 100644 --- a/code/__defines/_macros.dm +++ b/code/__defines/_macros.dm @@ -42,20 +42,6 @@ #define isslime(A) istype(A, /mob/living/carbon/slime) -#define isscrewdriver(A) istype(A, /obj/item/weapon/screwdriver) - -#define iswrench(A) istype(A, /obj/item/weapon/wrench) - -#define iswelder(A) istype(A, /obj/item/weapon/weldingtool) - -#define iscoil(A) istype(A, /obj/item/stack/cable_coil) - -#define iswirecutter(A) istype(A, /obj/item/weapon/wirecutters) - -#define ismultitool(A) istype(A, /obj/item/device/multitool) - -#define iscrowbar(A) istype(A, /obj/item/weapon/crowbar) - #define iscapacitor(A) istype(A, /obj/item/weapon/stock_parts/capacitor) #define ismicrolaser(A) istype(A, /obj/item/weapon/stock_parts/micro_laser) diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index 34a869df7fa..6f6acc0c3aa 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -224,6 +224,7 @@ #define PROSTHETIC_HI "Hephaestus Industries" #define PROSTHETIC_XMG "Xion Manufacturing Group" #define PROSTHETIC_DIONA "Unknown Model" +#define PROSTHETIC_AUTAKH "Aut'akh Manufactured" //Brain Damage defines #define BRAIN_DAMAGE_MILD 10 diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index d25e910cf8f..958e21d2a82 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -213,3 +213,4 @@ Proc for attack log creation, because really why not // Returns true if the mob was removed form the dead list /mob/proc/remove_from_dead_mob_list() return dead_mob_list.Remove(src) + diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 54c7badfdf2..edd9555157d 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -876,9 +876,9 @@ proc/is_hot(obj/item/W as obj) if(W.sharp) return 1 return ( \ W.sharp || \ - isscrewdriver(W) || \ + W.isscrewdriver() || \ istype(W, /obj/item/weapon/pen) || \ - iswelder(W) || \ + W.iswelder() || \ istype(W, /obj/item/weapon/flame/lighter/zippo) || \ istype(W, /obj/item/weapon/flame/match) || \ istype(W, /obj/item/clothing/mask/smokable/cigarette) || \ @@ -1159,6 +1159,27 @@ var/list/wall_items = typecacheof(list( user << "You need to be holding [src] to do that." return USE_FAIL_NOT_IN_USER +/obj/proc/iswrench() + return FALSE + +/obj/proc/isscrewdriver() + return FALSE + +/obj/proc/iswirecutter() + return FALSE + +/obj/proc/ismultitool() + return FALSE + +/obj/proc/iscrowbar() + return FALSE + +/obj/proc/iswelder() + return FALSE + +/obj/proc/iscoil() + return FALSE + #undef NOT_FLAG #undef HAS_FLAG @@ -1170,3 +1191,4 @@ var/list/wall_items = typecacheof(list( else if (istype(A.loc, /obj/item/rig_module)) return 0 return 1 + diff --git a/code/_onclick/hud/action.dm b/code/_onclick/hud/action.dm index 3dc8ef31545..8affc5eaeeb 100644 --- a/code/_onclick/hud/action.dm +++ b/code/_onclick/hud/action.dm @@ -2,6 +2,7 @@ #define AB_SPELL 2 #define AB_INNATE 3 #define AB_GENERIC 4 +#define AB_ITEM_USE_ICON 5 #define AB_CHECK_RESTRAINED 1 #define AB_CHECK_STUNNED 2 @@ -19,7 +20,7 @@ var/processing = 0 var/active = 0 var/obj/screen/movable/action_button/button = null - var/button_icon = 'icons/mob/actions.dmi' + var/button_icon = 'icons/obj/action_buttons/actions.dmi' var/button_icon_state = "default" var/background_icon_state = "bg_default" var/mob/living/owner @@ -32,6 +33,9 @@ Remove(owner) return ..() +/datum/action/proc/SetTarget(var/atom/Target) + target = Target + /datum/action/proc/Grant(mob/living/T) if(owner) if(owner == T) @@ -57,7 +61,7 @@ if(!Checks()) return switch(action_type) - if(AB_ITEM) + if(AB_ITEM, AB_ITEM_USE_ICON) if(target) var/obj/item/item = target item.ui_action_click() @@ -152,7 +156,7 @@ //Hide/Show Action Buttons ... Button /obj/screen/movable/action_button/hide_toggle name = "Hide Buttons" - icon = 'icons/mob/actions.dmi' + icon = 'icons/obj/action_buttons/actions.dmi' icon_state = "bg_default" var/hidden = 0 @@ -217,6 +221,16 @@ /datum/action/item_action/hands_free check_flags = AB_CHECK_ALIVE|AB_CHECK_INSIDE +/datum/action/item_action/organ + action_type = AB_ITEM_USE_ICON + button_icon = 'icons/obj/action_buttons/organs.dmi' + +/datum/action/item_action/organ/SetTarget(var/atom/Target) + . = ..() + var/obj/item/organ/O = target + if(istype(O)) + O.refresh_action_button() + #undef AB_WEST_OFFSET #undef AB_NORTH_OFFSET #undef AB_MAX_COLUMNS diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index 2459ba817e8..13d97177c0a 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -117,14 +117,14 @@ var/list/wireColours = list("red", "blue", "green", "darkred", "orange", "brown" var/obj/item/I = L.get_active_hand() holder.add_hiddenprint(L) if(href_list["cut"]) // Toggles the cut/mend status - if(iswirecutter(I)) + if(I.iswirecutter()) var/colour = href_list["cut"] CutWireColour(colour) else L << "You need wirecutters!" else if(href_list["pulse"]) - if(ismultitool(I)) + if(I.ismultitool()) var/colour = href_list["pulse"] PulseColour(colour) else diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 8b39cc400e1..a98f6d46776 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -496,7 +496,7 @@ matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) /obj/item/weapon/module/power_control/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (ismultitool(W)) + if (W.ismultitool()) var/obj/item/weapon/circuitboard/ghettosmes/newcircuit = new/obj/item/weapon/circuitboard/ghettosmes(user.loc) qdel(src) user.put_in_hands(newcircuit) @@ -579,7 +579,7 @@ icon_state = "neuralbroke" /obj/item/weapon/neuralbroke/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(isscrewdriver(W)) + if(W.isscrewdriver()) new /obj/item/device/encryptionkey/hivenet(user.loc) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You bypass the fried security chip and extract the encryption key." diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 10baf8dc5b7..95537f96cfd 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -83,7 +83,7 @@ /obj/machinery/dna_scannernew/proc/eject_occupant() src.go_out() for(var/obj/O in src) - if((!istype(O,/obj/item/weapon/reagent_containers)) && (!istype(O,/obj/item/weapon/circuitboard/clonescanner)) && (!istype(O,/obj/item/weapon/stock_parts)) && (!iscoil(O))) + if((!istype(O,/obj/item/weapon/reagent_containers)) && (!istype(O,/obj/item/weapon/circuitboard/clonescanner)) && (!istype(O,/obj/item/weapon/stock_parts)) && (!O.iscoil())) O.forceMove(get_turf(src))//Ejects items that manage to get in there (exluding the components) if(!occupant) for(var/mob/M in src)//Failsafe so you can get mobs out diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm index efb99651249..0ece89258fc 100644 --- a/code/game/machinery/CableLayer.dm +++ b/code/game/machinery/CableLayer.dm @@ -27,7 +27,7 @@ return /obj/machinery/cablelayer/attackby(var/obj/item/O as obj, var/mob/user as mob) - if(iscoil(O)) + if(O.iscoil()) var/result = load_cable(O) if(!result) @@ -36,7 +36,7 @@ user << "You load [result] lengths of cable into [src]." return - if(iswirecutter(O)) + if(O.iswirecutter()) if(cable && cable.amount) var/m = round(input(usr,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 1) m = min(m, cable.amount) @@ -74,7 +74,7 @@ visible_message("A red light flashes on \the [src].") return cable.use(amount) - if(QDELETED(cable)) + if(QDELETED(cable)) cable = null return 1 diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 5d4069d71ad..d0f3868fa5f 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -180,7 +180,7 @@ update_icon() qdel(G) return - else if(isscrewdriver(I)) + else if(I.isscrewdriver()) user << "You [panel_open ? "open" : "close"] the maintenance panel." panel_open = !panel_open diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 1dbbc5687c4..bb098fd517d 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -750,13 +750,13 @@ switch(buildstage) if(2) - if(isscrewdriver(W)) // Opening that Air Alarm up. + if(W.isscrewdriver()) // Opening that Air Alarm up. wiresexposed = !wiresexposed user << "You [wiresexposed ? "open" : "close"] the maintenance panel." update_icon() return - if (wiresexposed && iswirecutter(W)) + if (wiresexposed && W.iswirecutter()) user.visible_message("[user] has cut the wires inside \the [src]!", "You cut the wires inside \the [src].") playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) new/obj/item/stack/cable_coil(get_turf(src), 5) @@ -777,7 +777,7 @@ return if(1) - if(iscoil(W)) + if(W.iscoil()) var/obj/item/stack/cable_coil/C = W if (C.use(5)) user << "You wire \the [src]." @@ -789,7 +789,7 @@ user << "You need 5 pieces of cable to do wire \the [src]." return - else if(iscrowbar(W)) + else if(W.iscrowbar()) user << "You start prying out the circuit." playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) if(do_after(user,20)) @@ -807,7 +807,7 @@ update_icon() return - else if(iswrench(W)) + else if(W.iswrench()) user << "You remove the air alarm assembly from the wall!" new /obj/item/frame/air_alarm(get_turf(user)) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index ee702530b86..c2e9ef46251 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -260,7 +260,7 @@ update_flag valve_open = !valve_open /obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if(!iswrench(W) && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda)) + if(!W.iswrench() && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda)) visible_message("\The [user] hits \the [src] with \a [W]!") src.health -= W.force src.add_fingerprint(user) diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm index 87551069b85..f640dc63e29 100644 --- a/code/game/machinery/atmoalter/meter.dm +++ b/code/game/machinery/atmoalter/meter.dm @@ -64,13 +64,13 @@ /obj/machinery/meter/examine(mob/user) var/t = "A gas flow meter. " - + if(get_dist(user, src) > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/abstract))) t += "You are too far away to read it." - + else if(stat & (NOPOWER|BROKEN)) t += "The display is off." - + else if(src.target) var/datum/gas_mixture/environment = target.return_air() if(environment) @@ -79,7 +79,7 @@ t += "The sensor error light is blinking." else t += "The connect error light is blinking." - + user << t /obj/machinery/meter/Click() @@ -87,11 +87,11 @@ if(istype(usr, /mob/living/silicon/ai)) // ghosts can call ..() for examine usr.examinate(src) return 1 - + return ..() /obj/machinery/meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!iswrench(W)) + if (!W.iswrench()) return ..() playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You begin to unfasten \the [src]..." diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm index 3e87b2b767a..60222703017 100644 --- a/code/game/machinery/atmoalter/portable_atmospherics.dm +++ b/code/game/machinery/atmoalter/portable_atmospherics.dm @@ -108,7 +108,7 @@ update_icon() return - else if (iswrench(W)) + else if (W.iswrench()) if(connected_port) disconnect() user << "You disconnect \the [src] from the port." @@ -166,7 +166,7 @@ power_change() return - if(isscrewdriver(I)) + if(I.isscrewdriver()) if(!cell) user << "There is no power cell installed." return diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index 4e3cf1a65a2..faf89138a08 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -206,7 +206,7 @@ update_connected_network() /obj/machinery/portable_atmospherics/powered/scrubber/huge/attackby(var/obj/item/I as obj, var/mob/user as mob) - if(iswrench(I)) + if(I.iswrench()) if(on) user << "Turn \the [src] off first!" return @@ -220,7 +220,7 @@ //doesn't use power cells if(istype(I, /obj/item/weapon/cell)) return - if (isscrewdriver(I)) + if (I.isscrewdriver()) return //doesn't hold tanks @@ -234,7 +234,7 @@ name = "Stationary Air Scrubber" /obj/machinery/portable_atmospherics/powered/scrubber/huge/stationary/attackby(var/obj/item/I as obj, var/mob/user as mob) - if(iswrench(I)) + if(I.iswrench()) user << "The bolts are too tight for you to unscrew!" return diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 2795965cb44..419c7e53b5c 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -134,7 +134,7 @@ if(panel_open) //Don't eat multitools or wirecutters used on an open lathe. - if(ismultitool(O) || iswirecutter(O)) + if(O.ismultitool() || O.iswirecutter()) attack_hand(user) return diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm index d4d4b4df83f..7fa19e019ef 100644 --- a/code/game/machinery/bots/bots.dm +++ b/code/game/machinery/bots/bots.dm @@ -55,11 +55,11 @@ return /obj/machinery/bot/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(isscrewdriver(W)) + if(W.isscrewdriver()) if(!locked) open = !open user << "Maintenance panel is now [src.open ? "opened" : "closed"]." - else if(iswelder(W)) + else if(W.iswelder()) if(health < maxhealth) if(open) health = min(maxhealth, health+10) @@ -118,7 +118,7 @@ pulse2.set_dir(pick(cardinal)) QDEL_IN(pulse2, 10) - + if (on) turn_off() addtimer(CALLBACK(src, .proc/post_emp, was_on), severity * 300) diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index 6bf6ec17aa2..08410b7355b 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -93,7 +93,7 @@ user.drop_from_inventory(C,src) cell = C updateDialog() - else if(isscrewdriver(I)) + else if(I.isscrewdriver()) if(locked) user << "The maintenance hatch cannot be opened or closed while the controls are locked." return @@ -108,7 +108,7 @@ icon_state = "mulebot0" updateDialog() - else if (iswrench(I)) + else if (I.iswrench()) if (src.health < maxhealth) src.health = min(maxhealth, src.health+25) user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 2c3adecc3d3..471cde9c291 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -130,7 +130,7 @@ /obj/machinery/camera/attackby(obj/W as obj, mob/living/user as mob) update_coverage() // DECONSTRUCTION - if(isscrewdriver(W)) + if(W.isscrewdriver()) //user << "You start to [panel_open ? "close" : "open"] the camera's panel." //if(toggle_panel(user)) // No delay because no one likes screwdrivers trying to be hip and have a duration cooldown panel_open = !panel_open @@ -138,10 +138,10 @@ "You screw the camera's panel [panel_open ? "open" : "closed"].") playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - else if((iswirecutter(W) || ismultitool(W)) && panel_open) + else if((W.iswirecutter() || W.ismultitool()) && panel_open) interact(user) - else if(iswelder(W) && (wires.CanDeconstruct() || (stat & BROKEN))) + else if(W.iswelder() && (wires.CanDeconstruct() || (stat & BROKEN))) if(weld(W, user)) if(assembly) assembly.forceMove(src.loc) diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 10a60010adf..6c36961a55e 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -29,7 +29,7 @@ if(0) // State 0 - if(iswrench(W) && isturf(src.loc)) + if(W.iswrench() && isturf(src.loc)) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You wrench the assembly into place." anchored = 1 @@ -40,14 +40,14 @@ if(1) // State 1 - if(iswelder(W)) + if(W.iswelder()) if(weld(W, user)) user << "You weld the assembly securely into place." anchored = 1 state = 2 return - else if(iswrench(W)) + else if(W.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You unattach the assembly from its place." anchored = 0 @@ -57,7 +57,7 @@ if(2) // State 2 - if(iscoil(W)) + if(W.iscoil()) var/obj/item/stack/cable_coil/C = W if(C.use(2)) user << "You add wires to the assembly." @@ -66,7 +66,7 @@ user << "You need 2 coils of wire to wire the assembly." return - else if(iswelder(W)) + else if(W.iswelder()) if(weld(W, user)) user << "You unweld the assembly from its place." @@ -77,7 +77,7 @@ if(3) // State 3 - if(isscrewdriver(W)) + if(W.isscrewdriver()) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: Station,Security,Secret", "Set Network", camera_network ? camera_network : NETWORK_STATION)) @@ -115,7 +115,7 @@ break return - else if(iswirecutter(W)) + else if(W.iswirecutter()) new/obj/item/stack/cable_coil(get_turf(src), 2) playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) @@ -132,7 +132,7 @@ return // Taking out upgrades - else if(iscrowbar(W) && upgrades.len) + else if(W.iscrowbar() && upgrades.len) var/obj/U = locate(/obj) in upgrades if(U) user << "You unattach an upgrade from the assembly." diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 0415dc6528b..99c9509be6e 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -57,7 +57,7 @@ user.visible_message("[user] inserts a cell into the charger.", "You insert a cell into the charger.") chargelevel = -1 update_icon() - else if(iswrench(W)) + else if(W.iswrench()) if(charging) user << "Remove the cell first!" return diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 6ac039a4334..388f1d5dfab 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -238,7 +238,7 @@ user.drop_from_inventory(W,src) qdel(W) return - else if(iswrench(W)) + else if(W.iswrench()) if(locked && (anchored || occupant)) user << "Can not do that while [src] is in use." else diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 7d4fe3e05f1..97f9533ca66 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -14,13 +14,13 @@ switch(state) if(0) - if(iswrench(P)) + if(P.iswrench()) playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) if(do_after(user, 20)) user << "You wrench the frame into place." anchored = 1 state = 1 - if(iswelder(P)) + if(P.iswelder()) var/obj/item/weapon/weldingtool/WT = P if(!WT.isOn()) user << "The welder must be on for this task." @@ -32,7 +32,7 @@ new /obj/item/stack/material/plasteel( loc, 4) qdel(src) if(1) - if(iswrench(P)) + if(P.iswrench()) playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) if(do_after(user, 20)) user << "You unfasten the frame." @@ -44,12 +44,12 @@ icon_state = "1" circuit = P user.drop_from_inventory(P,src) - if(isscrewdriver(P) && circuit) + if(P.isscrewdriver() && circuit) playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You screw the circuit board into place." state = 2 icon_state = "2" - if(iscrowbar(P) && circuit) + if(P.iscrowbar() && circuit) playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) user << "You remove the circuit board." state = 1 @@ -57,12 +57,12 @@ circuit.forceMove(loc) circuit = null if(2) - if(isscrewdriver(P) && circuit) + if(P.isscrewdriver() && circuit) playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You unfasten the circuit board." state = 1 icon_state = "1" - if(iscoil(P)) + if(P.iscoil()) var/obj/item/stack/cable_coil/C = P if (C.get_amount() < 5) user << "You need five coils of wire to add them to the frame." @@ -76,7 +76,7 @@ user << "You add cables to the frame." return if(3) - if(iswirecutter(P)) + if(P.iswirecutter()) if (brain) user << "Get that brain out of there first" else @@ -143,7 +143,7 @@ usr << "Added [P]." icon_state = "3b" - if(iscrowbar(P) && brain) + if(P.iscrowbar() && brain) playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) user << "You remove the brain." brain.forceMove(loc) @@ -151,7 +151,7 @@ icon_state = "3" if(4) - if(iscrowbar(P)) + if(P.iscrowbar()) playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) user << "You remove the glass panel." state = 3 @@ -162,7 +162,7 @@ new /obj/item/stack/material/glass/reinforced( loc, 2 ) return - if(isscrewdriver(P)) + if(P.isscrewdriver()) playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You connect the monitor." if(!brain) @@ -225,7 +225,7 @@ else user << "ERROR: Unable to locate artificial intelligence." return - else if(iswrench(W)) + else if(W.iswrench()) if(anchored) user.visible_message("\The [user] starts to unbolt \the [src] from the plating...") if(!do_after(user,40)) diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 7daddf02f6b..9a70d0cc713 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -13,13 +13,13 @@ /obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob) switch(state) if(0) - if(iswrench(P)) + if(P.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) if(do_after(user, 20)) user << "You wrench the frame into place." src.anchored = 1 src.state = 1 - if(iswelder(P)) + if(P.iswelder()) var/obj/item/weapon/weldingtool/WT = P if(!WT.remove_fuel(0, user)) user << "The welding tool must be on to complete this task." @@ -31,7 +31,7 @@ new /obj/item/stack/material/steel( src.loc, 5 ) qdel(src) if(1) - if(iswrench(P)) + if(P.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) if(do_after(user, 20)) user << "You unfasten the frame." @@ -47,12 +47,12 @@ user.drop_from_inventory(P,src) else user << "This frame does not accept circuit boards of this type!" - if(isscrewdriver(P) && circuit) + if(P.isscrewdriver() && circuit) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You screw the circuit board into place and screw the drawer shut." src.state = 2 src.icon_state = "2" - if(iscrowbar(P) && circuit) + if(P.iscrowbar() && circuit) playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) user << "You remove the circuit board." src.state = 1 @@ -60,12 +60,12 @@ circuit.forceMove(src.loc) src.circuit = null if(2) - if(isscrewdriver(P) && circuit) + if(P.isscrewdriver() && circuit) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You unfasten the circuit board." src.state = 1 src.icon_state = "1" - if(iscoil(P)) + if(P.iscoil()) var/obj/item/stack/cable_coil/C = P if (C.get_amount() < 5) user << "You need five coils of wire to add them to the frame." @@ -78,7 +78,7 @@ state = 3 icon_state = "3" if(3) - if(iswirecutter(P)) + if(P.iswirecutter()) playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) user << "You remove the cables." src.state = 2 @@ -99,13 +99,13 @@ src.state = 4 src.icon_state = "4" if(4) - if(iscrowbar(P)) + if(P.iscrowbar()) playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) user << "You remove the glass keyboard." src.state = 3 src.icon_state = "3" new /obj/item/stack/material/glass( src.loc, 2 ) - if(isscrewdriver(P)) + if(P.isscrewdriver()) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You connect the glass keyboard." var/B = new src.circuit.build_path ( src.loc ) diff --git a/code/game/machinery/computer/camera_circuit.dm b/code/game/machinery/computer/camera_circuit.dm index 60abd05a4bf..b6078a56c85 100644 --- a/code/game/machinery/computer/camera_circuit.dm +++ b/code/game/machinery/computer/camera_circuit.dm @@ -38,7 +38,7 @@ attackby(var/obj/item/I, var/mob/user)//if(health > 50) ..() - else if(isscrewdriver(I)) + else if(I.isscrewdriver()) secured = !secured user.visible_message("The [src] can [secured ? "no longer" : "now"] be modified.") updateBuildPath() diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 9d8f87fe887..50d0e485cbf 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -93,8 +93,8 @@ text = replacetext(text, "\n", "
") return text -/obj/machinery/computer/attackby(I as obj, user as mob) - if(isscrewdriver(I) && circuit) +/obj/machinery/computer/attackby(var/obj/I, user as mob) + if(I.isscrewdriver() && circuit) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) if(do_after(user, 20)) var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 04a17553b98..a201b5f181c 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -45,7 +45,7 @@ return if(!istype(user)) return - if(isscrewdriver(O) && emag) + if(O.isscrewdriver() && emag) //Stops people from just unscrewing the monitor and putting it back to get the console working again. user << "It is too hot to mess with!" return diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 4ef59b62ea0..62d6448e3f4 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -51,64 +51,6 @@ return return -/* -/obj/machinery/computer/pod/attackby(I as obj, user as mob) - if(isscrewdriver(I)) - playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - if(stat & BROKEN) - user << "The broken glass falls out." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc ) - new /obj/item/weapon/material/shard( loc ) - - //generate appropriate circuitboard. Accounts for /pod/old computer types - var/obj/item/weapon/circuitboard/pod/M = null - if(istype(src, /obj/machinery/computer/pod/old)) - M = new /obj/item/weapon/circuitboard/olddoor( A ) - if(istype(src, /obj/machinery/computer/pod/old/syndicate)) - M = new /obj/item/weapon/circuitboard/syndicatedoor( A ) - if(istype(src, /obj/machinery/computer/pod/old/swf)) - M = new /obj/item/weapon/circuitboard/swfdoor( A ) - else //it's not an old computer. Generate standard pod circuitboard. - M = new /obj/item/weapon/circuitboard/pod( A ) - - for (var/obj/C in src) - C.forceMove(loc) - M.id = id - A.circuit = M - A.state = 3 - A.icon_state = "3" - A.anchored = 1 - qdel(src) - else - user << "You disconnect the monitor." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc ) - - //generate appropriate circuitboard. Accounts for /pod/old computer types - var/obj/item/weapon/circuitboard/pod/M = null - if(istype(src, /obj/machinery/computer/pod/old)) - M = new /obj/item/weapon/circuitboard/olddoor( A ) - if(istype(src, /obj/machinery/computer/pod/old/syndicate)) - M = new /obj/item/weapon/circuitboard/syndicatedoor( A ) - if(istype(src, /obj/machinery/computer/pod/old/swf)) - M = new /obj/item/weapon/circuitboard/swfdoor( A ) - else //it's not an old computer. Generate standard pod circuitboard. - M = new /obj/item/weapon/circuitboard/pod( A ) - - for (var/obj/C in src) - C.forceMove(loc) - M.id = id - A.circuit = M - A.state = 4 - A.icon_state = "4" - A.anchored = 1 - qdel(src) - else - attack_hand(user) - return -*/ - - /obj/machinery/computer/pod/attack_ai(var/mob/user as mob) return attack_hand(user) diff --git a/code/game/machinery/computer/prisonshuttle.dm b/code/game/machinery/computer/prisonshuttle.dm index 60107416305..83ef5d1151c 100644 --- a/code/game/machinery/computer/prisonshuttle.dm +++ b/code/game/machinery/computer/prisonshuttle.dm @@ -27,7 +27,7 @@ var/prison_shuttle_timeleft = 0 return src.attack_hand(user) attackby(I as obj, user as mob) - if(isscrewdriver(I)) + if(I.isscrewdriver()) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) if(do_after(user, 20)) var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index b38521bd5be..87ed048b653 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -30,7 +30,7 @@ attackby(obj/item/P as obj, mob/user as mob) switch(state) if(1) - if(iscoil(P)) + if(P.iscoil()) var/obj/item/stack/cable_coil/C = P if (C.get_amount() < 5) user << "You need five lengths of cable to add them to the frame." @@ -43,7 +43,7 @@ state = 2 icon_state = "box_1" else - if(iswrench(P)) + if(P.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) user << "You dismantle the frame" new /obj/item/stack/material/steel(src.loc, 5) @@ -72,7 +72,7 @@ else user << "This frame does not accept circuit boards of this type!" else - if(iswirecutter(P)) + if(P.iswirecutter()) playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) user << "You remove the cables." state = 1 @@ -81,7 +81,7 @@ A.amount = 5 if(3) - if(iscrowbar(P)) + if(P.iscrowbar()) playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) state = 2 circuit.forceMove(src.loc) @@ -97,7 +97,7 @@ components = null icon_state = "box_1" else - if(isscrewdriver(P)) + if(P.isscrewdriver()) var/component_check = 1 for(var/R in req_components) if(req_components[R] > 0) diff --git a/code/game/machinery/crusher_piston.dm b/code/game/machinery/crusher_piston.dm index 4513367d3a3..3c696803053 100644 --- a/code/game/machinery/crusher_piston.dm +++ b/code/game/machinery/crusher_piston.dm @@ -103,7 +103,7 @@ //Stuff you can do if the maint hatch is open if(panel_open) - if(iswrench(O)) + if(O.iswrench()) user << "You start [valve_open ? "closing" : "opening"] the pressure relief valve of [src]." if(do_after(user,50)) valve_open = !valve_open diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 601af3bdbfc..f450ca97ac4 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -181,7 +181,7 @@ for reference: visible_message("BZZzZZzZZzZT") return return - else if (iswrench(W)) + else if (W.iswrench()) if (src.health < src.maxhealth) user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) src.health = src.maxhealth diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index fff2ee05828..b6b37f4eb15 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -917,7 +917,7 @@ About the new airlock wires panel: /obj/machinery/door/airlock/proc/CanChainsaw(var/obj/item/weapon/material/twohanded/chainsaw/ChainSawVar) return (ChainSawVar.powered && density && hashatch) -/obj/machinery/door/airlock/attackby(C as obj, mob/user as mob) +/obj/machinery/door/airlock/attackby(var/obj/item/C, mob/user as mob) if(!istype(usr, /mob/living/silicon)) if(src.isElectrified()) if(src.shock(user, 75)) @@ -932,7 +932,7 @@ About the new airlock wires panel: var/obj/item/device/magnetic_lock/newbracer = C newbracer.attachto(src, user) return - if(!repairing && (iswelder(C) && !( src.operating > 0 ) && src.density)) + if(!repairing && (C.iswelder() && !( src.operating > 0 ) && src.density)) var/obj/item/weapon/weldingtool/WT = C if(WT.isOn()) user.visible_message( @@ -954,7 +954,7 @@ About the new airlock wires panel: return else return - else if(isscrewdriver(C)) + else if(C.isscrewdriver()) if (src.p_open) if (stat & BROKEN) usr << "The panel is broken and cannot be closed." @@ -963,16 +963,16 @@ About the new airlock wires panel: else src.p_open = 1 src.update_icon() - else if(iswirecutter(C)) + else if(C.iswirecutter()) return src.attack_hand(user) - else if(ismultitool(C)) + else if(C.ismultitool()) return src.attack_hand(user) else if(istype(C, /obj/item/device/assembly/signaler)) return src.attack_hand(user) else if(istype(C, /obj/item/weapon/pai_cable)) // -- TLE var/obj/item/weapon/pai_cable/cable = C cable.plugin(src, user) - else if(!repairing && iscrowbar(C)) + else if(!repairing && C.iscrowbar()) if(src.p_open && (operating < 0 || (!operating && welded && !src.arePowerSystemsOn() && density && (!src.locked || (stat & BROKEN)))) ) playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.") diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 52866964e7a..168e87b9c32 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -253,7 +253,20 @@ return src.attack_hand(user) /obj/machinery/door/attack_hand(mob/user as mob) - return src.attackby(user, user) + if(src.operating > 0 || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them. + + if(src.operating) return + + if(src.allowed(user) && operable()) + if(src.density) + open() + else + close() + return + + if(src.density) + do_animate("deny") + return /obj/machinery/door/attack_tk(mob/user as mob) if(requiresID() && !allowed(null)) @@ -295,7 +308,7 @@ return - if(repairing && iswelder(I)) + if(repairing && I.iswelder()) if(!density) user << "\The [src] must be closed before you can repair it." return @@ -312,7 +325,7 @@ repairing = null return - if(repairing && iscrowbar(I)) + if(repairing && I.iscrowbar()) user << "You remove \the [repairing]." playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) repairing.forceMove(user.loc) diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 82ecab0658d..65620eb2741 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -269,7 +269,7 @@ add_fingerprint(user) if(operating) return//Already doing something. - if(iswelder(C) && !repairing) + if(C.iswelder() && !repairing) var/obj/item/weapon/weldingtool/W = C if(W.remove_fuel(0, user)) blocked = !blocked @@ -280,14 +280,14 @@ update_icon() return - if(density && isscrewdriver(C)) + if(density && C.isscrewdriver()) hatch_open = !hatch_open user.visible_message("[user] has [hatch_open ? "opened" : "closed"] \the [src] maintenance panel.", "You have [hatch_open ? "opened" : "closed"] the [src] maintenance panel.") update_icon() return - if(blocked && iscrowbar(C) && !repairing) + if(blocked && C.iscrowbar() && !repairing) if(!hatch_open) user << "You must open the maintenance panel first!" else @@ -316,11 +316,11 @@ user << "\The [src] is welded shut!" return - if(iscrowbar(C) || istype(C,/obj/item/weapon/material/twohanded/fireaxe) || (istype(C, /obj/item/weapon/melee/hammer))) + if(C.iscrowbar() || istype(C,/obj/item/weapon/material/twohanded/fireaxe) || (istype(C, /obj/item/weapon/melee/hammer))) if(operating) return - if(blocked && iscrowbar(C)) + if(blocked && C.iscrowbar()) user.visible_message("\The [user] pries at \the [src] with \a [C], but \the [src] is welded in place!",\ "You try to pry \the [src] [density ? "open" : "closed"], but it is welded in place!",\ "You hear someone struggle and metal straining.") @@ -335,7 +335,7 @@ "You start forcing \the [src] [density ? "open" : "closed"] with \the [C]!",\ "You hear metal strain.") if(do_after(user,30)) - if(iscrowbar(C) || (istype(C, /obj/item/weapon/melee/hammer))) + if(C.iscrowbar() || (istype(C, /obj/item/weapon/melee/hammer))) if(stat & (BROKEN|NOPOWER) || !density) user.visible_message("\The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!",\ "You force \the [src] [density ? "open" : "closed"] with \the [C]!",\ diff --git a/code/game/machinery/doors/firedoor_assembly.dm b/code/game/machinery/doors/firedoor_assembly.dm index e9c34673c29..d4c569e698f 100644 --- a/code/game/machinery/doors/firedoor_assembly.dm +++ b/code/game/machinery/doors/firedoor_assembly.dm @@ -14,8 +14,8 @@ obj/structure/firedoor_assembly/update_icon() else icon_state = "door_construction" -obj/structure/firedoor_assembly/attackby(C as obj, mob/user as mob) - if(iscoil(C) && !wired && anchored) +obj/structure/firedoor_assembly/attackby(var/obj/item/C as obj, mob/user as mob) + if(C.iscoil() && !wired && anchored) var/obj/item/stack/cable_coil/cable = C if (cable.get_amount() < 1) user << "You need one length of coil to wire \the [src]." @@ -26,7 +26,7 @@ obj/structure/firedoor_assembly/attackby(C as obj, mob/user as mob) wired = 1 user << "You wire \the [src]." - else if(iswirecutter(C) && wired ) + else if(C.iswirecutter() && wired ) playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) user.visible_message("[user] cuts the wires from \the [src].", "You start to cut the wires from \the [src].") @@ -46,13 +46,13 @@ obj/structure/firedoor_assembly/attackby(C as obj, mob/user as mob) qdel(src) else user << "You must secure \the [src] first!" - else if(iswrench(C)) + else if(C.iswrench()) anchored = !anchored playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user.visible_message("[user] has [anchored ? "" : "un" ]secured \the [src]!", "You have [anchored ? "" : "un" ]secured \the [src]!") update_icon() - else if(!anchored && iswelder(C)) + else if(!anchored && C.iswelder()) var/obj/item/weapon/weldingtool/WT = C if(WT.remove_fuel(0, user)) user.visible_message("[user] dissassembles \the [src].", diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index c48598269ad..288241e00ac 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -180,7 +180,7 @@ return 1 //If it's emagged, crowbar can pry electronics out. - if (src.operating == -1 && iscrowbar(I)) + if (src.operating == -1 && I.iscrowbar()) playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) user.visible_message("[user] removes the electronics from the windoor.", "You start to remove electronics from the windoor.") if (do_after(user,40)) diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 58c9b6eec38..8646ded43c9 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -85,7 +85,7 @@ /obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob) src.add_fingerprint(user) - if (isscrewdriver(W) && buildstage == 2) + if (W.isscrewdriver() && buildstage == 2) if(!wiresexposed) set_light(0) wiresexposed = !wiresexposed @@ -96,20 +96,20 @@ set_light(0) switch(buildstage) if(2) - if (ismultitool(W)) + if (W.ismultitool()) src.detecting = !( src.detecting ) if (src.detecting) user.visible_message("\The [user] has reconnected [src]'s detecting unit!", "You have reconnected [src]'s detecting unit.") else user.visible_message("\The [user] has disconnected [src]'s detecting unit!", "You have disconnected [src]'s detecting unit.") - else if (iswirecutter(W)) + else if (W.iswirecutter()) user.visible_message("\The [user] has cut the wires inside \the [src]!", "You have cut the wires inside \the [src].") new/obj/item/stack/cable_coil(get_turf(src), 5) playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) buildstage = 1 update_icon() if(1) - if(iscoil(W)) + if(W.iscoil()) var/obj/item/stack/cable_coil/C = W if (C.use(5)) user << "You wire \the [src]." @@ -118,7 +118,7 @@ else user << "You need 5 pieces of cable to wire \the [src]." return - else if(iscrowbar(W)) + else if(W.iscrowbar()) user << "You pry out the circuit!" playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) spawn(20) @@ -133,7 +133,7 @@ buildstage = 1 update_icon() - else if(iswrench(W)) + else if(W.iswrench()) user << "You remove the fire alarm assembly from the wall!" new /obj/item/frame/fire_alarm(get_turf(user)) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index ea0b952611b..b9bd830e5b2 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -48,7 +48,7 @@ //Don't want to render prison breaks impossible /obj/machinery/flasher/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (iswirecutter(W)) + if (W.iswirecutter()) add_fingerprint(user) src.disable = !src.disable if (src.disable) @@ -88,6 +88,9 @@ var/obj/item/organ/eyes/E = H.get_eyes() if(!E) return + + E.flash_act() + if(E.is_bruised() && prob(E.damage + 50)) flick("e_flash", O:flash) E.damage += rand(1, 5) @@ -112,7 +115,7 @@ src.flash() /obj/machinery/flasher/portable/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (iswrench(W)) + if (W.iswrench()) add_fingerprint(user) src.anchored = !src.anchored diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 1d4f9183ab3..0a00ae053cd 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -102,7 +102,7 @@ /obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (isscrewdriver(W)) + if (W.isscrewdriver()) if (!open) if(unlocked) unlocked = 0 @@ -111,7 +111,7 @@ unlocked = 1 user << "You unscrew the battery panel." - if (iscrowbar(W)) + if (W.iscrowbar()) if(unlocked) if(open) open = 0 diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm index 9fd81b123b5..bb684b61a9e 100644 --- a/code/game/machinery/floor_light.dm +++ b/code/game/machinery/floor_light.dm @@ -24,10 +24,10 @@ var/list/floor_light_cache = list() anchored = 1 /obj/machinery/floor_light/attackby(var/obj/item/W, var/mob/user) - if(isscrewdriver(W)) + if(W.isscrewdriver()) anchored = !anchored visible_message("\The [user] has [anchored ? "attached" : "detached"] \the [src].") - else if(iswelder(W) && (damaged || (stat & BROKEN))) + else if(W.iswelder() && (damaged || (stat & BROKEN))) var/obj/item/weapon/weldingtool/WT = W if(!WT.remove_fuel(0, user)) user << "\The [src] must be on to complete this task." diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm index 491015d51e6..846d6d8cb4b 100644 --- a/code/game/machinery/floorlayer.dm +++ b/code/game/machinery/floorlayer.dm @@ -36,7 +36,7 @@ /obj/machinery/floorlayer/attackby(var/obj/item/W as obj, var/mob/user as mob) - if (iswrench(W)) + if (W.iswrench()) var/m = input("Choose work mode", "Mode") as null|anything in mode mode[m] = !mode[m] var/O = mode[m] @@ -49,7 +49,7 @@ TakeTile(T) return - if(iscrowbar(W)) + if(W.iscrowbar()) if(!length(contents)) user << "\The [src] is empty." else @@ -60,7 +60,7 @@ T = null return - if(isscrewdriver(W)) + if(W.isscrewdriver()) T = input("Choose tile type.", "Tiles") as null|anything in contents return ..() diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 0b7e62e12b9..65febfe76da 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -99,7 +99,7 @@ update_icon() /obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (isscrewdriver(W)) + if (W.isscrewdriver()) add_fingerprint(user) disable = !disable if(disable) diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index d3f34545eb6..7e5048bad8d 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -166,7 +166,7 @@ datum/track/New(var/title_name, var/audio) /obj/machinery/media/jukebox/attackby(obj/item/W as obj, mob/user as mob) src.add_fingerprint(user) - if(iswrench(W)) + if(W.iswrench()) if(playing) StopPlaying() user.visible_message("[user] has [anchored ? "un" : ""]secured \the [src].", "You [anchored ? "un" : ""]secure \the [src].") diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm index c54df36d496..47b825df8ea 100644 --- a/code/game/machinery/kitchen/microwave.dm +++ b/code/game/machinery/kitchen/microwave.dm @@ -56,7 +56,7 @@ /obj/machinery/microwave/attackby(var/obj/item/O as obj, var/mob/user as mob) if(src.broken > 0) - if(src.broken == 2 && isscrewdriver(O)) // If it's broken and they're using a screwdriver + if(src.broken == 2 && O.isscrewdriver()) // If it's broken and they're using a screwdriver user.visible_message( \ "\The [user] starts to fix part of the microwave.", \ "You start to fix part of the microwave." \ @@ -67,7 +67,7 @@ "You have fixed part of the microwave." \ ) src.broken = 1 // Fix it a bit - else if(src.broken == 1 && iswrench(O)) // If it's broken and they're doing the wrench + else if(src.broken == 1 && O.iswrench()) // If it's broken and they're doing the wrench user.visible_message( \ "\The [user] starts to fix part of the microwave.", \ "You start to fix part of the microwave." \ @@ -136,7 +136,7 @@ var/obj/item/weapon/grab/G = O user << "This is ridiculous. You can not fit \the [G.affecting] in this [src]." return 1 - else if(iscrowbar(O)) + else if(O.iscrowbar()) user.visible_message( \ "\The [user] begins [src.anchored ? "unsecuring" : "securing"] the microwave.", \ "You attempt to [src.anchored ? "unsecure" : "secure"] the microwave." diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm index 3a7d7dcd389..b48c8a045db 100644 --- a/code/game/machinery/kitchen/smartfridge.dm +++ b/code/game/machinery/kitchen/smartfridge.dm @@ -239,7 +239,7 @@ ********************/ /obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob) - if(isscrewdriver(O)) + if(O.isscrewdriver()) panel_open = !panel_open user.visible_message("[user] [panel_open ? "opens" : "closes"] the maintenance panel of \the [src].", "You [panel_open ? "open" : "close"] the maintenance panel of \the [src].") cut_overlays() @@ -248,7 +248,7 @@ SSnanoui.update_uis(src) return - if(ismultitool(O)||iswirecutter(O)) + if(O.ismultitool()||O.iswirecutter()) if(panel_open) attack_hand(user) return diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index bce4863d867..470ff2dec81 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -54,7 +54,7 @@ /obj/machinery/mass_driver/attackby(obj/item/W, mob/user) - if(iswrench(W)) + if(W.iswrench()) if(!anchored) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) user.visible_message("[user.name] secures [src] to the floor.", \ diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index f5d1238b2af..c3611b53cb8 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -34,7 +34,7 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do // add beacon to MULE bot beacon list if(freq == 1400) LAZYADD(navbeacons, src) - + if(SSradio) SSradio.add_object(src, freq, RADIO_NAVBEACONS) @@ -109,7 +109,7 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do if(!T.is_plating()) return // prevent intraction when T-scanner revealed - if(isscrewdriver(I)) + if(I.isscrewdriver()) open = !open user.visible_message("[user] [open ? "opens" : "closes"] the beacon's cover.", "You [open ? "open" : "close"] the beacon's cover.") diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm index 1256b075522..d79c88f4751 100644 --- a/code/game/machinery/nuclear_bomb.dm +++ b/code/game/machinery/nuclear_bomb.dm @@ -44,7 +44,7 @@ var/bomb_set return /obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob, params) - if (isscrewdriver(O)) + if (O.isscrewdriver()) src.add_fingerprint(user) if (src.auth) if (panel_open == 0) @@ -68,7 +68,7 @@ var/bomb_set flick("lock", src) return - if (panel_open && (ismultitool(O) || iswirecutter(O))) + if (panel_open && (O.ismultitool() || O.iswirecutter())) return attack_hand(user) if (src.extended) @@ -81,7 +81,7 @@ var/bomb_set if (src.anchored) switch(removal_stage) if(0) - if(iswelder(O)) + if(O.iswelder()) var/obj/item/weapon/weldingtool/WT = O if(!WT.isOn()) return if (WT.get_fuel() < 5) // uses up 5 fuel. @@ -97,7 +97,7 @@ var/bomb_set return if(1) - if(iscrowbar(O)) + if(O.iscrowbar()) user.visible_message("[user] starts forcing open the bolt covers on [src].", "You start forcing open the anchoring bolt covers with [O]...") if(do_after(user,15)) @@ -107,7 +107,7 @@ var/bomb_set return if(2) - if(iswelder(O)) + if(O.iswelder()) var/obj/item/weapon/weldingtool/WT = O if(!WT.isOn()) return @@ -124,7 +124,7 @@ var/bomb_set return if(3) - if(iswrench(O)) + if(O.iswrench()) user.visible_message("[user] begins unwrenching the anchoring bolts on [src].", "You begin unwrenching the anchoring bolts...") @@ -135,7 +135,7 @@ var/bomb_set return if(4) - if(iscrowbar(O)) + if(O.iscrowbar()) user.visible_message("[user] begins lifting [src] off of the anchors.", "You begin lifting the device off the anchors...") diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index fc37510b8bb..c305845fba7 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -432,7 +432,7 @@ Buildable meters /obj/item/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) ..() //* - if (!iswrench(W) && !istype(W, /obj/item/weapon/pipewrench)) + if (!W.iswrench() && !istype(W, /obj/item/weapon/pipewrench)) return ..() if(istype(W, /obj/item/weapon/pipewrench)) var/action = alert(user, "Change pipe?", "Change pipe", "Yes", "No") @@ -1205,7 +1205,7 @@ Buildable meters /obj/item/pipe_meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) ..() - if (!iswrench(W)) + if (!W.iswrench()) return ..() if(!locate(/obj/machinery/atmospherics/pipe, src.loc)) user << "You need to fasten it to a pipe" diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index bd332e4373e..e012cc4362a 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -105,7 +105,7 @@ user.drop_from_inventory(W,get_turf(src)) qdel(W) return - else if (iswrench(W)) + else if (W.iswrench()) if (unwrenched==0) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You begin to unfasten \the [src] from the floor..." diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm index 28c7955bc9c..17f72a2d98e 100644 --- a/code/game/machinery/pipe/pipelayer.dm +++ b/code/game/machinery/pipe/pipelayer.dm @@ -39,13 +39,13 @@ /obj/machinery/pipelayer/attackby(var/obj/item/W as obj, var/mob/user as mob) - if (iswrench(W)) + if (W.iswrench()) P_type_t = input("Choose pipe type", "Pipe type") as null|anything in Pipes P_type = Pipes[P_type_t] user.visible_message("[user] has set \the [src] to manufacture [P_type_t].", "You set \the [src] to manufacture [P_type_t].") return - if(iscrowbar(W)) + if(W.iscrowbar()) a_dis=!a_dis user.visible_message("[user] has [!a_dis?"de":""]activated auto-dismantling.", "You [!a_dis?"de":""]activate auto-dismantling.") return @@ -62,7 +62,7 @@ return - if(isscrewdriver(W)) + if(W.isscrewdriver()) if(metal) var/m = round(input(usr,"Please specify the amount of metal to remove","Remove metal",min(round(metal),50)) as num, 1) m = min(m, 50) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 1963a53da34..f0d8cb76207 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -260,7 +260,7 @@ /obj/machinery/porta_turret/attackby(obj/item/I, mob/user) if(stat & BROKEN) - if(iscrowbar(I)) + if(I.iscrowbar()) //If the turret is destroyed, you can remove it with a crowbar to //try and salvage its components user << "You begin prying the metal coverings off." @@ -279,7 +279,7 @@ user << "You remove the turret but did not manage to salvage anything." qdel(src) // qdel - else if((iswrench(I))) + else if((I.iswrench())) if (immobile) user << "[src] is firmly attached to the ground with some form of epoxy." return @@ -669,7 +669,7 @@ //this is a bit unwieldy but self-explanatory switch(build_step) if(0) //first step - if(iswrench(I) && !anchored) + if(I.iswrench() && !anchored) playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) user << "You secure the external bolts." anchored = 1 @@ -677,7 +677,7 @@ icon_state = "turret_frame_1_[case_sprite_set]" return - else if(iscrowbar(I) && !anchored) + else if(I.iscrowbar() && !anchored) playsound(loc, 'sound/items/Crowbar.ogg', 75, 1) user << "You dismantle the turret construction." new /obj/item/stack/material/steel( loc, 5) @@ -695,7 +695,7 @@ user << "You need two sheets of metal to continue construction." return - else if(iswrench(I)) + else if(I.iswrench()) playsound(loc, 'sound/items/Ratchet.ogg', 75, 1) user << "You unfasten the external bolts." anchored = 0 @@ -705,14 +705,14 @@ if(2) - if(iswrench(I)) + if(I.iswrench()) playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) user << "You bolt the metal armor into place." build_step = 3 icon_state = "turret_frame_3_[case_sprite_set]" return - else if(iswelder(I)) + else if(I.iswelder()) var/obj/item/weapon/weldingtool/WT = I if(!WT.isOn()) return @@ -748,7 +748,7 @@ add_overlay("turret_[E.turret_sprite_set]_off") return - else if(iswrench(I)) + else if(I.iswrench()) playsound(loc, 'sound/items/Ratchet.ogg', 100, 1) user << "You remove the turret's metal armor bolts." build_step = 2 @@ -768,7 +768,7 @@ //attack_hand() removes the gun if(5) - if(isscrewdriver(I)) + if(I.isscrewdriver()) playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1) build_step = 6 user << "You close the access hatch." @@ -793,7 +793,7 @@ user << "You need two sheets of metal to continue construction." return - else if(isscrewdriver(I)) + else if(I.isscrewdriver()) playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1) build_step = 5 user << "You open the access hatch." @@ -803,7 +803,7 @@ return if(7) - if(iswelder(I)) + if(I.iswelder()) var/obj/item/weapon/weldingtool/WT = I if(!WT.isOn()) return if(WT.get_fuel() < 5) @@ -848,7 +848,7 @@ qdel(src) // qdel - else if(iscrowbar(I)) + else if(I.iscrowbar()) playsound(loc, 'sound/items/Crowbar.ogg', 75, 1) user << "You pry off the turret's exterior armor." new /obj/item/stack/material/steel(loc, 2) diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 32bef4e12d7..48a2c20e472 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -14,7 +14,7 @@ var/obj/item/charging var/list/allowed_devices = list( - /obj/item/weapon/gun/energy, + /obj/item/weapon/gun/energy, /obj/item/weapon/melee/baton, /obj/item/weapon/cell, /obj/item/modular_computer, @@ -43,7 +43,7 @@ qdel(bar) /obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob) - if(portable && iswrench(G)) + if(portable && G.iswrench()) if(charging) user << "Remove [charging] first!" return diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 2d596e675ee..d710130cb81 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -65,7 +65,7 @@ else user << "The hatch must be open to insert a power cell." return - else if(isscrewdriver(I)) + else if(I.isscrewdriver()) panel_open = !panel_open user.visible_message("[user] [panel_open ? "opens" : "closes"] the hatch on the [src].", "You [panel_open ? "open" : "close"] the hatch on the [src].") update_icon() diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index e6b92eaced0..b5ff3e25ac6 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -478,7 +478,7 @@ /obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob) if(!src.ispowered) return - if(isscrewdriver(I)) + if(I.isscrewdriver()) src.panelopen = !src.panelopen playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) user << text("You [] the unit's maintenance panel.",(src.panelopen ? "open up" : "close") ) @@ -681,7 +681,7 @@ return //Hacking init. - if(ismultitool(I) || iswirecutter(I)) + if(I.ismultitool() || I.iswirecutter()) if(panel_open) attack_hand(user) return @@ -717,7 +717,7 @@ src.updateUsrDialog() return - else if(isscrewdriver(I)) + else if(I.isscrewdriver()) panel_open = !panel_open user << "You [panel_open ? "open" : "close"] the maintenance panel." diff --git a/code/game/machinery/supplybeacon.dm b/code/game/machinery/supplybeacon.dm index f10d6b91f86..174ad098c51 100644 --- a/code/game/machinery/supplybeacon.dm +++ b/code/game/machinery/supplybeacon.dm @@ -45,7 +45,7 @@ drop_type = "supermatter" /obj/machinery/power/supply_beacon/attackby(var/obj/item/weapon/W, var/mob/user) - if(!use_power && iswrench(W)) + if(!use_power && W.iswrench()) if(!anchored && !connect_to_network()) user << "This device must be placed over an exposed cable." return diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 712d8b5e0a1..08238700461 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -130,7 +130,7 @@ /obj/machinery/power/singularity_beacon/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(isscrewdriver(W)) + if(W.isscrewdriver()) if(active) user << "You need to deactivate the beacon first!" return diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm index 9da6e5bf723..d8c9776e4f9 100644 --- a/code/game/machinery/telecomms/logbrowser.dm +++ b/code/game/machinery/telecomms/logbrowser.dm @@ -189,7 +189,7 @@ return attackby(var/obj/item/weapon/D as obj, var/mob/user as mob) - if(isscrewdriver(D)) + if(D.isscrewdriver()) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) if(do_after(user, 20)) if (src.stat & BROKEN) diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 96c839426e3..85798891852 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -15,7 +15,7 @@ /obj/machinery/telecomms/attackby(obj/item/P as obj, mob/user as mob) // Using a multitool lets you access the receiver's interface - if(ismultitool(P)) + if(P.ismultitool()) attack_hand(user) @@ -33,25 +33,25 @@ switch(construct_op) if(0) - if(isscrewdriver(P)) + if(P.isscrewdriver()) user << "You unfasten the bolts." playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) construct_op ++ if(1) - if(isscrewdriver(P)) + if(P.isscrewdriver()) user << "You fasten the bolts." playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) construct_op -- - if(iswrench(P)) + if(P.iswrench()) user << "You dislodge the external plating." playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) construct_op ++ if(2) - if(iswrench(P)) + if(P.iswrench()) user << "You secure the external plating." playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) construct_op -- - if(iswirecutter(P)) + if(P.iswirecutter()) playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) user << "You remove the cables." construct_op ++ @@ -59,7 +59,7 @@ A.amount = 5 stat |= BROKEN // the machine's been borked! if(3) - if(iscoil(P)) + if(P.iscoil()) var/obj/item/stack/cable_coil/A = P if (A.use(5)) user << "You insert the cables." @@ -67,7 +67,7 @@ stat &= ~BROKEN // the machine's not borked anymore! else user << "You need five coils of wire for this." - if(iscrowbar(P)) + if(P.iscrowbar()) user << "You begin prying out the circuit board other components..." playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) if(do_after(user,60)) @@ -88,7 +88,7 @@ newpath = text2path(I) var/obj/item/s = new newpath s.forceMove(user.loc) - if(iscoil(P)) + if(P.iscoil()) var/obj/item/stack/cable_coil/A = P A.amount = 1 diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm index f44bcfcc4d5..df90f387d64 100644 --- a/code/game/machinery/telecomms/telemonitor.dm +++ b/code/game/machinery/telecomms/telemonitor.dm @@ -124,7 +124,7 @@ return attackby(var/obj/item/weapon/D as obj, var/mob/user as mob) - if(isscrewdriver(D)) + if(D.isscrewdriver()) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) if(do_after(user, 20)) if (src.stat & BROKEN) diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm index 30517713ba2..f28c9f4b75e 100644 --- a/code/game/machinery/telecomms/traffic_control.dm +++ b/code/game/machinery/telecomms/traffic_control.dm @@ -207,7 +207,7 @@ return attackby(var/obj/item/weapon/D as obj, var/mob/user as mob) - if(isscrewdriver(D)) + if(D.isscrewdriver()) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) if(do_after(user, 20)) if (src.stat & BROKEN) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index ed20d203e7b..1c388465e71 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -224,7 +224,7 @@ if (I || istype(W, /obj/item/weapon/spacecash)) attack_hand(user) return - else if(isscrewdriver(W)) + else if(W.isscrewdriver()) src.panel_open = !src.panel_open user << "You [src.panel_open ? "open" : "close"] the maintenance panel." cut_overlays() @@ -233,7 +233,7 @@ SSnanoui.update_uis(src) // Speaker switch is on the main UI, not wires UI return - else if(ismultitool(W)||iswirecutter(W)) + else if(W.ismultitool()||W.iswirecutter()) if(src.panel_open) attack_hand(user) return @@ -244,7 +244,7 @@ user << "You insert \the [W] into \the [src]." SSnanoui.update_uis(src) return - else if(iswrench(W)) + else if(W.iswrench()) if(!can_move) return user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) diff --git a/code/game/machinery/wall_frames.dm b/code/game/machinery/wall_frames.dm index 532e43c1062..89ee5b2049e 100644 --- a/code/game/machinery/wall_frames.dm +++ b/code/game/machinery/wall_frames.dm @@ -10,7 +10,7 @@ var/reverse = 0 //if resulting object faces opposite its dir (like light fixtures) /obj/item/frame/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (iswrench(W)) + if (W.iswrench()) new refund_type( get_turf(src.loc), refund_amt) qdel(src) return diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index e87c4fec05b..90a3ad0625d 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -73,9 +73,6 @@ icon_state = "wm_[state][panel]" /obj/machinery/washing_machine/attackby(obj/item/weapon/W as obj, mob/user as mob) - /*if(isscrewdriver(W)) - panel = !panel - user << "You [panel ? "open" : "close"] the [src]'s maintenance panel"*/ if(istype(W,/obj/item/weapon/pen/crayon) || istype(W,/obj/item/weapon/stamp)) if( state in list( 1, 3, 6 ) ) if(!crayon) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index f7470e62a8c..eef69ab925c 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -778,7 +778,7 @@ user << "Invalid ID: Access denied." else user << "Maintenance protocols disabled by operator." - else if(iswrench(W)) + else if(W.iswrench()) if(state==1) state = 2 user << "You undo the securing bolts." @@ -788,7 +788,7 @@ user << "You tighten the securing bolts." playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) return - else if(iscrowbar(W)) + else if(W.iscrowbar()) if(state==2) state = 3 user << "You open the hatch to the power unit" @@ -798,7 +798,7 @@ user << "You close the hatch to the power unit" playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1) return - else if(iscoil(W)) + else if(W.iscoil()) if(state == 3 && hasInternalDamage(MECHA_INT_SHORT_CIRCUIT)) var/obj/item/stack/cable_coil/CC = W if(CC.use(2)) @@ -807,7 +807,7 @@ else user << "There's not enough wire to finish the task." return - else if(isscrewdriver(W)) + else if(W.isscrewdriver()) if(hasInternalDamage(MECHA_INT_TEMP_CONTROL)) clearInternalDamage(MECHA_INT_TEMP_CONTROL) user << "You repair the damaged temperature controller." @@ -817,7 +817,7 @@ return - else if(ismultitool(W)) + else if(W.ismultitool()) if(state>=3 && src.occupant) user << "You attempt to eject the pilot using the maintenance controls." if(src.occupant.stat) @@ -840,7 +840,7 @@ user << "There's already a powercell installed." return - else if(iswelder(W) && user.a_intent != I_HURT) + else if(W.iswelder() && user.a_intent != I_HURT) var/obj/item/weapon/weldingtool/WT = W if (WT.remove_fuel(0,user)) if (hasInternalDamage(MECHA_INT_TANK_BREACH)) diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm index 91b974d4fdb..83451b076dc 100644 --- a/code/game/mecha/mecha_construction_paths.dm +++ b/code/game/mecha/mecha_construction_paths.dm @@ -3,30 +3,32 @@ //////////////////////////////// /datum/construction/mecha/custom_action(step, atom/used_atom, mob/user) - if(iswelder(used_atom)) - var/obj/item/weapon/weldingtool/W = used_atom + var/obj/item/I = used_atom + if(I.iswelder()) + var/obj/item/weapon/weldingtool/W = I if (W.remove_fuel(0, user)) playsound(holder, 'sound/items/Welder2.ogg', 50, 1) else return 0 - else if(iswrench(used_atom)) + + else if(I.iswrench()) playsound(holder, 'sound/items/Ratchet.ogg', 50, 1) - else if(isscrewdriver(used_atom)) + else if(I.isscrewdriver()) playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1) - else if(iswirecutter(used_atom)) + else if(I.iswirecutter()) playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1) - else if(iscoil(used_atom)) - var/obj/item/stack/cable_coil/C = used_atom + else if(I.iscoil()) + var/obj/item/stack/cable_coil/C = I if(C.use(4)) playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1) else user << ("There's not enough cable to finish the task.") return 0 - else if(istype(used_atom, /obj/item/stack)) - var/obj/item/stack/S = used_atom + else if(istype(I, /obj/item/stack)) + var/obj/item/stack/S = I if(S.get_amount() < 5) user << ("There's not enough material in this stack.") return 0 @@ -35,30 +37,31 @@ return 1 /datum/construction/reversible/mecha/custom_action(index as num, diff as num, atom/used_atom, mob/user as mob) - if(iswelder(used_atom)) - var/obj/item/weapon/weldingtool/W = used_atom + var/obj/item/I = used_atom + if(I.iswelder()) + var/obj/item/weapon/weldingtool/W = I if (W.remove_fuel(0, user)) playsound(holder, 'sound/items/Welder2.ogg', 50, 1) else return 0 - else if(iswrench(used_atom)) + else if(I.iswrench()) playsound(holder, 'sound/items/Ratchet.ogg', 50, 1) - else if(isscrewdriver(used_atom)) + else if(I.isscrewdriver()) playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1) - else if(iswirecutter(used_atom)) + else if(I.iswirecutter()) playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1) - else if(iscoil(used_atom)) + else if(I.iscoil()) var/obj/item/stack/cable_coil/C = used_atom if(C.use(4)) playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1) else user << ("There's not enough cable to finish the task.") return 0 - else if(istype(used_atom, /obj/item/stack)) - var/obj/item/stack/S = used_atom + else if(istype(I, /obj/item/stack)) + var/obj/item/stack/S = I if(S.get_amount() < 5) user << ("There's not enough material in this stack.") return 0 diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm index d0910973eaf..4cfaf43343a 100644 --- a/code/game/mecha/mecha_wreckage.dm +++ b/code/game/mecha/mecha_wreckage.dm @@ -31,7 +31,7 @@ /obj/effect/decal/mecha_wreckage/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(salvage_num <= 0) user << "You don't see anything that can be cut with [W]." @@ -49,7 +49,7 @@ else user << "You need more welding fuel to complete this task." return - if(iswirecutter(W)) + if(W.iswirecutter()) if(salvage_num <= 0) user << "You don't see anything that can be cut with [W]." return @@ -61,7 +61,7 @@ salvage_num-- else user << "You failed to salvage anything valuable from [src]." - if(iscrowbar(W)) + if(W.iscrowbar()) if(!isemptylist(crowbar_salvage)) var/obj/S = pick(crowbar_salvage) if(S) diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm index 3c6f5c60bb2..18363c438f7 100644 --- a/code/game/objects/effects/decals/contraband.dm +++ b/code/game/objects/effects/decals/contraband.dm @@ -91,7 +91,7 @@ if(!serial) serial = rand(1, poster_designs.len) //use a random serial if none is given - + serial_number = serial var/datum/poster/design @@ -100,7 +100,7 @@ design = new path else design = poster_designs[serial_number] - + set_poster(design) switch (placement_dir) @@ -124,7 +124,7 @@ icon_state = design.icon_state // poster[serial_number] /obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswirecutter(W)) + if(W.iswirecutter()) playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1) if(ruined) user << "You remove the remnants of the poster." diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index ce30753f09d..d82b0986742 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -25,7 +25,7 @@ var/damage = W.force / 4.0 - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0, user)) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index e21537fa03b..61b22c8fca7 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -24,7 +24,7 @@ var/datum/action/item_action/action var/action_button_name //It is also the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. If it's not set, there'll be no button. - var/action_button_is_hands_free = 0 //If 1, bypass the restrained, lying, and stunned checks action buttons normally test for + var/default_action_type = /datum/action/item_action // Specify the default type and behavior of the action button for this atom. //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc. //It should be used purely for appearance. For gameplay effects caused by items covering body parts, use body_parts_covered. diff --git a/code/game/objects/items/apc_frame.dm b/code/game/objects/items/apc_frame.dm index ed914fc299c..f114f8f5944 100644 --- a/code/game/objects/items/apc_frame.dm +++ b/code/game/objects/items/apc_frame.dm @@ -9,7 +9,7 @@ /obj/item/frame/apc/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() - if (iswrench(W)) + if (W.iswrench()) new /obj/item/stack/material/steel( get_turf(src.loc), 2 ) qdel(src) diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 097806ceab4..5ad146fc9a3 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -42,7 +42,7 @@ storage_capacity = 30 var/contains_body = 0 -/obj/structure/closet/body_bag/attackby(W as obj, mob/user as mob) +/obj/structure/closet/body_bag/attackby(var/obj/item/W, mob/user as mob) if (istype(W, /obj/item/weapon/pen)) var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text if (user.get_active_hand() != W) @@ -58,7 +58,7 @@ src.name = "body bag" //..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri return - else if(iswirecutter(W)) + else if(W.iswirecutter()) user << "You cut the tag off the bodybag" src.name = "body bag" cut_overlays() diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index b1ecd9611a7..9028c22c518 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -79,42 +79,13 @@ var/safety = M:eyecheck(TRUE) if(safety <= 0) flick("e_flash", M.flash) - //Vaurca damage 15/01/16 var/mob/living/carbon/human/H = M - if(isvaurca(H)) - var/obj/item/organ/eyes/E = H.get_eyes() - if(!E) - return - user << span("alert", "Your eyes burn with the intense light of the flash!") - M.Weaken(10) - E.damage += rand(10, 11) - if(E.damage > 12) - M.eye_blurry += rand(3,6) - if (E.damage >= E.min_broken_damage) - M.sdisabilities |= BLIND - else if (E.damage >= E.min_bruised_damage) - M.eye_blind = 5 - M.eye_blurry = 5 - M.disabilities |= NEARSIGHTED - addtimer(CALLBACK(M, /mob/.proc/reset_nearsighted), 100) + var/obj/item/organ/eyes/E = H.get_eyes() + if(!E) + return + + E.flash_act() -/* if(ishuman(M) && ishuman(user) && M.stat!=DEAD) //why is this even a thing - if(user.mind && user.mind in revs.current_antagonists) - var/revsafe = 0 - for(var/obj/item/weapon/implant/loyalty/L in M) - if(L && L.implanted) - revsafe = 1 - break - M.mind_initialize() //give them a mind datum if they don't have one. - if(M.mind.has_been_rev) - revsafe = 2 - if(!revsafe) - M.mind.has_been_rev = 1 - revs.add_antagonist(M.mind) - else if(revsafe == 1) - user << "Something seems to be blocking the flash!" - else - user << "This mind seems resistant to the flash!" */ else flashfail = 1 diff --git a/code/game/objects/items/devices/hacktool.dm b/code/game/objects/items/devices/hacktool.dm index 0db8f693dec..a4ada237f70 100644 --- a/code/game/objects/items/devices/hacktool.dm +++ b/code/game/objects/items/devices/hacktool.dm @@ -23,8 +23,8 @@ hack_state = null return ..() -/obj/item/device/multitool/hacktool/attackby(var/obj/W, var/mob/user) - if(isscrewdriver(W)) +/obj/item/device/multitool/hacktool/attackby(var/obj/item/W, var/mob/user) + if(W.isscrewdriver()) in_hack_mode = !in_hack_mode playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) else diff --git a/code/game/objects/items/devices/magnetic_lock.dm b/code/game/objects/items/devices/magnetic_lock.dm index 5bb5ebbf895..897926bffc7 100644 --- a/code/game/objects/items/devices/magnetic_lock.dm +++ b/code/game/objects/items/devices/magnetic_lock.dm @@ -132,7 +132,7 @@ update_icon() return - if (iswelder(I)) + if (I.iswelder()) var/obj/item/weapon/weldingtool/WT = I if (WT.remove_fuel(2, user)) user.visible_message(span("notice", "[user] starts welding the metal shell of [src]."), span("notice", "You start [hacked ? "repairing" : "welding open"] the metal covering of [src].")) @@ -149,7 +149,7 @@ update_icon() return - if (iscrowbar(I)) + if (I.iscrowbar()) if (!locked) user << span("notice", "You pry the cover off [src].") setconstructionstate(1) @@ -163,19 +163,19 @@ user << span("notice","There's already a powercell in \the [src].") return - if (iscrowbar(I)) + if (I.iscrowbar()) user << span("notice", "You wedge the cover back in place.") setconstructionstate(0) return if (2) - if (isscrewdriver(I)) + if (I.isscrewdriver()) user << span("notice", "You unscrew and remove the wiring cover from \the [src].") playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) setconstructionstate(3) return - if (iscrowbar(I)) + if (I.iscrowbar()) user << span("notice", "You wedge the cover back in place.") setconstructionstate(0) return @@ -189,20 +189,20 @@ return if (3) - if (iswirecutter(I)) + if (I.iswirecutter()) user << span("notice", "You cut the wires connecting the [src]'s magnets to their internal powersupply, [target ? "making the device fall off [target] and rendering it unusable." : "rendering the device unusable."]") playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1) setconstructionstate(4) return - if (isscrewdriver(I)) + if (I.isscrewdriver()) user << span("notice", "You replace and screw tight the wiring cover from \the [src].") playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) setconstructionstate(2) return if (4) - if (iswirecutter(I)) + if (I.iswirecutter()) user << span("notice", "You repair the wires connecting the [src]'s magnets to their internal powersupply") setconstructionstate(3) return diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 5220fabc014..d60b7497708 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -29,6 +29,9 @@ unregister_buffer(buffer_object) return ..() +/obj/item/device/multitool/ismultitool() + return TRUE + /obj/item/device/multitool/proc/get_buffer(var/typepath) // Only allow clearing the buffer name when someone fetches the buffer. // Means you cannot be sure the source hasn't been destroyed until the very moment it's needed. diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index 62f5a4cfc9a..0887e8cf9d7 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -32,7 +32,7 @@ return ..() /obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user) - if(isscrewdriver(I)) + if(I.isscrewdriver()) if(mode == 0) var/turf/T = loc if(isturf(T) && !!T.is_plating()) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 046be3faab4..24a2a1b539e 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -236,10 +236,10 @@ /obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob) // ..() user.set_machine(src) - if (!( isscrewdriver(W) || (istype(W, /obj/item/device/encryptionkey/ )))) + if (!( W.isscrewdriver() || (istype(W, /obj/item/device/encryptionkey/ )))) return - if(isscrewdriver(W)) + if(W.isscrewdriver()) if(keyslot1 || keyslot2) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 41cbc1b67ca..5bbabc9242a 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -545,7 +545,7 @@ var/global/list/default_medbay_channels = list( /obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() user.set_machine(src) - if (!( isscrewdriver(W) )) + if (!( W.isscrewdriver() )) return b_stat = !( b_stat ) if(!istype(src, /obj/item/device/radio/beacon)) @@ -598,10 +598,10 @@ var/global/list/default_medbay_channels = list( /obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob) // ..() user.set_machine(src) - if (!( isscrewdriver(W) || (istype(W, /obj/item/device/encryptionkey/ )))) + if (!( W.isscrewdriver() || (istype(W, /obj/item/device/encryptionkey/ )))) return - if(isscrewdriver(W)) + if(W.isscrewdriver()) if(keyslot) diff --git a/code/game/objects/items/devices/radio_jammer.dm b/code/game/objects/items/devices/radio_jammer.dm index de802879690..e1bd413681a 100644 --- a/code/game/objects/items/devices/radio_jammer.dm +++ b/code/game/objects/items/devices/radio_jammer.dm @@ -103,7 +103,7 @@ proc/within_jamming_range(var/atom/test) // tests if an object is near a radio j /obj/item/device/radiojammer/improvised/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (isscrewdriver(W)) + if (W.isscrewdriver()) user << "You disassemble the improvised signal jammer." user.put_in_hands(assembly_holder) user.put_in_hands(cell) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 394fd2d69da..2549ae7edf8 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -23,6 +23,11 @@ BREATH ANALYZER var/mode = 1 /obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob) + health_scan_mob(M, user) + src.add_fingerprint(user) + return + +/proc/health_scan_mob(var/mob/living/M, var/mob/living/user, var/visible_msg, var/ignore_clumsiness, var/show_limb_damage = TRUE) if ( ((CLUMSY in user.mutations) || (DUMB in user.mutations)) && prob(50)) user << text("You try to analyze the floor's vitals!") for(var/mob/O in viewers(M, null)) @@ -64,7 +69,7 @@ BREATH ANALYZER user.show_message("Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1) if(M.tod && (M.stat == DEAD || (M.status_flags & FAKEDEATH))) user.show_message("Time of Death: [M.tod]") - if(istype(M, /mob/living/carbon/human) && mode == 1) + if(istype(M, /mob/living/carbon/human) && show_limb_damage) var/mob/living/carbon/human/H = M var/list/damaged = H.get_damaged_organs(1,1) user.show_message("Localized Damage, Brute/Burn:",1) @@ -117,17 +122,13 @@ BREATH ANALYZER if (ID in virusDB) var/datum/data/record/V = virusDB[ID] user.show_message("Warning: Pathogen [V.fields["name"]] detected in subject's blood. Known antigen : [V.fields["antigen"]]") -// user.show_message(text("Warning: Unknown pathogen detected in subject's blood.")) + if (M.getCloneLoss()) user.show_message("Subject appears to have been imperfectly cloned.") for(var/datum/disease/D in M.viruses) if(!D.hidden[SCANNER]) user.show_message(text("Warning: [D.form] Detected\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]")) -// if (M.reagents && M.reagents.get_reagent_amount("inaprovaline")) -// user.show_message("Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.") -// Remove brain worm scans. Bad. -// if (M.has_brain_worms()) -// user.show_message("Subject suffering from aberrant brain activity. Recommend further scanning.") + if(ishuman(M)) var/mob/living/carbon/human/H = M if (H.getBrainLoss() >= config.default_brain_health || !H.has_brain()) @@ -172,19 +173,17 @@ BREATH ANALYZER else user.show_message("Blood Level Normal: [blood_percent]% [blood_volume]cl. Type: [blood_type]") user.show_message("Subject's pulse: [H.get_pulse(GETPULSE_TOOL)] bpm.") - src.add_fingerprint(user) - return /obj/item/device/healthanalyzer/verb/toggle_mode() set name = "Switch Verbosity" set category = "Object" mode = !mode - switch (mode) - if(1) - usr << "The scanner now shows specific limb damage." - if(0) - usr << "The scanner no longer shows limb damage." + + if(mode) + usr << "The scanner now shows specific limb damage." + else + usr << "The scanner no longer shows limb damage." /obj/item/device/analyzer diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index c9b6eac2b0e..31b6744da58 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -33,7 +33,7 @@ . = ..() START_PROCESSING(SSprocessing, src) cell = new celltype(src) - + /obj/item/device/suit_cooling_unit/Destroy() STOP_PROCESSING(SSprocessing, src) QDEL_NULL(cell) @@ -72,7 +72,7 @@ if(cell.charge <= 0) turn_off() - + update_icon() /obj/item/device/suit_cooling_unit/proc/get_environment_temperature() @@ -146,7 +146,7 @@ user << "You switch on the [src]." /obj/item/device/suit_cooling_unit/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (isscrewdriver(W)) + if (W.isscrewdriver()) if(cover_open) cover_open = 0 user << "You screw the panel into place." diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index bdbdd6b44e8..9791b9d88bb 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -276,7 +276,7 @@ user.drop_from_inventory(W,src) src.cell = W user << "You insert the cell!" - if(iscoil(W)) + if(W.iscoil()) if(src.wires) user << "You have already inserted wire!" return @@ -289,7 +289,7 @@ /obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob) ..() - if(ismultitool(W)) + if(W.ismultitool()) if(law_manager) user << "You disable the lawing circuits on \the [src]." law_manager = FALSE diff --git a/code/game/objects/items/shooting_range.dm b/code/game/objects/items/shooting_range.dm index c1e5802e611..f122caff30c 100644 --- a/code/game/objects/items/shooting_range.dm +++ b/code/game/objects/items/shooting_range.dm @@ -33,7 +33,7 @@ attackby(obj/item/W as obj, mob/user as mob) - if (iswelder(W)) + if (W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0, user)) cut_overlays() diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index cf474fbe798..a45911343c6 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -34,7 +34,7 @@ user << "You can't apply [src] through [H.wear_suit]!" return 1 - if(affecting.status & ORGAN_ROBOT) + if(affecting.status & ORGAN_ASSISTED) user << "This isn't useful at all on a robotic limb.." return 1 diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index 7e12827c15f..edeba1e9ef4 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -31,7 +31,7 @@ var/mob/living/carbon/human/H = M var/obj/item/organ/external/S = H.get_organ(target_zone) - if (S && (S.status & ORGAN_ROBOT)) + if (S && (S.status & ORGAN_ASSISTED)) if(S.get_damage()) user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index 700a75e603b..250101f2ac9 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -52,7 +52,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list( /obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob) ..() - if (iswelder(W)) + if (W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(get_amount() < 2) diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index 80960896d40..b64630eb296 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -26,7 +26,7 @@ /obj/item/stack/material/glass/attackby(obj/item/W, mob/user) ..() if(!is_reinforced) - if(iscoil(W)) + if(W.iscoil()) var/obj/item/stack/cable_coil/CC = W if (get_amount() < 1 || CC.get_amount() < 5) user << "You need five lengths of coil and one sheet of glass to make wired glass." diff --git a/code/game/objects/items/weapons/candle.dm b/code/game/objects/items/weapons/candle.dm index 9a240a64eaf..a9a3f4131d0 100644 --- a/code/game/objects/items/weapons/candle.dm +++ b/code/game/objects/items/weapons/candle.dm @@ -24,7 +24,7 @@ /obj/item/weapon/flame/candle/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool light("\The [user] casually lights the [name] with [W].") diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 0e82187f8e8..60b898960ef 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -17,16 +17,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/lit = 0 /proc/isflamesource(A) - if(iswelder(A)) + var/obj/item/I = A + if(I.iswelder()) var/obj/item/weapon/weldingtool/WT = A return (WT.isOn()) - else if(istype(A, /obj/item/weapon/flame)) - var/obj/item/weapon/flame/F = A + else if(istype(I, /obj/item/weapon/flame)) + var/obj/item/weapon/flame/F = I return (F.lit) - else if(istype(A, /obj/item/device/assembly/igniter)) + else if(istype(I, /obj/item/device/assembly/igniter)) return 1 - else if(istype(A, /obj/item/clothing/gloves/fluff/lunea_gloves)) - var/obj/item/clothing/gloves/fluff/lunea_gloves/F = A + else if(istype(I, /obj/item/clothing/gloves/fluff/lunea_gloves)) + var/obj/item/clothing/gloves/fluff/lunea_gloves/F = I return (F.lit) return 0 @@ -195,7 +196,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM text = zippomes else if(istype(W, /obj/item/weapon/flame/lighter)) text = lightermes - else if(iswelder(W)) + else if(W.iswelder()) text = weldermes else if(istype(W, /obj/item/device/assembly/igniter)) text = ignitermes diff --git a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm index 249b3b37b5c..ddd389027ae 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm @@ -56,7 +56,7 @@ user << "You [locked ? "" : "un"]lock the circuit controls." else user << "Access denied." - else if(ismultitool(I)) + else if(I.ismultitool()) if(locked) user << "Circuit controls are locked." return diff --git a/code/game/objects/items/weapons/circuitboards/computer/research.dm b/code/game/objects/items/weapons/circuitboards/computer/research.dm index bdea0829f0d..4b24d26d58e 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/research.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/research.dm @@ -1,5 +1,5 @@ #ifndef T_BOARD -#error T_BOARD macro is not defined but we need it! +#error T_BOARD macro is not defined but we need it! #endif /obj/item/weapon/circuitboard/rdconsole @@ -7,7 +7,7 @@ build_path = /obj/machinery/computer/rdconsole/core /obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob) - if(isscrewdriver(I)) + if(I.isscrewdriver()) user.visible_message("\The [user] adjusts the jumper on \the [src]'s access protocol pins.", "You adjust the jumper on the access protocol pins.") if(src.build_path == /obj/machinery/computer/rdconsole/core) src.name = T_BOARD("RD Console - Robotics") diff --git a/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm b/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm index b1a1a6e29c4..3dc43c33729 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm @@ -8,7 +8,7 @@ var/init_dirs = SOUTH /obj/item/weapon/circuitboard/unary_atmos/attackby(obj/item/I as obj, mob/user as mob) - if(isscrewdriver(I)) + if(I.isscrewdriver()) machine_dir = turn(machine_dir, 90) init_dirs = machine_dir user.visible_message("\The [user] adjusts the jumper on the [src]'s port configuration pins.", "You adjust the jumper on the port configuration pins. Now set to [dir2text(machine_dir)].") diff --git a/code/game/objects/items/weapons/cloaking_device.dm b/code/game/objects/items/weapons/cloaking_device.dm index 84bdf419b3f..a897c6896e3 100644 --- a/code/game/objects/items/weapons/cloaking_device.dm +++ b/code/game/objects/items/weapons/cloaking_device.dm @@ -132,7 +132,7 @@ else user << "[src] already has a cell." - else if(isscrewdriver(W)) + else if(W.isscrewdriver()) if(cell) cell.update_icon() cell.forceMove(get_turf(src.loc)) diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 5235055ef0e..c25eac0015d 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -25,10 +25,10 @@ return ..() /obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user) - if(isscrewdriver(I)) + if(I.isscrewdriver()) open_panel = !open_panel user << "You [open_panel ? "open" : "close"] the wire panel." - else if(iswirecutter(I) || ismultitool(I) || istype(I, /obj/item/device/assembly/signaler )) + else if(I.iswirecutter() || I.ismultitool() || istype(I, /obj/item/device/assembly/signaler )) wires.Interact(user) else ..() diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index ccb9af1cacf..5122026c44b 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -29,7 +29,7 @@ qdel(igniter) if(ptank) qdel(ptank) - + return ..() @@ -71,7 +71,7 @@ /obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob) if(user.stat || user.restrained() || user.lying) return - if(iswrench(W) && !status)//Taking this apart + if(W.iswrench() && !status)//Taking this apart var/turf/T = get_turf(src) if(weldtool) weldtool.forceMove(T) @@ -86,7 +86,7 @@ qdel(src) return - if(isscrewdriver(W) && igniter && !lit) + if(W.isscrewdriver() && igniter && !lit) status = !status user << "[igniter] is now [status ? "secured" : "unsecured"]!" update_icon() diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index 05a3462c922..9ef4e0bc9c9 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -47,7 +47,7 @@ /obj/effect/spresent/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() - if (!iswirecutter(W)) + if (!W.iswirecutter()) user << "I need wirecutters for that." return diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index 462736ead9e..4c3f448503c 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -70,7 +70,7 @@ icon_state = initial(icon_state) +"_ass" name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]" stage = 1 - else if(isscrewdriver(W) && path != 2) + else if(W.isscrewdriver() && path != 2) if(stage == 1) path = 1 if(beakers.len) diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index a642ca5ea3b..b43aa425c23 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -59,18 +59,8 @@ var/obj/item/organ/eyes/E = H.get_eyes() if(!E) return - H << span("alert", "Your eyes burn with the intense light of the flash!.") - E.damage += rand(10, 11) - if(E.damage > 12) - M.eye_blurry += rand(3,6) - if (E.damage >= E.min_broken_damage) - M.sdisabilities |= BLIND - else if (E.damage >= E.min_bruised_damage) - M.eye_blind = 5 - M.eye_blurry = 5 - M.disabilities |= NEARSIGHTED - spawn(100) - M.disabilities &= ~NEARSIGHTED + + E.flash_act() //Now applying sound if((get_dist(M, T) <= 2 || src.loc == M.loc || src.loc == M)) diff --git a/code/game/objects/items/weapons/improvised_components.dm b/code/game/objects/items/weapons/improvised_components.dm index 5e3408c4015..ba3caadeea5 100644 --- a/code/game/objects/items/weapons/improvised_components.dm +++ b/code/game/objects/items/weapons/improvised_components.dm @@ -7,7 +7,7 @@ thrown_force_divisor = 0.1 /obj/item/weapon/material/butterflyconstruction/attackby(obj/item/W as obj, mob/user as mob) - if(isscrewdriver(W)) + if(W.isscrewdriver()) user << "You finish the concealed blade weapon." new /obj/item/weapon/material/knife/butterfly(user.loc, material.name) qdel(src) @@ -59,7 +59,7 @@ var/obj/item/weapon/material/tmp_shard = I finished = new /obj/item/weapon/material/twohanded/spear(get_turf(user), tmp_shard.material.name) user << "You fasten \the [I] to the top of the rod with the cable." - else if(iswirecutter(I)) + else if(I.iswirecutter()) finished = new /obj/item/weapon/melee/baton/cattleprod(get_turf(user)) user << "You fasten the wirecutters to the top of the rod with the cable, prongs outward." if(finished) diff --git a/code/game/objects/items/weapons/material/material_weapons.dm b/code/game/objects/items/weapons/material/material_weapons.dm index 6e37a9f2215..1e93d082177 100644 --- a/code/game/objects/items/weapons/material/material_weapons.dm +++ b/code/game/objects/items/weapons/material/material_weapons.dm @@ -84,30 +84,4 @@ playsound(src, "shatter", 70, 1) if(!consumed && drops_debris) material.place_shard(T) qdel(src) -/* -Commenting this out pending rebalancing of radiation based on small objects. -/obj/item/weapon/material/process() - if(!material.radioactivity) - return - for(var/mob/living/L in range(1,src)) - L.apply_effect(round(material.radioactivity/30),IRRADIATE, blocked = L.getarmor(null, "rad")) -*/ -/* -// Commenting this out while fires are so spectacularly lethal, as I can't seem to get this balanced appropriately. -/obj/item/weapon/material/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - TemperatureAct(exposed_temperature) - -// This might need adjustment. Will work that out later. -/obj/item/weapon/material/proc/TemperatureAct(temperature) - health -= material.combustion_effect(get_turf(src), temperature, 0.1) - check_health(1) - -/obj/item/weapon/material/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswelder(W)) - var/obj/item/weapon/weldingtool/WT = W - if(material.ignition_point && WT.remove_fuel(0, user)) - TemperatureAct(150) - else - return ..() -*/ diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm index 25297683f1a..7d1b392cc71 100644 --- a/code/game/objects/items/weapons/material/shards.dm +++ b/code/game/objects/items/weapons/material/shards.dm @@ -47,7 +47,7 @@ alpha = 255 /obj/item/weapon/material/shard/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswelder(W) && material.shard_can_repair) + if(W.iswelder() && material.shard_can_repair) var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0, user)) material.place_sheet(user.loc) diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 4449825d3e5..6f4378b715f 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -40,12 +40,12 @@ playsound(src.loc, "sparks", 50, 1) return - if (isscrewdriver(W)) + if (W.isscrewdriver()) if (do_after(user, 20)) src.open =! src.open user.show_message(text("You [] the service panel.", (src.open ? "open" : "close"))) return - if ((ismultitool(W)) && (src.open == 1)&& (!src.l_hacking)) + if ((W.ismultitool()) && (src.open == 1)&& (!src.l_hacking)) user.show_message("Now attempting to reset internal memory, please hold.", 1) src.l_hacking = 1 if (do_after(usr, 100)) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 8b33c82f436..31b91224cbd 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -73,7 +73,7 @@ else user << "[src] already has a cell." - else if(isscrewdriver(W)) + else if(W.isscrewdriver()) if(bcell) bcell.update_icon() bcell.forceMove(get_turf(src)) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 74cfeaf4e78..e8e1bc2dd6d 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -29,6 +29,8 @@ matter = list(DEFAULT_WALL_MATERIAL = 150) attack_verb = list("bashed", "battered", "bludgeoned", "whacked") +/obj/item/weapon/wrench/iswrench() + return TRUE /* * Screwdriver @@ -50,6 +52,7 @@ lock_picking_level = 5 var/random_icon = TRUE + /obj/item/weapon/screwdriver/Initialize() . = ..() if(!random_icon) @@ -90,6 +93,9 @@ M = user return eyestab(M,user) +/obj/item/weapon/screwdriver/isscrewdriver() + return TRUE + /* * Wirecutters */ @@ -129,6 +135,9 @@ else ..() +/obj/item/weapon/wirecutters/iswirecutter() + return TRUE + /* * Welding Tool */ @@ -161,6 +170,8 @@ var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower) var/max_fuel = 20 //The max amount of fuel the welder can hold +/obj/item/weapon/weldingtool/iswelder() + return TRUE /obj/item/weapon/weldingtool/largetank name = "industrial welding tool" @@ -225,7 +236,7 @@ user << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel ) /obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/user as mob) - if(isscrewdriver(W)) + if(W.isscrewdriver()) if (isrobot(loc)) user << span("alert", "You cannot modify your own welder!") return @@ -289,7 +300,7 @@ var/obj/item/organ/external/S = M:organs_by_name[target_zone] if (!S) return - if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP) + if(!(S.status & ORGAN_ASSISTED) || user.a_intent != I_HELP) return ..() if(M.isSynthetic() && M == user && !(M.get_species() == "Hunter-Killer")) @@ -527,6 +538,9 @@ matter = list(DEFAULT_WALL_MATERIAL = 50) attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked") +/obj/item/weapon/crowbar/iscrowbar() + return TRUE + /obj/item/weapon/crowbar/red icon = 'icons/obj/items.dmi' icon_state = "red_crowbar" @@ -546,3 +560,59 @@ origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 2) matter = list(DEFAULT_WALL_MATERIAL = 150) attack_verb = list("bashed", "battered", "bludgeoned", "whacked") + +//combitool + +/obj/item/combitool + name = "combi-tool" + desc = "It even has one of those nubbins for doing the thingy." + icon = 'icons/obj/combitool.dmi' + icon_state = "combitool" + force = 3 + w_class = 2 + + var/list/tools = list( + "crowbar", + "screwdriver", + "wrench", + "wirecutters" + ) + var/current_tool = 1 + +/obj/item/combitool/Initialize() + desc = "[initial(desc)] ([tools.len]. [tools.len] possibilit[tools.len == 1 ? "y" : "ies"])" + . = ..() + +/obj/item/combitool/examine(var/mob/user) + . = ..() + if(. && tools.len) + to_chat(user, "It has the following fittings:") + for(var/tool in tools) + to_chat(user, "- [tool][tools[current_tool] == tool ? " (selected)" : ""]") + +/obj/item/combitool/iswrench() + return tools[current_tool] == "wrench" + +/obj/item/combitool/isscrewdriver() + return tools[current_tool] == "screwdriver" + +/obj/item/combitool/iswirecutter() + return tools[current_tool] == "wirecutters" + +/obj/item/combitool/iscrowbar() + return tools[current_tool] == "crowbar" + +/obj/item/combitool/proc/update_tool() + icon_state = "[initial(icon_state)]-[tools[current_tool]]" + +/obj/item/combitool/attack_self(var/mob/user) + if(++current_tool > tools.len) + current_tool = 1 + var/tool = tools[current_tool] + if(!tool) + to_chat(user, "You can't seem to find any fittings in \the [src].") + else + to_chat(user, "You switch \the [src] to the [tool] fitting.") + update_tool() + return 1 + diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm index 325870e8540..55b745e747d 100644 --- a/code/game/objects/items/weapons/traps.dm +++ b/code/game/objects/items/weapons/traps.dm @@ -373,7 +373,7 @@ if(istype(W, /obj/item/weapon/reagent_containers) && contents.len) var/mob/living/L = pick(contents) W.afterattack(L, user, TRUE) - else if(iswelder(W)) + else if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W user.visible_message("[user] is trying to slice \the [src]!", "You are trying to slice \the [src]!") @@ -388,7 +388,7 @@ new /obj/item/stack/material/steel(src.loc, resources["metal"]) qdel(src) - else if(istype(W, /obj/item/weapon/screwdriver)) + else if(W.isscrewdriver()) var/turf/T = get_turf(src) if(!T) to_chat(user, "There is nothing to secure [src] to!") diff --git a/code/game/objects/items/weapons/weldbackpack.dm b/code/game/objects/items/weapons/weldbackpack.dm index 698478527b6..e45de083ff9 100644 --- a/code/game/objects/items/weapons/weldbackpack.dm +++ b/code/game/objects/items/weapons/weldbackpack.dm @@ -14,7 +14,7 @@ R.add_reagent("fuel", max_fuel) /obj/item/weapon/weldpack/attackby(obj/item/W as obj, mob/user as mob) - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/T = W if(T.welding & prob(50)) message_admins("[key_name_admin(user)] triggered a fueltank explosion.") diff --git a/code/game/objects/structures/alien/node.dm b/code/game/objects/structures/alien/node.dm index e69e798084b..be02aa69af2 100644 --- a/code/game/objects/structures/alien/node.dm +++ b/code/game/objects/structures/alien/node.dm @@ -86,7 +86,7 @@ var/damage = W.force / 4.0 - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0, user)) diff --git a/code/game/objects/structures/banner.dm b/code/game/objects/structures/banner.dm index 6aa4172f949..1d2d70d0a57 100644 --- a/code/game/objects/structures/banner.dm +++ b/code/game/objects/structures/banner.dm @@ -27,7 +27,7 @@ src.update_icon() /obj/structure/banner/attackby(obj/item/W, mob/user) - if(iswrench(W)) + if(W.iswrench()) switch(anchored) if(0) anchored = 1 diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 360df1db39f..d4b32caf440 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -221,7 +221,7 @@ return 0 if(istype(W,/obj/item/tk_grab)) return 0 - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(WT.isOn()) user.visible_message( @@ -262,7 +262,7 @@ user.drop_item() else if(istype(W, /obj/item/weapon/packageWrap)) return - else if(iswelder(W)) + else if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(WT.isOn()) user.visible_message( diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index dad52f452bc..18192630cdf 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -78,7 +78,7 @@ MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet else to_chat(user, "The locker is too small to stuff [G.affecting] into!") - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(WT.isOn()) user.visible_message( @@ -108,7 +108,7 @@ user.drop_from_inventory(W,loc) else user.drop_item() - else if(isscrewdriver(W) && canbemoved) + else if(W.isscrewdriver() && canbemoved) if(screwed) to_chat(user, "You start to unscrew the locker from the floor...") playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) @@ -123,7 +123,7 @@ to_chat(user, "You screw the locker!") playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) screwed = 1 - else if(iswrench(W) && canbemoved) + else if(W.iswrench() && canbemoved) if(wrenched && !screwed) to_chat(user, "You start to unfasten the bolts holding the locker in place...") playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) @@ -163,7 +163,7 @@ spark(src, 5) playsound(loc, 'sound/weapons/blade1.ogg', 50, 1) playsound(loc, "sparks", 50, 1) - else if(iswelder(W)) + else if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(WT.isOn()) user.visible_message( diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index f2dc6b36eb6..dbbc55f02e4 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -93,7 +93,7 @@ return ..() else if(istype(W, /obj/item/weapon/packageWrap)) return - else if(iscoil(W)) + else if(W.iscoil()) var/obj/item/stack/cable_coil/C = W if(rigged) user << "[src] is already rigged!" @@ -107,7 +107,7 @@ user << "You attach [W] to [src]." user.drop_from_inventory(W,src) return - else if(iswirecutter(W)) + else if(W.iswirecutter()) if(rigged) user << "You cut away the wiring." playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1) diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm index 197aa17a080..cf2e9b1a3eb 100644 --- a/code/game/objects/structures/crates_lockers/largecrate.dm +++ b/code/game/objects/structures/crates_lockers/largecrate.dm @@ -10,7 +10,7 @@ return /obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iscrowbar(W)) + if(W.iscrowbar()) new /obj/item/stack/material/wood(src) var/turf/T = get_turf(src) for(var/atom/movable/AM in contents) @@ -34,7 +34,7 @@ icon_state = "mulecrate" /obj/structure/largecrate/hoverpod/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iscrowbar(W)) + if(W.iscrowbar()) var/obj/item/mecha_parts/mecha_equipment/ME var/obj/mecha/working/hoverpod/H = new (loc) @@ -77,13 +77,13 @@ name = "chicken crate" held_count = 5 held_type = /mob/living/simple_animal/chick - + /obj/structure/largecrate/animal/dog name = "dog carrier" held_type = /mob/living/simple_animal/hostile/commanded/dog - + /obj/structure/largecrate/animal/dog/amaskan held_type = /mob/living/simple_animal/hostile/commanded/dog/amaskan - + /obj/structure/largecrate/animal/dog/pug held_type = /mob/living/simple_animal/hostile/commanded/dog/pug diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index 9d80256c56f..0c6bb14f9f8 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -160,7 +160,7 @@ created_name = t return - if(iswelder(W) && ( (istext(glass)) || (glass == 1) || (!anchored) )) + if(W.iswelder() && ( (istext(glass)) || (glass == 1) || (!anchored) )) var/obj/item/weapon/weldingtool/WT = W if (WT.remove_fuel(0, user)) playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) @@ -190,7 +190,7 @@ user << "You need more welding fuel." return - else if(iswrench(W) && state == 0) + else if(W.iswrench() && state == 0) playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) if(anchored) user.visible_message("[user] begins unsecuring the airlock assembly from the floor.", "You starts unsecuring the airlock assembly from the floor.") @@ -202,7 +202,7 @@ user << "You [anchored? "un" : ""]secured the airlock assembly!" anchored = !anchored - else if(iscoil(W) && state == 0 && anchored) + else if(W.iscoil() && state == 0 && anchored) var/obj/item/stack/cable_coil/C = W if (C.get_amount() < 1) user << "You need one length of coil to wire the airlock assembly." @@ -213,7 +213,7 @@ src.state = 1 user << "You wire the airlock." - else if(iswirecutter(W) && state == 1 ) + else if(W.iswirecutter() && state == 1 ) playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.") @@ -240,7 +240,7 @@ else EL.inuse = 0 - else if(iscrowbar(W) && state == 2 ) + else if(W.iscrowbar() && state == 2 ) //This should never happen, but just in case I guess if (!electronics) user << "There was nothing to remove." @@ -283,7 +283,7 @@ user << "You installed [material_display_name(material_name)] plating into the airlock assembly." glass = material_name - else if(isscrewdriver(W) && state == 2 ) + else if(W.isscrewdriver() && state == 2 ) playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) user << "Now finishing the airlock." diff --git a/code/game/objects/structures/fireaxe_cabinet.dm b/code/game/objects/structures/fireaxe_cabinet.dm index 6cb7a2ff228..0fd5469b367 100644 --- a/code/game/objects/structures/fireaxe_cabinet.dm +++ b/code/game/objects/structures/fireaxe_cabinet.dm @@ -78,7 +78,7 @@ /obj/structure/fireaxecabinet/attackby(var/obj/item/O, var/mob/user) - if(ismultitool(O)) + if(O.ismultitool()) toggle_lock(user) return diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 22a9e62a57e..f43b1354758 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -54,7 +54,7 @@ reinforce_girder() /obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob) - if(iswrench(W) && state == 0) + if(W.iswrench() && state == 0) if(anchored && !reinf_material) playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) user << "Now disassembling the girder..." @@ -111,7 +111,7 @@ user << "You drill through the girder!" dismantle() - else if(isscrewdriver(W)) + else if(W.isscrewdriver()) if(state == 2) playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) user << "Now unsecuring support struts..." @@ -124,7 +124,7 @@ reinforcing = !reinforcing user << "\The [src] can now be [reinforcing? "reinforced" : "constructed"]!" - else if(iswirecutter(W) && state == 1) + else if(W.iswirecutter() && state == 1) playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) user << "Now removing support struts..." if(do_after(user,40)) @@ -134,7 +134,7 @@ reinf_material = null reset_girder() - else if(iscrowbar(W) && state == 0 && anchored) + else if(W.iscrowbar() && state == 0 && anchored) playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) user << "Now dislodging the girder..." if(do_after(user, 40)) @@ -272,7 +272,7 @@ qdel(src) /obj/structure/girder/cult/attackby(obj/item/W as obj, mob/user as mob) - if(iswrench(W)) + if(W.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) user << "Now disassembling the girder..." if(do_after(user,40)) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 75b85f4995d..3b7924d133e 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -93,12 +93,12 @@ spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted /obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswirecutter(W)) + if(W.iswirecutter()) if(!shock(user, 100)) playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1) new /obj/item/stack/rods(get_turf(src), destroyed ? 1 : 2) qdel(src) - else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored)) + else if((W.isscrewdriver()) && (istype(loc, /turf/simulated) || anchored)) if(!shock(user, 90)) playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1) anchored = !anchored diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index dac58f86e51..f1168523548 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -139,7 +139,7 @@ //This return will prevent afterattack from executing if the object goes into the trashbag, //This prevents dumb stuff like splashing the cart with the contents of a container, after putting said container into trash - else if (!has_items && (iswrench(I) || iswelder(I) || istype(I, /obj/item/weapon/gun/energy/plasmacutter))) + else if (!has_items && (I.iswrench() || I.iswelder() || istype(I, /obj/item/weapon/gun/energy/plasmacutter))) dismantle(user) return ..() diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index 931c4c80d90..4d923fe8041 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -42,7 +42,7 @@ var/turf/T = get_turf(src) T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead return - if (iswelder(C)) + if (C.iswelder()) var/obj/item/weapon/weldingtool/WT = C if(WT.remove_fuel(0, user)) user << "Slicing lattice joints ..." @@ -73,7 +73,7 @@ layer = 2.7 // Above wires. /obj/structure/lattice/catwalk/attackby(obj/item/C, mob/user) - if (iswelder(C)) + if (C.iswelder()) var/obj/item/weapon/weldingtool/WT = C if (do_after(user, 5, act_target = src) && WT.remove_fuel(1, user)) user << "You slice apart [src]." @@ -82,7 +82,7 @@ qdel(src) /obj/structure/lattice/catwalk/indoor/attackby(obj/item/C, mob/user) - if (isscrewdriver(C)) + if (C.isscrewdriver()) anchored = !anchored user << "You [anchored ? "" : "un"]anchor [src]." playsound(src, 'sound/items/Screwdriver.ogg', 50, 1) diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index 589933151af..da0273b007b 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -414,7 +414,7 @@ return /obj/structure/device/piano/attackby(obj/item/O as obj, mob/user as mob) - if (iswrench(O)) + if (O.iswrench()) if (anchored) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You begin to loosen \the [src]'s casters..." diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index 66bde6ff511..514637317b4 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -21,7 +21,7 @@ return /obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction - if(isscrewdriver(tool) && !istype(src, /obj/structure/sign/double)) + if(tool.isscrewdriver() && !istype(src, /obj/structure/sign/double)) user << "You unfasten the sign with your [tool]." unfasten() else ..() @@ -44,7 +44,7 @@ var/sign_state = "" /obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction - if(isscrewdriver(tool) && isturf(user.loc)) + if(tool.isscrewdriver() && isturf(user.loc)) var/direction = input("In which direction?", "Select direction.") in list("North", "East", "South", "West", "Cancel") if(direction == "Cancel") return var/obj/structure/sign/S = new(user.loc) diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 05926d9207d..24dd56c153b 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -90,7 +90,7 @@ return /obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswrench(W)) + if(W.iswrench()) if(can_dismantle) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) dismantle() @@ -121,7 +121,7 @@ add_padding(padding_type) return - else if (iswirecutter(W)) + else if (W.iswirecutter()) if(!padding_material) user << "\The [src] has no padding to remove." return @@ -192,7 +192,7 @@ return // Doesn't care about material or anything else. /obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswrench(W) || istype(W,/obj/item/stack) || iswirecutter(W)) + if(W.iswrench() || istype(W,/obj/item/stack) || W.iswirecutter()) return else if(istype(W,/obj/item/roller_holder)) if(buckled_mob) diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index a38b9a969c7..9f135937858 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -128,7 +128,7 @@ return /obj/structure/bed/chair/office/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/stack) || iswirecutter(W)) + if(istype(W,/obj/item/stack) || W.iswirecutter()) return ..() @@ -201,7 +201,7 @@ return /obj/structure/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/stack) || iswirecutter(W)) + if(istype(W,/obj/item/stack) || W.iswirecutter()) return ..() diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index 49155c531b7..3e2b4a2cda9 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -112,7 +112,7 @@ qdel(src) /obj/item/weapon/stool/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswrench(W)) + if(W.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) dismantle() qdel(src) @@ -141,7 +141,7 @@ user << "You add padding to \the [src]." add_padding(padding_type) return - else if (iswirecutter(W)) + else if (W.iswirecutter()) if(!padding_material) user << "\The [src] has no padding to remove." return diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 94d21dd6d08..706146e412f 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -19,7 +19,7 @@ buckled_mob.set_dir(dir) /obj/structure/bed/chair/wheelchair/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswrench(W) || istype(W,/obj/item/stack) || iswirecutter(W)) + if(W.iswrench() || istype(W,/obj/item/stack) || W.iswirecutter()) return ..() diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index 32ce1566b8d..da13797d562 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -74,7 +74,7 @@ user << "[src] is full." updateUsrDialog() return - if(iswrench(I)) + if(I.iswrench()) if(anchored) user << "You lean down and unwrench [src]." anchored = 0 diff --git a/code/game/objects/structures/therapy.dm b/code/game/objects/structures/therapy.dm index b4aa70f53ab..99c0c3aa21c 100644 --- a/code/game/objects/structures/therapy.dm +++ b/code/game/objects/structures/therapy.dm @@ -28,7 +28,7 @@ . = ..() /obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswrench(W)) + if(W.iswrench()) var/obj/structure/bed/chair/C = new /obj/structure/bed/chair(loc) playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) C.set_dir(dir) @@ -186,7 +186,7 @@ START_PROCESSING(SSfast_process, src) /obj/structure/metronome/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswrench(W)) + if(W.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) if(anchored) user << "You unanchor \the [src] and it destabilizes." diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 5070935fec7..aa567309939 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -45,7 +45,7 @@ icon_state = "toilet[open][cistern]" /obj/structure/toilet/attackby(obj/item/I as obj, mob/living/user as mob) - if(iscrowbar(I)) + if(I.iscrowbar()) user << "You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]." playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1) if(do_after(user, 30)) @@ -169,7 +169,7 @@ /obj/machinery/shower/attackby(obj/item/I as obj, mob/user as mob) if(I.type == /obj/item/device/analyzer) user << "The water temperature seems to be [watertemp]." - if(iswrench(I)) + if(I.iswrench()) var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings user << "You begin to adjust the temperature valve with \the [I]." playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 941a4505188..1b8d19eb132 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -69,7 +69,7 @@ obj/structure/windoor_assembly/Destroy() //I really should have spread this out across more states but thin little windoors are hard to sprite. switch(state) if("01") - if(iswelder(W) && !anchored ) + if(W.iswelder() && !anchored ) var/obj/item/weapon/weldingtool/WT = W if (WT.remove_fuel(0,user)) user.visible_message("[user] dissassembles the windoor assembly.", "You start to dissassemble the windoor assembly.") @@ -87,7 +87,7 @@ obj/structure/windoor_assembly/Destroy() return //Wrenching an unsecure assembly anchors it in place. Step 4 complete - if(iswrench(W) && !anchored) + if(W.iswrench() && !anchored) playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.") @@ -101,7 +101,7 @@ obj/structure/windoor_assembly/Destroy() src.name = "Anchored Windoor Assembly" //Unwrenching an unsecure assembly un-anchors it. Step 4 undone - else if(iswrench(W) && anchored) + else if(W.iswrench() && anchored) playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.") @@ -132,7 +132,7 @@ obj/structure/windoor_assembly/Destroy() src.name = "Secure Windoor Assembly" //Adding cable to the assembly. Step 5 complete. - else if(iscoil(W) && anchored) + else if(W.iscoil() && anchored) user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.") var/obj/item/stack/cable_coil/CC = W @@ -150,7 +150,7 @@ obj/structure/windoor_assembly/Destroy() if("02") //Removing wire from the assembly. Step 5 undone. - if(iswirecutter(W) && !src.electronics) + if(W.iswirecutter() && !src.electronics) playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.") @@ -183,7 +183,7 @@ obj/structure/windoor_assembly/Destroy() EL.inuse = 0 //Screwdriver to remove airlock electronics. Step 6 undone. - else if(isscrewdriver(W) && src.electronics) + else if(W.isscrewdriver() && src.electronics) playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.") @@ -199,7 +199,7 @@ obj/structure/windoor_assembly/Destroy() ae.forceMove(src.loc) //Crowbar to complete the assembly, Step 7 complete. - else if(iscrowbar(W)) + else if(W.iscrowbar()) if(!src.electronics) usr << "The assembly is missing electronics." return diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 4be9dd14c1f..03843628401 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -221,7 +221,7 @@ if(W.flags & NOBLUDGEON) return - if(isscrewdriver(W)) + if(W.isscrewdriver()) if(reinf && state >= 1) state = 3 - state update_nearby_icons() @@ -237,11 +237,11 @@ update_nearby_icons() playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1) user << (anchored ? "You have fastened the window to the floor." : "You have unfastened the window.") - else if(iscrowbar(W) && reinf && state <= 1) + else if(W.iscrowbar() && reinf && state <= 1) state = 1 - state playsound(loc, 'sound/items/Crowbar.ogg', 75, 1) user << (state ? "You have pried the window into the frame." : "You have pried the window out of the frame.") - else if(iswrench(W) && !anchored && (!state || !reinf)) + else if(W.iswrench() && !anchored && (!state || !reinf)) if(!glasstype) user << "You're not sure how to dismantle \the [src] properly." else diff --git a/code/game/turfs/simulated/floor_attackby.dm b/code/game/turfs/simulated/floor_attackby.dm index 4e2e10e4050..25c3b162440 100644 --- a/code/game/turfs/simulated/floor_attackby.dm +++ b/code/game/turfs/simulated/floor_attackby.dm @@ -4,7 +4,7 @@ return 0 if(flooring) - if(iscrowbar(C)) + if(C.iscrowbar()) if(broken || burnt) user << "You remove the broken [flooring.descriptor]." make_plating() @@ -18,14 +18,14 @@ return playsound(src, 'sound/items/Crowbar.ogg', 80, 1) return - else if(isscrewdriver(C) && (flooring.flags & TURF_REMOVE_SCREWDRIVER)) + else if(C.isscrewdriver() && (flooring.flags & TURF_REMOVE_SCREWDRIVER)) if(broken || burnt) return user << "You unscrew and remove the [flooring.descriptor]." make_plating(1) playsound(src, 'sound/items/Screwdriver.ogg', 80, 1) return - else if(iswrench(C) && (flooring.flags & TURF_REMOVE_WRENCH)) + else if(C.iswrench() && (flooring.flags & TURF_REMOVE_WRENCH)) user << "You unwrench and remove the [flooring.descriptor]." make_plating(1) playsound(src, 'sound/items/Ratchet.ogg', 80, 1) @@ -35,12 +35,12 @@ make_plating(1) playsound(src, 'sound/items/Deconstruct.ogg', 80, 1) return - else if(iscoil(C)) + else if(C.iscoil()) user << "You must remove the [flooring.descriptor] first." return else - if(iscoil(C)) + if(C.iscoil()) if(broken || burnt) user << "This section is too damaged to support anything. Use a welder to fix the damage." return @@ -76,7 +76,7 @@ playsound(src, 'sound/items/Deconstruct.ogg', 80, 1) return // Repairs. - else if(iswelder(C)) + else if(C.iswelder()) var/obj/item/weapon/weldingtool/welder = C if(welder.isOn() && (is_plating())) if(broken || burnt) diff --git a/code/game/turfs/simulated/floor_static.dm b/code/game/turfs/simulated/floor_static.dm index 02a07d49be8..3fa3ab12322 100644 --- a/code/game/turfs/simulated/floor_static.dm +++ b/code/game/turfs/simulated/floor_static.dm @@ -8,7 +8,7 @@ initial_flooring = null /turf/simulated/floor/fixed/attackby(var/obj/item/C, var/mob/user) - if(istype(C, /obj/item/stack) && !iscoil(C)) + if(istype(C, /obj/item/stack) && !C.iscoil()) return return ..() diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index b5ea2a37a41..3be639418b0 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -118,7 +118,7 @@ burn(is_hot(W)) if(locate(/obj/effect/overlay/wallrot) in src) - if(iswelder(W) ) + if(W.iswelder() ) var/obj/item/weapon/weldingtool/WT = W if( WT.remove_fuel(0,user) ) user << "You burn away the fungi with \the [WT]." @@ -133,7 +133,7 @@ //THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects if(thermite) - if( iswelder(W) ) + if(W.iswelder() ) var/obj/item/weapon/weldingtool/WT = W if( WT.remove_fuel(0,user) ) thermitemelt(user) @@ -156,7 +156,7 @@ var/turf/T = user.loc //get user's location for delay checks - if(damage && iswelder(W)) + if(damage && W.iswelder()) var/obj/item/weapon/weldingtool/WT = W @@ -181,7 +181,7 @@ var/dismantle_verb var/dismantle_sound - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(!WT.isOn()) return @@ -245,7 +245,7 @@ else switch(construction_stage) if(6) - if (iswirecutter(W)) + if (W.iswirecutter()) playsound(src, 'sound/items/Wirecutter.ogg', 100, 1) construction_stage = 5 new /obj/item/stack/rods( src ) @@ -253,7 +253,7 @@ update_icon() return if(5) - if (isscrewdriver(W)) + if (W.isscrewdriver()) user << "You begin removing the support lines." playsound(src, 'sound/items/Screwdriver.ogg', 100, 1) if(!do_after(user,40) || !istype(src, /turf/simulated/wall) || construction_stage != 5) @@ -272,7 +272,7 @@ return if(4) var/cut_cover - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(!WT.isOn()) return @@ -293,7 +293,7 @@ user << "You press firmly on the cover, dislodging it." return if(3) - if (iscrowbar(W)) + if (W.iscrowbar()) user << "You struggle to pry off the cover." playsound(src, 'sound/items/Crowbar.ogg', 100, 1) if(!do_after(user,100) || !istype(src, /turf/simulated/wall) || construction_stage != 3) @@ -303,7 +303,7 @@ user << "You pry off the cover." return if(2) - if (iswrench(W)) + if (W.iswrench()) user << "You start loosening the anchoring bolts which secure the support rods to their frame." playsound(src, 'sound/items/Ratchet.ogg', 100, 1) if(!do_after(user,40) || !istype(src, /turf/simulated/wall) || construction_stage != 2) @@ -314,7 +314,7 @@ return if(1) var/cut_cover - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if( WT.remove_fuel(0,user) ) cut_cover=1 @@ -334,7 +334,7 @@ user << "The support rods drop out as you cut them loose from the frame." return if(0) - if(iscrowbar(W)) + if(W.iscrowbar()) user << "You struggle to pry off the outer sheath." playsound(src, 'sound/items/Crowbar.ogg', 100, 1) sleep(100) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 930416470c8..eada693553a 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -229,7 +229,7 @@ var/const/enterloopsanity = 100 return can_have_cabling() /turf/attackby(obj/item/C, mob/user) - if (can_lay_cable() && iscoil(C)) + if (can_lay_cable() && C.iscoil()) var/obj/item/stack/cable_coil/coil = C coil.turf_place(src, user) else diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index bee80a73c91..9d5ffa9b627 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -100,7 +100,7 @@ if((!A.secured) && (!secured)) attach_assembly(A,user) return - if(isscrewdriver(W)) + if(W.isscrewdriver()) if(toggle_secure()) user << "\The [src] is ready!" else diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index d1b03654dbf..e5e399f9e6c 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -26,7 +26,7 @@ if(istype(W, /obj/item/device/analyzer)) bombtank.attackby(W, user) return - if(iswrench(W) && !status) //This is basically bomb assembly code inverted. apparently it works. + if(W.iswrench() && !status) //This is basically bomb assembly code inverted. apparently it works. user << "You disassemble [src]." @@ -40,7 +40,7 @@ qdel(src) return - if((iswelder(W) && W:welding)) + if((W.iswelder() && W:welding)) if(!status) status = 1 bombers += "[key_name(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]" diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index b3767dc7d94..f4bf8eb3a14 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -144,7 +144,7 @@ attackby(obj/item/weapon/W as obj, mob/user as mob) - if(isscrewdriver(W)) + if(W.isscrewdriver()) if(!a_left || !a_right) user << "BUG:Assembly part missing, please report this!" return @@ -217,7 +217,7 @@ /obj/item/device/assembly_holder/Destroy() listening_objects -= src return ..() - + /obj/item/device/assembly_holder/hear_talk(mob/living/M as mob, msg, verb, datum/language/speaking) if(a_right) diff --git a/code/modules/assembly/shock_kit.dm b/code/modules/assembly/shock_kit.dm index ebd5e465b2f..4149738e1b0 100644 --- a/code/modules/assembly/shock_kit.dm +++ b/code/modules/assembly/shock_kit.dm @@ -11,11 +11,11 @@ /obj/item/assembly/shock_kit/Destroy() qdel(part1) qdel(part2) - + return ..() /obj/item/assembly/shock_kit/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswrench(W) && !status) + if(W.iswrench() && !status) var/turf/T = loc if(ismob(T)) T = T.loc @@ -27,7 +27,7 @@ part2 = null qdel(src) return - if(isscrewdriver(W)) + if(W.isscrewdriver()) status = !status user << "[src] is now [status ? "secured" : "unsecured"]!" add_fingerprint(user) diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index c2800c9c878..11c98b928a3 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -134,7 +134,7 @@ obj/machinery/gateway/centerstation/process() /obj/machinery/gateway/centerstation/attackby(obj/item/device/W as obj, mob/user as mob) - if(ismultitool(W)) + if(W.ismultitool()) user << "\black The gate is already calibrated, there is no work for you to do here." return @@ -230,7 +230,7 @@ obj/machinery/gateway/centerstation/process() /obj/machinery/gateway/centeraway/attackby(obj/item/device/W as obj, mob/user as mob) - if(ismultitool(W)) + if(W.ismultitool()) if(calibrated) user << "\black The gate is already calibrated, there is no work for you to do here." return diff --git a/code/modules/blob/blob.dm b/code/modules/blob/blob.dm index 88c40674e73..18c0cb64dff 100644 --- a/code/modules/blob/blob.dm +++ b/code/modules/blob/blob.dm @@ -235,7 +235,7 @@ switch(W.damtype) if("fire") damage = (W.force / fire_resist) - if(iswelder(W)) + if(W.iswelder()) playsound(loc, 'sound/items/Welder.ogg', 100, 1) if("brute") if(prob(30) && !issilicon(user)) diff --git a/code/modules/cargo/random_stock/t2_uncommon.dm b/code/modules/cargo/random_stock/t2_uncommon.dm index 747a7b22da0..6f0a582567e 100644 --- a/code/modules/cargo/random_stock/t2_uncommon.dm +++ b/code/modules/cargo/random_stock/t2_uncommon.dm @@ -90,7 +90,7 @@ STOCK_ITEM_UNCOMMON(chempack, 5) STOCK_ITEM_UNCOMMON(robolimbs, 3) for (var/i in 1 to rand(2, 5)) - var/manuf = pick(all_robolimbs) + var/manuf = pick(chargen_robolimbs) var/type = pick( \ /obj/item/robot_parts/l_arm, \ /obj/item/robot_parts/r_arm, \ diff --git a/code/modules/client/preference_setup/loadout/loadout_xeno.dm b/code/modules/client/preference_setup/loadout/loadout_xeno.dm index cf8a99970d5..c49cda07381 100644 --- a/code/modules/client/preference_setup/loadout/loadout_xeno.dm +++ b/code/modules/client/preference_setup/loadout/loadout_xeno.dm @@ -6,27 +6,27 @@ display_name = "hide mantle (Unathi)" path = /obj/item/clothing/suit/unathi/mantle cost = 1 - whitelisted = list("Unathi") + whitelisted = list("Unathi", "Aut'akh Unathi") sort_category = "Xenowear - Unathi" /datum/gear/suit/unathi_robe display_name = "roughspun robe (Unathi)" path = /obj/item/clothing/suit/unathi/robe cost = 1 - whitelisted = list("Unathi") + whitelisted = list("Unathi", "Aut'akh Unathi") sort_category = "Xenowear - Unathi" /datum/gear/suit/robe_coat display_name = "tzirzi robe (Unathi)" path = /obj/item/clothing/suit/unathi/robe/robe_coat cost = 1 - whitelisted = list("Unathi") + whitelisted = list("Unathi", "Aut'akh Unathi") sort_category = "Xenowear - Unathi" /datum/gear/gloves/unathi display_name = "gloves selection (Unathi)" path = /obj/item/clothing/gloves/black/unathi - whitelisted = list("Unathi") + whitelisted = list("Unathi", "Aut'akh Unathi") sort_category = "Xenowear - Unathi" /datum/gear/gloves/unathi/New() @@ -45,13 +45,49 @@ /datum/gear/uniform/unathi display_name = "sinta tunic (Unathi)" path = /obj/item/clothing/under/unathi - whitelisted = list("Unathi") + whitelisted = list("Unathi", "Aut'akh Unathi") sort_category = "Xenowear - Unathi" /datum/gear/uniform/unathi/New() ..() gear_tweaks = list(gear_tweak_free_color_choice) +/datum/gear/autakh_engineering + display_name = "engineering grasper (Aut'akh Unathi)" + description = "An Aut'akh augment limb, this one is outfitted with a limited toolkit." + path = /obj/item/organ/external/hand/right/autakh/tool + whitelisted = list("Aut'akh Unathi") + sort_category = "Xenowear - Unathi" + cost = 3 + allowed_roles = list("Station Engineer", "Chief Engineer", "Atmospheric Technician", "Engineering Apprentice", "Roboticist") + +/datum/gear/autakh_engineering + display_name = "mining grasper (Aut'akh Unathi)" + description = "An Aut'akh augment limb, this one is outfitted with a mining drill." + path = /obj/item/organ/external/hand/right/autakh/tool/mining + whitelisted = list("Aut'akh Unathi") + sort_category = "Xenowear - Unathi" + cost = 3 + allowed_roles = list("Shaft Miner") + +/datum/gear/autakh_medical + display_name = "medical grasper (Aut'akh Unathi)" + description = "An Aut'akh augment limb, this one is outfitted with a health scanner." + path = /obj/item/organ/external/hand/right/autakh/medical + whitelisted = list("Aut'akh Unathi") + sort_category = "Xenowear - Unathi" + cost = 3 + allowed_roles = list("Chief Medical Officer", "Medical Doctor", "Paramedic", "Medical Resident", "Psychiatrist", "Chemist") + +/datum/gear/autakh_security + display_name = "security grasper (Aut'akh Unathi)" + description = "An Aut'akh augment limb, this one is outfitted with an electroshock weapon." + path = /obj/item/organ/external/hand/right/autakh/security + whitelisted = list("Aut'akh Unathi") + sort_category = "Xenowear - Unathi" + cost = 3 + allowed_roles = list("Security Officer", "Head of Security", "Warden") + //skrell /datum/gear/ears/skrell/chains //Chains diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index efe394f5e01..1c3826b2d39 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -387,7 +387,7 @@ /obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user) ..() - if(iswirecutter(W) || istype(W, /obj/item/weapon/scalpel)) + if(W.iswirecutter() || istype(W, /obj/item/weapon/scalpel)) if (clipped) user << "\The [src] have already been clipped!" update_icon() diff --git a/code/modules/clothing/gloves/boxing.dm b/code/modules/clothing/gloves/boxing.dm index fcf3a307a4f..dc3a7b42a37 100644 --- a/code/modules/clothing/gloves/boxing.dm +++ b/code/modules/clothing/gloves/boxing.dm @@ -6,7 +6,7 @@ species_restricted = list("exclude","Vaurca Breeder","Vaurca Warform") /obj/item/clothing/gloves/boxing/attackby(obj/item/weapon/W, mob/user) - if(iswirecutter(W) || istype(W, /obj/item/weapon/scalpel)) + if(W.iswirecutter() || istype(W, /obj/item/weapon/scalpel)) user << "That won't work." //Nope return ..() diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index 698a00e5dbb..ad9ad3ef003 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -122,7 +122,7 @@ checktime() /obj/item/clothing/gloves/watch/attackby(obj/item/weapon/W, mob/user) - if(isscrewdriver(W)) + if(W.isscrewdriver()) if (clipped) //Using clipped because adding a new var for something is dumb user.visible_message("[user] screws the cover of the [src] closed.","You screw the cover of the [src] closed..") clipped = 0 @@ -133,7 +133,7 @@ return if(wired) return - if(iscoil(W)) + if(W.iscoil()) var/obj/item/stack/cable_coil/C = W if (!clipped) user << "The [src] is not open." diff --git a/code/modules/clothing/gloves/stungloves.dm b/code/modules/clothing/gloves/stungloves.dm index 4f96c4f53ac..8f7fa6875a4 100644 --- a/code/modules/clothing/gloves/stungloves.dm +++ b/code/modules/clothing/gloves/stungloves.dm @@ -9,7 +9,7 @@ return //add wires - if(iscoil(W)) + if(W.iscoil()) var/obj/item/stack/cable_coil/C = W if (clipped) user << "The [src] are too badly mangled for wiring." @@ -44,7 +44,7 @@ user << "A [cell] is already attached to the [src]." return - else if(iswirecutter(W) || istype(W, /obj/item/weapon/scalpel)) + else if(W.iswirecutter() || istype(W, /obj/item/weapon/scalpel)) //stunglove stuff if(cell) diff --git a/code/modules/clothing/spacesuits/breaches.dm b/code/modules/clothing/spacesuits/breaches.dm index 27e7695d764..0917bc1499f 100644 --- a/code/modules/clothing/spacesuits/breaches.dm +++ b/code/modules/clothing/spacesuits/breaches.dm @@ -203,7 +203,7 @@ var/global/list/breach_burn_descriptors = list( repair_breaches(BURN, use_amt * repair_power, user) return - else if(iswelder(W)) + else if(W.iswelder()) if(istype(src.loc,/mob/living)) user << "How do you intend to patch a voidsuit while someone is wearing it?" diff --git a/code/modules/clothing/spacesuits/rig/modules/modules.dm b/code/modules/clothing/spacesuits/rig/modules/modules.dm index e5a384e2da8..9571253c894 100644 --- a/code/modules/clothing/spacesuits/rig/modules/modules.dm +++ b/code/modules/clothing/spacesuits/rig/modules/modules.dm @@ -87,7 +87,7 @@ paste.use(1) return - else if(iscoil(W)) + else if(W.iscoil()) switch(damage) if(0) diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm index 817f6dc6c67..b87679dc403 100644 --- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm +++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm @@ -7,7 +7,7 @@ return // Pass repair items on to the chestpiece. - if(chest && (istype(W,/obj/item/stack/material) || iswelder(W))) + if(chest && (istype(W,/obj/item/stack/material) || W.iswelder())) return chest.attackby(W,user) // Lock or unlock the access panel. @@ -30,7 +30,7 @@ user << "You [locked ? "lock" : "unlock"] \the [src] access panel." return - else if(iscrowbar(W)) + else if(W.iscrowbar()) if(!open && locked) user << "The access panel is locked shut." @@ -43,7 +43,7 @@ if(open) // Hacking. - if(iswirecutter(W) || ismultitool(W)) + if(W.iswirecutter() || W.ismultitool()) if(open) wires.Interact(user) else @@ -100,7 +100,7 @@ src.cell = W return - else if(iswrench(W)) + else if(W.iswrench()) if(!air_supply) user << "There is not tank to remove." @@ -114,7 +114,7 @@ air_supply = null return - else if(isscrewdriver(W)) + else if(W.isscrewdriver()) var/list/current_mounts = list() if(cell) current_mounts += "cell" diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index 20f4a4d0175..28d67583e89 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -205,7 +205,7 @@ user << "You cannot modify \the [src] while it is being worn." return - if(isscrewdriver(W)) + if(W.isscrewdriver()) if(helmet || boots || tank) var/choice = input("What component would you like to remove?") as null|anything in list(helmet,boots,tank) if(!choice) return diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 8f45257517b..332d0fbd438 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -1962,7 +1962,7 @@ All custom items with worn sprites must follow the contained sprite system: http return if(broken) - if(isscrewdriver(I)) + if(I.isscrewdriver()) if(!open) open = TRUE to_chat(user, "You unfasten the back panel.") @@ -1972,7 +1972,7 @@ All custom items with worn sprites must follow the contained sprite system: http to_chat(user, "You secure the back panel.") playsound(user.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(ismultitool(I) && open) + if(I.ismultitool() && open) to_chat(user, "You quickly pulse a few fires, and reset the screen and device.") broken = FALSE update_icon() diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index f230dc345ae..3ce2c812160 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -164,11 +164,11 @@ if(W.flags & NOBLUDGEON) return - if(isscrewdriver(W)) + if(W.isscrewdriver()) user << ("It's a holowindow, you can't unfasten it!") - else if(iscrowbar(W) && reinf && state <= 1) + else if(W.iscrowbar() && reinf && state <= 1) user << ("It's a holowindow, you can't pry it!") - else if(iswrench(W) && !anchored && (!state || !reinf)) + else if(W.iswrench() && !anchored && (!state || !reinf)) user << ("It's a holowindow, you can't dismantle it!") else if(W.damtype == BRUTE || W.damtype == BURN) @@ -234,7 +234,7 @@ return ..() /obj/structure/bed/chair/holochair/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswrench(W)) + if(W.iswrench()) user << ("It's a holochair, you can't dismantle it!") return diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm index 222ebcd8854..56197d785ea 100644 --- a/code/modules/hydroponics/beekeeping/beehive.dm +++ b/code/modules/hydroponics/beekeeping/beehive.dm @@ -38,12 +38,12 @@ user << "The lid is open. The bees can't grow and produce honey until it's closed!" /obj/machinery/beehive/attackby(var/obj/item/I, var/mob/user) - if(iscrowbar(I)) + if(I.iscrowbar()) closed = !closed user.visible_message("[user] [closed ? "closes" : "opens"] \the [src].", "You [closed ? "close" : "open"] \the [src].") update_icon() return - else if(iswrench(I)) + else if(I.iswrench()) anchored = !anchored user.visible_message("[user] [anchored ? "wrenches" : "unwrenches"] \the [src].", "You [anchored ? "wrench" : "unwrench"] \the [src].") if (!smoked && !anchored && (bee_count > 10)) @@ -102,7 +102,7 @@ if(smoked) user << "The hive is smoked." return 1 - else if(isscrewdriver(I)) + else if(I.isscrewdriver()) if(bee_count) visible_message("The bees are furious you're trying to destroy their home!") release_bees(1, 30) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index c2ae342ed5a..a1177642330 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -173,7 +173,7 @@ /obj/item/weapon/reagent_containers/food/snacks/grown/attackby(var/obj/item/weapon/W, var/mob/user) if(seed) - if(seed.get_trait(TRAIT_PRODUCES_POWER) && iscoil(W)) + if(seed.get_trait(TRAIT_PRODUCES_POWER) && W.iscoil()) var/obj/item/stack/cable_coil/C = W if(C.use(5)) //TODO: generalize this. diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index 2f1faf30698..bfced449e3b 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -93,13 +93,13 @@ user << "You load [W] into [src]." return - if(isscrewdriver(W)) + if(W.isscrewdriver()) open = !open user << "You [open ? "open" : "close"] the maintenance panel." return if(open) - if(iscrowbar(W)) + if(W.iscrowbar()) dismantle() return diff --git a/code/modules/hydroponics/seed_storage.dm b/code/modules/hydroponics/seed_storage.dm index 72543f02f13..673d5201f3d 100644 --- a/code/modules/hydroponics/seed_storage.dm +++ b/code/modules/hydroponics/seed_storage.dm @@ -305,7 +305,7 @@ else user << "There are no seeds in \the [O.name]." return - else if(iswrench(O)) + else if(O.iswrench()) playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) anchored = !anchored user << "You [anchored ? "wrench" : "unwrench"] \the [src]." diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 606e4e45c72..575122fef46 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -242,7 +242,7 @@ user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) SSplants.add_plant(src) - if(iswirecutter(W) || istype(W, /obj/item/weapon/scalpel)) + if(W.iswirecutter() || istype(W, /obj/item/weapon/scalpel)) if(sampled) user << "\The [src] has already been sampled recently." return diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index 0afefef1497..0faa8d1f178 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -460,7 +460,7 @@ if (O.is_open_container()) return 0 - if(iswirecutter(O) || istype(O, /obj/item/weapon/scalpel)) + if(O.iswirecutter() || istype(O, /obj/item/weapon/scalpel)) if(!seed) user << "There is nothing to take a sample from in \the [src]." @@ -565,7 +565,7 @@ qdel(O) check_health() - else if(mechanical && iswrench(O)) + else if(mechanical && O.iswrench()) //If there's a connector here, the portable_atmospherics setup can handle it. if(locate(/obj/machinery/atmospherics/portables_connector/) in loc) diff --git a/code/modules/integrated_electronics/core/device.dm b/code/modules/integrated_electronics/core/device.dm index 57c6e0b178b..a5a5e60031d 100644 --- a/code/modules/integrated_electronics/core/device.dm +++ b/code/modules/integrated_electronics/core/device.dm @@ -12,7 +12,7 @@ . = ..() /obj/item/device/assembly/electronic_assembly/attackby(obj/item/I, mob/user) - if (iscrowbar(I)) + if (I.iscrowbar()) toggle_open(user) else if (opened) EA.attackby(I, user) diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 71663b4dcd0..d1da51d24e6 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -36,11 +36,11 @@ return else name = ("bookcase ([newname])") - else if(iswrench(O)) + else if(O.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) user << (anchored ? "You unfasten \the [src] from the floor." : "You secure \the [src] to the floor.") anchored = !anchored - else if(isscrewdriver(O)) + else if(O.isscrewdriver()) playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1) user << "You begin dismantling \the [src]." if(do_after(user,25)) @@ -292,7 +292,7 @@ return scanner.computer.inventory.Add(src) user << "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'" - else if(istype(W, /obj/item/weapon/material/knife) || iswirecutter(W)) + else if(istype(W, /obj/item/weapon/material/knife) || W.iswirecutter()) if(carved) return user << "You begin to carve out [title]." if(do_after(user, 30)) diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm index f8fbbb2f303..c6e96625d8c 100644 --- a/code/modules/materials/material_sheets.dm +++ b/code/modules/materials/material_sheets.dm @@ -74,7 +74,7 @@ ..() /obj/item/stack/material/attackby(var/obj/item/W, var/mob/user) - if(iscoil(W)) + if(W.iscoil()) material.build_wired_product(user, W, src) return else if(istype(W, /obj/item/stack/rods)) diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm index cc1c9cf54eb..223edb7ca3b 100644 --- a/code/modules/mining/abandonedcrates.dm +++ b/code/modules/mining/abandonedcrates.dm @@ -200,7 +200,7 @@ /obj/structure/closet/crate/secure/loot/attackby(obj/item/weapon/W as obj, mob/user as mob) if(locked) - if (ismultitool(W)) // Greetings Urist McProfessor, how about a nice game of cows and bulls? + if (W.ismultitool()) // Greetings Urist McProfessor, how about a nice game of cows and bulls? user << "DECA-CODE LOCK ANALYSIS:" if (attempts == 1) user << "* Anti-Tamper system will activate on the next failed access attempt." diff --git a/code/modules/mining/coins.dm b/code/modules/mining/coins.dm index 2046e894423..c804457949c 100644 --- a/code/modules/mining/coins.dm +++ b/code/modules/mining/coins.dm @@ -49,7 +49,7 @@ icon_state = "coin_battlemonsters" /obj/item/weapon/coin/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iscoil(W)) + if(W.iscoil()) var/obj/item/stack/cable_coil/CC = W if(string_attached) user << "There already is a string attached to this coin." @@ -61,7 +61,7 @@ else user << "This cable coil appears to be empty." return - else if(iswirecutter(W)) + else if(W.iswirecutter()) if(!string_attached) ..() return diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index adfc7cba3e5..8c0a5895b89 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -156,7 +156,7 @@ return if(active) return ..() - if(iscrowbar(O)) + if(O.iscrowbar()) if (panel_open && cell) user << "You wrench out \the [cell]." cell.forceMove(get_turf(user)) @@ -370,7 +370,7 @@ if(default_deconstruction_crowbar(user, W)) return - if(iswrench(W)) + if(W.iswrench()) if(istype(get_turf(src), /turf/space)) user << "You send the [src] careening into space. Idiot." diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index f29ee5190f8..5bb63821942 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -554,7 +554,7 @@ var/turf/T = get_turf(src) T.attackby(C, user) return - if (iswelder(C)) + if (C.iswelder()) var/obj/item/weapon/weldingtool/WT = C if(WT.remove_fuel(0, user)) user << "Slicing apart connectors ..." @@ -1183,7 +1183,7 @@ var/list/total_extraction_beacons = list() /obj/structure/sculpting_block/attackby(obj/item/C as obj, mob/user as mob) - if (iswrench(C)) + if (C.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) user << "You [anchored ? "un" : ""]anchor the [name]." anchored = !anchored diff --git a/code/modules/mob/living/bot/bot.dm b/code/modules/mob/living/bot/bot.dm index 3b39b337385..231acc141bd 100644 --- a/code/modules/mob/living/bot/bot.dm +++ b/code/modules/mob/living/bot/bot.dm @@ -87,14 +87,14 @@ else user << "Access denied." return - else if(isscrewdriver(O)) + else if(O.isscrewdriver()) if(!locked) open = !open user << "Maintenance panel is now [open ? "opened" : "closed"]." else user << "You need to unlock the controls first." return - else if(iswelder(O)) + else if(O.iswelder()) if(health < maxHealth) if(open) health = min(maxHealth, health + 10) diff --git a/code/modules/mob/living/bot/ed209bot.dm b/code/modules/mob/living/bot/ed209bot.dm index 8ff5ce85791..bf3bba0d01e 100644 --- a/code/modules/mob/living/bot/ed209bot.dm +++ b/code/modules/mob/living/bot/ed209bot.dm @@ -333,7 +333,7 @@ return 1 if(3) - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0, user)) build_step++ @@ -363,7 +363,7 @@ return 1 if(6) - if(iscoil(W)) + if(W.iscoil()) var/obj/item/stack/cable_coil/C = W if (C.get_amount() < 1) user << "You need one coil of wire to wire [src]." @@ -388,7 +388,7 @@ return 1 if(8) - if(isscrewdriver(W)) + if(W.isscrewdriver()) playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) var/turf/T = get_turf(user) user << "Now attaching the gun to the frame..." diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm index dbee32fc6a0..f47dc862357 100644 --- a/code/modules/mob/living/bot/secbot.dm +++ b/code/modules/mob/living/bot/secbot.dm @@ -673,7 +673,7 @@ /obj/item/weapon/secbot_assembly/attackby(var/obj/item/O, var/mob/user) ..() - if(iswelder(O) && !build_step) + if(O.iswelder() && !build_step) var/obj/item/weapon/weldingtool/WT = O if(WT.remove_fuel(0, user)) build_step = 1 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 74910090eec..aacaaa461a8 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -424,4 +424,7 @@ if(disabilities & PACIFIST) return TRUE if(CE_PACIFIED in chem_effects) - return TRUE \ No newline at end of file + return TRUE + +/mob/living/carbon/proc/get_metabolism(metabolism) + return metabolism \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 36622b04fa7..df3b00a8d84 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -282,7 +282,7 @@ if(temp) if(skipbody & temp.body_part) continue - if(temp.status & ORGAN_ROBOT) + if(temp.status & ORGAN_ASSISTED) if(!(temp.brute_dam + temp.burn_dam)) //wound_flavor_text["[temp.name]"] = "[T.He] [T.has] a robot [temp.name]!\n" // No need to notify about robotic limbs if they're not damaged, really. diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 1c651e59610..62c74806bcf 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1591,3 +1591,6 @@ var/obj/item/organ/brain/B = internal_organs_by_name["brain"] if(B && species && species.has_organ["brain"] && !isipc(src)) . = B.cure_all_traumas(cure_permanent, cure_type) + +/mob/living/carbon/human/get_metabolism(metabolism) + return ..() * (species ? species.metabolism_mod : 1) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index f9f0978f71e..9febc4fc5c3 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -889,4 +889,96 @@ addtimer(CALLBACK(G, /mob/living/carbon/human.proc/set_species, O.dna.species), 0) to_chat(src,"You blow life back in \the [O], returning its past owner to life!") qdel(O) - last_special = world.time + 200 \ No newline at end of file + last_special = world.time + 200 + +/mob/living/carbon/human/proc/detach_limb() + set category = "Abilities" + set name = "Detach Limb" + set desc = "Detach one of your robotic appendages." + + if(last_special > world.time) + return + + if(stat || paralysis || stunned || weakened || lying || restrained()) + to_chat(src,"You can not do that in your current state!") + return + + var/obj/item/organ/external/E = get_organ(zone_sel.selecting) + + if(!E) + to_chat(src,"You are missing that limb.") + return + + if(!E.robotic) + to_chat(src,"You can only detach robotic limbs.") + return + + if(E.robotize_type != PROSTHETIC_AUTAKH) + to_chat(src,"Your body fails to interface with this alien technology.") + return + + if(E.is_stump() || (E.status & ORGAN_DESTROYED) || E.is_broken()) + to_chat(src,"The limb is too damaged to be removed manually!") + return + + if(E.vital && !E.sabotaged) + to_chat(src,"Your safety system stops you from removing \the [E].") + return + + last_special = world.time + 20 + + E.removed(src) + E.forceMove(get_turf(src)) + + update_body() + updatehealth() + UpdateDamageIcon() + + visible_message("\The [src] detaches \his [E]!", + "You detach your [E]!") + +/mob/living/carbon/human/proc/attach_limb() + set category = "Abilities" + set name = "Attach Limb" + set desc = "Attach a robotic limb to your body." + + if(last_special > world.time) + return + + if(stat || paralysis || stunned || weakened || lying || restrained()) + to_chat(src,"You can not do that in your current state!") + return + + var/obj/item/organ/external/O = src.get_active_hand() + + if(istype(O)) + + if(!O.robotic) + to_chat(src,"You are unable to interface with organic matter.") + return + + if(O.robotize_type != PROSTHETIC_AUTAKH) + to_chat(src,"Your body fails to interface with this alien technology.") + return + + + var/obj/item/organ/external/E = get_organ(zone_sel.selecting) + + if(E) + to_chat(src,"You are not missing that limb.") + return + + last_special = world.time + 20 + + src.drop_from_inventory(O) + O.replaced(src) + src.update_body() + src.updatehealth() + src.UpdateDamageIcon() + + update_body() + updatehealth() + UpdateDamageIcon() + + visible_message("\The [src] attaches \the [O] to \his body!", + "You attach \the [O] to your body!") diff --git a/code/modules/mob/living/carbon/human/human_species.dm b/code/modules/mob/living/carbon/human/human_species.dm index 558e4fb6253..900f877e248 100644 --- a/code/modules/mob/living/carbon/human/human_species.dm +++ b/code/modules/mob/living/carbon/human/human_species.dm @@ -197,4 +197,7 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin) . = ..(mapload, "Homunculus") /mob/living/carbon/human/adamantine_golem/Initialize(mapload) - . = ..(mapload, "Adamantine Golem") \ No newline at end of file + . = ..(mapload, "Adamantine Golem") + +/mob/living/carbon/human/autakh/Initialize(mapload) + . = ..(mapload, "Aut'akh Unathi") \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 6864ea39c24..aa980cf98e8 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -71,6 +71,7 @@ var/radiation_mod = 1 // Radiation modifier var/flash_mod = 1 // Stun from blindness modifier. var/fall_mod = 1 // Fall damage modifier, further modified by brute damage modifier + var/metabolism_mod = 1 // Reagent metabolism modifier var/vision_flags = DEFAULT_SIGHT // Same flags as glasses. var/inherent_eye_protection // If set, this species has this level of inherent eye protection. var/eyes_are_impermeable = FALSE // If TRUE, this species' eyes are not damaged by phoron. diff --git a/code/modules/mob/living/carbon/human/species/station/unathi_subspecies.dm b/code/modules/mob/living/carbon/human/species/station/unathi_subspecies.dm new file mode 100644 index 00000000000..0987d607814 --- /dev/null +++ b/code/modules/mob/living/carbon/human/species/station/unathi_subspecies.dm @@ -0,0 +1,122 @@ +/datum/species/unathi/autakh + name = "Aut'akh Unathi" + short_name = "aut" + name_plural = "Aut'akh Unathi" + + icobase = 'icons/mob/human_races/r_autakh.dmi' + deform = 'icons/mob/human_races/r_def_lizard.dmi' + tail = "autakh" + tail_animation = null + + slowdown = 0.5 + brute_mod = 0.7 + burn_mod = 1.2 + toxins_mod = 0.8 + fall_mod = 1.1 + + economic_modifier = 4 + + sprint_speed_factor = 2.6 + sprint_cost_factor = 1.10 + + rarity_value = 4 + + metabolism_mod = 2 + + eyes_are_impermeable = TRUE + breakcuffs = list(MALE, FEMALE) + + meat_type = /obj/item/stack/material/steel + remains_type = /obj/effect/decal/remains/robot + + death_message = "gives one shrill beep before falling lifeless." + knockout_message = "encounters a hardware fault and suddenly reboots!" + halloss_message = "encounters a hardware fault and suddenly reboots." + halloss_message_self = "ERROR: Unrecoverable machine check exception.
System halted, rebooting..." + + blurb = "The Aut'akh are a religious commune of cybernetically-augmented Unathi. They mostly hail from Moghes, and are made up of castoffs, refugees and exiles \ + from other clans who have settled in the icy north pole. Formed from survivors of the contact war, the Aut'akh take a radical view of the standard Unathi position that \ + the body is just a shell; they believe that meat is animated by soul, while metal is powered by electricity, and thus replacing one's body with metal empowers the soul.

\ + They are managed, but not ruled, by their god Oss, a silent deity who quietly facilitates the Aut'akh's prosperity behind the scenes. They are almost excessively friendly, \ + seeing all the beings of the galaxy as potential Aut'akh or allies for the Aut'akh. They also hold a strong spiritual tradition, believing that highly charismatic or intelligent \ + people or strong fighters are blessed with magic" + + cold_level_1 = 250 //Default 260 - Lower is better + cold_level_2 = 210 //Default 200 + cold_level_3 = 120 //Default 120 + + heat_level_1 = 380 //Default 360 - Higher is better + heat_level_2 = 420 //Default 400 + heat_level_3 = 1000 //Default 1000 + + inherent_verbs = list( + /mob/living/proc/devour, + /mob/living/carbon/human/proc/regurgitate, + /mob/living/carbon/human/proc/detach_limb, + /mob/living/carbon/human/proc/attach_limb + ) + + has_organ = list( + "heart" = /obj/item/organ/heart, + "lungs" = /obj/item/organ/lungs, + "liver" = /obj/item/organ/liver, + "kidneys" = /obj/item/organ/kidneys/autakh, + "brain" = /obj/item/organ/brain, + "eyes" = /obj/item/organ/eyes/autakh, + "anchor" = /obj/item/organ/anchor, + "haemodynamic" = /obj/item/organ/haemodynamic, + "adrenal" = /obj/item/organ/adrenal + ) + + has_limbs = list( + "chest" = list("path" = /obj/item/organ/external/chest/autakh), + "groin" = list("path" = /obj/item/organ/external/groin/autakh), + "head" = list("path" = /obj/item/organ/external/head/autakh), + "l_arm" = list("path" = /obj/item/organ/external/arm/autakh), + "r_arm" = list("path" = /obj/item/organ/external/arm/right/autakh), + "l_leg" = list("path" = /obj/item/organ/external/leg/autakh), + "r_leg" = list("path" = /obj/item/organ/external/leg/right/autakh), + "l_hand" = list("path" = /obj/item/organ/external/hand/autakh), + "r_hand" = list("path" = /obj/item/organ/external/hand/right/autakh), + "l_foot" = list("path" = /obj/item/organ/external/foot/autakh), + "r_foot" = list("path" = /obj/item/organ/external/foot/right/autakh) + ) + + + spawn_flags = IS_RESTRICTED + appearance_flags = HAS_HAIR_COLOR | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR + flags = NO_CHUBBY | NO_SCAN + + flesh_color = "#575757" + + heat_discomfort_level = 290 + heat_discomfort_strings = list( + "Your organs feel warm.", + "Your temperature sensors are reading high.", + "You feel warm enough to take a nap." + ) + + cold_discomfort_level = 285 + cold_discomfort_strings = list( + "You feel chilly.", + "You read a cryogenic environment.", + "Your servos creak in the cold." + ) + + siemens_coefficient = 1.1 + + nutrition_loss_factor = 1.2 + + hydration_loss_factor = 1.2 + + light_range = 2 + light_power = 0.5 + +/datum/species/unathi/autakh/get_light_color(mob/living/carbon/human/H) + if (!istype(H)) + return null + + var/obj/item/organ/eyes/eyes = H.get_eyes() + if (eyes) + var/eyegb = rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3]) + return eyegb \ No newline at end of file diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 45a0b66bc93..12642b2d53f 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -324,12 +324,9 @@ for(var/obj/item/I in src) if(I.action_button_name) if(!I.action) - if(I.action_button_is_hands_free) - I.action = new/datum/action/item_action/hands_free - else - I.action = new/datum/action/item_action - I.action.name = I.action_button_name - I.action.target = I + I.action = new I.default_action_type + I.action.name = I.action_button_name + I.action.SetTarget(I) I.action.Grant(src) return diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 5badb0c3fc0..792f7015cca 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -611,7 +611,7 @@ var/list/ai_verbs_default = list( if(personnel_list.len) input = input("Select a crew member:") as null|anything in personnel_list var/selection = personnel_list[input] - var/icon/character_icon + var/icon/character_icon if(selection && istype(selection, /list)) var/mob/living/carbon/human/H = selection["mob"] if (H.near_camera()) @@ -697,7 +697,7 @@ var/list/ai_verbs_default = list( var/obj/item/weapon/aicard/card = W card.grab_ai(src, user) - else if(iswrench(W)) + else if(W.iswrench()) if(anchored) user.visible_message("\The [user] starts to unbolt \the [src] from the plating...") if(!do_after(user,40)) diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index cd6058c8f1c..ca18d3c6216 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -182,7 +182,7 @@ user << "\The [src] is not compatible with \the [W]." return - else if (iscrowbar(W)) + else if (W.iscrowbar()) user << "\The [src] is hermetically sealed. You can't open the case." return diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index 4598c96d783..e847552171f 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -173,7 +173,8 @@ else module_string += text("[O]: Activate
") - if((istype(O,/obj/item/weapon) || istype(O,/obj/item/device)) && !(iscoil(O))) + var/obj/item/I = O + if((istype(I,/obj/item/weapon) || istype(I,/obj/item/device)) && !(I.iscoil())) tools += module_string else resources += module_string diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index abbc6dc4788..39e72e878aa 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -245,7 +245,7 @@ /mob/living/silicon/robot/Destroy() if(mmi && mind)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside. var/turf/T = get_turf(loc)//To hopefully prevent run time errors. - if(T) + if(T) mmi.forceMove(T) if(mmi.brainmob) mind.transfer_to(mmi.brainmob) @@ -588,7 +588,7 @@ user << "You remove \the [cell_component.wrapped]." - if (iswelder(W)) + if (W.iswelder()) if (src == user) user << "You lack the reach to be able to repair yourself." return @@ -612,7 +612,7 @@ user << "Need more welding fuel!" return - else if(iscoil(W) && (wiresexposed || istype(src,/mob/living/silicon/robot/drone))) + else if(W.iscoil() && (wiresexposed || istype(src,/mob/living/silicon/robot/drone))) if (!getFireLoss()) user << "Nothing to fix here!" return @@ -624,7 +624,7 @@ for(var/mob/O in viewers(user, null)) O.show_message(text("[user] has fixed some of the burnt wires on [src]!"), 1) - else if (iscrowbar(W)) // crowbar means open or close the cover + else if (W.iscrowbar()) // crowbar means open or close the cover if(opened) if(cell) user.visible_message("\The [user] begins clasping shut \the [src]'s maintenance hatch.", "You begin closing up \the [src].") @@ -690,7 +690,7 @@ storage = null else user << "You install \the [W]" - + storage = W user.drop_from_inventory(W,src) recalculate_synth_capacities() @@ -716,18 +716,18 @@ C.electronics_damage = 0 updateicon() - else if (iswirecutter(W) || ismultitool(W)) + else if (W.iswirecutter() || W.ismultitool()) if (wiresexposed) wires.Interact(user) else user << "You can't reach the wiring." - else if(isscrewdriver(W) && opened && !cell) // haxing + else if(W.isscrewdriver() && opened && !cell) // haxing wiresexposed = !wiresexposed user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]." updateicon() - else if(isscrewdriver(W) && opened && cell) // radio + else if(W.isscrewdriver() && opened && cell) // radio if(radio) radio.attackby(W,user)//Push it to the radio to let it handle everything else diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index 0b7391080ee..faffdf5ac54 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -91,7 +91,7 @@ src.update_icon() return 1 - if (iswelder(O)) + if (O.iswelder()) var/obj/item/weapon/weldingtool/WT = O if (WT.remove_fuel(0)) if(health < maxHealth) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 35f0069d155..8dff0682fbb 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -37,8 +37,20 @@ return 0 /proc/isunathi(A) - if(istype(A, /mob/living/carbon/human) && (A:get_species() == "Unathi")) - return 1 + if(ishuman(A)) + var/mob/living/carbon/human/H = A + switch(H.get_species()) + if ("Unathi") + return 1 + if("Aut'akh Unathi") + return 1 + return 0 + +/proc/isautakh(A) + if(ishuman(A)) + var/mob/living/carbon/human/H = A + if(H.get_species() == "Aut'akh Unathi") + return 1 return 0 /proc/istajara(A) diff --git a/code/modules/modular_computers/NTNet/NTNet_relay.dm b/code/modules/modular_computers/NTNet/NTNet_relay.dm index 785c5178a61..f473cae8e99 100644 --- a/code/modules/modular_computers/NTNet/NTNet_relay.dm +++ b/code/modules/modular_computers/NTNet/NTNet_relay.dm @@ -47,7 +47,7 @@ else if (dos_failure) add_overlay("ntnet_o_problem") - + else if (!enabled) add_overlay("ntnet_o_error") @@ -128,12 +128,12 @@ return ..() /obj/machinery/ntnet_relay/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if(isscrewdriver(W)) + if(W.isscrewdriver()) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) panel_open = !panel_open user << "You [panel_open ? "open" : "close"] the maintenance hatch" return - if(iscrowbar(W)) + if(W.iscrowbar()) if(!panel_open) user << "Open the maintenance panel first." return diff --git a/code/modules/modular_computers/computers/modular_computer/interaction.dm b/code/modules/modular_computers/computers/modular_computer/interaction.dm index 7ea42aec6b6..931d437e307 100644 --- a/code/modules/modular_computers/computers/modular_computer/interaction.dm +++ b/code/modules/modular_computers/computers/modular_computer/interaction.dm @@ -152,7 +152,7 @@ try_install_component(user, C) else to_chat(user, "This component is too large for \the [src].") - if(iswrench(W)) + if(W.iswrench()) var/list/components = get_all_components() if(components.len) to_chat(user, "Remove all components from \the [src] before disassembling it.") @@ -166,7 +166,7 @@ "You hear a ratchet.") qdel(src) return - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(!WT.isOn()) to_chat(user, "\The [W] is off.") @@ -183,7 +183,7 @@ to_chat(user, "You repair \the [src].") return - if(isscrewdriver(W)) + if(W.isscrewdriver()) var/list/all_components = get_all_components() if(!all_components.len) to_chat(user, "This device doesn't have any components installed.") diff --git a/code/modules/modular_computers/computers/subtypes/dev_telescreen.dm b/code/modules/modular_computers/computers/subtypes/dev_telescreen.dm index 944961dad6e..a04e5951bdc 100644 --- a/code/modules/modular_computers/computers/subtypes/dev_telescreen.dm +++ b/code/modules/modular_computers/computers/subtypes/dev_telescreen.dm @@ -19,7 +19,7 @@ is_holographic = TRUE /obj/item/modular_computer/telescreen/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if(iscrowbar(W)) + if(W.iscrowbar()) if(anchored) shutdown_computer() anchored = FALSE diff --git a/code/modules/modular_computers/hardware/ai_slot.dm b/code/modules/modular_computers/hardware/ai_slot.dm index dad134e0228..a1cb4203b47 100644 --- a/code/modules/modular_computers/hardware/ai_slot.dm +++ b/code/modules/modular_computers/hardware/ai_slot.dm @@ -27,7 +27,7 @@ user.drop_from_inventory(W,src) stored_card = W update_power_usage() - if(isscrewdriver(W)) + if(W.isscrewdriver()) user << "You manually remove \the [stored_card] from \the [src]." stored_card.forceMove(get_turf(src)) stored_card = null diff --git a/code/modules/modular_computers/hardware/hardware.dm b/code/modules/modular_computers/hardware/hardware.dm index 7034d5b1ceb..04bc867a344 100644 --- a/code/modules/modular_computers/hardware/hardware.dm +++ b/code/modules/modular_computers/hardware/hardware.dm @@ -15,7 +15,7 @@ /obj/item/weapon/computer_hardware/attackby(var/obj/item/W as obj, var/mob/living/user as mob) // Multitool. Runs diagnostics - if(ismultitool(W)) + if(W.ismultitool()) to_chat(user, "***** DIAGNOSTICS REPORT *****") diagnostics(user) to_chat(user, "******************************") @@ -31,7 +31,7 @@ damage = 0 return 1 // Cable coil. Works as repair method, but will probably require multiple applications and more cable. - if(iscoil(S)) + if(S.iscoil()) if(!damage) to_chat(user, "\The [src] doesn't seem to require repairs.") return 1 diff --git a/code/modules/multiz/turfs/open_space.dm b/code/modules/multiz/turfs/open_space.dm index f275e0b7b66..e7b78831737 100644 --- a/code/modules/multiz/turfs/open_space.dm +++ b/code/modules/multiz/turfs/open_space.dm @@ -200,7 +200,7 @@ to_chat(user, "The plating is going to need some support.") //To lay cable. - if(iscoil(C)) + if(C.iscoil()) var/obj/item/stack/cable_coil/coil = C coil.turf_place(src, user) return diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 506493e6174..fe6292e121a 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -1,6 +1,7 @@ /obj/item/organ name = "organ" icon = 'icons/obj/surgery.dmi' + default_action_type = /datum/action/item_action/organ var/dead_icon var/mob/living/carbon/human/owner = null var/status = 0 @@ -27,6 +28,11 @@ var/force_skintone = FALSE // If true, icon generation will skip is-robotic checks. Used for synthskin limbs. + var/list/organ_verbs //verb that are added when you gain the organ + + var/robotic_name + var/robotic_sprite + /obj/item/organ/New(loc, ...) ..() if (!initialized && istype(loc, /mob/living/carbon/human/dummy/mannequin)) @@ -54,6 +60,12 @@ return ..() +/obj/item/organ/proc/refresh_action_button() + return action + +/obj/item/organ/attack_self(var/mob/user) + return (owner && loc == owner && owner == user) + /obj/item/organ/proc/update_health() return @@ -98,7 +110,7 @@ damage = max_damage status |= ORGAN_DEAD STOP_PROCESSING(SSprocessing, src) - if(dead_icon) + if(dead_icon && !robotic) icon_state = dead_icon if(owner && vital) owner.death() @@ -132,7 +144,7 @@ create_reagents(5) var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list - if(B && prob(40)) + if(B && !(status & ORGAN_ROBOT) && prob(40)) reagents.remove_reagent("blood",0.1) if (isturf(loc)) blood_splatter(src,B,1) @@ -272,6 +284,10 @@ src.status &= ~ORGAN_CUT_AWAY src.status |= ORGAN_ROBOT src.status |= ORGAN_ASSISTED + if(robotic_name) + name = robotic_name + if(robotic_sprite) + icon_state = robotic_sprite /obj/item/organ/proc/mechassist() //Used to add things like pacemakers, etc robotize() @@ -279,24 +295,33 @@ robotic = 1 min_bruised_damage = 15 min_broken_damage = 35 + name = initial(name) + icon_state = initial(icon_state) /obj/item/organ/emp_act(severity) - if(!(status & ORGAN_ROBOT)) + if(!(status & ORGAN_ASSISTED)) return + var/organ_fragility = 0.5 + + if((status & ORGAN_ROBOT)) //fully robotic organs take the normal emp damage, assited ones only suffer half of it + organ_fragility = 1 + switch (severity) if (1.0) - take_damage(rand(7,20) * emp_coeff) + take_damage(rand(7,20) * emp_coeff * organ_fragility) if (2.0) - take_damage(rand(3,7) * emp_coeff) + take_damage(rand(3,7) * emp_coeff * organ_fragility) if(3.0) - take_damage(rand(3) * emp_coeff) + take_damage(rand(3) * emp_coeff * organ_fragility) /obj/item/organ/proc/removed(var/mob/living/user) if(!istype(owner)) return + action_button_name = null + owner.internal_organs_by_name[organ_tag] = null owner.internal_organs_by_name -= organ_tag owner.internal_organs_by_name -= null @@ -340,13 +365,14 @@ transplant_data["blood_DNA"] = transplant_blood.data["blood_DNA"] owner = target + action_button_name = initial(action_button_name) src.forceMove(owner) STOP_PROCESSING(SSprocessing, src) target.internal_organs |= src affected.internal_organs |= src target.internal_organs_by_name[organ_tag] = src if(robotic) - status |= ORGAN_ROBOT + robotize() /obj/item/organ/eyes/replaced(var/mob/living/carbon/human/target) @@ -358,34 +384,26 @@ target.update_eyes() ..() -/obj/item/organ/proc/bitten(mob/user) +/obj/item/organ/attack(var/mob/target, var/mob/user) - if(robotic) + if(robotic || !istype(target) || !istype(user) || (user != target && user.a_intent == I_HELP)) + return ..() + + if(alert("Do you really want to use this organ as food? It will be useless for anything else afterwards.",,"No.","Yes.") == "No.") + to_chat(user, "You successfully repress your cannibalistic tendencies.") return - user << "You take an experimental bite out of \the [src]." - var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list - blood_splatter(src,B,1) - user.drop_from_inventory(src) var/obj/item/weapon/reagent_containers/food/snacks/organ/O = new(get_turf(src)) O.name = name - O.icon = icon - O.icon_state = icon_state - - // Pass over the blood. + O.appearance = src reagents.trans_to(O, reagents.total_volume) - - if(fingerprints) O.fingerprints = fingerprints.Copy() - if(fingerprintshidden) O.fingerprintshidden = fingerprintshidden.Copy() - if(fingerprintslast) O.fingerprintslast = fingerprintslast - + if(fingerprints) + O.fingerprints = fingerprints.Copy() + if(fingerprintshidden) + O.fingerprintshidden = fingerprintshidden.Copy() + if(fingerprintslast) + O.fingerprintslast = fingerprintslast user.put_in_active_hand(O) qdel(src) - -/obj/item/organ/attack_self(mob/user as mob) - - // Convert it to an edible form, yum yum. - if(!robotic && user.a_intent == "help" && user.zone_sel.selecting == "mouth") - bitten(user) - return + target.attackby(O, user) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index be7bc0e0b09..1a6226009dc 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -214,13 +214,6 @@ break parent.update_damages() - -/obj/item/organ/external/robotize() - ..() - //robit limbs take reduced brute damage, but melt easier - brute_mod = 0.9 - burn_mod = 1.1 - /**************************************************** DAMAGE PROCS ****************************************************/ @@ -625,10 +618,10 @@ Note that amputating the affected organ does in fact remove the infection from t if(!(W.can_autoheal() || (bicardose && inaprovaline))) //bicaridine and inaprovaline stop internal wounds from growing bigger with time, unless it is so small that it is already healing W.open_wound(0.09 * wound_update_accuracy) - - owner.vessel.remove_reagent("blood", wound_update_accuracy * W.damage/40) //line should possibly be moved to handle_blood, so all the bleeding stuff is in one place. - if(prob(1 * wound_update_accuracy)) - owner.custom_pain("You feel a stabbing pain in your [name]!",1) + if(!owner.reagents.has_reagent("coagulant", 2)) + owner.vessel.remove_reagent("blood", wound_update_accuracy * W.damage/40) //line should possibly be moved to handle_blood, so all the bleeding stuff is in one place. + if(prob(1 * wound_update_accuracy)) + owner.custom_pain("You feel a stabbing pain in your [name]!",1) // slow healing var/heal_amt = 0 @@ -979,6 +972,9 @@ Note that amputating the affected organ does in fact remove the infection from t if(R.paintable) painted = 1 + brute_mod = R.brute_mod + burn_mod = R.burn_mod + dislocated = -1 //TODO, make robotic limbs a separate type, remove snowflake cannot_break = 1 get_icon() @@ -987,6 +983,10 @@ Note that amputating the affected organ does in fact remove the infection from t if(T) T.robotize() +/obj/item/organ/external/mechassist() + ..() + cannot_break = 0 + /obj/item/organ/external/proc/robotize_advanced() status |= ORGAN_ADV_ROBOT for (var/obj/item/organ/external/T in children) @@ -1109,7 +1109,7 @@ Note that amputating the affected organ does in fact remove the infection from t if(status & ORGAN_DESTROYED && !is_stump()) . += "tear at [amputation_point] so severe that it hangs by a scrap of flesh" - if(status & ORGAN_ROBOT) + if(status & ORGAN_ASSISTED) if(brute_dam) switch(brute_dam) if(0 to 20) diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index d99cc47f39d..eb2a2c5e04e 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -15,7 +15,7 @@ s_tone = null skin_color = null hair_color = null - if(status & ORGAN_ROBOT && !(isipc(human))) + if(status & ORGAN_ROBOT && !(isipc(human)) && !(isautakh(human))) return if(species && human.species && species.name != human.species.name) return diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index 3e8f8e7d181..4c79ca7edd7 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -12,6 +12,8 @@ organ_tag = "heart" parent_organ = "chest" dead_icon = "heart-off" + robotic_name = "circulatory pump" + robotic_sprite = "heart-prosthetic" /obj/item/organ/lungs name = "lungs" @@ -19,6 +21,8 @@ gender = PLURAL organ_tag = "lungs" parent_organ = "chest" + robotic_name = "gas exchange system" + robotic_sprite = "heart-prosthetic" /obj/item/organ/lungs/process() ..() @@ -44,6 +48,8 @@ gender = PLURAL organ_tag = "kidneys" parent_organ = "groin" + robotic_name = "prosthetic kidneys" + robotic_sprite = "kidneys-prosthetic" /obj/item/organ/kidneys/process() @@ -68,6 +74,8 @@ gender = PLURAL organ_tag = "eyes" parent_organ = "head" + robotic_name = "visual prosthesis" + robotic_sprite = "eyes-prosthetic" var/list/eye_colour = list(0,0,0) var/singular_name = "eye" @@ -86,6 +94,9 @@ if(is_broken() && !oldbroken && owner && !owner.stat) owner << "You go blind!" +/obj/item/organ/eyes/proc/flash_act() + return + /obj/item/organ/eyes/process() //Eye damage replaces the old eye_stat var. ..() if(!owner) @@ -100,6 +111,8 @@ icon_state = "liver" organ_tag = "liver" parent_organ = "groin" + robotic_name = "toxin filter" + robotic_sprite = "liver-prosthetic" /obj/item/organ/liver/process() diff --git a/code/modules/organs/robolimbs.dm b/code/modules/organs/robolimbs.dm index 78279df3898..30b7ec7842d 100644 --- a/code/modules/organs/robolimbs.dm +++ b/code/modules/organs/robolimbs.dm @@ -28,6 +28,8 @@ var/global/datum/robolimb/basic_robolimb ) var/paintable = 0 //tired of istype exceptions. bullshirt to find, and by god do i know it after this project. var/linked_frame = "Unbranded Frame" //which machine species this limb will create + var/brute_mod = 0.9 //how resistant is this mode to brute damage + var/burn_mod = 1.1 //how resistant is this mode to burn damage /datum/robolimb/bishop company = PROSTHETIC_BC @@ -80,3 +82,14 @@ var/global/datum/robolimb/basic_robolimb icon = 'icons/mob/human_races/r_human.dmi' species_can_use = list("Human") linked_frame = "Shell Frame" + +/datum/robolimb/autakh + company = PROSTHETIC_AUTAKH + desc = "This limb has been designed by the Aut'akh sect, it was created to interact exclusively with their bodies and implants." + icon = 'icons/mob/human_races/r_autakh.dmi' + species_can_use = list("Aut'akh Unathi") + linked_frame = "Aut'akh Unathi" + unavailable_at_chargen = 1 + paintable = 1 + brute_mod = 1 + burn_mod = 1 \ No newline at end of file diff --git a/code/modules/organs/subtypes/autakh.dm b/code/modules/organs/subtypes/autakh.dm new file mode 100644 index 00000000000..fc7ad9a2097 --- /dev/null +++ b/code/modules/organs/subtypes/autakh.dm @@ -0,0 +1,463 @@ +/obj/item/organ/external/head/autakh + dislocated = -1 + encased = "support frame" + robotize_type = PROSTHETIC_AUTAKH + +/obj/item/organ/external/head/autakh/Initialize() + mechassist() + . = ..() + +/obj/item/organ/external/chest/autakh + dislocated = -1 + encased = "support frame" + robotize_type = PROSTHETIC_AUTAKH + +/obj/item/organ/external/chest/autakh/Initialize() + mechassist() + . = ..() + +/obj/item/organ/external/groin/autakh + dislocated = -1 + encased = "support frame" + robotize_type = PROSTHETIC_AUTAKH + +/obj/item/organ/external/groin/autakh/Initialize() + mechassist() + . = ..() + +/obj/item/organ/external/arm/autakh + dislocated = -1 + encased = "support frame" + robotize_type = PROSTHETIC_AUTAKH + +/obj/item/organ/external/arm/right/autakh + dislocated = -1 + encased = "support frame" + robotize_type = PROSTHETIC_AUTAKH + +/obj/item/organ/external/leg/autakh + dislocated = -1 + encased = "support frame" + robotize_type = PROSTHETIC_AUTAKH + +/obj/item/organ/external/leg/right/autakh + dislocated = -1 + encased = "support frame" + robotize_type = PROSTHETIC_AUTAKH + +/obj/item/organ/external/foot/autakh + dislocated = -1 + encased = "support frame" + robotize_type = PROSTHETIC_AUTAKH + +/obj/item/organ/external/foot/right/autakh + dislocated = -1 + encased = "support frame" + robotize_type = PROSTHETIC_AUTAKH + +/obj/item/organ/external/hand/autakh + dislocated = -1 + encased = "support frame" + robotize_type = PROSTHETIC_AUTAKH + +/obj/item/organ/external/hand/right/autakh + dislocated = -1 + encased = "support frame" + robotize_type = PROSTHETIC_AUTAKH + +//internal organs + +/obj/item/organ/kidneys/autakh + name = "toxin screen" + icon_state = "screen" + robotic = 1 + robotic_name = null + robotic_sprite = null + +/obj/item/organ/kidneys/autakh/Initialize() + mechassist() + . = ..() + +/obj/item/organ/anchor + name = "soul anchor" + icon_state = "anchor" + organ_tag = "anchor" + parent_organ = "head" + robotic = 2 + +/obj/item/organ/anchor/Initialize() + robotize() + . = ..() + +/obj/item/organ/eyes/autakh + name = "bionic eyeballs" + icon_state = "mk1eyes" + singular_name = "bionic eye" + action_button_name = "Toggle Bionic Eyes Sensors" + robotic_name = null + robotic_sprite = null + robotic = 2 + + var/static/list/hud_types = list( + "Disabled", + "Security", + "Medical") + + var/selected_hud = "Disabled" + var/disabled = FALSE + +/obj/item/organ/eyes/autakh/Initialize() + robotize() + . = ..() + +/obj/item/organ/eyes/autakh/refresh_action_button() + . = ..() + if(.) + action.button_icon_state = "mk1eyes" + if(action.button) + action.button.UpdateIcon() + +/obj/item/organ/eyes/autakh/attack_self(var/mob/user) + . = ..() + + if(.) + + if(owner.last_special > world.time) + to_chat(owner, "\The [src] is still recharging!") + return + + if(owner.stat || owner.paralysis || owner.stunned || owner.weakened) + to_chat(owner, "You can not use your \the [src] in your current state!") + return + + if(disabled || is_broken()) + to_chat(owner, "\The [src] shudders and sparks, unable to change its sensors!") + return + + owner.last_special = world.time + 100 + + var/choice = input("Select the Sensor Type.", "Bionic Eyes Sensors") as null|anything in hud_types + + selected_hud = choice + +/obj/item/organ/eyes/autakh/process() + ..() + + if(!owner) + return + if(disabled) + return + + switch(selected_hud) + + if("Security") + req_access = list(access_security) + if(allowed(owner)) + process_sec_hud(owner, 1) + + if("Medical") + req_access = list(access_medical) + if(allowed(owner)) + process_med_hud(owner, 1) + +/obj/item/organ/eyes/autakh/flash_act() + if(owner) + to_chat(owner, "\The [src]'s retinal overlays are overloaded by the strong light!") + owner.eye_blind = 5 + owner.eye_blurry = 5 + spark(get_turf(owner), 3) + disabled = TRUE + selected_hud = "Disabled" + addtimer(CALLBACK(src, .proc/rearm), 40 SECONDS) + return + +/obj/item/organ/eyes/autakh/emp_act(severity) + ..() + disabled = TRUE + selected_hud = "Disabled" + addtimer(CALLBACK(src, .proc/rearm), 40 SECONDS) + +/obj/item/organ/eyes/autakh/proc/rearm() + if(!disabled) + return + disabled = FALSE + + if(owner) + to_chat(owner, "\The [src]'s retinal overlays clicks and shifts!") + +/obj/item/organ/adrenal + name = "adrenal management system" + icon_state = "ams" + organ_tag = "adrenal" + parent_organ = "chest" + robotic = 2 + action_button_name = "Activate Adrenal Management System" + +/obj/item/organ/adrenal/Initialize() + robotize() + . = ..() + +/obj/item/organ/adrenal/refresh_action_button() + . = ..() + if(.) + action.button_icon_state = "ams" + if(action.button) + action.button.UpdateIcon() + +/obj/item/organ/adrenal/attack_self(var/mob/user) + . = ..() + + if(.) + + if(owner.last_special > world.time) + to_chat(owner, "\The [src] is still recharging!") + return + + if(owner.stat || owner.paralysis || owner.stunned || owner.weakened) + to_chat(owner, "You can not use \the [src] in your current state!") + return + + owner.last_special = world.time + 500 + to_chat(owner, "\The [src] activates, releasing a stream of chemicals into your veins!") + + if(owner.reagents) + + if(is_bruised()) + owner.reagents.add_reagent("toxin", 10) + + if(is_broken()) + owner.reagents.add_reagent("toxin", 25) + return + + + owner.vessel.remove_reagent("blood",rand(15,30)) + owner.adjustToxLoss(rand(5,25)) + owner.reagents.add_reagent("paracetamol", 5) + owner.reagents.add_reagent("inaprovaline", 5) + +/obj/item/organ/haemodynamic + name = "haemodynamic control system" + icon_state = "stabilizer" + organ_tag = "haemodynamic" + parent_organ = "chest" + robotic = 1 + action_button_name = "Activate Haemodynamic Control System" + +/obj/item/organ/haemodynamic/Initialize() + mechassist() + . = ..() + +/obj/item/organ/haemodynamic/Initialize() + robotize() + . = ..() + +/obj/item/organ/haemodynamic/refresh_action_button() + . = ..() + if(.) + action.button_icon_state = "stabilizer" + if(action.button) + action.button.UpdateIcon() + +/obj/item/organ/haemodynamic/attack_self(var/mob/user) + . = ..() + + if(.) + + if(owner.last_special > world.time) + to_chat(owner, "\The [src] is still recharging!") + return + + if(owner.stat || owner.paralysis || owner.stunned || owner.weakened) + to_chat(owner, "You can not use \the [src] in your current state!") + return + + owner.last_special = world.time + 500 + + owner.adjustNutritionLoss(300) + owner.adjustHydrationLoss(300) + + if(is_broken()) + owner.vessel.remove_reagent("blood",rand(50,75)) + return + + to_chat(owner, "\The [src] activates, releasing a stream of chemicals into your veins!") + + if(is_bruised()) + owner.vessel.remove_reagent("blood",rand(25,50)) + + if(owner.reagents) + owner.reagents.add_reagent("coagulant", 15) + +//limb implants + +/obj/item/organ/external/hand/right/autakh/tool + name = "engineering grasper" + action_button_name = "Deploy Mechanical Combitool" + var/augment_type = /obj/item/combitool/robotic + +/obj/item/organ/external/hand/right/autakh/tool/refresh_action_button() + . = ..() + if(.) + action.button_icon_state = "digitool" + if(action.button) + action.button.UpdateIcon() + +/obj/item/organ/external/hand/right/autakh/tool/attack_self(var/mob/user) + . = ..() + + if(.) + + if(owner.last_special > world.time) + to_chat(owner, "\The [src] is still recharging!") + return + + if(owner.stat || owner.paralysis || owner.stunned || owner.weakened) + to_chat(owner, "You can not use \the [src] in your current state!") + return + + if(owner.get_active_hand()) + to_chat(owner, "You must empty your active hand before enabling your [src]!") + return + + if(is_broken()) + to_chat(owner, "\The [src] is too damaged to be used!") + return + + if(is_bruised()) + spark(get_turf(owner), 3) + + owner.last_special = world.time + 100 + var/obj/item/M = new augment_type(owner) + owner.put_in_active_hand(M) + owner.visible_message("\The [M] slides out of \the [owner]'s [src].","You deploy \the [M]!") + +/obj/item/combitool/robotic + name = "robotic combitool" + desc = "An integrated combitool module." + icon_state = "digitool" + +/obj/item/combitool/robotic/throw_at() + usr.drop_from_inventory(src) + +/obj/item/combitool/robotic/dropped() + loc = null + qdel(src) + +/obj/item/organ/external/hand/right/autakh/tool/mining + name = "engineering grasper" + action_button_name = "Deploy Mounted Drill" + augment_type = /obj/item/weapon/pickaxe/drill/integrated + +/obj/item/organ/external/hand/right/autakh/mining/refresh_action_button() + . = ..() + if(.) + action.button_icon_state = "drill" + if(action.button) + action.button.UpdateIcon() + +/obj/item/weapon/pickaxe/drill/integrated + name = "integrated mining drill" + +/obj/item/weapon/pickaxe/drill/integrated/throw_at() + usr.drop_from_inventory(src) + +/obj/item/weapon/pickaxe/drill/integrated/dropped() + loc = null + qdel(src) + +/obj/item/organ/external/hand/right/autakh/medical + name = "medical grasper" + action_button_name = "Deploy Mounted Health Scanner" + +/obj/item/organ/external/hand/right/autakh/medical/refresh_action_button() + . = ..() + if(.) + action.button_icon_state = "health" + if(action.button) + action.button.UpdateIcon() + +/obj/item/organ/external/hand/right/autakh/medical/attack_self(var/mob/user) + . = ..() + + if(.) + + if(owner.last_special > world.time) + to_chat(owner, "\The [src] is still recharging!") + return + + if(owner.stat || owner.paralysis || owner.stunned || owner.weakened) + to_chat(owner, "You can not use \the [src] in your current state!") + return + + if(is_broken()) + to_chat(owner, "\The [src] is too damaged to be used!") + return + + if(is_bruised()) + spark(get_turf(owner), 3) + + var/obj/item/weapon/grab/G = owner.get_active_hand() + if(!istype(G)) + to_chat(owner, "You must grab someone before trying to analyze their health!") + return + + owner.last_special = world.time + 50 + if(ishuman(G.affecting)) + var/mob/living/carbon/human/H = G.affecting + health_scan_mob(H, owner) + +/obj/item/organ/external/hand/right/autakh/security + name = "security grasper" + action_button_name = "Activate Integrated Electroshock Weapon" + +/obj/item/organ/external/hand/right/autakh/security/refresh_action_button() + . = ..() + if(.) + action.button_icon_state = "baton" + if(action.button) + action.button.UpdateIcon() + +/obj/item/organ/external/hand/right/autakh/security/attack_self(var/mob/user) + . = ..() + + if(.) + + if(owner.last_special > world.time) + to_chat(owner, "\The [src] is still recharging!") + return + + if(owner.stat || owner.paralysis || owner.stunned || owner.weakened) + to_chat(owner, "You can not use \the [src] in your current state!") + return + + if(is_broken()) + to_chat(owner, "\The [src] is too damaged to be used!") + return + + if(is_bruised()) + spark(get_turf(owner), 3) + + var/obj/item/weapon/grab/G = owner.get_active_hand() + if(!istype(G)) + to_chat(owner, "You must grab someone before trying to use your [src]!") + return + + if(owner.nutrition <= 200) + to_chat(owner, "Your energy reserves are too low to use your [src]!") + return + + if(ishuman(G.affecting)) + + var/mob/living/carbon/human/H = G.affecting + var/target_zone = check_zone(owner.zone_sel.selecting) + + owner.last_special = world.time + 100 + owner.adjustNutritionLoss(50) + + if(owner.a_intent == I_HURT) + H.electrocute_act(10, owner, def_zone = target_zone) + else + H.stun_effect_act(0, 50, target_zone, owner) + + owner.visible_message("[H] has been prodded with [src] by [owner]!") + playsound(get_turf(owner), 'sound/weapons/Egloves.ogg', 50, 1, -1) diff --git a/code/modules/organs/subtypes/vaurca.dm b/code/modules/organs/subtypes/vaurca.dm index d9008703e3f..c052b04f24d 100644 --- a/code/modules/organs/subtypes/vaurca.dm +++ b/code/modules/organs/subtypes/vaurca.dm @@ -21,15 +21,39 @@ /obj/item/organ/eyes/vaurca icon_state = "eyes_vaurca" +/obj/item/organ/eyes/vaurca/flash_act() + if(!owner) + return + + to_chat(owner, "Your eyes burn with the intense light of the flash!") + owner.Weaken(10) + take_damage(rand(10, 11)) + + if(damage > 12) + owner.eye_blurry += rand(3,6) + + if(damage >= min_broken_damage) + owner.sdisabilities |= BLIND + + else if(damage >= min_bruised_damage) + owner.eye_blind = 5 + owner.eye_blurry = 5 + owner.disabilities |= NEARSIGHTED + addtimer(CALLBACK(owner, /mob/.proc/reset_nearsighted), 100) + /obj/item/organ/kidneys/vaurca/robo icon_state = "kidney_vaurca" organ_tag = "mechanical kidneys" robotic = 2 + robotic_name = null + robotic_sprite = null /obj/item/organ/liver/vaurca/robo icon_state = "liver_vaurca" organ_tag = "mechanical liver" robotic = 2 + robotic_name = null + robotic_sprite = null /obj/item/organ/liver/vaurca icon_state = "liver_vaurca" diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index 96665ce8beb..cdc49b87e1e 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -42,7 +42,7 @@ sleep(5) icon_state = initial(icon_state) updateUsrDialog() - else if(iswrench(P)) + else if(P.iswrench()) playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) anchored = !anchored user << "You [anchored ? "wrench" : "unwrench"] \the [src]." diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 9c38c1ea8fe..25753f7e91c 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -302,7 +302,7 @@ var/obj/item/weapon/flame/F = P if (!F.lit) return - else if (iswelder(P)) + else if (P.iswelder()) var/obj/item/weapon/weldingtool/F = P if (!F.welding)//welding tools are 0 when off return @@ -504,7 +504,7 @@ else if(istype(P, /obj/item/weapon/flame)) burnpaper(P, user) - else if(iswelder(P)) + else if(P.iswelder()) burnpaper(P, user) add_fingerprint(user) diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm index 3e301a820d1..109cf64e2f9 100644 --- a/code/modules/paperwork/papershredder.dm +++ b/code/modules/paperwork/papershredder.dm @@ -21,7 +21,7 @@ empty_bin(user, W) return - else if (iswrench(W)) + else if (W.iswrench()) playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) anchored = !anchored user.visible_message( @@ -30,7 +30,7 @@ "You hear a ratchet." ) return - + else var/paper_result for(var/shred_type in shred_amounts) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index e514a409b79..5e8f336bfb7 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -119,7 +119,7 @@ VUEUI_MONITOR_VARS(/obj/machinery/photocopier, photocopiermonitor) SSvueui.check_uis_for_change(src) else user << "This cartridge is not yet ready for replacement! Use up the rest of the toner." - else if(iswrench(O)) + else if(O.iswrench()) playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) anchored = !anchored user << "You [anchored ? "wrench" : "unwrench"] \the [src]." diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm index 81eb7bf6012..4d2497ed657 100644 --- a/code/modules/power/antimatter/control.dm +++ b/code/modules/power/antimatter/control.dm @@ -139,14 +139,14 @@ /obj/machinery/power/am_control_unit/update_icon() if(active) icon_state = "control_[icon_mod]" - else + else icon_state = "control" //No other icons for it atm /obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user) if(!istype(W) || !user) return - if(iswrench(W)) + if(W.iswrench()) if(!anchored) playsound(get_turf(src), 'sound/items/Ratchet.ogg', 75, 1) user.visible_message("[user.name] secures the [src.name] to the floor.", \ diff --git a/code/modules/power/antimatter/shielding.dm b/code/modules/power/antimatter/shielding.dm index 44c561a8ff9..216a3176187 100644 --- a/code/modules/power/antimatter/shielding.dm +++ b/code/modules/power/antimatter/shielding.dm @@ -236,7 +236,7 @@ proc/cardinalrange(var/center) throw_range = 2 /obj/item/device/am_shielding_container/attackby(var/obj/item/I, var/mob/user) - if(ismultitool(I) && isturf(loc)) + if(I.ismultitool() && isturf(loc)) if(locate(/obj/machinery/am_shielding/) in loc) to_chat(user, "\icon[src]There is already an antimatter reactor section there.") return diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index cb714548564..f791b66c038 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -440,7 +440,7 @@ if (istype(user, /mob/living/silicon) && get_dist(src,user)>1) return src.attack_hand(user) src.add_fingerprint(user) - if (iscrowbar(W) && opened) + if (W.iscrowbar() && opened) if (has_electronics==1) if (terminal) user << "Disconnect wires first." @@ -465,7 +465,7 @@ panel_open = 0 opened = 0 update_icon() - else if (iscrowbar(W) && !((stat & BROKEN) || hacker) ) + else if (W.iscrowbar() && !((stat & BROKEN) || hacker) ) if(coverlocked && !(stat & MAINT)) user << "The cover is locked and cannot be opened." return @@ -504,7 +504,7 @@ "You insert \the [cell].") chargecount = 0 update_icon() - else if (isscrewdriver(W)) // haxing + else if (W.isscrewdriver()) // haxing if(opened) if (cell) user << "Close the APC first." //Less hints more mystery! @@ -547,7 +547,7 @@ update_icon() else user << "Access denied." - else if (iscoil(W) && !terminal && opened && has_electronics!=2) + else if (W.iscoil() && !terminal && opened && has_electronics!=2) var/turf/T = loc if(istype(T) && !T.is_plating()) user << "You must remove the floor plating in front of the APC first." @@ -572,7 +572,7 @@ "You add cables to the APC frame.") make_terminal() terminal.connect_to_network() - else if (iswirecutter(W) && terminal && opened && has_electronics!=2) + else if (W.iswirecutter() && terminal && opened && has_electronics!=2) var/turf/T = loc if(istype(T) && !T.is_plating()) user << "You must remove the floor plating in front of the APC first." @@ -601,7 +601,7 @@ else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && ((stat & BROKEN))) user << "You cannot put the board inside, the frame is damaged." return - else if (iswelder(W) && opened && has_electronics==0 && !terminal) + else if (W.iswelder() && opened && has_electronics==0 && !terminal) var/obj/item/weapon/weldingtool/WT = W if (!WT.isOn()) return if (WT.get_fuel() < 3) @@ -687,7 +687,7 @@ else if ((stat & BROKEN) \ && !opened \ - && iswelder(W) ) + && W.iswelder() ) var/obj/item/weapon/weldingtool/WT = W if (!WT.isOn()) return if (WT.get_fuel() <1) @@ -719,8 +719,8 @@ if (istype(user, /mob/living/silicon)) return src.attack_hand(user) if (!opened && wiresexposed && \ - (ismultitool(W) || \ - iswirecutter(W) || istype(W, /obj/item/device/assembly/signaler))) + W.ismultitool() || \ + W.iswirecutter() || istype(W, /obj/item/device/assembly/signaler)) return src.attack_hand(user) user.visible_message("The [src.name] has been hit with the [W.name] by [user.name]!", \ "You hit the [src.name] with your [W.name]!", \ diff --git a/code/modules/power/batteryrack.dm b/code/modules/power/batteryrack.dm index 838c9c6b573..d6691190110 100644 --- a/code/modules/power/batteryrack.dm +++ b/code/modules/power/batteryrack.dm @@ -38,7 +38,7 @@ /obj/machinery/power/smes/batteryrack/update_icon() cut_overlays() if(stat & BROKEN) return - + if (output_attempt) add_overlay("gsmes_outputting") if(inputting) @@ -55,7 +55,7 @@ /obj/machinery/power/smes/batteryrack/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) //these can only be moved by being reconstructed, solves having to remake the powernet. ..() //SMES attackby for now handles screwdriver, cable coils and wirecutters, no need to repeat that here if(open_hatch) - if(iscrowbar(W)) + if(W.iscrowbar()) if (charge < (capacity / 100)) if (!output_attempt && !input_attempt) playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1) diff --git a/code/modules/power/breaker_box.dm b/code/modules/power/breaker_box.dm index 58e8810f307..67ed627ad8c 100644 --- a/code/modules/power/breaker_box.dm +++ b/code/modules/power/breaker_box.dm @@ -35,7 +35,7 @@ // Enabled on server startup. Used in substations to keep them in bypass mode. /obj/machinery/power/breakerbox/activated/Initialize() . = ..() - set_state(1) + set_state(1) /obj/machinery/power/breakerbox/examine(mob/user) ..() @@ -89,7 +89,7 @@ busy = 0 /obj/machinery/power/breakerbox/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if(ismultitool(W)) + if(W.ismultitool()) var/newtag = input(user, "Enter new RCON tag. Use \"NO_TAG\" to disable RCON or leave empty to cancel.", "SMES RCON system") as text if(newtag) RCon_tag = newtag diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 10ef89814fb..53751660df4 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -132,7 +132,7 @@ var/list/possible_cable_coil_colours = list( if(!T.can_have_cabling()) return - if(iswirecutter(W)) + if(W.iswirecutter()) if(d1 == 12 || d2 == 12) user << "You must cut this cable from above." return @@ -165,14 +165,14 @@ var/list/possible_cable_coil_colours = list( return - else if(iscoil(W)) + else if(W.iscoil()) var/obj/item/stack/cable_coil/coil = W if (coil.get_amount() < 1) user << "Not enough cable" return coil.cable_join(src, user) - else if(ismultitool(W)) + else if(W.ismultitool()) if(powernet && (powernet.avail > 0)) // is it powered? user << "[powernet.avail]W in power network." @@ -475,6 +475,9 @@ obj/structure/cable/proc/cableColor(var/colorC) attack_verb = list("whipped", "lashed", "disciplined", "flogged") stacktype = /obj/item/stack/cable_coil +/obj/item/stack/cable_coil/iscoil() + return TRUE + /obj/item/stack/cable_coil/cyborg name = "cable coil synthesizer" desc = "A device that makes cable." @@ -506,7 +509,7 @@ obj/structure/cable/proc/cableColor(var/colorC) var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting] if (!S) return - if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP) + if(!(S.status & ORGAN_ASSISTED) || user.a_intent != I_HELP) return ..() if(M.isSynthetic() && M == user) @@ -918,7 +921,7 @@ obj/structure/cable/proc/cableColor(var/colorC) var/ticks = 0 /obj/structure/noose/attackby(obj/item/W, mob/user, params) - if(iswirecutter(W)) + if(W.iswirecutter()) user.visible_message("[user] cuts the noose.", "You cut the noose.") if(buckled_mob) buckled_mob.visible_message("[buckled_mob] falls over and hits the ground!",\ diff --git a/code/modules/power/cable_heavyduty.dm b/code/modules/power/cable_heavyduty.dm index 659969ccc21..bfee742b9db 100644 --- a/code/modules/power/cable_heavyduty.dm +++ b/code/modules/power/cable_heavyduty.dm @@ -15,10 +15,10 @@ if(!T.is_plating()) return - if(iswirecutter(W)) + if(W.iswirecutter()) usr << "These cables are too tough to be cut with those [W.name]." return - else if(iscoil(W)) + else if(W.iscoil()) usr << "You will need heavier cables to connect to these." return else diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index c86d4b33305..f6e8454d335 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -145,7 +145,7 @@ attack_hand(user) /obj/machinery/power/generator/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswrench(W)) + if(W.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) anchored = !anchored user.visible_message("[user.name] [anchored ? "secures" : "unsecures"] the bolts holding [src.name] to the floor.", \ diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 83592e885df..1b254f7dd95 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -198,12 +198,12 @@ var/old_broken_state = broken_state switch(broken_state) if(GRAV_NEEDS_SCREWDRIVER) - if(isscrewdriver(I)) + if(I.isscrewdriver()) user << "You secure the screws of the framework." playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) broken_state++ if(GRAV_NEEDS_WELDING) - if(iswelder(I)) + if(I.iswelder()) var/obj/item/weapon/weldingtool/WT = I if(WT.remove_fuel(1, user)) user << "You mend the damaged framework." @@ -220,13 +220,13 @@ else user << "You need 10 sheets of plasteel." if(GRAV_NEEDS_WRENCH) - if(iswrench(I)) + if(I.iswrench()) user << "You secure the plating to the framework." playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) set_fix() else ..() - if(iscrowbar(I)) + if(I.iscrowbar()) if(backpanelopen) playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) user << "You replace the back panel." diff --git a/code/modules/power/lights/construction.dm b/code/modules/power/lights/construction.dm index fad62b62c97..ff335219a9a 100644 --- a/code/modules/power/lights/construction.dm +++ b/code/modules/power/lights/construction.dm @@ -44,7 +44,7 @@ /obj/machinery/light_construct/attackby(obj/item/weapon/W as obj, mob/user as mob) add_fingerprint(user) - if (iswrench(W)) + if (W.iswrench()) if (src.stage == 1) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) usr << "You begin deconstructing [src]." @@ -68,7 +68,7 @@ usr << "You have to unscrew the case first." return - if(iswirecutter(W)) + if(W.iswirecutter()) if (src.stage != 2) return src.stage = 1 switch(fixture_type) @@ -79,13 +79,13 @@ new /obj/item/stack/cable_coil(get_turf(src.loc), 1, "red") user.visible_message( "[user] removes the wiring from [src].", - "You remove the wiring from [src].", + "You remove the wiring from [src].", "You hear something being cut." ) playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) return - if(iscoil(W)) + if(W.iscoil()) if (src.stage != 1) return var/obj/item/stack/cable_coil/coil = W if (coil.use(1)) @@ -101,7 +101,7 @@ ) return - if(isscrewdriver(W)) + if(W.isscrewdriver()) if (stage == 2) switch(fixture_type) if("tube") @@ -156,7 +156,7 @@ add_fingerprint(user) return - if (iscrowbar(W)) + if (W.iscrowbar()) if (!cell_connectors) to_chat(user, "[src] does not have a power cell connector.") return diff --git a/code/modules/power/lights/fixtures.dm b/code/modules/power/lights/fixtures.dm index 04184209103..b208c8f6994 100644 --- a/code/modules/power/lights/fixtures.dm +++ b/code/modules/power/lights/fixtures.dm @@ -340,7 +340,7 @@ // attempt to stick weapon into light socket else if(status == LIGHT_EMPTY) - if(isscrewdriver(W)) //If it's a screwdriver open it. + if(W.isscrewdriver()) //If it's a screwdriver open it. playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1) user.visible_message("[user.name] opens [src]'s casing.", \ "You open [src]'s casing.", "You hear a noise.") diff --git a/code/modules/power/pacman2.dm b/code/modules/power/pacman2.dm index 3f55fe93095..285b53c1e6f 100644 --- a/code/modules/power/pacman2.dm +++ b/code/modules/power/pacman2.dm @@ -75,7 +75,7 @@ user.drop_from_inventory(O,src) user << "You add the phoron tank to the generator." else if(!active) - if(iswrench(O)) + if(O.iswrench()) anchored = !anchored playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) if(anchored) @@ -83,14 +83,14 @@ else user << "You unsecure the generator from the floor." SSmachinery.powernet_update_queued = TRUE - else if(isscrewdriver(O)) + else if(O.isscrewdriver()) open = !open playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) if(open) user << "You open the access panel." else user << "You close the access panel." - else if(iscrowbar(O) && !open) + else if(O.iscrowbar() && !open) var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc) for(var/obj/item/I in component_parts) I.forceMove(src.loc) @@ -163,7 +163,7 @@ usr << browse(null, "window=port_gen") usr.machine = null -/obj/machinery/power/port_gen/pacman2/emag_act(var/remaining_uses, var/mob/user) +/obj/machinery/power/port_gen/pacman2/emag_act(var/remaining_uses, var/mob/user) emagged = 1 emp_act(1) return 1 diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index ed04e149973..717ed7a3512 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -267,7 +267,7 @@ updateUsrDialog() return else if(!active) - if(iswrench(O)) + if(O.iswrench()) if(!anchored) connect_to_network() @@ -279,14 +279,14 @@ playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) anchored = !anchored - else if(isscrewdriver(O)) + else if(O.isscrewdriver()) open = !open playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) if(open) user << "You open the access panel." else user << "You close the access panel." - else if(iscrowbar(O) && open) + else if(O.iscrowbar() && open) var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc) for(var/obj/item/I in component_parts) I.forceMove(src.loc) diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 749dbeda9c4..89b0170887d 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -122,7 +122,7 @@ //almost never called, overwritten by all power machines but terminal and generator /obj/machinery/power/attackby(obj/item/weapon/W, mob/user) - if(iscoil(W)) + if(W.iscoil()) var/obj/item/stack/cable_coil/coil = W diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index c14ad9eb8d7..557aaa8c5e1 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -66,11 +66,11 @@ var/global/list/rad_collectors = list() src.P = W update_icons() return 1 - else if(iscrowbar(W)) + else if(W.iscrowbar()) if(P && !src.locked) eject() return 1 - else if(iswrench(W)) + else if(W.iswrench()) if(P) user << "Remove the phoron tank first." return 1 diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 89fe1500b89..703eb4a3e5e 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -151,7 +151,7 @@ /obj/machinery/power/emitter/attackby(obj/item/W, mob/user) - if(iswrench(W)) + if(W.iswrench()) if(active) user << "Turn off [src] first." return @@ -174,7 +174,7 @@ user << "\The [src] needs to be unwelded from the floor." return - if(iswelder(W)) + if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W if(active) user << "Turn off [src] first." diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index a20cb67e888..9df44d93270 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -93,7 +93,7 @@ field_generator power level display if(active) user << "The [src] needs to be off." return - else if(iswrench(W)) + else if(W.iswrench()) switch(state) if(0) state = 1 @@ -112,7 +112,7 @@ field_generator power level display if(2) user << "The [src.name] needs to be unwelded from the floor." return - else if(iswelder(W)) + else if(W.iswelder()) var/obj/item/weapon/weldingtool/WT = W switch(state) if(0) diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm index 8cb757bdfde..769eee2e1aa 100644 --- a/code/modules/power/singularity/generator.dm +++ b/code/modules/power/singularity/generator.dm @@ -17,7 +17,7 @@ if(src) qdel(src) /obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user) - if(iswrench(W)) + if(W.iswrench()) anchored = !anchored playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) if(anchored) diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 651a1fec58b..41c1e7c1ddc 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -201,35 +201,35 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps if(0) - if(iswrench(O)) + if(O.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) src.anchored = 1 user.visible_message("[user.name] secures the [src.name] to the floor.", \ "You secure the external bolts.") temp_state++ if(1) - if(iswrench(O)) + if(O.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) src.anchored = 0 user.visible_message("[user.name] detaches the [src.name] from the floor.", \ "You remove the external bolts.") temp_state-- - else if(iscoil(O)) + else if(O.iscoil()) if(O:use(1,user)) user.visible_message("[user.name] adds wires to the [src.name].", \ "You add some wires.") temp_state++ if(2) - if(iswirecutter(O))//TODO:Shock user if its on? + if(O.iswirecutter())//TODO:Shock user if its on? user.visible_message("[user.name] removes some wires from the [src.name].", \ "You remove some wires.") temp_state-- - else if(isscrewdriver(O)) + else if(O.isscrewdriver()) user.visible_message("[user.name] closes the [src.name]'s access panel.", \ "You close the access panel.") temp_state++ if(3) - if(isscrewdriver(O)) + if(O.isscrewdriver()) user.visible_message("[user.name] opens the [src.name]'s access panel.", \ "You open the access panel.") temp_state-- @@ -340,35 +340,35 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin var/temp_state = src.construction_state switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps if(0) - if(iswrench(O)) + if(O.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) src.anchored = 1 user.visible_message("[user.name] secures the [src.name] to the floor.", \ "You secure the external bolts.") temp_state++ if(1) - if(iswrench(O)) + if(O.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) src.anchored = 0 user.visible_message("[user.name] detaches the [src.name] from the floor.", \ "You remove the external bolts.") temp_state-- - else if(iscoil(O)) + else if(O.iscoil()) if(O:use(1)) user.visible_message("[user.name] adds wires to the [src.name].", \ "You add some wires.") temp_state++ if(2) - if(iswirecutter(O))//TODO:Shock user if its on? + if(O.iswirecutter())//TODO:Shock user if its on? user.visible_message("[user.name] removes some wires from the [src.name].", \ "You remove some wires.") temp_state-- - else if(isscrewdriver(O)) + else if(O.isscrewdriver()) user.visible_message("[user.name] closes the [src.name]'s access panel.", \ "You close the access panel.") temp_state++ if(3) - if(isscrewdriver(O)) + if(O.isscrewdriver()) user.visible_message("[user.name] opens the [src.name]'s access panel.", \ "You open the access panel.") temp_state-- diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index b8813254008..1315c43fc69 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -293,7 +293,7 @@ /obj/machinery/power/smes/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if(isscrewdriver(W)) + if(W.isscrewdriver()) if(!open_hatch) open_hatch = 1 user << "You open the maintenance hatch of [src]." @@ -307,7 +307,7 @@ user << "You need to open access hatch on [src] first!" return 0 - if(iscoil(W) && !terminal && !building_terminal) + if(W.iscoil() && !terminal && !building_terminal) building_terminal = 1 var/obj/item/stack/cable_coil/CC = W if (CC.get_amount() <= 10) @@ -326,7 +326,7 @@ stat = 0 return 0 - else if(iswirecutter(W) && terminal && !building_terminal) + else if(W.iswirecutter() && terminal && !building_terminal) building_terminal = 1 var/turf/tempTDir = terminal.loc if (istype(tempTDir)) diff --git a/code/modules/power/smes_construction.dm b/code/modules/power/smes_construction.dm index 23c54363bc4..b85f8f6ffe6 100644 --- a/code/modules/power/smes_construction.dm +++ b/code/modules/power/smes_construction.dm @@ -311,7 +311,7 @@ if (..()) // Multitool - change RCON tag - if(ismultitool(W)) + if(W.ismultitool()) var/newtag = input(user, "Enter new RCON tag. Use \"NO_TAG\" to disable RCON or leave empty to cancel.", "SMES RCON system") as text if(newtag) RCon_tag = newtag @@ -335,7 +335,7 @@ failure_probability = 0 // Crowbar - Disassemble the SMES. - if(iscrowbar(W)) + if(W.iscrowbar()) if (terminal) user << "You have to disassemble the terminal first!" return diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 7e45c178fc7..21b92f4ece2 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -59,7 +59,7 @@ /obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user) - if(iscrowbar(W)) + if(W.iscrowbar()) playsound(src.loc, 'sound/machines/click.ogg', 50, 1) user.visible_message("[user] begins to take the glass off the solar panel.") if(do_after(user, 50)) @@ -224,13 +224,13 @@ /obj/item/solar_assembly/attackby(var/obj/item/weapon/W, var/mob/user) if(!anchored && isturf(loc)) - if(iswrench(W)) + if(W.iswrench()) anchored = 1 user.visible_message("[user] wrenches the solar assembly into place.") playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) return 1 else - if(iswrench(W)) + if(W.iswrench()) anchored = 0 user.visible_message("[user] unwrenches the solar assembly from it's place.") playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) @@ -259,7 +259,7 @@ user.visible_message("[user] inserts the electronics into the solar assembly.") return 1 else - if(iscrowbar(W)) + if(W.iscrowbar()) new /obj/item/weapon/tracker_electronics(src.loc) tracker = 0 user.visible_message("[user] takes out the electronics from the solar assembly.") @@ -397,8 +397,8 @@ return -/obj/machinery/power/solar_control/attackby(I as obj, user as mob) - if(isscrewdriver(I)) +/obj/machinery/power/solar_control/attackby(var/obj/I, user as mob) + if(I.isscrewdriver()) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) if(do_after(user, 20)) if (src.stat & BROKEN) diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm index 8aaca682777..cfaaeb63b66 100644 --- a/code/modules/power/tesla/coil.dm +++ b/code/modules/power/tesla/coil.dm @@ -28,7 +28,7 @@ if(default_part_replacement(user, W)) return - if(iswrench(W)) + if(W.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You [anchored ? "unfasten" : "fasten"] [src] to the flooring." anchored = !anchored @@ -74,7 +74,7 @@ if(default_part_replacement(user, W)) return - if(iswrench(W)) + if(W.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You [anchored ? "unfasten" : "fasten"] [src] to the flooring." anchored = !anchored diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm index dba21204c1e..9686bb533bf 100644 --- a/code/modules/power/tracker.dm +++ b/code/modules/power/tracker.dm @@ -59,7 +59,7 @@ /obj/machinery/power/tracker/attackby(var/obj/item/weapon/W, var/mob/user) - if(iscrowbar(W)) + if(W.iscrowbar()) playsound(src.loc, 'sound/machines/click.ogg', 50, 1) user.visible_message("[user] begins to take the glass off the solar tracker.") if(do_after(user, 50)) diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index 5e19489e971..a2cdbb41fd5 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -226,41 +226,6 @@ if(P.id == id) doors += P -/* -/obj/machinery/computer/turbine_computer/attackby(I as obj, user as mob) - if(isscrewdriver(I)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - if (src.stat & BROKEN) - user << "\blue The broken glass falls out." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - new /obj/item/weapon/material/shard( src.loc ) - var/obj/item/weapon/circuitboard/turbine_control/M = new /obj/item/weapon/circuitboard/turbine_control( A ) - for (var/obj/C in src) - C.forceMove(src.loc) - M.id = src.id - A.circuit = M - A.state = 3 - A.icon_state = "3" - A.anchored = 1 - qdel(src) - else - user << "\blue You disconnect the monitor." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - var/obj/item/weapon/circuitboard/turbine_control/M = new /obj/item/weapon/circuitboard/turbine_control( A ) - for (var/obj/C in src) - C.forceMove(src.loc) - M.id = src.id - A.circuit = M - A.state = 4 - A.icon_state = "4" - A.anchored = 1 - qdel(src) - else - src.attack_hand(user) - return -*/ - /obj/machinery/computer/turbine_computer/attack_hand(var/mob/user as mob) user.machine = src var/dat diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 988fe23a22f..a1b8d210319 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -29,7 +29,7 @@ update_icon() /obj/item/ammo_casing/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(isscrewdriver(W)) + if(W.isscrewdriver()) if(!BB) user << "There is no bullet in the casing to inscribe anything into." return diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index eaee26ee59c..e7c2238f9c7 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -713,7 +713,7 @@ obj/item/weapon/gun/Destroy() to_chat(user, "You attach \the [I] to the front of \the [src].") update_icon() - if(iscrowbar(I) && bayonet) + if(I.iscrowbar() && bayonet) to_chat(user, "You detach \the [bayonet] from \the [src].") bayonet.forceMove(get_turf(src)) bayonet = null @@ -722,7 +722,7 @@ obj/item/weapon/gun/Destroy() if(!pin) return ..() - if(isscrewdriver(I)) + if(I.isscrewdriver()) visible_message("[user] begins to try and pry out [src]'s firing pin!") if(do_after(user,45 SECONDS,act_target = src)) if(pin.durable || prob(50)) diff --git a/code/modules/projectiles/guns/energy/modular.dm b/code/modules/projectiles/guns/energy/modular.dm index fcc0666d287..b1493228462 100644 --- a/code/modules/projectiles/guns/energy/modular.dm +++ b/code/modules/projectiles/guns/energy/modular.dm @@ -39,7 +39,7 @@ user << "You can see \the [modulator] attached." /obj/item/weapon/gun/energy/laser/prototype/attackby(var/obj/item/weapon/D, var/mob/user) - if(!isscrewdriver(D)) + if(!D.isscrewdriver()) return ..() user << "You disassemble \the [src]." disassemble(user) diff --git a/code/modules/projectiles/guns/launcher/crossbow.dm b/code/modules/projectiles/guns/launcher/crossbow.dm index 1511a384cb8..b876489c20b 100644 --- a/code/modules/projectiles/guns/launcher/crossbow.dm +++ b/code/modules/projectiles/guns/launcher/crossbow.dm @@ -162,7 +162,7 @@ else user << "[src] already has a cell installed." - else if(isscrewdriver(W)) + else if(W.isscrewdriver()) if(cell) var/obj/item/C = cell C.forceMove(get_turf(user)) @@ -226,7 +226,7 @@ else user << "You need at least three rods to complete this task." return - else if(iswelder(W)) + else if(W.iswelder()) if(buildstate == 1) var/obj/item/weapon/weldingtool/T = W if(T.remove_fuel(0,user)) @@ -236,7 +236,7 @@ buildstate++ update_icon() return - else if(iscoil(W)) + else if(W.iscoil()) var/obj/item/stack/cable_coil/C = W if(buildstate == 2) if(C.use(5)) @@ -264,7 +264,7 @@ else user << "You need at least three plastic sheets to complete this task." return - else if(isscrewdriver(W)) + else if(W.isscrewdriver()) if(buildstate == 5) user << "You secure the crossbow's various parts." new /obj/item/weapon/gun/launcher/crossbow(get_turf(src)) diff --git a/code/modules/projectiles/guns/launcher/pneumatic.dm b/code/modules/projectiles/guns/launcher/pneumatic.dm index 727f51dd718..40d16adad61 100644 --- a/code/modules/projectiles/guns/launcher/pneumatic.dm +++ b/code/modules/projectiles/guns/launcher/pneumatic.dm @@ -184,7 +184,7 @@ buildstate++ update_icon() return - else if(iswelder(W)) + else if(W.iswelder()) if(buildstate == 1) var/obj/item/weapon/weldingtool/T = W if(T.remove_fuel(0,user)) diff --git a/code/modules/projectiles/guns/projectile/improvised.dm b/code/modules/projectiles/guns/projectile/improvised.dm index 4c5f03ac25a..026ddff60ed 100644 --- a/code/modules/projectiles/guns/projectile/improvised.dm +++ b/code/modules/projectiles/guns/projectile/improvised.dm @@ -120,7 +120,7 @@ buildstate++ update_icon() return - else if(iscoil(W)) + else if(W.iscoil()) var/obj/item/stack/cable_coil/C = W if(buildstate == 3) if(C.use(10)) @@ -194,7 +194,7 @@ buildstate++ update_icon() return - else if(iswelder(W)) + else if(W.iswelder()) if(buildstate == 3) var/obj/item/weapon/weldingtool/T = W if(T.remove_fuel(0,user)) diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index 98f33e030d0..d3406ab156d 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -105,7 +105,7 @@ desc = "A small pocket pistol, easily concealed. Uses .357 rounds." icon_state = "derringer" item_state = "concealed" - accuracy = -1 + accuracy = -1 w_class = 2 origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 3) handle_casings = CYCLE_CASINGS @@ -126,7 +126,7 @@ needspin = FALSE /obj/item/weapon/gun/projectile/revolver/capgun/attackby(obj/item/W, mob/user) - if(!iswirecutter(W) || icon_state == "revolver") + if(!W.iswirecutter() || icon_state == "revolver") return ..() to_chat(user, "You snip off the toy markings off the [src].") name = "revolver" diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index fbcd490cfad..4c1acbb3e17 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -68,7 +68,7 @@ user.drop_from_inventory(B,src) user << "You add the pill bottle into the dispenser slot!" src.updateUsrDialog() - else if(iswrench(B)) + else if(B.iswrench()) anchored = !anchored user << "You [anchored ? "attach" : "detach"] the [src] [anchored ? "to" : "from"] the ground" playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) @@ -227,7 +227,7 @@ if(inoperable()) return user.set_machine(src) - + var/datum/asset/pill_icons = get_asset_datum(/datum/asset/chem_master) pill_icons.send(user.client) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index e450d91cb7d..acbf6777eb7 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -74,7 +74,7 @@ if(breathe_met && (location == CHEM_BREATHE)) removed = breathe_met - removed = min(removed, volume) + removed = M.get_metabolism(removed) max_dose = max(volume, max_dose) if(overdose && (dose > overdose) && (location != CHEM_TOUCH)) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 9df02bc5bbb..f3cbfd06de4 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -1349,6 +1349,16 @@ var/mob/living/carbon/human/H = M H.delayed_vomit() +/datum/reagent/coagulant + name = "Coagulant" + id = "coagulant" + description = "A chemical that can temporarily stop the blood loss caused by internal wounds." + reagent_state = LIQUID + color = "#8b0000" + overdose = REAGENTS_OVERDOSE + taste_description = "bitterness" + fallback_specific_heat = 1 + //Secret Chems /datum/reagent/elixir name = "Elixir of Life" diff --git a/code/modules/reagents/dispenser/dispenser2.dm b/code/modules/reagents/dispenser/dispenser2.dm index 66d77698caf..e9c9800bb1e 100644 --- a/code/modules/reagents/dispenser/dispenser2.dm +++ b/code/modules/reagents/dispenser/dispenser2.dm @@ -66,7 +66,7 @@ SSnanoui.update_uis(src) /obj/machinery/chemical_dispenser/attackby(obj/item/weapon/W, mob/user) - if(iswrench(W)) + if(W.iswrench()) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) user << "You begin to [anchored ? "un" : ""]fasten \the [src]." if (do_after(user, 20)) @@ -81,7 +81,7 @@ else if(istype(W, /obj/item/weapon/reagent_containers/chem_disp_cartridge)) add_cartridge(W, user) - else if(isscrewdriver(W)) + else if(W.isscrewdriver()) var/label = input(user, "Which cartridge would you like to remove?", "Chemical Dispenser") as null|anything in cartridges if(!label) return var/obj/item/weapon/reagent_containers/chem_disp_cartridge/C = remove_cartridge(label) diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 662438450c1..7fd329c1718 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -61,7 +61,7 @@ to_chat(user,"The top cap is wrenched on tight!") return - if (iswrench(O)) + if (O.iswrench()) if(can_tamper && user.a_intent == I_HURT) user.visible_message("\The [user] wrenches \the [src]'s faucet [is_leaking ? "closed" : "open"].","You wrench \the [src]'s faucet [is_leaking ? "closed" : "open"]") is_leaking = !is_leaking @@ -254,7 +254,7 @@ reagents.add_reagent("water",capacity) /obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (isscrewdriver(W)) + if (W.isscrewdriver()) src.add_fingerprint(user) playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) if(do_after(user, 20)) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 5e2bb6ad11e..b3bceae3bc7 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -112,7 +112,7 @@ // attack with item, place item on conveyor /obj/machinery/conveyor/attackby(var/obj/item/I, mob/user) - if(iscrowbar(I)) + if(I.iscrowbar()) if(!(stat & BROKEN)) var/obj/item/conveyor_construct/C = new/obj/item/conveyor_construct(src.loc) C.id = id @@ -250,7 +250,7 @@ S.update() /obj/machinery/conveyor_switch/attackby(obj/item/I, mob/user, params) - if(iscrowbar(I)) + if(I.iscrowbar()) var/obj/item/conveyor_switch_construct/C = new/obj/item/conveyor_switch_construct(src.loc) C.id = id transfer_fingerprints_to(C) diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index de34084ef0d..91816576427 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -227,7 +227,7 @@ var/obj/structure/disposalpipe/CP = locate() in T - if(iswrench(I)) + if(I.iswrench()) if(anchored) anchored = 0 if(ispipe) @@ -265,7 +265,7 @@ playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) update() - else if(iswelder(I)) + else if(I.iswelder()) if(anchored) var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 96d930b511f..cd3caeaf542 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -54,7 +54,7 @@ src.add_fingerprint(user) if(mode<=0) // It's off - if(isscrewdriver(I)) + if(I.isscrewdriver()) if(contents.len > 0) user << "Eject the items first!" return @@ -68,7 +68,7 @@ playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You attach the screws around the power connection." return - else if(iswelder(I) && mode==-1) + else if(I.iswelder() && mode==-1) if(contents.len > 0) user << "Eject the items first!" return @@ -860,7 +860,7 @@ if(!T.is_plating()) return // prevent interaction with T-scanner revealed pipes src.add_fingerprint(user) - if(iswelder(I)) + if(I.iswelder()) var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) @@ -1332,7 +1332,7 @@ if(!T.is_plating()) return // prevent interaction with T-scanner revealed pipes src.add_fingerprint(user) - if(iswelder(I)) + if(I.iswelder()) var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) @@ -1489,7 +1489,7 @@ if(!I || !user) return src.add_fingerprint(user) - if(isscrewdriver(I)) + if(I.isscrewdriver()) if(mode==0) mode=1 playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) @@ -1500,7 +1500,7 @@ playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You attach the screws around the power connection." return - else if(iswelder(I) && mode==1) + else if(I.iswelder() && mode==1) var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 4dc24250dcb..8744e68deed 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -432,7 +432,7 @@ if(!I || !user) return - if(isscrewdriver(I)) + if(I.isscrewdriver()) if(c_mode==0) c_mode=1 playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) @@ -443,7 +443,7 @@ playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You attach the screws around the power connection." return - else if(iswelder(I) && c_mode==1) + else if(I.iswelder() && c_mode==1) var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(1,user)) user << "You start slicing the floorweld off the delivery chute." diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm b/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm index 0c580bedc9f..6002901cd71 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm +++ b/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm @@ -235,14 +235,14 @@ istype(W,/obj/item/weapon/melee/energy) ||\ istype(W,/obj/item/weapon/melee/cultblade) ||\ istype(W,/obj/item/weapon/card/emag) ||\ - ismultitool(W)) + W.ismultitool()) if (my_effect.trigger == TRIGGER_ENERGY) my_effect.ToggleActivate() if(secondary_effect && secondary_effect.trigger == TRIGGER_ENERGY && prob(25)) secondary_effect.ToggleActivate(0) else if (istype(W,/obj/item/weapon/flame) && W:lit ||\ - iswelder(W) && W:welding) + W.iswelder() && W:welding) if(my_effect.trigger == TRIGGER_HEAT) my_effect.ToggleActivate() if(secondary_effect && secondary_effect.trigger == TRIGGER_HEAT && prob(25)) diff --git a/code/modules/research/xenoarchaeology/tools/suspension_generator.dm b/code/modules/research/xenoarchaeology/tools/suspension_generator.dm index d48d9295f99..c468bb6c58e 100644 --- a/code/modules/research/xenoarchaeology/tools/suspension_generator.dm +++ b/code/modules/research/xenoarchaeology/tools/suspension_generator.dm @@ -165,14 +165,14 @@ user << "You remove the power cell" /obj/machinery/suspension_gen/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (isscrewdriver(W)) + if (W.isscrewdriver()) if(!open) if(screwed) screwed = 0 else screwed = 1 user << "You [screwed ? "screw" : "unscrew"] the battery panel." - else if (iscrowbar(W)) + else if (W.iscrowbar()) if(!locked) if(!screwed) if(!suspension_field) @@ -188,7 +188,7 @@ user << "Unscrew [src]'s battery panel first." else user << "[src]'s security locks are engaged." - else if (iswrench(W)) + else if (W.iswrench()) if(!suspension_field) if(anchored) anchored = 0 diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm index 7af9907fd7b..ad7a7446db4 100644 --- a/code/modules/shieldgen/emergency_shield.dm +++ b/code/modules/shieldgen/emergency_shield.dm @@ -262,7 +262,7 @@ else user << "The device must first be secured to the floor." return - + /obj/machinery/shieldgen/emag_act(var/remaining_charges, var/mob/user) if(!malfunction) malfunction = 1 @@ -270,7 +270,7 @@ return 1 /obj/machinery/shieldgen/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(isscrewdriver(W)) + if(W.isscrewdriver()) playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) if(is_open) user << "You close the panel." @@ -279,7 +279,7 @@ user << "You open the panel and expose the wiring." is_open = 1 - else if(iscoil(W) && malfunction && is_open) + else if(W.iscoil() && malfunction && is_open) var/obj/item/stack/cable_coil/coil = W user << "You begin to replace the wires." //if(do_after(user, min(60, round( ((maxhealth/health)*10)+(malfunction*10) ))) //Take longer to repair heavier damage @@ -290,7 +290,7 @@ user << "You repair the [src]!" update_icon() - else if(iswrench(W)) + else if(W.iswrench()) if(locked) user << "The bolts are covered, unlocking this would retract the covers." return diff --git a/code/modules/shieldgen/sheldwallgen.dm b/code/modules/shieldgen/sheldwallgen.dm index 1f09d92ca4f..e98e01c238a 100644 --- a/code/modules/shieldgen/sheldwallgen.dm +++ b/code/modules/shieldgen/sheldwallgen.dm @@ -157,7 +157,7 @@ /obj/machinery/shieldwallgen/attackby(obj/item/W, mob/user) - if(iswrench(W)) + if(W.iswrench()) if(active) user << "Turn off the field generator first." return diff --git a/code/modules/shieldgen/shield_capacitor.dm b/code/modules/shieldgen/shield_capacitor.dm index 76bb28e1df0..5a10b7513af 100644 --- a/code/modules/shieldgen/shield_capacitor.dm +++ b/code/modules/shieldgen/shield_capacitor.dm @@ -47,7 +47,7 @@ updateDialog() else user << span("alert", "Access denied.") - else if(iswrench(W)) + else if(W.iswrench()) src.anchored = !src.anchored src.visible_message(span("notice", "\The [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by \the [user].")) diff --git a/code/modules/shieldgen/shield_gen.dm b/code/modules/shieldgen/shield_gen.dm index 09541f33eea..ddcf0814aae 100644 --- a/code/modules/shieldgen/shield_gen.dm +++ b/code/modules/shieldgen/shield_gen.dm @@ -62,7 +62,7 @@ updateDialog() else user << span("alert", "Access denied.") - else if(iswrench(W)) + else if(W.iswrench()) src.anchored = !src.anchored src.visible_message(span("notice", "\The [src] has been [anchored ? "bolted to the floor":"unbolted from the floor"] by \the [user].")) diff --git a/code/modules/spells/artifacts.dm b/code/modules/spells/artifacts.dm index 9d7d44c4ca3..1a2bd010da8 100644 --- a/code/modules/spells/artifacts.dm +++ b/code/modules/spells/artifacts.dm @@ -266,7 +266,7 @@ flick("flash", H.flash) H.eye_blurry = 5 - if(iscoil(W)) + if(W.iscoil()) to_chat(H, "You strangle \the [src] with \the [W]!") H.silent += 10 playsound(get_turf(H), 'sound/effects/noosed.ogg', 50, 1, -1) diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index 47d945f1d23..f7006e1d5c9 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -185,7 +185,7 @@ can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(!istype(target)) return 0 - if(iswelder(tool)) + if(tool.iswelder()) var/obj/item/weapon/weldingtool/welder = tool if(!welder.isOn() || !welder.remove_fuel(1,user)) return 0 diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index a98e7ddc015..28bf3849d41 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -130,7 +130,7 @@ can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) - if(iswelder(tool)) + if(tool.iswelder()) var/obj/item/weapon/weldingtool/welder = tool if(!welder.isOn() || !welder.remove_fuel(1,user)) return 0 diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index 6823961e341..e653484e037 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -103,7 +103,7 @@ /obj/structure/table/attackby(obj/item/weapon/W, mob/user) - if(reinforced && isscrewdriver(W)) + if(reinforced && W.isscrewdriver()) remove_reinforced(W, user) if(!reinforced) update_desc() @@ -111,7 +111,7 @@ update_material() return 1 - if(carpeted && iscrowbar(W)) + if(carpeted && W.iscrowbar()) user.visible_message("\The [user] removes the carpet from \the [src].", "You remove the carpet from \the [src].") new /obj/item/stack/tile/carpet(loc) @@ -130,7 +130,7 @@ else user << "You don't have enough carpet!" - if(!reinforced && !carpeted && material && iswrench(W)) + if(!reinforced && !carpeted && material && W.iswrench()) remove_material(W, user) if(!material) update_connections(1) @@ -141,11 +141,11 @@ update_material() return 1 - if(!carpeted && !reinforced && !material && iswrench(W)) + if(!carpeted && !reinforced && !material && W.iswrench()) dismantle(W, user) return 1 - if(health < maxhealth && iswelder(W)) + if(health < maxhealth && W.iswelder()) var/obj/item/weapon/weldingtool/F = W if(F.welding) user << "You begin reparing damage to \the [src]." diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index 27c4450de3e..6f423b3cccc 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -29,12 +29,12 @@ return if(panel_open) - if(ismultitool(I)) + if(I.ismultitool()) var/obj/item/device/multitool/M = I M.buffer = src user << "You save the data in the [I.name]'s buffer." else - if(ismultitool(I)) + if(I.ismultitool()) user << "You should open [src]'s maintenance panel first." default_deconstruction_crowbar(user, I) @@ -59,7 +59,7 @@ var/stage = 0 /obj/machinery/telepad_cargo/attackby(obj/item/weapon/W, mob/user, params) - if(iswrench(W)) + if(W.iswrench()) anchored = 0 playsound(src, 'sound/items/Ratchet.ogg', 50, 1) if(anchored) @@ -68,7 +68,7 @@ else if(!anchored) anchored = 1 user << "\The [src] is now secured." - if(isscrewdriver(W)) + if(W.isscrewdriver()) if(stage == 0) playsound(src, 'sound/items/Screwdriver.ogg', 50, 1) user << "You unscrew the telepad's tracking beacon." @@ -77,7 +77,7 @@ playsound(src, 'sound/items/Screwdriver.ogg', 50, 1) user << "You screw in the telepad's tracking beacon." stage = 0 - if(iswelder(W) && stage == 1) + if(W.iswelder() && stage == 1) playsound(src, 'sound/items/Welder.ogg', 50, 1) user << "You disassemble the telepad." new /obj/item/stack/material/steel(get_turf(src)) diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index b3e962ff5e7..704b955a574 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -64,7 +64,7 @@ user.unEquip(W) W.forceMove(src) user.visible_message("[user] inserts [W] into \the [src]'s GPS device slot.", "You insert [W] into \the [src]'s GPS device slot.") - else if(ismultitool(W)) + else if(W.ismultitool()) var/obj/item/device/multitool/M = W if(M.buffer && istype(M.buffer, /obj/machinery/telepad)) telepad = M.buffer diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index e0178217b22..fc62c67749b 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -63,7 +63,7 @@ return ..() /obj/vehicle/train/cargo/trolley/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(open && iswirecutter(W)) + if(open && W.iswirecutter()) passenger_allowed = !passenger_allowed user.visible_message("[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src].","You [passenger_allowed ? "cut" : "mend"] the load limiter cable.") else diff --git a/code/modules/vehicles/pussywagon.dm b/code/modules/vehicles/pussywagon.dm index 5c6baf95084..2675856faf9 100644 --- a/code/modules/vehicles/pussywagon.dm +++ b/code/modules/vehicles/pussywagon.dm @@ -141,14 +141,14 @@ user << "You replace \the [src]'s reagent reservoir." return - if(iswrench(W) && open) + if(W.iswrench() && open) if(bucket) bucket.forceMove(user.loc) bucket = null user << "You remove \the [src]'s reagent reservoir." return - if(iscrowbar(W) && !open) + if(W.iscrowbar() && !open) if(bucket) for(var/obj/item/I in hoovered) I.forceMove(user.loc) diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index df9ba7d82c6..ce499964d97 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -77,17 +77,17 @@ /obj/vehicle/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/hand_labeler)) return - if(isscrewdriver(W)) + if(W.isscrewdriver()) if(!locked) open = !open update_icon() user << "Maintenance panel is now [open ? "opened" : "closed"]." - else if(iscrowbar(W) && cell && open) + else if(W.iscrowbar() && cell && open) remove_cell(user) else if(istype(W, /obj/item/weapon/cell) && !cell && open) insert_cell(W, user) - else if(iswelder(W)) + else if(W.iswelder()) var/obj/item/weapon/weldingtool/T = W if(T.welding) if(health < maxhealth) diff --git a/code/modules/virus2/centrifuge.dm b/code/modules/virus2/centrifuge.dm index a5e0a77dbd7..fb072155107 100644 --- a/code/modules/virus2/centrifuge.dm +++ b/code/modules/virus2/centrifuge.dm @@ -10,7 +10,7 @@ var/datum/disease2/disease/virus2 = null /obj/machinery/computer/centrifuge/attackby(var/obj/O as obj, var/mob/user as mob) - if(isscrewdriver(O)) + if(O.isscrewdriver()) return ..(O,user) if(istype(O,/obj/item/weapon/reagent_containers/glass/beaker/vial)) diff --git a/code/modules/virus2/diseasesplicer.dm b/code/modules/virus2/diseasesplicer.dm index 6836c7afdf7..a5fd20a0aab 100644 --- a/code/modules/virus2/diseasesplicer.dm +++ b/code/modules/virus2/diseasesplicer.dm @@ -13,7 +13,7 @@ var/scanning = 0 /obj/machinery/computer/diseasesplicer/attackby(var/obj/I as obj, var/mob/user as mob) - if(isscrewdriver(I)) + if(I.isscrewdriver()) return ..(I,user) if(istype(I,/obj/item/weapon/virusdish)) diff --git a/html/changelogs/alberyk-steelunathi.yml b/html/changelogs/alberyk-steelunathi.yml new file mode 100644 index 00000000000..58fbaa773d3 --- /dev/null +++ b/html/changelogs/alberyk-steelunathi.yml @@ -0,0 +1,6 @@ +author: Alberyk, Kyres1 + +delete-after: True + +changes: + - rscadd: "Added the Aut'akh unathi subspecies." diff --git a/icons/effects/species.dmi b/icons/effects/species.dmi index 1e67e6bb3f3..9ba0b6906f1 100644 Binary files a/icons/effects/species.dmi and b/icons/effects/species.dmi differ diff --git a/icons/mob/human_races/r_autakh.dmi b/icons/mob/human_races/r_autakh.dmi new file mode 100644 index 00000000000..148485006a5 Binary files /dev/null and b/icons/mob/human_races/r_autakh.dmi differ diff --git a/icons/mob/actions.dmi b/icons/obj/action_buttons/actions.dmi similarity index 100% rename from icons/mob/actions.dmi rename to icons/obj/action_buttons/actions.dmi diff --git a/icons/obj/action_buttons/organs.dmi b/icons/obj/action_buttons/organs.dmi new file mode 100644 index 00000000000..8087dcea9bf Binary files /dev/null and b/icons/obj/action_buttons/organs.dmi differ diff --git a/icons/obj/combitool.dmi b/icons/obj/combitool.dmi new file mode 100644 index 00000000000..596187628d3 Binary files /dev/null and b/icons/obj/combitool.dmi differ diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index 5d9d85e6060..00ffd2ec595 100644 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ