mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +01:00
Adds the Aut'akh unathi (#5919)
* Base work for the unathi robot subspecies. * Adds metabolism species, kidney vars, and the robot unathi organs. * Moves some action buttons to organs, pretty much a bay port right now. Todo: the unathi and alien stuff should also go here. * First autakh implant power. * Fixes the organs action button this time. * Finishes more implants, and interactions with flashs and vaurca. * Prepare for great changes. * Drops the real bomb, boss. * He who fights with monsters. * Far more work into augments and limb removing powers. * Limb verbs should be good now. * A LOT of work into the assited organ, allowing it to bleed and etc, as well adding a new chem that will stop bleeding in their case. * Probably the last work on implants. * Some extra touches. * Some tweaks to the species. * More fixes and adds kyre's sprites. * More runtime fixes. * Fixes the species name too. * Fixes travis. * Updates this file too to work with the new tools procs. * Adds changelog * Fixed changelog. * Unathi hair and lore description. * Some tweaks to this too. * Locks away them for now, they will be released after we got all the events and etc done. * Changes this chemical. * Fixes an airlock runtime. * Adds the non scan flag to the autakh, mostly due to some bizzare interactions with changelings and cloning. * Organs removal changes; can't take out the organ if it is too damage. * Restricts them back again. * Robotic organs now have the proper icons and names. * Adds sprites for their organs and some extra tweaks. * Fixes this missing icon. * emp should also now hurt assited organs. * Tweaks more organ related things. * Fixes the head not being properly set as well. * Fixes their flags. * fixes the flag for real this time. * Poze's review. * Changes the au'takh organ buttons to don't be animated. * Helps with adminbus or something. * Fowl's requested changes. * Fixes a typo. * Robotic limb's brute and burn mods are now controlled by the limb model. * Fowl's changes once more. * Stops some spam. * More grammar. * No eal. * Skull's review.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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.", \
|
||||
|
||||
@@ -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 << "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>"
|
||||
|
||||
@@ -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 << "<span class='notice'>You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor.</span>"
|
||||
|
||||
@@ -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 << "<span class='notice'>You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor.</span>"
|
||||
|
||||
@@ -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 << "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>"
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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 << "<span class='warning'>You cannot unwrench \the [src], dettach \the [connected_device] first.</span>"
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 << "<span class='warning'>You cannot unwrench \the [src], it's too complicated.</span>"
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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 << "<span class='danger'>\The [WT] must be turned on!</span>"
|
||||
@@ -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 << "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>"
|
||||
|
||||
@@ -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 << "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>"
|
||||
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 << "<span class='danger'>\The [WT] must be turned on!</span>"
|
||||
@@ -314,5 +314,5 @@
|
||||
if(initial_loc)
|
||||
initial_loc.air_scrub_info -= id_tag
|
||||
initial_loc.air_scrub_names -= id_tag
|
||||
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -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 << "<span class='warning'>You cannot unwrench \the [src], it's too complicated.</span>"
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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 << "<span class='notice'>You need to be holding [src] to do that.</span>"
|
||||
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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 << "<span class='error'>You need wirecutters!</span>"
|
||||
|
||||
else if(href_list["pulse"])
|
||||
if(ismultitool(I))
|
||||
if(I.ismultitool())
|
||||
var/colour = href_list["pulse"]
|
||||
PulseColour(colour)
|
||||
else
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 << "<span class='notice'>You [wiresexposed ? "open" : "close"] the maintenance panel.</span>"
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if (wiresexposed && iswirecutter(W))
|
||||
if (wiresexposed && W.iswirecutter())
|
||||
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "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 << "<span class='notice'>You wire \the [src].</span>"
|
||||
@@ -789,7 +789,7 @@
|
||||
user << "<span class='warning'>You need 5 pieces of cable to do wire \the [src].</span>"
|
||||
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)
|
||||
|
||||
@@ -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("<span class='warning'>\The [user] hits \the [src] with \a [W]!</span>")
|
||||
src.health -= W.force
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -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 += "<span class='warning'>You are too far away to read it.</span>"
|
||||
|
||||
|
||||
else if(stat & (NOPOWER|BROKEN))
|
||||
t += "<span class='warning'>The display is off.</span>"
|
||||
|
||||
|
||||
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 << "<span class='notice'>You begin to unfasten \the [src]...</span>"
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
else if (iswrench(W))
|
||||
else if (W.iswrench())
|
||||
if(connected_port)
|
||||
disconnect()
|
||||
user << "<span class='notice'>You disconnect \the [src] from the port.</span>"
|
||||
@@ -166,7 +166,7 @@
|
||||
power_change()
|
||||
return
|
||||
|
||||
if(isscrewdriver(I))
|
||||
if(I.isscrewdriver())
|
||||
if(!cell)
|
||||
user << "<span class='warning'>There is no power cell installed.</span>"
|
||||
return
|
||||
|
||||
@@ -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 << "<span class='warning'>Turn \the [src] off first!</span>"
|
||||
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 << "<span class='warning'>The bolts are too tight for you to unscrew!</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 << "<span class='notice'>Maintenance panel is now [src.open ? "opened" : "closed"].</span>"
|
||||
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)
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
user.drop_from_inventory(C,src)
|
||||
cell = C
|
||||
updateDialog()
|
||||
else if(isscrewdriver(I))
|
||||
else if(I.isscrewdriver())
|
||||
if(locked)
|
||||
user << "<span class='notice'>The maintenance hatch cannot be opened or closed while the controls are locked.</span>"
|
||||
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)
|
||||
|
||||
@@ -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 << "<span class='notice'>You start to [panel_open ? "close" : "open"] the camera's panel.</span>"
|
||||
//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 @@
|
||||
"<span class='notice'>You screw the camera's panel [panel_open ? "open" : "closed"].</span>")
|
||||
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)
|
||||
|
||||
@@ -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 << "<span class='notice'>You add wires to the assembly.</span>"
|
||||
@@ -66,7 +66,7 @@
|
||||
user << "<span class='warning'>You need 2 coils of wire to wire the assembly.</span>"
|
||||
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."
|
||||
|
||||
@@ -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 << "<span class='warning'>Remove the cell first!</span>"
|
||||
return
|
||||
|
||||
@@ -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 << "<span class='warning'>Can not do that while [src] is in use.</span>"
|
||||
else
|
||||
|
||||
@@ -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 << "<span class='notice'>You wrench the frame into place.</span>"
|
||||
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 << "<span class='notice'>You unfasten the frame.</span>"
|
||||
@@ -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 << "<span class='notice'>You screw the circuit board into place.</span>"
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
if(iscrowbar(P) && circuit)
|
||||
if(P.iscrowbar() && circuit)
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the circuit board.</span>"
|
||||
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 << "<span class='notice'>You unfasten the circuit board.</span>"
|
||||
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 << "<span class='warning'>You need five coils of wire to add them to the frame.</span>"
|
||||
@@ -76,7 +76,7 @@
|
||||
user << "<span class='notice'>You add cables to the frame.</span>"
|
||||
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 << "<span class='notice'>You remove the brain.</span>"
|
||||
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 << "<span class='notice'>You remove the glass panel.</span>"
|
||||
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 << "<span class='notice'>You connect the monitor.</span>"
|
||||
if(!brain)
|
||||
@@ -225,7 +225,7 @@
|
||||
else
|
||||
user << "<span class='danger'>ERROR:</span> Unable to locate artificial intelligence."
|
||||
return
|
||||
else if(iswrench(W))
|
||||
else if(W.iswrench())
|
||||
if(anchored)
|
||||
user.visible_message("<span class='notice'>\The [user] starts to unbolt \the [src] from the plating...</span>")
|
||||
if(!do_after(user,40))
|
||||
|
||||
@@ -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 << "<span class='notice'>You wrench the frame into place.</span>"
|
||||
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 << "<span class='notice'>You unfasten the frame.</span>"
|
||||
@@ -47,12 +47,12 @@
|
||||
user.drop_from_inventory(P,src)
|
||||
else
|
||||
user << "<span class='warning'>This frame does not accept circuit boards of this type!</span>"
|
||||
if(isscrewdriver(P) && circuit)
|
||||
if(P.isscrewdriver() && circuit)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You screw the circuit board into place and screw the drawer shut.</span>"
|
||||
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 << "<span class='notice'>You remove the circuit board.</span>"
|
||||
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 << "<span class='notice'>You unfasten the circuit board.</span>"
|
||||
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 << "<span class='warning'>You need five coils of wire to add them to the frame.</span>"
|
||||
@@ -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 << "<span class='notice'>You remove the cables.</span>"
|
||||
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 << "<span class='notice'>You remove the glass keyboard.</span>"
|
||||
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 << "<span class='notice'>You connect the glass keyboard.</span>"
|
||||
var/B = new src.circuit.build_path ( src.loc )
|
||||
|
||||
@@ -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("<span class='notice'>The [src] can [secured ? "no longer" : "now"] be modified.</span>")
|
||||
updateBuildPath()
|
||||
|
||||
@@ -93,8 +93,8 @@
|
||||
text = replacetext(text, "\n", "<BR>")
|
||||
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 )
|
||||
|
||||
@@ -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 << "<span class='warning'>It is too hot to mess with!</span>"
|
||||
return
|
||||
|
||||
@@ -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 << "<span class='notice'>The broken glass falls out.</span>"
|
||||
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 << "<span class='notice'>You disconnect the monitor.</span>"
|
||||
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)
|
||||
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 << "<span class='warning'>You need five lengths of cable to add them to the frame.</span>"
|
||||
@@ -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 << "<span class='notice'>You dismantle the frame</span>"
|
||||
new /obj/item/stack/material/steel(src.loc, 5)
|
||||
@@ -72,7 +72,7 @@
|
||||
else
|
||||
user << "<span class='warning'>This frame does not accept circuit boards of this type!</span>"
|
||||
else
|
||||
if(iswirecutter(P))
|
||||
if(P.iswirecutter())
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the cables.</span>"
|
||||
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)
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
//Stuff you can do if the maint hatch is open
|
||||
if(panel_open)
|
||||
if(iswrench(O))
|
||||
if(O.iswrench())
|
||||
user << "<span class='notice'>You start [valve_open ? "closing" : "opening"] the pressure relief valve of [src].</span>"
|
||||
if(do_after(user,50))
|
||||
valve_open = !valve_open
|
||||
|
||||
@@ -181,7 +181,7 @@ for reference:
|
||||
visible_message("<span class='warning'>BZZzZZzZZzZT</span>")
|
||||
return
|
||||
return
|
||||
else if (iswrench(W))
|
||||
else if (W.iswrench())
|
||||
if (src.health < src.maxhealth)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
src.health = src.maxhealth
|
||||
|
||||
@@ -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 << "<span class='warning'>The panel is broken and cannot be closed.</span>"
|
||||
@@ -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.")
|
||||
|
||||
@@ -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 << "<span class='warning'>\The [src] must be closed before you can repair it.</span>"
|
||||
return
|
||||
@@ -312,7 +325,7 @@
|
||||
repairing = null
|
||||
return
|
||||
|
||||
if(repairing && iscrowbar(I))
|
||||
if(repairing && I.iscrowbar())
|
||||
user << "<span class='notice'>You remove \the [repairing].</span>"
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
repairing.forceMove(user.loc)
|
||||
|
||||
@@ -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("<span class='danger'>[user] has [hatch_open ? "opened" : "closed"] \the [src] maintenance panel.</span>",
|
||||
"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 << "<span class='danger'>You must open the maintenance panel first!</span>"
|
||||
else
|
||||
@@ -316,11 +316,11 @@
|
||||
user << "<span class='danger'>\The [src] is welded shut!</span>"
|
||||
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("<span class='danger'>\The [user] pries at \the [src] with \a [C], but \the [src] is welded in place!</span>",\
|
||||
"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("<span class='danger'>\The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!</span>",\
|
||||
"You force \the [src] [density ? "open" : "closed"] with \the [C]!",\
|
||||
|
||||
@@ -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 << "<span class='warning'>You need one length of coil to wire \the [src].</span>"
|
||||
@@ -26,7 +26,7 @@ obj/structure/firedoor_assembly/attackby(C as obj, mob/user as mob)
|
||||
wired = 1
|
||||
user << "<span class='notice'>You wire \the [src].</span>"
|
||||
|
||||
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 << "<span class='warning'>You must secure \the [src] first!</span>"
|
||||
else if(iswrench(C))
|
||||
else if(C.iswrench())
|
||||
anchored = !anchored
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] has [anchored ? "" : "un" ]secured \the [src]!</span>",
|
||||
"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("<span class='warning'>[user] dissassembles \the [src].</span>",
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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("<span class='notice'>\The [user] has reconnected [src]'s detecting unit!</span>", "<span class='notice'>You have reconnected [src]'s detecting unit.</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] has disconnected [src]'s detecting unit!</span>", "<span class='notice'>You have disconnected [src]'s detecting unit.</span>")
|
||||
else if (iswirecutter(W))
|
||||
else if (W.iswirecutter())
|
||||
user.visible_message("<span class='notice'>\The [user] has cut the wires inside \the [src]!</span>", "<span class='notice'>You have cut the wires inside \the [src].</span>")
|
||||
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 << "<span class='notice'>You wire \the [src].</span>"
|
||||
@@ -118,7 +118,7 @@
|
||||
else
|
||||
user << "<span class='warning'>You need 5 pieces of cable to wire \the [src].</span>"
|
||||
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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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("<span class='notice'>\The [user] has [anchored ? "attached" : "detached"] \the [src].</span>")
|
||||
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 << "<span class='warning'>\The [src] must be on to complete this task.</span>"
|
||||
|
||||
@@ -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 << "<span class='notice'>\The [src] is empty.</span>"
|
||||
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
|
||||
..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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("<span class='warning'>[user] has [anchored ? "un" : ""]secured \the [src].</span>", "<span class='notice'>You [anchored ? "un" : ""]secure \the [src].</span>")
|
||||
|
||||
@@ -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( \
|
||||
"<span class='notice'>\The [user] starts to fix part of the microwave.</span>", \
|
||||
"<span class='notice'>You start to fix part of the microwave.</span>" \
|
||||
@@ -67,7 +67,7 @@
|
||||
"<span class='notice'>You have fixed part of the microwave.</span>" \
|
||||
)
|
||||
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( \
|
||||
"<span class='notice'>\The [user] starts to fix part of the microwave.</span>", \
|
||||
"<span class='notice'>You start to fix part of the microwave.</span>" \
|
||||
@@ -136,7 +136,7 @@
|
||||
var/obj/item/weapon/grab/G = O
|
||||
user << "<span class='warning'>This is ridiculous. You can not fit \the [G.affecting] in this [src].</span>"
|
||||
return 1
|
||||
else if(iscrowbar(O))
|
||||
else if(O.iscrowbar())
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] begins [src.anchored ? "unsecuring" : "securing"] the microwave.</span>", \
|
||||
"<span class='notice'>You attempt to [src.anchored ? "unsecure" : "secure"] the microwave.</span>"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.", \
|
||||
|
||||
@@ -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.")
|
||||
|
||||
@@ -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...")
|
||||
|
||||
|
||||
@@ -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 << "<span class='warning'>You need to fasten it to a pipe</span>"
|
||||
|
||||
@@ -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 << "<span class='notice'>You begin to unfasten \the [src] from the floor...</span>"
|
||||
|
||||
@@ -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("<span class='notice'>[user] has set \the [src] to manufacture [P_type_t].</span>", "<span class='notice'>You set \the [src] to manufacture [P_type_t].</span>")
|
||||
return
|
||||
|
||||
if(iscrowbar(W))
|
||||
if(W.iscrowbar())
|
||||
a_dis=!a_dis
|
||||
user.visible_message("<span class='notice'>[user] has [!a_dis?"de":""]activated auto-dismantling.</span>", "<span class='notice'>You [!a_dis?"de":""]activate auto-dismantling.</span>")
|
||||
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)
|
||||
|
||||
@@ -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 << "<span class='notice'>You begin prying the metal coverings off.</span>"
|
||||
@@ -279,7 +279,7 @@
|
||||
user << "<span class='notice'>You remove the turret but did not manage to salvage anything.</span>"
|
||||
qdel(src) // qdel
|
||||
|
||||
else if((iswrench(I)))
|
||||
else if((I.iswrench()))
|
||||
if (immobile)
|
||||
user << "<span class='notice'>[src] is firmly attached to the ground with some form of epoxy.</span>"
|
||||
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 << "<span class='notice'>You secure the external bolts.</span>"
|
||||
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 << "<span class='notice'>You dismantle the turret construction.</span>"
|
||||
new /obj/item/stack/material/steel( loc, 5)
|
||||
@@ -695,7 +695,7 @@
|
||||
user << "<span class='warning'>You need two sheets of metal to continue construction.</span>"
|
||||
return
|
||||
|
||||
else if(iswrench(I))
|
||||
else if(I.iswrench())
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user << "<span class='notice'>You unfasten the external bolts.</span>"
|
||||
anchored = 0
|
||||
@@ -705,14 +705,14 @@
|
||||
|
||||
|
||||
if(2)
|
||||
if(iswrench(I))
|
||||
if(I.iswrench())
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "<span class='notice'>You bolt the metal armor into place.</span>"
|
||||
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 << "<span class='notice'>You remove the turret's metal armor bolts.</span>"
|
||||
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 << "<span class='notice'>You close the access hatch.</span>"
|
||||
@@ -793,7 +793,7 @@
|
||||
user << "<span class='warning'>You need two sheets of metal to continue construction.</span>"
|
||||
return
|
||||
|
||||
else if(isscrewdriver(I))
|
||||
else if(I.isscrewdriver())
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
build_step = 5
|
||||
user << "<span class='notice'>You open the access hatch.</span>"
|
||||
@@ -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 << "<span class='notice'>You pry off the turret's exterior armor.</span>"
|
||||
new /obj/item/stack/material/steel(loc, 2)
|
||||
|
||||
@@ -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 << "<span class='alert'>Remove [charging] first!</span>"
|
||||
return
|
||||
|
||||
@@ -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("<span class='notice'>[user] [panel_open ? "opens" : "closes"] the hatch on the [src].</span>", "<span class='notice'>You [panel_open ? "open" : "close"] the hatch on the [src].</span>")
|
||||
update_icon()
|
||||
|
||||
@@ -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("<font color='blue'>You [] the unit's maintenance panel.</font>",(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."
|
||||
|
||||
@@ -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 << "<span class='warning'>This device must be placed over an exposed cable.</span>"
|
||||
return
|
||||
|
||||
@@ -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 << "<span class='danger'>You need to deactivate the beacon first!</span>"
|
||||
return
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 << "<span class='notice'>You insert the cables.</span>"
|
||||
@@ -67,7 +67,7 @@
|
||||
stat &= ~BROKEN // the machine's not borked anymore!
|
||||
else
|
||||
user << "<span class='warning'>You need five coils of wire for this.</span>"
|
||||
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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 << "<span class='notice'>You insert \the [W] into \the [src].</span>"
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
else if(iswrench(W))
|
||||
else if(W.iswrench())
|
||||
if(!can_move)
|
||||
return
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 << "<span class='notice'>You [panel ? "open" : "close"] the [src]'s maintenance panel</span>"*/
|
||||
if(istype(W,/obj/item/weapon/pen/crayon) || istype(W,/obj/item/weapon/stamp))
|
||||
if( state in list( 1, 3, 6 ) )
|
||||
if(!crayon)
|
||||
|
||||
@@ -778,7 +778,7 @@
|
||||
user << "<span class='warning'>Invalid ID: Access denied.</span>"
|
||||
else
|
||||
user << "<span class='warning'>Maintenance protocols disabled by operator.</span>"
|
||||
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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
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)
|
||||
|
||||
@@ -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 << "<span class='notice'>You remove the remnants of the poster.</span>"
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 << "<span class='warning'>Something seems to be blocking the flash!</span>"
|
||||
else
|
||||
user << "<span class='warning'>This mind seems resistant to the flash!</span>" */
|
||||
else
|
||||
flashfail = 1
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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 << "<span class='notice'>You disassemble the improvised signal jammer.</span>"
|
||||
user.put_in_hands(assembly_holder)
|
||||
user.put_in_hands(cell)
|
||||
|
||||
@@ -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("<span class='warning'>You try to analyze the floor's vitals!</span>")
|
||||
for(var/mob/O in viewers(M, null))
|
||||
@@ -64,7 +69,7 @@ BREATH ANALYZER
|
||||
user.show_message("<span class='notice'>Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)</span>", 1)
|
||||
if(M.tod && (M.stat == DEAD || (M.status_flags & FAKEDEATH)))
|
||||
user.show_message("<span class='notice'>Time of Death: [M.tod]</span>")
|
||||
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("<span class='notice'>Localized Damage, Brute/Burn:</span>",1)
|
||||
@@ -117,17 +122,13 @@ BREATH ANALYZER
|
||||
if (ID in virusDB)
|
||||
var/datum/data/record/V = virusDB[ID]
|
||||
user.show_message("<span class='warning'>Warning: Pathogen [V.fields["name"]] detected in subject's blood. Known antigen : [V.fields["antigen"]]</span>")
|
||||
// user.show_message(text("<span class='warning'>Warning: Unknown pathogen detected in subject's blood.</span>"))
|
||||
|
||||
if (M.getCloneLoss())
|
||||
user.show_message("<span class='warning'>Subject appears to have been imperfectly cloned.</span>")
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(!D.hidden[SCANNER])
|
||||
user.show_message(text("<span class='danger'>Warning: [D.form] Detected</span><span class='warning'>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]</span>"))
|
||||
// if (M.reagents && M.reagents.get_reagent_amount("inaprovaline"))
|
||||
// user.show_message("<span class='notice'>Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.</span>")
|
||||
// Remove brain worm scans. Bad.
|
||||
// if (M.has_brain_worms())
|
||||
// user.show_message("<span class='warning'>Subject suffering from aberrant brain activity. Recommend further scanning.</span>")
|
||||
|
||||
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("<span class='notice'>Blood Level Normal: [blood_percent]% [blood_volume]cl. Type: [blood_type]</span>")
|
||||
user.show_message("<span class='notice'>Subject's pulse: <font color='[H.pulse == PULSE_THREADY || H.pulse == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font></span>")
|
||||
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
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
user.drop_from_inventory(W,src)
|
||||
src.cell = W
|
||||
user << "<span class='notice'>You insert the cell!</span>"
|
||||
if(iscoil(W))
|
||||
if(W.iscoil())
|
||||
if(src.wires)
|
||||
user << "<span class='warning'>You have already inserted wire!</span>"
|
||||
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 << "<span class='notice'>You disable the lawing circuits on \the [src].</span>"
|
||||
law_manager = FALSE
|
||||
|
||||
@@ -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()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user