diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm index ff1089e6f8..5e2bbce6da 100644 --- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm +++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm @@ -89,7 +89,7 @@ return 1 /obj/machinery/atmospherics/binary/circulator/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) playsound(src, W.usesound, 75, 1) anchored = !anchored user.visible_message("[user.name] [anchored ? "secures" : "unsecures"] the bolts holding [src.name] to the floor.", \ diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm index c08c82f6b9..2894022b96 100644 --- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm +++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm @@ -243,7 +243,7 @@ return /obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!istype(W, /obj/item/weapon/wrench)) + if (!W.is_wrench()) return ..() if (unlocked) to_chat(user, "You cannot unwrench \the [src], turn it off first.") diff --git a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm index a7127a4dc6..d26422c309 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm @@ -84,7 +84,7 @@ overlays += image('icons/obj/pipeturbine.dmi', "hi-turb") attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) anchored = !anchored playsound(src, W.usesound, 50, 1) to_chat(user, "You [anchored ? "secure" : "unsecure"] the bolts holding \the [src] to the floor.") @@ -259,7 +259,7 @@ attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) anchored = !anchored playsound(src, W.usesound, 50, 1) turbine = null diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index a89b1c5659..ead0b9e59b 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -222,7 +222,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 (!istype(W, /obj/item/weapon/wrench)) + if (!W.is_wrench()) return ..() if (!(stat & NOPOWER) && use_power) to_chat(user, "You cannot unwrench this [src], turn it off first.") diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm index e7ec93852d..1a82bab1e2 100644 --- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm +++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm @@ -80,7 +80,7 @@ update_icon() /obj/machinery/atmospherics/omni/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if(!istype(W, /obj/item/weapon/wrench)) + if(!W.is_wrench()) return ..() if(!can_unwrench()) diff --git a/code/ATMOSPHERICS/components/portables_connector.dm b/code/ATMOSPHERICS/components/portables_connector.dm index 7dca3f52d4..b30bc9b038 100644 --- a/code/ATMOSPHERICS/components/portables_connector.dm +++ b/code/ATMOSPHERICS/components/portables_connector.dm @@ -133,7 +133,7 @@ /obj/machinery/atmospherics/portables_connector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!istype(W, /obj/item/weapon/wrench)) + if (!W.is_wrench()) return ..() if (connected_device) to_chat(user, "You cannot unwrench \the [src], dettach \the [connected_device] first.") diff --git a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm index 0a68f74c71..394dbceeda 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm @@ -52,7 +52,7 @@ update_icon() /obj/machinery/atmospherics/trinary/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!istype(W, /obj/item/weapon/wrench)) + if (!W.is_wrench()) return ..() if(!can_unwrench()) to_chat(user, "You cannot unwrench \the [src], it too exerted due to internal pressure.") diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm index b65c615174..cfc990c6e5 100644 --- a/code/ATMOSPHERICS/components/tvalve.dm +++ b/code/ATMOSPHERICS/components/tvalve.dm @@ -327,7 +327,7 @@ go_to_side() /obj/machinery/atmospherics/tvalve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!istype(W, /obj/item/weapon/wrench)) + if (!W.is_wrench()) return ..() if (istype(src, /obj/machinery/atmospherics/tvalve/digital)) to_chat(user, "You cannot unwrench \the [src], it's too complicated.") diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm index b211f57f39..4cf046ebb9 100644 --- a/code/ATMOSPHERICS/components/unary/cold_sink.dm +++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm @@ -180,4 +180,4 @@ /obj/machinery/atmospherics/unary/freezer/examine(mob/user) ..(user) if(panel_open) - user << "The maintenance hatch is open." + to_chat(user, "The maintenance hatch is open.") diff --git a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm index ed4010f81e..2295f70378 100644 --- a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm +++ b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm @@ -67,7 +67,7 @@ return 1 attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!istype(W, /obj/item/weapon/wrench)) + if (!W.is_wrench()) return ..() var/turf/T = src.loc if (level==1 && isturf(T) && !T.is_plating()) diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm index 45a9962e06..5a0a93b207 100644 --- a/code/ATMOSPHERICS/components/unary/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary/heat_source.dm @@ -167,4 +167,4 @@ /obj/machinery/atmospherics/unary/heater/examine(mob/user) ..(user) if(panel_open) - user << "The maintenance hatch is open." + to_chat(user, "The maintenance hatch is open.") diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index 054507b4e1..9dc95b0385 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -391,7 +391,7 @@ update_icon() /obj/machinery/atmospherics/unary/vent_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!istype(W, /obj/item/weapon/wrench)) + if (!W.is_wrench()) return ..() if (!(stat & NOPOWER) && use_power) to_chat(user, "You cannot unwrench \the [src], turn it off first.") diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index 09b5fde7c1..d7e7377a26 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -264,7 +264,7 @@ update_icon() /obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!istype(W, /obj/item/weapon/wrench)) + if (!W.is_wrench()) return ..() if (!(stat & NOPOWER) && use_power) to_chat(user, "You cannot unwrench \the [src], turn it off first.") diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm index 93e5da7c32..f385ae5ed6 100644 --- a/code/ATMOSPHERICS/components/valve.dm +++ b/code/ATMOSPHERICS/components/valve.dm @@ -288,7 +288,7 @@ open() /obj/machinery/atmospherics/valve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if (!istype(W, /obj/item/weapon/wrench)) + if (!W.is_wrench()) return ..() if (istype(src, /obj/machinery/atmospherics/valve/digital) && !src.allowed(user)) to_chat(user, "Access denied.") diff --git a/code/ATMOSPHERICS/pipes/pipe_base.dm b/code/ATMOSPHERICS/pipes/pipe_base.dm index 19b05e8b71..9d0667f79e 100644 --- a/code/ATMOSPHERICS/pipes/pipe_base.dm +++ b/code/ATMOSPHERICS/pipes/pipe_base.dm @@ -89,7 +89,7 @@ if(istype(W,/obj/item/device/pipe_painter)) return 0 - if (!istype(W, /obj/item/weapon/wrench)) + if (!W.is_wrench()) return ..() var/turf/T = src.loc if (level==1 && isturf(T) && !T.is_plating()) diff --git a/code/__defines/_planes+layers.dm b/code/__defines/_planes+layers.dm index 7ceec89af2..e37bef86d4 100644 --- a/code/__defines/_planes+layers.dm +++ b/code/__defines/_planes+layers.dm @@ -76,6 +76,7 @@ What is the naming convention for planes or layers? #define ABOVE_JUNK_LAYER 3.1 // Things that want to be slightly above common objects #define DOOR_CLOSED_LAYER 3.1 // Doors when closed #define WINDOW_LAYER 3.2 // Windows + #define ABOVE_WINDOW_LAYER 3.25 //Above full tile windows so wall items are clickable #define ON_WINDOW_LAYER 3.3 // Ontop of a window // Mob planes diff --git a/code/__defines/holomap.dm b/code/__defines/holomap.dm new file mode 100644 index 0000000000..0b93e03ae0 --- /dev/null +++ b/code/__defines/holomap.dm @@ -0,0 +1,52 @@ +// +// Constants and standard colors for the holomap +// + +#define WORLD_ICON_SIZE 32 // Size of a standard tile in pixels (world.icon_size) +#define PIXEL_MULTIPLIER WORLD_ICON_SIZE/32 // Convert from normal icon size of 32 to whatever insane thing this server is using. +#define HOLOMAP_ICON 'icons/480x480.dmi' // Icon file to start with when drawing holomaps (to get a 480x480 canvas). +#define HOLOMAP_ICON_SIZE 480 // Pixel width & height of the holomap icon. Used for auto-centering etc. +#define ui_holomap "CENTER-7, CENTER-7" // Screen location of the holomap "hud" + +// Holomap colors +#define HOLOMAP_OBSTACLE "#FFFFFFDD" // Color of walls and barriers +#define HOLOMAP_PATH "#66666699" // Color of floors +#define HOLOMAP_ROCK "#66666644" // Color of mineral walls +#define HOLOMAP_HOLOFIER "#79FF79" // Whole map is multiplied by this to give it a green holoish look + +#define HOLOMAP_AREACOLOR_COMMAND "#0000F099" +#define HOLOMAP_AREACOLOR_SECURITY "#AE121299" +#define HOLOMAP_AREACOLOR_MEDICAL "#447FC299" +#define HOLOMAP_AREACOLOR_SCIENCE "#A154A699" +#define HOLOMAP_AREACOLOR_ENGINEERING "#F1C23199" +#define HOLOMAP_AREACOLOR_CARGO "#E06F0099" +#define HOLOMAP_AREACOLOR_HALLWAYS "#FFFFFF66" +#define HOLOMAP_AREACOLOR_ARRIVALS "#0000FFCC" +#define HOLOMAP_AREACOLOR_ESCAPE "#FF0000CC" +#define HOLOMAP_AREACOLOR_DORMS "#CCCC0099" + +#define LIST_NUMERIC_SET(L, I, V) if(!L) { L = list(); } if (L.len < I) { L.len = I; } L[I] = V + +// Handy defines to lookup the pixel offsets for this Z-level. Cache these if you use them in a loop tho. +#define HOLOMAP_PIXEL_OFFSET_X(zLevel) ((using_map.holomap_offset_x.len >= zLevel) ? using_map.holomap_offset_x[zLevel] : 0) +#define HOLOMAP_PIXEL_OFFSET_Y(zLevel) ((using_map.holomap_offset_y.len >= zLevel) ? using_map.holomap_offset_y[zLevel] : 0) +#define HOLOMAP_LEGEND_X(zLevel) ((using_map.holomap_legend_x.len >= zLevel) ? using_map.holomap_legend_x[zLevel] : 96) +#define HOLOMAP_LEGEND_Y(zLevel) ((using_map.holomap_legend_y.len >= zLevel) ? using_map.holomap_legend_y[zLevel] : 96) + +// VG stuff we probably won't use +// #define HOLOMAP_FILTER_DEATHSQUAD 1 +// #define HOLOMAP_FILTER_ERT 2 +// #define HOLOMAP_FILTER_NUKEOPS 4 +// #define HOLOMAP_FILTER_ELITESYNDICATE 8 +// #define HOLOMAP_FILTER_VOX 16 +// #define HOLOMAP_FILTER_STATIONMAP 32 +// #define HOLOMAP_FILTER_STATIONMAP_STRATEGIC 64//features markers over the captain's office, the armory, the SMES + +// #define HOLOMAP_MARKER_SMES "smes" +// #define HOLOMAP_MARKER_DISK "diskspawn" +// #define HOLOMAP_MARKER_SKIPJACK "skipjack" +// #define HOLOMAP_MARKER_SYNDISHUTTLE "syndishuttle" + +#define HOLOMAP_EXTRA_STATIONMAP "stationmapformatted" +#define HOLOMAP_EXTRA_STATIONMAPAREAS "stationareas" +#define HOLOMAP_EXTRA_STATIONMAPSMALL "stationmapsmall" \ No newline at end of file diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index fc73559454..df433e7f47 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -281,3 +281,9 @@ var/global/list/##LIST_NAME = list();\ #define MATRIX_Achromatomaly list(0.62, 0.32, 0.06, 0.16, 0.78, 0.06, 0.16, 0.32, 0.52) #define MATRIX_Vulp_Colorblind list(0.50, 0.40, 0.10, 0.50, 0.40, 0.10, 0, 0.20, 0.80) #define MATRIX_Taj_Colorblind list(0.40, 0.20, 0.40, 0.40, 0.60, 0, 0.20, 0.20, 0.60) + +// Tool substitution defines +#define IS_SCREWDRIVER "screwdriver" +#define IS_CROWBAR "crowbar" +#define IS_WIRECUTTER "wirecutter" +#define IS_WRENCH "wrench" \ No newline at end of file diff --git a/code/__defines/planets.dm b/code/__defines/planets.dm index 98b10b328a..3c2a1abcfc 100644 --- a/code/__defines/planets.dm +++ b/code/__defines/planets.dm @@ -10,5 +10,16 @@ #define WEATHER_HOT "hot" #define WEATHER_BLOOD_MOON "blood moon" // For admin fun or cult later on. +#define MOON_PHASE_NEW_MOON "new moon" +#define MOON_PHASE_WAXING_CRESCENT "waxing crescent" +#define MOON_PHASE_FIRST_QUARTER "first quarter" +#define MOON_PHASE_WAXING_GIBBOUS "waxing gibbous" +#define MOON_PHASE_FULL_MOON "full moon" // ware-shantaks sold seperately. +#define MOON_PHASE_WANING_GIBBOUS "waning gibbous" +#define MOON_PHASE_LAST_QUARTER "last quarter" +#define MOON_PHASE_WANING_CRESCENT "waning crescent" + #define PLANET_PROCESS_SUN 0x1 -#define PLANET_PROCESS_TEMP 0x2 \ No newline at end of file +#define PLANET_PROCESS_TEMP 0x2 + +#define PLANET_TIME_MODIFIER 1 // If you want planet time to go faster than realtime, increase this number. \ No newline at end of file diff --git a/code/__defines/sound.dm b/code/__defines/sound.dm index 6fae2fadcb..0995f0e071 100644 --- a/code/__defines/sound.dm +++ b/code/__defines/sound.dm @@ -4,7 +4,7 @@ #define CHANNEL_VOX 1022 #define CHANNEL_JUKEBOX 1021 #define CHANNEL_HEARTBEAT 1020 //sound channel for heartbeats -#define CHANNEL_AMBIENCE_FORCED 1019 +#define CHANNEL_AMBIENCE_FORCED 1019 #define CHANNEL_AMBIENCE 1018 #define CHANNEL_BUZZ 1017 #define CHANNEL_BICYCLE 1016 @@ -54,3 +54,125 @@ #define SMALL_SOFTFLOOR ROOM #define ASTEROID CAVE #define SPACE UNDERWATER + +// Ambience presets. +// All you need to do to make an area play one of these is set their ambience var to one of these lists. +// You can even combine them by adding them together, since they're just lists, however you'd have to do that in initialization. + +// For weird alien places like the crashed UFO. +#define AMBIENCE_OTHERWORLDLY list(\ + 'sound/ambience/otherworldly/otherworldly1.ogg',\ + 'sound/ambience/otherworldly/otherworldly2.ogg',\ + 'sound/ambience/otherworldly/otherworldly3.ogg'\ + ) + +// Restricted, military, or mercenary aligned locations like the armory, the merc ship/base, BSD, etc. +#define AMBIENCE_HIGHSEC list(\ + 'sound/ambience/highsec/highsec1.ogg',\ + 'sound/ambience/highsec/highsec2.ogg'\ + ) + +// Ruined structures found on the surface or in the caves. +#define AMBIENCE_RUINS list(\ + 'sound/ambience/ruins/ruins1.ogg',\ + 'sound/ambience/ruins/ruins2.ogg',\ + 'sound/ambience/ruins/ruins3.ogg',\ + 'sound/ambience/ruins/ruins4.ogg',\ + 'sound/ambience/ruins/ruins5.ogg',\ + 'sound/ambience/ruins/ruins6.ogg'\ + ) + +// Similar to the above, but for more technology/signaling based ruins. +#define AMBIENCE_TECH_RUINS list(\ + 'sound/ambience/tech_ruins/tech_ruins1.ogg',\ + 'sound/ambience/tech_ruins/tech_ruins2.ogg',\ + 'sound/ambience/tech_ruins/tech_ruins3.ogg'\ + ) + +// The actual chapel room, and maybe some other places of worship. +#define AMBIENCE_CHAPEL list(\ + 'sound/ambience/chapel/chapel1.ogg',\ + 'sound/ambience/chapel/chapel2.ogg',\ + 'sound/ambience/chapel/chapel3.ogg',\ + 'sound/ambience/chapel/chapel4.ogg'\ + ) + +// For peaceful, serene areas, distinct from the Chapel. +#define AMBIENCE_HOLY list(\ + 'sound/ambience/holy/holy1.ogg',\ + 'sound/ambience/holy/holy2.ogg'\ + ) + +// Generic sounds for less special rooms. +#define AMBIENCE_GENERIC list(\ + 'sound/ambience/generic/generic1.ogg',\ + 'sound/ambience/generic/generic2.ogg',\ + 'sound/ambience/generic/generic3.ogg',\ + 'sound/ambience/generic/generic4.ogg'\ + ) + +// Sounds of PA announcements, presumably involving shuttles? +#define AMBIENCE_ARRIVALS list(\ + 'sound/ambience/arrivals/arrivals1.ogg',\ + 'sound/ambience/arrivals/arrivals2.ogg'\ + ) + +// Sounds suitable for being inside dark, tight corridors in the underbelly of the station. +#define AMBIENCE_MAINTENANCE list(\ + 'sound/ambience/maintenance/maintenance1.ogg',\ + 'sound/ambience/maintenance/maintenance2.ogg',\ + 'sound/ambience/maintenance/maintenance3.ogg',\ + 'sound/ambience/maintenance/maintenance4.ogg',\ + 'sound/ambience/maintenance/maintenance5.ogg',\ + 'sound/ambience/maintenance/maintenance6.ogg'\ + ) + +// Life support machinery at work, keeping everyone breathing. +#define AMBIENCE_ENGINEERING list(\ + 'sound/ambience/engineering/engineering1.ogg',\ + 'sound/ambience/engineering/engineering2.ogg',\ + 'sound/ambience/engineering/engineering3.ogg'\ + ) + +// Creepy AI/borg stuff. +#define AMBIENCE_AI list(\ + 'sound/ambience/ai/ai1.ogg'\ + ) + +// Peaceful sounds when floating in the void. +#define AMBIENCE_SPACE list(\ + 'sound/ambience/space/space_serithi.ogg',\ + 'sound/ambience/space/space1.ogg'\ + ) + +// Vaguely spooky sounds when around dead things. +#define AMBIENCE_GHOSTLY list(\ + 'sound/ambience/ghostly/ghostly1.ogg',\ + 'sound/ambience/ghostly/ghostly2.ogg'\ + ) + +// Concerning sounds, for when one discovers something horrible happened in a PoI. +#define AMBIENCE_FOREBODING list(\ + 'sound/ambience/foreboding/foreboding1.ogg',\ + 'sound/ambience/foreboding/foreboding2.ogg'\ + ) + +// Ambience heard when aboveground on Sif and not in a Point of Interest. +#define AMBIENCE_SIF list(\ + 'sound/ambience/sif/sif1.ogg'\ + ) + +// If we ever add geothermal PoIs or other places that are really hot, this will do. +#define AMBIENCE_LAVA list(\ + 'sound/ambience/lava/lava1.ogg'\ + ) + +// Cult-y ambience, for some PoIs, and maybe when the cultists darken the world with the ritual. +#define AMBIENCE_UNHOLY list(\ + 'sound/ambience/unholy/unholy1.ogg'\ + ) + +// For the memes. +#define AMBIENCE_AESTHETIC list(\ + 'sound/ambience/vaporwave.ogg'\ + ) \ No newline at end of file diff --git a/code/__defines/subsystems.dm b/code/__defines/subsystems.dm index 44137b0431..c76bb80440 100644 --- a/code/__defines/subsystems.dm +++ b/code/__defines/subsystems.dm @@ -31,9 +31,10 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G #define INIT_ORDER_LIGHTING 0 #define INIT_ORDER_AIR -1 #define INIT_ORDER_PLANETS -4 +#define INIT_ORDER_HOLOMAPS -5 #define INIT_ORDER_OVERLAY -6 #define INIT_ORDER_XENOARCH -20 - + // Subsystem fire priority, from lowest to highest priority // If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child) diff --git a/code/__defines/supply.dm b/code/__defines/supply.dm new file mode 100644 index 0000000000..81b32d703d --- /dev/null +++ b/code/__defines/supply.dm @@ -0,0 +1,19 @@ +// Supply shuttle status defines +#define SUP_SHUTTLE_ERROR -1 // Error state +#define SUP_SHUTTLE_DOCKED 0 +#define SUP_SHUTTLE_UNDOCKED 1 +#define SUP_SHUTTLE_DOCKING 2 +#define SUP_SHUTTLE_UNDOCKING 3 +#define SUP_SHUTTLE_TRANSIT 4 +#define SUP_SHUTTLE_AWAY 5 + +// Supply computer access levels +#define SUP_SEND_SHUTTLE 0x1 // Send the shuttle back and forth +#define SUP_ACCEPT_ORDERS 0x2 // Accept orders +#define SUP_CONTRABAND 0x4 // Able to order contraband supply packs + +// Supply_order status values +#define SUP_ORDER_REQUESTED "Requested" +#define SUP_ORDER_APPROVED "Approved" +#define SUP_ORDER_DENIED "Denied" +#define SUP_ORDER_SHIPPED "Shipped" \ No newline at end of file diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 468d91445f..5b2cd11bd7 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -1054,62 +1054,21 @@ proc/get_mob_with_client_list() //Quick type checks for some tools var/global/list/common_tools = list( /obj/item/stack/cable_coil, -/obj/item/weapon/wrench, +/obj/item/weapon/tool/wrench, /obj/item/weapon/weldingtool, -/obj/item/weapon/screwdriver, -/obj/item/weapon/wirecutters, +/obj/item/weapon/tool/screwdriver, +/obj/item/weapon/tool/wirecutters, /obj/item/device/multitool, -/obj/item/weapon/crowbar) +/obj/item/weapon/tool/crowbar) /proc/istool(O) if(O && is_type_in_list(O, common_tools)) return 1 return 0 -/proc/iswrench(O) - if(istype(O, /obj/item/weapon/wrench)) - return 1 - return 0 - -/proc/iswelder(O) - if(istype(O, /obj/item/weapon/weldingtool)) - return 1 - return 0 - -/proc/iscoil(O) - if(istype(O, /obj/item/stack/cable_coil)) - return 1 - return 0 - -/proc/iswirecutter(O) - if(istype(O, /obj/item/weapon/wirecutters)) - return 1 - return 0 - -/proc/isscrewdriver(O) - if(istype(O, /obj/item/weapon/screwdriver)) - return 1 - return 0 - -/proc/ismultitool(O) - if(istype(O, /obj/item/device/multitool)) - return 1 - return 0 - -/proc/iscrowbar(O) - if(istype(O, /obj/item/weapon/crowbar)) - return 1 - return 0 - -/proc/iswire(O) - if(istype(O, /obj/item/stack/cable_coil)) - return 1 - return 0 /proc/is_wire_tool(obj/item/I) - if(istype(I, /obj/item/device/multitool)) - return TRUE - if(istype(I, /obj/item/weapon/wirecutters)) + if(istype(I, /obj/item/device/multitool) || I.is_wirecutter()) return TRUE if(istype(I, /obj/item/device/assembly/signaler)) return TRUE @@ -1149,24 +1108,30 @@ proc/is_hot(obj/item/W as obj) //Whether or not the given item counts as sharp in terms of dealing damage /proc/is_sharp(obj/O as obj) - if (!O) return 0 - if (O.sharp) return 1 - if (O.edge) return 1 - return 0 + if(!O) + return FALSE + if(O.sharp) + return TRUE + if(O.edge) + return TRUE + return FALSE //Whether or not the given item counts as cutting with an edge in terms of removing limbs /proc/has_edge(obj/O as obj) - if (!O) return 0 - if (O.edge) return 1 - return 0 + if(!O) + return FALSE + if(O.edge) + return TRUE + return FALSE //Returns 1 if the given item is capable of popping things like balloons, inflatable barriers, or cutting police tape. /proc/can_puncture(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT? - if(!W) return 0 - if(W.sharp) return 1 + if(!W) + return FALSE + if(W.sharp) + return TRUE return ( \ - W.sharp || \ - istype(W, /obj/item/weapon/screwdriver) || \ + W.is_screwdriver() || \ istype(W, /obj/item/weapon/pen) || \ istype(W, /obj/item/weapon/weldingtool) || \ istype(W, /obj/item/weapon/flame/lighter/zippo) || \ @@ -1462,12 +1427,3 @@ var/mob/dview/dview_mob = new return "Northwest" if(337.5) return "North-Northwest" - - - - - - - - - diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index c63519c40f..b5a4e68d6f 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -14,7 +14,8 @@ var/list/global_huds = list( global_hud.thermal, global_hud.meson, global_hud.science, - global_hud.material + global_hud.material, + global_hud.holomap ) /datum/hud/var/obj/screen/grab_intent @@ -35,6 +36,7 @@ var/list/global_huds = list( var/obj/screen/meson var/obj/screen/science var/obj/screen/material + var/obj/screen/holomap /datum/global_hud/proc/setup_overlay(var/icon_state) var/obj/screen/screen = new /obj/screen() @@ -84,6 +86,18 @@ var/list/global_huds = list( science = setup_overlay("science_hud") material = setup_overlay("material_hud") + // The holomap screen object is actually totally invisible. + // Station maps work by setting it as an images location before sending to client, not + // actually changing the icon or icon state of the screen object itself! + // Why do they work this way? I don't know really, that is how /vg designed them, but since they DO + // work this way, we can take advantage of their immutability by making them part of + // the global_hud (something we have and /vg doesn't) instead of an instance per mob. + holomap = new /obj/screen() + holomap.name = "holomap" + holomap.icon = null + holomap.screen_loc = ui_holomap + holomap.mouse_opacity = 0 + var/obj/screen/O var/i //that nasty looking dither you get when you're short-sighted diff --git a/code/controllers/Processes/supply.dm b/code/controllers/Processes/supply.dm index 5b3e4f6f2b..139f0923d1 100644 --- a/code/controllers/Processes/supply.dm +++ b/code/controllers/Processes/supply.dm @@ -8,15 +8,22 @@ //Computers are in /code/game/machinery/computer/supply.dm /datum/supply_order - var/ordernum - var/datum/supply_packs/object = null - var/orderedby = null - var/comment = null + var/ordernum // Unfabricatable index + var/index // Fabricatable index + var/datum/supply_pack/object = null + var/cost // Cost of the supply pack (Fabricatable) (Changes not reflected when purchasing supply packs, this is cosmetic only) + var/name // Name of the supply pack datum (Fabricatable) + var/ordered_by = null // Who requested the order + var/comment = null // What reason was given for the order + var/approved_by = null // Who approved the order + var/ordered_at // Date and time the order was requested at + var/approved_at // Date and time the order was approved at + var/status // [Requested, Accepted, Denied, Shipped] /datum/exported_crate var/name var/value - + var/list/contents var/datum/controller/supply/supply_controller = new() @@ -25,25 +32,30 @@ var/datum/controller/supply/supply_controller = new() var/points = 50 var/points_per_process = 1.5 var/points_per_slip = 2 - var/points_per_platinum = 5 // 5 points per sheet - var/points_per_phoron = 5 var/points_per_money = 0.02 // 1 point for $50 //control var/ordernum - var/list/shoppinglist = list() - var/list/requestlist = list() - var/list/supply_packs = list() - var/list/exported_crates = list() + var/list/shoppinglist = list() // Approved orders + var/list/supply_pack = list() // All supply packs + var/list/exported_crates = list() // Crates sent from the station + var/list/order_history = list() // History of orders, showing edits made by users + var/list/adm_order_history = list() // Complete history of all orders, for admin use + var/list/adm_export_history = list() // Complete history of all crates sent back on the shuttle, for admin use //shuttle movement var/movetime = 1200 var/datum/shuttle/ferry/supply/shuttle + var/list/material_points_conversion = list( // Any materials not named in this list are worth 0 points + "phoron" = 5, + "platinum" = 5 + ) + /datum/controller/supply/New() ordernum = rand(1,9000) - for(var/typepath in (typesof(/datum/supply_packs) - /datum/supply_packs)) - var/datum/supply_packs/P = new typepath() - supply_packs[P.name] = P + for(var/typepath in subtypesof(/datum/supply_pack)) + var/datum/supply_pack/P = new typepath() + supply_pack[P.name] = P /datum/controller/process/supply/setup() name = "supply controller" @@ -80,23 +92,17 @@ var/datum/controller/supply/supply_controller = new() callHook("sell_shuttle", list(area_shuttle)); - var/phoron_count = 0 - var/plat_count = 0 - var/money_count = 0 - - exported_crates = list() - for(var/atom/movable/MA in area_shuttle) if(MA.anchored) continue + var/datum/exported_crate/EC = new /datum/exported_crate() + EC.name = "\proper[MA.name]" + EC.value = 0 + EC.contents = list() + // Must be in a crate! if(istype(MA,/obj/structure/closet/crate)) - var/oldpoints = points - var/oldphoron = phoron_count - var/oldplatinum = plat_count - var/oldmoney = money_count - var/obj/structure/closet/crate/CR = MA callHook("sell_crate", list(CR, area_shuttle)) @@ -104,44 +110,64 @@ var/datum/controller/supply/supply_controller = new() var/find_slip = 1 for(var/atom/A in CR) + EC.contents[++EC.contents.len] = list( + "object" = "\proper[A.name]", + "value" = 0, + "quantity" = 1 + ) + // Sell manifests if(find_slip && istype(A,/obj/item/weapon/paper/manifest)) var/obj/item/weapon/paper/manifest/slip = A if(!slip.is_copy && slip.stamped && slip.stamped.len) //yes, the clown stamp will work. clown is the highest authority on the station, it makes sense points += points_per_slip + EC.contents[EC.contents.len]["value"] = points_per_slip find_slip = 0 continue // Sell phoron and platinum if(istype(A, /obj/item/stack)) var/obj/item/stack/P = A - switch(P.get_material_name()) - if("phoron") - phoron_count += P.get_amount() - if("platinum") - plat_count += P.get_amount() + if(material_points_conversion[P.get_material_name()]) + EC.contents[EC.contents.len]["value"] = P.get_amount() * material_points_conversion[P.get_material_name()] + EC.contents[EC.contents.len]["quantity"] = P.get_amount() + EC.value += EC.contents[EC.contents.len]["value"] + //Sell spacebucks if(istype(A, /obj/item/weapon/spacecash)) var/obj/item/weapon/spacecash/cashmoney = A - money_count += cashmoney.worth + EC.contents[EC.contents.len]["value"] = cashmoney.worth * points_per_money + EC.contents[EC.contents.len]["quantity"] = cashmoney.worth + EC.value += EC.contents[EC.contents.len]["value"] - var/datum/exported_crate/EC = new /datum/exported_crate() - EC.name = CR.name - EC.value = points - oldpoints - EC.value += (phoron_count - oldphoron) * points_per_phoron - EC.value += (plat_count - oldplatinum) * points_per_platinum - EC.value += (money_count - oldmoney) * points_per_money - exported_crates += EC + + + // Make a log of it, but it wasn't shipped properly, and so isn't worth anything + else + EC.contents = list( + "error" = "Error: Product was improperly packaged. Payment rendered null under terms of agreement." + ) + + exported_crates += EC + points += EC.value + + // Duplicate the receipt for the admin-side log + var/datum/exported_crate/adm = new() + adm.name = EC.name + adm.value = EC.value + adm.contents = deepCopyList(EC.contents) + adm_export_history += adm qdel(MA) - points += phoron_count * points_per_phoron - points += plat_count * points_per_platinum - points += money_count * points_per_money - //Buying /datum/controller/supply/proc/buy() + var/list/shoppinglist = list() + for(var/datum/supply_order/SO in order_history) + if(SO.status == SUP_ORDER_APPROVED) + shoppinglist += SO + if(!shoppinglist.len) return @@ -165,17 +191,16 @@ var/datum/controller/supply/supply_controller = new() continue clear_turfs += T - for(var/S in shoppinglist) + for(var/datum/supply_order/SO in shoppinglist) if(!clear_turfs.len) break var/i = rand(1,clear_turfs.len) var/turf/pickedloc = clear_turfs[i] clear_turfs.Cut(i,i+1) - shoppinglist -= S - var/datum/supply_order/SO = S - var/datum/supply_packs/SP = SO.object + SO.status = SUP_ORDER_SHIPPED + var/datum/supply_pack/SP = SO.object var/obj/A = new SP.containertype(pickedloc) A.name = "[SP.containername] [SO.comment ? "([SO.comment])":"" ]" @@ -202,8 +227,8 @@ var/datum/controller/supply/supply_controller = new() log_debug("Supply pack with invalid access restriction [SP.access] encountered!") var/list/contains - if(istype(SP,/datum/supply_packs/randomised)) - var/datum/supply_packs/randomised/SPR = SP + if(istype(SP,/datum/supply_pack/randomised)) + var/datum/supply_pack/randomised/SPR = SP contains = list() if(SPR.contains.len) for(var/j=1,j<=SPR.num_contained,j++) @@ -227,3 +252,141 @@ var/datum/controller/supply/supply_controller = new() slip.info += "CHECK CONTENTS AND STAMP BELOW THE LINE TO CONFIRM RECEIPT OF GOODS
" return + +// Will attempt to purchase the specified order, returning TRUE on success, FALSE on failure +/datum/controller/supply/proc/approve_order(var/datum/supply_order/O, var/mob/user) + // Not enough points to purchase the crate + if(supply_controller.points <= O.object.cost) + return FALSE + + // Based on the current model, there shouldn't be any entries in order_history, requestlist, or shoppinglist, that aren't matched in adm_order_history + var/datum/supply_order/adm_order + for(var/datum/supply_order/temp in adm_order_history) + if(temp.ordernum == O.ordernum) + adm_order = temp + break + + var/idname = "*None Provided*" + if(ishuman(user)) + var/mob/living/carbon/human/H = user + idname = H.get_authentification_name() + else if(issilicon(user)) + idname = user.real_name + + // Update order status + O.status = SUP_ORDER_APPROVED + O.approved_by = idname + O.approved_at = stationdate2text() + " - " + stationtime2text() + // Update admin-side mirror + adm_order.status = SUP_ORDER_APPROVED + adm_order.approved_by = idname + adm_order.approved_at = stationdate2text() + " - " + stationtime2text() + + // Deduct cost + supply_controller.points -= O.object.cost + return TRUE + +// Will deny the specified order. Only useful if the order is currently requested, but available at any status +/datum/controller/supply/proc/deny_order(var/datum/supply_order/O, var/mob/user) + // Based on the current model, there shouldn't be any entries in order_history, requestlist, or shoppinglist, that aren't matched in adm_order_history + var/datum/supply_order/adm_order + for(var/datum/supply_order/temp in adm_order_history) + if(temp.ordernum == O.ordernum) + adm_order = temp + break + + var/idname = "*None Provided*" + if(ishuman(user)) + var/mob/living/carbon/human/H = user + idname = H.get_authentification_name() + else if(issilicon(user)) + idname = user.real_name + + // Update order status + O.status = SUP_ORDER_DENIED + O.approved_by = idname + O.approved_at = stationdate2text() + " - " + stationtime2text() + // Update admin-side mirror + adm_order.status = SUP_ORDER_DENIED + adm_order.approved_by = idname + adm_order.approved_at = stationdate2text() + " - " + stationtime2text() + return + +// Will deny all requested orders +/datum/controller/supply/proc/deny_all_pending(var/mob/user) + for(var/datum/supply_order/O in order_history) + if(O.status == SUP_ORDER_REQUESTED) + deny_order(O, user) + +// Will delete the specified order from the user-side list +/datum/controller/supply/proc/delete_order(var/datum/supply_order/O, var/mob/user) + // Making sure they know what they're doing + if(alert(user, "Are you sure you want to delete this record? If it has been approved, cargo points will NOT be refunded!", "Delete Record","No","Yes") == "Yes") + if(alert(user, "Are you really sure? There is no way to recover the order once deleted.", "Delete Record", "No", "Yes") == "Yes") + log_admin("[key_name(user)] has deleted supply order \ref[O] [O] from the user-side order history.") + supply_controller.order_history -= O + return + +// Will generate a new, requested order, for the given supply pack type +/datum/controller/supply/proc/create_order(var/datum/supply_pack/S, var/mob/user, var/reason) + var/datum/supply_order/new_order = new() + var/datum/supply_order/adm_order = new() // Admin-recorded order must be a separate copy in memory, or user-made edits will corrupt it + + var/idname = "*None Provided*" + if(ishuman(user)) + var/mob/living/carbon/human/H = user + idname = H.get_authentification_name() + else if(issilicon(user)) + idname = user.real_name + + new_order.ordernum = ++ordernum // Ordernum is used to track the order between the playerside list of orders and the adminside list + new_order.index = new_order.ordernum // Index can be fabricated, or falsified. Ordernum is a permanent marker used to track the order + new_order.object = S + new_order.name = S.name + new_order.cost = S.cost + new_order.ordered_by = idname + new_order.comment = reason + new_order.ordered_at = stationdate2text() + " - " + stationtime2text() + new_order.status = SUP_ORDER_REQUESTED + + adm_order.ordernum = new_order.ordernum + adm_order.index = new_order.index + adm_order.object = new_order.object + adm_order.name = new_order.name + adm_order.cost = new_order.cost + adm_order.ordered_by = new_order.ordered_by + adm_order.comment = new_order.comment + adm_order.ordered_at = new_order.ordered_at + adm_order.status = new_order.status + + order_history += new_order + adm_order_history += adm_order + +// Will delete the specified export receipt from the user-side list +/datum/controller/supply/proc/delete_export(var/datum/exported_crate/E, var/mob/user) + // Making sure they know what they're doing + if(alert(user, "Are you sure you want to delete this record?", "Delete Record","No","Yes") == "Yes") + if(alert(user, "Are you really sure? There is no way to recover the receipt once deleted.", "Delete Record", "No", "Yes") == "Yes") + log_admin("[key_name(user)] has deleted export receipt \ref[E] [E] from the user-side export history.") + supply_controller.exported_crates -= E + return + +// Will add an item entry to the specified export receipt on the user-side list +/datum/controller/supply/proc/add_export_item(var/datum/exported_crate/E, var/mob/user) + var/new_name = input(user, "Name", "Please enter the name of the item.") as null|text + if(!new_name) + return + + var/new_quantity = input(user, "Name", "Please enter the quantity of the item.") as null|num + if(!new_quantity) + return + + var/new_value = input(user, "Name", "Please enter the value of the item.") as null|num + if(!new_value) + return + + E.contents[++E.contents.len] = list( + "object" = new_name, + "quantity" = new_quantity, + "value" = new_value + ) diff --git a/code/controllers/emergency_shuttle_controller.dm b/code/controllers/emergency_shuttle_controller.dm index 3ef7c9486f..05468bee76 100644 --- a/code/controllers/emergency_shuttle_controller.dm +++ b/code/controllers/emergency_shuttle_controller.dm @@ -98,10 +98,10 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle autopilot = 1 set_launch_countdown(get_shuttle_prep_time()) auto_recall_time = rand(world.time + 300, launch_time - 300) - var/estimated_time = round(estimate_arrival_time()/60,1) //reset the shuttle transit time if we need to shuttle.move_time = SHUTTLE_TRANSIT_DURATION + var/estimated_time = round(estimate_arrival_time()/60,1) priority_announcement.Announce(replacetext(replacetext(using_map.shuttle_called_message, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s")) atc.shift_ending() @@ -274,4 +274,4 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle var/obj/effect/bgstar/S = new/obj/effect/bgstar(locate(x,y,z)) S.direction = spawndir spawn() - S.startmove() \ No newline at end of file + S.startmove() diff --git a/code/controllers/subsystems/holomaps.dm b/code/controllers/subsystems/holomaps.dm new file mode 100644 index 0000000000..5fcca27480 --- /dev/null +++ b/code/controllers/subsystems/holomaps.dm @@ -0,0 +1,24 @@ +// +// Holo-Minimaps Generation Subsystem handles initialization of the holo minimaps. +// Look in code/modules/holomap/generate_holomap.dm to find generateHoloMinimaps() +// +SUBSYSTEM_DEF(holomaps) + name = "HoloMiniMaps" + init_order = INIT_ORDER_HOLOMAPS + flags = SS_NO_FIRE + var/static/holomaps_initialized = FALSE + var/static/list/holoMiniMaps = list() + var/static/list/extraMiniMaps = list() + var/static/list/station_holomaps = list() + +/datum/controller/subsystem/holomaps/Recover() + flags |= SS_NO_INIT // Make extra sure we don't initialize twice. + +/datum/controller/subsystem/holomaps/Initialize(timeofday) + generateHoloMinimaps() + . = ..() + +/datum/controller/subsystem/holomaps/stat_entry(msg) + if (!Debug2) + return // Only show up in stat panel if debugging is enabled. + . = ..() diff --git a/code/controllers/subsystems/planets.dm b/code/controllers/subsystems/planets.dm index a163a3b1e7..f7fc49b661 100644 --- a/code/controllers/subsystems/planets.dm +++ b/code/controllers/subsystems/planets.dm @@ -57,6 +57,7 @@ SUBSYSTEM_DEF(planets) else P.planet_walls -= T T.vis_contents -= P.weather_holder.visuals + T.vis_contents -= P.weather_holder.special_visuals /datum/controller/subsystem/planets/proc/allocateTurfs(var/initial = FALSE) var/list/currentlist = new_outdoor_turfs @@ -67,6 +68,7 @@ SUBSYSTEM_DEF(planets) var/datum/planet/P = z_to_planet[OT.z] P.planet_floors |= OT OT.vis_contents |= P.weather_holder.visuals + OT.vis_contents |= P.weather_holder.special_visuals if(!initial && MC_TICK_CHECK) return @@ -85,6 +87,7 @@ SUBSYSTEM_DEF(planets) var/datum/planet/P = z_to_planet[T.z] P.planet_floors -= T T.vis_contents -= P.weather_holder.visuals + T.vis_contents -= P.weather_holder.special_visuals /datum/controller/subsystem/planets/fire(resumed = 0) diff --git a/code/datums/autolathe/tools.dm b/code/datums/autolathe/tools.dm index 70ea299ec8..d0aa2aa196 100644 --- a/code/datums/autolathe/tools.dm +++ b/code/datums/autolathe/tools.dm @@ -1,6 +1,6 @@ /datum/category_item/autolathe/tools/crowbar name = "crowbar" - path =/obj/item/weapon/crowbar + path =/obj/item/weapon/tool/crowbar /datum/category_item/autolathe/tools/multitool name = "multitool" @@ -21,15 +21,15 @@ /datum/category_item/autolathe/tools/screwdriver name = "screwdriver" - path =/obj/item/weapon/screwdriver + path =/obj/item/weapon/tool/screwdriver /datum/category_item/autolathe/tools/wirecutters name = "wirecutters" - path =/obj/item/weapon/wirecutters + path =/obj/item/weapon/tool/wirecutters /datum/category_item/autolathe/tools/wrench name = "wrench" - path =/obj/item/weapon/wrench + path =/obj/item/weapon/tool/wrench /datum/category_item/autolathe/tools/hatchet name = "hatchet" diff --git a/code/datums/helper_datums/construction_datum.dm b/code/datums/helper_datums/construction_datum.dm index 0bda144e8a..e2d3dbdfd4 100644 --- a/code/datums/helper_datums/construction_datum.dm +++ b/code/datums/helper_datums/construction_datum.dm @@ -1,105 +1,152 @@ #define FORWARD -1 #define BACKWARD 1 + +// As of August 4th, 2018, these datums are only used in Mech construction. /datum/construction var/list/steps var/atom/holder var/result var/list/steps_desc - New(atom) - ..() - holder = atom - if(!holder) //don't want this without a holder - spawn - qdel(src) +/datum/construction/New(atom) + ..() + holder = atom + if(!holder) //don't want this without a holder + spawn + qdel(src) + set_desc(steps.len) + return + +/datum/construction/proc/next_step() + steps.len-- + if(!steps.len) + spawn_result() + else set_desc(steps.len) - return + return - proc/next_step() - steps.len-- - if(!steps.len) - spawn_result() - else - set_desc(steps.len) - return +/datum/construction/proc/action(var/obj/item/I,mob/user as mob) + return - proc/action(atom/used_atom,mob/user as mob) - return +/datum/construction/proc/check_step(var/obj/item/I,mob/user as mob) //check last step only + var/valid_step = is_right_key(I) + if(valid_step) + if(custom_action(valid_step, I, user)) + next_step() + return 1 + return 0 - proc/check_step(atom/used_atom,mob/user as mob) //check last step only - var/valid_step = is_right_key(used_atom) - if(valid_step) - if(custom_action(valid_step, used_atom, user)) - next_step() +/datum/construction/proc/is_right_key(var/obj/item/I) // returns current step num if I is of the right type. + var/list/L = steps[steps.len] + switch(L["key"]) + if(IS_SCREWDRIVER) + if(I.is_screwdriver()) + return steps.len + if(IS_CROWBAR) + if(I.is_crowbar()) + return steps.len + if(IS_WIRECUTTER) + if(I.is_wirecutter()) + return steps.len + if(IS_WRENCH) + if(I.is_wrench()) + return steps.len + + if(istype(I, L["key"])) + return steps.len + return 0 + +/datum/construction/proc/custom_action(step, I, user) + return 1 + +/datum/construction/proc/check_all_steps(var/obj/item/I,mob/user as mob) //check all steps, remove matching one. + for(var/i=1;i<=steps.len;i++) + var/list/L = steps[i]; + if(istype(I, L["key"])) + if(custom_action(i, I, user)) + steps[i]=null;//stupid byond list from list removal... + listclearnulls(steps); + if(!steps.len) + spawn_result() return 1 - return 0 - - proc/is_right_key(atom/used_atom) // returns current step num if used_atom is of the right type. - var/list/L = steps[steps.len] - if(istype(used_atom, L["key"])) - return steps.len - return 0 - - proc/custom_action(step, used_atom, user) - return 1 - - proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one. - for(var/i=1;i<=steps.len;i++) - var/list/L = steps[i]; - if(istype(used_atom, L["key"])) - if(custom_action(i, used_atom, user)) - steps[i]=null;//stupid byond list from list removal... - listclearnulls(steps); - if(!steps.len) - spawn_result() - return 1 - return 0 + return 0 - proc/spawn_result() - if(result) - new result(get_turf(holder)) - spawn() - qdel(holder) - return +/datum/construction/proc/spawn_result() + if(result) + new result(get_turf(holder)) + spawn() + qdel(holder) + return - proc/set_desc(index as num) - var/list/step = steps[index] - holder.desc = step["desc"] - return +/datum/construction/proc/set_desc(index as num) + var/list/step = steps[index] + holder.desc = step["desc"] + return + +// Reversible /datum/construction/reversible var/index - New(atom) - ..() - index = steps.len - return +/datum/construction/reversible/New(atom) + ..() + index = steps.len + return - proc/update_index(diff as num) - index+=diff - if(index==0) - spawn_result() - else - set_desc(index) - return +/datum/construction/reversible/proc/update_index(diff as num) + index+=diff + if(index==0) + spawn_result() + else + set_desc(index) + return - is_right_key(atom/used_atom) // returns index step - var/list/L = steps[index] - if(istype(used_atom, L["key"])) - return FORWARD //to the first step -> forward - else if(L["backkey"] && istype(used_atom, L["backkey"])) - return BACKWARD //to the last step -> backwards - return 0 +/datum/construction/reversible/is_right_key(var/obj/item/I) // returns index step + var/list/L = steps[index] - check_step(atom/used_atom,mob/user as mob) - var/diff = is_right_key(used_atom) - if(diff) - if(custom_action(index, diff, used_atom, user)) - update_index(diff) - return 1 - return 0 + switch(L["key"]) + if(IS_SCREWDRIVER) + if(I.is_screwdriver()) + return FORWARD + if(IS_CROWBAR) + if(I.is_crowbar()) + return FORWARD + if(IS_WIRECUTTER) + if(I.is_wirecutter()) + return FORWARD + if(IS_WRENCH) + if(I.is_wrench()) + return FORWARD - custom_action(index, diff, used_atom, user) - return 1 \ No newline at end of file + switch(L["backkey"]) + if(IS_SCREWDRIVER) + if(I.is_screwdriver()) + return BACKWARD + if(IS_CROWBAR) + if(I.is_crowbar()) + return BACKWARD + if(IS_WIRECUTTER) + if(I.is_wirecutter()) + return BACKWARD + if(IS_WRENCH) + if(I.is_wrench()) + return BACKWARD + + if(istype(I, L["key"])) + return FORWARD //to the first step -> forward + else if(L["backkey"] && istype(I, L["backkey"])) + return BACKWARD //to the last step -> backwards + return 0 + +/datum/construction/reversible/check_step(var/obj/item/I,mob/user as mob) + var/diff = is_right_key(I) + if(diff) + if(custom_action(index, diff, I, user)) + update_index(diff) + return 1 + return 0 + +/datum/construction/reversible/custom_action(index, diff, I, user) + return 1 \ No newline at end of file diff --git a/code/datums/outfits/jobs/cargo.dm b/code/datums/outfits/jobs/cargo.dm index bbfe6f59f5..3423efcf33 100644 --- a/code/datums/outfits/jobs/cargo.dm +++ b/code/datums/outfits/jobs/cargo.dm @@ -25,5 +25,5 @@ satchel_one = /obj/item/weapon/storage/backpack/satchel/eng id_type = /obj/item/weapon/card/id/cargo/mining pda_type = /obj/item/device/pda/shaftminer - backpack_contents = list(/obj/item/weapon/crowbar = 1, /obj/item/weapon/storage/bag/ore = 1) + backpack_contents = list(/obj/item/weapon/tool/crowbar = 1, /obj/item/weapon/storage/bag/ore = 1) flags = OUTFIT_HAS_BACKPACK|OUTFIT_EXTENDED_SURVIVAL diff --git a/code/datums/recipe.dm b/code/datums/recipe.dm index 23af6093ef..9cddd506b6 100644 --- a/code/datums/recipe.dm +++ b/code/datums/recipe.dm @@ -32,7 +32,7 @@ /datum/recipe var/list/reagents // example: = list("berryjuice" = 5) // do not list same reagent twice - var/list/items // example: = list(/obj/item/weapon/crowbar, /obj/item/weapon/welder) // place /foo/bar before /foo + var/list/items // example: = list(/obj/item/weapon/tool/crowbar, /obj/item/weapon/welder) // place /foo/bar before /foo var/list/fruit // example: = list("fruit" = 3) var/result // example: = /obj/item/weapon/reagent_containers/food/snacks/donut/normal var/time = 100 // 1/10 part of second diff --git a/code/datums/supplypacks/atmospherics.dm b/code/datums/supplypacks/atmospherics.dm index ee53af377c..cf102f129d 100644 --- a/code/datums/supplypacks/atmospherics.dm +++ b/code/datums/supplypacks/atmospherics.dm @@ -4,45 +4,45 @@ */ -/datum/supply_packs/atmos +/datum/supply_pack/atmos group = "Atmospherics" -/datum/supply_packs/atmos/inflatable +/datum/supply_pack/atmos/inflatable name = "Inflatable barriers" contains = list(/obj/item/weapon/storage/briefcase/inflatable = 3) cost = 20 containertype = /obj/structure/closet/crate/engineering containername = "Inflatable Barrier Crate" -/datum/supply_packs/atmos/canister_empty +/datum/supply_pack/atmos/canister_empty name = "Empty gas canister" cost = 7 containername = "Empty gas canister crate" containertype = /obj/structure/largecrate contains = list(/obj/machinery/portable_atmospherics/canister) -/datum/supply_packs/atmos/canister_air +/datum/supply_pack/atmos/canister_air name = "Air canister" cost = 10 containername = "Air canister crate" containertype = /obj/structure/largecrate contains = list(/obj/machinery/portable_atmospherics/canister/air) -/datum/supply_packs/atmos/canister_oxygen +/datum/supply_pack/atmos/canister_oxygen name = "Oxygen canister" cost = 15 containername = "Oxygen canister crate" containertype = /obj/structure/largecrate contains = list(/obj/machinery/portable_atmospherics/canister/oxygen) -/datum/supply_packs/atmos/canister_nitrogen +/datum/supply_pack/atmos/canister_nitrogen name = "Nitrogen canister" cost = 10 containername = "Nitrogen canister crate" containertype = /obj/structure/largecrate contains = list(/obj/machinery/portable_atmospherics/canister/nitrogen) -/datum/supply_packs/atmos/canister_phoron +/datum/supply_pack/atmos/canister_phoron name = "Phoron gas canister" cost = 60 containername = "Phoron gas canister crate" @@ -50,7 +50,7 @@ access = access_atmospherics contains = list(/obj/machinery/portable_atmospherics/canister/phoron) -/datum/supply_packs/atmos/canister_sleeping_agent +/datum/supply_pack/atmos/canister_sleeping_agent name = "N2O gas canister" cost = 15 containername = "N2O gas canister crate" @@ -58,7 +58,7 @@ access = access_atmospherics contains = list(/obj/machinery/portable_atmospherics/canister/sleeping_agent) -/datum/supply_packs/atmos/canister_carbon_dioxide +/datum/supply_pack/atmos/canister_carbon_dioxide name = "Carbon dioxide gas canister" cost = 15 containername = "CO2 canister crate" @@ -66,7 +66,7 @@ access = access_atmospherics contains = list(/obj/machinery/portable_atmospherics/canister/carbon_dioxide) -/datum/supply_packs/atmos/air_dispenser +/datum/supply_pack/atmos/air_dispenser contains = list(/obj/machinery/pipedispenser/orderable) name = "Pipe Dispenser" cost = 25 @@ -74,7 +74,7 @@ containername = "Pipe Dispenser Crate" access = access_atmospherics -/datum/supply_packs/atmos/disposals_dispenser +/datum/supply_pack/atmos/disposals_dispenser contains = list(/obj/machinery/pipedispenser/disposal/orderable) name = "Disposals Pipe Dispenser" cost = 25 @@ -82,7 +82,7 @@ containername = "Disposal Dispenser Crate" access = access_atmospherics -/datum/supply_packs/atmos/internals +/datum/supply_pack/atmos/internals name = "Internals crate" contains = list( /obj/item/clothing/mask/gas = 3, @@ -92,7 +92,7 @@ containertype = /obj/structure/closet/crate/internals containername = "Internals crate" -/datum/supply_packs/atmos/evacuation +/datum/supply_pack/atmos/evacuation name = "Emergency equipment" contains = list( /obj/item/weapon/storage/toolbox/emergency = 2, diff --git a/code/datums/supplypacks/contraband.dm b/code/datums/supplypacks/contraband.dm index d0ca246759..c910381a09 100644 --- a/code/datums/supplypacks/contraband.dm +++ b/code/datums/supplypacks/contraband.dm @@ -4,7 +4,7 @@ */ -/datum/supply_packs/randomised/contraband +/datum/supply_pack/randomised/contraband num_contained = 5 contains = list( /obj/item/seeds/bloodtomatoseed, @@ -20,7 +20,7 @@ contraband = 1 group = "Supplies" -/datum/supply_packs/security/specialops +/datum/supply_pack/security/specialops name = "Special Ops supplies" contains = list( /obj/item/weapon/storage/box/emps, @@ -32,7 +32,7 @@ containername = "Special Ops crate" contraband = 1 -/datum/supply_packs/supply/moghes +/datum/supply_pack/supply/moghes name = "Moghes imports" contains = list( /obj/item/weapon/reagent_containers/food/drinks/bottle/redeemersbrew = 2, @@ -43,7 +43,7 @@ containername = "Moghes imports crate" contraband = 1 -/datum/supply_packs/munitions/bolt_rifles_militia +/datum/supply_pack/munitions/bolt_rifles_militia name = "Weapon - Surplus militia rifles" contains = list( /obj/item/weapon/gun/projectile/shotgun/pump/rifle = 3, @@ -54,7 +54,7 @@ containertype = /obj/structure/closet/crate/secure/weapon containername = "Ballistic weapons crate" -/datum/supply_packs/randomised/misc/telecrate //you get something awesome, a couple of decent things, and a few weak/filler things +/datum/supply_pack/randomised/misc/telecrate //you get something awesome, a couple of decent things, and a few weak/filler things name = "ERR_NULL_ENTRY" //null crate! also dream maker is hell, num_contained = 1 contains = list( diff --git a/code/datums/supplypacks/costumes.dm b/code/datums/supplypacks/costumes.dm index 1ea6aa1bd2..879d5accd0 100644 --- a/code/datums/supplypacks/costumes.dm +++ b/code/datums/supplypacks/costumes.dm @@ -4,13 +4,13 @@ */ -/datum/supply_packs/costumes +/datum/supply_pack/costumes group = "Costumes" -/datum/supply_packs/randomised/costumes +/datum/supply_pack/randomised/costumes group = "Costumes" -/datum/supply_packs/costumes/wizard +/datum/supply_pack/costumes/wizard name = "Wizard costume" contains = list( /obj/item/weapon/staff, @@ -22,7 +22,7 @@ containertype = /obj/structure/closet/crate containername = "Wizard costume crate" -/datum/supply_packs/randomised/costumes/hats +/datum/supply_pack/randomised/costumes/hats num_contained = 4 contains = list( /obj/item/clothing/head/collectable/chef, @@ -51,7 +51,7 @@ containertype = /obj/structure/closet/crate containername = "Collectable hats crate! Brought to you by Bass.inc!" -/datum/supply_packs/randomised/costumes/costume +/datum/supply_pack/randomised/costumes/costume num_contained = 3 contains = list( /obj/item/clothing/suit/pirate, @@ -87,7 +87,7 @@ containertype = /obj/structure/closet/crate containername = "Actor Costumes" -/datum/supply_packs/costumes/formal_wear +/datum/supply_pack/costumes/formal_wear contains = list( /obj/item/clothing/head/bowler, /obj/item/clothing/head/that, @@ -109,7 +109,7 @@ containertype = /obj/structure/closet containername = "Formalwear for the best occasions." -datum/supply_packs/costumes/witch +datum/supply_pack/costumes/witch name = "Witch costume" containername = "Witch costume" containertype = /obj/structure/closet @@ -121,7 +121,7 @@ datum/supply_packs/costumes/witch /obj/item/weapon/staff/broom ) -/datum/supply_packs/randomised/costumes/costume_hats +/datum/supply_pack/randomised/costumes/costume_hats name = "Costume hats" containername = "Actor hats crate" containertype = /obj/structure/closet/crate @@ -146,7 +146,7 @@ datum/supply_packs/costumes/witch /obj/item/clothing/head/ushanka ) -/datum/supply_packs/randomised/costumes/dresses +/datum/supply_pack/randomised/costumes/dresses name = "Womens formal dress locker" containername = "Pretty dress locker" containertype = /obj/structure/closet diff --git a/code/datums/supplypacks/engineering.dm b/code/datums/supplypacks/engineering.dm index efa5c454f2..e3b9a148cc 100644 --- a/code/datums/supplypacks/engineering.dm +++ b/code/datums/supplypacks/engineering.dm @@ -4,66 +4,66 @@ */ -/datum/supply_packs/eng +/datum/supply_pack/eng group = "Engineering" -/datum/supply_packs/eng/lightbulbs +/datum/supply_pack/eng/lightbulbs name = "Replacement lights" contains = list(/obj/item/weapon/storage/box/lights/mixed = 3) cost = 10 containertype = /obj/structure/closet/crate containername = "Replacement lights" -/datum/supply_packs/eng/smescoil +/datum/supply_pack/eng/smescoil name = "Superconducting Magnetic Coil" contains = list(/obj/item/weapon/smes_coil) cost = 75 containertype = /obj/structure/closet/crate/engineering containername = "Superconducting Magnetic Coil crate" -/datum/supply_packs/eng/shield_capacitor +/datum/supply_pack/eng/shield_capacitor name = "Shield Capacitor" contains = list(/obj/machinery/shield_capacitor) cost = 20 containertype = /obj/structure/closet/crate/engineering containername = "shield capacitor crate" -/datum/supply_packs/eng/shield_capacitor/advanced +/datum/supply_pack/eng/shield_capacitor/advanced name = "Advanced Shield Capacitor" contains = list(/obj/machinery/shield_capacitor/advanced) cost = 30 containertype = /obj/structure/closet/crate/engineering containername = "advanced shield capacitor crate" -/datum/supply_packs/eng/bubble_shield +/datum/supply_pack/eng/bubble_shield name = "Bubble Shield Generator" contains = list(/obj/machinery/shield_gen) cost = 40 containertype = /obj/structure/closet/crate/engineering containername = "shield bubble generator crate" -/datum/supply_packs/eng/bubble_shield/advanced +/datum/supply_pack/eng/bubble_shield/advanced name = "Advanced Bubble Shield Generator" contains = list(/obj/machinery/shield_gen/advanced) cost = 60 containertype = /obj/structure/closet/crate/engineering containername = "advanced bubble shield generator crate" -/datum/supply_packs/eng/hull_shield +/datum/supply_pack/eng/hull_shield name = "Hull Shield Generator" contains = list(/obj/machinery/shield_gen/external) cost = 80 containertype = /obj/structure/closet/crate/engineering containername = "shield hull generator crate" -/datum/supply_packs/eng/hull_shield/advanced +/datum/supply_pack/eng/hull_shield/advanced name = "Advanced Hull Shield Generator" contains = list(/obj/machinery/shield_gen/external/advanced) cost = 120 containertype = /obj/structure/closet/crate/engineering containername = "advanced hull shield generator crate" -/datum/supply_packs/eng/electrical +/datum/supply_pack/eng/electrical name = "Electrical maintenance crate" contains = list( /obj/item/weapon/storage/toolbox/electrical = 2, @@ -75,7 +75,7 @@ containertype = /obj/structure/closet/crate/engineering/electrical containername = "Electrical maintenance crate" -/datum/supply_packs/eng/e_welders +/datum/supply_pack/eng/e_welders name = "Electric welder crate" contains = list( /obj/item/weapon/weldingtool/electric = 3 @@ -84,7 +84,7 @@ containertype = /obj/structure/closet/crate/engineering/electrical containername = "Electric welder crate" -/datum/supply_packs/eng/mechanical +/datum/supply_pack/eng/mechanical name = "Mechanical maintenance crate" contains = list( /obj/item/weapon/storage/belt/utility/full = 3, @@ -96,14 +96,14 @@ containertype = /obj/structure/closet/crate/engineering containername = "Mechanical maintenance crate" -/datum/supply_packs/eng/fueltank +/datum/supply_pack/eng/fueltank name = "Fuel tank crate" contains = list(/obj/structure/reagent_dispensers/fueltank) cost = 10 containertype = /obj/structure/largecrate containername = "fuel tank crate" -/datum/supply_packs/eng/solar +/datum/supply_pack/eng/solar name = "Solar Pack crate" contains = list( /obj/item/solar_assembly = 21, @@ -115,7 +115,7 @@ containertype = /obj/structure/closet/crate/engineering containername = "Solar pack crate" -/datum/supply_packs/eng/engine +/datum/supply_pack/eng/engine name = "Emitter crate" contains = list(/obj/machinery/power/emitter = 2) cost = 10 @@ -123,27 +123,27 @@ containername = "Emitter crate" access = access_ce -/datum/supply_packs/eng/engine/field_gen +/datum/supply_pack/eng/engine/field_gen name = "Field Generator crate" contains = list(/obj/machinery/field_generator = 2) containertype = /obj/structure/closet/crate/secure/engineering containername = "Field Generator crate" access = access_ce -/datum/supply_packs/eng/engine/sing_gen +/datum/supply_pack/eng/engine/sing_gen name = "Singularity Generator crate" contains = list(/obj/machinery/the_singularitygen) containertype = /obj/structure/closet/crate/secure/engineering containername = "Singularity Generator crate" access = access_ce -/datum/supply_packs/eng/engine/collector +/datum/supply_pack/eng/engine/collector name = "Collector crate" contains = list(/obj/machinery/power/rad_collector = 3) containertype = /obj/structure/closet/crate/secure/engineering containername = "Collector crate" -/datum/supply_packs/eng/engine/PA +/datum/supply_pack/eng/engine/PA name = "Particle Accelerator crate" cost = 40 contains = list( @@ -159,7 +159,7 @@ containername = "Particle Accelerator crate" access = access_ce -/datum/supply_packs/eng/shield_gen +/datum/supply_pack/eng/shield_gen contains = list(/obj/item/weapon/circuitboard/shield_gen) name = "Bubble shield generator circuitry" cost = 30 @@ -167,7 +167,7 @@ containername = "bubble shield generator circuitry crate" access = access_ce -/datum/supply_packs/eng/shield_gen_ex +/datum/supply_pack/eng/shield_gen_ex contains = list(/obj/item/weapon/circuitboard/shield_gen_ex) name = "Hull shield generator circuitry" cost = 30 @@ -175,7 +175,7 @@ containername = "hull shield generator circuitry crate" access = access_ce -/datum/supply_packs/eng/shield_cap +/datum/supply_pack/eng/shield_cap contains = list(/obj/item/weapon/circuitboard/shield_cap) name = "Bubble shield capacitor circuitry" cost = 30 @@ -183,7 +183,7 @@ containername = "shield capacitor circuitry crate" access = access_ce -/datum/supply_packs/eng/smbig +/datum/supply_pack/eng/smbig name = "Supermatter Core" contains = list(/obj/machinery/power/supermatter) cost = 150 @@ -191,7 +191,7 @@ containername = "Supermatter crate (CAUTION)" access = access_ce -/datum/supply_packs/eng/teg +/datum/supply_pack/eng/teg contains = list(/obj/machinery/power/generator) name = "Mark I Thermoelectric Generator" cost = 40 @@ -199,7 +199,7 @@ containername = "Mk1 TEG crate" access = access_engine -/datum/supply_packs/eng/circulator +/datum/supply_pack/eng/circulator contains = list(/obj/machinery/atmospherics/binary/circulator) name = "Binary atmospheric circulator" cost = 20 @@ -207,7 +207,7 @@ containername = "Atmospheric circulator crate" access = access_engine -/datum/supply_packs/eng/radsuit +/datum/supply_pack/eng/radsuit contains = list( /obj/item/clothing/suit/radiation = 3, /obj/item/clothing/head/radiation = 3 @@ -217,7 +217,7 @@ containertype = /obj/structure/closet/radiation containername = "Radiation suit locker" -/datum/supply_packs/eng/pacman_parts +/datum/supply_pack/eng/pacman_parts name = "P.A.C.M.A.N. portable generator parts" cost = 25 containername = "P.A.C.M.A.N. Portable Generator Construction Kit" @@ -230,7 +230,7 @@ /obj/item/weapon/circuitboard/pacman ) -/datum/supply_packs/eng/super_pacman_parts +/datum/supply_pack/eng/super_pacman_parts name = "Super P.A.C.M.A.N. portable generator parts" cost = 35 containername = "Super P.A.C.M.A.N. portable generator construction kit" @@ -243,7 +243,7 @@ /obj/item/weapon/circuitboard/pacman/super ) -/datum/supply_packs/eng/fusion_core +/datum/supply_pack/eng/fusion_core name = "R-UST Mk. 8 Tokamak fusion core crate" cost = 50 containername = "R-UST Mk. 8 Tokamak Fusion Core crate" @@ -255,7 +255,7 @@ /obj/item/weapon/circuitboard/fusion_core ) -/datum/supply_packs/eng/fusion_fuel_injector +/datum/supply_pack/eng/fusion_fuel_injector name = "R-UST Mk. 8 fuel injector crate" cost = 30 containername = "R-UST Mk. 8 fuel injector crate" @@ -267,7 +267,7 @@ /obj/item/weapon/circuitboard/fusion_injector ) -/datum/supply_packs/eng/gyrotron +/datum/supply_pack/eng/gyrotron name = "Gyrotron crate" cost = 15 containername = "Gyrotron Crate" @@ -278,14 +278,14 @@ /obj/item/weapon/circuitboard/gyrotron ) -/datum/supply_packs/eng/fusion_fuel_compressor +/datum/supply_pack/eng/fusion_fuel_compressor name = "Fusion Fuel Compressor circuitry crate" cost = 10 containername = "Fusion Fuel Compressor circuitry crate" containertype = /obj/structure/closet/crate/engineering contains = list(/obj/item/weapon/circuitboard/fusion_fuel_compressor) -/datum/supply_packs/eng/tritium +/datum/supply_pack/eng/tritium name = "Tritium crate" cost = 75 containername = "Tritium crate" diff --git a/code/datums/supplypacks/hospitality.dm b/code/datums/supplypacks/hospitality.dm index f3de751f23..5d663d05db 100644 --- a/code/datums/supplypacks/hospitality.dm +++ b/code/datums/supplypacks/hospitality.dm @@ -4,10 +4,10 @@ */ -/datum/supply_packs/hospitality +/datum/supply_pack/hospitality group = "Hospitality" -/datum/supply_packs/hospitality/party +/datum/supply_pack/hospitality/party name = "Party equipment" contains = list( /obj/item/weapon/storage/box/mixedglasses = 2, @@ -26,7 +26,7 @@ containertype = /obj/structure/closet/crate containername = "Party equipment" -/datum/supply_packs/hospitality/barsupplies +/datum/supply_pack/hospitality/barsupplies name = "Bar supplies" contains = list( /obj/item/weapon/storage/box/glasses/cocktail, @@ -46,10 +46,10 @@ containertype = /obj/structure/closet/crate containername = "crate of bar supplies" -/datum/supply_packs/randomised/hospitality/ +/datum/supply_pack/randomised/hospitality/ group = "Hospitality" -/datum/supply_packs/randomised/hospitality/pizza +/datum/supply_pack/randomised/hospitality/pizza num_contained = 5 contains = list( /obj/item/pizzabox/margherita, @@ -62,7 +62,7 @@ containertype = /obj/structure/closet/crate/freezer containername = "Pizza crate" -/datum/supply_packs/hospitality/gifts +/datum/supply_pack/hospitality/gifts name = "Gift crate" contains = list( /obj/item/toy/bouquet = 3, diff --git a/code/datums/supplypacks/hydroponics.dm b/code/datums/supplypacks/hydroponics.dm index af9f513a95..9ee6a80532 100644 --- a/code/datums/supplypacks/hydroponics.dm +++ b/code/datums/supplypacks/hydroponics.dm @@ -4,45 +4,45 @@ */ -/datum/supply_packs/hydro +/datum/supply_pack/hydro group = "Hydroponics" -/datum/supply_packs/hydro/monkey +/datum/supply_pack/hydro/monkey name = "Monkey crate" contains = list (/obj/item/weapon/storage/box/monkeycubes) cost = 20 containertype = /obj/structure/closet/crate/freezer containername = "Monkey crate" -/datum/supply_packs/hydro/farwa +/datum/supply_pack/hydro/farwa name = "Farwa crate" contains = list (/obj/item/weapon/storage/box/monkeycubes/farwacubes) cost = 20 containertype = /obj/structure/closet/crate/freezer containername = "Farwa crate" -/datum/supply_packs/hydro/neara +/datum/supply_pack/hydro/neara name = "Neaera crate" contains = list (/obj/item/weapon/storage/box/monkeycubes/neaeracubes) cost = 20 containertype = /obj/structure/closet/crate/freezer containername = "Neaera crate" -/datum/supply_packs/hydro/stok +/datum/supply_pack/hydro/stok name = "Stok crate" contains = list (/obj/item/weapon/storage/box/monkeycubes/stokcubes) cost = 20 containertype = /obj/structure/closet/crate/freezer containername = "Stok crate" -/datum/supply_packs/hydro/lisa +/datum/supply_pack/hydro/lisa name = "Corgi Crate" contains = list() cost = 50 containertype = /obj/structure/largecrate/animal/corgi containername = "Corgi Crate" -/datum/supply_packs/hydro/hydroponics +/datum/supply_pack/hydro/hydroponics name = "Hydroponics Supply Crate" contains = list( /obj/item/weapon/reagent_containers/spray/plantbgone = 4, @@ -60,28 +60,28 @@ containername = "Hydroponics crate" access = access_hydroponics -/datum/supply_packs/hydro/cow +/datum/supply_pack/hydro/cow name = "Cow crate" cost = 25 containertype = /obj/structure/largecrate/animal/cow containername = "Cow crate" access = access_hydroponics -/datum/supply_packs/hydro/goat +/datum/supply_pack/hydro/goat name = "Goat crate" cost = 25 containertype = /obj/structure/largecrate/animal/goat containername = "Goat crate" access = access_hydroponics -/datum/supply_packs/hydro/chicken +/datum/supply_pack/hydro/chicken name = "Chicken crate" cost = 25 containertype = /obj/structure/largecrate/animal/chick containername = "Chicken crate" access = access_hydroponics -/datum/supply_packs/hydro/seeds +/datum/supply_pack/hydro/seeds name = "Seeds crate" contains = list( /obj/item/seeds/chiliseed, @@ -107,7 +107,7 @@ containername = "Seeds crate" access = access_hydroponics -/datum/supply_packs/hydro/weedcontrol +/datum/supply_pack/hydro/weedcontrol name = "Weed control crate" contains = list( /obj/item/weapon/material/knife/machete/hatchet = 2, @@ -121,14 +121,14 @@ containername = "Weed control crate" access = access_hydroponics -/datum/supply_packs/hydro/watertank +/datum/supply_pack/hydro/watertank name = "Water tank crate" contains = list(/obj/structure/reagent_dispensers/watertank) cost = 10 containertype = /obj/structure/largecrate containername = "water tank crate" -/datum/supply_packs/hydro/bee_keeper +/datum/supply_pack/hydro/bee_keeper name = "Beekeeping crate" contains = list( /obj/item/beehive_assembly, @@ -141,7 +141,7 @@ containername = "Beekeeping crate" access = access_hydroponics -/datum/supply_packs/hydro/tray +/datum/supply_pack/hydro/tray name = "Empty hydroponics trays" cost = 50 containertype = /obj/structure/closet/crate/hydroponics diff --git a/code/datums/supplypacks/materials.dm b/code/datums/supplypacks/materials.dm index 4c5ddedf47..cd799a235b 100644 --- a/code/datums/supplypacks/materials.dm +++ b/code/datums/supplypacks/materials.dm @@ -4,45 +4,45 @@ */ -/datum/supply_packs/materials +/datum/supply_pack/materials group = "Materials" -/datum/supply_packs/materials/metal50 +/datum/supply_pack/materials/metal50 name = "50 metal sheets" contains = list(/obj/fiftyspawner/steel) cost = 10 containertype = /obj/structure/closet/crate containername = "Metal sheets crate" -/datum/supply_packs/materials/glass50 +/datum/supply_pack/materials/glass50 name = "50 glass sheets" contains = list(/obj/fiftyspawner/glass) cost = 10 containertype = /obj/structure/closet/crate containername = "Glass sheets crate" -/datum/supply_packs/materials/wood50 +/datum/supply_pack/materials/wood50 name = "50 wooden planks" contains = list(/obj/fiftyspawner/wood) cost = 10 containertype = /obj/structure/closet/crate containername = "Wooden planks crate" -/datum/supply_packs/materials/plastic50 +/datum/supply_pack/materials/plastic50 name = "50 plastic sheets" contains = list(/obj/fiftyspawner/plastic) cost = 10 containertype = /obj/structure/closet/crate containername = "Plastic sheets crate" -/datum/supply_packs/materials/cardboard_sheets +/datum/supply_pack/materials/cardboard_sheets contains = list(/obj/fiftyspawner/cardboard) name = "50 cardboard sheets" cost = 10 containertype = /obj/structure/closet/crate containername = "Cardboard sheets crate" -/datum/supply_packs/materials/carpet +/datum/supply_pack/materials/carpet name = "Imported carpet" containertype = /obj/structure/closet/crate containername = "Imported carpet crate" @@ -53,7 +53,7 @@ ) -/datum/supply_packs/misc/linoleum +/datum/supply_pack/misc/linoleum name = "Linoleum" containertype = /obj/structure/closet/crate containername = "Linoleum crate" diff --git a/code/datums/supplypacks/medical.dm b/code/datums/supplypacks/medical.dm index 2c2e26d97d..555df731c4 100644 --- a/code/datums/supplypacks/medical.dm +++ b/code/datums/supplypacks/medical.dm @@ -4,10 +4,10 @@ */ -/datum/supply_packs/med +/datum/supply_pack/med group = "Medical" -/datum/supply_packs/med/medical +/datum/supply_pack/med/medical name = "Medical crate" contains = list( /obj/item/weapon/storage/firstaid/regular, @@ -25,28 +25,28 @@ containertype = /obj/structure/closet/crate/medical containername = "Medical crate" -/datum/supply_packs/med/bloodpack +/datum/supply_pack/med/bloodpack name = "BloodPack crate" contains = list(/obj/item/weapon/storage/box/bloodpacks = 3) cost = 10 containertype = /obj/structure/closet/crate/medical containername = "BloodPack crate" -/datum/supply_packs/med/bodybag +/datum/supply_pack/med/bodybag name = "Body bag crate" contains = list(/obj/item/weapon/storage/box/bodybags = 3) cost = 10 containertype = /obj/structure/closet/crate/medical containername = "Body bag crate" -/datum/supply_packs/med/cryobag +/datum/supply_pack/med/cryobag name = "Stasis bag crate" contains = list(/obj/item/bodybag/cryobag = 3) cost = 40 containertype = /obj/structure/closet/crate/medical containername = "Stasis bag crate" -/datum/supply_packs/med/surgery +/datum/supply_pack/med/surgery name = "Surgery crate" contains = list( /obj/item/weapon/surgical/cautery, @@ -66,7 +66,7 @@ containername = "Surgery crate" access = access_medical -/datum/supply_packs/med/deathalarm +/datum/supply_pack/med/deathalarm name = "Death Alarm crate" contains = list( /obj/item/weapon/storage/box/cdeathalarm_kit, @@ -77,7 +77,7 @@ containername = "Death Alarm crate" access = access_medical -/datum/supply_packs/med/clotting +/datum/supply_pack/med/clotting name = "Clotting Medicine crate" contains = list( /obj/item/weapon/storage/firstaid/clotting @@ -87,7 +87,7 @@ containername = "Clotting Medicine crate" access = access_medical -/datum/supply_packs/med/sterile +/datum/supply_pack/med/sterile name = "Sterile equipment crate" contains = list( /obj/item/clothing/under/rank/medical/scrubs/green = 2, @@ -100,7 +100,7 @@ containertype = "/obj/structure/closet/crate" containername = "Sterile equipment crate" -/datum/supply_packs/med/extragear +/datum/supply_pack/med/extragear name = "Medical surplus equipment" contains = list( /obj/item/weapon/storage/belt/medical = 3, @@ -113,7 +113,7 @@ containername = "Medical surplus equipment" access = access_medical -/datum/supply_packs/med/cmogear +/datum/supply_pack/med/cmogear name = "Chief medical officer equipment" contains = list( /obj/item/weapon/storage/belt/medical, @@ -137,7 +137,7 @@ containername = "Chief medical officer equipment" access = access_cmo -/datum/supply_packs/med/doctorgear +/datum/supply_pack/med/doctorgear name = "Medical Doctor equipment" contains = list( /obj/item/weapon/storage/belt/medical, @@ -160,7 +160,7 @@ containername = "Medical Doctor equipment" access = access_medical_equip -/datum/supply_packs/med/chemistgear +/datum/supply_pack/med/chemistgear name = "Chemist equipment" contains = list( /obj/item/weapon/storage/box/beakers, @@ -183,7 +183,7 @@ containername = "Chemist equipment" access = access_chemistry -/datum/supply_packs/med/paramedicgear +/datum/supply_pack/med/paramedicgear name = "Paramedic equipment" contains = list( /obj/item/weapon/storage/belt/medical/emt, @@ -211,7 +211,7 @@ containername = "Paramedic equipment" access = access_medical_equip -/datum/supply_packs/med/psychiatristgear +/datum/supply_pack/med/psychiatristgear name = "Psychiatrist equipment" contains = list( /obj/item/clothing/under/rank/psych, @@ -230,7 +230,7 @@ containername = "Psychiatrist equipment" access = access_psychiatrist -/datum/supply_packs/med/medicalscrubs +/datum/supply_pack/med/medicalscrubs name = "Medical scrubs" contains = list( /obj/item/clothing/shoes/white = 3,, @@ -251,7 +251,7 @@ containername = "Medical scrubs crate" access = access_medical_equip -/datum/supply_packs/med/autopsy +/datum/supply_pack/med/autopsy name = "Autopsy equipment" contains = list( /obj/item/weapon/folder/white, @@ -268,7 +268,7 @@ containername = "Autopsy equipment crate" access = access_morgue -/datum/supply_packs/med/medicaluniforms +/datum/supply_pack/med/medicaluniforms name = "Medical uniforms" contains = list( /obj/item/clothing/shoes/white = 3, @@ -295,7 +295,7 @@ containername = "Medical uniform crate" access = access_medical_equip -/datum/supply_packs/med/medicalbiosuits +/datum/supply_pack/med/medicalbiosuits name = "Medical biohazard gear" contains = list( /obj/item/clothing/head/bio_hood = 3, @@ -313,7 +313,7 @@ containername = "Medical biohazard equipment" access = access_medical_equip -/datum/supply_packs/med/portablefreezers +/datum/supply_pack/med/portablefreezers name = "Portable freezers crate" contains = list(/obj/item/weapon/storage/box/freezer = 7) cost = 25 @@ -321,7 +321,7 @@ containername = "Portable freezers" access = access_medical_equip -/datum/supply_packs/med/virus +/datum/supply_pack/med/virus name = "Virus sample crate" contains = list(/obj/item/weapon/virusdish/random = 4) cost = 25 @@ -329,7 +329,7 @@ containername = "Virus sample crate" access = access_cmo -/datum/supply_packs/med/defib +/datum/supply_pack/med/defib name = "Defibrillator crate" contains = list(/obj/item/device/defib_kit = 2) cost = 30 diff --git a/code/datums/supplypacks/misc.dm b/code/datums/supplypacks/misc.dm index 225e29335f..bc7687ab78 100644 --- a/code/datums/supplypacks/misc.dm +++ b/code/datums/supplypacks/misc.dm @@ -4,14 +4,14 @@ */ -/datum/supply_packs/misc +/datum/supply_pack/misc group = "Miscellaneous" -/datum/supply_packs/randomised/misc +/datum/supply_pack/randomised/misc group = "Miscellaneous" -/datum/supply_packs/randomised/misc/card_packs +/datum/supply_pack/randomised/misc/card_packs num_contained = 5 contains = list( /obj/item/weapon/pack/cardemon, @@ -23,14 +23,14 @@ containertype = /obj/structure/closet/crate containername = "cards crate" -/datum/supply_packs/misc/eftpos +/datum/supply_pack/misc/eftpos contains = list(/obj/item/device/eftpos) name = "EFTPOS scanner" cost = 10 containertype = /obj/structure/closet/crate containername = "EFTPOS crate" -/datum/supply_packs/misc/chaplaingear +/datum/supply_pack/misc/chaplaingear name = "Chaplain equipment" contains = list( /obj/item/clothing/under/rank/chaplain, @@ -48,14 +48,14 @@ containertype = "/obj/structure/closet/crate" containername = "Chaplain equipment crate" -/datum/supply_packs/misc/hoverpod +/datum/supply_pack/misc/hoverpod name = "Hoverpod Shipment" contains = list() cost = 80 containertype = /obj/structure/largecrate/hoverpod containername = "Hoverpod Crate" -/datum/supply_packs/randomised/misc/webbing +/datum/supply_pack/randomised/misc/webbing name = "Webbing crate" num_contained = 4 contains = list( @@ -71,7 +71,7 @@ containertype = "/obj/structure/closet/crate" containername = "Webbing crate" -/datum/supply_packs/misc/holoplant +/datum/supply_pack/misc/holoplant name = "Holoplant Pot" contains = list(/obj/machinery/holoplant/shipped) cost = 15 diff --git a/code/datums/supplypacks/munitions.dm b/code/datums/supplypacks/munitions.dm index 662de4da73..63102aa405 100644 --- a/code/datums/supplypacks/munitions.dm +++ b/code/datums/supplypacks/munitions.dm @@ -3,13 +3,13 @@ * related to weapons live. */ -/datum/supply_packs/munitions +/datum/supply_pack/munitions group = "Munitions" -/datum/supply_packs/randomised/munitions +/datum/supply_pack/randomised/munitions group = "Munitions" -/datum/supply_packs/munitions/weapons +/datum/supply_pack/munitions/weapons name = "Weapons - Security basic equipment" contains = list( /obj/item/device/flash = 2, @@ -24,7 +24,7 @@ containername = "Security equipment crate" access = access_security -/datum/supply_packs/munitions/egunpistol +/datum/supply_pack/munitions/egunpistol name = "Weapons - Energy sidearms" contains = list(/obj/item/weapon/gun/energy/gun = 2) cost = 40 @@ -32,7 +32,7 @@ containername = "Energy sidearms crate" access = access_security -/datum/supply_packs/munitions/flareguns +/datum/supply_pack/munitions/flareguns name = "Weapons - Flare guns" contains = list( /obj/item/weapon/gun/projectile/sec/flash, @@ -45,7 +45,7 @@ containername = "Flare gun crate" access = access_security -/datum/supply_packs/munitions/eweapons +/datum/supply_pack/munitions/eweapons name = "Weapons - Experimental weapons crate" contains = list( /obj/item/weapon/gun/energy/xray = 2, @@ -55,7 +55,7 @@ containername = "Experimental weapons crate" access = access_armory -/datum/supply_packs/munitions/energyweapons +/datum/supply_pack/munitions/energyweapons name = "Weapons - Laser rifle crate" contains = list(/obj/item/weapon/gun/energy/laser = 3) cost = 50 @@ -63,7 +63,7 @@ containername = "Energy weapons crate" access = access_armory -/datum/supply_packs/munitions/shotgun +/datum/supply_pack/munitions/shotgun name = "Weapons - Shotgun crate" contains = list( /obj/item/weapon/storage/box/shotgunammo, @@ -75,7 +75,7 @@ containername = "Shotgun crate" access = access_armory -/datum/supply_packs/munitions/erifle +/datum/supply_pack/munitions/erifle name = "Weapons - Energy marksman" contains = list(/obj/item/weapon/gun/energy/sniperrifle = 2) cost = 100 @@ -83,7 +83,7 @@ containername = "Energy marksman crate" access = access_armory -/datum/supply_packs/munitions/burstlaser +/datum/supply_pack/munitions/burstlaser name = "Weapons - Burst laser" contains = list(/obj/item/weapon/gun/energy/gun/burst = 2) cost = 50 @@ -91,7 +91,7 @@ containername = "Burst laser crate" access = access_armory -/datum/supply_packs/munitions/ionweapons +/datum/supply_pack/munitions/ionweapons name = "Weapons - Electromagnetic Rifles" contains = list( /obj/item/weapon/gun/energy/ionrifle = 2, @@ -102,7 +102,7 @@ containername = "Electromagnetic weapons crate" access = access_armory -/datum/supply_packs/munitions/ionpistols +/datum/supply_pack/munitions/ionpistols name = "Weapons - Electromagnetic pistols" contains = list( /obj/item/weapon/gun/energy/ionrifle/pistol = 2, @@ -113,7 +113,7 @@ containername = "Electromagnetic weapons crate" access = access_armory -/datum/supply_packs/munitions/bsmg +/datum/supply_pack/munitions/bsmg name = "Weapons - Ballistic SMGs" contains = list(/obj/item/weapon/gun/projectile/automatic/wt550 = 2) cost = 50 @@ -121,7 +121,7 @@ containername = "Ballistic weapon crate" access = access_armory -/datum/supply_packs/munitions/brifle +/datum/supply_pack/munitions/brifle name = "Weapons - Ballistic Rifles" contains = list(/obj/item/weapon/gun/projectile/automatic/z8 = 2) cost = 80 @@ -129,7 +129,7 @@ containername = "Ballistic weapon crate" access = access_armory -/datum/supply_packs/munitions/bolt_rifles_competitive +/datum/supply_pack/munitions/bolt_rifles_competitive name = "Weapons - Competitive shooting rifles" contains = list( /obj/item/device/assembly/timer, @@ -144,7 +144,7 @@ containername = "Ballistic weapons crate" access = access_security -/datum/supply_packs/munitions/shotgunammo +/datum/supply_pack/munitions/shotgunammo name = "Ammunition - Shotgun shells" contains = list( /obj/item/weapon/storage/box/shotgunammo = 2, @@ -155,7 +155,7 @@ containername = "Ballistic ammunition crate" access = access_armory -/datum/supply_packs/munitions/beanbagammo +/datum/supply_pack/munitions/beanbagammo name = "Ammunition - Beanbag shells" contains = list(/obj/item/weapon/storage/box/beanbags = 3) cost = 25 @@ -163,7 +163,7 @@ containername = "Ballistic ammunition crate" access = null -/datum/supply_packs/munitions/bsmgammo +/datum/supply_pack/munitions/bsmgammo name = "Ammunition - 9mm top mounted lethal" contains = list(/obj/item/ammo_magazine/m9mmt = 6) cost = 25 @@ -171,7 +171,7 @@ containername = "Ballistic ammunition crate" access = access_armory -/datum/supply_packs/munitions/bsmgammorubber +/datum/supply_pack/munitions/bsmgammorubber name = "Ammunition - 9mm top mounted rubber" contains = list(/obj/item/ammo_magazine/m9mmt/rubber = 6) cost = 25 @@ -179,7 +179,7 @@ containername = "Ballistic ammunition crate" access = access_security -/datum/supply_packs/munitions/brifleammo +/datum/supply_pack/munitions/brifleammo name = "Ammunition - 7.62mm lethal" contains = list(/obj/item/ammo_magazine/m762 = 6) cost = 25 @@ -187,7 +187,7 @@ containername = "Ballistic ammunition crate" access = access_armory -/datum/supply_packs/munitions/pcellammo +/datum/supply_pack/munitions/pcellammo name = "Ammunition - Power cell" contains = list(/obj/item/weapon/cell/device/weapon = 3) cost = 50 diff --git a/code/datums/supplypacks/recreation.dm b/code/datums/supplypacks/recreation.dm index 7f801ea1b3..684ef962f4 100644 --- a/code/datums/supplypacks/recreation.dm +++ b/code/datums/supplypacks/recreation.dm @@ -4,14 +4,14 @@ */ -/datum/supply_packs/recreation +/datum/supply_pack/recreation group = "Recreation" -/datum/supply_packs/randomised/recreation +/datum/supply_pack/randomised/recreation group = "Recreation" access = access_security -/datum/supply_packs/recreation/foam_weapons +/datum/supply_pack/recreation/foam_weapons name = "Foam Weapon Crate" contains = list( /obj/item/weapon/material/sword/foam = 2, @@ -23,7 +23,7 @@ containertype = /obj/structure/closet/crate containername = "foam weapon crate" -/datum/supply_packs/recreation/lasertag +/datum/supply_pack/recreation/lasertag name = "Lasertag equipment" contains = list( /obj/item/weapon/gun/energy/lasertag/red, @@ -35,7 +35,7 @@ containername = "Lasertag Closet" cost = 10 -/datum/supply_packs/recreation/artscrafts +/datum/supply_pack/recreation/artscrafts name = "Arts and Crafts supplies" contains = list( /obj/item/weapon/storage/fancy/crayons, @@ -58,7 +58,7 @@ containertype = "/obj/structure/closet/crate" containername = "Arts and Crafts crate" -/datum/supply_packs/recreation/painters +/datum/supply_pack/recreation/painters name = "Station Painting Supplies" cost = 10 containername = "station painting supplies crate" diff --git a/code/datums/supplypacks/robotics.dm b/code/datums/supplypacks/robotics.dm index d9f20c5aa6..67292de654 100644 --- a/code/datums/supplypacks/robotics.dm +++ b/code/datums/supplypacks/robotics.dm @@ -4,14 +4,14 @@ */ -/datum/supply_packs/robotics +/datum/supply_pack/robotics group = "Robotics" -/datum/supply_packs/randomised/robotics +/datum/supply_pack/randomised/robotics group = "Robotics" access = access_robotics -/datum/supply_packs/robotics/robotics_assembly +/datum/supply_pack/robotics/robotics_assembly name = "Robotics assembly crate" contains = list( /obj/item/device/assembly/prox_sensor = 3, @@ -24,7 +24,7 @@ containername = "Robotics assembly" access = access_robotics -/*/datum/supply_packs/robotics/robolimbs_basic +/*/datum/supply_pack/robotics/robolimbs_basic name = "Basic robolimb blueprints" contains = list( /obj/item/weapon/disk/limb/morpheus, @@ -35,7 +35,7 @@ containername = "Robolimb blueprints (basic)" access = access_robotics -/datum/supply_packs/robotics/robolimbs_adv +/datum/supply_pack/robotics/robolimbs_adv name = "All robolimb blueprints" contains = list( /obj/item/weapon/disk/limb/bishop, @@ -52,7 +52,7 @@ access = access_robotics */ -/datum/supply_packs/robotics/robolimbs/morpheus +/datum/supply_pack/robotics/robolimbs/morpheus name = "Morpheus robolimb blueprints" contains = list(/obj/item/weapon/disk/limb/morpheus) cost = 20 @@ -60,7 +60,7 @@ containername = "Robolimb blueprints (Morpheus)" access = access_robotics -/datum/supply_packs/robotics/robolimbs/cybersolutions +/datum/supply_pack/robotics/robolimbs/cybersolutions name = "Cyber Solutions robolimb blueprints" contains = list(/obj/item/weapon/disk/limb/cybersolutions) cost = 20 @@ -68,7 +68,7 @@ containername = "Robolimb blueprints (Cyber Solutions)" access = access_robotics -/datum/supply_packs/robotics/robolimbs/xion +/datum/supply_pack/robotics/robolimbs/xion name = "Xion robolimb blueprints" contains = list(/obj/item/weapon/disk/limb/xion) cost = 20 @@ -76,7 +76,7 @@ containername = "Robolimb blueprints (Xion)" access = access_robotics -/datum/supply_packs/robotics/robolimbs/grayson +/datum/supply_pack/robotics/robolimbs/grayson name = "Grayson robolimb blueprints" contains = list(/obj/item/weapon/disk/limb/grayson) cost = 30 @@ -84,7 +84,7 @@ containername = "Robolimb blueprints (Grayson)" access = access_robotics -/datum/supply_packs/robotics/robolimbs/hephaestus +/datum/supply_pack/robotics/robolimbs/hephaestus name = "Hephaestus robolimb blueprints" contains = list(/obj/item/weapon/disk/limb/hephaestus) cost = 35 @@ -92,7 +92,7 @@ containername = "Robolimb blueprints (Hephaestus)" access = access_robotics -/datum/supply_packs/robotics/robolimbs/wardtakahashi +/datum/supply_pack/robotics/robolimbs/wardtakahashi name = "Ward-Takahashi robolimb blueprints" contains = list(/obj/item/weapon/disk/limb/wardtakahashi) cost = 35 @@ -100,7 +100,7 @@ containername = "Robolimb blueprints (Ward-Takahashi)" access = access_robotics -/datum/supply_packs/robotics/robolimbs/zenghu +/datum/supply_pack/robotics/robolimbs/zenghu name = "Zeng Hu robolimb blueprints" contains = list(/obj/item/weapon/disk/limb/zenghu) cost = 35 @@ -108,7 +108,7 @@ containername = "Robolimb blueprints (Zeng Hu)" access = access_robotics -/datum/supply_packs/robotics/robolimbs/bishop +/datum/supply_pack/robotics/robolimbs/bishop name = "Bishop robolimb blueprints" contains = list(/obj/item/weapon/disk/limb/bishop) cost = 70 @@ -116,7 +116,7 @@ containername = "Robolimb blueprints (Bishop)" access = access_robotics -/datum/supply_packs/robotics/mecha_ripley +/datum/supply_pack/robotics/mecha_ripley name = "Circuit Crate (\"Ripley\" APLU)" contains = list( /obj/item/weapon/book/manual/ripley_build_and_repair, @@ -128,7 +128,7 @@ containername = "APLU \"Ripley\" Circuit Crate" access = access_robotics -/datum/supply_packs/robotics/mecha_odysseus +/datum/supply_pack/robotics/mecha_odysseus name = "Circuit Crate (\"Odysseus\")" contains = list( /obj/item/weapon/circuitboard/mecha/odysseus/peripherals, @@ -139,7 +139,7 @@ containername = "\"Odysseus\" Circuit Crate" access = access_robotics -/datum/supply_packs/randomised/robotics/exosuit_mod +/datum/supply_pack/randomised/robotics/exosuit_mod num_contained = 1 contains = list( /obj/item/device/kit/paint/ripley, @@ -152,7 +152,7 @@ containertype = /obj/structure/closet/crate/science containername = "heavy crate" -/datum/supply_packs/randomised/robotics/exosuit_mod/durand +/datum/supply_pack/randomised/robotics/exosuit_mod/durand contains = list( /obj/item/device/kit/paint/durand, /obj/item/device/kit/paint/durand/seraph, @@ -160,7 +160,7 @@ ) name = "Random Durand exosuit modkit" -/datum/supply_packs/randomised/robotics/exosuit_mod/gygax +/datum/supply_pack/randomised/robotics/exosuit_mod/gygax contains = list( /obj/item/device/kit/paint/gygax, /obj/item/device/kit/paint/gygax/darkgygax, @@ -168,7 +168,7 @@ ) name = "Random Gygax exosuit modkit" -/datum/supply_packs/robotics/jumper_cables +/datum/supply_pack/robotics/jumper_cables name = "Jumper kit crate" contains = list( /obj/item/device/defib_kit/jumper_kit = 2 diff --git a/code/datums/supplypacks/science.dm b/code/datums/supplypacks/science.dm index c2f3a24159..83407c2866 100644 --- a/code/datums/supplypacks/science.dm +++ b/code/datums/supplypacks/science.dm @@ -2,17 +2,17 @@ * Here is where any supply packs * related to security tasks live */ -/datum/supply_packs/sci +/datum/supply_pack/sci group = "Science" -/datum/supply_packs/sci/coolanttank +/datum/supply_pack/sci/coolanttank name = "Coolant tank crate" contains = list(/obj/structure/reagent_dispensers/coolanttank) cost = 15 containertype = /obj/structure/largecrate containername = "coolant tank crate" -/datum/supply_packs/sci/phoron +/datum/supply_pack/sci/phoron name = "Phoron research crate" contains = list( /obj/item/weapon/tank/phoron = 3, @@ -28,7 +28,7 @@ containername = "Phoron assembly crate" access = access_tox_storage -/datum/supply_packs/sci/exoticseeds +/datum/supply_pack/sci/exoticseeds name = "Exotic seeds crate" contains = list( /obj/item/seeds/replicapod = 2, @@ -43,14 +43,14 @@ containername = "Exotic Seeds crate" access = access_hydroponics -/datum/supply_packs/sci/integrated_circuit_printer +/datum/supply_pack/sci/integrated_circuit_printer name = "Integrated circuit printer" contains = list(/obj/item/device/integrated_circuit_printer = 2) cost = 15 containertype = /obj/structure/closet/crate containername = "Integrated circuit crate" -/datum/supply_packs/sci/integrated_circuit_printer_upgrade +/datum/supply_pack/sci/integrated_circuit_printer_upgrade name = "Integrated circuit printer upgrade - advanced designs" contains = list(/obj/item/weapon/disk/integrated_circuit/upgrade/advanced) cost = 30 diff --git a/code/datums/supplypacks/security.dm b/code/datums/supplypacks/security.dm index eb031e7bd9..7593837b82 100644 --- a/code/datums/supplypacks/security.dm +++ b/code/datums/supplypacks/security.dm @@ -4,15 +4,15 @@ */ -/datum/supply_packs/security +/datum/supply_pack/security group = "Security" access = access_security -/datum/supply_packs/randomised/security +/datum/supply_pack/randomised/security group = "Security" access = access_security -/datum/supply_packs/randomised/security/armor +/datum/supply_pack/randomised/security/armor name = "Armor - Security armor" num_contained = 5 contains = list( @@ -32,7 +32,7 @@ containertype = /obj/structure/closet/crate/secure/gear containername = "Armor crate" -/datum/supply_packs/security/riot_gear +/datum/supply_pack/security/riot_gear name = "Gear - Riot" contains = list( /obj/item/weapon/melee/baton = 3, @@ -47,7 +47,7 @@ containername = "Riot gear crate" access = access_armory -/datum/supply_packs/security/riot_armor +/datum/supply_pack/security/riot_armor name = "Armor - Riot" contains = list( /obj/item/clothing/head/helmet/riot, @@ -60,7 +60,7 @@ containername = "Riot armor crate" access = access_armory -/datum/supply_packs/security/ablative_armor +/datum/supply_pack/security/ablative_armor name = "Armor - Ablative" contains = list( /obj/item/clothing/head/helmet/laserproof, @@ -73,7 +73,7 @@ containername = "Ablative armor crate" access = access_armory -/datum/supply_packs/security/bullet_resistant_armor +/datum/supply_pack/security/bullet_resistant_armor name = "Armor - Ballistic" contains = list( /obj/item/clothing/head/helmet/bulletproof, @@ -86,7 +86,7 @@ containername = "Ballistic armor crate" access = access_armory -/datum/supply_packs/security/combat_armor +/datum/supply_pack/security/combat_armor name = "Armor - Combat" contains = list( /obj/item/clothing/head/helmet/combat, @@ -99,7 +99,7 @@ containername = "Combat armor crate" access = access_armory -/datum/supply_packs/security/tactical +/datum/supply_pack/security/tactical name = "Armor - Tactical" containertype = /obj/structure/closet/crate/secure/gear containername = "Tactical armor crate" @@ -124,7 +124,7 @@ /obj/item/clothing/gloves/black ) -/datum/supply_packs/security/securitybarriers +/datum/supply_pack/security/securitybarriers name = "Misc - Security Barriers" contains = list(/obj/machinery/deployable/barrier = 4) cost = 20 @@ -132,7 +132,7 @@ containername = "Security barrier crate" access = null -/datum/supply_packs/security/securityshieldgen +/datum/supply_pack/security/securityshieldgen name = "Misc - Wall shield generators" contains = list(/obj/machinery/shieldwallgen = 4) cost = 20 @@ -140,7 +140,7 @@ containername = "Wall shield generators crate" access = access_teleporter -/datum/supply_packs/randomised/security/holster +/datum/supply_pack/randomised/security/holster name = "Gear - Holsters" num_contained = 4 contains = list( @@ -153,7 +153,7 @@ containertype = /obj/structure/closet/crate containername = "Holster crate" -/datum/supply_packs/security/extragear +/datum/supply_pack/security/extragear name = "Gear - Security surplus equipment" contains = list( /obj/item/weapon/storage/belt/security = 3, @@ -165,7 +165,7 @@ containertype = /obj/structure/closet/crate containername = "Security surplus equipment" -/datum/supply_packs/security/detectivegear +/datum/supply_pack/security/detectivegear name = "Forensic - Investigation equipment" contains = list( /obj/item/weapon/storage/box/evidence = 2, @@ -192,7 +192,7 @@ containername = "Forensic equipment" access = access_forensics_lockers -/datum/supply_packs/security/detectiveclothes +/datum/supply_pack/security/detectiveclothes name = "Forensic - Investigation apparel" contains = list( /obj/item/clothing/under/det/black = 2, @@ -214,7 +214,7 @@ containername = "Investigation clothing" access = access_forensics_lockers -/datum/supply_packs/security/officergear +/datum/supply_pack/security/officergear name = "Gear - Officer equipment" contains = list( /obj/item/clothing/suit/storage/vest/officer, @@ -244,7 +244,7 @@ containername = "Officer equipment" access = access_brig -/datum/supply_packs/security/wardengear +/datum/supply_pack/security/wardengear name = "Gear - Warden equipment" contains = list( /obj/item/clothing/suit/storage/vest/warden, @@ -272,7 +272,7 @@ containername = "Warden equipment" access = access_armory -/datum/supply_packs/security/headofsecgear +/datum/supply_pack/security/headofsecgear name = "Gear - Head of security equipment" contains = list( /obj/item/clothing/head/helmet/HoS, @@ -298,7 +298,7 @@ containername = "Head of security equipment" access = access_hos -/datum/supply_packs/security/securityclothing +/datum/supply_pack/security/securityclothing name = "Misc - Security uniform red" contains = list( /obj/item/weapon/storage/backpack/satchel/sec = 2, @@ -316,7 +316,7 @@ containertype = /obj/structure/closet/crate/secure containername = "Security uniform crate" -/datum/supply_packs/security/navybluesecurityclothing +/datum/supply_pack/security/navybluesecurityclothing name = "Misc - Security uniform navy blue" contains = list( /obj/item/weapon/storage/backpack/satchel/sec = 2, @@ -337,7 +337,7 @@ containertype = /obj/structure/closet/crate/secure containername = "Navy blue security uniform crate" -/datum/supply_packs/security/corporatesecurityclothing +/datum/supply_pack/security/corporatesecurityclothing name = "Misc - Security uniform corporate" contains = list( /obj/item/weapon/storage/backpack/satchel/sec = 2, @@ -357,7 +357,7 @@ containertype = /obj/structure/closet/crate/secure containername = "Corporate security uniform crate" -/datum/supply_packs/security/biosuit +/datum/supply_pack/security/biosuit name = "Gear - Security biohazard gear" contains = list( /obj/item/clothing/head/bio_hood/security = 3, diff --git a/code/datums/supplypacks/supply.dm b/code/datums/supplypacks/supply.dm index dd553c4f1e..0a40cae6a3 100644 --- a/code/datums/supplypacks/supply.dm +++ b/code/datums/supplypacks/supply.dm @@ -3,10 +3,10 @@ * related to civilian tasks live */ -/datum/supply_packs/supply +/datum/supply_pack/supply group = "Supplies" -/datum/supply_packs/supply/food +/datum/supply_pack/supply/food name = "Kitchen supply crate" contains = list( /obj/item/weapon/reagent_containers/food/condiment/flour = 6, @@ -20,14 +20,14 @@ containertype = /obj/structure/closet/crate/freezer containername = "Food crate" -/datum/supply_packs/supply/toner +/datum/supply_pack/supply/toner name = "Toner cartridges" contains = list(/obj/item/device/toner = 6) cost = 10 containertype = /obj/structure/closet/crate containername = "Toner cartridges" -/datum/supply_packs/supply/janitor +/datum/supply_pack/supply/janitor name = "Janitorial supplies" contains = list( /obj/item/weapon/reagent_containers/glass/bucket, @@ -50,7 +50,7 @@ containertype = /obj/structure/closet/crate containername = "Janitorial supplies" -/datum/supply_packs/supply/shipping +/datum/supply_pack/supply/shipping name = "Shipping supplies" contains = list( /obj/fiftyspawner/cardboard, @@ -58,13 +58,13 @@ /obj/item/weapon/wrapping_paper = 2, /obj/item/device/destTagger, /obj/item/weapon/hand_labeler, - /obj/item/weapon/wirecutters, + /obj/item/weapon/tool/wirecutters, /obj/item/weapon/tape_roll = 2) cost = 10 containertype = "/obj/structure/closet/crate" containername = "Shipping supplies crate" -/datum/supply_packs/supply/bureaucracy +/datum/supply_pack/supply/bureaucracy contains = list( /obj/item/weapon/clipboard = 2, /obj/item/weapon/pen/red, @@ -84,14 +84,14 @@ containertype = /obj/structure/closet/crate containername = "Office supplies crate" -/datum/supply_packs/supply/spare_pda +/datum/supply_pack/supply/spare_pda name = "Spare PDAs" cost = 10 containertype = /obj/structure/closet/crate containername = "Spare PDA crate" contains = list(/obj/item/device/pda = 3) -/datum/supply_packs/supply/minergear +/datum/supply_pack/supply/minergear name = "Shaft miner equipment" contains = list( /obj/item/weapon/storage/backpack/industrial, @@ -115,21 +115,21 @@ containername = "Shaft miner equipment" access = access_mining -/datum/supply_packs/supply/mule +/datum/supply_pack/supply/mule name = "Mulebot Crate" contains = list() cost = 20 containertype = /obj/structure/largecrate/animal/mulebot containername = "Mulebot Crate" -/datum/supply_packs/supply/cargotrain +/datum/supply_pack/supply/cargotrain name = "Cargo Train Tug" contains = list(/obj/vehicle/train/cargo/engine) cost = 35 containertype = /obj/structure/largecrate containername = "Cargo Train Tug Crate" -/datum/supply_packs/supply/cargotrailer +/datum/supply_pack/supply/cargotrailer name = "Cargo Train Trolley" contains = list(/obj/vehicle/train/cargo/trolley) cost = 15 diff --git a/code/datums/supplypacks/supplypacks.dm b/code/datums/supplypacks/supplypacks.dm index 3d2d4807fd..d29f03be6f 100644 --- a/code/datums/supplypacks/supplypacks.dm +++ b/code/datums/supplypacks/supplypacks.dm @@ -4,6 +4,7 @@ //ANOTER NOTE: Contraband is obtainable through modified supplycomp circuitboards. //BIG NOTE: Don't add living things to crates, that's bad, it will break the shuttle. //NEW NOTE: Do NOT set the price of any crates below 7 points. Doing so allows infinite points. +//NOTE NOTE: Hidden var is now deprecated, whoever removed support for it should've removed the var altogether //var/list/all_supply_groups = list("Operations","Security","Hospitality","Engineering","Atmospherics","Medical","Reagents","Reagent Cartridges","Science","Hydroponics", "Supply", "Miscellaneous") var/list/all_supply_groups = list("Atmospherics", @@ -24,30 +25,35 @@ var/list/all_supply_groups = list("Atmospherics", "Supplies", "Voidsuits") -/datum/supply_packs +/datum/supply_pack var/name = null - var/list/contains = list() - var/manifest = "" + var/list/contains = list() // Typepaths, used to actually spawn the contents + var/list/manifest = list() // Object names, used to compile manifests var/cost = null var/containertype = null var/containername = null var/access = null - var/hidden = 0 var/contraband = 0 + var/num_contained = 0 //number of items picked to be contained in a /randomised crate var/group = "Miscellaneous" -/datum/supply_packs/New() - manifest += "" + manifest += "\proper[initial(O.name)]" -/datum/supply_packs/randomised - var/num_contained //number of items picked to be contained in a randomised crate +/datum/supply_pack/proc/get_html_manifest() + var/dat = "" + if(num_contained) + dat +="Contains any [num_contained] of:" + dat += "" + return dat -/datum/supply_packs/randomised/New() - manifest += "Contains any [num_contained] of:" - ..() \ No newline at end of file +// Keeping this subtype here for posterity, so it's more apparent that this is the subtype to use if making new randomised packs +/datum/supply_pack/randomised + num_contained = 1 \ No newline at end of file diff --git a/code/datums/supplypacks/voidsuits.dm b/code/datums/supplypacks/voidsuits.dm index 699c8ce9ee..e24403e03e 100644 --- a/code/datums/supplypacks/voidsuits.dm +++ b/code/datums/supplypacks/voidsuits.dm @@ -4,10 +4,10 @@ */ -/datum/supply_packs/voidsuits +/datum/supply_pack/voidsuits group = "Voidsuits" -/datum/supply_packs/voidsuits/atmos +/datum/supply_pack/voidsuits/atmos name = "Atmospheric voidsuits" contains = list( /obj/item/clothing/suit/space/void/atmos = 2, @@ -21,7 +21,7 @@ containername = "Atmospheric voidsuit crate" access = access_atmospherics -/datum/supply_packs/voidsuits/atmos/alt +/datum/supply_pack/voidsuits/atmos/alt name = "Heavy Duty Atmospheric voidsuits" contains = list( /obj/item/clothing/suit/space/void/atmos/alt = 2, @@ -35,7 +35,7 @@ containername = "Heavy Duty Atmospheric voidsuit crate" access = access_atmospherics -/datum/supply_packs/voidsuits/engineering +/datum/supply_pack/voidsuits/engineering name = "Engineering voidsuits" contains = list( /obj/item/clothing/suit/space/void/engineering = 2, @@ -49,7 +49,7 @@ containername = "Engineering voidsuit crate" access = access_engine_equip -/datum/supply_packs/voidsuits/engineering/construction +/datum/supply_pack/voidsuits/engineering/construction name = "Engineering Construction voidsuits" contains = list( /obj/item/clothing/suit/space/void/engineering/construction = 2, @@ -63,7 +63,7 @@ containername = "Engineering Construction voidsuit crate" access = access_engine_equip -/datum/supply_packs/voidsuits/engineering/hazmat +/datum/supply_pack/voidsuits/engineering/hazmat name = "Engineering Hazmat voidsuits" contains = list( /obj/item/clothing/suit/space/void/engineering/hazmat = 2, @@ -77,7 +77,7 @@ containername = "Engineering Hazmat voidsuit crate" access = access_engine_equip -/datum/supply_packs/voidsuits/engineering/alt +/datum/supply_pack/voidsuits/engineering/alt name = "Reinforced Engineering voidsuits" contains = list( /obj/item/clothing/suit/space/void/engineering/alt = 2, @@ -91,7 +91,7 @@ containername = "Reinforced Engineering voidsuit crate" access = access_engine_equip -/datum/supply_packs/voidsuits/medical +/datum/supply_pack/voidsuits/medical name = "Medical voidsuits" contains = list( /obj/item/clothing/suit/space/void/medical = 2, @@ -105,7 +105,7 @@ containername = "Medical voidsuit crate" access = access_medical_equip -/datum/supply_packs/voidsuits/medical/emt +/datum/supply_pack/voidsuits/medical/emt name = "Medical EMT voidsuits" contains = list( /obj/item/clothing/suit/space/void/medical/emt = 2, @@ -119,7 +119,7 @@ containername = "Medical EMT voidsuit crate" access = access_medical_equip -/datum/supply_packs/voidsuits/medical/bio +/datum/supply_pack/voidsuits/medical/bio name = "Medical Biohazard voidsuits" contains = list( /obj/item/clothing/suit/space/void/medical/bio = 2, @@ -133,7 +133,7 @@ containername = "Medical Biohazard voidsuit crate" access = access_medical_equip -/datum/supply_packs/voidsuits/medical/alt +/datum/supply_pack/voidsuits/medical/alt name = "Vey-Med Medical voidsuits" contains = list( /obj/item/clothing/suit/space/void/medical/alt = 2, @@ -147,7 +147,7 @@ containername = "Vey-Med Medical voidsuit crate" access = access_medical_equip -/datum/supply_packs/voidsuits/security +/datum/supply_pack/voidsuits/security name = "Security voidsuits" contains = list( /obj/item/clothing/suit/space/void/security = 2, @@ -160,7 +160,7 @@ containertype = "/obj/structure/closet/crate/secure" containername = "Security voidsuit crate" -/datum/supply_packs/voidsuits/security/crowd +/datum/supply_pack/voidsuits/security/crowd name = "Security Crowd Control voidsuits" contains = list( /obj/item/clothing/suit/space/void/security/riot = 2, @@ -174,7 +174,7 @@ containername = "Security Crowd Control voidsuit crate" access = access_armory -/datum/supply_packs/voidsuits/security/alt +/datum/supply_pack/voidsuits/security/alt name = "Security EVA Riot voidsuits" contains = list( /obj/item/clothing/suit/space/void/security/alt = 2, @@ -188,7 +188,7 @@ containername = "Security EVA Riot voidsuit crate" access = access_armory -/datum/supply_packs/voidsuits/supply +/datum/supply_pack/voidsuits/supply name = "Mining voidsuits" contains = list( /obj/item/clothing/suit/space/void/mining = 2, @@ -201,7 +201,7 @@ containername = "Mining voidsuit crate" access = access_mining -/datum/supply_packs/voidsuits/supply/alt +/datum/supply_pack/voidsuits/supply/alt name = "Frontier Mining voidsuits" contains = list( /obj/item/clothing/suit/space/void/mining/alt = 2, diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index 435ca82fdc..0a83f542db 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -117,7 +117,7 @@ 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(istype(I, /obj/item/weapon/wirecutters)) + if(I.is_wirecutter()) var/colour = href_list["cut"] CutWireColour(colour) playsound(holder, I.usesound, 20, 1) diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm old mode 100755 new mode 100644 index 873e720512..c7f64f225c --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -28,8 +28,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station power_light = 0 power_equip = 0 power_environ = 0 - ambience = list('sound/ambience/ambispace.ogg','sound/music/title2.ogg','sound/music/space.ogg','sound/music/main.ogg','sound/music/traitor.ogg','sound/ambience/serspaceamb1.ogg') base_turf = /turf/space + ambience = AMBIENCE_SPACE /area/space/atmosalert() return @@ -74,6 +74,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/shuttle/arrival name = "\improper Arrival Shuttle" + ambience = AMBIENCE_ARRIVALS /area/shuttle/arrival/pre_game icon_state = "shuttle2" @@ -81,6 +82,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/shuttle/arrival/station icon_state = "shuttle" dynamic_lighting = 0 + ambience = AMBIENCE_ARRIVALS /area/shuttle/escape name = "\improper Emergency Shuttle" @@ -384,9 +386,11 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/centcom/terminal name = "\improper Docking Terminal" icon_state = "centcom_dock" + ambience = AMBIENCE_ARRIVALS /area/centcom/tram name = "\improper Tram Station" + ambience = AMBIENCE_ARRIVALS /area/centcom/security name = "\improper CentCom Security" @@ -399,6 +403,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/centcom/command name = "\improper CentCom Command" //Central Command Command totally isn't RAS Syndrome in action. icon_state = "centcom_command" + ambience = AMBIENCE_HIGHSEC /area/centcom/main_hall name = "\improper Main Hallway" @@ -423,6 +428,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station icon_state = "syndie-ship" requires_power = 0 dynamic_lighting = 0 + ambience = AMBIENCE_HIGHSEC /area/syndicate_mothership/control name = "\improper Mercenary Control Room" @@ -488,6 +494,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station requires_power = 0 flags = RAD_SHIELDED base_turf = /turf/space + ambience = AMBIENCE_HIGHSEC /area/syndicate_station/start name = "\improper Mercenary Forward Operating Base" @@ -542,12 +549,14 @@ NOTE: there are two lists of areas in the end of this file: centcom and station icon_state = "yellow" requires_power = 0 dynamic_lighting = 0 + ambience = AMBIENCE_OTHERWORLDLY /area/skipjack_station name = "\improper Skipjack" icon_state = "yellow" requires_power = 0 base_turf = /turf/space + ambience = AMBIENCE_HIGHSEC /area/skipjack_station/start name = "\improper Skipjack" @@ -581,6 +590,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/prison name = "\improper Prison Station" icon_state = "brig" + ambience = AMBIENCE_HIGHSEC /area/prison/arrival_airlock name = "\improper Prison Station Airlock" @@ -664,12 +674,16 @@ NOTE: there are two lists of areas in the end of this file: centcom and station //SPACE STATION 13// //////////////////// +/area + ambience = AMBIENCE_GENERIC + //Maintenance /area/maintenance flags = RAD_SHIELDED sound_env = TUNNEL_ENCLOSED turf_initializer = new /datum/turf_initializer/maintenance() + ambience = AMBIENCE_MAINTENANCE /area/maintenance/aft name = "Aft Maintenance" @@ -896,6 +910,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/hallway/primary/ sound_env = LARGE_ENCLOSED + ambience = AMBIENCE_GENERIC /area/hallway/primary/fore name = "\improper Fore Primary Hallway" @@ -1104,6 +1119,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station name = "\improper Dormitories" icon_state = "Sleep" flags = RAD_SHIELDED + ambience = AMBIENCE_GENERIC /area/crew_quarters/toilet name = "\improper Dormitory Toilets" @@ -1362,10 +1378,12 @@ NOTE: there are two lists of areas in the end of this file: centcom and station name = "\improper Library Conference Room" icon_state = "library_conference_room" +/area/chapel + ambience = AMBIENCE_CHAPEL + /area/chapel/main name = "\improper Chapel" icon_state = "chapel" - ambience = list('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg','sound/music/traitor.ogg') sound_env = LARGE_ENCLOSED /area/chapel/office @@ -1469,7 +1487,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/engineering/ name = "\improper Engineering" icon_state = "engineering" - ambience = list('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg') + ambience = AMBIENCE_ENGINEERING /area/engineering/atmos name = "\improper Atmospherics" @@ -1553,6 +1571,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station requires_power = 1 always_unpowered = 1 dynamic_lighting = 0 + ambience = AMBIENCE_SPACE auxport name = "\improper Fore Port Solar Array" @@ -1638,7 +1657,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station name = "\improper AI Satellite Teleporter Room" icon_state = "teleporter" music = "signal" - ambience = list('sound/ambience/ambimalf.ogg') //MedBay @@ -1748,7 +1766,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/medical/morgue name = "\improper Morgue" icon_state = "morgue" - ambience = list('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/music/main.ogg') /area/medical/chemistry name = "\improper Chemistry" @@ -1849,6 +1866,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/security/armoury name = "\improper Security - Armory" icon_state = "armory" + ambience = AMBIENCE_HIGHSEC /area/security/briefing_room name = "\improper Security - Briefing Room" @@ -1906,6 +1924,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/security/tactical name = "\improper Security - Tactical Equipment" icon_state = "Tactical" + ambience = AMBIENCE_HIGHSEC /* @@ -1928,6 +1947,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/security/nuke_storage name = "\improper Vault" icon_state = "nuke_storage" + ambience = AMBIENCE_HIGHSEC /area/security/checkpoint name = "\improper Security Checkpoint" @@ -1936,6 +1956,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/security/checkpoint2 name = "\improper Security - Arrival Checkpoint" icon_state = "security" + ambience = AMBIENCE_ARRIVALS /area/security/checkpoint/supply name = "Security Post - Cargo Bay" @@ -2166,16 +2187,19 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/djstation name = "\improper Listening Post" icon_state = "LP" + ambience = AMBIENCE_TECH_RUINS /area/djstation/solars name = "\improper Listening Post Solars" icon_state = "LPS" + ambience = AMBIENCE_TECH_RUINS //DERELICT /area/derelict name = "\improper Derelict Station" icon_state = "storage" + ambience = AMBIENCE_RUINS /area/derelict/hallway/primary name = "\improper Derelict Primary Hallway" @@ -2374,6 +2398,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/ai_monitored/storage/secure name = "Secure Storage" icon_state = "storage" + ambience = AMBIENCE_HIGHSEC /area/ai_monitored/storage/emergency name = "Emergency Storage" @@ -2386,74 +2411,85 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/ai_upload name = "\improper AI Upload Chamber" icon_state = "ai_upload" - ambience = list('sound/ambience/ambimalf.ogg') + ambience = AMBIENCE_AI /area/ai_upload_foyer name = "AI Upload Access" icon_state = "ai_foyer" - ambience = list('sound/ambience/ambimalf.ogg') sound_env = SMALL_ENCLOSED + ambience = AMBIENCE_AI /area/ai_server_room name = "Messaging Server Room" icon_state = "ai_server" sound_env = SMALL_ENCLOSED + ambience = AMBIENCE_AI /area/ai name = "\improper AI Chamber" icon_state = "ai_chamber" - ambience = list('sound/ambience/ambimalf.ogg') + ambience = AMBIENCE_AI /area/ai_cyborg_station name = "\improper Cyborg Station" icon_state = "ai_cyborg" sound_env = SMALL_ENCLOSED + ambience = AMBIENCE_AI /area/aisat name = "\improper AI Satellite" icon_state = "ai" + ambience = AMBIENCE_AI /area/aisat_interior name = "\improper AI Satellite" icon_state = "ai" + ambience = AMBIENCE_AI // The lack of inheritence hurts my soul. /area/AIsatextFP name = "\improper AI Sat Ext" icon_state = "storage" luminosity = 1 dynamic_lighting = 0 + ambience = AMBIENCE_AI /area/AIsatextFS name = "\improper AI Sat Ext" icon_state = "storage" luminosity = 1 dynamic_lighting = 0 + ambience = AMBIENCE_AI /area/AIsatextAS name = "\improper AI Sat Ext" icon_state = "storage" luminosity = 1 dynamic_lighting = 0 + ambience = AMBIENCE_AI /area/AIsatextAP name = "\improper AI Sat Ext" icon_state = "storage" luminosity = 1 dynamic_lighting = 0 + ambience = AMBIENCE_AI /area/NewAIMain name = "\improper AI Main New" icon_state = "storage" + ambience = AMBIENCE_AI //Misc - +/area/wreck + ambience = AMBIENCE_RUINS /area/wreck/ai name = "\improper AI Chamber" icon_state = "ai" + ambience = AMBIENCE_TECH_RUINS /area/wreck/main name = "\improper Wreck" @@ -2462,10 +2498,12 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/wreck/engineering name = "\improper Power Room" icon_state = "engine" + ambience = AMBIENCE_TECH_RUINS /area/wreck/bridge name = "\improper Bridge" icon_state = "bridge" + ambience = AMBIENCE_TECH_RUINS /area/generic name = "Unknown" @@ -2475,7 +2513,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station // Telecommunications Satellite /area/tcommsat/ - ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg') + ambience = AMBIENCE_ENGINEERING /area/tcommsat/entrance name = "\improper Telecomms Teleporter" @@ -2488,22 +2526,22 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/tcomsat name = "\improper Telecomms Satellite" icon_state = "tcomsatlob" - ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg') + ambience = AMBIENCE_ENGINEERING /area/tcomfoyer name = "\improper Telecomms Foyer" icon_state = "tcomsatfoyer" - ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg') + ambience = AMBIENCE_ENGINEERING /area/tcomwest name = "\improper Telecommunications Satellite West Wing" icon_state = "tcomsatwest" - ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg') + ambience = AMBIENCE_ENGINEERING /area/tcomeast name = "\improper Telecommunications Satellite East Wing" icon_state = "tcomsateast" - ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg') + ambience = AMBIENCE_ENGINEERING /area/tcommsat/computer name = "\improper Telecomms Control Room" @@ -2522,6 +2560,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/awaymission name = "\improper Strange Location" icon_state = "away" + ambience = AMBIENCE_FOREBODING /area/awaymission/example name = "\improper Strange Station" @@ -2615,56 +2654,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station luminosity = 1 dynamic_lighting = 0 requires_power = 0 - ambience = list() - var/sound/mysound = null - - New() - ..() - var/sound/S = new/sound() - mysound = S - S.file = 'sound/ambience/shore.ogg' - S.repeat = 1 - S.wait = 0 - S.channel = 123 - S.volume = 100 - S.priority = 255 - S.status = SOUND_UPDATE - process() - - Entered(atom/movable/Obj,atom/OldLoc) - if(ismob(Obj)) - if(Obj:client) - mysound.status = SOUND_UPDATE - Obj << mysound - return - - Exited(atom/movable/Obj) - if(ismob(Obj)) - if(Obj:client) - mysound.status = SOUND_PAUSED | SOUND_UPDATE - Obj << mysound - - proc/process() - set background = 1 - - var/sound/S = null - var/sound_delay = 0 - if(prob(25)) - S = sound(file=pick('sound/ambience/seag1.ogg','sound/ambience/seag2.ogg','sound/ambience/seag3.ogg'), volume=100) - sound_delay = rand(0, 50) - - for(var/mob/living/carbon/human/H in src) - if(H.s_tone > -55) - H.s_tone-- - H.update_icons_body() - if(H.client) - mysound.status = SOUND_UPDATE - H << mysound - if(S) - spawn(sound_delay) - H << S - - spawn(60) .() ///////////////////////////////////////////////////////////////////// /* @@ -2737,53 +2726,3 @@ var/list/the_station_areas = list ( luminosity = 1 dynamic_lighting = 0 requires_power = 0 - var/sound/mysound = null -/* - New() - ..() - var/sound/S = new/sound() - mysound = S - S.file = 'sound/ambience/shore.ogg' - S.repeat = 1 - S.wait = 0 - S.channel = 123 - S.volume = 100 - S.priority = 255 - S.status = SOUND_UPDATE - process() - - Entered(atom/movable/Obj,atom/OldLoc) - if(ismob(Obj)) - if(Obj:client) - mysound.status = SOUND_UPDATE - Obj << mysound - return - - Exited(atom/movable/Obj) - if(ismob(Obj)) - if(Obj:client) - mysound.status = SOUND_PAUSED | SOUND_UPDATE - Obj << mysound - - proc/process() - set background = 1 - - var/sound/S = null - var/sound_delay = 0 - if(prob(25)) - S = sound(file=pick('sound/ambience/seag1.ogg','sound/ambience/seag2.ogg','sound/ambience/seag3.ogg'), volume=100) - sound_delay = rand(0, 50) - - for(var/mob/living/carbon/human/H in src) -// if(H.s_tone > -55) //ugh...nice/novel idea but please no. -// H.s_tone-- -// H.update_icons_body() - if(H.client) - mysound.status = SOUND_UPDATE - H << mysound - if(S) - spawn(sound_delay) - H << S - - spawn(60) .() -*/ diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 98331ecfa8..31f6da1603 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -35,7 +35,7 @@ // var/list/lights // list of all lights on this area var/list/all_doors = null //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area var/firedoors_closed = 0 - var/list/ambience = list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg') + var/list/ambience = list() var/list/forced_ambience = null var/sound_env = STANDARD_STATION var/turf/base_turf //The base turf type of the area, which can be used to override the z-level's base turf @@ -285,10 +285,6 @@ var/list/mob/living/forced_ambiance_list = new L << sound(null, channel = CHANNEL_AMBIENCE_FORCED) forced_ambiance_list -= L - if(!L.client.ambience_playing) - L.client.ambience_playing = 1 - L << sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = CHANNEL_AMBIENCE) - if(forced_ambience) if(forced_ambience.len) forced_ambiance_list |= L @@ -299,10 +295,10 @@ var/list/mob/living/forced_ambiance_list = new else L << sound(null, channel = CHANNEL_AMBIENCE_FORCED) else if(src.ambience.len && prob(35)) - if((world.time >= L.client.played + 600)) + if((world.time >= L.client.time_last_ambience_played + 1 MINUTE)) var/sound = pick(ambience) - L << sound(sound, repeat = 0, wait = 0, volume = 25, channel = CHANNEL_AMBIENCE) - L.client.played = world.time + L << sound(sound, repeat = 0, wait = 0, volume = 50, channel = CHANNEL_AMBIENCE) + L.client.time_last_ambience_played = world.time /area/proc/gravitychange(var/gravitystate = 0, var/area/A) A.has_gravity = gravitystate diff --git a/code/game/area/asteroid_areas.dm b/code/game/area/asteroid_areas.dm index 66a7e86913..e5f22a77d7 100644 --- a/code/game/area/asteroid_areas.dm +++ b/code/game/area/asteroid_areas.dm @@ -2,28 +2,23 @@ /area/mine icon_state = "mining" - music = 'sound/ambience/song_game.ogg' sound_env = ASTEROID /area/mine/explored name = "Mine" icon_state = "explored" - ambience = list('sound/ambience/ambimine.ogg', 'sound/ambience/song_game.ogg') /area/mine/unexplored name = "Mine" icon_state = "unexplored" - ambience = list('sound/ambience/ambimine.ogg', 'sound/ambience/song_game.ogg') /area/mine/explored/upper_level name = "Upper Level Mine" icon_state = "explored" - ambience = list('sound/ambience/ambimine.ogg', 'sound/ambience/song_game.ogg') /area/mine/unexplored/upper_level name = "Upper Level Mine" icon_state = "unexplored" - ambience = list('sound/ambience/ambimine.ogg', 'sound/ambience/song_game.ogg') // OUTPOSTS diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 0f2c4d83b6..ac25213a9a 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -109,8 +109,8 @@ light_color="#ff0000" spawnable=list( /mob/living/simple_animal/hostile/scarybat, - /mob/living/simple_animal/hostile/creature, - /mob/living/simple_animal/hostile/faithless + /mob/living/simple_mob/creature, + /mob/living/simple_mob/faithless ) /obj/effect/gateway/active/cult @@ -118,8 +118,8 @@ light_color="#ff0000" spawnable=list( /mob/living/simple_animal/hostile/scarybat/cult, - /mob/living/simple_animal/hostile/creature/cult, - /mob/living/simple_animal/hostile/faithless/cult + /mob/living/simple_mob/creature/cult, + /mob/living/simple_mob/faithless/cult ) /obj/effect/gateway/active/cult/cultify() diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index 6e9f040f5c..e919be9527 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -121,7 +121,7 @@ datum/hSB var/obj/item/weapon/storage/hsb = new/obj/item/weapon/storage/toolbox/mechanical for(var/obj/item/device/radio/T in hsb) qdel(T) - new/obj/item/weapon/crowbar (hsb) + new/obj/item/weapon/tool/crowbar (hsb) hsb.loc = usr.loc if("hsbmedkit") var/obj/item/weapon/storage/firstaid/hsb = new/obj/item/weapon/storage/firstaid/regular diff --git a/code/game/gamemodes/technomancer/assistance/golem.dm b/code/game/gamemodes/technomancer/assistance/golem.dm index 6b8654e719..73e89b0d4a 100644 --- a/code/game/gamemodes/technomancer/assistance/golem.dm +++ b/code/game/gamemodes/technomancer/assistance/golem.dm @@ -100,7 +100,7 @@ active_spell = null return ..() -/mob/living/simple_animal/hostile/hivebot/death() +/mob/living/simple_animal/technomancer_golem/death() ..() visible_message("\The [src] disintegrates!") new /obj/effect/decal/cleanable/blood/gibs/robot(src.loc) diff --git a/code/game/gamemodes/technomancer/spells/control.dm b/code/game/gamemodes/technomancer/spells/control.dm index 78c709040a..428a5cf9be 100644 --- a/code/game/gamemodes/technomancer/spells/control.dm +++ b/code/game/gamemodes/technomancer/spells/control.dm @@ -28,24 +28,23 @@ /mob/living/simple_animal/chicken, /mob/living/simple_animal/corgi, /mob/living/simple_animal/cow, - /mob/living/simple_animal/crab, - /mob/living/simple_animal/lizard, + /mob/living/simple_mob/animal/passive/crab, + /mob/living/simple_mob/animal/passive/lizard, /mob/living/simple_animal/mouse, /mob/living/simple_animal/parrot, /mob/living/simple_animal/slime, -// /mob/living/simple_animal/adultslime, - /mob/living/simple_animal/tindalos, - /mob/living/simple_animal/yithian, + /mob/living/simple_mob/animal/passive/tindalos, + /mob/living/simple_mob/animal/passive/yithian, /mob/living/simple_animal/hostile/bear, /mob/living/simple_animal/hostile/carp, /mob/living/simple_animal/hostile/scarybat, - /mob/living/simple_animal/hostile/viscerator, - /mob/living/simple_animal/hostile/malf_drone, - /mob/living/simple_animal/hostile/giant_spider, - /mob/living/simple_animal/hostile/hivebot, - /mob/living/simple_animal/retaliate/diyaab, //Doubt these will get used but might as well, - /mob/living/simple_animal/hostile/savik, - /mob/living/simple_animal/hostile/shantak + /mob/living/simple_mob/mechanical/viscerator, + /mob/living/simple_mob/mechanical/combat_drone, + /mob/living/simple_mob/animal/giant_spider, + /mob/living/simple_mob/mechanical/hivebot, + /mob/living/simple_mob/animal/sif/diyaab, + /mob/living/simple_mob/animal/sif/savik, + /mob/living/simple_mob/animal/sif/shantak ) //This unfortunately is gonna be rather messy due to the various mobtypes involved. diff --git a/code/game/gamemodes/technomancer/spells/summon/summon_creature.dm b/code/game/gamemodes/technomancer/spells/summon/summon_creature.dm index 0e7e96104c..707e32c6d6 100644 --- a/code/game/gamemodes/technomancer/spells/summon/summon_creature.dm +++ b/code/game/gamemodes/technomancer/spells/summon/summon_creature.dm @@ -17,10 +17,10 @@ summoned_mob_type = null summon_options = list( "Mouse" = /mob/living/simple_animal/mouse, - "Lizard" = /mob/living/simple_animal/lizard, + "Lizard" = /mob/living/simple_mob/animal/passive/lizard, "Chicken" = /mob/living/simple_animal/chicken, "Chick" = /mob/living/simple_animal/chick, - "Crab" = /mob/living/simple_animal/crab, + "Crab" = /mob/living/simple_mob/animal/passive/crab, "Parrot" = /mob/living/simple_animal/parrot, "Goat" = /mob/living/simple_animal/retaliate/goat, "Cat" = /mob/living/simple_animal/cat, @@ -28,9 +28,9 @@ "Corgi" = /mob/living/simple_animal/corgi, "Corgi Pup" = /mob/living/simple_animal/corgi/puppy, "BAT" = /mob/living/simple_animal/hostile/scarybat, - "SPIDER" = /mob/living/simple_animal/hostile/giant_spider, - "SPIDER HUNTER" = /mob/living/simple_animal/hostile/giant_spider/hunter, - "SPIDER NURSE" = /mob/living/simple_animal/hostile/giant_spider/nurse, + "SPIDER" = /mob/living/simple_mob/animal/giant_spider, + "SPIDER HUNTER" = /mob/living/simple_mob/animal/giant_spider/hunter, + "SPIDER NURSE" = /mob/living/simple_mob/animal/giant_spider/nurse, "CARP" = /mob/living/simple_animal/hostile/carp, "BEAR" = /mob/living/simple_animal/hostile/bear ) diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm index a6c161982d..659377281e 100644 --- a/code/game/machinery/CableLayer.dm +++ b/code/game/machinery/CableLayer.dm @@ -35,7 +35,7 @@ user << "You load [result] lengths of cable into [src]." return - if(istype(O, /obj/item/weapon/wirecutters)) + if(O.is_wirecutter()) 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) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index a070ae9161..e19fc5c17c 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -240,7 +240,7 @@ update_flag ..() /obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if(!istype(W, /obj/item/weapon/wrench) && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda)) + if(!W.is_wrench() && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda)) visible_message("\The [user] hits \the [src] with \a [W]!") src.health -= W.force src.add_fingerprint(user) diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm index 71755cc246..0b1f4c3d77 100644 --- a/code/game/machinery/atmoalter/meter.dm +++ b/code/game/machinery/atmoalter/meter.dm @@ -105,7 +105,7 @@ return ..() /obj/machinery/meter/attackby(var/obj/item/W, var/mob/user) - if(iswrench(W)) + if(W.is_wrench()) playsound(src, W.usesound, 50, 1) to_chat(user, "You begin to unfasten \the [src]...") if(do_after(user, 40 * W.toolspeed)) @@ -117,7 +117,7 @@ qdel(src) return - if(ismultitool(W)) + if(istype(W, /obj/item/device/multitool)) for(var/obj/machinery/atmospherics/pipe/P in loc) pipes_on_turf |= P if(!pipes_on_turf.len) diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm index 84d00eff04..477353e739 100644 --- a/code/game/machinery/atmoalter/portable_atmospherics.dm +++ b/code/game/machinery/atmoalter/portable_atmospherics.dm @@ -113,10 +113,10 @@ update_icon() return - else if (istype(W, /obj/item/weapon/wrench)) + else if (W.is_wrench()) if(connected_port) disconnect() - user << "You disconnect \the [src] from the port." + to_chat(user, "You disconnect \the [src] from the port.") update_icon() playsound(src, W.usesound, 50, 1) return @@ -124,15 +124,15 @@ var/obj/machinery/atmospherics/portables_connector/possible_port = locate(/obj/machinery/atmospherics/portables_connector/) in loc if(possible_port) if(connect(possible_port)) - user << "You connect \the [src] to the port." + to_chat(user, "You connect \the [src] to the port.") update_icon() playsound(src, W.usesound, 50, 1) return else - user << "\The [src] failed to connect to the port." + to_chat(user, "\The [src] failed to connect to the port.") return else - user << "Nothing happens." + to_chat(user, "Nothing happens.") return else if ((istype(W, /obj/item/device/analyzer)) && Adjacent(user)) @@ -160,7 +160,7 @@ /obj/machinery/portable_atmospherics/powered/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/weapon/cell)) if(cell) - user << "There is already a power cell installed." + to_chat(user, "There is already a power cell installed.") return var/obj/item/weapon/cell/C = I @@ -173,9 +173,9 @@ power_change() return - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) if(!cell) - user << "There is no power cell installed." + to_chat(user, "There is no power cell installed.") return user.visible_message("[user] opens the panel on [src] and removes [cell].", "You open the panel on [src] and remove [cell].") diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index 860a1135a1..eb453ab2ba 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -166,7 +166,7 @@ name = "[name] (ID [id])" /obj/machinery/portable_atmospherics/powered/scrubber/huge/attack_hand(var/mob/user as mob) - usr << "You can't directly interact with this machine. Use the scrubber control console." + to_chat(user, "You can't directly interact with this machine. Use the scrubber control console.") /obj/machinery/portable_atmospherics/powered/scrubber/huge/update_icon() src.overlays = 0 @@ -205,21 +205,21 @@ update_connected_network() /obj/machinery/portable_atmospherics/powered/scrubber/huge/attackby(var/obj/item/I as obj, var/mob/user as mob) - if(istype(I, /obj/item/weapon/wrench)) + if(I.is_wrench()) if(on) - user << "Turn \the [src] off first!" + to_chat(user, "Turn \the [src] off first!") return anchored = !anchored playsound(src.loc, I.usesound, 50, 1) - user << "You [anchored ? "wrench" : "unwrench"] \the [src]." + to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") return //doesn't use power cells if(istype(I, /obj/item/weapon/cell)) return - if (istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) return //doesn't hold tanks @@ -233,8 +233,8 @@ 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(istype(I, /obj/item/weapon/wrench)) - user << "The bolts are too tight for you to unscrew!" + if(I.is_wrench()) + to_chat(user, "The bolts are too tight for you to unscrew!") return ..() diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 4daf8392de..02fb2f6b4d 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -50,7 +50,7 @@ update_recipe_list() if(..() || (disabled && !panel_open)) - user << "\The [src] is disabled!" + to_chat(user, "\The [src] is disabled!") return if(shocked) @@ -118,7 +118,7 @@ /obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob) if(busy) - user << "\The [src] is busy. Please wait for completion of previous operation." + to_chat(user, "\The [src] is busy. Please wait for completion of previous operation.") return if(default_deconstruction_screwdriver(user, O)) @@ -134,7 +134,7 @@ if(panel_open) //Don't eat multitools or wirecutters used on an open lathe. - if(istype(O, /obj/item/device/multitool) || istype(O, /obj/item/weapon/wirecutters)) + if(istype(O, /obj/item/device/multitool) || O.is_wirecutter()) attack_hand(user) return @@ -145,25 +145,25 @@ return 0 if(istype(O,/obj/item/ammo_magazine/clip) || istype(O,/obj/item/ammo_magazine/s357) || istype(O,/obj/item/ammo_magazine/s38)) // Prevents ammo recycling exploit with speedloaders. - user << "\The [O] is too hazardous to recycle with the autolathe!" + to_chat(user, "\The [O] is too hazardous to recycle with the autolathe!") return /* ToDo: Make this actually check for ammo and change the value of the magazine if it's empty. -Spades var/obj/item/ammo_magazine/speedloader = O if(speedloader.stored_ammo) - user << "\The [speedloader] is too hazardous to put back into the autolathe while there's ammunition inside of it!" + to_chat(user, "\The [speedloader] is too hazardous to put back into the autolathe while there's ammunition inside of it!") return else speedloader.matter = list(DEFAULT_WALL_MATERIAL = 75) // It's just a hunk of scrap metal now. if(istype(O,/obj/item/ammo_magazine)) // This was just for immersion consistency with above. var/obj/item/ammo_magazine/mag = O if(mag.stored_ammo) - user << "\The [mag] is too hazardous to put back into the autolathe while there's ammunition inside of it!" + to_chat(user, "\The [mag] is too hazardous to put back into the autolathe while there's ammunition inside of it!") return*/ //Resources are being loaded. var/obj/item/eating = O if(!eating.matter) - user << "\The [eating] does not contain significant amounts of useful materials and cannot be accepted." + to_chat(user, "\The [eating] does not contain significant amounts of useful materials and cannot be accepted.") return var/filltype = 0 // Used to determine message. @@ -196,12 +196,12 @@ mass_per_sheet += eating.matter[material] if(!filltype) - user << "\The [src] is full. Please remove material from the autolathe in order to insert more." + to_chat(user, "\The [src] is full. Please remove material from the autolathe in order to insert more.") return else if(filltype == 1) - user << "You fill \the [src] to capacity with \the [eating]." + to_chat(user, "You fill \the [src] to capacity with \the [eating].") else - user << "You fill \the [src] with \the [eating]." + to_chat(user, "You fill \the [src] with \the [eating].") flick("autolathe_o", src) // Plays metal insertion animation. Work out a good way to work out a fitting animation. ~Z @@ -227,7 +227,7 @@ add_fingerprint(usr) if(busy) - usr << "The autolathe is busy. Please wait for completion of previous operation." + to_chat(usr, "The autolathe is busy. Please wait for completion of previous operation.") return if(href_list["change_category"]) diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm index 4ad8d06a5a..346e26370f 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/game/machinery/biogenerator.dm @@ -50,43 +50,43 @@ return if(istype(O, /obj/item/weapon/reagent_containers/glass)) if(beaker) - user << "]The [src] is already loaded." + to_chat(user, "]The [src] is already loaded.") else user.remove_from_mob(O) O.loc = src beaker = O updateUsrDialog() else if(processing) - user << "\The [src] is currently processing." + to_chat(user, "\The [src] is currently processing.") else if(istype(O, /obj/item/weapon/storage/bag/plants)) var/i = 0 for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents) i++ if(i >= 10) - user << "\The [src] is already full! Activate it." + to_chat(user, "\The [src] is already full! Activate it.") else for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents) G.loc = src i++ if(i >= 10) - user << "You fill \the [src] to its capacity." + to_chat(user, "You fill \the [src] to its capacity.") break if(i < 10) - user << "You empty \the [O] into \the [src]." + to_chat(user, "You empty \the [O] into \the [src].") else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown)) - user << "You cannot put this in \the [src]." + to_chat(user, "You cannot put this in \the [src].") else var/i = 0 for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents) i++ if(i >= 10) - user << "\The [src] is full! Activate it." + to_chat(user, "\The [src] is full! Activate it.") else user.remove_from_mob(O) O.loc = src - user << "You put \the [O] in \the [src]" + to_chat(user, "You put \the [O] in \the [src]") update_icon() return @@ -151,7 +151,7 @@ if(stat) //NOPOWER etc return if(processing) - usr << "The biogenerator is in the process of working." + to_chat(usr, "The biogenerator is in the process of working.") return var/S = 0 for(var/obj/item/weapon/reagent_containers/food/snacks/grown/I in contents) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 85f324c387..484adf6068 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -151,7 +151,7 @@ /obj/machinery/camera/attackby(obj/item/W as obj, mob/living/user as mob) update_coverage() // DECONSTRUCTION - if(isscrewdriver(W)) + if(W.is_screwdriver()) //user << "You start to [panel_open ? "close" : "open"] the camera's panel." //if(toggle_panel(user)) // No delay because no one likes screwdrivers trying to be hip and have a duration cooldown panel_open = !panel_open @@ -159,10 +159,10 @@ "You screw the camera's panel [panel_open ? "open" : "closed"].") playsound(src.loc, W.usesound, 50, 1) - else if((iswirecutter(W) || ismultitool(W)) && panel_open) + else if((W.is_wirecutter() || istype(W, /obj/item/device/multitool)) && panel_open) interact(user) - else if(iswelder(W) && (wires.CanDeconstruct() || (stat & BROKEN))) + else if(istype(W, /obj/item/weapon/weldingtool) && (wires.CanDeconstruct() || (stat & BROKEN))) if(weld(W, user)) if(assembly) assembly.loc = src.loc diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 44cd61d1d9..72b32b95d3 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -29,7 +29,7 @@ if(0) // State 0 - if(iswrench(W) && isturf(src.loc)) + if(W.is_wrench() && isturf(src.loc)) playsound(src, W.usesound, 50, 1) user << "You wrench the assembly into place." anchored = 1 @@ -40,14 +40,14 @@ if(1) // State 1 - if(iswelder(W)) + if(istype(W, /obj/item/weapon/weldingtool)) if(weld(W, user)) user << "You weld the assembly securely into place." anchored = 1 state = 2 return - else if(iswrench(W)) + else if(W.is_wrench()) playsound(src, W.usesound, 50, 1) user << "You unattach the assembly from its place." anchored = 0 @@ -57,7 +57,7 @@ if(2) // State 2 - if(iscoil(W)) + if(istype(W, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = W if(C.use(2)) user << "You add wires to the assembly." @@ -66,7 +66,7 @@ user << "You need 2 coils of wire to wire the assembly." return - else if(iswelder(W)) + else if(istype(W, /obj/item/weapon/weldingtool)) 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.is_screwdriver()) playsound(src.loc, W.usesound, 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: "+using_map.station_short+",Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_DEFAULT)) @@ -115,7 +115,7 @@ break return - else if(iswirecutter(W)) + else if(W.is_wirecutter()) new/obj/item/stack/cable_coil(get_turf(src), 2) playsound(src.loc, W.usesound, 50, 1) @@ -132,7 +132,7 @@ return // Taking out upgrades - else if(iscrowbar(W) && upgrades.len) + else if(W.is_crowbar() && upgrades.len) var/obj/U = locate(/obj) in upgrades if(U) user << "You unattach an upgrade from the assembly." diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 6cb9e63eb5..bad819a985 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -61,7 +61,7 @@ user.visible_message("[user] inserts a cell into the charger.", "You insert a cell into the charger.") chargelevel = -1 update_icon() - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) if(charging) user << "Remove the cell first!" return diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 3f3508b968..69681d1775 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -252,7 +252,7 @@ user.drop_item() W.forceMove(src) return - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) if(locked && (anchored || occupant)) to_chat(user, "Can not do that while [src] is in use.") else diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 0e68f1e7a3..bc6da68332 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -14,75 +14,75 @@ switch(state) if(0) - if(istype(P, /obj/item/weapon/wrench)) + if(P.is_wrench()) playsound(loc, P.usesound, 50, 1) if(do_after(user, 20 * P.toolspeed)) - user << "You wrench the frame into place." + to_chat(user, "You wrench the frame into place.") anchored = 1 state = 1 if(istype(P, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = P if(!WT.isOn()) - user << "The welder must be on for this task." + to_chat(user, "The welder must be on for this task.") return playsound(loc, WT.usesound, 50, 1) if(do_after(user, 20 * WT.toolspeed)) if(!src || !WT.remove_fuel(0, user)) return - user << "You deconstruct the frame." + to_chat(user, "You deconstruct the frame.") new /obj/item/stack/material/plasteel( loc, 4) qdel(src) if(1) - if(istype(P, /obj/item/weapon/wrench)) + if(P.is_wrench()) playsound(loc, P.usesound, 50, 1) if(do_after(user, 20 * P.toolspeed)) - user << "You unfasten the frame." + to_chat(user, "You unfasten the frame.") anchored = 0 state = 0 if(istype(P, /obj/item/weapon/circuitboard/aicore) && !circuit) playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) - user << "You place the circuit board inside the frame." + to_chat(user, "You place the circuit board inside the frame.") icon_state = "1" circuit = P user.drop_item() P.loc = src - if(istype(P, /obj/item/weapon/screwdriver) && circuit) + if(P.is_screwdriver() && circuit) playsound(loc, P.usesound, 50, 1) - user << "You screw the circuit board into place." + to_chat(user, "You screw the circuit board into place.") state = 2 icon_state = "2" - if(istype(P, /obj/item/weapon/crowbar) && circuit) + if(P.is_crowbar() && circuit) playsound(loc, P.usesound, 50, 1) - user << "You remove the circuit board." + to_chat(user, "You remove the circuit board.") state = 1 icon_state = "0" circuit.loc = loc circuit = null if(2) - if(istype(P, /obj/item/weapon/screwdriver) && circuit) + if(P.is_screwdriver() && circuit) playsound(loc, P.usesound, 50, 1) - user << "You unfasten the circuit board." + to_chat(user, "You unfasten the circuit board.") state = 1 icon_state = "1" if(istype(P, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = P if (C.get_amount() < 5) - user << "You need five coils of wire to add them to the frame." + to_chat(user, "You need five coils of wire to add them to the frame.") return - user << "You start to add cables to the frame." + to_chat(user, "You start to add cables to the frame.") playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) if (do_after(user, 20) && state == 2) if (C.use(5)) state = 3 icon_state = "3" - user << "You add cables to the frame." + to_chat(user, "You add cables to the frame.") return if(3) - if(istype(P, /obj/item/weapon/wirecutters)) + if(P.is_wirecutter()) if (brain) - user << "Get that brain out of there first" + to_chat(user, "Get that brain out of there first") else playsound(loc, P.usesound, 50, 1) - user << "You remove the cables." + to_chat(user, "You remove the cables.") state = 2 icon_state = "2" var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc ) @@ -91,13 +91,13 @@ if(istype(P, /obj/item/stack/material) && P.get_material_name() == "rglass") var/obj/item/stack/RG = P if (RG.get_amount() < 2) - user << "You need two sheets of glass to put in the glass panel." + to_chat(user, "You need two sheets of glass to put in the glass panel.") return - user << "You start to put in the glass panel." + to_chat(user, "You start to put in the glass panel.") playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) if (do_after(user, 20) && state == 3) if(RG.use(2)) - user << "You put in the glass panel." + to_chat(user, "You put in the glass panel.") state = 4 icon_state = "4" @@ -126,14 +126,14 @@ if(istype(P, /obj/item/device/mmi)) var/obj/item/device/mmi/M = P if(!M.brainmob) - user << "Sticking an empty [P] into the frame would sort of defeat the purpose." + to_chat(user, "Sticking an empty [P] into the frame would sort of defeat the purpose.") return if(M.brainmob.stat == 2) - user << "Sticking a dead [P] into the frame would sort of defeat the purpose." + to_chat(user, "Sticking a dead [P] into the frame would sort of defeat the purpose.") return if(jobban_isbanned(M.brainmob, "AI")) - user << "This [P] does not seem to fit." + to_chat(user, "This [P] does not seem to fit.") return if(M.brainmob.mind) @@ -145,17 +145,17 @@ usr << "Added [P]." icon_state = "3b" - if(istype(P, /obj/item/weapon/crowbar) && brain) + if(P.is_crowbar() && brain) playsound(loc, P.usesound, 50, 1) - user << "You remove the brain." + to_chat(user, "You remove the brain.") brain.loc = loc brain = null icon_state = "3" if(4) - if(istype(P, /obj/item/weapon/crowbar)) + if(P.is_crowbar()) playsound(loc, P.usesound, 50, 1) - user << "You remove the glass panel." + to_chat(user, "You remove the glass panel.") state = 3 if (brain) icon_state = "3b" @@ -164,9 +164,9 @@ new /obj/item/stack/material/glass/reinforced( loc, 2 ) return - if(istype(P, /obj/item/weapon/screwdriver)) + if(P.is_screwdriver()) playsound(loc, P.usesound, 50, 1) - user << "You connect the monitor." + to_chat(user, "You connect the monitor.") if(!brain) var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes" var/obj/structure/AIcore/deactivated/D = new(loc) @@ -230,9 +230,9 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva if(transfer) load_ai(transfer,card,user) else - user << "ERROR: Unable to locate artificial intelligence." + to_chat(user, "ERROR: Unable to locate artificial intelligence.") return - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) if(anchored) user.visible_message("\The [user] starts to unbolt \the [src] from the plating...") playsound(src, W.usesound, 50, 1) @@ -270,7 +270,7 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva if(D in empty_playable_ai_cores) empty_playable_ai_cores -= D - src << "\The [id] is now not available for latejoining AIs." + to_chat(src, "\The [id] is now not available for latejoining AIs.") else empty_playable_ai_cores += D - src << "\The [id] is now available for latejoining AIs." + to_chat(src, "\The [id] is now available for latejoining AIs.") diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 6d7243c36c..960ce3dc35 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -13,75 +13,75 @@ /obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob) switch(state) if(0) - if(istype(P, /obj/item/weapon/wrench)) + if(P.is_wrench()) playsound(src.loc, P.usesound, 50, 1) if(do_after(user, 20 * P.toolspeed)) - user << "You wrench the frame into place." + to_chat(user, "You wrench the frame into place.") src.anchored = 1 src.state = 1 if(istype(P, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = P if(!WT.remove_fuel(0, user)) - user << "The welding tool must be on to complete this task." + to_chat(user, "The welding tool must be on to complete this task.") return playsound(src.loc, WT.usesound, 50, 1) if(do_after(user, 20 * WT.toolspeed)) if(!src || !WT.isOn()) return - user << "You deconstruct the frame." + to_chat(user, "You deconstruct the frame.") new /obj/item/stack/material/steel( src.loc, 5 ) qdel(src) if(1) - if(istype(P, /obj/item/weapon/wrench)) + if(P.is_wrench()) playsound(src.loc, P.usesound, 50, 1) if(do_after(user, 20 * P.toolspeed)) - user << "You unfasten the frame." + to_chat(user, "You unfasten the frame.") src.anchored = 0 src.state = 0 if(istype(P, /obj/item/weapon/circuitboard) && !circuit) var/obj/item/weapon/circuitboard/B = P if(B.board_type == "computer") playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - user << "You place the circuit board inside the frame." + to_chat(user, "You place the circuit board inside the frame.") src.icon_state = "1" src.circuit = P user.drop_item() P.loc = src else - user << "This frame does not accept circuit boards of this type!" - if(istype(P, /obj/item/weapon/screwdriver) && circuit) + to_chat(user, "This frame does not accept circuit boards of this type!") + if(P.is_screwdriver() && circuit) playsound(src.loc, P.usesound, 50, 1) - user << "You screw the circuit board into place." + to_chat(user, "You screw the circuit board into place.") src.state = 2 src.icon_state = "2" - if(istype(P, /obj/item/weapon/crowbar) && circuit) + if(P.is_crowbar()) && circuit) playsound(src.loc, P.usesound, 50, 1) - user << "You remove the circuit board." + to_chat(user, "You remove the circuit board.") src.state = 1 src.icon_state = "0" circuit.loc = src.loc src.circuit = null if(2) - if(istype(P, /obj/item/weapon/screwdriver) && circuit) + if(P.is_screwdriver() && circuit) playsound(src.loc, P.usesound, 50, 1) - user << "You unfasten the circuit board." + to_chat(user, "You unfasten the circuit board.") src.state = 1 src.icon_state = "1" if(istype(P, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = P if (C.get_amount() < 5) - user << "You need five coils of wire to add them to the frame." + to_chat(user, "You need five coils of wire to add them to the frame.") return - user << "You start to add cables to the frame." + to_chat(user, "You start to add cables to the frame.") playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) if(do_after(user, 20) && state == 2) if (C.use(5)) - user << "You add cables to the frame." + to_chat(user, "You add cables to the frame.") state = 3 icon_state = "3" if(3) - if(istype(P, /obj/item/weapon/wirecutters)) + if(P.is_wirecutter()) playsound(src.loc, P.usesound, 50, 1) - user << "You remove the cables." + to_chat(user, "You remove the cables.") src.state = 2 src.icon_state = "2" var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc ) @@ -90,25 +90,25 @@ if(istype(P, /obj/item/stack/material) && P.get_material_name() == "glass") var/obj/item/stack/G = P if (G.get_amount() < 2) - user << "You need two sheets of glass to put in the glass panel." + to_chat(user, "You need two sheets of glass to put in the glass panel.") return playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - user << "You start to put in the glass panel." + to_chat(user, "You start to put in the glass panel.") if(do_after(user, 20) && state == 3) if (G.use(2)) - user << "You put in the glass panel." + to_chat(user, "You put in the glass panel.") src.state = 4 src.icon_state = "4" if(4) - if(istype(P, /obj/item/weapon/crowbar)) + if(P.is_crowbar()) playsound(src.loc, P.usesound, 50, 1) - user << "You remove the glass panel." + to_chat(user, "You remove the glass panel.") src.state = 3 src.icon_state = "3" new /obj/item/stack/material/glass( src.loc, 2 ) - if(istype(P, /obj/item/weapon/screwdriver)) + if(P.is_screwdriver()) playsound(src.loc, P.usesound, 50, 1) - user << "You connect the monitor." + to_chat(user, "You connect the monitor.") var/B = new src.circuit.build_path ( src.loc ) src.circuit.construct(B) qdel(src) diff --git a/code/game/machinery/computer/camera_circuit.dm b/code/game/machinery/computer/camera_circuit.dm index 436703f724..347eb145c4 100644 --- a/code/game/machinery/computer/camera_circuit.dm +++ b/code/game/machinery/computer/camera_circuit.dm @@ -38,7 +38,7 @@ attackby(var/obj/item/I, var/mob/user)//if(health > 50) ..() - else if(istype(I,/obj/item/weapon/screwdriver)) + else if(I.is_screwdriver()) secured = !secured user.visible_message("The [src] can [secured ? "no longer" : "now"] be modified.") playsound(src, I.usesound, 50, 1) diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 92f69a70e1..36c2a894e7 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -106,11 +106,11 @@ if(istype(I,/obj/item/weapon/gripper)) //Behold, Grippers and their horribleness. If ..() is called by any computers' attackby() now or in the future, this should let grippers work with them appropriately. var/obj/item/weapon/gripper/B = I //B, for Borg. if(!B.wrapped) - user << "\The [B] is not holding anything." + to_chat(user, "\The [B] is not holding anything.") return else var/B_held = B.wrapped - user << "You use \the [B] to use \the [B_held] with \the [src]." + to_chat(user, "You use \the [B] to use \the [B_held] with \the [src].") playsound(src, "keyboard", 100, 1, 0) return attack_hand(user) diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index fd82940b6d..670b637152 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -36,7 +36,7 @@ return if(!istype(user)) return - if(isscrewdriver(O) && emag) + if(O.is_screwdriver() && emag) //Stops people from just unscrewing the monitor and putting it back to get the console working again. user << "It is too hot to mess with!" return diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index ee42ed18bd..1d210787de 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -52,11 +52,11 @@ /* /obj/machinery/computer/pod/attackby(I as obj, user as mob) - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) playsound(src.loc, W.usesound, 50, 1) if(do_after(user, 20)) if(stat & BROKEN) - user << "The broken glass falls out." + to_chat(user, "The broken glass falls out.") var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc ) new /obj/item/weapon/material/shard( loc ) @@ -80,7 +80,7 @@ A.anchored = 1 qdel(src) else - user << "You disconnect the monitor." + to_chat(user << "You disconnect the monitor.") var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc ) //generate appropriate circuitboard. Accounts for /pod/old computer types @@ -210,7 +210,7 @@ /obj/machinery/computer/pod/old/syndicate/attack_hand(var/mob/user as mob) if(!allowed(user)) - user << "Access Denied" + to_chat(user, "Access Denied") return else ..() diff --git a/code/game/machinery/computer/supply.dm b/code/game/machinery/computer/supply.dm index e76f4db468..08cd4fcc01 100644 --- a/code/game/machinery/computer/supply.dm +++ b/code/game/machinery/computer/supply.dm @@ -1,226 +1,196 @@ +// While it initially feels like the ordering console should be a subtype of the main console, +// their function is similar enough that the ordering console emerges as the less specialized, +// and therefore more deserving of parent-class status -- Ater + +// Supply requests console /obj/machinery/computer/supplycomp + name = "supply ordering console" + icon_screen = "request" + circuit = /obj/item/weapon/circuitboard/supplycomp + var/authorization = 0 + var/temp = null + var/reqtime = 0 //Cooldown for requisitions - Quarxink + var/can_order_contraband = 0 + var/active_category = null + var/menu_tab = 0 + var/list/expanded_packs = list() + +// Supply control console +/obj/machinery/computer/supplycomp/control name = "supply control console" icon_keyboard = "tech_key" icon_screen = "supply" light_color = "#b88b2e" req_access = list(access_cargo) circuit = /obj/item/weapon/circuitboard/supplycomp - var/temp = null - var/reqtime = 0 //Cooldown for requisitions - Quarxink - var/can_order_contraband = 0 - var/last_viewed_group = "categories" - -/obj/machinery/computer/ordercomp - name = "supply ordering console" - icon_screen = "request" - circuit = /obj/item/weapon/circuitboard/ordercomp - var/temp = null - var/reqtime = 0 //Cooldown for requisitions - Quarxink - var/last_viewed_group = "categories" - -/obj/machinery/computer/ordercomp/attack_ai(var/mob/user as mob) - return attack_hand(user) + authorization = SUP_SEND_SHUTTLE | SUP_ACCEPT_ORDERS /obj/machinery/computer/supplycomp/attack_ai(var/mob/user as mob) return attack_hand(user) -/obj/machinery/computer/ordercomp/attack_hand(var/mob/user as mob) - if(..()) - return - user.set_machine(src) - var/dat - if(temp) - dat = temp - else - var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle - if (shuttle) - dat += {"
Supply shuttle
- Location: [shuttle.has_arrive_time() ? "Moving to station ([shuttle.eta_minutes()] Mins.)":shuttle.at_station() ? "Docked":"Away"]
-
Supply points: [supply_controller.points]
-
\nRequest items

- View approved orders

- View requests

- \nView export report

- Close"} - - user << browse(dat, "window=computer;size=575x450") - onclose(user, "computer") - return - -/obj/machinery/computer/ordercomp/Topic(href, href_list) - if(..()) - return 1 - - if( isturf(loc) && (in_range(src, usr) || istype(usr, /mob/living/silicon)) ) - usr.set_machine(src) - - if(href_list["order"]) - if(href_list["order"] == "categories") - //all_supply_groups - //Request what? - last_viewed_group = "categories" - temp = "Supply points: [supply_controller.points]
" - temp += "Main Menu


" - temp += "Select a category

" - for(var/supply_group_name in all_supply_groups ) - temp += "[supply_group_name]
" - else - last_viewed_group = href_list["order"] - temp = "Supply points: [supply_controller.points]
" - temp += "Back to all categories


" - temp += "Request from: [last_viewed_group]

" - for(var/supply_name in supply_controller.supply_packs ) - var/datum/supply_packs/N = supply_controller.supply_packs[supply_name] - if(N.hidden || N.contraband || N.group != last_viewed_group) continue //Have to send the type instead of a reference to - temp += "[supply_name] Cost: [N.cost]
" //the obj because it would get caught by the garbage - - else if (href_list["doorder"]) - if(world.time < reqtime) - for(var/mob/V in hearers(src)) - V.show_message("[src]'s monitor flashes, \"[world.time - reqtime] seconds remaining until another requisition form may be printed.\"") - return - - //Find the correct supply_pack datum - var/datum/supply_packs/P = supply_controller.supply_packs[href_list["doorder"]] - if(!istype(P)) return - - var/timeout = world.time + 600 - var/reason = sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text) - if(world.time > timeout) return - if(!reason) return - - var/idname = "*None Provided*" - var/idrank = "*None Provided*" - if(ishuman(usr)) - var/mob/living/carbon/human/H = usr - idname = H.get_authentification_name() - idrank = H.get_assignment() - else if(issilicon(usr)) - idname = usr.real_name - - supply_controller.ordernum++ - var/obj/item/weapon/paper/reqform = new /obj/item/weapon/paper(loc) - reqform.name = "Requisition Form - [P.name]" - reqform.info += "

[station_name()] Supply Requisition Form


" - reqform.info += "INDEX: #[supply_controller.ordernum]
" - reqform.info += "REQUESTED BY: [idname]
" - reqform.info += "RANK: [idrank]
" - reqform.info += "REASON: [reason]
" - reqform.info += "SUPPLY CRATE TYPE: [P.name]
" - reqform.info += "ACCESS RESTRICTION: [get_access_desc(P.access)]
" - reqform.info += "CONTENTS:
" - reqform.info += P.manifest - reqform.info += "
" - reqform.info += "STAMP BELOW TO APPROVE THIS REQUISITION:
" - - reqform.update_icon() //Fix for appearing blank when printed. - reqtime = (world.time + 5) % 1e5 - - //make our supply_order datum - var/datum/supply_order/O = new /datum/supply_order() - O.ordernum = supply_controller.ordernum - O.object = P - O.orderedby = idname - supply_controller.requestlist += O - - temp = "Thanks for your request. The cargo team will process it as soon as possible.
" - temp += "
Back Main Menu" - - else if (href_list["vieworders"]) - temp = "Current approved orders:

" - for(var/S in supply_controller.shoppinglist) - var/datum/supply_order/SO = S - temp += "[SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]
" - temp += "
OK" - - else if (href_list["viewrequests"]) - temp = "Current requests:

" - for(var/S in supply_controller.requestlist) - var/datum/supply_order/SO = S - temp += "#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby]
" - temp += "
OK" - - else if (href_list["mainmenu"]) - temp = null - - add_fingerprint(usr) - updateUsrDialog() - return - /obj/machinery/computer/supplycomp/attack_hand(var/mob/user as mob) - if(!allowed(user)) - user << "Access Denied." - return - if(..()) return user.set_machine(src) - post_signal("supply") - var/dat - if (temp) - dat = temp - else - var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle - if (shuttle) - dat += "
Supply shuttle
" - dat += "\nLocation: " - if (shuttle.has_arrive_time()) - dat += "In transit ([shuttle.eta_minutes()] Mins.)
" - else - if (shuttle.at_station()) - if (shuttle.docking_controller) - switch(shuttle.docking_controller.get_docking_status()) - if ("docked") dat += "Docked at station
" - if ("undocked") dat += "Undocked from station
" - if ("docking") dat += "Docking with station [shuttle.can_force()? "Force Launch" : ""]
" - if ("undocking") dat += "Undocking from station [shuttle.can_force()? "Force Launch" : ""]
" - else - dat += "Station
" - - if (shuttle.can_launch()) - dat += "Send away" - else if (shuttle.can_cancel()) - dat += "Cancel launch" - else - dat += "*Shuttle is busy*" - dat += "
\n
" - else - dat += "Away
" - if (shuttle.can_launch()) - dat += "Request supply shuttle" - else if (shuttle.can_cancel()) - dat += "Cancel request" - else - dat += "*Shuttle is busy*" - dat += "
\n
" - - - dat += {"
\nSupply points: [supply_controller.points]
\n
- \nOrder items
\n
- \nView requests
\n
- \nView orders
\n
- \nView export report
\n
- \nClose"} - - - user << browse(dat, "window=computer;size=575x450") - onclose(user, "computer") + ui_interact(user) return /obj/machinery/computer/supplycomp/emag_act(var/remaining_charges, var/mob/user) if(!can_order_contraband) - user << "Special supplies unlocked." - can_order_contraband = 1 + to_chat(user, "Special supplies unlocked.") + authorization |= SUP_CONTRABAND req_access = list() return 1 + + + +/obj/machinery/computer/supplycomp/ui_interact(mob/user, ui_key = "supply_records", var/datum/nanoui/ui = null, var/force_open = 1, var/key_state = null) + var/data[0] + var/shuttle_status[0] // Supply shuttle status + var/pack_list[0] // List of supply packs within the active_category + var/orders[0] + var/receipts[0] + + var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle + if(shuttle) + if(shuttle.has_arrive_time()) + shuttle_status["location"] = "In transit" + shuttle_status["mode"] = SUP_SHUTTLE_TRANSIT + shuttle_status["time"] = shuttle.eta_minutes() + + else + shuttle_status["time"] = 0 + if(shuttle.at_station()) + if(shuttle.docking_controller) + switch(shuttle.docking_controller.get_docking_status()) + if("docked") + shuttle_status["location"] = "Docked" + shuttle_status["mode"] = SUP_SHUTTLE_DOCKED + if("undocked") + shuttle_status["location"] = "Undocked" + shuttle_status["mode"] = SUP_SHUTTLE_UNDOCKED + if("docking") + shuttle_status["location"] = "Docking" + shuttle_status["mode"] = SUP_SHUTTLE_DOCKING + shuttle_status["force"] = shuttle.can_force() + if("undocking") + shuttle_status["location"] = "Undocking" + shuttle_status["mode"] = SUP_SHUTTLE_UNDOCKING + shuttle_status["force"] = shuttle.can_force() + + else + shuttle_status["location"] = "Station" + shuttle_status["mode"] = SUP_SHUTTLE_DOCKED + + else + shuttle_status["location"] = "Away" + shuttle_status["mode"] = SUP_SHUTTLE_AWAY + + if(shuttle.can_launch()) + shuttle_status["launch"] = 1 + else if(shuttle.can_cancel()) + shuttle_status["launch"] = 2 + else + shuttle_status["launch"] = 0 + + switch(shuttle.moving_status) + if(SHUTTLE_IDLE) + shuttle_status["engine"] = "Idle" + if(SHUTTLE_WARMUP) + shuttle_status["engine"] = "Warming up" + if(SHUTTLE_INTRANSIT) + shuttle_status["engine"] = "Engaged" + + else + shuttle["mode"] = SUP_SHUTTLE_ERROR + + for(var/pack_name in supply_controller.supply_pack) + var/datum/supply_pack/P = supply_controller.supply_pack[pack_name] + if(P.group == active_category) + var/list/pack = list( + "name" = P.name, + "cost" = P.cost, + "contraband" = P.contraband, + "manifest" = uniquelist(P.manifest), + "random" = P.num_contained, + "expand" = 0, + "ref" = "\ref[P]" + ) + + if(P in expanded_packs) + pack["expand"] = 1 + + pack_list[++pack_list.len] = pack + + // Compile user-side orders + // Status determines which menus the entry will display in + // Organized in field-entry list for iterative display + // List is nested so both the list of orders, and the list of elements in each order, can be iterated over + for(var/datum/supply_order/S in supply_controller.order_history) + orders[++orders.len] = list( + "ref" = "\ref[S]", + "status" = S.status, + "entries" = list( + list("field" = "Supply Pack", "entry" = S.name), + list("field" = "Cost", "entry" = S.cost), + list("field" = "Index", "entry" = S.index), + list("field" = "Reason", "entry" = S.comment), + list("field" = "Ordered by", "entry" = S.ordered_by), + list("field" = "Ordered at", "entry" = S.ordered_at), + list("field" = "Approved by", "entry" = S.approved_by), + list("field" = "Approved at", "entry" = S.approved_at) + ) + ) + + // Compile exported crates + for(var/datum/exported_crate/E in supply_controller.exported_crates) + receipts[++receipts.len] = list( + "ref" = "\ref[E]", + "contents" = E.contents, + "error" = E.contents["error"], + "title" = list( + list("field" = "Name", "entry" = E.name), + list("field" = "Value", "entry" = E.value) + ) + ) + + data["user"] = "\ref[user]" + data["currentTab"] = menu_tab // Communicator compatibility, controls which menu is in use + data["shuttle_auth"] = (authorization & SUP_SEND_SHUTTLE) // Whether this ui is permitted to control the supply shuttle + data["order_auth"] = (authorization & SUP_ACCEPT_ORDERS) // Whether this ui is permitted to accept/deny requested orders + data["shuttle"] = shuttle_status + data["supply_points"] = supply_controller.points + data["categories"] = all_supply_groups + data["active_category"] = active_category + data["supply_packs"] = pack_list + data["orders"] = orders + data["receipts"] = receipts + data["contraband"] = can_order_contraband + + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "supply_records.tmpl", "Supply Console", 475, 700, state = key_state) + // when the ui is first opened this is the data it will use + ui.set_initial_data(data) + // open the new ui window + ui.open() + // auto update every 20 Master Controller tick + ui.set_auto_update(20) // Longer term to reduce the rate of data collection and processing + + + + /obj/machinery/computer/supplycomp/Topic(href, href_list) if(!supply_controller) - world.log << "## ERROR: Eek. The supply_controller controller datum is missing somehow." + world.log << "## ERROR: The supply_controller datum is missing." return var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle if (!shuttle) - world.log << "## ERROR: Eek. The supply/shuttle datum is missing somehow." + world.log << "## ERROR: The supply shuttle datum is missing." return if(..()) return 1 @@ -228,177 +198,213 @@ if(isturf(loc) && ( in_range(src, usr) || istype(usr, /mob/living/silicon) ) ) usr.set_machine(src) - //Calling the shuttle - if(href_list["send"]) - if(shuttle.at_station()) - if (shuttle.forbidden_atoms_check()) - temp = "For safety reasons the automated supply shuttle cannot transport live organisms, classified nuclear weaponry or homing beacons.

OK" - else - shuttle.launch(src) - temp = "Initiating launch sequence. \[Force Launch\]

OK" - else - shuttle.launch(src) - temp = "The supply shuttle has been called and will arrive in approximately [round(supply_controller.movetime/600,1)] minutes.

OK" - post_signal("supply") + // NEW TOPIC - if (href_list["force_send"]) - shuttle.force_launch(src) + // Switch menu + if(href_list["switch_tab"]) + menu_tab = href_list["switch_tab"] - if (href_list["cancel_send"]) - shuttle.cancel_launch(src) + if(href_list["active_category"]) + active_category = href_list["active_category"] - else if (href_list["order"]) - //if(!shuttle.idle()) return //this shouldn't be necessary it seems - if(href_list["order"] == "categories") - //all_supply_groups - //Request what? - last_viewed_group = "categories" - temp = "Supply points: [supply_controller.points]
" - temp += "Main Menu


" - temp += "Select a category

" - for(var/supply_group_name in all_supply_groups ) - temp += "[supply_group_name]
" - else - last_viewed_group = href_list["order"] - temp = "Supply points: [supply_controller.points]
" - temp += "Back to all categories


" - temp += "Request from: [last_viewed_group]

" - for(var/supply_name in supply_controller.supply_packs ) - var/datum/supply_packs/N = supply_controller.supply_packs[supply_name] - if((N.contraband && !can_order_contraband) || N.group != last_viewed_group) continue //Have to send the type instead of a reference to - temp += "[supply_name] Cost: [N.cost]
" //the obj because it would get caught by the garbage + if(href_list["pack_ref"]) + var/datum/supply_pack/S = locate(href_list["pack_ref"]) - else if (href_list["doorder"]) - if(world.time < reqtime) - for(var/mob/V in hearers(src)) - V.show_message("[src]'s monitor flashes, \"[world.time - reqtime] seconds remaining until another requisition form may be printed.\"") + // Invalid ref + if(!istype(S)) return - //Find the correct supply_pack datum - var/datum/supply_packs/P = supply_controller.supply_packs[href_list["doorder"]] - if(!istype(P)) return + // Expand the supply pack's contents + if(href_list["expand"]) + expanded_packs ^= S - var/timeout = world.time + 600 - var/reason = sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text) - if(world.time > timeout) return - if(!reason) return + // Make a request for the pack + if(href_list["request"]) + var/mob/user = locate(href_list["user"]) + if(!istype(user)) // Invalid ref + return - var/idname = "*None Provided*" - var/idrank = "*None Provided*" - if(ishuman(usr)) - var/mob/living/carbon/human/H = usr - idname = H.get_authentification_name() - idrank = H.get_assignment() - else if(issilicon(usr)) - idname = usr.real_name + if(world.time < reqtime) + visible_message("[src]'s monitor flashes, \"[reqtime - world.time] seconds remaining until another requisition form may be printed.\"") + return - supply_controller.ordernum++ - var/obj/item/weapon/paper/reqform = new /obj/item/weapon/paper(loc) - reqform.name = "Requisition Form - [P.name]" - reqform.info += "

[station_name()] Supply Requisition Form


" - reqform.info += "INDEX: #[supply_controller.ordernum]
" - reqform.info += "REQUESTED BY: [idname]
" - reqform.info += "RANK: [idrank]
" - reqform.info += "REASON: [reason]
" - reqform.info += "SUPPLY CRATE TYPE: [P.name]
" - reqform.info += "ACCESS RESTRICTION: [get_access_desc(P.access)]
" - reqform.info += "CONTENTS:
" - reqform.info += P.manifest - reqform.info += "
" - reqform.info += "STAMP BELOW TO APPROVE THIS REQUISITION:
" + var/timeout = world.time + 600 + var/reason = sanitize(input(user, "Reason:","Why do you require this item?","") as null|text) + if(world.time > timeout) + to_chat(user, "Error. Request timed out.") + return + if(!reason) + return - reqform.update_icon() //Fix for appearing blank when printed. - reqtime = (world.time + 5) % 1e5 + supply_controller.create_order(S, user, reason) - //make our supply_order datum - var/datum/supply_order/O = new /datum/supply_order() - O.ordernum = supply_controller.ordernum - O.object = P - O.orderedby = idname - supply_controller.requestlist += O + var/idname = "*None Provided*" + var/idrank = "*None Provided*" + if(ishuman(user)) + var/mob/living/carbon/human/H = user + idname = H.get_authentification_name() + idrank = H.get_assignment() + else if(issilicon(user)) + idname = user.real_name + idrank = "Stationbound synthetic" - temp = "Order request placed.
" - temp += "
Back | Main Menu | Authorize Order" + var/obj/item/weapon/paper/reqform = new /obj/item/weapon/paper(loc) + reqform.name = "Requisition Form - [S.name]" + reqform.info += "

[station_name()] Supply Requisition Form


" + reqform.info += "INDEX: #[supply_controller.ordernum]
" + reqform.info += "REQUESTED BY: [idname]
" + reqform.info += "RANK: [idrank]
" + reqform.info += "REASON: [reason]
" + reqform.info += "SUPPLY CRATE TYPE: [S.name]
" + reqform.info += "ACCESS RESTRICTION: [get_access_desc(S.access)]
" + reqform.info += "CONTENTS:
" + reqform.info += S.get_html_manifest() + reqform.info += "
" + reqform.info += "STAMP BELOW TO APPROVE THIS REQUISITION:
" - else if(href_list["confirmorder"]) - //Find the correct supply_order datum - var/ordernum = text2num(href_list["confirmorder"]) - var/datum/supply_order/O - var/datum/supply_packs/P - temp = "Invalid Request" - for(var/i=1, i<=supply_controller.requestlist.len, i++) - var/datum/supply_order/SO = supply_controller.requestlist[i] - if(SO.ordernum == ordernum) - O = SO - P = O.object - if(supply_controller.points >= P.cost) - supply_controller.requestlist.Cut(i,i+1) - supply_controller.points -= P.cost - supply_controller.shoppinglist += O - temp = "Thanks for your order.
" - temp += "
Back Main Menu" - else - temp = "Not enough supply points.
" - temp += "
Back Main Menu" - break + reqform.update_icon() //Fix for appearing blank when printed. + reqtime = (world.time + 5) % 1e5 - else if (href_list["vieworders"]) - temp = "Current approved orders:

" - for(var/S in supply_controller.shoppinglist) - var/datum/supply_order/SO = S - temp += "#[SO.ordernum] - [SO.object.name] approved by [SO.orderedby][SO.comment ? " ([SO.comment])":""]
"// (Cancel)
" - temp += "
OK" -/* - else if (href_list["cancelorder"]) - var/datum/supply_order/remove_supply = href_list["cancelorder"] - supply_shuttle_shoppinglist -= remove_supply - supply_shuttle_points += remove_supply.object.cost - temp += "Canceled: [remove_supply.object.name]


" + if(href_list["order_ref"]) + var/datum/supply_order/O = locate(href_list["order_ref"]) - for(var/S in supply_shuttle_shoppinglist) - var/datum/supply_order/SO = S - temp += "[SO.object.name] approved by [SO.orderedby][SO.comment ? " ([SO.comment])":""] (Cancel)
" - temp += "
OK" -*/ - else if (href_list["viewrequests"]) - temp = "Current requests:

" - for(var/S in supply_controller.requestlist) - var/datum/supply_order/SO = S - temp += "#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby] Approve Remove
" + // Invalid ref + if(!istype(O)) + return - temp += "
Clear list" - temp += "
OK" + var/mob/user = locate(href_list["user"]) + if(!istype(user)) // Invalid ref + return - else if (href_list["viewexport"]) - temp = "Previous shuttle export report:

" - var/cratecount = 0 - var/totalvalue = 0 - for(var/S in supply_controller.exported_crates) - var/datum/exported_crate/EC = S - cratecount += 1 - totalvalue += EC.value - temp += "[EC.name] exported for [EC.value] supply points
" - temp += "
Shipment of [cratecount] crates exported for [totalvalue] supply points.
" - temp += "
OK" + if(href_list["edit"]) + var/new_val = sanitize(input(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]) as null|text) + if(!new_val) + return - else if (href_list["rreq"]) - var/ordernum = text2num(href_list["rreq"]) - temp = "Invalid Request.
" - for(var/i=1, i<=supply_controller.requestlist.len, i++) - var/datum/supply_order/SO = supply_controller.requestlist[i] - if(SO.ordernum == ordernum) - supply_controller.requestlist.Cut(i,i+1) - temp = "Request removed.
" - break - temp += "
Back Main Menu" + switch(href_list["edit"]) + if("Supply Pack") + O.name = new_val - else if (href_list["clearreq"]) - supply_controller.requestlist.Cut() - temp = "List cleared.
" - temp += "
OK" + if("Cost") + var/num = text2num(new_val) + if(num) + O.cost = num - else if (href_list["mainmenu"]) - temp = null + if("Index") + var/num = text2num(new_val) + if(num) + O.index = num + + if("Reason") + O.comment = new_val + + if("Ordered by") + O.ordered_by = new_val + + if("Ordered at") + O.ordered_at = new_val + + if("Approved by") + O.approved_by = new_val + + if("Approved at") + O.approved_at = new_val + + if(href_list["approve"]) + supply_controller.approve_order(O, user) + + if(href_list["deny"]) + supply_controller.deny_order(O, user) + + if(href_list["delete"]) + supply_controller.delete_order(O, user) + + if(href_list["clear_all_requests"]) + var/mob/user = locate(href_list["user"]) + if(!istype(user)) // Invalid ref + return + + supply_controller.deny_all_pending(user) + + if(href_list["export_ref"]) + var/datum/exported_crate/E = locate(href_list["export_ref"]) + + // Invalid ref + if(!istype(E)) + return + + var/mob/user = locate(href_list["user"]) + if(!istype(user)) // Invalid ref + return + + if(href_list["index"]) + var/list/L = E.contents[href_list["index"]] + + if(href_list["edit"]) + var/field = alert(user, "Select which field to edit", , "Name", "Quantity", "Value") + + var/new_val = sanitize(input(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]) as null|text) + if(!new_val) + return + + switch(field) + if("Name") + L["object"] = new_val + + if("Quantity") + var/num = text2num(new_val) + if(num) + L["quantity"] = num + + if("Value") + var/num = text2num(new_val) + if(num) + L["value"] = num + + if(href_list["delete"]) + E.contents.Cut(href_list["index"], href_list["index"] + 1) + + // Else clause means they're editing/deleting the whole export report, rather than a specific item in it + else if(href_list["edit"]) + var/new_val = sanitize(input(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]) as null|text) + if(!new_val) + return + + switch(href_list["edit"]) + if("Name") + E.name = new_val + + if("Value") + var/num = text2num(new_val) + if(num) + E.value = num + + else if(href_list["delete"]) + supply_controller.delete_export(E, user) + + else if(href_list["add_item"]) + supply_controller.add_export_item(E, user) + + + + switch(href_list["send_shuttle"]) + if("send_away") + if (shuttle.forbidden_atoms_check()) + to_chat(usr, "For safety reasons the automated supply shuttle cannot transport live organisms, classified nuclear weaponry or homing beacons.") + else + shuttle.launch(src) + to_chat(usr, "Initiating launch sequence.") + + if("send_to_station") + shuttle.launch(src) + to_chat(usr, "The supply shuttle has been called and will arrive in approximately [round(supply_controller.movetime/600,1)] minutes.") + post_signal("supply") + + if("cancel_shuttle") + shuttle.cancel_launch(src) + + if("force_shuttle") + shuttle.force_launch(src) add_fingerprint(usr) updateUsrDialog() diff --git a/code/game/machinery/computer3/buildandrepair.dm b/code/game/machinery/computer3/buildandrepair.dm index 14270bf144..928675769c 100644 --- a/code/game/machinery/computer3/buildandrepair.dm +++ b/code/game/machinery/computer3/buildandrepair.dm @@ -78,7 +78,7 @@ /obj/structure/computer3frame/attackby(obj/item/P as obj, mob/user as mob) switch(state) if(0) - if(istype(P, /obj/item/weapon/wrench)) + if(P.is_wrench()) playsound(src.loc, P.usesound, 50, 1) if(do_after(user, 20 * P.toolspeed)) to_chat(user, "You wrench the frame into place.") @@ -96,7 +96,7 @@ new /obj/item/stack/material/steel( src.loc, 5 ) qdel(src) if(1) - if(istype(P, /obj/item/weapon/wrench)) + if(P.is_wrench()) playsound(src.loc, P.usesound, 50, 1) if(do_after(user, 20 * P.toolspeed)) to_chat(user, "You unfasten the frame.") @@ -113,12 +113,12 @@ P.loc = src else to_chat(user, "This frame does not accept circuit boards of this type!") - if(istype(P, /obj/item/weapon/screwdriver) && circuit) + if(P.is_screwdriver() && circuit) playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You screw the circuit board into place.") src.state = 2 src.icon_state = "2" - if(istype(P, /obj/item/weapon/crowbar) && circuit) + if(P.is_crowbar() && circuit) playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You remove the circuit board.") src.state = 1 @@ -126,13 +126,13 @@ circuit.loc = src.loc src.circuit = null if(2) - if(istype(P, /obj/item/weapon/screwdriver) && circuit) + if(P.is_screwdriver() && circuit) playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You unfasten the circuit board.") src.state = 1 src.icon_state = "1" - if(istype(P, /obj/item/weapon/crowbar)) + if(P.is_crowbar()) if(battery) playsound(src.loc, P.usesound, 50, 1) if(do_after(10 * P.toolspeed)) @@ -164,7 +164,7 @@ src.state = 3 src.icon_state = "3" if(3) - if(istype(P, /obj/item/weapon/wirecutters)) + if(P.is_wirecutter()) if(components.len) to_chat(user, "There are parts in the way!") return @@ -175,7 +175,7 @@ var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc ) A.amount = 5 - if(istype(P, /obj/item/weapon/crowbar)) // complicated check + if(P.is_crowbar()) remove_peripheral() if(istype(P, /obj/item/stack/material) && P.get_material_name() == "glass") @@ -189,13 +189,13 @@ src.state = 4 src.icon_state = "4" if(4) - if(istype(P, /obj/item/weapon/crowbar)) + if(P.is_crowbar()) playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You remove the glass panel.") src.state = 3 src.icon_state = "3" new /obj/item/stack/material/glass( src.loc, 2 ) - if(istype(P, /obj/item/weapon/screwdriver)) + if(P.is_screwdriver()) playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You connect the monitor.") var/obj/machinery/computer3/B = new src.circuit.build_path ( src.loc, built=1 ) diff --git a/code/game/machinery/computer3/computer.dm b/code/game/machinery/computer3/computer.dm index 930ee6adcd..c9d8eb22de 100644 --- a/code/game/machinery/computer3/computer.dm +++ b/code/game/machinery/computer3/computer.dm @@ -309,8 +309,8 @@ if(os) os.error = BUSTED_ASS_COMPUTER -/obj/machinery/computer3/attackby(I as obj, mob/user as mob) - if(istype(I, /obj/item/weapon/screwdriver) && allow_disassemble) +/obj/machinery/computer3/attackby(obj/item/I as obj, mob/user as mob) + if(I.is_screwdriver() && allow_disassemble) disassemble(user) return diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index c3b6e010d6..e74ffb7cf9 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -31,19 +31,19 @@ if(istype(P, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = P if (C.get_amount() < 5) - user << "You need five lengths of cable to add them to the frame." + to_chat(user, "You need five lengths of cable to add them to the frame.") return playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - user << "You start to add cables to the frame." + to_chat(user, "You start to add cables to the frame.") if(do_after(user, 20) && state == 1) if(C.use(5)) - user << "You add cables to the frame." + to_chat(user, "You add cables to the frame.") state = 2 icon_state = "box_1" else - if(istype(P, /obj/item/weapon/wrench)) + if(P.is_wrench()) playsound(src, W.usesound, 75, 1) - user << "You dismantle the frame" + to_chat(user, "You dismantle the frame") new /obj/item/stack/material/steel(src.loc, 5) qdel(src) if(2) @@ -51,7 +51,7 @@ var/obj/item/weapon/circuitboard/B = P if(B.board_type == "machine") playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - user << "You add the circuit board to the frame." + to_chat(user, "You add the circuit board to the frame.") circuit = P user.drop_item() P.loc = src @@ -67,28 +67,28 @@ var/obj/ct = new cp() // have to quickly instantiate it get name req_component_names[A] = ct.name update_desc() - user << desc + to_chat(user, desc) else - user << "This frame does not accept circuit boards of this type!" + to_chat(user, "This frame does not accept circuit boards of this type!") else - if(istype(P, /obj/item/weapon/wirecutters)) + if(P.is_wirecutter()) playsound(src.loc, P.usesound, 50, 1) - user << "You remove the cables." + to_chat(user, "You remove the cables.") state = 1 icon_state = "box_0" var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc ) A.amount = 5 if(3) - if(istype(P, /obj/item/weapon/crowbar)) + if(P.is_crowbar()) playsound(src, P.usesound, 50, 1) state = 2 circuit.loc = src.loc circuit = null if(components.len == 0) - user << "You remove the circuit board." + to_chat(user, "You remove the circuit board.") else - user << "You remove the circuit board and other components." + to_chat(user, "You remove the circuit board and other components.") for(var/obj/item/weapon/W in components) W.loc = src.loc desc = initial(desc) @@ -96,7 +96,7 @@ components = null icon_state = "box_1" else - if(istype(P, /obj/item/weapon/screwdriver)) + if(P.is_screwdriver()) var/component_check = 1 for(var/R in req_components) if(req_components[R] > 0) @@ -132,7 +132,7 @@ for(var/I in req_components) if(istype(P, text2path(I)) && (req_components[I] > 0)) playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(istype(P, /obj/item/stack/cable_coil)) + if(P.is_cable_coil)) var/obj/item/stack/cable_coil/CP = P if(CP.get_amount() > 1) var/camt = min(CP.amount, req_components[I]) // amount of cable to take, idealy amount required, but limited by amount provided @@ -150,6 +150,6 @@ req_components[I]-- update_desc() break - user << desc + to_chat(user, desc) if(P && P.loc != src && !istype(P, /obj/item/stack/cable_coil)) - user << "You cannot add that component to the machine!" + to_chat(user, "You cannot add that component to the machine!") diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 6c68620644..adb4a5f35a 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -185,7 +185,7 @@ /obj/machinery/atmospherics/unary/cryo_cell/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob) if(istype(G, /obj/item/weapon/reagent_containers/glass)) if(beaker) - user << "A beaker is already loaded into the machine." + to_chat(user, "A beaker is already loaded into the machine.") return beaker = G @@ -201,12 +201,12 @@ to_chat(user,"\The [src] is already occupied by [occupant].") for(var/mob/living/simple_animal/slime/M in range(1,grab.affecting)) if(M.victim == grab.affecting) - usr << "[grab.affecting.name] will not fit into the cryo because they have a slime latched onto their head." + to_chat(usr, "[grab.affecting.name] will not fit into the cryo because they have a slime latched onto their head.") return var/mob/M = grab.affecting qdel(grab) put_mob(M) - + return /obj/machinery/atmospherics/unary/cryo_cell/MouseDrop_T(var/mob/target, var/mob/user) //Allows borgs to put people into cryo without external assistance @@ -293,19 +293,19 @@ return /obj/machinery/atmospherics/unary/cryo_cell/proc/put_mob(mob/living/carbon/M as mob) if(stat & (NOPOWER|BROKEN)) - usr << "The cryo cell is not functioning." + to_chat(usr, "The cryo cell is not functioning.") return if(!istype(M)) - usr << "The cryo cell cannot handle such a lifeform!" + to_chat(usr, "The cryo cell cannot handle such a lifeform!") return if(occupant) - usr << "The cryo cell is already occupied!" + to_chat(usr, "The cryo cell is already occupied!") return if(M.abiotic()) - usr << "Subject may not have abiotic items on." + to_chat(usr, "Subject may not have abiotic items on.") return if(!node) - usr << "The cell is not correctly connected to its pipe network!" + to_chat(usr, "The cell is not correctly connected to its pipe network!") return if(M.client) M.client.perspective = EYE_PERSPECTIVE @@ -314,7 +314,7 @@ M.loc = src M.ExtinguishMob() if(M.health > -100 && (M.health < 0 || M.sleeping)) - M << "You feel a cold liquid surround you. Your skin starts to freeze up." + to_chat(M, "You feel a cold liquid surround you. Your skin starts to freeze up.") occupant = M buckle_mob(occupant, forced = TRUE, check_loc = FALSE) vis_contents |= occupant @@ -333,7 +333,7 @@ if(usr == occupant)//If the user is inside the tube... if(usr.stat == 2)//and he's not dead.... return - usr << "Release sequence activated. This will take two minutes." + to_chat(usr, "Release sequence activated. This will take two minutes.") sleep(1200) if(!src || !usr || !occupant || (occupant != usr)) //Check if someone's released/replaced/bombed him already return @@ -351,7 +351,7 @@ set src in oview(1) for(var/mob/living/simple_animal/slime/M in range(1,usr)) if(M.victim == usr) - usr << "You're too busy getting your life sucked out of you." + to_chat(usr, "You're too busy getting your life sucked out of you.") return if(usr.stat != 0) return diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 57fbab5439..6e74466be3 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -95,7 +95,7 @@ dat += "Recover object.
" dat += "Recover all objects.
" - user << browse(dat, "window=cryopod_console") + to_chat(user, browse(dat, "window=cryopod_console")) onclose(user, "cryopod_console") /obj/machinery/computer/cryopod/Topic(href, href_list) @@ -114,7 +114,7 @@ dat += "[person]
" dat += "
" - user << browse(dat, "window=cryolog") + to_chat(user, browse(dat, "window=cryolog")) if(href_list["view"]) if(!allow_items) return @@ -124,13 +124,13 @@ dat += "[I.name]
" dat += "
" - user << browse(dat, "window=cryoitems") + to_chat(user, browse(dat, "window=cryoitems")) else if(href_list["item"]) if(!allow_items) return if(frozen_items.len == 0) - user << "There is nothing to recover from storage." + to_chat(user, "There is nothing to recover from storage.") return var/obj/item/I = input(usr, "Please choose which object to retrieve.","Object recovery",null) as null|anything in frozen_items @@ -138,7 +138,7 @@ return if(!(I in frozen_items)) - user << "\The [I] is no longer in storage." + to_chat(user, "\The [I] is no longer in storage.") return visible_message("The console beeps happily as it disgorges \the [I].", 3) @@ -150,7 +150,7 @@ if(!allow_items) return if(frozen_items.len == 0) - user << "There is nothing to recover from storage." + to_chat(user, "There is nothing to recover from storage.") return visible_message("The console beeps happily as it disgorges the desired objects.", 3) @@ -484,7 +484,7 @@ var/obj/item/weapon/grab/grab = G if(occupant) - user << "\The [src] is in use." + to_chat(user, "\The [src] is in use.") return if(!ismob(grab.affecting)) @@ -529,12 +529,12 @@ return if(occupant) - usr << "\The [src] is in use." + to_chat(usr, "\The [src] is in use.") return for(var/mob/living/simple_animal/slime/M in range(1,usr)) if(M.victim == usr) - usr << "You're too busy getting your life sucked out of you." + to_chat(usr, "You're too busy getting your life sucked out of you.") return visible_message("[usr] [on_enter_visible_message] [src].", 3) @@ -545,7 +545,7 @@ return if(occupant) - usr << "\The [src] is in use." + to_chat(usr, "\The [src] is in use.") return usr.stop_pulling() @@ -561,8 +561,8 @@ icon_state = occupied_icon_state - usr << "[on_enter_occupant_message]" - usr << "If you ghost, log out or close your client now, your character will shortly be permanently removed from the round." + to_chat(usr, "[on_enter_occupant_message]") + to_chat(usr, "If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.") time_entered = world.time diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 2ed722e129..c50503f3c5 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -86,7 +86,7 @@ for reference: return //hitting things with the wrong type of stack usually doesn't produce messages, and probably doesn't need to. if(health < maxhealth) if(D.get_amount() < 1) - user << "You need one sheet of [material.display_name] to repair \the [src]." + to_chat(user, "You need one sheet of [material.display_name] to repair \the [src].") return visible_message("[user] begins to repair \the [src].") if(do_after(user,20) && health < maxhealth) @@ -168,10 +168,10 @@ for reference: anchored = !anchored icon_state = "barrier[locked]" if((locked == 1.0) && (emagged < 2.0)) - user << "Barrier lock toggled on." + to_chat(user, "Barrier lock toggled on.") return else if((locked == 0.0) && (emagged < 2.0)) - user << "Barrier lock toggled off." + to_chat(user, "Barrier lock toggled off.") return else var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread @@ -180,7 +180,7 @@ for reference: visible_message("BZZzZZzZZzZT") return return - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) if(health < maxhealth) health = maxhealth emagged = 0 @@ -252,7 +252,7 @@ for reference: emagged = 1 req_access.Cut() req_one_access.Cut() - user << "You break the ID authentication lock on \the [src]." + to_chat(user, "You break the ID authentication lock on \the [src].") var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(2, 1, src) s.start() @@ -260,7 +260,7 @@ for reference: return 1 else if(emagged == 1) emagged = 2 - user << "You short out the anchoring mechanism on \the [src]." + to_chat(user, "You short out the anchoring mechanism on \the [src].") var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(2, 1, src) s.start() diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index 127eda6135..0a54b148d1 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -21,7 +21,7 @@ if(wires & 2) return attack_hand(user) else - user << "Error, no route to host." + to_chat(user, "Error, no route to host.") /obj/machinery/button/remote/attackby(obj/item/weapon/W, mob/user as mob) return attack_hand(user) @@ -42,7 +42,7 @@ return if(!allowed(user) && (wires & 1)) - user << "Access Denied" + to_chat(user, "Access Denied") flick("doorctrl-denied",src) return diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 23c5c9dcd8..021edb48ca 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -870,7 +870,7 @@ About the new airlock wires panel: if(istype(C, /mob/living)) ..() return - if(!repairing && (istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density)) + if(!repairing && istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density) var/obj/item/weapon/weldingtool/W = C if(W.remove_fuel(0,user)) if(!src.welded) @@ -882,7 +882,7 @@ About the new airlock wires panel: return else return - else if(istype(C, /obj/item/weapon/screwdriver)) + else if(C.is_screwdriver()) if (src.p_open) if (stat & BROKEN) to_chat(usr,"The panel is broken and cannot be closed.") @@ -893,7 +893,7 @@ About the new airlock wires panel: src.p_open = 1 playsound(src, C.usesound, 50, 1) src.update_icon() - else if(istype(C, /obj/item/weapon/wirecutters)) + else if(C.is_wirecutter()) return src.attack_hand(user) else if(istype(C, /obj/item/device/multitool)) return src.attack_hand(user) @@ -902,7 +902,7 @@ About the new airlock wires panel: 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 && istype(C, /obj/item/weapon/crowbar)) + else if(!repairing && C.is_crowbar()) if(can_remove_electronics()) playsound(src, C.usesound, 75, 1) user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.") diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm index 58ce8b282c..f4926c2aa8 100644 --- a/code/game/machinery/doors/blast_door.dm +++ b/code/game/machinery/doors/blast_door.dm @@ -125,7 +125,7 @@ if(istype(C,/obj/item/weapon/material/twohanded/fireaxe)) // Fireaxes need to be in both hands to pry. var/obj/item/weapon/material/twohanded/fireaxe/F = C if(!F.wielded) - user << "You need to be wielding \the [F] to do that." + to_chat(user, "You need to be wielding \the [F] to do that.") return // If we're at this point, it's a fireaxe in both hands or something else that doesn't care for twohanding. @@ -133,7 +133,7 @@ force_toggle(1, user) else - usr << "[src]'s motors resist your effort." + to_chat(user, "[src]'s motors resist your effort.") return @@ -153,19 +153,19 @@ else if(istype(C, /obj/item/stack/material) && C.get_material_name() == "plasteel") // Repairing. var/amt = Ceiling((maxhealth - health)/150) if(!amt) - usr << "\The [src] is already fully repaired." + to_chat(user, "\The [src] is already fully repaired.") return var/obj/item/stack/P = C if(P.amount < amt) - usr << "You don't have enough sheets to repair this! You need at least [amt] sheets." + to_chat(user, "You don't have enough sheets to repair this! You need at least [amt] sheets.") return - usr << "You begin repairing [src]..." + to_chat(user, "You begin repairing [src]...") if(do_after(usr, 30)) if(P.use(amt)) - usr << "You have repaired \The [src]" + to_chat(user, "You have repaired \The [src]") src.repair() else - usr << "You don't have enough sheets to repair this! You need at least [amt] sheets." + to_chat(user, "You don't have enough sheets to repair this! You need at least [amt] sheets.") else if(src.density && (user.a_intent == I_HURT)) //If we can't pry it open and it's not a weapon.... Eh, let's attack it anyway. var/obj/item/weapon/W = C diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 984d5e023d..a56ce2a880 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -254,7 +254,7 @@ repairing = null return - if(repairing && istype(I, /obj/item/weapon/crowbar)) + if(repairing && I.is_crowbar()) user << "You remove \the [repairing]." playsound(src, I.usesound, 100, 1) repairing.loc = user.loc diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 504d65c306..fb7609ee05 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -4,8 +4,8 @@ #define FIREDOOR_MIN_TEMP 0 // Bitflags -#define FIREDOOR_ALERT_HOT 1 -#define FIREDOOR_ALERT_COLD 2 +#define FIREDOOR_ALERT_HOT 1 +#define FIREDOOR_ALERT_COLD 2 // Not used #define FIREDOOR_ALERT_LOWPRESS 4 /obj/machinery/door/firedoor @@ -83,9 +83,9 @@ return if(pdiff >= FIREDOOR_MAX_PRESSURE_DIFF) - user << "WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!" + to_chat(user, "WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!") - user << "Sensor readings:" + to_chat(user, "Sensor readings:") for(var/index = 1; index <= tile_info.len; index++) var/o = "  " switch(index) @@ -99,7 +99,7 @@ o += "WEST: " if(tile_info[index] == null) o += "DATA UNAVAILABLE" - user << o + to_chat(user, o) continue var/celsius = convert_k2c(tile_info[index][1]) var/pressure = tile_info[index][2] @@ -107,14 +107,14 @@ o += "[celsius]°C " o += "" o += "[pressure]kPa" - user << o + to_chat(user, o) if(islist(users_to_open) && users_to_open.len) var/users_to_open_string = users_to_open[1] if(users_to_open.len >= 2) for(var/i = 2 to users_to_open.len) users_to_open_string += ", [users_to_open[i]]" - user << "These people have opened \the [src] during an alert: [users_to_open_string]." + to_chat(user, "These people have opened \the [src] during an alert: [users_to_open_string].") /obj/machinery/door/firedoor/Bumped(atom/AM) if(p_open || operating) @@ -142,7 +142,7 @@ return if(blocked) - user << "\The [src] is welded solid!" + to_chat(user, "\The [src] is welded solid!") return var/alarmed = lockdown @@ -154,15 +154,15 @@ "\The [src]", "Yes, [density ? "open" : "close"]", "No") if(answer == "No") return - if(user.incapacitated() || (get_dist(src, user) > 1 && !issilicon(user))) - user << "Sorry, you must remain able bodied and close to \the [src] in order to use it." + if(user.incapacitated() || (get_dist(src, user) > 1 && !issilicon(user))) + to_chat(user, "Sorry, you must remain able bodied and close to \the [src] in order to use it.") return if(density && (stat & (BROKEN|NOPOWER))) //can still close without power - user << "\The [src] is not functioning, you'll have to force it open manually." + to_chat(user, "\The [src] is not functioning, you'll have to force it open manually.") return if(alarmed && density && lockdown && !allowed(user)) - user << "Access denied. Please wait for authorities to arrive, or for the alert to clear." + to_chat(user, "Access denied. Please wait for authorities to arrive, or for the alert to clear.") return else user.visible_message("\The [src] [density ? "open" : "close"]s for \the [user].",\ @@ -245,7 +245,7 @@ return//Already doing something. if(istype(C, /obj/item/weapon/weldingtool) && !repairing) if(prying) - to_chat(user,"Someone's busy prying that [density ? "open" : "closed"]!") + to_chat(user, "Someone's busy prying that [density ? "open" : "closed"]!") var/obj/item/weapon/weldingtool/W = C if(W.remove_fuel(0, user)) blocked = !blocked @@ -256,7 +256,7 @@ update_icon() return - if(density && istype(C, /obj/item/weapon/screwdriver)) + if(density && C.is_screwdriver()) hatch_open = !hatch_open playsound(src, C.usesound, 50, 1) user.visible_message("[user] has [hatch_open ? "opened" : "closed"] \the [src] maintenance hatch.", @@ -264,9 +264,9 @@ update_icon() return - if(blocked && istype(C, /obj/item/weapon/crowbar) && !repairing) + if(blocked && C.is_crowbar() && !repairing) if(!hatch_open) - user << "You must open the maintenance hatch first!" + to_chat(user, "You must open the maintenance hatch first!") else user.visible_message("[user] is removing the electronics from \the [src].", "You start to remove the electronics from [src].") @@ -290,14 +290,14 @@ return if(blocked) - user << "\The [src] is welded shut!" + to_chat(user, "\The [src] is welded shut!") return if(C.pry == 1) if(operating) return - if(blocked && istype(C, /obj/item/weapon/crowbar)) + if(blocked && C.is_crowbar()) user.visible_message("\The [user] pries at \the [src] with \a [C], but \the [src] is welded in place!",\ "You try to pry \the [src] [density ? "open" : "closed"], but it is welded in place!",\ "You hear someone struggle and metal straining.") @@ -309,7 +309,7 @@ return if(prying) - to_chat(user,"Someone's already prying that [density ? "open" : "closed"].") + to_chat(user, "Someone's already prying that [density ? "open" : "closed"].") return user.visible_message("\The [user] starts to force \the [src] [density ? "open" : "closed"] with \a [C]!",\ @@ -319,7 +319,7 @@ update_icon() playsound(src, C.usesound, 100, 1) if(do_after(user,30 * C.toolspeed)) - if(istype(C, /obj/item/weapon/crowbar)) + if(C.is_crowbar()) if(stat & (BROKEN|NOPOWER) || !density) user.visible_message("\The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!",\ "You force \the [src] [density ? "open" : "closed"] with \the [C]!",\ @@ -504,7 +504,7 @@ /obj/machinery/door/firedoor/glass name = "\improper Emergency Glass Shutter" - desc = "Emergency air-tight shutter, capable of sealing off breached areas. This one has a resilient glass window, allowing you to see the danger." + desc = "Emergency air-tight shutter, capable of sealing off breached areas. This one has a resilient glass window, allowing you to see the danger." icon = 'icons/obj/doors/DoorHazardGlass.dmi' icon_state = "door_open" glass = 1 diff --git a/code/game/machinery/doors/firedoor_assembly.dm b/code/game/machinery/doors/firedoor_assembly.dm index f30c2e6146..cebafdbb40 100644 --- a/code/game/machinery/doors/firedoor_assembly.dm +++ b/code/game/machinery/doors/firedoor_assembly.dm @@ -26,7 +26,7 @@ obj/structure/firedoor_assembly/attackby(obj/item/C, mob/user as mob) wired = 1 user << "You wire \the [src]." - else if(istype(C, /obj/item/weapon/wirecutters) && wired ) + else if(C.is_wirecutter() && wired ) playsound(src.loc, C.usesound, 100, 1) user.visible_message("[user] cuts the wires from \the [src].", "You start to cut the wires from \the [src].") @@ -46,7 +46,7 @@ obj/structure/firedoor_assembly/attackby(obj/item/C, mob/user as mob) qdel(src) else user << "You must secure \the [src] first!" - else if(istype(C, /obj/item/weapon/wrench)) + else if(C.is_wrench()) anchored = !anchored playsound(src.loc, C.usesound, 50, 1) user.visible_message("[user] has [anchored ? "" : "un" ]secured \the [src]!", diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index d25473e709..fe21197dc5 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -154,6 +154,7 @@ return src.attack_hand(user) /obj/machinery/door/window/attack_hand(mob/user as mob) + src.add_fingerprint(user) if(istype(user,/mob/living/carbon/human)) var/mob/living/carbon/human/H = user @@ -164,7 +165,17 @@ user.setClickCooldown(user.get_attack_speed()) take_damage(25) return - return src.attackby(user, user) + + if (src.allowed(user)) + if (src.density) + open() + else + close() + + else if (src.density) + flick(text("[]deny", src.base_state), src) + + return /obj/machinery/door/window/emag_act(var/remaining_charges, var/mob/user) if (density && operable()) @@ -174,85 +185,86 @@ open() return 1 -/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/user as mob) +/obj/machinery/door/window/attackby(obj/item/I as obj, mob/user as mob) //If it's in the process of opening/closing, ignore the click if (src.operating == 1) return - // Fixing. - if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP) - var/obj/item/weapon/weldingtool/WT = I - if(health < maxhealth) - if(WT.remove_fuel(1 ,user)) - to_chat(user, "You begin repairing [src]...") - playsound(src, WT.usesound, 50, 1) - if(do_after(user, 40 * WT.toolspeed, target = src)) - health = maxhealth - update_icon() - to_chat(user, "You repair [src].") - else - to_chat(user, "[src] is already in good condition!") - return - - //Emags and ninja swords? You may pass. - if (istype(I, /obj/item/weapon/melee/energy/blade)) - if(emag_act(10, user)) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() - spark_system.set_up(5, 0, src.loc) - spark_system.start() - playsound(src.loc, "sparks", 50, 1) - playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) - visible_message("The glass door was sliced open by [user]!") - return 1 - - //If it's opened/emagged, crowbar can pry it out of its frame. - if (!density && istype(I, /obj/item/weapon/crowbar)) - playsound(src, I.usesound, 50, 1) - user.visible_message("[user] begins prying the windoor out of the frame.", "You start to pry the windoor out of the frame.") - if (do_after(user,40 * I.toolspeed)) - to_chat(user,"You pried the windoor out of the frame!") - - var/obj/structure/windoor_assembly/wa = new/obj/structure/windoor_assembly(src.loc) - if (istype(src, /obj/machinery/door/window/brigdoor)) - wa.secure = "secure_" - if (src.base_state == "right" || src.base_state == "rightsecure") - wa.facing = "r" - wa.set_dir(src.dir) - wa.anchored = 1 - wa.created_name = name - wa.state = "02" - wa.step = 2 - wa.update_state() - - if(operating == -1) - wa.electronics = new/obj/item/weapon/circuitboard/broken() + if(istype(I)) + // Fixing. + if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP) + var/obj/item/weapon/weldingtool/WT = I + if(health < maxhealth) + if(WT.remove_fuel(1 ,user)) + to_chat(user, "You begin repairing [src]...") + playsound(src, WT.usesound, 50, 1) + if(do_after(user, 40 * WT.toolspeed, target = src)) + health = maxhealth + update_icon() + to_chat(user, "You repair [src].") else - if(!electronics) - wa.electronics = new/obj/item/weapon/airlock_electronics() - if(!src.req_access) - src.check_access() - if(src.req_access.len) - wa.electronics.conf_access = src.req_access - else if (src.req_one_access.len) - wa.electronics.conf_access = src.req_one_access - wa.electronics.one_access = 1 - else - wa.electronics = electronics - electronics = null - operating = 0 - qdel(src) + to_chat(user, "[src] is already in good condition!") return - //If it's a weapon, smash windoor. Unless it's an id card, agent card, ect.. then ignore it (Cards really shouldnt damage a door anyway) - if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card)) - user.setClickCooldown(user.get_attack_speed(I)) - var/aforce = I.force - playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) - visible_message("[src] was hit by [I].") - if(I.damtype == BRUTE || I.damtype == BURN) - take_damage(aforce) - return + //Emags and ninja swords? You may pass. + if (istype(I, /obj/item/weapon/melee/energy/blade)) + if(emag_act(10, user)) + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, src.loc) + spark_system.start() + playsound(src.loc, "sparks", 50, 1) + playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) + visible_message("The glass door was sliced open by [user]!") + return 1 + + //If it's opened/emagged, crowbar can pry it out of its frame. + if (!density && I.is_crowbar()) + playsound(src, I.usesound, 50, 1) + user.visible_message("[user] begins prying the windoor out of the frame.", "You start to pry the windoor out of the frame.") + if (do_after(user,40 * I.toolspeed)) + to_chat(user,"You pried the windoor out of the frame!") + + var/obj/structure/windoor_assembly/wa = new/obj/structure/windoor_assembly(src.loc) + if (istype(src, /obj/machinery/door/window/brigdoor)) + wa.secure = "secure_" + if (src.base_state == "right" || src.base_state == "rightsecure") + wa.facing = "r" + wa.set_dir(src.dir) + wa.anchored = 1 + wa.created_name = name + wa.state = "02" + wa.step = 2 + wa.update_state() + + if(operating == -1) + wa.electronics = new/obj/item/weapon/circuitboard/broken() + else + if(!electronics) + wa.electronics = new/obj/item/weapon/airlock_electronics() + if(!src.req_access) + src.check_access() + if(src.req_access.len) + wa.electronics.conf_access = src.req_access + else if (src.req_one_access.len) + wa.electronics.conf_access = src.req_one_access + wa.electronics.one_access = 1 + else + wa.electronics = electronics + electronics = null + operating = 0 + qdel(src) + return + + //If it's a weapon, smash windoor. Unless it's an id card, agent card, ect.. then ignore it (Cards really shouldnt damage a door anyway) + if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card)) + user.setClickCooldown(user.get_attack_speed(I)) + var/aforce = I.force + playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) + visible_message("[src] was hit by [I].") + if(I.damtype == BRUTE || I.damtype == BURN) + take_damage(aforce) + return src.add_fingerprint(user) @@ -268,8 +280,6 @@ return - - /obj/machinery/door/window/brigdoor name = "secure door" icon = 'icons/obj/doors/windoor.dmi' @@ -284,7 +294,6 @@ new /obj/item/stack/rods(src.loc, 2) ..() - /obj/machinery/door/window/northleft dir = NORTH diff --git a/code/game/machinery/exonet_node.dm b/code/game/machinery/exonet_node.dm index 87eba96324..27a01c0682 100644 --- a/code/game/machinery/exonet_node.dm +++ b/code/game/machinery/exonet_node.dm @@ -88,9 +88,9 @@ // Parameters: 2 (I - the item being whacked against the machine, user - the person doing the whacking) // Description: Handles deconstruction. /obj/machinery/exonet_node/attackby(obj/item/I, mob/user) - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) default_deconstruction_screwdriver(user, I) - else if(istype(I, /obj/item/weapon/crowbar)) + else if(I.is_crowbar()) default_deconstruction_crowbar(user, I) else ..() diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 18844dcd73..169bc8c6d7 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -35,7 +35,7 @@ //Don't want to render prison breaks impossible /obj/machinery/flasher/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wirecutters)) + if(W.is_wirecutter()) add_fingerprint(user) disable = !disable if(disable) @@ -102,7 +102,7 @@ flash() /obj/machinery/flasher/portable/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) add_fingerprint(user) anchored = !anchored diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 88b36f6b5c..729d99f419 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -65,7 +65,7 @@ turn_off(1) else if(!turn_on(1)) - user << "You try to turn on \the [src] but it does not work." + to_chat(user, "You try to turn on \the [src] but it does not work.") /obj/machinery/floodlight/attack_hand(mob/user as mob) if(open && cell) @@ -82,7 +82,7 @@ cell = null on = 0 set_light(0) - user << "You remove the power cell" + to_chat(user, "You remove the power cell") update_icon() return @@ -90,38 +90,38 @@ turn_off(1) else if(!turn_on(1)) - user << "You try to turn on \the [src] but it does not work." + to_chat(user, "You try to turn on \the [src] but it does not work.") update_icon() /obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) if(!open) if(unlocked) unlocked = 0 - user << "You screw the battery panel in place." + to_chat(user, "You screw the battery panel in place.") else unlocked = 1 - user << "You unscrew the battery panel." + to_chat(user, "You unscrew the battery panel.") - if(istype(W, /obj/item/weapon/crowbar)) + if(W.is_crowbar()) if(unlocked) if(open) open = 0 overlays = null - user << "You crowbar the battery panel in place." + to_chat(user, "You crowbar the battery panel in place.") else if(unlocked) open = 1 - user << "You remove the battery panel." + to_chat(user, "You remove the battery panel.") if(istype(W, /obj/item/weapon/cell)) if(open) if(cell) - user << "There is a power cell already installed." + to_chat(user, "There is a power cell already installed.") else user.drop_item() W.loc = src cell = W - user << "You insert the power cell." + to_chat(user, "You insert the power cell.") update_icon() diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm index 1d0b63b0e1..f02d3c2855 100644 --- a/code/game/machinery/floor_light.dm +++ b/code/game/machinery/floor_light.dm @@ -23,13 +23,13 @@ var/list/floor_light_cache = list() anchored = 1 /obj/machinery/floor_light/attackby(var/obj/item/W, var/mob/user) - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) anchored = !anchored visible_message("\The [user] has [anchored ? "attached" : "detached"] \the [src].") else if(istype(W, /obj/item/weapon/weldingtool) && (damaged || (stat & BROKEN))) var/obj/item/weapon/weldingtool/WT = W if(!WT.remove_fuel(0, user)) - user << "\The [src] must be on to complete this task." + to_chat(user, "\The [src] must be on to complete this task.") return playsound(src.loc, WT.usesound, 50, 1) if(!do_after(user, 20 * WT.toolspeed)) @@ -60,15 +60,15 @@ var/list/floor_light_cache = list() else if(!anchored) - user << "\The [src] must be screwed down first." + to_chat(user, "\The [src] must be screwed down first.") return if(stat & BROKEN) - user << "\The [src] is too damaged to be functional." + to_chat(user, "\The [src] is too damaged to be functional.") return if(stat & NOPOWER) - user << "\The [src] is unpowered." + to_chat(user, "\The [src] is unpowered.") return on = !on diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm index 1cbccc195c..94f61981ea 100644 --- a/code/game/machinery/floorlayer.dm +++ b/code/game/machinery/floorlayer.dm @@ -34,7 +34,7 @@ return /obj/machinery/floorlayer/attackby(var/obj/item/W as obj, var/mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) var/m = input("Choose work mode", "Mode") as null|anything in mode mode[m] = !mode[m] var/O = mode[m] @@ -42,23 +42,23 @@ return if(istype(W, /obj/item/stack/tile)) - user << "\The [W] successfully loaded." + to_chat(user, "\The [W] successfully loaded.") user.drop_item(T) TakeTile(T) return - if(istype(W, /obj/item/weapon/crowbar)) + if(W.is_crowbar()) if(!length(contents)) - user << "\The [src] is empty." + to_chat(user, "\The [src] is empty.") else var/obj/item/stack/tile/E = input("Choose remove tile type.", "Tiles") as null|anything in contents if(E) - user << "You remove the [E] from /the [src]." + to_chat(user, "You remove the [E] from /the [src].") E.loc = src.loc T = null return - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) T = input("Choose tile type.", "Tiles") as null|anything in contents return ..() diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm index f1f2ec0834..2c16d3771e 100644 --- a/code/game/machinery/frame.dm +++ b/code/game/machinery/frame.dm @@ -260,9 +260,9 @@ update_icon() /obj/structure/frame/attackby(obj/item/P as obj, mob/user as mob) - if(istype(P, /obj/item/weapon/wrench)) + if(P.is_wrench()) if(state == FRAME_PLACED && !anchored) - user << "You start to wrench the frame into place." + to_chat(user, "You start to wrench the frame into place.") playsound(src.loc, P.usesound, 50, 1) if(do_after(user, 20 * P.toolspeed)) anchored = 1 @@ -270,14 +270,14 @@ state = FRAME_FASTENED check_components() update_desc() - user << "You wrench the frame into place and set the outer cover." + to_chat(user, "You wrench the frame into place and set the outer cover.") else - user << "You wrench the frame into place." + to_chat(user, "You wrench the frame into place.") else if(state == FRAME_PLACED && anchored) playsound(src, P.usesound, 50, 1) if(do_after(user, 20 * P.toolspeed)) - user << "You unfasten the frame." + to_chat(user, "You unfasten the frame.") anchored = 0 else if(istype(P, /obj/item/weapon/weldingtool)) @@ -287,12 +287,12 @@ playsound(src.loc, P.usesound, 50, 1) if(do_after(user, 20 * P.toolspeed)) if(src && WT.isOn()) - user << "You deconstruct the frame." + to_chat(user, "You deconstruct the frame.") new /obj/item/stack/material/steel(src.loc, frame_type.frame_size) qdel(src) return else if(!WT.remove_fuel(0, user)) - user << "The welding tool must be on to complete this task." + to_chat(user, "The welding tool must be on to complete this task.") return else if(istype(P, /obj/item/weapon/circuitboard) && need_circuit && !circuit) @@ -301,7 +301,7 @@ var/datum/frame/frame_types/board_type = B.board_type if(board_type.name == frame_type.name) playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - user << "You place the circuit board inside the frame." + to_chat(user, "You place the circuit board inside the frame.") circuit = P user.drop_item() P.loc = src @@ -310,25 +310,25 @@ check_components() update_desc() else - user << "This frame does not accept circuit boards of this type!" + to_chat(user, "This frame does not accept circuit boards of this type!") return - else if(istype(P, /obj/item/weapon/screwdriver)) + else if(P.is_screwdriver()) if(state == FRAME_UNFASTENED) if(need_circuit && circuit) playsound(src, P.usesound, 50, 1) - user << "You screw the circuit board into place." + to_chat(user, "You screw the circuit board into place.") state = FRAME_FASTENED else if(state == FRAME_FASTENED) if(need_circuit && circuit) playsound(src, P.usesound, 50, 1) - user << "You unfasten the circuit board." + to_chat(user, "You unfasten the circuit board.") state = FRAME_UNFASTENED else if(!need_circuit && circuit) playsound(src, P.usesound, 50, 1) - user << "You unfasten the outer cover." + to_chat(user, "You unfasten the outer cover.") state = FRAME_PLACED else if(state == FRAME_WIRED) @@ -370,7 +370,7 @@ else if(frame_type.frame_class == FRAME_CLASS_ALARM) playsound(src, P.usesound, 50, 1) - user << "You fasten the cover." + to_chat(user, "You fasten the cover.") var/obj/machinery/B = new circuit.build_path(src.loc) B.pixel_x = pixel_x B.pixel_y = pixel_y @@ -384,7 +384,7 @@ else if(state == FRAME_PANELED) if(frame_type.frame_class == FRAME_CLASS_COMPUTER) playsound(src, P.usesound, 50, 1) - user << "You connect the monitor." + to_chat(user, "You connect the monitor.") var/obj/machinery/B = new circuit.build_path(src.loc) B.pixel_x = pixel_x B.pixel_y = pixel_y @@ -397,7 +397,7 @@ else if(frame_type.frame_class == FRAME_CLASS_DISPLAY) playsound(src, P.usesound, 50, 1) - user << "You connect the monitor." + to_chat(user, "You connect the monitor.") var/obj/machinery/B = new circuit.build_path(src.loc) B.pixel_x = pixel_x B.pixel_y = pixel_y @@ -408,11 +408,11 @@ qdel(src) return - else if(istype(P, /obj/item/weapon/crowbar)) + else if(P.is_crowbar()) if(state == FRAME_UNFASTENED) if(need_circuit && circuit) playsound(src, P.usesound, 50, 1) - user << "You remove the circuit board." + to_chat(user, "You remove the circuit board.") state = FRAME_PLACED circuit.forceMove(src.loc) circuit = null @@ -423,25 +423,25 @@ if(frame_type.frame_class == FRAME_CLASS_MACHINE) playsound(src, P.usesound, 50, 1) if(components.len == 0) - user << "There are no components to remove." + to_chat(user, "There are no components to remove.") else - user << "You remove the components." + to_chat(user, "You remove the components.") for(var/obj/item/weapon/W in components) W.forceMove(src.loc) check_components() update_desc() - user << desc + to_chat(user, desc) else if(state == FRAME_PANELED) if(frame_type.frame_class == FRAME_CLASS_COMPUTER) playsound(src, P.usesound, 50, 1) - user << "You remove the glass panel." + to_chat(user, "You remove the glass panel.") state = FRAME_WIRED new /obj/item/stack/material/glass(src.loc, 2) else if(frame_type.frame_class == FRAME_CLASS_DISPLAY) playsound(src, P.usesound, 50, 1) - user << "You remove the glass panel." + to_chat(user, "You remove the glass panel.") state = FRAME_WIRED new /obj/item/stack/material/glass(src.loc, 2) @@ -449,16 +449,16 @@ if(state == FRAME_FASTENED) var/obj/item/stack/cable_coil/C = P if(C.get_amount() < 5) - user << "You need five coils of wire to add them to the frame." + to_chat(user, "You need five coils of wire to add them to the frame.") return - user << "You start to add cables to the frame." + to_chat(user, "You start to add cables to the frame.") playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) if(do_after(user, 20) && state == FRAME_FASTENED) if(C.use(5)) - user << "You add cables to the frame." + to_chat(user, "You add cables to the frame.") state = FRAME_WIRED if(frame_type.frame_class == FRAME_CLASS_MACHINE) - user << desc + to_chat(user, desc) else if(state == FRAME_WIRED) if(frame_type.frame_class == FRAME_CLASS_MACHINE) for(var/I in req_components) @@ -483,31 +483,31 @@ req_components[I]-- update_desc() break - user << desc + to_chat(user, desc) - else if(istype(P, /obj/item/weapon/wirecutters)) + else if(P.is_wirecutter()) if(state == FRAME_WIRED) if(frame_type.frame_class == FRAME_CLASS_COMPUTER) playsound(src, P.usesound, 50, 1) - user << "You remove the cables." + to_chat(user, "You remove the cables.") state = FRAME_FASTENED new /obj/item/stack/cable_coil(src.loc, 5) else if(frame_type.frame_class == FRAME_CLASS_DISPLAY) playsound(src, P.usesound, 50, 1) - user << "You remove the cables." + to_chat(user, "You remove the cables.") state = FRAME_FASTENED new /obj/item/stack/cable_coil(src.loc, 5) else if(frame_type.frame_class == FRAME_CLASS_ALARM) playsound(src, P.usesound, 50, 1) - user << "You remove the cables." + to_chat(user, "You remove the cables.") state = FRAME_FASTENED new /obj/item/stack/cable_coil(src.loc, 5) else if(frame_type.frame_class == FRAME_CLASS_MACHINE) playsound(src, P.usesound, 50, 1) - user << "You remove the cables." + to_chat(user, "You remove the cables.") state = FRAME_FASTENED new /obj/item/stack/cable_coil(src.loc, 5) @@ -516,25 +516,25 @@ if(frame_type.frame_class == FRAME_CLASS_COMPUTER) var/obj/item/stack/G = P if(G.get_amount() < 2) - user << "You need two sheets of glass to put in the glass panel." + to_chat(user, "You need two sheets of glass to put in the glass panel.") return playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - user << "You start to put in the glass panel." + to_chat(user, "You start to put in the glass panel.") if(do_after(user, 20) && state == FRAME_WIRED) if(G.use(2)) - user << "You put in the glass panel." + to_chat(user, "You put in the glass panel.") state = FRAME_PANELED else if(frame_type.frame_class == FRAME_CLASS_DISPLAY) var/obj/item/stack/G = P if(G.get_amount() < 2) - user << "You need two sheets of glass to put in the glass panel." + to_chat(user, "You need two sheets of glass to put in the glass panel.") return playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - user << "You start to put in the glass panel." + to_chat(user, "You start to put in the glass panel.") if(do_after(user, 20) && state == FRAME_WIRED) if(G.use(2)) - user << "You put in the glass panel." + to_chat(user, "You put in the glass panel.") state = FRAME_PANELED else if(istype(P, /obj/item)) @@ -562,9 +562,9 @@ req_components[I]-- update_desc() break - user << desc + to_chat(user, desc) if(P && P.loc != src && !istype(P, /obj/item/stack/material)) - user << "You cannot add that component to the machine!" + to_chat(user, "You cannot add that component to the machine!") return update_icon() @@ -578,12 +578,12 @@ return 0 if(anchored) - usr << "It is fastened to the floor therefore you can't rotate it!" + to_chat(usr, "It is fastened to the floor therefore you can't rotate it!") return 0 set_dir(turn(dir, 90)) - usr << "You rotate the [src] to face [dir2text(dir)]!" + to_chat(usr, "You rotate the [src] to face [dir2text(dir)]!") return @@ -597,11 +597,11 @@ return 0 if(anchored) - usr << "It is fastened to the floor therefore you can't rotate it!" + to_chat(usr, "It is fastened to the floor therefore you can't rotate it!") return 0 set_dir(turn(dir, 270)) - usr << "You rotate the [src] to face [dir2text(dir)]!" + to_chat(usr, "You rotate the [src] to face [dir2text(dir)]!") return \ No newline at end of file diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 1e67fb8b4f..5cb521d423 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -71,7 +71,7 @@ // sd_SetLuminosity(0) /obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) add_fingerprint(user) disable = !disable playsound(src, W.usesound, 50, 1) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 306a098638..36ec27f4ac 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -55,21 +55,21 @@ /obj/machinery/iv_drip/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/reagent_containers)) if(!isnull(beaker)) - user << "There is already a reagent container loaded!" + to_chat(user, "There is already a reagent container loaded!") return user.drop_item() W.loc = src beaker = W - user << "You attach \the [W] to \the [src]." + to_chat(user, "You attach \the [W] to \the [src].") update_icon() return - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) playsound(src, W.usesound, 50, 1) - user << "You start to dismantle the IV drip." + to_chat(user, "You start to dismantle the IV drip.") if(do_after(user, 15)) - user << "You dismantle the IV drip." + to_chat(user, "You dismantle the IV drip.") var/obj/item/stack/rods/A = new /obj/item/stack/rods(src.loc) A.amount = 6 if(beaker) @@ -110,12 +110,14 @@ amount = min(amount, 4) // If the beaker is full, ping if(amount == 0) - if(prob(5)) visible_message("\The [src] pings.") + if(prob(5)) + visible_message("\The [src] pings.") return var/mob/living/carbon/human/T = attached - if(!istype(T)) return + if(!istype(T)) + return if(!T.dna) return if(NOCLONE in T.mutations) @@ -152,30 +154,31 @@ set src in view(1) if(!istype(usr, /mob/living)) - usr << "You can't do that." + to_chat(usr, "You can't do that.") return if(usr.stat) return mode = !mode - usr << "The IV drip is now [mode ? "injecting" : "taking blood"]." + to_chat(usr, "The IV drip is now [mode ? "injecting" : "taking blood"].") /obj/machinery/iv_drip/examine(mob/user) ..(user) - if(!(user in view(2)) && user != src.loc) return + if(!(user in view(2)) && user != src.loc) + return - user << "The IV drip is [mode ? "injecting" : "taking blood"]." + to_chat(user, "The IV drip is [mode ? "injecting" : "taking blood"].") if(beaker) if(beaker.reagents && beaker.reagents.reagent_list.len) - usr << "Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid." + to_chat(user, "Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid.") else - usr << "Attached is an empty [beaker]." + to_chat(user, "Attached is an empty [beaker].") else - usr << "No chemicals are attached." + to_chat(user, "No chemicals are attached.") - usr << "[attached ? attached : "No one"] is attached." + to_chat(user, "[attached ? attached : "No one"] is attached.") /obj/machinery/iv_drip/CanPass(atom/movable/mover, turf/target, height = 0, air_group = 0) if(height && istype(mover) && mover.checkpass(PASSTABLE)) //allow bullets, beams, thrown objects, mice, drones, and the like through. diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index caa71d7fb5..b16ebafa88 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -37,7 +37,7 @@ datum/track/New(var/title_name, var/audio) new/datum/track("Part A", 'sound/misc/TestLoop1.ogg'), new/datum/track("Scratch", 'sound/music/title1.ogg'), new/datum/track("Trai`Tor", 'sound/music/traitor.ogg'), - new/datum/track("Stellar Transit", 'sound/ambience/serspaceamb1.ogg'), + new/datum/track("Stellar Transit", 'sound/ambience/space/space_serithi.ogg'), ) // Only visible if hacked @@ -76,11 +76,11 @@ datum/track/New(var/title_name, var/audio) return if(default_deconstruction_crowbar(user, W)) return - if(istype(W, /obj/item/weapon/wirecutters)) + if(W.is_wirecutter()) return wires.Interact(user) if(istype(W, /obj/item/device/multitool)) return wires.Interact(user) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) if(playing) StopPlaying() user.visible_message("[user] has [anchored ? "un" : ""]secured \the [src].", "You [anchored ? "un" : ""]secure \the [src].") @@ -123,11 +123,11 @@ datum/track/New(var/title_name, var/audio) return if(!anchored) - usr << "You must secure \the [src] first." + to_chat(usr, "You must secure \the [src] first.") return if(stat & (NOPOWER|BROKEN)) - usr << "\The [src] doesn't appear to function." + to_chat(usr, "\The [src] doesn't appear to function.") return if(href_list["change_track"]) @@ -156,7 +156,7 @@ datum/track/New(var/title_name, var/audio) spawn(15) explode() else if(current_track == null) - usr << "No track selected." + to_chat(usr, "No track selected.") else StartPlaying() @@ -164,7 +164,7 @@ datum/track/New(var/title_name, var/audio) /obj/machinery/media/jukebox/interact(mob/user) if(stat & (NOPOWER|BROKEN)) - usr << "\The [src] doesn't appear to function." + to_chat(usr, "\The [src] doesn't appear to function.") return ui_interact(user) @@ -220,7 +220,7 @@ datum/track/New(var/title_name, var/audio) return if(default_deconstruction_crowbar(user, W)) return - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) if(playing) StopPlaying() user.visible_message("[user] has [anchored ? "un" : ""]secured \the [src].", "You [anchored ? "un" : ""]secure \the [src].") diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm index 3da253e682..1ece9225b1 100644 --- a/code/game/machinery/kitchen/microwave.dm +++ b/code/game/machinery/kitchen/microwave.dm @@ -61,7 +61,7 @@ /obj/machinery/microwave/attackby(var/obj/item/O as obj, var/mob/user as mob) if(src.broken > 0) - if(src.broken == 2 && istype(O, /obj/item/weapon/screwdriver)) // If it's broken and they're using a screwdriver + if(src.broken == 2 && O.is_screwdriver()) // If it's broken and they're using a screwdriver user.visible_message( \ "\The [user] starts to fix part of the microwave.", \ "You start to fix part of the microwave." \ @@ -73,7 +73,7 @@ "You have fixed part of the microwave." \ ) src.broken = 1 // Fix it a bit - else if(src.broken == 1 && istype(O, /obj/item/weapon/wrench)) // If it's broken and they're doing the wrench + else if(src.broken == 1 && O.is_wrench()) // If it's broken and they're doing the wrench user.visible_message( \ "\The [user] starts to fix part of the microwave.", \ "You start to fix part of the microwave." \ @@ -88,7 +88,7 @@ src.dirty = 0 // just to be sure src.flags = OPENCONTAINER | NOREACT else - user << "It's broken!" + to_chat(user, "It's broken!") return 1 else if(default_deconstruction_screwdriver(user, O)) return @@ -113,11 +113,11 @@ src.icon_state = "mw" src.flags = OPENCONTAINER | NOREACT else //Otherwise bad luck!! - user << "It's dirty!" + to_chat(user, "It's dirty!") return 1 else if(is_type_in_list(O,acceptable_items)) if (contents.len>=(max_n_of_items + component_parts.len + 1)) //Adds component_parts to the maximum number of items. The 1 is from the circuit - user << "This [src] is full of ingredients, you cannot put more." + to_chat(user, "This [src] is full of ingredients, you cannot put more.") return 1 if(istype(O, /obj/item/stack) && O:get_amount() > 1) // This is bad, but I can't think of how to change it var/obj/item/stack/S = O @@ -143,15 +143,15 @@ return 1 for (var/datum/reagent/R in O.reagents.reagent_list) if (!(R.id in acceptable_reagents)) - user << "Your [O] contains components unsuitable for cookery." + to_chat(user, "Your [O] contains components unsuitable for cookery.") return 1 return else if(istype(O,/obj/item/weapon/grab)) var/obj/item/weapon/grab/G = O - user << "This is ridiculous. You can not fit \the [G.affecting] in this [src]." + to_chat(user, "This is ridiculous. You can not fit \the [G.affecting] in this [src].") return 1 else - user << "You have no idea what you can cook with this [O]." + to_chat(user, "You have no idea what you can cook with this [O].") ..() src.updateUsrDialog() @@ -225,7 +225,7 @@ Eject ingredients!
\ "} - user << browse("Microwave Controls[dat]", "window=microwave") + to_chat(user, browse("Microwave Controls[dat]", "window=microwave")) onclose(user, "microwave") return diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm index b2c3d21b68..a0ead02ef2 100644 --- a/code/game/machinery/kitchen/smartfridge.dm +++ b/code/game/machinery/kitchen/smartfridge.dm @@ -208,7 +208,7 @@ ********************/ /obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob) - if(istype(O, /obj/item/weapon/screwdriver)) + if(O.is_screwdriver()) 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].") playsound(src, O.usesound, 50, 1) @@ -221,13 +221,13 @@ if(wrenchable && default_unfasten_wrench(user, O, 20)) return - if(istype(O, /obj/item/device/multitool)||istype(O, /obj/item/weapon/wirecutters)) + if(istype(O, /obj/item/device/multitool) || O.is_wirecutter()) if(panel_open) attack_hand(user) return if(stat & NOPOWER) - user << "\The [src] is unpowered and useless." + to_chat(user, "\The [src] is unpowered and useless.") return if(accept_check(O)) @@ -246,27 +246,27 @@ if(plants_loaded) user.visible_message("[user] loads \the [src] with \the [P].", "You load \the [src] with \the [P].") if(P.contents.len > 0) - user << "Some items are refused." + to_chat(user, "Some items are refused.") else if(istype(O, /obj/item/weapon/gripper)) // Grippers. ~Mechoid. var/obj/item/weapon/gripper/B = O //B, for Borg. if(!B.wrapped) - user << "\The [B] is not holding anything." + to_chat(user, "\The [B] is not holding anything.") return else var/B_held = B.wrapped - user << "You use \the [B] to put \the [B_held] into \the [src]." + to_chat(user, "You use \the [B] to put \the [B_held] into \the [src].") return else - user << "\The [src] smartly refuses [O]." + to_chat(user, "\The [src] smartly refuses [O].") return 1 /obj/machinery/smartfridge/secure/emag_act(var/remaining_charges, var/mob/user) if(!emagged) emagged = 1 locked = -1 - user << "You short out the product lock on [src]." + to_chat(user, "You short out the product lock on [src].") return 1 /obj/machinery/smartfridge/proc/stock(obj/item/O) @@ -378,9 +378,10 @@ *************************/ /obj/machinery/smartfridge/secure/Topic(href, href_list) - if(stat & (NOPOWER|BROKEN)) return 0 + if(stat & (NOPOWER|BROKEN)) + return 0 if(usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) if(!allowed(usr) && !emagged && locked != -1 && href_list["vend"]) - usr << "Access denied." + to_chat(usr, "Access denied.") return 0 return ..() diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index ab5fcbdf64..f4b3d6f8f0 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -46,7 +46,7 @@ /obj/machinery/light_switch/examine(mob/user) if(..(user, 1)) - user << "A light switch. It is [on? "on" : "off"]." + to_chat(user, "A light switch. It is [on? "on" : "off"].") /obj/machinery/light_switch/attack_hand(mob/user) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index f68bc4cc8a..c103f1f39e 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -232,8 +232,8 @@ Class Procs: return 1 if(user.lying || user.stat) return 1 - if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/living/silicon))) - usr << "You don't have the dexterity to do this!" + if(!(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon))) + to_chat(user, "You don't have the dexterity to do this!") return 1 if(ishuman(user)) var/mob/living/carbon/human/H = user @@ -241,7 +241,7 @@ Class Procs: visible_message("[H] stares cluelessly at [src].") return 1 else if(prob(H.getBrainLoss())) - user << "You momentarily forget how to use [src]." + to_chat(user, "You momentarily forget how to use [src].") return 1 add_fingerprint(user) @@ -313,23 +313,23 @@ Class Procs: component_parts -= A component_parts += B B.loc = null - user << "[A.name] replaced with [B.name]." + to_chat(user, "[A.name] replaced with [B.name].") break update_icon() RefreshParts() else - user << "Following parts detected in the machine:" + to_chat(user, "Following parts detected in the machine:") for(var/var/obj/item/C in component_parts) //var/var/obj/item/C? - user << " [C.name]" + to_chat(user, " [C.name]") return 1 // Default behavior for wrenching down machines. Supports both delay and instant modes. -/obj/machinery/proc/default_unfasten_wrench(var/mob/user, var/obj/item/weapon/wrench/W, var/time = 0) - if(!istype(W)) +/obj/machinery/proc/default_unfasten_wrench(var/mob/user, var/obj/item/W, var/time = 0) + if(!W.is_wrench()) return FALSE if(panel_open) return FALSE // Close panel first! - playsound(loc, W.usesound, 50, 1) + playsound(loc, W.usesound, 50, 1) var/actual_time = W.toolspeed * time if(actual_time != 0) user.visible_message( \ @@ -344,48 +344,48 @@ Class Procs: update_icon() return TRUE -/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/weapon/crowbar/C) - if(!istype(C)) +/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/C) + if(!C.is_crowbar()) return 0 if(!panel_open) return 0 . = dismantle() -/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/obj/item/weapon/screwdriver/S) - if(!istype(S)) +/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/obj/item/S) + if(!S.is_screwdriver()) return 0 playsound(src, S.usesound, 50, 1) panel_open = !panel_open - user << "You [panel_open ? "open" : "close"] the maintenance hatch of [src]." + to_chat(user, "You [panel_open ? "open" : "close"] the maintenance hatch of [src].") update_icon() return 1 -/obj/machinery/proc/computer_deconstruction_screwdriver(var/mob/user, var/obj/item/weapon/screwdriver/S) - if(!istype(S)) +/obj/machinery/proc/computer_deconstruction_screwdriver(var/mob/user, var/obj/item/S) + if(!S.is_screwdriver()) return 0 if(!circuit) return 0 - user << "You start disconnecting the monitor." + to_chat(user, "You start disconnecting the monitor.") playsound(src, S.usesound, 50, 1) if(do_after(user, 20 * S.toolspeed)) if(stat & BROKEN) - user << "The broken glass falls out." + to_chat(user, "The broken glass falls out.") new /obj/item/weapon/material/shard(src.loc) else - user << "You disconnect the monitor." + to_chat(user, "You disconnect the monitor.") . = dismantle() -/obj/machinery/proc/alarm_deconstruction_screwdriver(var/mob/user, var/obj/item/weapon/screwdriver/S) - if(!istype(S)) +/obj/machinery/proc/alarm_deconstruction_screwdriver(var/mob/user, var/obj/item/S) + if(!S.is_screwdriver()) return 0 playsound(src, S.usesound, 50, 1) panel_open = !panel_open - user << "The wires have been [panel_open ? "exposed" : "unexposed"]" + to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"]") update_icon() return 1 -/obj/machinery/proc/alarm_deconstruction_wirecutters(var/mob/user, var/obj/item/weapon/wirecutters/W) - if(!istype(W)) +/obj/machinery/proc/alarm_deconstruction_wirecutters(var/mob/user, var/obj/item/W) + if(!W.is_wirecutter()) return 0 if(!panel_open) return 0 diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index 4d1affb3a0..1d13a36c3a 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -38,7 +38,7 @@ if(panel_open) var/input = sanitize(input(usr, "What id would you like to give this conveyor?", "Multitool-Conveyor interface", id)) if(!input) - usr << "No input found please hang up and try your call again." + to_chat(usr, "No input found please hang up and try your call again.") return id = input return @@ -55,7 +55,7 @@ O_limit++ if(O_limit >= 20) for(var/mob/M in hearers(src, null)) - M << "The mass driver lets out a screech, it mustn't be able to handle any more items." + to_chat(M, "The mass driver lets out a screech, it mustn't be able to handle any more items.") break use_power(500) spawn(0) diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 7e472c8eca..6d4453d1f2 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -72,7 +72,7 @@ var/global/list/navbeacons = list() // no I don't like putting this in, but it w if(!T.is_plating()) return // prevent intraction when T-scanner revealed - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) open = !open playsound(src, I.usesound, 50, 1) user.visible_message("[user] [open ? "opens" : "closes"] the beacon's cover.", "You [open ? "open" : "close"] the beacon's cover.") @@ -83,12 +83,12 @@ var/global/list/navbeacons = list() // no I don't like putting this in, but it w if(open) if(allowed(user)) locked = !locked - user << "Controls are now [locked ? "locked." : "unlocked."]" + to_chat(user, "Controls are now [locked ? "locked." : "unlocked."]") else - user << "Access denied." + to_chat(user, "Access denied.") updateDialog() else - user << "You must open the cover first!" + to_chat(user, "You must open the cover first!") return /obj/machinery/navbeacon/attack_ai(var/mob/user) @@ -107,7 +107,7 @@ var/global/list/navbeacons = list() // no I don't like putting this in, but it w return // prevent intraction when T-scanner revealed if(!open && !ai) // can't alter controls if not open, unless you're an AI - user << "The beacon's control cover is closed." + to_chat(user, "The beacon's control cover is closed.") return diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm index 018cf75f53..53c4dcdd28 100644 --- a/code/game/machinery/nuclear_bomb.dm +++ b/code/game/machinery/nuclear_bomb.dm @@ -55,30 +55,30 @@ var/bomb_set return /obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob) - if(istype(O, /obj/item/weapon/screwdriver)) + if(O.is_screwdriver()) playsound(src, O.usesound, 50, 1) add_fingerprint(user) if(auth) if(opened == 0) opened = 1 overlays += image(icon, "npanel_open") - user << "You unscrew the control panel of [src]." + to_chat(user, "You unscrew the control panel of [src].") else opened = 0 overlays -= image(icon, "npanel_open") - user << "You screw the control panel of [src] back on." + to_chat(user, "You screw the control panel of [src] back on.") else if(opened == 0) - user << "The [src] emits a buzzing noise, the panel staying locked in." + to_chat(user, "The [src] emits a buzzing noise, the panel staying locked in.") if(opened == 1) opened = 0 overlays -= image(icon, "npanel_open") - user << "You screw the control panel of [src] back on." + to_chat(user, "You screw the control panel of [src] back on.") flick("nuclearbombc", src) return - if(istype(O, /obj/item/weapon/wirecutters) || istype(O, /obj/item/device/multitool)) + if(O.is_wirecutter() || istype(O, /obj/item/device/multitool)) if(opened == 1) nukehack_win(user) return @@ -99,7 +99,7 @@ var/bomb_set var/obj/item/weapon/weldingtool/WT = O if(!WT.isOn()) return if(WT.get_fuel() < 5) // uses up 5 fuel. - user << "You need more fuel to complete this task." + to_chat(user, "You need more fuel to complete this task.") return user.visible_message("[user] starts cutting loose the anchoring bolt covers on [src].", "You start cutting loose the anchoring bolt covers with [O]...") @@ -111,7 +111,7 @@ var/bomb_set return if(1) - if(istype(O,/obj/item/weapon/crowbar)) + if(O.is_crowbar()) user.visible_message("[user] starts forcing open the bolt covers on [src].", "You start forcing open the anchoring bolt covers with [O]...") playsound(src, O.usesound, 50, 1) @@ -127,7 +127,7 @@ var/bomb_set var/obj/item/weapon/weldingtool/WT = O if(!WT.isOn()) return if(WT.get_fuel() < 5) // uses up 5 fuel. - user << "You need more fuel to complete this task." + to_chat(user, "You need more fuel to complete this task.") return user.visible_message("[user] starts cutting apart the anchoring system sealant on [src].", "You start cutting apart the anchoring system's sealant with [O]...") @@ -139,7 +139,7 @@ var/bomb_set return if(3) - if(istype(O,/obj/item/weapon/wrench)) + if(O.is_wrench()) user.visible_message("[user] begins unwrenching the anchoring bolts on [src].", "You begin unwrenching the anchoring bolts...") playsound(src, O.usesound, 50, 1) @@ -150,7 +150,7 @@ var/bomb_set return if(4) - if(istype(O,/obj/item/weapon/crowbar)) + if(O.is_crowbar()) user.visible_message("[user] begins lifting [src] off of the anchors.", "You begin lifting the device off the anchors...") playsound(src, O.usesound, 50, 1) @@ -165,7 +165,7 @@ var/bomb_set /obj/machinery/nuclearbomb/attack_hand(mob/user as mob) if(extended) if(!ishuman(user)) - usr << "You don't have the dexterity to do this!" + to_chat(user, "You don't have the dexterity to do this!") return 1 user.set_machine(src) @@ -219,14 +219,14 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) if(!usr.canmove || usr.stat || usr.restrained()) return if(!ishuman(usr)) - usr << "You don't have the dexterity to do this!" + to_chat(usr, "You don't have the dexterity to do this!") return 1 if(deployable) - usr << "You close several panels to make [src] undeployable." + to_chat(usr, "You close several panels to make [src] undeployable.") deployable = 0 else - usr << "You adjust some panels to make [src] deployable." + to_chat(usr, "You adjust some panels to make [src] deployable.") deployable = 1 return @@ -240,10 +240,10 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) var/temp_wire = href_list["wire"] if(href_list["act"] == "pulse") if(!istype(usr.get_active_hand(), /obj/item/device/multitool)) - usr << "You need a multitool!" + to_chat(usr, "You need a multitool!") else if(wires[temp_wire]) - usr << "You can't pulse a cut wire." + to_chat(usr, "You can't pulse a cut wire.") else if(light_wire == temp_wire) lighthack = !lighthack @@ -262,8 +262,9 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) else visible_message("The [src] emits a quiet whirling noise!") if(href_list["act"] == "wire") - if(!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters)) - usr << "You need wirecutters!" + var/obj/item/I = usr.get_active_hand() + if(!I.is_wirecutter()) + to_chat(usr, "You need wirecutters!") else wires[temp_wire] = !wires[temp_wire] if(safety_wire == temp_wire) @@ -314,7 +315,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) if(timing == -1.0) return if(safety) - usr << "The safety is still on." + to_chat(usr, "The safety is still on.") return timing = !(timing) if(timing) diff --git a/code/game/machinery/oxygen_pump.dm b/code/game/machinery/oxygen_pump.dm index 36db3f83f3..0980dc60ed 100644 --- a/code/game/machinery/oxygen_pump.dm +++ b/code/game/machinery/oxygen_pump.dm @@ -128,7 +128,7 @@ return 1 /obj/machinery/oxygen_pump/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) stat ^= MAINT user.visible_message("\The [user] [stat & MAINT ? "opens" : "closes"] \the [src].", "You [stat & MAINT ? "open" : "close"] \the [src].") if(stat & MAINT) diff --git a/code/game/machinery/pda_multicaster.dm b/code/game/machinery/pda_multicaster.dm index fde455ae51..3388de0c31 100644 --- a/code/game/machinery/pda_multicaster.dm +++ b/code/game/machinery/pda_multicaster.dm @@ -46,9 +46,9 @@ icon_state = "[initial(icon_state)]-p" /obj/machinery/pda_multicaster/attackby(obj/item/I, mob/user) - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) default_deconstruction_screwdriver(user, I) - else if(istype(I, /obj/item/weapon/crowbar)) + else if(I.is_crowbar()) default_deconstruction_crowbar(user, I) else ..() diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index ca09d3de58..0482e2f242 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -166,11 +166,11 @@ Buildable meters return ..() /obj/item/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if(iswrench(W)) + if(W.is_wrench()) return wrench_act(user, W) return ..() -/obj/item/pipe/proc/wrench_act(var/mob/living/user, var/obj/item/weapon/wrench/W) +/obj/item/pipe/proc/wrench_act(var/mob/living/user, var/obj/item/weapon/tool/wrench/W) if(!isturf(loc)) return TRUE @@ -255,11 +255,11 @@ Buildable meters var/piping_layer = PIPING_LAYER_DEFAULT /obj/item/pipe_meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if(iswrench(W)) + if(W.is_wrench()) return wrench_act(user, W) return ..() -/obj/item/pipe_meter/proc/wrench_act(var/mob/living/user, var/obj/item/weapon/wrench/W) +/obj/item/pipe_meter/proc/wrench_act(var/mob/living/user, var/obj/item/weapon/tool/wrench/W) var/obj/machinery/atmospherics/pipe/pipe for(var/obj/machinery/atmospherics/pipe/P in loc) if(P.piping_layer == piping_layer) diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index 6675a5ca15..d863e57b90 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -74,7 +74,7 @@ user.drop_item() qdel(W) return - else if (istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) if (unwrenched==0) playsound(src, W.usesound, 50, 1) user << "You begin to unfasten \the [src] from the floor..." diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm index 65656929de..b51fbd4cc0 100644 --- a/code/game/machinery/pipe/pipelayer.dm +++ b/code/game/machinery/pipe/pipelayer.dm @@ -13,7 +13,7 @@ var/max_metal = 50 // Max capacity for internal metal storage var/metal = 0 // Current amount in internal metal storage var/pipe_cost = 0.25 // Cost in steel for each pipe. - var/obj/item/weapon/wrench/W // Internal wrench used for wrenching down the pipes + var/obj/item/weapon/tool/wrench/W // Internal wrench used for wrenching down the pipes var/list/Pipes = list( "regular pipes" = /obj/machinery/atmospherics/pipe/simple, "scrubbers pipes" = /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, @@ -57,7 +57,7 @@ return if(panel_open) if(metal < 1) - user << "\The [src] is empty." + to_chat(user, "\The [src] is empty.") return var/answer = alert(user, "Do you want to eject all the metal in \the [src]?", , "Yes","No") if(answer == "Yes") @@ -66,7 +66,7 @@ "You remove [amount_ejected] sheet\s of [DEFAULT_WALL_MATERIAL] from \the [src].") return if(!metal && !on) - user << "\The [src] doesn't work without metal." + to_chat(user, "\The [src] doesn't work without metal.") return on = !on old_turf = get_turf(src) @@ -81,33 +81,33 @@ return if(default_part_replacement(user, W)) return - if (!panel_open && iswrench(W)) + if (!panel_open && W.is_wrench()) P_type_t = input("Choose pipe type", "Pipe type") as null|anything in Pipes P_type = Pipes[P_type_t] user.visible_message("[user] has set \the [src] to manufacture [P_type_t].", "You set \the [src] to manufacture [P_type_t].") return - if(!panel_open && iscrowbar(W)) + if(!panel_open && W.is_crowbar()) a_dis = !a_dis user.visible_message("[user] has [!a_dis?"de":""]activated auto-dismantling.", "You [!a_dis?"de":""]activate auto-dismantling.") return if(istype(W, /obj/item/pipe)) // NOTE - We must check for matter, otherwise the (free) pipe dispenser can be used to get infinite steel. if(!W.matter || W.matter[DEFAULT_WALL_MATERIAL] < pipe_cost * SHEET_MATERIAL_AMOUNT) - user << "\The [W] doesn't contain enough [DEFAULT_WALL_MATERIAL] to recycle." + to_chat(user, "\The [W] doesn't contain enough [DEFAULT_WALL_MATERIAL] to recycle.") else if(metal + pipe_cost > max_metal) - user << "\The [src] is full." + to_chat(user, "\The [src] is full.") else user.drop_from_inventory(W) metal += pipe_cost - usr << "You recycle \the [W]." + to_chat(user, "You recycle \the [W].") qdel(W) return if(istype(W, /obj/item/stack/material) && W.get_material_name() == DEFAULT_WALL_MATERIAL) var/result = load_metal(W) if(isnull(result)) - user << "Unable to load [W] - no metal found." + to_chat(user, "Unable to load [W] - no metal found.") else if(!result) - user << "\The [src] is full." + to_chat(user, "\The [src] is full.") else user.visible_message("[user] has loaded metal into \the [src].", "You load metal into \the [src]") return @@ -116,7 +116,7 @@ /obj/machinery/pipelayer/examine(mob/user) ..() - user << "\The [src] has [metal] sheet\s, is set to produce [P_type_t], and auto-dismantling is [!a_dis?"de":""]activated." + to_chat(user, "\The [src] has [metal] sheet\s, is set to produce [P_type_t], and auto-dismantling is [!a_dis?"de":""]activated.") /obj/machinery/pipelayer/proc/reset() on = 0 diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 2b59a24bd1..5ae3608271 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -231,11 +231,11 @@ var/list/turret_icons /obj/machinery/porta_turret/proc/isLocked(mob/user) if(ailock && issilicon(user)) - user << "There seems to be a firewall preventing you from accessing this device." + to_chat(user, "There seems to be a firewall preventing you from accessing this device.") return 1 if(locked && !issilicon(user)) - user << "Access denied." + to_chat(user, "Access denied.") return 1 return 0 @@ -284,14 +284,14 @@ var/list/turret_icons /obj/machinery/porta_turret/CanUseTopic(var/mob/user) if(HasController()) - user << "Turrets can only be controlled using the assigned turret controller." + to_chat(user, "Turrets can only be controlled using the assigned turret controller.") return STATUS_CLOSE if(isLocked(user)) return STATUS_CLOSE if(!anchored) - usr << "\The [src] has to be secured first!" + to_chat(user, "\The [src] has to be secured first!") return STATUS_CLOSE return ..() @@ -335,13 +335,13 @@ var/list/turret_icons /obj/machinery/porta_turret/attackby(obj/item/I, mob/user) if(stat & BROKEN) - if(istype(I, /obj/item/weapon/crowbar)) + if(I.is_crowbar()) //If the turret is destroyed, you can remove it with a crowbar to //try and salvage its components - user << "You begin prying the metal coverings off." + to_chat(user, "You begin prying the metal coverings off.") if(do_after(user, 20)) if(can_salvage && prob(70)) - user << "You remove the turret and salvage some components." + to_chat(user, "You remove the turret and salvage some components.") if(installation) var/obj/item/weapon/gun/energy/Gun = new installation(loc) Gun.power_supply.charge = gun_charge @@ -351,18 +351,18 @@ var/list/turret_icons if(prob(50)) new /obj/item/device/assembly/prox_sensor(loc) else - user << "You remove the turret but did not manage to salvage anything." + to_chat(user, "You remove the turret but did not manage to salvage anything.") qdel(src) // qdel - else if((istype(I, /obj/item/weapon/wrench))) + else if(I.is_wrench()) if(enabled || raised) - user << "You cannot unsecure an active turret!" + to_chat(user, "You cannot unsecure an active turret!") return if(wrenching) - user << "Someone is already [anchored ? "un" : ""]securing the turret!" + to_chat(user, "Someone is already [anchored ? "un" : ""]securing the turret!") return if(!anchored && isinspace()) - user << "Cannot secure turrets in space!" + to_chat(user, "Cannot secure turrets in space!") return user.visible_message(\ @@ -377,11 +377,11 @@ var/list/turret_icons playsound(loc, I.usesound, 100, 1) anchored = 1 update_icon() - user << "You secure the exterior bolts on the turret." + to_chat(user, "You secure the exterior bolts on the turret.") else if(anchored) playsound(loc, I.usesound, 100, 1) anchored = 0 - user << "You unsecure the exterior bolts on the turret." + to_chat(user, "You unsecure the exterior bolts on the turret.") update_icon() wrenching = 0 @@ -389,10 +389,10 @@ var/list/turret_icons //Behavior lock/unlock mangement if(allowed(user)) locked = !locked - user << "Controls are now [locked ? "locked" : "unlocked"]." + to_chat(user, "Controls are now [locked ? "locked" : "unlocked"].") updateUsrDialog() else - user << "Access denied." + to_chat(user, "Access denied.") else //if the turret was attacked with the intention of harming it: @@ -422,7 +422,7 @@ var/list/turret_icons if(!emagged) //Emagging the turret makes it go bonkers and stun everyone. It also makes //the turret shoot much, much faster. - user << "You short out [src]'s threat assessment circuits." + to_chat(user, "You short out [src]'s threat assessment circuits.") visible_message("[src] hums oddly...") emagged = 1 iconholder = 1 @@ -777,16 +777,16 @@ var/list/turret_icons //this is a bit unwieldy but self-explanatory switch(build_step) if(0) //first step - if(istype(I, /obj/item/weapon/wrench) && !anchored) + if(I.is_wrench() && !anchored) playsound(loc, I.usesound, 100, 1) - user << "You secure the external bolts." + to_chat(user, "You secure the external bolts.") anchored = 1 build_step = 1 return - else if(istype(I, /obj/item/weapon/crowbar) && !anchored) + else if(I.is_crowbar() && !anchored) playsound(loc, I.usesound, 75, 1) - user << "You dismantle the turret construction." + to_chat(user, "You dismantle the turret construction.") new /obj/item/stack/material/steel(loc, 5) qdel(src) return @@ -795,24 +795,24 @@ var/list/turret_icons if(istype(I, /obj/item/stack/material) && I.get_material_name() == DEFAULT_WALL_MATERIAL) var/obj/item/stack/M = I if(M.use(2)) - user << "You add some metal armor to the interior frame." + to_chat(user, "You add some metal armor to the interior frame.") build_step = 2 icon_state = "turret_frame2" else - user << "You need two sheets of metal to continue construction." + to_chat(user, "You need two sheets of metal to continue construction.") return - else if(istype(I, /obj/item/weapon/wrench)) + else if(I.is_wrench()) playsound(loc, I.usesound, 75, 1) - user << "You unfasten the external bolts." + to_chat(user, "You unfasten the external bolts.") anchored = 0 build_step = 0 return if(2) - if(istype(I, /obj/item/weapon/wrench)) + if(I.is_wrench()) playsound(loc, I.usesound, 100, 1) - user << "You bolt the metal armor into place." + to_chat(user, "You bolt the metal armor into place.") build_step = 3 return @@ -821,14 +821,14 @@ var/list/turret_icons if(!WT.isOn()) return if(WT.get_fuel() < 5) //uses up 5 fuel. - user << "You need more fuel to complete this task." + to_chat(user, "You need more fuel to complete this task.") return playsound(loc, I.usesound, 50, 1) if(do_after(user, 20 * I.toolspeed)) if(!src || !WT.remove_fuel(5, user)) return build_step = 1 - user << "You remove the turret's interior metal armor." + to_chat(user, "You remove the turret's interior metal armor.") new /obj/item/stack/material/steel(loc, 2) return @@ -839,20 +839,20 @@ var/list/turret_icons return var/obj/item/weapon/gun/energy/E = I //typecasts the item to an energy gun if(!user.unEquip(I)) - user << "\the [I] is stuck to your hand, you cannot put it in \the [src]" + to_chat(user, "\the [I] is stuck to your hand, you cannot put it in \the [src]") return installation = I.type //installation becomes I.type gun_charge = E.power_supply.charge //the gun's charge is stored in gun_charge - user << "You add [I] to the turret." + to_chat(user, "You add [I] to the turret.") target_type = /obj/machinery/porta_turret build_step = 4 qdel(I) //delete the gun :( return - else if(istype(I, /obj/item/weapon/wrench)) + else if(I.is_wrench()) playsound(loc, I.usesound, 100, 1) - user << "You remove the turret's metal armor bolts." + to_chat(user, "You remove the turret's metal armor bolts.") build_step = 2 return @@ -860,19 +860,19 @@ var/list/turret_icons if(isprox(I)) build_step = 5 if(!user.unEquip(I)) - user << "\the [I] is stuck to your hand, you cannot put it in \the [src]" + to_chat(user, "\the [I] is stuck to your hand, you cannot put it in \the [src]") return - user << "You add the prox sensor to the turret." + to_chat(user, "You add the prox sensor to the turret.") qdel(I) return //attack_hand() removes the gun if(5) - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) playsound(loc, I.usesound, 100, 1) build_step = 6 - user << "You close the internal access hatch." + to_chat(user, "You close the internal access hatch.") return //attack_hand() removes the prox sensor @@ -881,16 +881,16 @@ var/list/turret_icons if(istype(I, /obj/item/stack/material) && I.get_material_name() == DEFAULT_WALL_MATERIAL) var/obj/item/stack/M = I if(M.use(2)) - user << "You add some metal armor to the exterior frame." + to_chat(user, "You add some metal armor to the exterior frame.") build_step = 7 else - user << "You need two sheets of metal to continue construction." + to_chat(user, "You need two sheets of metal to continue construction.") return - else if(istype(I, /obj/item/weapon/screwdriver)) + else if(I.is_screwdriver()) playsound(loc, I.usesound, 100, 1) build_step = 5 - user << "You open the internal access hatch." + to_chat(user, "You open the internal access hatch.") return if(7) @@ -898,14 +898,14 @@ var/list/turret_icons var/obj/item/weapon/weldingtool/WT = I if(!WT.isOn()) return if(WT.get_fuel() < 5) - user << "You need more fuel to complete this task." + to_chat(user, "You need more fuel to complete this task.") playsound(loc, WT.usesound, 50, 1) if(do_after(user, 30 * WT.toolspeed)) if(!src || !WT.remove_fuel(5, user)) return build_step = 8 - user << "You weld the turret's armor down." + to_chat(user, "You weld the turret's armor down.") //The final step: create a full turret var/obj/machinery/porta_turret/Turret = new target_type(loc) @@ -917,9 +917,9 @@ var/list/turret_icons qdel(src) // qdel - else if(istype(I, /obj/item/weapon/crowbar)) + else if(I.is_crowbar()) playsound(loc, I.usesound, 75, 1) - user << "You pry off the turret's exterior armor." + to_chat(user, "You pry off the turret's exterior armor.") new /obj/item/stack/material/steel(loc, 2) build_step = 6 return @@ -948,10 +948,10 @@ var/list/turret_icons Gun.update_icon() installation = null gun_charge = 0 - user << "You remove [Gun] from the turret frame." + to_chat(user, "You remove [Gun] from the turret frame.") if(5) - user << "You remove the prox sensor from the turret frame." + to_chat(user, "You remove the prox sensor from the turret frame.") new /obj/item/device/assembly/prox_sensor(loc) build_step = 4 diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index b51edaf189..ddd50a8f50 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -52,7 +52,7 @@ obj/machinery/recharger G.loc = src charging = G update_icon() - else if(portable && istype(G, /obj/item/weapon/wrench)) + else if(portable && G.is_wrench()) if(charging) to_chat(user, "Remove [charging] first!") return diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 692e76bf5a..f702f3cf25 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -126,7 +126,7 @@ /obj/machinery/recharge_station/examine(mob/user) ..(user) - user << "The charge meter reads: [round(chargepercentage())]%" + to_chat(user, "The charge meter reads: [round(chargepercentage())]%") /obj/machinery/recharge_station/proc/chargepercentage() if(!cell) @@ -292,7 +292,7 @@ if(usr.incapacitated() || !isliving(usr)) return - + go_in(usr) /obj/machinery/recharge_station/ghost_pod_recharger diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 9beb0ada4b..473f3dfd77 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -237,7 +237,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() announcement.announcer = ID.assignment ? "[ID.assignment] [ID.registered_name]" : ID.registered_name else reset_message() - user << "You are not authorized to send announcements." + to_chat(user, "You are not authorized to send announcements.") updateUsrDialog() if(istype(O, /obj/item/weapon/stamp)) if(inoperable(MAINT)) return diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index ec0af28d58..4c447e91f3 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -30,11 +30,11 @@ /obj/machinery/space_heater/examine(mob/user) ..(user) - user << "The heater is [on ? "on" : "off"] and the hatch is [panel_open ? "open" : "closed"]." + to_chat(user, "The heater is [on ? "on" : "off"] and the hatch is [panel_open ? "open" : "closed"].") if(panel_open) - user << "The power cell is [cell ? "installed" : "missing"]." + to_chat(user, "The power cell is [cell ? "installed" : "missing"].") else - user << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%" + to_chat(user, "The charge meter reads [cell ? round(cell.percent(),1) : 0]%") return /obj/machinery/space_heater/powered() @@ -54,7 +54,7 @@ if(istype(I, /obj/item/weapon/cell)) if(panel_open) if(cell) - user << "There is already a power cell inside." + to_chat(user, "There is already a power cell inside.") return else // insert cell @@ -68,9 +68,9 @@ user.visible_message("[user] inserts a power cell into [src].", "You insert the power cell into [src].") power_change() else - user << "The hatch must be open to insert a power cell." + to_chat(user, "The hatch must be open to insert a power cell.") return - else if(istype(I, /obj/item/weapon/screwdriver)) + else if(I.is_screwdriver()) panel_open = !panel_open playsound(src, I.usesound, 50, 1) user.visible_message("[user] [panel_open ? "opens" : "closes"] the hatch on the [src].", "You [panel_open ? "open" : "close"] the hatch on the [src].") diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 7c0ca00f1a..5cb6b0ba06 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -207,14 +207,14 @@ if(!protected) playsound(src.loc, "sparks", 75, 1, -1) - user << "You try to touch the controls but you get zapped. There must be a short circuit somewhere." + to_chat(user, "You try to touch the controls but you get zapped. There must be a short circuit somewhere.") return*/ else //welp, the guy is protected, we can continue if(issuperUV) - user << "You slide the dial back towards \"185nm\"." + to_chat(user, "You slide the dial back towards \"185nm\".") issuperUV = 0 else - user << "You crank the dial all the way up to \"15nm\"." + to_chat(user, "You crank the dial all the way up to \"15nm\".") issuperUV = 1 return @@ -233,10 +233,10 @@ if(!protected) playsound(src.loc, "sparks", 75, 1, -1) - user << "You try to touch the controls but you get zapped. There must be a short circuit somewhere." + to_chat(user, "You try to touch the controls but you get zapped. There must be a short circuit somewhere.") return*/ else - user << "You push the button. The coloured LED next to it changes." + to_chat(user, "You push the button. The coloured LED next to it changes.") safetieson = !safetieson @@ -285,7 +285,7 @@ /obj/machinery/suit_storage_unit/proc/toggle_open(mob/user as mob) if(islocked || isUV) - user << "Unable to open unit." + to_chat(user, "Unable to open unit.") return if(OCCUPANT) eject_occupant(user) @@ -296,7 +296,7 @@ /obj/machinery/suit_storage_unit/proc/toggle_lock(mob/user as mob) if(OCCUPANT && safetieson) - user << "The Unit's safety protocols disallow locking when a biological form is detected inside its compartments." + to_chat(user, "The Unit's safety protocols disallow locking when a biological form is detected inside its compartments.") return if(isopen) return @@ -308,12 +308,12 @@ if(isUV || isopen) //I'm bored of all these sanity checks return if(OCCUPANT && safetieson) - user << "WARNING: Biological entity detected in the confines of the Unit's storage. Cannot initiate cycle." + to_chat(user, "WARNING: Biological entity detected in the confines of the Unit's storage. Cannot initiate cycle.") return if(!HELMET && !MASK && !SUIT && !OCCUPANT) //shit's empty yo - user << "Unit storage bays empty. Nothing to disinfect -- Aborting." + to_chat(user, "Unit storage bays empty. Nothing to disinfect -- Aborting.") return - user << "You start the Unit's cauterisation cycle." + to_chat(user, "You start the Unit's cauterisation cycle.") cycletime_left = 20 isUV = 1 if(OCCUPANT && !islocked) @@ -378,10 +378,10 @@ if(OCCUPANT) if(issuperUV) OCCUPANT.take_organ_damage(0,40) - user << "Test. You gave him 40 damage" + to_chat(user, "Test. You gave him 40 damage") else OCCUPANT.take_organ_damage(0,8) - user << "Test. You gave him 8 damage" + to_chat(user, "Test. You gave him 8 damage") return*/ @@ -438,13 +438,13 @@ if(usr.stat != 0) return if(!isopen) - usr << "The unit's doors are shut." + to_chat(usr, "The unit's doors are shut.") return if(!ispowered || isbroken) - usr << "The unit is not operational." + to_chat(usr, "The unit is not operational.") return if((OCCUPANT) || (HELMET) || (SUIT)) - usr << "It's too cluttered inside for you to fit in!" + to_chat(usr, "It's too cluttered inside for you to fit in!") return visible_message("[usr] starts squeezing into the suit storage unit!", 3) if(do_after(usr, 10)) @@ -471,10 +471,10 @@ /obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob) if(!ispowered) return - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) panelopen = !panelopen playsound(src, I.usesound, 100, 1) - user << text("You [] the unit's maintenance panel.",(panelopen ? "open up" : "close")) + to_chat(user, "You [panelopen ? "open up" : "close"] the unit's maintenance panel.") updateUsrDialog() return if(istype(I, /obj/item/weapon/grab)) @@ -482,13 +482,13 @@ if(!(ismob(G.affecting))) return if(!isopen) - usr << "The unit's doors are shut." + to_chat(user, "The unit's doors are shut.") return if(!ispowered || isbroken) - usr << "The unit is not operational." + to_chat(user, "The unit is not operational.") return if((OCCUPANT) || (HELMET) || (SUIT)) //Unit needs to be absolutely empty - user << "The unit's storage area is too cluttered." + to_chat(user, "The unit's storage area is too cluttered.") return visible_message("[user] starts putting [G.affecting.name] into the Suit Storage Unit.", 3) if(do_after(user, 20)) @@ -514,9 +514,9 @@ return var/obj/item/clothing/suit/space/S = I if(SUIT) - user << "The unit already contains a suit." + to_chat(user, "The unit already contains a suit.") return - user << "You load the [S.name] into the storage compartment." + to_chat(user, "You load the [S.name] into the storage compartment.") user.drop_item() S.loc = src SUIT = S @@ -528,9 +528,9 @@ return var/obj/item/clothing/head/helmet/H = I if(HELMET) - user << "The unit already contains a helmet." + to_chat(user, "The unit already contains a helmet.") return - user << "You load the [H.name] into the storage compartment." + to_chat(user, "You load the [H.name] into the storage compartment.") user.drop_item() H.loc = src HELMET = H @@ -542,9 +542,9 @@ return var/obj/item/clothing/mask/M = I if(MASK) - user << "The unit already contains a mask." + to_chat(user, "The unit already contains a mask.") return - user << "You load the [M.name] into the storage compartment." + to_chat(user, "You load the [M.name] into the storage compartment.") user.drop_item() M.loc = src MASK = M @@ -653,7 +653,7 @@ return //Hacking init. - if(istype(I, /obj/item/device/multitool) || istype(I, /obj/item/weapon/wirecutters)) + if(istype(I, /obj/item/device/multitool) || I.is_wirecutter()) if(panel_open) attack_hand(user) return @@ -665,11 +665,11 @@ return if(locked) - user << "The suit cycler is locked." + to_chat(user, "The suit cycler is locked.") return if(contents.len > 0) - user << "There is no room inside the cycler for [G.affecting.name]." + to_chat(user, "There is no room inside the cycler for [G.affecting.name].") return visible_message("[user] starts putting [G.affecting.name] into the suit cycler.", 3) @@ -689,29 +689,29 @@ updateUsrDialog() return - else if(istype(I,/obj/item/weapon/screwdriver)) + else if(I.is_screwdriver()) panel_open = !panel_open playsound(src, I.usesound, 50, 1) - user << "You [panel_open ? "open" : "close"] the maintenance panel." + to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") updateUsrDialog() return else if(istype(I,/obj/item/clothing/head/helmet/space) && !istype(I, /obj/item/clothing/head/helmet/space/rig)) if(locked) - user << "The suit cycler is locked." + to_chat(user, "The suit cycler is locked.") return if(helmet) - user << "The cycler already contains a helmet." + to_chat(user, "The cycler already contains a helmet.") return if(I.icon_override == CUSTOM_ITEM_MOB) - user << "You cannot refit a customised voidsuit." + to_chat(user, "You cannot refit a customised voidsuit.") return - user << "You fit \the [I] into the suit cycler." + to_chat(user, "You fit \the [I] into the suit cycler.") user.drop_item() I.loc = src helmet = I @@ -723,18 +723,18 @@ else if(istype(I,/obj/item/clothing/suit/space/void)) if(locked) - user << "The suit cycler is locked." + to_chat(user, "The suit cycler is locked.") return if(suit) - user << "The cycler already contains a voidsuit." + to_chat(user, "The cycler already contains a voidsuit.") return if(I.icon_override == CUSTOM_ITEM_MOB) - user << "You cannot refit a customised voidsuit." + to_chat(user, "You cannot refit a customised voidsuit.") return - user << "You fit \the [I] into the suit cycler." + to_chat(user, "You fit \the [I] into the suit cycler.") user.drop_item() I.loc = src suit = I @@ -747,11 +747,11 @@ /obj/machinery/suit_cycler/emag_act(var/remaining_charges, var/mob/user) if(emagged) - user << "The cycler has already been subverted." + to_chat(user, "The cycler has already been subverted.") return //Clear the access reqs, disable the safeties, and open up all paintjobs. - user << "You run the sequencer across the interface, corrupting the operating protocols." + to_chat(user, "You run the sequencer across the interface, corrupting the operating protocols.") departments = list("Engineering","Mining","Medical","Security","Atmos","HAZMAT","Construction","Biohazard","Crowd Control","Emergency Medical Response","^%###^%$", "Charring") species = list(SPECIES_HUMAN,SPECIES_TAJ,SPECIES_SKRELL,SPECIES_UNATHI, SPECIES_TESHARI) @@ -855,14 +855,14 @@ if(allowed(usr)) locked = !locked - usr << "You [locked ? "" : "un"]lock \the [src]." + to_chat(usr, "You [locked ? "" : "un"]lock \the [src].") else - usr << "Access denied." + to_chat(usr, "Access denied.") else if(href_list["begin_decontamination"]) if(safeties && occupant) - usr << "The cycler has detected an occupant. Please remove the occupant before commencing the decontamination cycle." + to_chat(usr, "The cycler has detected an occupant. Please remove the occupant before commencing the decontamination cycle.") return active = 1 diff --git a/code/game/machinery/supplybeacon.dm b/code/game/machinery/supplybeacon.dm index 0f58bd9a48..9f228be5d4 100644 --- a/code/game/machinery/supplybeacon.dm +++ b/code/game/machinery/supplybeacon.dm @@ -45,7 +45,7 @@ drop_type = "supermatter" /obj/machinery/power/supply_beacon/attackby(var/obj/item/weapon/W, var/mob/user) - if(!use_power && istype(W, /obj/item/weapon/wrench)) + if(!use_power && W.is_wrench()) if(!anchored && !connect_to_network()) to_chat(user, "This device must be placed over an exposed cable.") return diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index 5befc59495..2c59ec8b20 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -56,7 +56,7 @@ return if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/N = M - M << "You have joined the ranks of the Syndicate and become a traitor to the station!" + to_chat(N, "You have joined the ranks of the Syndicate and become a traitor to the station!") traitors.add_antagonist(N.mind) traitors.equip(N) message_admins("[N]/([N.ckey]) has accepted a traitor objective from a syndicate beacon.") @@ -87,7 +87,8 @@ /obj/machinery/power/singularity_beacon/proc/Activate(mob/user = null) if(surplus() < 1500) - if(user) user << "The connected wire doesn't have enough current." + if(user) + to_chat(user, "The connected wire doesn't have enough current.") return for(var/obj/singularity/singulo in all_singularities) if(singulo.z == z) @@ -96,7 +97,7 @@ active = 1 START_MACHINE_PROCESSING(src) if(user) - user << "You activate the beacon." + to_chat(user, "You activate the beacon.") /obj/machinery/power/singularity_beacon/proc/Deactivate(mob/user = null) for(var/obj/singularity/singulo in all_singularities) @@ -105,7 +106,7 @@ icon_state = "[icontype]0" active = 0 if(user) - user << "You deactivate the beacon." + to_chat(user, "You deactivate the beacon.") /obj/machinery/power/singularity_beacon/attack_ai(mob/user as mob) return @@ -114,27 +115,27 @@ if(anchored) return active ? Deactivate(user) : Activate(user) else - user << "You need to screw the beacon to the floor first!" + to_chat(user, "You need to screw the beacon to the floor first!") return /obj/machinery/power/singularity_beacon/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) if(active) - user << "You need to deactivate the beacon first!" + to_chat(user, "You need to deactivate the beacon first!") return if(anchored) anchored = 0 - user << "You unscrew the beacon from the floor." + to_chat(user, "You unscrew the beacon from the floor.") playsound(src, W.usesound, 50, 1) disconnect_from_network() return else if(!connect_to_network()) - user << "This device must be placed over an exposed cable." + to_chat(user, "This device must be placed over an exposed cable.") return anchored = 1 - user << "You screw the beacon to the floor and attach the cable." + to_chat(user, "You screw the beacon to the floor and attach the cable.") playsound(src, W.usesound, 50, 1) return ..() diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 208b9d51e8..331f5644d9 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -28,35 +28,35 @@ if (integrity < 100) //Damaged, let's repair! if (T.use(1)) integrity = between(0, integrity + rand(10,20), 100) - usr << "You apply the Nanopaste to [src], repairing some of the damage." + to_chat(usr, "You apply the Nanopaste to [src], repairing some of the damage.") else - usr << "This machine is already in perfect condition." + to_chat(usr, "This machine is already in perfect condition.") return switch(construct_op) if(0) - if(istype(P, /obj/item/weapon/screwdriver)) - user << "You unfasten the bolts." + if(P.is_screwdriver()) + to_chat(user, "You unfasten the bolts.") playsound(src.loc, P.usesound, 50, 1) construct_op ++ if(1) - if(istype(P, /obj/item/weapon/screwdriver)) - user << "You fasten the bolts." + if(P.is_screwdriver()) + to_chat(user, "You fasten the bolts.") playsound(src.loc, P.usesound, 50, 1) construct_op -- - if(istype(P, /obj/item/weapon/wrench)) - user << "You dislodge the external plating." + if(P.is_wrench()) + to_chat(user, "You dislodge the external plating.") playsound(src.loc, P.usesound, 75, 1) construct_op ++ if(2) - if(istype(P, /obj/item/weapon/wrench)) - user << "You secure the external plating." + if(P.is_wrench()) + to_chat(user, "You secure the external plating.") playsound(src.loc, P.usesound, 75, 1) construct_op -- - if(istype(P, /obj/item/weapon/wirecutters)) + if(P.is_wirecutter()) playsound(src.loc, P.usesound, 50, 1) - user << "You remove the cables." + to_chat(user, "You remove the cables.") construct_op ++ var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( user.loc ) A.amount = 5 @@ -65,16 +65,16 @@ if(istype(P, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/A = P if (A.use(5)) - user << "You insert the cables." + to_chat(user, "You insert the cables.") construct_op-- stat &= ~BROKEN // the machine's not borked anymore! else - user << "You need five coils of wire for this." - if(istype(P, /obj/item/weapon/crowbar)) - user << "You begin prying out the circuit board other components..." + to_chat(user, "You need five coils of wire for this.") + if(P.is_crowbar()) + to_chat(user, "You begin prying out the circuit board other components...") playsound(src.loc, P.usesound, 50, 1) if(do_after(user,60 * P.toolspeed)) - user << "You finish prying out the components." + to_chat(user, "You finish prying out the components.") // Drop all the component stuff if(contents.len > 0) @@ -172,7 +172,7 @@ dat += "" temp = "" - user << browse(dat, "window=tcommachine;size=520x500;can_resize=0") + to_chat(user, browse(dat, "window=tcommachine;size=520x500;can_resize=0")) onclose(user, "dormitory") diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 54b4f8b258..92c23206bb 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -179,7 +179,7 @@ if(I || istype(W, /obj/item/weapon/spacecash)) attack_hand(user) return - else if(istype(W, /obj/item/weapon/screwdriver)) + else if(W.is_screwdriver()) panel_open = !panel_open to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") playsound(src, W.usesound, 50, 1) @@ -189,7 +189,7 @@ nanomanager.update_uis(src) // Speaker switch is on the main UI, not wires UI return - else if(istype(W, /obj/item/device/multitool)||istype(W, /obj/item/weapon/wirecutters)) + else if(istype(W, /obj/item/device/multitool) || W.is_wirecutter()) if(panel_open) attack_hand(user) return @@ -201,7 +201,7 @@ to_chat(user, "You insert \the [W] into \the [src].") nanomanager.update_uis(src) return - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) playsound(src, W.usesound, 100, 1) if(anchored) user.visible_message("[user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") @@ -567,7 +567,7 @@ if(!user.unEquip(W)) return - user << "You insert \the [W] in the product receptor." + to_chat(user, "You insert \the [W] in the product receptor.") R.add_product(W) if(has_logs) do_logging(R, user) @@ -737,7 +737,7 @@ /obj/machinery/vending/assist products = list( /obj/item/device/assembly/prox_sensor = 5,/obj/item/device/assembly/igniter = 3,/obj/item/device/assembly/signaler = 4, - /obj/item/weapon/wirecutters = 1, /obj/item/weapon/cartridge/signal = 4) + /obj/item/weapon/tool/wirecutters = 1, /obj/item/weapon/cartridge/signal = 4) contraband = list(/obj/item/device/flashlight = 5,/obj/item/device/assembly/timer = 2) product_ads = "Only the finest!;Have some tools.;The most robust equipment.;The finest gear in space!" @@ -1026,8 +1026,8 @@ icon_state = "tool" icon_deny = "tool-deny" //req_access = list(access_maint_tunnels) //Maintenance access - products = list(/obj/item/stack/cable_coil/random = 10,/obj/item/weapon/crowbar = 5,/obj/item/weapon/weldingtool = 3,/obj/item/weapon/wirecutters = 5, - /obj/item/weapon/wrench = 5,/obj/item/device/analyzer = 5,/obj/item/device/t_scanner = 5,/obj/item/weapon/screwdriver = 5, + products = list(/obj/item/stack/cable_coil/random = 10,/obj/item/weapon/tool/crowbar = 5,/obj/item/weapon/weldingtool = 3,/obj/item/weapon/tool/wirecutters = 5, + /obj/item/weapon/tool/wrench = 5,/obj/item/device/analyzer = 5,/obj/item/device/t_scanner = 5,/obj/item/weapon/tool/screwdriver = 5, /obj/item/device/flashlight/glowstick = 3, /obj/item/device/flashlight/glowstick/red = 3, /obj/item/device/flashlight/glowstick/blue = 3, /obj/item/device/flashlight/glowstick/orange =3, /obj/item/device/flashlight/glowstick/yellow = 3) contraband = list(/obj/item/weapon/weldingtool/hugetank = 2,/obj/item/clothing/gloves/fyellow = 2,) @@ -1065,8 +1065,8 @@ icon_deny = "engi-deny" req_access = list(access_engine_equip) products = list(/obj/item/clothing/under/rank/chief_engineer = 4,/obj/item/clothing/under/rank/engineer = 4,/obj/item/clothing/shoes/orange = 4,/obj/item/clothing/head/hardhat = 4, - /obj/item/weapon/storage/belt/utility = 4,/obj/item/clothing/glasses/meson = 4,/obj/item/clothing/gloves/yellow = 4, /obj/item/weapon/screwdriver = 12, - /obj/item/weapon/crowbar = 12,/obj/item/weapon/wirecutters = 12,/obj/item/device/multitool = 12,/obj/item/weapon/wrench = 12,/obj/item/device/t_scanner = 12, + /obj/item/weapon/storage/belt/utility = 4,/obj/item/clothing/glasses/meson = 4,/obj/item/clothing/gloves/yellow = 4, /obj/item/weapon/tool/screwdriver = 12, + /obj/item/weapon/tool/crowbar = 12,/obj/item/weapon/tool/wirecutters = 12,/obj/item/device/multitool = 12,/obj/item/weapon/tool/wrench = 12,/obj/item/device/t_scanner = 12, /obj/item/stack/cable_coil/heavyduty = 8, /obj/item/weapon/cell = 8, /obj/item/weapon/weldingtool = 8,/obj/item/clothing/head/welding = 8, /obj/item/weapon/light/tube = 10,/obj/item/clothing/suit/fire = 4, /obj/item/weapon/stock_parts/scanning_module = 5,/obj/item/weapon/stock_parts/micro_laser = 5, /obj/item/weapon/stock_parts/matter_bin = 5,/obj/item/weapon/stock_parts/manipulator = 5,/obj/item/weapon/stock_parts/console_screen = 5) @@ -1085,7 +1085,7 @@ products = list(/obj/item/clothing/suit/storage/toggle/labcoat = 4,/obj/item/clothing/under/rank/roboticist = 4,/obj/item/stack/cable_coil = 4,/obj/item/device/flash = 4, /obj/item/weapon/cell/high = 12, /obj/item/device/assembly/prox_sensor = 3,/obj/item/device/assembly/signaler = 3,/obj/item/device/healthanalyzer = 3, /obj/item/weapon/surgical/scalpel = 2,/obj/item/weapon/surgical/circular_saw = 2,/obj/item/weapon/tank/anesthetic = 2,/obj/item/clothing/mask/breath/medical = 5, - /obj/item/weapon/screwdriver = 5,/obj/item/weapon/crowbar = 5) + /obj/item/weapon/tool/screwdriver = 5,/obj/item/weapon/tool/crowbar = 5) //everything after the power cell had no amounts, I improvised. -Sayu req_log_access = access_rd has_logs = 1 diff --git a/code/game/machinery/wall_frames.dm b/code/game/machinery/wall_frames.dm index 0d3c3bcd2c..dd75e2d8e9 100644 --- a/code/game/machinery/wall_frames.dm +++ b/code/game/machinery/wall_frames.dm @@ -18,7 +18,7 @@ frame_types_wall = construction_frame_wall /obj/item/frame/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) new refund_type(get_turf(src.loc), refund_amt) qdel(src) return diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index 309c9cf2a4..672b0a2c4e 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -90,7 +90,7 @@ return if(default_unfasten_wrench(user, W, 40)) return - /*if(istype(W,/obj/item/weapon/screwdriver)) + /*if(W.is_screwdriver()) panel = !panel user << "You [panel ? "open" : "close"] the [src]'s maintenance panel"*/ if(istype(W,/obj/item/weapon/pen/crayon) || istype(W,/obj/item/weapon/stamp)) diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 80b417da22..8d65768b28 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -38,11 +38,13 @@ projectiles-- var/P = new projectile(curloc) Fire(P, target) + if(i == 1) + set_ready_state(0) if(fire_cooldown) sleep(fire_cooldown) if(auto_rearm) projectiles = projectiles_per_shot - set_ready_state(0) +// set_ready_state(0) do_after_cooldown() return @@ -270,7 +272,7 @@ ..() var/obj/item/weapon/grenade/flashbang/F = AM spawn(det_time) - F.prime() + F.detonate() /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang//Because I am a heartless bastard -Sieve name = "\improper SOP-6 grenade launcher" diff --git a/code/game/mecha/mech_prosthetics.dm b/code/game/mecha/mech_prosthetics.dm index 45b9853881..f0b792ac73 100644 --- a/code/game/mecha/mech_prosthetics.dm +++ b/code/game/mecha/mech_prosthetics.dm @@ -150,7 +150,7 @@ /obj/machinery/pros_fabricator/attackby(var/obj/item/I, var/mob/user) if(busy) - user << "\The [src] is busy. Please wait for completion of previous operation." + to_chat(user, "\The [src] is busy. Please wait for completion of previous operation.") return 1 if(default_deconstruction_screwdriver(user, I)) return @@ -162,20 +162,20 @@ if(istype(I,/obj/item/weapon/disk/limb)) var/obj/item/weapon/disk/limb/D = I if(!D.company || !(D.company in all_robolimbs)) - user << "This disk seems to be corrupted!" + to_chat(user, "This disk seems to be corrupted!") else - user << "Installing blueprint files for [D.company]..." + to_chat(user, "Installing blueprint files for [D.company]...") if(do_after(user,50,src)) var/datum/robolimb/R = all_robolimbs[D.company] R.unavailable_to_build = 0 - user << "Installed [D.company] blueprints!" + to_chat(user, "Installed [D.company] blueprints!") qdel(I) return if(istype(I,/obj/item/stack/material)) var/obj/item/stack/material/S = I if(!(S.material.name in materials)) - user << "The [src] doesn't accept [S.material]!" + to_chat(user, "The [src] doesn't accept [S.material]!") return var/sname = "[S.name]" @@ -190,10 +190,10 @@ materials[S.material.name] += amnt S.use(1) count++ - user << "You insert [count] [sname] into the fabricator." + to_chat(user, "You insert [count] [sname] into the fabricator.") update_busy() else - user << "The fabricator cannot hold more [sname]." + to_chat(user, "The fabricator cannot hold more [sname].") return diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 360c9e1bbf..f410dbb014 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -719,7 +719,7 @@ user << "Invalid ID: Access denied." else user << "Maintenance protocols disabled by operator." - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) if(state==1) state = 2 user << "You undo the securing bolts." @@ -727,7 +727,7 @@ state = 1 user << "You tighten the securing bolts." return - else if(istype(W, /obj/item/weapon/crowbar)) + else if(W.is_crowbar()) if(state==2) state = 3 user << "You open the hatch to the power unit" @@ -744,7 +744,7 @@ else user << "There's not enough wire to finish the task." return - else if(istype(W, /obj/item/weapon/screwdriver)) + else if(W.is_screwdriver()) if(hasInternalDamage(MECHA_INT_TEMP_CONTROL)) clearInternalDamage(MECHA_INT_TEMP_CONTROL) user << "You repair the damaged temperature controller." diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm index 98e81cb83f..ce5b751e55 100644 --- a/code/game/mecha/mecha_construction_paths.dm +++ b/code/game/mecha/mecha_construction_paths.dm @@ -2,71 +2,73 @@ ///// Construction datums ////// //////////////////////////////// -/datum/construction/mecha/custom_action(step, atom/used_atom, mob/user) - if(istype(used_atom, /obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/W = used_atom +/datum/construction/mecha/custom_action(step, obj/item/I, mob/user) + if(istype(I, /obj/item/weapon/weldingtool)) + 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(istype(used_atom, /obj/item/weapon/wrench)) + else if(I.is_wrench()) playsound(holder, 'sound/items/Ratchet.ogg', 50, 1) - else if(istype(used_atom, /obj/item/weapon/screwdriver)) + else if(I.is_screwdriver()) playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1) - else if(istype(used_atom, /obj/item/weapon/wirecutters)) + else if(I.is_wirecutter()) playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1) - else if(istype(used_atom, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/C = used_atom + else if(istype(I, /obj/item/stack/cable_coil)) + 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.") + to_chat(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.") + to_chat(user, "There's not enough material in this stack.") return 0 else S.use(5) return 1 -/datum/construction/reversible/mecha/custom_action(index as num, diff as num, atom/used_atom, mob/user as mob) - if(istype(used_atom, /obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/W = used_atom +/datum/construction/reversible/mecha/custom_action(index as num, diff as num, obj/item/I, mob/user as mob) + if(istype(I, /obj/item/weapon/weldingtool)) + 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(istype(used_atom, /obj/item/weapon/wrench)) + else if(I.is_wrench()) playsound(holder, 'sound/items/Ratchet.ogg', 50, 1) - else if(istype(used_atom, /obj/item/weapon/screwdriver)) + else if(I.is_screwdriver()) playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1) - else if(istype(used_atom, /obj/item/weapon/wirecutters)) + else if(I.is_wirecutter()) playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1) - else if(istype(used_atom, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/C = used_atom + else if(istype(I, /obj/item/stack/cable_coil)) + 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.") + to_chat(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.") + to_chat(user, "There's not enough material in this stack.") return 0 else S.use(5) return 1 - +////////////////////// +// Ripley +////////////////////// /datum/construction/mecha/ripley_chassis steps = list(list("key"=/obj/item/mecha_parts/part/ripley_torso),//1 list("key"=/obj/item/mecha_parts/part/ripley_left_arm),//2 @@ -75,25 +77,25 @@ list("key"=/obj/item/mecha_parts/part/ripley_right_leg)//5 ) - custom_action(step, atom/used_atom, mob/user) - user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]") - holder.overlays += used_atom.icon_state+"+o" - qdel(used_atom) - return 1 +/datum/construction/mecha/ripley_chassis/custom_action(step, obj/item/I, mob/user) + user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") + holder.overlays += I.icon_state+"+o" + qdel(I) + return 1 - action(atom/used_atom,mob/user as mob) - return check_all_steps(used_atom,user) +/datum/construction/mecha/ripley_chassis/action(obj/item/I,mob/user as mob) + return check_all_steps(I,user) - spawn_result() - var/obj/item/mecha_parts/chassis/const_holder = holder - const_holder.construct = new /datum/construction/reversible/mecha/ripley(const_holder) - const_holder.icon = 'icons/mecha/mech_construction.dmi' - const_holder.icon_state = "ripley0" - const_holder.density = 1 - const_holder.overlays.len = 0 - spawn() - qdel(src) - return +/datum/construction/mecha/ripley_chassis/spawn_result() + var/obj/item/mecha_parts/chassis/const_holder = holder + const_holder.construct = new /datum/construction/reversible/mecha/ripley(const_holder) + const_holder.icon = 'icons/mecha/mech_construction.dmi' + const_holder.icon_state = "ripley0" + const_holder.density = 1 + const_holder.overlays.len = 0 + spawn() + qdel(src) + return /datum/construction/reversible/mecha/ripley @@ -101,11 +103,11 @@ steps = list( //1 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/wrench, + "backkey"=IS_WRENCH, "desc"="External armor is wrenched."), //2 - list("key"=/obj/item/weapon/wrench, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="External armor is installed."), //3 list("key"=/obj/item/stack/material/plasteel, @@ -113,170 +115,171 @@ "desc"="Internal armor is welded."), //4 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/wrench, + "backkey"=IS_WRENCH, "desc"="Internal armor is wrenched"), //5 - list("key"=/obj/item/weapon/wrench, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="Internal armor is installed"), //6 list("key"=/obj/item/stack/material/steel, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Peripherals control module is secured"), //7 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Peripherals control module is installed"), //8 list("key"=/obj/item/weapon/circuitboard/mecha/ripley/peripherals, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Central control module is secured"), //9 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Central control module is installed"), //10 list("key"=/obj/item/weapon/circuitboard/mecha/ripley/main, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is adjusted"), //11 - list("key"=/obj/item/weapon/wirecutters, - "backkey"=/obj/item/weapon/screwdriver, + list("key"=IS_WIRECUTTER, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is added"), //12 list("key"=/obj/item/stack/cable_coil, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The hydraulic systems are active."), //13 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/wrench, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_WRENCH, "desc"="The hydraulic systems are connected."), //14 - list("key"=/obj/item/weapon/wrench, + list("key"=IS_WRENCH, "desc"="The hydraulic systems are disconnected.") ) - action(atom/used_atom,mob/user as mob) - return check_step(used_atom,user) +/datum/construction/reversible/mecha/ripley/action(obj/item/I,mob/user as mob) + return check_step(I,user) - custom_action(index, diff, atom/used_atom, mob/user) - if(!..()) - return 0 +/datum/construction/reversible/mecha/ripley/custom_action(index, diff, obj/item/I, mob/user) + if(!..()) + return 0 - //TODO: better messages. - switch(index) - if(14) - user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + //TODO: better messages. + switch(index) + if(14) + user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + holder.icon_state = "ripley1" + if(13) + if(diff==FORWARD) + user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") + holder.icon_state = "ripley2" + else + user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") + holder.icon_state = "ripley0" + if(12) + if(diff==FORWARD) + user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") + holder.icon_state = "ripley3" + else + user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") holder.icon_state = "ripley1" - if(13) - if(diff==FORWARD) - user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") - holder.icon_state = "ripley2" - else - user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") - holder.icon_state = "ripley0" - if(12) - if(diff==FORWARD) - user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") - holder.icon_state = "ripley3" - else - user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") - holder.icon_state = "ripley1" - if(11) - if(diff==FORWARD) - user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") - holder.icon_state = "ripley4" - else - user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") - var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) - coil.amount = 4 - holder.icon_state = "ripley2" - if(10) - if(diff==FORWARD) - user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") - qdel(used_atom) - holder.icon_state = "ripley5" - else - user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") - holder.icon_state = "ripley3" - if(9) - if(diff==FORWARD) - user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") - holder.icon_state = "ripley6" - else - user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") - new /obj/item/weapon/circuitboard/mecha/ripley/main(get_turf(holder)) - holder.icon_state = "ripley4" - if(8) - if(diff==FORWARD) - user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") - qdel(used_atom) - holder.icon_state = "ripley7" - else - user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") - holder.icon_state = "ripley5" - if(7) - if(diff==FORWARD) - user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") - holder.icon_state = "ripley8" - else - user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") - new /obj/item/weapon/circuitboard/mecha/ripley/peripherals(get_turf(holder)) - holder.icon_state = "ripley6" - if(6) - if(diff==FORWARD) - user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") - holder.icon_state = "ripley9" - else - user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") - holder.icon_state = "ripley7" - if(5) - if(diff==FORWARD) - user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") - holder.icon_state = "ripley10" - else - user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") - var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "ripley8" - if(4) - if(diff==FORWARD) - user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") - holder.icon_state = "ripley11" - else - user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") - holder.icon_state = "ripley9" - if(3) - if(diff==FORWARD) - user.visible_message("[user] installs external reinforced armor layer to [holder].", "You install external reinforced armor layer to [holder].") - holder.icon_state = "ripley12" - else - user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") - holder.icon_state = "ripley10" - if(2) - if(diff==FORWARD) - user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.") - holder.icon_state = "ripley13" - else - user.visible_message("[user] pries external armor layer from [holder].", "You prie external armor layer from [holder].") - var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "ripley11" - if(1) - if(diff==FORWARD) - user.visible_message("[user] welds external armor layer to [holder].", "You weld external armor layer to [holder].") - else - user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") - holder.icon_state = "ripley12" - return 1 - - spawn_result() - ..() - feedback_inc("mecha_ripley_created",1) - return - + if(11) + if(diff==FORWARD) + user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") + holder.icon_state = "ripley4" + else + user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") + var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) + coil.amount = 4 + holder.icon_state = "ripley2" + if(10) + if(diff==FORWARD) + user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") + qdel(I) + holder.icon_state = "ripley5" + else + user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") + holder.icon_state = "ripley3" + if(9) + if(diff==FORWARD) + user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") + holder.icon_state = "ripley6" + else + user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") + new /obj/item/weapon/circuitboard/mecha/ripley/main(get_turf(holder)) + holder.icon_state = "ripley4" + if(8) + if(diff==FORWARD) + user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") + qdel(I) + holder.icon_state = "ripley7" + else + user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") + holder.icon_state = "ripley5" + if(7) + if(diff==FORWARD) + user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") + holder.icon_state = "ripley8" + else + user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") + new /obj/item/weapon/circuitboard/mecha/ripley/peripherals(get_turf(holder)) + holder.icon_state = "ripley6" + if(6) + if(diff==FORWARD) + user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") + holder.icon_state = "ripley9" + else + user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") + holder.icon_state = "ripley7" + if(5) + if(diff==FORWARD) + user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") + holder.icon_state = "ripley10" + else + user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") + var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "ripley8" + if(4) + if(diff==FORWARD) + user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") + holder.icon_state = "ripley11" + else + user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") + holder.icon_state = "ripley9" + if(3) + if(diff==FORWARD) + user.visible_message("[user] installs external reinforced armor layer to [holder].", "You install external reinforced armor layer to [holder].") + holder.icon_state = "ripley12" + else + user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") + holder.icon_state = "ripley10" + if(2) + if(diff==FORWARD) + user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.") + holder.icon_state = "ripley13" + else + user.visible_message("[user] pries external armor layer from [holder].", "You prie external armor layer from [holder].") + var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "ripley11" + if(1) + if(diff==FORWARD) + user.visible_message("[user] welds external armor layer to [holder].", "You weld external armor layer to [holder].") + else + user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") + holder.icon_state = "ripley12" + return 1 +/datum/construction/reversible/mecha/ripley/spawn_result() + ..() + feedback_inc("mecha_ripley_created",1) + return +////////////////////// +// Gygax +////////////////////// /datum/construction/mecha/gygax_chassis steps = list(list("key"=/obj/item/mecha_parts/part/gygax_torso),//1 list("key"=/obj/item/mecha_parts/part/gygax_left_arm),//2 @@ -286,24 +289,24 @@ list("key"=/obj/item/mecha_parts/part/gygax_head) ) - custom_action(step, atom/used_atom, mob/user) - user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]") - holder.overlays += used_atom.icon_state+"+o" - qdel(used_atom) - return 1 +/datum/construction/mecha/gygax_chassis/custom_action(step, obj/item/I, mob/user) + user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") + holder.overlays += I.icon_state+"+o" + qdel(I) + return 1 - action(atom/used_atom,mob/user as mob) - return check_all_steps(used_atom,user) +/datum/construction/mecha/gygax_chassis/action(obj/item/I,mob/user as mob) + return check_all_steps(I,user) - spawn_result() - var/obj/item/mecha_parts/chassis/const_holder = holder - const_holder.construct = new /datum/construction/reversible/mecha/gygax(const_holder) - const_holder.icon = 'icons/mecha/mech_construction.dmi' - const_holder.icon_state = "gygax0" - const_holder.density = 1 - spawn() - qdel(src) - return +/datum/construction/mecha/gygax_chassis/spawn_result() + var/obj/item/mecha_parts/chassis/const_holder = holder + const_holder.construct = new /datum/construction/reversible/mecha/gygax(const_holder) + const_holder.icon = 'icons/mecha/mech_construction.dmi' + const_holder.icon_state = "gygax0" + const_holder.density = 1 + spawn() + qdel(src) + return /datum/construction/reversible/mecha/gygax @@ -311,11 +314,11 @@ steps = list( //1 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/wrench, + "backkey"=IS_WRENCH, "desc"="External armor is wrenched."), //2 - list("key"=/obj/item/weapon/wrench, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="External armor is installed."), //3 list("key"=/obj/item/mecha_parts/part/gygax_armour, @@ -323,240 +326,243 @@ "desc"="Internal armor is welded."), //4 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/wrench, + "backkey"=IS_WRENCH, "desc"="Internal armor is wrenched"), //5 - list("key"=/obj/item/weapon/wrench, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="Internal armor is installed"), //6 list("key"=/obj/item/stack/material/steel, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Advanced capacitor is secured"), //7 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Advanced capacitor is installed"), //8 list("key"=/obj/item/weapon/stock_parts/capacitor/adv, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Advanced scanner module is secured"), //9 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Advanced scanner module is installed"), //10 list("key"=/obj/item/weapon/stock_parts/scanning_module/adv, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Targeting module is secured"), //11 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Targeting module is installed"), //12 list("key"=/obj/item/weapon/circuitboard/mecha/gygax/targeting, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Peripherals control module is secured"), //13 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Peripherals control module is installed"), //14 list("key"=/obj/item/weapon/circuitboard/mecha/gygax/peripherals, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Central control module is secured"), //15 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Central control module is installed"), //16 list("key"=/obj/item/weapon/circuitboard/mecha/gygax/main, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is adjusted"), //17 - list("key"=/obj/item/weapon/wirecutters, - "backkey"=/obj/item/weapon/screwdriver, + list("key"=/obj/item/weapon/tool/wirecutters, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is added"), //18 list("key"=/obj/item/stack/cable_coil, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The hydraulic systems are active."), //19 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/wrench, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_WRENCH, "desc"="The hydraulic systems are connected."), //20 - list("key"=/obj/item/weapon/wrench, + list("key"=IS_WRENCH, "desc"="The hydraulic systems are disconnected.") ) - action(atom/used_atom,mob/user as mob) - return check_step(used_atom,user) +/datum/construction/reversible/mecha/gygax/action(obj/item/I,mob/user as mob) + return check_step(I,user) - custom_action(index, diff, atom/used_atom, mob/user) - if(!..()) - return 0 +/datum/construction/reversible/mecha/gygax/custom_action(index, diff, obj/item/I, mob/user) + if(!..()) + return 0 - //TODO: better messages. - switch(index) - if(20) - user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + //TODO: better messages. + switch(index) + if(20) + user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + holder.icon_state = "gygax1" + if(19) + if(diff==FORWARD) + user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") + holder.icon_state = "gygax2" + else + user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") + holder.icon_state = "gygax0" + if(18) + if(diff==FORWARD) + user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") + holder.icon_state = "gygax3" + else + user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") holder.icon_state = "gygax1" - if(19) - if(diff==FORWARD) - user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") - holder.icon_state = "gygax2" - else - user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") - holder.icon_state = "gygax0" - if(18) - if(diff==FORWARD) - user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") - holder.icon_state = "gygax3" - else - user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") - holder.icon_state = "gygax1" - if(17) - if(diff==FORWARD) - user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") - holder.icon_state = "gygax4" - else - user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") - var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) - coil.amount = 4 - holder.icon_state = "gygax2" - if(16) - if(diff==FORWARD) - user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") - qdel(used_atom) - holder.icon_state = "gygax5" - else - user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") - holder.icon_state = "gygax3" - if(15) - if(diff==FORWARD) - user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") - holder.icon_state = "gygax6" - else - user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") - new /obj/item/weapon/circuitboard/mecha/gygax/main(get_turf(holder)) - holder.icon_state = "gygax4" - if(14) - if(diff==FORWARD) - user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") - qdel(used_atom) - holder.icon_state = "gygax7" - else - user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") - holder.icon_state = "gygax5" - if(13) - if(diff==FORWARD) - user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") - holder.icon_state = "gygax8" - else - user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") - new /obj/item/weapon/circuitboard/mecha/gygax/peripherals(get_turf(holder)) - holder.icon_state = "gygax6" - if(12) - if(diff==FORWARD) - user.visible_message("[user] installs the weapon control module into [holder].", "You install the weapon control module into [holder].") - qdel(used_atom) - holder.icon_state = "gygax9" - else - user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") - holder.icon_state = "gygax7" - if(11) - if(diff==FORWARD) - user.visible_message("[user] secures the weapon control module.", "You secure the weapon control module.") - holder.icon_state = "gygax10" - else - user.visible_message("[user] removes the weapon control module from [holder].", "You remove the weapon control module from [holder].") - new /obj/item/weapon/circuitboard/mecha/gygax/targeting(get_turf(holder)) - holder.icon_state = "gygax8" - if(10) - if(diff==FORWARD) - user.visible_message("[user] installs advanced scanner module to [holder].", "You install advanced scanner module to [holder].") - qdel(used_atom) - holder.icon_state = "gygax11" - else - user.visible_message("[user] unfastens the weapon control module.", "You unfasten the weapon control module.") - holder.icon_state = "gygax9" - if(9) - if(diff==FORWARD) - user.visible_message("[user] secures the advanced scanner module.", "You secure the advanced scanner module.") - holder.icon_state = "gygax12" - else - user.visible_message("[user] removes the advanced scanner module from [holder].", "You remove the advanced scanner module from [holder].") - new /obj/item/weapon/stock_parts/scanning_module/adv(get_turf(holder)) - holder.icon_state = "gygax10" - if(8) - if(diff==FORWARD) - user.visible_message("[user] installs advanced capacitor to [holder].", "You install advanced capacitor to [holder].") - qdel(used_atom) - holder.icon_state = "gygax13" - else - user.visible_message("[user] unfastens the advanced scanner module.", "You unfasten the advanced scanner module.") - holder.icon_state = "gygax11" - if(7) - if(diff==FORWARD) - user.visible_message("[user] secures the advanced capacitor.", "You secure the advanced capacitor.") - holder.icon_state = "gygax14" - else - user.visible_message("[user] removes the advanced capacitor from [holder].", "You remove the advanced capacitor from [holder].") - new /obj/item/weapon/stock_parts/capacitor/adv(get_turf(holder)) - holder.icon_state = "gygax12" - if(6) - if(diff==FORWARD) - user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") - holder.icon_state = "gygax15" - else - user.visible_message("[user] unfastens the advanced capacitor.", "You unfasten the advanced capacitor.") - holder.icon_state = "gygax13" - if(5) - if(diff==FORWARD) - user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") - holder.icon_state = "gygax16" - else - user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") - var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "gygax14" - if(4) - if(diff==FORWARD) - user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") - holder.icon_state = "gygax17" - else - user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") - holder.icon_state = "gygax15" - if(3) - if(diff==FORWARD) - user.visible_message("[user] installs Gygax Armour Plates to [holder].", "You install Gygax Armour Plates to [holder].") - qdel(used_atom) - holder.icon_state = "gygax18" - else - user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") - holder.icon_state = "gygax16" - if(2) - if(diff==FORWARD) - user.visible_message("[user] secures Gygax Armour Plates.", "You secure Gygax Armour Plates.") - holder.icon_state = "gygax19" - else - user.visible_message("[user] pries Gygax Armour Plates from [holder].", "You prie Gygax Armour Plates from [holder].") - new /obj/item/mecha_parts/part/gygax_armour(get_turf(holder)) - holder.icon_state = "gygax17" - if(1) - if(diff==FORWARD) - user.visible_message("[user] welds Gygax Armour Plates to [holder].", "You weld Gygax Armour Plates to [holder].") - else - user.visible_message("[user] unfastens Gygax Armour Plates.", "You unfasten Gygax Armour Plates.") - holder.icon_state = "gygax18" - return 1 + if(17) + if(diff==FORWARD) + user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") + holder.icon_state = "gygax4" + else + user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") + var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) + coil.amount = 4 + holder.icon_state = "gygax2" + if(16) + if(diff==FORWARD) + user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") + qdel(I) + holder.icon_state = "gygax5" + else + user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") + holder.icon_state = "gygax3" + if(15) + if(diff==FORWARD) + user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") + holder.icon_state = "gygax6" + else + user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") + new /obj/item/weapon/circuitboard/mecha/gygax/main(get_turf(holder)) + holder.icon_state = "gygax4" + if(14) + if(diff==FORWARD) + user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") + qdel(I) + holder.icon_state = "gygax7" + else + user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") + holder.icon_state = "gygax5" + if(13) + if(diff==FORWARD) + user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") + holder.icon_state = "gygax8" + else + user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") + new /obj/item/weapon/circuitboard/mecha/gygax/peripherals(get_turf(holder)) + holder.icon_state = "gygax6" + if(12) + if(diff==FORWARD) + user.visible_message("[user] installs the weapon control module into [holder].", "You install the weapon control module into [holder].") + qdel(I) + holder.icon_state = "gygax9" + else + user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") + holder.icon_state = "gygax7" + if(11) + if(diff==FORWARD) + user.visible_message("[user] secures the weapon control module.", "You secure the weapon control module.") + holder.icon_state = "gygax10" + else + user.visible_message("[user] removes the weapon control module from [holder].", "You remove the weapon control module from [holder].") + new /obj/item/weapon/circuitboard/mecha/gygax/targeting(get_turf(holder)) + holder.icon_state = "gygax8" + if(10) + if(diff==FORWARD) + user.visible_message("[user] installs advanced scanner module to [holder].", "You install advanced scanner module to [holder].") + qdel(I) + holder.icon_state = "gygax11" + else + user.visible_message("[user] unfastens the weapon control module.", "You unfasten the weapon control module.") + holder.icon_state = "gygax9" + if(9) + if(diff==FORWARD) + user.visible_message("[user] secures the advanced scanner module.", "You secure the advanced scanner module.") + holder.icon_state = "gygax12" + else + user.visible_message("[user] removes the advanced scanner module from [holder].", "You remove the advanced scanner module from [holder].") + new /obj/item/weapon/stock_parts/scanning_module/adv(get_turf(holder)) + holder.icon_state = "gygax10" + if(8) + if(diff==FORWARD) + user.visible_message("[user] installs advanced capacitor to [holder].", "You install advanced capacitor to [holder].") + qdel(I) + holder.icon_state = "gygax13" + else + user.visible_message("[user] unfastens the advanced scanner module.", "You unfasten the advanced scanner module.") + holder.icon_state = "gygax11" + if(7) + if(diff==FORWARD) + user.visible_message("[user] secures the advanced capacitor.", "You secure the advanced capacitor.") + holder.icon_state = "gygax14" + else + user.visible_message("[user] removes the advanced capacitor from [holder].", "You remove the advanced capacitor from [holder].") + new /obj/item/weapon/stock_parts/capacitor/adv(get_turf(holder)) + holder.icon_state = "gygax12" + if(6) + if(diff==FORWARD) + user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") + holder.icon_state = "gygax15" + else + user.visible_message("[user] unfastens the advanced capacitor.", "You unfasten the advanced capacitor.") + holder.icon_state = "gygax13" + if(5) + if(diff==FORWARD) + user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") + holder.icon_state = "gygax16" + else + user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") + var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "gygax14" + if(4) + if(diff==FORWARD) + user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") + holder.icon_state = "gygax17" + else + user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") + holder.icon_state = "gygax15" + if(3) + if(diff==FORWARD) + user.visible_message("[user] installs Gygax Armour Plates to [holder].", "You install Gygax Armour Plates to [holder].") + qdel(I) + holder.icon_state = "gygax18" + else + user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") + holder.icon_state = "gygax16" + if(2) + if(diff==FORWARD) + user.visible_message("[user] secures Gygax Armour Plates.", "You secure Gygax Armour Plates.") + holder.icon_state = "gygax19" + else + user.visible_message("[user] pries Gygax Armour Plates from [holder].", "You prie Gygax Armour Plates from [holder].") + new /obj/item/mecha_parts/part/gygax_armour(get_turf(holder)) + holder.icon_state = "gygax17" + if(1) + if(diff==FORWARD) + user.visible_message("[user] welds Gygax Armour Plates to [holder].", "You weld Gygax Armour Plates to [holder].") + else + user.visible_message("[user] unfastens Gygax Armour Plates.", "You unfasten Gygax Armour Plates.") + holder.icon_state = "gygax18" + return 1 - spawn_result() - ..() - feedback_inc("mecha_gygax_created",1) - return +/datum/construction/reversible/mecha/gygax/spawn_result() + ..() + feedback_inc("mecha_gygax_created",1) + return +//////////////////////// +// Firfighter +//////////////////////// /datum/construction/mecha/firefighter_chassis steps = list(list("key"=/obj/item/mecha_parts/part/ripley_torso),//1 list("key"=/obj/item/mecha_parts/part/ripley_left_arm),//2 @@ -566,25 +572,25 @@ list("key"=/obj/item/clothing/suit/fire)//6 ) - custom_action(step, atom/used_atom, mob/user) - user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]") - holder.overlays += used_atom.icon_state+"+o" - user.drop_item() - qdel(used_atom) - return 1 +/datum/construction/mecha/firefighter_chassis/custom_action(step, obj/item/I, mob/user) + user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") + holder.overlays += I.icon_state+"+o" + user.drop_item() + qdel(I) + return 1 - action(atom/used_atom,mob/user as mob) - return check_all_steps(used_atom,user) +/datum/construction/mecha/firefighter_chassis/action(obj/item/I,mob/user as mob) + return check_all_steps(I,user) - spawn_result() - var/obj/item/mecha_parts/chassis/const_holder = holder - const_holder.construct = new /datum/construction/reversible/mecha/firefighter(const_holder) - const_holder.icon = 'icons/mecha/mech_construction.dmi' - const_holder.icon_state = "fireripley0" - const_holder.density = 1 - spawn() - qdel(src) - return +/datum/construction/mecha/firefighter_chassis/spawn_result() + var/obj/item/mecha_parts/chassis/const_holder = holder + const_holder.construct = new /datum/construction/reversible/mecha/firefighter(const_holder) + const_holder.icon = 'icons/mecha/mech_construction.dmi' + const_holder.icon_state = "fireripley0" + const_holder.density = 1 + spawn() + qdel(src) + return /datum/construction/reversible/mecha/firefighter @@ -592,15 +598,15 @@ steps = list( //1 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/wrench, + "backkey"=IS_WRENCH, "desc"="External armor is wrenched."), //2 - list("key"=/obj/item/weapon/wrench, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="External armor is installed."), //3 list("key"=/obj/item/stack/material/plasteel, - "backkey"=/obj/item/weapon/crowbar, + "backkey"=IS_CROWBAR, "desc"="External armor is being installed."), //4 list("key"=/obj/item/stack/material/plasteel, @@ -608,179 +614,180 @@ "desc"="Internal armor is welded."), //5 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/wrench, + "backkey"=IS_WRENCH, "desc"="Internal armor is wrenched"), //6 - list("key"=/obj/item/weapon/wrench, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="Internal armor is installed"), - //7 list("key"=/obj/item/stack/material/plasteel, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Peripherals control module is secured"), //8 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Peripherals control module is installed"), //9 list("key"=/obj/item/weapon/circuitboard/mecha/ripley/peripherals, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Central control module is secured"), //10 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Central control module is installed"), //11 list("key"=/obj/item/weapon/circuitboard/mecha/ripley/main, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is adjusted"), //12 - list("key"=/obj/item/weapon/wirecutters, - "backkey"=/obj/item/weapon/screwdriver, + list("key"=/obj/item/weapon/tool/wirecutters, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is added"), //13 list("key"=/obj/item/stack/cable_coil, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The hydraulic systems are active."), //14 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/wrench, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_WRENCH, "desc"="The hydraulic systems are connected."), //15 - list("key"=/obj/item/weapon/wrench, + list("key"=IS_WRENCH, "desc"="The hydraulic systems are disconnected.") ) - action(atom/used_atom,mob/user as mob) - return check_step(used_atom,user) +/datum/construction/reversible/mecha/firefighter/action(obj/item/I,mob/user as mob) + return check_step(I,user) - custom_action(index, diff, atom/used_atom, mob/user) - if(!..()) - return 0 +/datum/construction/reversible/mecha/firefighter/custom_action(index, diff, obj/item/I, mob/user) + if(!..()) + return 0 - //TODO: better messages. - switch(index) - if(15) - user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + //TODO: better messages. + switch(index) + if(15) + user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + holder.icon_state = "fireripley1" + if(14) + if(diff==FORWARD) + user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") + holder.icon_state = "fireripley2" + else + user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") + holder.icon_state = "fireripley0" + if(13) + if(diff==FORWARD) + user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") + holder.icon_state = "fireripley3" + else + user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") holder.icon_state = "fireripley1" - if(14) - if(diff==FORWARD) - user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") - holder.icon_state = "fireripley2" - else - user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") - holder.icon_state = "fireripley0" - if(13) - if(diff==FORWARD) - user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") - holder.icon_state = "fireripley3" - else - user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") - holder.icon_state = "fireripley1" - if(12) - if(diff==FORWARD) - user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") - holder.icon_state = "fireripley4" - else - user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") - var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) - coil.amount = 4 - holder.icon_state = "fireripley2" - if(11) - if(diff==FORWARD) - user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") - qdel(used_atom) - holder.icon_state = "fireripley5" - else - user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") - holder.icon_state = "fireripley3" - if(10) - if(diff==FORWARD) - user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") - holder.icon_state = "fireripley6" - else - user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") - new /obj/item/weapon/circuitboard/mecha/ripley/main(get_turf(holder)) - holder.icon_state = "fireripley4" - if(9) - if(diff==FORWARD) - user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") - qdel(used_atom) - holder.icon_state = "fireripley7" - else - user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") - holder.icon_state = "fireripley5" - if(8) - if(diff==FORWARD) - user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") - holder.icon_state = "fireripley8" - else - user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") - new /obj/item/weapon/circuitboard/mecha/ripley/peripherals(get_turf(holder)) - holder.icon_state = "fireripley6" - if(7) - if(diff==FORWARD) - user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") - holder.icon_state = "fireripley9" - else - user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") - holder.icon_state = "fireripley7" + if(12) + if(diff==FORWARD) + user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") + holder.icon_state = "fireripley4" + else + user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") + var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) + coil.amount = 4 + holder.icon_state = "fireripley2" + if(11) + if(diff==FORWARD) + user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") + qdel(I) + holder.icon_state = "fireripley5" + else + user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") + holder.icon_state = "fireripley3" + if(10) + if(diff==FORWARD) + user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") + holder.icon_state = "fireripley6" + else + user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") + new /obj/item/weapon/circuitboard/mecha/ripley/main(get_turf(holder)) + holder.icon_state = "fireripley4" + if(9) + if(diff==FORWARD) + user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") + qdel(I) + holder.icon_state = "fireripley7" + else + user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") + holder.icon_state = "fireripley5" + if(8) + if(diff==FORWARD) + user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") + holder.icon_state = "fireripley8" + else + user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") + new /obj/item/weapon/circuitboard/mecha/ripley/peripherals(get_turf(holder)) + holder.icon_state = "fireripley6" + if(7) + if(diff==FORWARD) + user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") + holder.icon_state = "fireripley9" + else + user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") + holder.icon_state = "fireripley7" + if(6) + if(diff==FORWARD) + user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") + holder.icon_state = "fireripley10" + else + user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") + var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "fireripley8" + if(5) + if(diff==FORWARD) + user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") + holder.icon_state = "fireripley11" + else + user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") + holder.icon_state = "fireripley9" + if(4) + if(diff==FORWARD) + user.visible_message("[user] starts to install the external armor layer to [holder].", "You start to install the external armor layer to [holder].") + holder.icon_state = "fireripley12" + else + user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") + holder.icon_state = "fireripley10" + if(3) + if(diff==FORWARD) + user.visible_message("[user] installs external reinforced armor layer to [holder].", "You install external reinforced armor layer to [holder].") + holder.icon_state = "fireripley13" + else + user.visible_message("[user] removes the external armor from [holder].", "You remove the external armor from [holder].") + var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "fireripley11" + if(2) + if(diff==FORWARD) + user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.") + holder.icon_state = "fireripley14" + else + user.visible_message("[user] pries external armor layer from [holder].", "You prie external armor layer from [holder].") + var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "fireripley12" + if(1) + if(diff==FORWARD) + user.visible_message("[user] welds external armor layer to [holder].", "You weld external armor layer to [holder].") + else + user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") + holder.icon_state = "fireripley13" + return 1 - if(6) - if(diff==FORWARD) - user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") - holder.icon_state = "fireripley10" - else - user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") - var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "fireripley8" - if(5) - if(diff==FORWARD) - user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") - holder.icon_state = "fireripley11" - else - user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") - holder.icon_state = "fireripley9" - if(4) - if(diff==FORWARD) - user.visible_message("[user] starts to install the external armor layer to [holder].", "You start to install the external armor layer to [holder].") - holder.icon_state = "fireripley12" - else - user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") - holder.icon_state = "fireripley10" - if(3) - if(diff==FORWARD) - user.visible_message("[user] installs external reinforced armor layer to [holder].", "You install external reinforced armor layer to [holder].") - holder.icon_state = "fireripley13" - else - user.visible_message("[user] removes the external armor from [holder].", "You remove the external armor from [holder].") - var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "fireripley11" - if(2) - if(diff==FORWARD) - user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.") - holder.icon_state = "fireripley14" - else - user.visible_message("[user] pries external armor layer from [holder].", "You prie external armor layer from [holder].") - var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "fireripley12" - if(1) - if(diff==FORWARD) - user.visible_message("[user] welds external armor layer to [holder].", "You weld external armor layer to [holder].") - else - user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") - holder.icon_state = "fireripley13" - return 1 - - spawn_result() - ..() - feedback_inc("mecha_firefighter_created",1) - return +/datum/construction/reversible/mecha/firefighter/spawn_result() + ..() + feedback_inc("mecha_firefighter_created",1) + return +////////////////////// +// Durand +////////////////////// /datum/construction/mecha/durand_chassis steps = list(list("key"=/obj/item/mecha_parts/part/durand_torso),//1 list("key"=/obj/item/mecha_parts/part/durand_left_arm),//2 @@ -790,35 +797,36 @@ list("key"=/obj/item/mecha_parts/part/durand_head) ) - custom_action(step, atom/used_atom, mob/user) - user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]") - holder.overlays += used_atom.icon_state+"+o" - qdel(used_atom) - return 1 +/datum/construction/mecha/durand_chassis/custom_action(step, obj/item/I, mob/user) + user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") + holder.overlays += I.icon_state+"+o" + qdel(I) + return 1 - action(atom/used_atom,mob/user as mob) - return check_all_steps(used_atom,user) +/datum/construction/mecha/durand_chassis/action(obj/item/I,mob/user as mob) + return check_all_steps(I,user) + +/datum/construction/mecha/durand_chassis/spawn_result() + var/obj/item/mecha_parts/chassis/const_holder = holder + const_holder.construct = new /datum/construction/reversible/mecha/durand(const_holder) + const_holder.icon = 'icons/mecha/mech_construction.dmi' + const_holder.icon_state = "durand0" + const_holder.density = 1 + spawn() + qdel(src) + return - spawn_result() - var/obj/item/mecha_parts/chassis/const_holder = holder - const_holder.construct = new /datum/construction/reversible/mecha/durand(const_holder) - const_holder.icon = 'icons/mecha/mech_construction.dmi' - const_holder.icon_state = "durand0" - const_holder.density = 1 - spawn() - qdel(src) - return /datum/construction/reversible/mecha/durand result = "/obj/mecha/combat/durand" steps = list( //1 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/wrench, + "backkey"=IS_WRENCH, "desc"="External armor is wrenched."), //2 - list("key"=/obj/item/weapon/wrench, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="External armor is installed."), //3 list("key"=/obj/item/mecha_parts/part/durand_armour, @@ -826,242 +834,456 @@ "desc"="Internal armor is welded."), //4 list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/wrench, + "backkey"=IS_WRENCH, "desc"="Internal armor is wrenched"), //5 - list("key"=/obj/item/weapon/wrench, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, "desc"="Internal armor is installed"), //6 list("key"=/obj/item/stack/material/steel, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Advanced capacitor is secured"), //7 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Advanced capacitor is installed"), //8 list("key"=/obj/item/weapon/stock_parts/capacitor/adv, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Advanced scanner module is secured"), //9 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Advanced scanner module is installed"), //10 list("key"=/obj/item/weapon/stock_parts/scanning_module/adv, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Targeting module is secured"), //11 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Targeting module is installed"), //12 list("key"=/obj/item/weapon/circuitboard/mecha/durand/targeting, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Peripherals control module is secured"), //13 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Peripherals control module is installed"), //14 list("key"=/obj/item/weapon/circuitboard/mecha/durand/peripherals, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="Central control module is secured"), //15 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, "desc"="Central control module is installed"), //16 list("key"=/obj/item/weapon/circuitboard/mecha/durand/main, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is adjusted"), //17 - list("key"=/obj/item/weapon/wirecutters, - "backkey"=/obj/item/weapon/screwdriver, + list("key"=/obj/item/weapon/tool/wirecutters, + "backkey"=IS_SCREWDRIVER, "desc"="The wiring is added"), //18 list("key"=/obj/item/stack/cable_coil, - "backkey"=/obj/item/weapon/screwdriver, + "backkey"=IS_SCREWDRIVER, "desc"="The hydraulic systems are active."), //19 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/wrench, + list("key"=IS_SCREWDRIVER, + "backkey"=IS_WRENCH, "desc"="The hydraulic systems are connected."), //20 - list("key"=/obj/item/weapon/wrench, + list("key"=IS_WRENCH, "desc"="The hydraulic systems are disconnected.") ) - action(atom/used_atom,mob/user as mob) - return check_step(used_atom,user) +/datum/construction/reversible/mecha/durand/action(obj/item/I,mob/user as mob) + return check_step(I,user) - custom_action(index, diff, atom/used_atom, mob/user) - if(!..()) - return 0 +/datum/construction/reversible/mecha/durand/custom_action(index, diff, obj/item/I, mob/user) + if(!..()) + return 0 - //TODO: better messages. - switch(index) - if(20) - user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + //TODO: better messages. + switch(index) + if(20) + user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + holder.icon_state = "durand1" + if(19) + if(diff==FORWARD) + user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") + holder.icon_state = "durand2" + else + user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") + holder.icon_state = "durand0" + if(18) + if(diff==FORWARD) + user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") + holder.icon_state = "durand3" + else + user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") holder.icon_state = "durand1" - if(19) - if(diff==FORWARD) - user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") - holder.icon_state = "durand2" - else - user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") - holder.icon_state = "durand0" - if(18) - if(diff==FORWARD) - user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") - holder.icon_state = "durand3" - else - user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") - holder.icon_state = "durand1" - if(17) - if(diff==FORWARD) - user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") - holder.icon_state = "durand4" - else - user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") - var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) - coil.amount = 4 - holder.icon_state = "durand2" - if(16) - if(diff==FORWARD) - user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") - qdel(used_atom) - holder.icon_state = "durand5" - else - user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") - holder.icon_state = "durand3" - if(15) - if(diff==FORWARD) - user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") - holder.icon_state = "durand6" - else - user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") - new /obj/item/weapon/circuitboard/mecha/durand/main(get_turf(holder)) - holder.icon_state = "durand4" - if(14) - if(diff==FORWARD) - user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") - qdel(used_atom) - holder.icon_state = "durand7" - else - user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") - holder.icon_state = "durand5" - if(13) - if(diff==FORWARD) - user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") - holder.icon_state = "durand8" - else - user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") - new /obj/item/weapon/circuitboard/mecha/durand/peripherals(get_turf(holder)) - holder.icon_state = "durand6" - if(12) - if(diff==FORWARD) - user.visible_message("[user] installs the weapon control module into [holder].", "You install the weapon control module into [holder].") - qdel(used_atom) - holder.icon_state = "durand9" - else - user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") - holder.icon_state = "durand7" - if(11) - if(diff==FORWARD) - user.visible_message("[user] secures the weapon control module.", "You secure the weapon control module.") - holder.icon_state = "durand10" - else - user.visible_message("[user] removes the weapon control module from [holder].", "You remove the weapon control module from [holder].") - new /obj/item/weapon/circuitboard/mecha/durand/targeting(get_turf(holder)) - holder.icon_state = "durand8" - if(10) - if(diff==FORWARD) - user.visible_message("[user] installs advanced scanner module to [holder].", "You install advanced scanner module to [holder].") - qdel(used_atom) - holder.icon_state = "durand11" - else - user.visible_message("[user] unfastens the weapon control module.", "You unfasten the weapon control module.") - holder.icon_state = "durand9" - if(9) - if(diff==FORWARD) - user.visible_message("[user] secures the advanced scanner module.", "You secure the advanced scanner module.") - holder.icon_state = "durand12" - else - user.visible_message("[user] removes the advanced scanner module from [holder].", "You remove the advanced scanner module from [holder].") - new /obj/item/weapon/stock_parts/scanning_module/adv(get_turf(holder)) - holder.icon_state = "durand10" - if(8) - if(diff==FORWARD) - user.visible_message("[user] installs advanced capacitor to [holder].", "You install advanced capacitor to [holder].") - qdel(used_atom) - holder.icon_state = "durand13" - else - user.visible_message("[user] unfastens the advanced scanner module.", "You unfasten the advanced scanner module.") - holder.icon_state = "durand11" - if(7) - if(diff==FORWARD) - user.visible_message("[user] secures the advanced capacitor.", "You secure the advanced capacitor.") - holder.icon_state = "durand14" - else - user.visible_message("[user] removes the advanced capacitor from [holder].", "You remove the advanced capacitor from [holder].") - new /obj/item/weapon/stock_parts/capacitor/adv(get_turf(holder)) - holder.icon_state = "durand12" - if(6) - if(diff==FORWARD) - user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") - holder.icon_state = "durand15" - else - user.visible_message("[user] unfastens the advanced capacitor.", "You unfasten the advanced capacitor.") - holder.icon_state = "durand13" - if(5) - if(diff==FORWARD) - user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") - holder.icon_state = "durand16" - else - user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") - var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "durand14" - if(4) - if(diff==FORWARD) - user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") - holder.icon_state = "durand17" - else - user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") - holder.icon_state = "durand15" - if(3) - if(diff==FORWARD) - user.visible_message("[user] installs Durand Armour Plates to [holder].", "You install Durand Armour Plates to [holder].") - qdel(used_atom) - holder.icon_state = "durand18" - else - user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") - holder.icon_state = "durand16" - if(2) - if(diff==FORWARD) - user.visible_message("[user] secures Durand Armour Plates.", "You secure Durand Armour Plates.") - holder.icon_state = "durand19" - else - user.visible_message("[user] pries Durand Armour Plates from [holder].", "You prie Durand Armour Plates from [holder].") - new /obj/item/mecha_parts/part/durand_armour(get_turf(holder)) - holder.icon_state = "durand17" - if(1) - if(diff==FORWARD) - user.visible_message("[user] welds Durand Armour Plates to [holder].", "You weld Durand Armour Plates to [holder].") - else - user.visible_message("[user] unfastens Durand Armour Plates.", "You unfasten Durand Armour Plates.") - holder.icon_state = "durand18" - return 1 + if(17) + if(diff==FORWARD) + user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") + holder.icon_state = "durand4" + else + user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") + var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) + coil.amount = 4 + holder.icon_state = "durand2" + if(16) + if(diff==FORWARD) + user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") + qdel(I) + holder.icon_state = "durand5" + else + user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") + holder.icon_state = "durand3" + if(15) + if(diff==FORWARD) + user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") + holder.icon_state = "durand6" + else + user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") + new /obj/item/weapon/circuitboard/mecha/durand/main(get_turf(holder)) + holder.icon_state = "durand4" + if(14) + if(diff==FORWARD) + user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") + qdel(I) + holder.icon_state = "durand7" + else + user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") + holder.icon_state = "durand5" + if(13) + if(diff==FORWARD) + user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") + holder.icon_state = "durand8" + else + user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") + new /obj/item/weapon/circuitboard/mecha/durand/peripherals(get_turf(holder)) + holder.icon_state = "durand6" + if(12) + if(diff==FORWARD) + user.visible_message("[user] installs the weapon control module into [holder].", "You install the weapon control module into [holder].") + qdel(I) + holder.icon_state = "durand9" + else + user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") + holder.icon_state = "durand7" + if(11) + if(diff==FORWARD) + user.visible_message("[user] secures the weapon control module.", "You secure the weapon control module.") + holder.icon_state = "durand10" + else + user.visible_message("[user] removes the weapon control module from [holder].", "You remove the weapon control module from [holder].") + new /obj/item/weapon/circuitboard/mecha/durand/targeting(get_turf(holder)) + holder.icon_state = "durand8" + if(10) + if(diff==FORWARD) + user.visible_message("[user] installs advanced scanner module to [holder].", "You install advanced scanner module to [holder].") + qdel(I) + holder.icon_state = "durand11" + else + user.visible_message("[user] unfastens the weapon control module.", "You unfasten the weapon control module.") + holder.icon_state = "durand9" + if(9) + if(diff==FORWARD) + user.visible_message("[user] secures the advanced scanner module.", "You secure the advanced scanner module.") + holder.icon_state = "durand12" + else + user.visible_message("[user] removes the advanced scanner module from [holder].", "You remove the advanced scanner module from [holder].") + new /obj/item/weapon/stock_parts/scanning_module/adv(get_turf(holder)) + holder.icon_state = "durand10" + if(8) + if(diff==FORWARD) + user.visible_message("[user] installs advanced capacitor to [holder].", "You install advanced capacitor to [holder].") + qdel(I) + holder.icon_state = "durand13" + else + user.visible_message("[user] unfastens the advanced scanner module.", "You unfasten the advanced scanner module.") + holder.icon_state = "durand11" + if(7) + if(diff==FORWARD) + user.visible_message("[user] secures the advanced capacitor.", "You secure the advanced capacitor.") + holder.icon_state = "durand14" + else + user.visible_message("[user] removes the advanced capacitor from [holder].", "You remove the advanced capacitor from [holder].") + new /obj/item/weapon/stock_parts/capacitor/adv(get_turf(holder)) + holder.icon_state = "durand12" + if(6) + if(diff==FORWARD) + user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") + holder.icon_state = "durand15" + else + user.visible_message("[user] unfastens the advanced capacitor.", "You unfasten the advanced capacitor.") + holder.icon_state = "durand13" + if(5) + if(diff==FORWARD) + user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") + holder.icon_state = "durand16" + else + user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") + var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "durand14" + if(4) + if(diff==FORWARD) + user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") + holder.icon_state = "durand17" + else + user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") + holder.icon_state = "durand15" + if(3) + if(diff==FORWARD) + user.visible_message("[user] installs Durand Armour Plates to [holder].", "You install Durand Armour Plates to [holder].") + qdel(I) + holder.icon_state = "durand18" + else + user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") + holder.icon_state = "durand16" + if(2) + if(diff==FORWARD) + user.visible_message("[user] secures Durand Armour Plates.", "You secure Durand Armour Plates.") + holder.icon_state = "durand19" + else + user.visible_message("[user] pries Durand Armour Plates from [holder].", "You prie Durand Armour Plates from [holder].") + new /obj/item/mecha_parts/part/durand_armour(get_turf(holder)) + holder.icon_state = "durand17" + if(1) + if(diff==FORWARD) + user.visible_message("[user] welds Durand Armour Plates to [holder].", "You weld Durand Armour Plates to [holder].") + else + user.visible_message("[user] unfastens Durand Armour Plates.", "You unfasten Durand Armour Plates.") + holder.icon_state = "durand18" + return 1 - spawn_result() - ..() - feedback_inc("mecha_durand_created",1) - return +/datum/construction/reversible/mecha/durand/spawn_result() + ..() + feedback_inc("mecha_durand_created",1) + return + +//////////////////////// +// Odysseus +//////////////////////// +/datum/construction/mecha/odysseus_chassis + steps = list(list("key"=/obj/item/mecha_parts/part/odysseus_torso),//1 + list("key"=/obj/item/mecha_parts/part/odysseus_head),//2 + list("key"=/obj/item/mecha_parts/part/odysseus_left_arm),//3 + list("key"=/obj/item/mecha_parts/part/odysseus_right_arm),//4 + list("key"=/obj/item/mecha_parts/part/odysseus_left_leg),//5 + list("key"=/obj/item/mecha_parts/part/odysseus_right_leg)//6 + ) + +/datum/construction/mecha/odysseus_chassis/custom_action(step, obj/item/I, mob/user) + user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") + holder.overlays += I.icon_state+"+o" + qdel(I) + return 1 + +/datum/construction/mecha/odysseus_chassis/action(obj/item/I,mob/user as mob) + return check_all_steps(I,user) + +/datum/construction/mecha/odysseus_chassis/spawn_result() + var/obj/item/mecha_parts/chassis/const_holder = holder + const_holder.construct = new /datum/construction/reversible/mecha/odysseus(const_holder) + const_holder.icon = 'icons/mecha/mech_construction.dmi' + const_holder.icon_state = "odysseus0" + const_holder.density = 1 + spawn() + qdel(src) + return +/datum/construction/reversible/mecha/odysseus + result = "/obj/mecha/medical/odysseus" + steps = list( + //1 + list("key"=/obj/item/weapon/weldingtool, + "backkey"=IS_WRENCH, + "desc"="External armor is wrenched."), + //2 + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, + "desc"="External armor is installed."), + //3 + list("key"=/obj/item/stack/material/plasteel, + "backkey"=/obj/item/weapon/weldingtool, + "desc"="Internal armor is welded."), + //4 + list("key"=/obj/item/weapon/weldingtool, + "backkey"=IS_WRENCH, + "desc"="Internal armor is wrenched"), + //5 + list("key"=IS_WRENCH, + "backkey"=IS_CROWBAR, + "desc"="Internal armor is installed"), + //6 + list("key"=/obj/item/stack/material/steel, + "backkey"=IS_SCREWDRIVER, + "desc"="Peripherals control module is secured"), + //7 + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, + "desc"="Peripherals control module is installed"), + //8 + list("key"=/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, + "backkey"=IS_SCREWDRIVER, + "desc"="Central control module is secured"), + //9 + list("key"=IS_SCREWDRIVER, + "backkey"=IS_CROWBAR, + "desc"="Central control module is installed"), + //10 + list("key"=/obj/item/weapon/circuitboard/mecha/odysseus/main, + "backkey"=IS_SCREWDRIVER, + "desc"="The wiring is adjusted"), + //11 + list("key"=/obj/item/weapon/tool/wirecutters, + "backkey"=IS_SCREWDRIVER, + "desc"="The wiring is added"), + //12 + list("key"=/obj/item/stack/cable_coil, + "backkey"=IS_SCREWDRIVER, + "desc"="The hydraulic systems are active."), + //13 + list("key"=IS_SCREWDRIVER, + "backkey"=IS_WRENCH, + "desc"="The hydraulic systems are connected."), + //14 + list("key"=IS_WRENCH, + "desc"="The hydraulic systems are disconnected.") + ) + +/datum/construction/reversible/mecha/odysseus/action(obj/item/I,mob/user as mob) + return check_step(I,user) + +/datum/construction/reversible/mecha/odysseus/custom_action(index, diff, obj/item/I, mob/user) + if(!..()) + return 0 + + //TODO: better messages. + switch(index) + if(14) + user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + holder.icon_state = "odysseus1" + if(13) + if(diff==FORWARD) + user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") + holder.icon_state = "odysseus2" + else + user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") + holder.icon_state = "odysseus0" + if(12) + if(diff==FORWARD) + user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") + holder.icon_state = "odysseus3" + else + user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") + holder.icon_state = "odysseus1" + if(11) + if(diff==FORWARD) + user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") + holder.icon_state = "odysseus4" + else + user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") + var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) + coil.amount = 4 + holder.icon_state = "odysseus2" + if(10) + if(diff==FORWARD) + user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") + qdel(I) + holder.icon_state = "odysseus5" + else + user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") + holder.icon_state = "odysseus3" + if(9) + if(diff==FORWARD) + user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") + holder.icon_state = "odysseus6" + else + user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") + new /obj/item/weapon/circuitboard/mecha/odysseus/main(get_turf(holder)) + holder.icon_state = "odysseus4" + if(8) + if(diff==FORWARD) + user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") + qdel(I) + holder.icon_state = "odysseus7" + else + user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") + holder.icon_state = "odysseus5" + if(7) + if(diff==FORWARD) + user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") + holder.icon_state = "odysseus8" + else + user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") + new /obj/item/weapon/circuitboard/mecha/odysseus/peripherals(get_turf(holder)) + holder.icon_state = "odysseus6" + if(6) + if(diff==FORWARD) + user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") + holder.icon_state = "odysseus9" + else + user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") + holder.icon_state = "odysseus7" + if(5) + if(diff==FORWARD) + user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") + holder.icon_state = "odysseus10" + else + user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") + var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) + MS.amount = 5 + holder.icon_state = "odysseus8" + if(4) + if(diff==FORWARD) + user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") + holder.icon_state = "odysseus11" + else + user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") + holder.icon_state = "odysseus9" + if(3) + if(diff==FORWARD) + user.visible_message("[user] installs [I] layer to [holder].", "You install external reinforced armor layer to [holder].") + holder.icon_state = "odysseus12" + else + user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") + holder.icon_state = "odysseus10" + if(2) + if(diff==FORWARD) + user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.") + holder.icon_state = "odysseus13" + else + var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) + MS.amount = 5 + user.visible_message("[user] pries [MS] from [holder].", "You prie [MS] from [holder].") + holder.icon_state = "odysseus11" + if(1) + if(diff==FORWARD) + user.visible_message("[user] welds external armor layer to [holder].", "You weld external armor layer to [holder].") + holder.icon_state = "odysseus14" + else + user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") + holder.icon_state = "odysseus12" + return 1 + +/datum/construction/reversible/mecha/odysseus/spawn_result() + ..() + feedback_inc("mecha_odysseus_created",1) + return + +////////////////////// +// Phazon +////////////////////// /datum/construction/mecha/phazon_chassis result = "/obj/mecha/combat/phazon" steps = list(list("key"=/obj/item/mecha_parts/part/phazon_torso),//1 @@ -1072,224 +1294,11 @@ list("key"=/obj/item/mecha_parts/part/phazon_head) ) - custom_action(step, atom/used_atom, mob/user) - user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]") - holder.overlays += used_atom.icon_state+"+o" - qdel(used_atom) - return 1 +/datum/construction/mecha/phazon_chassis/custom_action(step, obj/item/I, mob/user) + user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]") + holder.overlays += I.icon_state+"+o" + qdel(I) + return 1 - action(atom/used_atom,mob/user as mob) - return check_all_steps(used_atom,user) - - - - -/datum/construction/mecha/odysseus_chassis - steps = list(list("key"=/obj/item/mecha_parts/part/odysseus_torso),//1 - list("key"=/obj/item/mecha_parts/part/odysseus_head),//2 - list("key"=/obj/item/mecha_parts/part/odysseus_left_arm),//3 - list("key"=/obj/item/mecha_parts/part/odysseus_right_arm),//4 - list("key"=/obj/item/mecha_parts/part/odysseus_left_leg),//5 - list("key"=/obj/item/mecha_parts/part/odysseus_right_leg)//6 - ) - - custom_action(step, atom/used_atom, mob/user) - user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]") - holder.overlays += used_atom.icon_state+"+o" - qdel(used_atom) - return 1 - - action(atom/used_atom,mob/user as mob) - return check_all_steps(used_atom,user) - - spawn_result() - var/obj/item/mecha_parts/chassis/const_holder = holder - const_holder.construct = new /datum/construction/reversible/mecha/odysseus(const_holder) - const_holder.icon = 'icons/mecha/mech_construction.dmi' - const_holder.icon_state = "odysseus0" - const_holder.density = 1 - spawn() - qdel(src) - return - - -/datum/construction/reversible/mecha/odysseus - result = "/obj/mecha/medical/odysseus" - steps = list( - //1 - list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/wrench, - "desc"="External armor is wrenched."), - //2 - list("key"=/obj/item/weapon/wrench, - "backkey"=/obj/item/weapon/crowbar, - "desc"="External armor is installed."), - //3 - list("key"=/obj/item/stack/material/plasteel, - "backkey"=/obj/item/weapon/weldingtool, - "desc"="Internal armor is welded."), - //4 - list("key"=/obj/item/weapon/weldingtool, - "backkey"=/obj/item/weapon/wrench, - "desc"="Internal armor is wrenched"), - //5 - list("key"=/obj/item/weapon/wrench, - "backkey"=/obj/item/weapon/crowbar, - "desc"="Internal armor is installed"), - //6 - list("key"=/obj/item/stack/material/steel, - "backkey"=/obj/item/weapon/screwdriver, - "desc"="Peripherals control module is secured"), - //7 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, - "desc"="Peripherals control module is installed"), - //8 - list("key"=/obj/item/weapon/circuitboard/mecha/odysseus/peripherals, - "backkey"=/obj/item/weapon/screwdriver, - "desc"="Central control module is secured"), - //9 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/crowbar, - "desc"="Central control module is installed"), - //10 - list("key"=/obj/item/weapon/circuitboard/mecha/odysseus/main, - "backkey"=/obj/item/weapon/screwdriver, - "desc"="The wiring is adjusted"), - //11 - list("key"=/obj/item/weapon/wirecutters, - "backkey"=/obj/item/weapon/screwdriver, - "desc"="The wiring is added"), - //12 - list("key"=/obj/item/stack/cable_coil, - "backkey"=/obj/item/weapon/screwdriver, - "desc"="The hydraulic systems are active."), - //13 - list("key"=/obj/item/weapon/screwdriver, - "backkey"=/obj/item/weapon/wrench, - "desc"="The hydraulic systems are connected."), - //14 - list("key"=/obj/item/weapon/wrench, - "desc"="The hydraulic systems are disconnected.") - ) - - action(atom/used_atom,mob/user as mob) - return check_step(used_atom,user) - - custom_action(index, diff, atom/used_atom, mob/user) - if(!..()) - return 0 - - //TODO: better messages. - switch(index) - if(14) - user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") - holder.icon_state = "odysseus1" - if(13) - if(diff==FORWARD) - user.visible_message("[user] activates [holder] hydraulic systems.", "You activate [holder] hydraulic systems.") - holder.icon_state = "odysseus2" - else - user.visible_message("[user] disconnects [holder] hydraulic systems", "You disconnect [holder] hydraulic systems.") - holder.icon_state = "odysseus0" - if(12) - if(diff==FORWARD) - user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") - holder.icon_state = "odysseus3" - else - user.visible_message("[user] deactivates [holder] hydraulic systems.", "You deactivate [holder] hydraulic systems.") - holder.icon_state = "odysseus1" - if(11) - if(diff==FORWARD) - user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") - holder.icon_state = "odysseus4" - else - user.visible_message("[user] removes the wiring from [holder].", "You remove the wiring from [holder].") - var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder)) - coil.amount = 4 - holder.icon_state = "odysseus2" - if(10) - if(diff==FORWARD) - user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") - qdel(used_atom) - holder.icon_state = "odysseus5" - else - user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].") - holder.icon_state = "odysseus3" - if(9) - if(diff==FORWARD) - user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") - holder.icon_state = "odysseus6" - else - user.visible_message("[user] removes the central control module from [holder].", "You remove the central computer mainboard from [holder].") - new /obj/item/weapon/circuitboard/mecha/odysseus/main(get_turf(holder)) - holder.icon_state = "odysseus4" - if(8) - if(diff==FORWARD) - user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") - qdel(used_atom) - holder.icon_state = "odysseus7" - else - user.visible_message("[user] unfastens the mainboard.", "You unfasten the mainboard.") - holder.icon_state = "odysseus5" - if(7) - if(diff==FORWARD) - user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") - holder.icon_state = "odysseus8" - else - user.visible_message("[user] removes the peripherals control module from [holder].", "You remove the peripherals control module from [holder].") - new /obj/item/weapon/circuitboard/mecha/odysseus/peripherals(get_turf(holder)) - holder.icon_state = "odysseus6" - if(6) - if(diff==FORWARD) - user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") - holder.icon_state = "odysseus9" - else - user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.") - holder.icon_state = "odysseus7" - if(5) - if(diff==FORWARD) - user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") - holder.icon_state = "odysseus10" - else - user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].") - var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder)) - MS.amount = 5 - holder.icon_state = "odysseus8" - if(4) - if(diff==FORWARD) - user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") - holder.icon_state = "odysseus11" - else - user.visible_message("[user] unfastens the internal armor layer.", "You unfasten the internal armor layer.") - holder.icon_state = "odysseus9" - if(3) - if(diff==FORWARD) - user.visible_message("[user] installs [used_atom] layer to [holder].", "You install external reinforced armor layer to [holder].") - - holder.icon_state = "odysseus12" - else - user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].") - holder.icon_state = "odysseus10" - if(2) - if(diff==FORWARD) - user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.") - holder.icon_state = "odysseus13" - else - var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder)) - MS.amount = 5 - user.visible_message("[user] pries [MS] from [holder].", "You prie [MS] from [holder].") - holder.icon_state = "odysseus11" - if(1) - if(diff==FORWARD) - user.visible_message("[user] welds external armor layer to [holder].", "You weld external armor layer to [holder].") - holder.icon_state = "odysseus14" - else - user.visible_message("[user] unfastens the external armor layer.", "You unfasten the external armor layer.") - holder.icon_state = "odysseus12" - return 1 - - spawn_result() - ..() - feedback_inc("mecha_odysseus_created",1) - return +/datum/construction/mecha/phazon_chassis/action(obj/item/I,mob/user as mob) + return check_all_steps(I,user) \ No newline at end of file diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm index 39620c4742..73cee1223b 100644 --- a/code/game/mecha/mecha_wreckage.dm +++ b/code/game/mecha/mecha_wreckage.dm @@ -34,7 +34,7 @@ if(istype(W, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = W if(salvage_num <= 0) - user << "You don't see anything that can be cut with [W]." + to_chat(user, "You don't see anything that can be cut with [W].") return if (!isemptylist(welder_salvage) && WT.remove_fuel(0,user)) var/type = prob(70)?pick(welder_salvage):null @@ -45,13 +45,13 @@ welder_salvage -= type salvage_num-- else - user << "You failed to salvage anything valuable from [src]." + to_chat(user, "You failed to salvage anything valuable from [src].") else - user << "You need more welding fuel to complete this task." + to_chat(user, "You need more welding fuel to complete this task.") return - if(istype(W, /obj/item/weapon/wirecutters)) + if(W.is_wirecutter()) if(salvage_num <= 0) - user << "You don't see anything that can be cut with [W]." + to_chat(user, "You don't see anything that can be cut with [W].") return else if(!isemptylist(wirecutters_salvage)) var/type = prob(70)?pick(wirecutters_salvage):null @@ -60,8 +60,8 @@ user.visible_message("[user] cuts [N] from [src].", "You cut [N] from [src].") salvage_num-- else - user << "You failed to salvage anything valuable from [src]." - if(istype(W, /obj/item/weapon/crowbar)) + to_chat(user, "You failed to salvage anything valuable from [src].") + if(W.is_crowbar()) if(!isemptylist(crowbar_salvage)) var/obj/S = pick(crowbar_salvage) if(S) @@ -70,7 +70,7 @@ user.visible_message("[user] pries [S] from [src].", "You pry [S] from [src].") return else - user << "You don't see anything that can be pried with [W]." + to_chat(user, "You don't see anything that can be pried with [W].") else ..() return diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 0369b91d63..69d875d977 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -216,17 +216,17 @@ var/global/list/image/splatter_cache=list() /obj/effect/decal/cleanable/blood/gibs/proc/streak(var/list/directions) - spawn (0) - var/direction = pick(directions) - for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++) - sleep(3) - if (i > 0) - var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc) - b.basecolor = src.basecolor - b.update_icon() + spawn (0) + var/direction = pick(directions) + for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++) + sleep(3) + if (i > 0) + var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc) + b.basecolor = src.basecolor + b.update_icon() - if (step_to(src, get_step(src, direction), 0)) - break + if (step_to(src, get_step(src, direction), 0)) + break /obj/effect/decal/cleanable/mucus @@ -249,5 +249,5 @@ var/global/list/image/splatter_cache=list() //This version should be used for admin spawns and pre-mapped virus vectors (e.g. in PoIs), this version does not dry /obj/effect/decal/cleanable/mucus/mapped/New() ..() - virus2 = new /datum/disease2/disease + virus2 |= new /datum/disease2/disease virus2.makerandom() diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm index 695f8d3b79..0d7370d269 100644 --- a/code/game/objects/effects/decals/contraband.dm +++ b/code/game/objects/effects/decals/contraband.dm @@ -122,7 +122,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(istype(W, /obj/item/weapon/wirecutters)) + if(W.is_wirecutter()) playsound(src.loc, W.usesound, 100, 1) if(ruined) user << "You remove the remnants of the poster." diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index a1a6623ff1..9ea690318b 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -47,13 +47,13 @@ explode(M) /obj/effect/mine/attackby(obj/item/W as obj, mob/living/user as mob) - if(isscrewdriver(W)) + if(W.is_screwdriver()) panel_open = !panel_open user.visible_message("[user] very carefully screws the mine's panel [panel_open ? "open" : "closed"].", "You very carefully screw the mine's panel [panel_open ? "open" : "closed"].") playsound(src.loc, W.usesound, 50, 1) - else if((iswirecutter(W) || ismultitool(W)) && panel_open) + else if((W.is_wirecutter() || istype(W, /obj/item/device/multitool)) && panel_open) interact(user) else ..() diff --git a/code/game/objects/effects/misc.dm b/code/game/objects/effects/misc.dm index aaebab4355..d7db6f2a0c 100644 --- a/code/game/objects/effects/misc.dm +++ b/code/game/objects/effects/misc.dm @@ -46,4 +46,21 @@ /obj/effect/temporary_effect/shuttle_landing/initialize() flick("shuttle_warning", src) // flick() forces the animation to always begin at the start. + . = ..() + +// The manifestation of Zeus's might. Or just a really unlucky day. +// This is purely a visual effect, this isn't the part of the code that hurts things. +/obj/effect/temporary_effect/lightning_strike + name = "lightning" + desc = "How shocked you must be, to see this text. You must have lightning reflexes. \ + The humor in this description is just so electrifying." + icon = 'icons/effects/96x256.dmi' + icon_state = "lightning_strike" + plane = PLANE_LIGHTING_ABOVE + time_to_die = 1 SECOND + pixel_x = -32 + +/obj/effect/temporary_effect/lightning_strike/initialize() + icon_state += "[rand(1,2)]" // To have two variants of lightning sprites. + animate(src, alpha = 0, time = time_to_die - 1) . = ..() \ No newline at end of file diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index cf997749e8..eef3b2b1fd 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -64,7 +64,7 @@ /obj/effect/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if(air_group || (height==0)) return 1 - if(istype(mover, /mob/living/simple_animal/hostile/giant_spider)) + if(istype(mover, /mob/living/simple_mob/animal/giant_spider)) return 1 else if(istype(mover, /mob/living)) if(prob(50)) @@ -133,10 +133,10 @@ var/amount_grown = -1 var/obj/machinery/atmospherics/unary/vent_pump/entry_vent var/travelling_in_vent = 0 - var/list/grow_as = list(/mob/living/simple_animal/hostile/giant_spider, /mob/living/simple_animal/hostile/giant_spider/nurse, /mob/living/simple_animal/hostile/giant_spider/hunter) + var/list/grow_as = list(/mob/living/simple_mob/animal/giant_spider, /mob/living/simple_mob/animal/giant_spider/nurse, /mob/living/simple_mob/animal/giant_spider/hunter) /obj/effect/spider/spiderling/frost - grow_as = list(/mob/living/simple_animal/hostile/giant_spider/frost) + grow_as = list(/mob/living/simple_mob/animal/giant_spider/frost) /obj/effect/spider/spiderling/New(var/location, var/atom/parent) pixel_x = rand(6,-6) diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm index a58241ada2..febfff6d0f 100644 --- a/code/game/objects/effects/step_triggers.dm +++ b/code/game/objects/effects/step_triggers.dm @@ -158,7 +158,14 @@ var/global/list/tele_landmarks = list() // Terrible, but the alternative is loop /obj/effect/step_trigger/teleporter/planetary_fall var/datum/planet/planet = null +// First time setup, which planet are we aiming for? +/obj/effect/step_trigger/teleporter/planetary_fall/proc/find_planet() + return + /obj/effect/step_trigger/teleporter/planetary_fall/Trigger(var/atom/movable/A) + if(!planet) + find_planet() + if(planet) if(!planet.planet_floors.len) message_admins("ERROR: planetary_fall step trigger's list of outdoor floors was empty.") diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index b732e1c546..4a80379c16 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -806,3 +806,27 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. /obj/item/proc/apply_accessories(var/image/standing) return standing +/* + * Assorted tool procs, so any item can emulate any tool, if coded +*/ +/obj/item/proc/is_screwdriver() + return FALSE + +/obj/item/proc/is_wrench() + return FALSE + +/obj/item/proc/is_crowbar() + return FALSE + +/obj/item/proc/is_wirecutter() + return FALSE + +// These next three might bug out or runtime, unless someone goes back and finds a way to generalize their specific code +/obj/item/proc/is_cable_coil() + return FALSE + +/obj/item/proc/is_multitool() + return FALSE + +/obj/item/proc/is_welder() + return FALSE \ No newline at end of file diff --git a/code/game/objects/items/apc_frame.dm b/code/game/objects/items/apc_frame.dm index fd2ea3e94b..fe40f772dd 100644 --- a/code/game/objects/items/apc_frame.dm +++ b/code/game/objects/items/apc_frame.dm @@ -9,7 +9,7 @@ /obj/item/frame/apc/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() - if (istype(W, /obj/item/weapon/wrench)) + if (W.is_wrench()) new /obj/item/stack/material/steel( get_turf(src.loc), 2 ) qdel(src) diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 302c7df568..324c5560a3 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -42,7 +42,7 @@ storage_capacity = (MOB_MEDIUM * 2) - 1 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 as obj, 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(istype(W, /obj/item/weapon/wirecutters)) + else if(W.is_wirecutter()) to_chat(user, "You cut the tag off the bodybag") src.name = "body bag" src.overlays.Cut() @@ -239,7 +239,7 @@ inject_occupant(H) break - else if(istype(W,/obj/item/weapon/screwdriver)) + else if(W.is_screwdriver()) if(syringe) if(used) to_chat(user,"The injector cannot be removed now that the stasis bag has been used!") diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 1f754ff2ca..5df1daff3d 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -1254,7 +1254,7 @@ var/global/list/obj/item/device/pda/PDAs = list() if(isnull(cartridge)) to_chat(usr, "There's no cartridge to eject.") - return + return cartridge.forceMove(get_turf(src)) if(ismob(loc)) @@ -1382,7 +1382,7 @@ var/global/list/obj/item/device/pda/PDAs = list() to_chat(user, "Blood type: [C:blood_DNA[blood]]\nDNA: [blood]") if(4) - user.visible_message("\The [user] has analyzed [C]'s radiation levels!", 1) + user.visible_message("\The [user] has analyzed [C]'s radiation levels!", "You have analyzed [C]'s radiation levels!") to_chat(user, "Analyzing Results for [C]:") if(C.radiation) to_chat(user, "Radiation Level: [C.radiation]") diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm index e13324a5f0..4832bdcc53 100644 --- a/code/game/objects/items/devices/PDA/cart.dm +++ b/code/game/objects/items/devices/PDA/cart.dm @@ -434,7 +434,7 @@ var/list/civilian_cartridges = list( for(var/S in supply_controller.shoppinglist) var/datum/supply_order/SO = S - supplyOrderData[++supplyOrderData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "ApprovedBy" = SO.orderedby, "Comment" = html_encode(SO.comment)) + supplyOrderData[++supplyOrderData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "ApprovedBy" = SO.ordered_by, "Comment" = html_encode(SO.comment)) if(!supplyOrderData.len) supplyOrderData[++supplyOrderData.len] = list("Number" = null, "Name" = null, "OrderedBy"=null) @@ -443,10 +443,13 @@ var/list/civilian_cartridges = list( var/requestCount = 0 var/requestData[0] - for(var/S in supply_controller.requestlist) + for(var/S in supply_controller.order_history) var/datum/supply_order/SO = S + if(SO.status != SUP_ORDER_REQUESTED) + continue + requestCount++ - requestData[++requestData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "OrderedBy" = SO.orderedby, "Comment" = html_encode(SO.comment)) + requestData[++requestData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "OrderedBy" = SO.ordered_by, "Comment" = html_encode(SO.comment)) if(!requestData.len) requestData[++requestData.len] = list("Number" = null, "Name" = null, "orderedBy" = null, "Comment" = null) diff --git a/code/game/objects/items/devices/communicator/UI.dm b/code/game/objects/items/devices/communicator/UI.dm index fca4cf4866..a699ea9afe 100644 --- a/code/game/objects/items/devices/communicator/UI.dm +++ b/code/game/objects/items/devices/communicator/UI.dm @@ -77,7 +77,9 @@ "Weather" = planet.weather_holder.current_weather.name, "Temperature" = planet.weather_holder.temperature - T0C, "High" = planet.weather_holder.current_weather.temp_high - T0C, - "Low" = planet.weather_holder.current_weather.temp_low - T0C) + "Low" = planet.weather_holder.current_weather.temp_low - T0C, + "Forecast" = english_list(planet.weather_holder.forecast, and_text = "→", comma_text = "→", final_comma_text = "→") // Unicode RIGHTWARDS ARROW. + ) weather[++weather.len] = W injection = "
Test
" diff --git a/code/game/objects/items/devices/defib.dm b/code/game/objects/items/devices/defib.dm index af9d697d63..9b127da04a 100644 --- a/code/game/objects/items/devices/defib.dm +++ b/code/game/objects/items/devices/defib.dm @@ -94,7 +94,7 @@ to_chat(user, "You install a cell in \the [src].") update_icon() - else if(isscrewdriver(W)) + else if(W.is_screwdriver()) if(bcell) bcell.update_icon() bcell.forceMove(get_turf(src.loc)) diff --git a/code/game/objects/items/devices/hacktool.dm b/code/game/objects/items/devices/hacktool.dm index 9ae5f62732..b5d6439da3 100644 --- a/code/game/objects/items/devices/hacktool.dm +++ b/code/game/objects/items/devices/hacktool.dm @@ -24,7 +24,7 @@ return ..() /obj/item/device/multitool/hacktool/attackby(var/obj/item/W, var/mob/user) - if(isscrewdriver(W)) + if(W.is_screwdriver()) in_hack_mode = !in_hack_mode playsound(src.loc, W.usesound, 50, 1) else diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 69905f0cb8..343a58ce1a 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -54,7 +54,7 @@ else to_chat(user, "[src] already has a diode.") - else if(istype(W, /obj/item/weapon/screwdriver)) + else if(W.is_screwdriver()) if(diode) to_chat(user, "You remove the [diode.name] from the [src].") diode.loc = get_turf(src.loc) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index ca4b8d8066..9c9f1aba59 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -10,44 +10,162 @@ var/insults = 0 var/list/insultmsg = list("FUCK EVERYONE!", "I'M A TERRORIST!", "ALL SECURITY TO SHOOT ME ON SIGHT!", "I HAVE A BOMB!", "CAPTAIN IS A COMDOM!", "GLORY TO ALMACH!") -/obj/item/device/megaphone/attack_self(mob/living/user as mob) +/obj/item/device/megaphone/proc/can_broadcast(var/mob/living/user) if (user.client) if(user.client.prefs.muted & MUTE_IC) - src << "You cannot speak in IC (muted)." - return - if(!ishuman(user)) - user << "You don't know how to use this!" - return + to_chat(user, "You cannot speak in IC (muted).") + return 0 + if(!(ishuman(user) || user.isSynthetic())) + to_chat(user, "You don't know how to use this!") + return 0 if(user.silent) - return + return 0 if(spamcheck) - user << "\The [src] needs to recharge!" - return + to_chat(user, "\The [src] needs to recharge!") + return 0 + return 1 - var/message = sanitize(input(user, "Shout a message?", "Megaphone", null) as text) - if(!message) - return - message = capitalize(message) +/obj/item/device/megaphone/proc/do_broadcast(var/mob/living/user, var/message) if ((src.loc == user && usr.stat == 0)) if(emagged) if(insults) - for(var/mob/O in (viewers(user))) - O.show_message("[user] broadcasts, \"[pick(insultmsg)]\"",2) // 2 stands for hearable message + user.audible_message("[user] broadcasts, \"[pick(insultmsg)]\"") insults-- else - user << "*BZZZZzzzzzt*" + to_chat(user, "*BZZZZzzzzzt*") else - for(var/mob/O in (viewers(user))) - O.show_message("[user] broadcasts, \"[message]\"",2) // 2 stands for hearable message + user.audible_message("[user] broadcasts, \"[message]\"") spamcheck = 1 spawn(20) spamcheck = 0 return +/obj/item/device/megaphone/attack_self(mob/living/user as mob) + if(!can_broadcast(user)) + return + + var/message = sanitize(input(user, "Shout a message?", "Megaphone", null) as text) + if(!message) + return + message = capitalize(message) + + do_broadcast(user, message) + /obj/item/device/megaphone/emag_act(var/remaining_charges, var/mob/user) if(!emagged) - user << "You overload \the [src]'s voice synthesizer." + to_chat(user, "You overload \the [src]'s voice synthesizer.") emagged = 1 - insults = rand(1, 3)//to prevent dickflooding + insults = rand(1, 3)//to prevent caps spam. return 1 + +/obj/item/device/megaphone/super + name = "gigaphone" + desc = "A device used to project your voice. Loudly-er." + icon_state = "gigaphone" + + var/broadcast_font = "verdana" + var/broadcast_size = 3 + var/broadcast_color = "#000000" //Black by default. + var/list/volume_options = list(2, 3, 4) + var/list/font_options = list("times new roman", "times", "verdana", "sans-serif", "serif", "georgia") + var/list/color_options= list("#000000", "#ff0000", "#00ff00", "#0000ff") + + insultmsg = list("HONK?!", "HONK!", "HOOOOOOOONK!", "...!", "HUNK.", "Honk?") + +/obj/item/device/megaphone/super/emag_act(var/remaining_charges, var/mob/user) + ..() + if(emagged) + if(!(11 in volume_options)) + volume_options = list(11) + broadcast_size = 11 + if(!("comic sans ms" in font_options)) + font_options = list("comic sans ms") + broadcast_font = "comic sans ms" + to_chat(user, "\The [src] emits a silly sound.") + if(!("#ff69b4" in color_options)) + color_options = list("#ff69b4") + broadcast_color = "#ff69b4" + if(insults <= 0) + insults = rand(1,3) + to_chat(user, "You re-scramble \the [src]'s voice synthesizer.") + return 1 + +/obj/item/device/megaphone/super/verb/turn_volume_dial() + set name = "Change Volume" + set desc = "Allows you to change the megaphone's volume." + set category = "Object" + + adjust_volume(usr) + +/obj/item/device/megaphone/super/proc/adjust_volume(var/mob/living/user) + var/new_volume = input(user, "Set Volume") as null|anything in volume_options + + if(new_volume && Adjacent(user)) + broadcast_size = new_volume + +/obj/item/device/megaphone/super/verb/change_font() + set name = "Change... Pronunciation?" + set desc = "Allows you to change the megaphone's font." + set category = "Object" + + adjust_font(usr) + +/obj/item/device/megaphone/super/proc/adjust_font(var/mob/living/user) + var/new_font = input(user, "Set Volume") as null|anything in font_options + + if(new_font && Adjacent(user)) + broadcast_font = new_font + +/obj/item/device/megaphone/super/verb/change_color() + set name = "Change... Tune?" + set desc = "Allows you to change the megaphone's color." + set category = "Object" + + adjust_color(usr) + +/obj/item/device/megaphone/super/proc/adjust_color(var/mob/living/user) + var/new_color = input(user, "Set Volume") as null|anything in color_options + + if(new_color && Adjacent(user)) + broadcast_color = new_color + +/obj/item/device/megaphone/super/do_broadcast(var/mob/living/user, var/message) + if ((src.loc == user && usr.stat == 0)) + if(emagged) + if(insults) + user.audible_message("[user] broadcasts, \"[pick(insultmsg)]\"") + if(broadcast_size >= 11) + var/turf/T = get_turf(user) + playsound(T, 'sound/items/AirHorn.ogg', 100, 1) + for(var/mob/living/carbon/M in oviewers(4, T)) + if(M.get_ear_protection() >= 2) + continue + M.sleeping = 0 + M.stuttering += 20 + M.ear_deaf += 30 + M.Weaken(3) + if(prob(30)) + M.Stun(10) + M.Paralyse(4) + else + M.make_jittery(50) + insults-- + else + user.audible_message("*BZZZZzzzzzt*") + if(prob(40) && insults <= 0) + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(2, 1, get_turf(user)) + s.start() + user.visible_message("\The [src] sparks violently!") + spawn(30) + explosion(get_turf(src), -1, -1, 1, 3, adminlog = 1) + qdel(src) + return + else + user.audible_message("[user] broadcasts, \"[message]\"") + + spamcheck = 1 + spawn(20) + spamcheck = 0 + return diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index f3bc620d08..6ea73e8c78 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -30,13 +30,13 @@ ..() /obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user) - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) if(mode == 0) var/turf/T = loc if(isturf(T) && !!T.is_plating()) attached = locate() in T if(!attached) - user << "No exposed cable here to attach to." + to_chat(user, "No exposed cable here to attach to.") return else anchored = 1 @@ -45,7 +45,7 @@ playsound(src, I.usesound, 50, 1) return else - user << "Device must be placed over an exposed cable to attach to it." + to_chat(user, "Device must be placed over an exposed cable to attach to it.") return else if (mode == 2) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 105eb3aa8f..a67a2bef7b 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -40,8 +40,8 @@ if(!(..(user, 1) && radio_desc)) return - user << "The following channels are available:" - user << radio_desc + to_chat(user, "The following channels are available:") + to_chat(user, radio_desc) /obj/item/device/radio/headset/handle_message_mode(mob/living/M as mob, message, channel) if (channel == "special") @@ -326,10 +326,10 @@ /obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob) // ..() user.set_machine(src) - if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ )))) + if(!(W.is_screwdriver() || istype(W, /obj/item/device/encryptionkey))) return - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) if(keyslot1 || keyslot2) @@ -353,15 +353,15 @@ keyslot2 = null recalculateChannels() - user << "You pop out the encryption keys in the headset!" + to_chat(user, "You pop out the encryption keys in the headset!") playsound(src, W.usesound, 50, 1) else - user << "This headset doesn't have any encryption keys! How useless..." + to_chat(user, "This headset doesn't have any encryption keys! How useless...") if(istype(W, /obj/item/device/encryptionkey/)) if(keyslot1 && keyslot2) - user << "The headset can't hold another key!" + to_chat(user, "The headset can't hold another key!") return if(!keyslot1) diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 011032584a..364323d183 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -118,9 +118,9 @@ /obj/item/device/radio/intercom/attackby(obj/item/W as obj, mob/user as mob) add_fingerprint(user) - if(istype(W, /obj/item/weapon/screwdriver)) // Opening the intercom up. + if(W.is_screwdriver()) // Opening the intercom up. wiresexposed = !wiresexposed - user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]" + to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]") playsound(src, W.usesound, 50, 1) if(wiresexposed) if(!on) @@ -130,7 +130,7 @@ else icon_state = "intercom" return - if(wiresexposed && istype(W, /obj/item/weapon/wirecutters)) + if(wiresexposed && W.is_wirecutter()) user.visible_message("[user] has cut the wires inside \the [src]!", "You have cut the wires inside \the [src].") playsound(src, W.usesound, 50, 1) new/obj/item/stack/cable_coil(get_turf(src), 5) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 801b7e60cf..350caf013c 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -561,7 +561,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 (!( istype(W, /obj/item/weapon/screwdriver) )) + if (!W.is_screwdriver()) return b_stat = !( b_stat ) if(!istype(src, /obj/item/device/radio/beacon)) @@ -613,10 +613,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 (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ )))) + if (!(W.is_screwdriver() || istype(W, /obj/item/device/encryptionkey))) return - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) if(keyslot) @@ -632,15 +632,15 @@ var/global/list/default_medbay_channels = list( keyslot = null recalculateChannels() - user << "You pop out the encryption key in the radio!" + to_chat(user, "You pop out the encryption key in the radio!") playsound(src, W.usesound, 50, 1) else - user << "This radio doesn't have any encryption keys!" + to_chat(user, "This radio doesn't have any encryption keys!") if(istype(W, /obj/item/device/encryptionkey/)) if(keyslot) - user << "The radio can't hold another key!" + to_chat(user, "The radio can't hold another key!") return if(!keyslot) @@ -692,9 +692,9 @@ var/global/list/default_medbay_channels = list( if(enable_subspace_transmission != subspace_transmission) subspace_transmission = !subspace_transmission if(subspace_transmission) - usr << "Subspace Transmission is enabled" + to_chat(usr, "Subspace Transmission is enabled") else - usr << "Subspace Transmission is disabled" + to_chat(usr, "Subspace Transmission is disabled") if(subspace_transmission == 0)//Simple as fuck, clears the channel list to prevent talking/listening over them if subspace transmission is disabled channels = list() @@ -707,10 +707,10 @@ var/global/list/default_medbay_channels = list( shut_up = !shut_up if(shut_up) canhear_range = 0 - usr << "Loadspeaker disabled." + to_chat(usr, "Loadspeaker disabled.") else canhear_range = 3 - usr << "Loadspeaker enabled." + to_chat(usr, "Loadspeaker enabled.") . = 1 if(.) diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index 2040f22a99..6efc045785 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -122,7 +122,7 @@ cell.add_fingerprint(user) cell.update_icon() - user << "You remove \the [src.cell]." + to_chat(user, "You remove \the [src.cell].") src.cell = null updateicon() return @@ -134,16 +134,16 @@ turn_off() else turn_on() - user << "You switch \the [src] [on ? "on" : "off"]." + to_chat(user, "You switch \the [src] [on ? "on" : "off"].") /obj/item/device/suit_cooling_unit/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/screwdriver)) + if (W.is_screwdriver()) if(cover_open) cover_open = 0 - user << "You screw the panel into place." + to_chat(user, "You screw the panel into place.") else cover_open = 1 - user << "You unscrew the panel." + to_chat(user, "You unscrew the panel.") playsound(src, W.usesound, 50, 1) updateicon() return @@ -151,12 +151,12 @@ if (istype(W, /obj/item/weapon/cell)) if(cover_open) if(cell) - user << "There is a [cell] already installed here." + to_chat(user, "There is a [cell] already installed here.") else user.drop_item() W.loc = src cell = W - user << "You insert the [cell]." + to_chat(user, "You insert the [cell].") updateicon() return @@ -177,19 +177,19 @@ if (on) if (attached_to_suit(src.loc)) - user << "It's switched on and running." + to_chat(user, "It's switched on and running.") else - user << "It's switched on, but not attached to anything." + to_chat(user, "It's switched on, but not attached to anything.") else - user << "It is switched off." + to_chat(user, "It is switched off.") if (cover_open) if(cell) - user << "The panel is open, exposing the [cell]." + to_chat(user, "The panel is open, exposing the [cell].") else - user << "The panel is open." + to_chat(user, "The panel is open.") if (cell) - user << "The charge meter reads [round(cell.percent())]%." + to_chat(user, "The charge meter reads [round(cell.percent())]%.") else - user << "It doesn't have a power cell installed." + to_chat(user, "It doesn't have a power cell installed.") diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 791725c14b..841bcc18ed 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -414,7 +414,7 @@ /obj/item/device/tape/attackby(obj/item/I, mob/user, params) - if(ruined && istype(I, /obj/item/weapon/screwdriver)) + if(ruined && I.is_screwdriver()) to_chat(user, "You start winding the tape back in...") playsound(src, I.usesound, 50, 1) if(do_after(user, 120 * I.toolspeed, target = src)) diff --git a/code/game/objects/items/glassjar.dm b/code/game/objects/items/glassjar.dm index c04b9b17dd..2b91d9c30e 100644 --- a/code/game/objects/items/glassjar.dm +++ b/code/game/objects/items/glassjar.dm @@ -6,7 +6,7 @@ w_class = ITEMSIZE_SMALL matter = list("glass" = 200) flags = NOBLUDGEON - var/list/accept_mobs = list(/mob/living/simple_animal/lizard, /mob/living/simple_animal/mouse) + var/list/accept_mobs = list(/mob/living/simple_mob/animal/passive/lizard, /mob/living/simple_animal/mouse) var/contains = 0 // 0 = nothing, 1 = money, 2 = animal, 3 = spiderling /obj/item/glass_jar/New() diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 02a308555b..02e121d02c 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1042,6 +1042,50 @@ name = "tuxedo cat plushie" icon_state = "tuxedocat" +// nah, squids are better than foxes :> + +/obj/item/toy/plushie/squid/green + name = "green squid plushie" + desc = "A small, cute and loveable squid friend. This one is green." + icon = 'icons/obj/toy.dmi' + icon_state = "greensquid" + slot_flags = SLOT_HEAD + +/obj/item/toy/plushie/squid/mint + name = "mint squid plushie" + desc = "A small, cute and loveable squid friend. This one is mint coloured." + icon = 'icons/obj/toy.dmi' + icon_state = "mintsquid" + slot_flags = SLOT_HEAD + +/obj/item/toy/plushie/squid/blue + name = "blue squid plushie" + desc = "A small, cute and loveable squid friend. This one is blue." + icon = 'icons/obj/toy.dmi' + icon_state = "bluesquid" + slot_flags = SLOT_HEAD + +/obj/item/toy/plushie/squid/orange + name = "orange squid plushie" + desc = "A small, cute and loveable squid friend. This one is orange." + icon = 'icons/obj/toy.dmi' + icon_state = "orangesquid" + slot_flags = SLOT_HEAD + +/obj/item/toy/plushie/squid/yellow + name = "yellow squid plushie" + desc = "A small, cute and loveable squid friend. This one is yellow." + icon = 'icons/obj/toy.dmi' + icon_state = "yellowsquid" + slot_flags = SLOT_HEAD + +/obj/item/toy/plushie/squid/pink + name = "pink squid plushie" + desc = "A small, cute and loveable squid friend. This one is pink." + icon = 'icons/obj/toy.dmi' + icon_state = "pinksquid" + slot_flags = SLOT_HEAD + /obj/item/toy/plushie/therapy/red name = "red therapy doll" desc = "A toy for therapeutic and recreational purposes. This one is red." diff --git a/code/game/objects/items/weapons/circuitboards/computer/computer.dm b/code/game/objects/items/weapons/circuitboards/computer/computer.dm index 71d6e2d867..c15d73036a 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/computer.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/computer.dm @@ -153,11 +153,6 @@ name = T_BOARD("disease splicer") build_path = /obj/machinery/computer/diseasesplicer -/obj/item/weapon/circuitboard/ordercomp - name = T_BOARD("supply ordering console") - build_path = /obj/machinery/computer/ordercomp - origin_tech = list(TECH_DATA = 2) - /obj/item/weapon/circuitboard/mining_shuttle name = T_BOARD("mining shuttle console") build_path = /obj/machinery/computer/shuttle_control/mining diff --git a/code/game/objects/items/weapons/circuitboards/computer/research.dm b/code/game/objects/items/weapons/circuitboards/computer/research.dm index fa9ed16797..791cd51cdc 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/research.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/research.dm @@ -7,15 +7,15 @@ build_path = /obj/machinery/computer/rdconsole/core /obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob) - if(istype(I,/obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) playsound(src, I.usesound, 50, 1) user.visible_message("\The [user] adjusts the jumper on \the [src]'s access protocol pins.", "You adjust the jumper on the access protocol pins.") if(build_path == /obj/machinery/computer/rdconsole/core) name = T_BOARD("RD Console - Robotics") build_path = /obj/machinery/computer/rdconsole/robotics - user << "Access protocols set to robotics." + to_chat(user, "Access protocols set to robotics.") else name = T_BOARD("RD Console") build_path = /obj/machinery/computer/rdconsole/core - user << "Access protocols set to default." + to_chat(user, "Access protocols set to default.") return \ No newline at end of file diff --git a/code/game/objects/items/weapons/circuitboards/computer/supply.dm b/code/game/objects/items/weapons/circuitboards/computer/supply.dm index 5924e19ac0..324f1c1a06 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/supply.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/supply.dm @@ -3,11 +3,16 @@ #endif /obj/item/weapon/circuitboard/supplycomp - name = T_BOARD("supply control console") + name = T_BOARD("supply ordering console") build_path = /obj/machinery/computer/supplycomp - origin_tech = list(TECH_DATA = 3) + origin_tech = list(TECH_DATA = 2) var/contraband_enabled = 0 +/obj/item/weapon/circuitboard/supplycomp/control + name = T_BOARD("supply ordering console") + build_path = /obj/machinery/computer/supplycomp/control + origin_tech = list(TECH_DATA = 3) + /obj/item/weapon/circuitboard/supplycomp/construct(var/obj/machinery/computer/supplycomp/SC) if (..(SC)) SC.can_order_contraband = contraband_enabled diff --git a/code/game/objects/items/weapons/circuitboards/machinery/research.dm b/code/game/objects/items/weapons/circuitboards/machinery/research.dm index 31e0d9c063..3fc0aa26ab 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/research.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/research.dm @@ -12,17 +12,17 @@ obj/item/weapon/circuitboard/rdserver /obj/item/weapon/stock_parts/scanning_module = 1) obj/item/weapon/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob) - if(istype(I,/obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) playsound(src, I.usesound, 50, 1) user.visible_message("\The [user] adjusts the jumper on \the [src]'s access protocol pins.", "You adjust the jumper on the access protocol pins.") if(build_path == /obj/machinery/r_n_d/server/core) name = T_BOARD("RD Console - Robotics") build_path = /obj/machinery/r_n_d/server/robotics - user << "Access protocols set to robotics." + to_chat(user, "Access protocols set to robotics.") else name = T_BOARD("RD Console") build_path = /obj/machinery/r_n_d/server/core - user << "Access protocols set to default." + to_chat(user, "Access protocols set to default.") return /obj/item/weapon/circuitboard/destructive_analyzer diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index b49a76c5a9..5290ac7479 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -25,11 +25,11 @@ return ..() /obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user) - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) open_panel = !open_panel user << "You [open_panel ? "open" : "close"] the wire panel." playsound(src, I.usesound, 50, 1) - else if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler )) + else if(I.is_wirecutter() || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler )) wires.Interact(user) else ..() diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index 649b5677ca..3f62ac2725 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -70,7 +70,7 @@ /obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob) if(user.stat || user.restrained() || user.lying) return - if(iswrench(W) && !status)//Taking this apart + if(W.is_wrench() && !status)//Taking this apart var/turf/T = get_turf(src) if(weldtool) weldtool.loc = T @@ -85,7 +85,7 @@ qdel(src) return - if(isscrewdriver(W) && igniter && !lit) + if(W.is_screwdriver() && igniter && !lit) status = !status user << "[igniter] is now [status ? "secured" : "unsecured"]!" update_icon() diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index bef0f8fcd9..177d674c6b 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -46,7 +46,7 @@ /obj/effect/spresent/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() - if (!istype(W, /obj/item/weapon/wirecutters)) + if (!W.is_wirecutter()) user << "I need wirecutters for that." return @@ -129,7 +129,8 @@ if (!( locate(/obj/structure/table, src.loc) )) user << "You MUST put the paper on a table!" if (W.w_class < ITEMSIZE_LARGE) - if (user.get_type_in_hands(/obj/item/weapon/wirecutters)) + var/obj/item/I = user.get_inactive_hand() + if(I.is_wirecutter()) var/a_used = 2 ** (src.w_class - 1) if (src.amount < a_used) user << "You need more paper!" diff --git a/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm b/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm index 2e16eb4106..6646e698f9 100644 --- a/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm +++ b/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm @@ -6,7 +6,7 @@ det_time = 20 origin_tech = list(TECH_BLUESPACE = 4, TECH_MATERIAL = 4) -/obj/item/weapon/grenade/anti_photon/prime() +/obj/item/weapon/grenade/anti_photon/detonate() playsound(src.loc, 'sound/effects/phasein.ogg', 50, 1, 5) set_light(10, -10, "#FFFFFF") diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index 92de17d994..a525e13abc 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -41,7 +41,7 @@ user.put_in_hands(B) name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]" if(stage > 1 && !active && clown_check(user)) - user << "You prime \the [name]!" + to_chat(user, "You prime \the [name]!") msg_admin_attack("[key_name_admin(user)] primed \a [src]") @@ -56,13 +56,13 @@ if(istype(W,/obj/item/device/assembly_holder) && (!stage || stage==1) && path != 2) var/obj/item/device/assembly_holder/det = W if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right))) - user << "Assembly must contain one igniter." + to_chat(user, "Assembly must contain one igniter.") return if(!det.secured) - user << "Assembly must be secured with screwdriver." + to_chat(user, "Assembly must be secured with screwdriver.") return path = 1 - user << "You add [W] to the metal casing." + to_chat(user, "You add [W] to the metal casing.") playsound(src.loc, 'sound/items/Screwdriver2.ogg', 25, -3) user.remove_from_mob(det) det.loc = src @@ -76,26 +76,26 @@ icon_state = initial(icon_state) +"_ass" name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]" stage = 1 - else if(istype(W,/obj/item/weapon/screwdriver) && path != 2) + else if(W.is_screwdriver() && path != 2) if(stage == 1) path = 1 if(beakers.len) - user << "You lock the assembly." + to_chat(user, "You lock the assembly.") name = "grenade" else -// user << "You need to add at least one beaker before locking the assembly." - user << "You lock the empty assembly." +// to_chat(user, "You need to add at least one beaker before locking the assembly.") + to_chat(user, "You lock the empty assembly.") name = "fake grenade" playsound(src, W.usesound, 50, 1) icon_state = initial(icon_state) +"_locked" stage = 2 else if(stage == 2) if(active && prob(95)) - user << "You trigger the assembly!" - prime() + to_chat(user, "You trigger the assembly!") + detonate() return else - user << "You unlock the assembly." + to_chat(user, "You unlock the assembly.") playsound(src.loc, W.usesound, 50, -3) name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]" icon_state = initial(icon_state) + (detonator?"_ass":"") @@ -104,23 +104,23 @@ else if(is_type_in_list(W, allowed_containers) && (!stage || stage==1) && path != 2) path = 1 if(beakers.len == 2) - user << "The grenade can not hold more containers." + to_chat(user, "The grenade can not hold more containers.") return else if(W.reagents.total_volume) - user << "You add \the [W] to the assembly." + to_chat(user, "You add \the [W] to the assembly.") user.drop_item() W.loc = src beakers += W stage = 1 name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]" else - user << "\The [W] is empty." + to_chat(user, "\The [W] is empty.") examine(mob/user) ..(user) if(detonator) - user << "With attached [detonator.name]" + to_chat(user, "With attached [detonator.name]") activate(mob/user as mob) if(active) return @@ -144,7 +144,7 @@ if(active) icon_state = initial(icon_state) + (primed?"_primed":"_active") - prime() + detonate() if(!stage || stage<2) return var/has_reagents = 0 diff --git a/code/game/objects/items/weapons/grenades/emgrenade.dm b/code/game/objects/items/weapons/grenades/emgrenade.dm index 8f4cd48e2c..26c68b0f20 100644 --- a/code/game/objects/items/weapons/grenades/emgrenade.dm +++ b/code/game/objects/items/weapons/grenades/emgrenade.dm @@ -8,11 +8,11 @@ var/emp_light = 7 var/emp_long = 10 - prime() - ..() - if(empulse(src, emp_heavy, emp_med, emp_light, emp_long)) - qdel(src) - return +/obj/item/weapon/grenade/empgrenade/detonate() + ..() + if(empulse(src, emp_heavy, emp_med, emp_light, emp_long)) + qdel(src) + return /obj/item/weapon/grenade/empgrenade/low_yield name = "low yield emp grenade" diff --git a/code/game/objects/items/weapons/grenades/explosive.dm b/code/game/objects/items/weapons/grenades/explosive.dm index 67e00dc0bc..3349b1841c 100644 --- a/code/game/objects/items/weapons/grenades/explosive.dm +++ b/code/game/objects/items/weapons/grenades/explosive.dm @@ -45,7 +45,7 @@ var/spread_range = 7 loadable = null -/obj/item/weapon/grenade/explosive/prime() +/obj/item/weapon/grenade/explosive/detonate() ..() var/turf/O = get_turf(src) diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index 188262e085..8f6ce1864f 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -6,7 +6,7 @@ var/max_range = 10 //The maximum range possible, including species effect mods. Cuts off at 7 for normal humans. Should be 3 higher than your intended target range for affecting normal humans. var/banglet = 0 -/obj/item/weapon/grenade/flashbang/prime() +/obj/item/weapon/grenade/flashbang/detonate() ..() for(var/obj/structure/closet/L in hear(max_range, get_turf(src))) if(locate(/mob/living/carbon/, L)) @@ -24,6 +24,7 @@ new/obj/effect/effect/sparks(src.loc) new/obj/effect/effect/smoke/illumination(src.loc, 5, range=30, power=30, color="#FFFFFF") + qdel(src) return @@ -93,35 +94,37 @@ else if(M.ear_damage >= 5) to_chat(M, "Your ears start to ring!") - M.update_icons() //Forces matrix transform to proc if they are now laying, I guess? - /obj/item/weapon/grenade/flashbang/Destroy() walk(src, 0) // Because we might have called walk_away, we must stop the walk loop or BYOND keeps an internal reference to us forever. return ..() + /obj/item/weapon/grenade/flashbang/clusterbang//Created by Polymorph, fixed by Sieve desc = "Use of this weapon may constiute a war crime in your area, consult your local Colony Director." name = "clusterbang" icon = 'icons/obj/grenade.dmi' icon_state = "clusterbang" + var/can_repeat = TRUE // Does this thing drop mini-clusterbangs? + var/min_banglets = 4 + var/max_banglets = 8 -/obj/item/weapon/grenade/flashbang/clusterbang/prime() - var/numspawned = rand(4,8) +/obj/item/weapon/grenade/flashbang/clusterbang/detonate() + var/numspawned = rand(min_banglets, max_banglets) var/again = 0 - for(var/more = numspawned,more > 0,more--) - if(prob(35)) - again++ - numspawned -- - for(,numspawned > 0, numspawned--) - spawn(0) - new /obj/item/weapon/grenade/flashbang/cluster(src.loc)//Launches flashbangs - playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3) + if(can_repeat) + for(var/more = numspawned, more > 0, more--) + if(prob(35)) + again++ + numspawned-- - for(,again > 0, again--) - spawn(0) - new /obj/item/weapon/grenade/flashbang/clusterbang/segment(src.loc)//Creates a 'segment' that launches a few more flashbangs - playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3) + for(var/do_spawn = numspawned, do_spawn > 0, do_spawn--) + new /obj/item/weapon/grenade/flashbang/cluster(src.loc)//Launches flashbangs + playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3) + + for(var/do_again = again, do_again > 0, do_again--) + new /obj/item/weapon/grenade/flashbang/clusterbang/segment(src.loc)//Creates a 'segment' that launches a few more flashbangs + playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3) qdel(src) return @@ -130,41 +133,34 @@ name = "clusterbang segment" icon = 'icons/obj/grenade.dmi' icon_state = "clusterbang_segment" + can_repeat = FALSE + banglet = TRUE /obj/item/weapon/grenade/flashbang/clusterbang/segment/New()//Segments should never exist except part of the clusterbang, since these immediately 'do their thing' and asplode + ..() + icon_state = "clusterbang_segment_active" - active = 1 - banglet = 1 + var/stepdist = rand(1,4)//How far to step var/temploc = src.loc//Saves the current location to know where to step away from walk_away(src,temploc,stepdist)//I must go, my people need me + var/dettime = rand(15,60) spawn(dettime) - prime() - ..() + detonate() -/obj/item/weapon/grenade/flashbang/clusterbang/segment/prime() - var/numspawned = rand(4,8) - for(var/more = numspawned,more > 0,more--) - if(prob(35)) - numspawned -- - - for(,numspawned > 0, numspawned--) - spawn(0) - new /obj/item/weapon/grenade/flashbang/cluster(src.loc) - playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3) - qdel(src) - return +/obj/item/weapon/grenade/flashbang/cluster + banglet = TRUE /obj/item/weapon/grenade/flashbang/cluster/New()//Same concept as the segments, so that all of the parts don't become reliant on the clusterbang - spawn(0) - icon_state = "flashbang_active" - active = 1 - banglet = 1 - var/stepdist = rand(1,3) - var/temploc = src.loc - walk_away(src,temploc,stepdist) - var/dettime = rand(15,60) - spawn(dettime) - prime() ..() + + icon_state = "flashbang_active" + + var/stepdist = rand(1,3) + var/temploc = src.loc + walk_away(src,temploc,stepdist) + + var/dettime = rand(15,60) + spawn(dettime) + detonate() \ No newline at end of file diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index 5854e02cac..af4194a6b5 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -13,6 +13,7 @@ var/active = 0 var/det_time = 50 var/loadable = 1 + var/arm_sound = 'sound/weapons/armbomb.ogg' /obj/item/weapon/grenade/proc/clown_check(var/mob/living/user) if((CLUMSY in user.mutations) && prob(50)) @@ -21,7 +22,7 @@ activate(user) add_fingerprint(user) spawn(5) - prime() + detonate() return 0 return 1 @@ -35,7 +36,7 @@ icon_state = initial(icon_state) + "_active" playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3) spawn(det_time) - prime() + detonate() return user.set_dir(get_dir(user, target)) user.drop_item() @@ -76,14 +77,14 @@ icon_state = initial(icon_state) + "_active" active = 1 - playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3) + playsound(loc, arm_sound, 75, 1, -3) spawn(det_time) - prime() + detonate() return -/obj/item/weapon/grenade/proc/prime() +/obj/item/weapon/grenade/proc/detonate() // playsound(loc, 'sound/items/Welder2.ogg', 25, 1) var/turf/T = get_turf(src) if(T) @@ -91,7 +92,7 @@ /obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(isscrewdriver(W)) + if(W.is_screwdriver()) switch(det_time) if (1) det_time = 10 diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm index 2c89be0ac7..28540b981f 100644 --- a/code/game/objects/items/weapons/grenades/smokebomb.dm +++ b/code/game/objects/items/weapons/grenades/smokebomb.dm @@ -20,7 +20,7 @@ smoke = null return ..() -/obj/item/weapon/grenade/smokebomb/prime() +/obj/item/weapon/grenade/smokebomb/detonate() playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) src.smoke.set_up(10, 0, usr.loc) spawn(0) diff --git a/code/game/objects/items/weapons/grenades/spawnergrenade.dm b/code/game/objects/items/weapons/grenades/spawnergrenade.dm index f9cbc65b59..923c11b214 100644 --- a/code/game/objects/items/weapons/grenades/spawnergrenade.dm +++ b/code/game/objects/items/weapons/grenades/spawnergrenade.dm @@ -9,8 +9,8 @@ var/spawner_type = null // must be an object path var/deliveryamt = 1 // amount of type to deliver -// Prime now just handles the two loops that query for people in lockers and people who can see it. -/obj/item/weapon/grenade/spawnergrenade/prime() +// Detonate now just handles the two loops that query for people in lockers and people who can see it. +/obj/item/weapon/grenade/spawnergrenade/detonate() if(spawner_type && deliveryamt) // Make a quick flash @@ -31,7 +31,7 @@ /obj/item/weapon/grenade/spawnergrenade/manhacks name = "manhack delivery grenade" - spawner_type = /mob/living/simple_animal/hostile/viscerator + spawner_type = /mob/living/simple_mob/mechanical/viscerator deliveryamt = 5 origin_tech = list(TECH_MATERIAL = 3, TECH_MAGNET = 4, TECH_ILLEGAL = 4) @@ -43,7 +43,7 @@ /obj/item/weapon/grenade/spawnergrenade/spider name = "spider delivery grenade" - spawner_type = /mob/living/simple_animal/hostile/giant_spider/hunter + spawner_type = /mob/living/simple_mob/animal/giant_spider/hunter deliveryamt = 3 origin_tech = list(TECH_MATERIAL = 3, TECH_MAGNET = 4, TECH_ILLEGAL = 4) diff --git a/code/game/objects/items/weapons/grenades/supermatter.dm b/code/game/objects/items/weapons/grenades/supermatter.dm new file mode 100644 index 0000000000..1bf35d1e1c --- /dev/null +++ b/code/game/objects/items/weapons/grenades/supermatter.dm @@ -0,0 +1,36 @@ +/obj/item/weapon/grenade/supermatter + name = "supermatter grenade" + icon_state = "banana" + item_state = "emergency_engi" + origin_tech = list(TECH_BLUESPACE = 5, TECH_MAGNET = 4, TECH_ENGINEERING = 5) + arm_sound = 'sound/effects/3.wav' + var/implode_at + +/obj/item/weapon/grenade/supermatter/Destroy() + if(implode_at) + processing_objects -= src + . = ..() + +/obj/item/weapon/grenade/supermatter/detonate() + ..() + processing_objects += src + implode_at = world.time + 10 SECONDS + update_icon() + playsound(src, 'sound/weapons/wave.ogg', 100) + +/obj/item/weapon/grenade/supermatter/update_icon() + overlays.Cut() + if(implode_at) + overlays += image(icon = 'icons/rust.dmi', icon_state = "emfield_s1") + +/obj/item/weapon/grenade/supermatter/process() + if(!isturf(loc)) + if(ismob(loc)) + var/mob/M = loc + M.drop_from_inventory(src) + forceMove(get_turf(src)) + playsound(src, 'sound/effects/supermatter.ogg', 100) + supermatter_pull(src, world.view, STAGE_THREE) + if(world.time > implode_at) + explosion(loc, 1, 3, 5, 4) + qdel(src) \ No newline at end of file diff --git a/code/game/objects/items/weapons/implants/implantcircuits.dm b/code/game/objects/items/weapons/implants/implantcircuits.dm index 7dd29055f3..2b87e8fae5 100644 --- a/code/game/objects/items/weapons/implants/implantcircuits.dm +++ b/code/game/objects/items/weapons/implants/implantcircuits.dm @@ -39,7 +39,7 @@ IC.examine(user) /obj/item/weapon/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user) - if(istype(O, /obj/item/weapon/crowbar) || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || istype(O, /obj/item/weapon/screwdriver) || istype(O, /obj/item/weapon/cell/device) ) + if(O.is_crowbar() || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.is_screwdriver() || istype(O, /obj/item/weapon/cell/device) ) IC.attackby(O, user) else ..() diff --git a/code/game/objects/items/weapons/improvised_components.dm b/code/game/objects/items/weapons/improvised_components.dm index 105a76473f..ded033a746 100644 --- a/code/game/objects/items/weapons/improvised_components.dm +++ b/code/game/objects/items/weapons/improvised_components.dm @@ -7,8 +7,8 @@ thrown_force_divisor = 0.1 /obj/item/weapon/material/butterflyconstruction/attackby(obj/item/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/screwdriver)) - user << "You finish the concealed blade weapon." + if(W.is_screwdriver()) + to_chat(user, "You finish the concealed blade weapon.") playsound(src, W.usesound, 50, 1) new /obj/item/weapon/material/butterfly(user.loc, material.name) qdel(src) @@ -33,7 +33,7 @@ /obj/item/weapon/material/butterflyhandle/attackby(obj/item/W as obj, mob/user as mob) if(istype(W,/obj/item/weapon/material/butterflyblade)) var/obj/item/weapon/material/butterflyblade/B = W - user << "You attach the two concealed blade parts." + to_chat(user, "You attach the two concealed blade parts.") new /obj/item/weapon/material/butterflyconstruction(user.loc, B.material.name) qdel(W) qdel(src) @@ -58,10 +58,10 @@ if(istype(I, /obj/item/weapon/material/shard) || istype(I, /obj/item/weapon/material/butterflyblade)) var/obj/item/weapon/material/tmp_shard = I finished = new /obj/item/weapon/material/twohanded/spear(get_turf(user), tmp_shard.material.name) - user << "You fasten \the [I] to the top of the rod with the cable." - else if(istype(I, /obj/item/weapon/wirecutters)) + to_chat(user, "You fasten \the [I] to the top of the rod with the cable.") + else if(I.is_wirecutter()) finished = new /obj/item/weapon/melee/baton/cattleprod(get_turf(user)) - user << "You fasten the wirecutters to the top of the rod with the cable, prongs outward." + to_chat(user, "You fasten the wirecutters to the top of the rod with the cable, prongs outward.") if(finished) user.drop_from_inventory(src) user.drop_from_inventory(I) diff --git a/code/game/objects/items/weapons/material/gravemarker.dm b/code/game/objects/items/weapons/material/gravemarker.dm index f50416b05d..aff9a9e5ce 100644 --- a/code/game/objects/items/weapons/material/gravemarker.dm +++ b/code/game/objects/items/weapons/material/gravemarker.dm @@ -12,7 +12,7 @@ var/epitaph = "" //A quick little blurb /obj/item/weapon/material/gravemarker/attackby(obj/item/weapon/W, mob/user as mob) - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) var/carving_1 = sanitizeSafe(input(user, "Who is \the [src.name] for?", "Gravestone Naming", null) as text, MAX_NAME_LEN) if(carving_1) user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].") @@ -27,7 +27,7 @@ user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].") epitaph += carving_2 update_icon() - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].") if(do_after(user, material.hardness * W.toolspeed)) material.place_dismantled_product(get_turf(src)) diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 51b1c50274..c7607d5aeb 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -43,11 +43,11 @@ icon_state = "utility" can_hold = list( ///obj/item/weapon/combitool, - /obj/item/weapon/crowbar, - /obj/item/weapon/screwdriver, + /obj/item/weapon/tool/crowbar, + /obj/item/weapon/tool/screwdriver, /obj/item/weapon/weldingtool, - /obj/item/weapon/wirecutters, - /obj/item/weapon/wrench, + /obj/item/weapon/tool/wirecutters, + /obj/item/weapon/tool/wrench, /obj/item/device/multitool, /obj/item/device/flashlight, /obj/item/weapon/cell/device, @@ -71,21 +71,21 @@ /obj/item/weapon/storage/belt/utility/full starts_with = list( - /obj/item/weapon/screwdriver, - /obj/item/weapon/wrench, + /obj/item/weapon/tool/screwdriver, + /obj/item/weapon/tool/wrench, /obj/item/weapon/weldingtool, - /obj/item/weapon/crowbar, - /obj/item/weapon/wirecutters, + /obj/item/weapon/tool/crowbar, + /obj/item/weapon/tool/wirecutters, /obj/item/stack/cable_coil/random_belt ) /obj/item/weapon/storage/belt/utility/atmostech starts_with = list( - /obj/item/weapon/screwdriver, - /obj/item/weapon/wrench, + /obj/item/weapon/tool/screwdriver, + /obj/item/weapon/tool/wrench, /obj/item/weapon/weldingtool, - /obj/item/weapon/crowbar, - /obj/item/weapon/wirecutters, + /obj/item/weapon/tool/crowbar, + /obj/item/weapon/tool/wirecutters, ) /obj/item/weapon/storage/belt/utility/chief @@ -96,8 +96,8 @@ /obj/item/weapon/storage/belt/utility/chief/full starts_with = list( - /obj/item/weapon/screwdriver/power, - /obj/item/weapon/crowbar/power, + /obj/item/weapon/tool/screwdriver/power, + /obj/item/weapon/tool/crowbar/power, /obj/item/weapon/weldingtool/experimental, /obj/item/device/multitool, /obj/item/stack/cable_coil/random_belt, @@ -130,7 +130,7 @@ /obj/item/clothing/gloves, /obj/item/weapon/reagent_containers/hypospray, /obj/item/clothing/glasses, - /obj/item/weapon/crowbar, + /obj/item/weapon/tool/crowbar, /obj/item/device/flashlight, /obj/item/weapon/cell/device, /obj/item/weapon/extinguisher/mini, @@ -241,11 +241,11 @@ /obj/item/weapon/storage/belt/utility/alien/full starts_with = list( - /obj/item/weapon/screwdriver/alien, - /obj/item/weapon/wrench/alien, + /obj/item/weapon/tool/screwdriver/alien, + /obj/item/weapon/tool/wrench/alien, /obj/item/weapon/weldingtool/alien, - /obj/item/weapon/crowbar/alien, - /obj/item/weapon/wirecutters/alien, + /obj/item/weapon/tool/crowbar/alien, + /obj/item/weapon/tool/wirecutters/alien, /obj/item/device/multitool/alien, /obj/item/stack/cable_coil/alien ) @@ -278,7 +278,7 @@ /obj/item/clothing/gloves, /obj/item/weapon/reagent_containers/hypospray, /obj/item/clothing/glasses, - /obj/item/weapon/crowbar, + /obj/item/weapon/tool/crowbar, /obj/item/device/flashlight, /obj/item/weapon/cell/device, /obj/item/weapon/extinguisher/mini, @@ -368,7 +368,7 @@ /obj/item/weapon/clipboard, /obj/item/weapon/anodevice, /obj/item/clothing/glasses, - /obj/item/weapon/wrench, + /obj/item/weapon/tool/wrench, /obj/item/weapon/storage/excavation, /obj/item/weapon/anobattery, /obj/item/device/ano_scanner, diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 78a2d940ad..081dcdcb2d 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -41,13 +41,13 @@ playsound(src.loc, "sparks", 50, 1) return - if (istype(W, /obj/item/weapon/screwdriver)) + if (W.is_screwdriver()) if (do_after(user, 20 * W.toolspeed)) src.open =! src.open playsound(src, W.usesound, 50, 1) user.show_message(text("You [] the service panel.", (src.open ? "open" : "close"))) return - if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking)) + if (istype(W, /obj/item/device/multitool) && (src.open == 1)&& (!src.l_hacking)) user.show_message("Now attempting to reset internal memory, please hold.", 1) src.l_hacking = 1 if (do_after(usr, 100)) @@ -135,7 +135,7 @@ src.overlays = null overlays += image('icons/obj/storage.dmi', icon_locking) locked = 0 - user << (feedback ? feedback : "You short out the lock of \the [src].") + to_chat(user, (feedback ? feedback : "You short out the lock of \the [src].")) return 1 // ----------------------------- @@ -156,7 +156,7 @@ attack_hand(mob/user as mob) if ((src.loc == user) && (src.locked == 1)) - usr << "[src] is locked and cannot be opened!" + to_chat(user, "[src] is locked and cannot be opened!") else if ((src.loc == user) && (!src.locked)) src.open(usr) else diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index c4174eb4c0..7989c53f1d 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -20,7 +20,7 @@ icon_state = "red" item_state_slots = list(slot_r_hand_str = "toolbox_red", slot_l_hand_str = "toolbox_red") starts_with = list( - /obj/item/weapon/crowbar/red, + /obj/item/weapon/tool/crowbar/red, /obj/item/weapon/extinguisher/mini, /obj/item/device/radio ) @@ -36,12 +36,12 @@ icon_state = "blue" item_state_slots = list(slot_r_hand_str = "toolbox_blue", slot_l_hand_str = "toolbox_blue") starts_with = list( - /obj/item/weapon/screwdriver, - /obj/item/weapon/wrench, + /obj/item/weapon/tool/screwdriver, + /obj/item/weapon/tool/wrench, /obj/item/weapon/weldingtool, - /obj/item/weapon/crowbar, + /obj/item/weapon/tool/crowbar, /obj/item/device/analyzer, - /obj/item/weapon/wirecutters + /obj/item/weapon/tool/wirecutters ) /obj/item/weapon/storage/toolbox/electrical @@ -49,10 +49,10 @@ icon_state = "yellow" item_state_slots = list(slot_r_hand_str = "toolbox_yellow", slot_l_hand_str = "toolbox_yellow") starts_with = list( - /obj/item/weapon/screwdriver, - /obj/item/weapon/wirecutters, + /obj/item/weapon/tool/screwdriver, + /obj/item/weapon/tool/wirecutters, /obj/item/device/t_scanner, - /obj/item/weapon/crowbar, + /obj/item/weapon/tool/crowbar, /obj/item/stack/cable_coil/random_belt, /obj/item/stack/cable_coil/random_belt ) @@ -72,20 +72,20 @@ force = 14 starts_with = list( /obj/item/clothing/gloves/yellow, - /obj/item/weapon/screwdriver, - /obj/item/weapon/wrench, + /obj/item/weapon/tool/screwdriver, + /obj/item/weapon/tool/wrench, /obj/item/weapon/weldingtool, - /obj/item/weapon/crowbar, - /obj/item/weapon/wirecutters, + /obj/item/weapon/tool/crowbar, + /obj/item/weapon/tool/wirecutters, /obj/item/device/multitool ) /obj/item/weapon/storage/toolbox/syndicate/powertools starts_with = list( /obj/item/clothing/gloves/yellow, - /obj/item/weapon/screwdriver/power, + /obj/item/weapon/tool/screwdriver/power, /obj/item/weapon/weldingtool/experimental, - /obj/item/weapon/crowbar/power, + /obj/item/weapon/tool/crowbar/power, /obj/item/device/multitool, /obj/item/stack/cable_coil/random_belt, /obj/item/device/analyzer diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index 937663c65c..c66da84712 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -223,19 +223,19 @@ /obj/item/weapon/storage/box/syndie_kit/demolitions starts_with = list( /obj/item/weapon/syndie/c4explosive, - /obj/item/weapon/screwdriver + /obj/item/weapon/tool/screwdriver ) /obj/item/weapon/storage/box/syndie_kit/demolitions_heavy starts_with = list( /obj/item/weapon/syndie/c4explosive/heavy, - /obj/item/weapon/screwdriver + /obj/item/weapon/tool/screwdriver ) /obj/item/weapon/storage/box/syndie_kit/demolitions_super_heavy starts_with = list( /obj/item/weapon/syndie/c4explosive/heavy/super_heavy, - /obj/item/weapon/screwdriver + /obj/item/weapon/tool/screwdriver ) /obj/item/weapon/storage/secure/briefcase/rifle @@ -253,8 +253,8 @@ description_fluff = "The container, upon opening, looks to have a few oddly shaped indentations in its packing." description_antag = "This case will likely contain a charged fuel rod gun, and a few fuel rods to go with it. It can only hold the fuel rod gun, fuel rods, batteries, a screwdriver, and stock machine parts." force = 12 //Anti-rad lined i.e. Lead, probably gonna hurt a bit if you get bashed with it. - can_hold = list(/obj/item/weapon/gun/magnetic/fuelrod, /obj/item/weapon/fuel_assembly, /obj/item/weapon/cell, /obj/item/weapon/stock_parts, /obj/item/weapon/screwdriver) - cant_hold = list(/obj/item/weapon/screwdriver/power) + can_hold = list(/obj/item/weapon/gun/magnetic/fuelrod, /obj/item/weapon/fuel_assembly, /obj/item/weapon/cell, /obj/item/weapon/stock_parts, /obj/item/weapon/tool/screwdriver) + cant_hold = list(/obj/item/weapon/tool/screwdriver/power) starts_with = list( /obj/item/weapon/gun/magnetic/fuelrod, /obj/item/weapon/fuel_assembly/deuterium, @@ -262,5 +262,5 @@ /obj/item/weapon/fuel_assembly/tritium, /obj/item/weapon/fuel_assembly/tritium, /obj/item/weapon/fuel_assembly/phoron, - /obj/item/weapon/screwdriver + /obj/item/weapon/tool/screwdriver ) diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm index 60a253c87c..ce1227014c 100644 --- a/code/game/objects/items/weapons/storage/wallets.dm +++ b/code/game/objects/items/weapons/storage/wallets.dm @@ -32,12 +32,12 @@ /obj/item/weapon/photo, /obj/item/weapon/reagent_containers/dropper, /obj/item/weapon/sample, - /obj/item/weapon/screwdriver, + /obj/item/weapon/tool/screwdriver, /obj/item/weapon/stamp, /obj/item/clothing/accessory/permit, /obj/item/clothing/accessory/badge ) - cant_hold = list(/obj/item/weapon/screwdriver/power) + cant_hold = list(/obj/item/weapon/tool/screwdriver/power) slot_flags = SLOT_ID var/obj/item/weapon/card/id/front_id = null diff --git a/code/game/objects/items/weapons/syndie.dm b/code/game/objects/items/weapons/syndie.dm index c47489272b..ee528cb6f8 100644 --- a/code/game/objects/items/weapons/syndie.dm +++ b/code/game/objects/items/weapons/syndie.dm @@ -91,7 +91,7 @@ else if(lit && detonator_mode) switch(alert(user, "What would you like to do?", "Lighter", "Press the button.", "Close the lighter.")) if("Press the button.") - user << "You press the button." + to_chat(user, "You press the button.") icon_state = "[base_state]click" if(src.bomb) src.bomb.detonate() @@ -106,7 +106,7 @@ /obj/item/weapon/flame/lighter/zippo/c4detonator/attackby(obj/item/weapon/W, mob/user as mob) - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) detonator_mode = !detonator_mode playsound(src, W.usesound, 50, 1) - user << "You unscrew the top panel of \the [src] revealing a button." + to_chat(user, "You unscrew the top panel of \the [src] revealing a button.") diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 49608c649a..07979777e7 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -130,7 +130,7 @@ var/list/global/tank_gauge_cache = list() to_chat(user, "You attach the wires to the tank.") src.add_bomb_overlay() - if(istype(W, /obj/item/weapon/wirecutters)) + if(W.is_wirecutter()) if(wired && src.proxyassembly.assembly) to_chat(user, "You carefully begin clipping the wires that attach to the tank.") diff --git a/code/game/objects/items/weapons/tools/combitool.dm b/code/game/objects/items/weapons/tools/combitool.dm new file mode 100644 index 0000000000..96b64d18f7 --- /dev/null +++ b/code/game/objects/items/weapons/tools/combitool.dm @@ -0,0 +1,63 @@ +// File is unticked because this is entirely untested old code + + +/* + * Combitool + */ +/obj/item/weapon/combitool + name = "combi-tool" + desc = "It even has one of those nubbins for doing the thingy." + icon = 'icons/obj/items.dmi' + icon_state = "combitool" + w_class = ITEMSIZE_SMALL + + var/list/spawn_tools = list( + /obj/item/weapon/tool/screwdriver, + /obj/item/weapon/tool/wrench, + /obj/item/weapon/tool/wirecutters, + /obj/item/weapon/material/knife, + /obj/item/weapon/material/kitchen/utensil/fork, + /obj/item/weapon/material/knife/machete/hatchet + ) + var/list/tools = list() + var/current_tool = 1 + +/obj/item/weapon/combitool/examine() + ..() + if(loc == usr && tools.len) + to_chat(usr, "It has the following fittings:") + for(var/obj/item/tool in tools) + to_chat(usr, "\icon[tool] - [tool.name][tools[current_tool]==tool?" (selected)":""]") + +/obj/item/weapon/combitool/New() + ..() + for(var/type in spawn_tools) + tools |= new type(src) + +/obj/item/weapon/combitool/attack_self(mob/user as mob) + if(++current_tool > tools.len) current_tool = 1 + var/obj/item/tool = tools[current_tool] + if(!tool) + to_chat(user, "You can't seem to find any fittings in \the [src].") + else + to_chat(user, "You switch \the [src] to the [tool.name] fitting.") + return 1 + +/obj/item/weapon/combitool/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) + if(!M.Adjacent(user)) + return 0 + var/obj/item/tool = tools[current_tool] + if(!tool) return 0 + return (tool ? tool.attack(M,user) : 0) + +/obj/item/weapon/combitool/afterattack(var/atom/target, var/mob/living/user, proximity, params) + if(!proximity) + return 0 + var/obj/item/tool = tools[current_tool] + if(!tool) return 0 + tool.loc = user + var/resolved = target.attackby(tool,user) + if(!resolved && tool && target) + tool.afterattack(target,user,1) + if(tool) + tool.loc = src diff --git a/code/game/objects/items/weapons/tools/crowbar.dm b/code/game/objects/items/weapons/tools/crowbar.dm new file mode 100644 index 0000000000..5eb2668b2f --- /dev/null +++ b/code/game/objects/items/weapons/tools/crowbar.dm @@ -0,0 +1,77 @@ +/* + * Crowbar + */ + +/obj/item/weapon/tool/crowbar + name = "crowbar" + desc = "Used to remove floors and to pry open doors." + icon = 'icons/obj/tools.dmi' + icon_state = "crowbar" + flags = CONDUCT + slot_flags = SLOT_BELT + force = 6 + throwforce = 7 + pry = 1 + item_state = "crowbar" + w_class = ITEMSIZE_SMALL + origin_tech = list(TECH_ENGINEERING = 1) + matter = list(DEFAULT_WALL_MATERIAL = 50) + attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked") + usesound = 'sound/items/crowbar.ogg' + toolspeed = 1 + +/obj/item/weapon/tool/crowbar/is_crowbar() + return TRUE + +/obj/item/weapon/tool/crowbar/red + icon = 'icons/obj/tools.dmi' + icon_state = "red_crowbar" + item_state = "crowbar_red" + +/obj/item/weapon/tool/crowbar/alien + name = "alien crowbar" + desc = "A hard-light crowbar. It appears to pry by itself, without any effort required." + icon = 'icons/obj/abductor.dmi' + usesound = 'sound/weapons/sonic_jackhammer.ogg' + icon_state = "crowbar" + toolspeed = 0.1 + origin_tech = list(TECH_COMBAT = 4, TECH_ENGINEERING = 4) + +/obj/item/weapon/tool/crowbar/cyborg + name = "hydraulic crowbar" + desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbars in industrial synthetics." + usesound = 'sound/items/jaws_pry.ogg' + force = 10 + toolspeed = 0.5 + +/obj/item/weapon/tool/crowbar/power + name = "jaws of life" + desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a prying head." + icon_state = "jaws_pry" + item_state = "jawsoflife" + matter = list(MAT_METAL=150, MAT_SILVER=50) + origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) + usesound = 'sound/items/jaws_pry.ogg' + force = 15 + toolspeed = 0.25 + var/obj/item/weapon/tool/wirecutters/power/counterpart = null + +/obj/item/weapon/tool/crowbar/power/New(newloc, no_counterpart = TRUE) + ..(newloc) + if(!counterpart && no_counterpart) + counterpart = new(src, FALSE) + counterpart.counterpart = src + +/obj/item/weapon/tool/crowbar/power/Destroy() + if(counterpart) + counterpart.counterpart = null // So it can qdel cleanly. + qdel_null(counterpart) + return ..() + +/obj/item/weapon/tool/crowbar/power/attack_self(mob/user) + playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) + user.drop_item(src) + counterpart.forceMove(get_turf(src)) + src.forceMove(counterpart) + user.put_in_active_hand(counterpart) + to_chat(user, "You attach the cutting jaws to [src].") \ No newline at end of file diff --git a/code/game/objects/items/weapons/tools/screwdriver.dm b/code/game/objects/items/weapons/tools/screwdriver.dm new file mode 100644 index 0000000000..6c0a1561a3 --- /dev/null +++ b/code/game/objects/items/weapons/tools/screwdriver.dm @@ -0,0 +1,125 @@ +/* + * Screwdriver + */ +/obj/item/weapon/tool/screwdriver + name = "screwdriver" + desc = "You can be totally screwwy with this." + icon = 'icons/obj/tools.dmi' + icon_state = "screwdriver" + flags = CONDUCT + slot_flags = SLOT_BELT | SLOT_EARS + force = 6 + w_class = ITEMSIZE_TINY + throwforce = 5 + throw_speed = 3 + throw_range = 5 + hitsound = 'sound/weapons/bladeslice.ogg' + usesound = 'sound/items/screwdriver.ogg' + matter = list(DEFAULT_WALL_MATERIAL = 75) + attack_verb = list("stabbed") + sharp = 1 + toolspeed = 1 + var/random_color = TRUE + +/obj/item/weapon/tool/screwdriver/suicide_act(mob/user) + var/datum/gender/TU = gender_datums[user.get_visible_gender()] + viewers(user) << pick("\The [user] is stabbing the [src.name] into [TU.his] temple! It looks like [TU.hes] trying to commit suicide.", \ + "\The [user] is stabbing the [src.name] into [TU.his] heart! It looks like [TU.hes] trying to commit suicide.") + return(BRUTELOSS) + +/obj/item/weapon/tool/screwdriver/New() + if(random_color) + switch(pick("red","blue","purple","brown","green","cyan","yellow")) + if ("red") + icon_state = "screwdriver2" + item_state = "screwdriver" + if ("blue") + icon_state = "screwdriver" + item_state = "screwdriver_blue" + if ("purple") + icon_state = "screwdriver3" + item_state = "screwdriver_purple" + if ("brown") + icon_state = "screwdriver4" + item_state = "screwdriver_brown" + if ("green") + icon_state = "screwdriver5" + item_state = "screwdriver_green" + if ("cyan") + icon_state = "screwdriver6" + item_state = "screwdriver_cyan" + if ("yellow") + icon_state = "screwdriver7" + item_state = "screwdriver_yellow" + + if (prob(75)) + src.pixel_y = rand(0, 16) + ..() + +/obj/item/weapon/tool/screwdriver/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) + if(!istype(M) || user.a_intent == "help") + return ..() + if(user.zone_sel.selecting != O_EYES && user.zone_sel.selecting != BP_HEAD) + return ..() + if((CLUMSY in user.mutations) && prob(50)) + M = user + return eyestab(M,user) + +/obj/item/weapon/tool/screwdriver/is_screwdriver() + return TRUE + +/obj/item/weapon/tool/screwdriver/alien + name = "alien screwdriver" + desc = "An ultrasonic screwdriver." + icon = 'icons/obj/abductor.dmi' + icon_state = "screwdriver_a" + item_state = "screwdriver_black" + usesound = 'sound/items/pshoom.ogg' + toolspeed = 0.1 + random_color = FALSE + +/obj/item/weapon/tool/screwdriver/cyborg + name = "powered screwdriver" + desc = "An electrical screwdriver, designed to be both precise and quick." + usesound = 'sound/items/drill_use.ogg' + toolspeed = 0.5 + +/obj/item/weapon/tool/screwdriver/power + name = "hand drill" + desc = "A simple powered hand drill. It's fitted with a screw bit." + icon_state = "drill_screw" + item_state = "drill" + matter = list(DEFAULT_WALL_MATERIAL = 150, MAT_SILVER = 50) + origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) + slot_flags = SLOT_BELT + force = 8 + w_class = ITEMSIZE_SMALL + throwforce = 8 + throw_speed = 2 + throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far + attack_verb = list("drilled", "screwed", "jabbed", "whacked") + hitsound = 'sound/items/drill_hit.ogg' + usesound = 'sound/items/drill_use.ogg' + toolspeed = 0.25 + random_color = FALSE + var/obj/item/weapon/tool/wrench/power/counterpart = null + +/obj/item/weapon/tool/screwdriver/power/New(newloc, no_counterpart = TRUE) + ..(newloc) + if(!counterpart && no_counterpart) + counterpart = new(src, FALSE) + counterpart.counterpart = src + +/obj/item/weapon/tool/screwdriver/power/Destroy() + if(counterpart) + counterpart.counterpart = null // So it can qdel cleanly. + qdel_null(counterpart) + return ..() + +/obj/item/weapon/tool/screwdriver/power/attack_self(mob/user) + playsound(get_turf(user),'sound/items/change_drill.ogg',50,1) + user.drop_item(src) + counterpart.forceMove(get_turf(src)) + src.forceMove(counterpart) + user.put_in_active_hand(counterpart) + to_chat(user, "You attach the bolt driver bit to [src].") \ No newline at end of file diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools/weldingtool.dm similarity index 56% rename from code/game/objects/items/weapons/tools.dm rename to code/game/objects/items/weapons/tools/weldingtool.dm index 0ee916a162..6a6c28ff82 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools/weldingtool.dm @@ -1,1042 +1,612 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 - -#define WELDER_FUEL_BURN_INTERVAL 13 - -/* Tools! - * Note: Multitools are /obj/item/device - * - * Contains: - * Wrench - * Screwdriver - * Wirecutters - * Welding Tool - * Crowbar - */ - -/* - * Wrench - */ -/obj/item/weapon/wrench - name = "wrench" - desc = "A wrench with many common uses. Can be usually found in your hand." - icon = 'icons/obj/tools.dmi' - icon_state = "wrench" - flags = CONDUCT - slot_flags = SLOT_BELT - force = 6 - throwforce = 7 - w_class = ITEMSIZE_SMALL - origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) - matter = list(DEFAULT_WALL_MATERIAL = 150) - attack_verb = list("bashed", "battered", "bludgeoned", "whacked") - usesound = 'sound/items/ratchet.ogg' - toolspeed = 1 - -/obj/item/weapon/wrench/cyborg - name = "automatic wrench" - desc = "An advanced robotic wrench. Can be found in industrial synthetic shells." - usesound = 'sound/items/drill_use.ogg' - toolspeed = 0.5 - -/obj/item/weapon/wrench/alien - name = "alien wrench" - desc = "A polarized wrench. It causes anything placed between the jaws to turn." - icon = 'icons/obj/abductor.dmi' - icon_state = "wrench" - usesound = 'sound/effects/empulse.ogg' - toolspeed = 0.1 - origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 5) - -/obj/item/weapon/wrench/power - name = "hand drill" - desc = "A simple powered hand drill. It's fitted with a bolt bit." - icon_state = "drill_bolt" - item_state = "drill" - usesound = 'sound/items/drill_use.ogg' - matter = list(DEFAULT_WALL_MATERIAL = 150, MAT_SILVER = 50) - origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) - force = 8 - w_class = ITEMSIZE_SMALL - throwforce = 8 - attack_verb = list("drilled", "screwed", "jabbed") - toolspeed = 0.25 - var/obj/item/weapon/screwdriver/power/counterpart = null - -/obj/item/weapon/wrench/power/New(newloc, no_counterpart = TRUE) - ..(newloc) - if(!counterpart && no_counterpart) - counterpart = new(src, FALSE) - counterpart.counterpart = src - -/obj/item/weapon/wrench/power/Destroy() - if(counterpart) - counterpart.counterpart = null // So it can qdel cleanly. - qdel_null(counterpart) - return ..() - -/obj/item/weapon/wrench/power/attack_self(mob/user) - playsound(get_turf(user),'sound/items/change_drill.ogg',50,1) - user.drop_item(src) - counterpart.forceMove(get_turf(src)) - src.forceMove(counterpart) - user.put_in_active_hand(counterpart) - to_chat(user, "You attach the screw driver bit to [src].") - -/* - * Screwdriver - */ -/obj/item/weapon/screwdriver - name = "screwdriver" - desc = "You can be totally screwwy with this." - icon = 'icons/obj/tools.dmi' - icon_state = "screwdriver" - flags = CONDUCT - slot_flags = SLOT_BELT | SLOT_EARS - force = 6 - w_class = ITEMSIZE_TINY - throwforce = 5 - throw_speed = 3 - throw_range = 5 - hitsound = 'sound/weapons/bladeslice.ogg' - usesound = 'sound/items/screwdriver.ogg' - matter = list(DEFAULT_WALL_MATERIAL = 75) - attack_verb = list("stabbed") - sharp = 1 - toolspeed = 1 - var/random_color = TRUE - - suicide_act(mob/user) - var/datum/gender/TU = gender_datums[user.get_visible_gender()] - viewers(user) << pick("\The [user] is stabbing the [src.name] into [TU.his] temple! It looks like [TU.hes] trying to commit suicide.", \ - "\The [user] is stabbing the [src.name] into [TU.his] heart! It looks like [TU.hes] trying to commit suicide.") - return(BRUTELOSS) - -/obj/item/weapon/screwdriver/New() - if(random_color) - switch(pick("red","blue","purple","brown","green","cyan","yellow")) - if ("red") - icon_state = "screwdriver2" - item_state = "screwdriver" - if ("blue") - icon_state = "screwdriver" - item_state = "screwdriver_blue" - if ("purple") - icon_state = "screwdriver3" - item_state = "screwdriver_purple" - if ("brown") - icon_state = "screwdriver4" - item_state = "screwdriver_brown" - if ("green") - icon_state = "screwdriver5" - item_state = "screwdriver_green" - if ("cyan") - icon_state = "screwdriver6" - item_state = "screwdriver_cyan" - if ("yellow") - icon_state = "screwdriver7" - item_state = "screwdriver_yellow" - - if (prob(75)) - src.pixel_y = rand(0, 16) - ..() - -/obj/item/weapon/screwdriver/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - if(!istype(M) || user.a_intent == "help") - return ..() - if(user.zone_sel.selecting != O_EYES && user.zone_sel.selecting != BP_HEAD) - return ..() - if((CLUMSY in user.mutations) && prob(50)) - M = user - return eyestab(M,user) - -/obj/item/weapon/screwdriver/alien - name = "alien screwdriver" - desc = "An ultrasonic screwdriver." - icon = 'icons/obj/abductor.dmi' - icon_state = "screwdriver_a" - item_state = "screwdriver_black" - usesound = 'sound/items/pshoom.ogg' - toolspeed = 0.1 - random_color = FALSE - -/obj/item/weapon/screwdriver/cyborg - name = "powered screwdriver" - desc = "An electrical screwdriver, designed to be both precise and quick." - usesound = 'sound/items/drill_use.ogg' - toolspeed = 0.5 - -/obj/item/weapon/screwdriver/power - name = "hand drill" - desc = "A simple powered hand drill. It's fitted with a screw bit." - icon_state = "drill_screw" - item_state = "drill" - matter = list(DEFAULT_WALL_MATERIAL = 150, MAT_SILVER = 50) - origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) - slot_flags = SLOT_BELT - force = 8 - w_class = ITEMSIZE_SMALL - throwforce = 8 - throw_speed = 2 - throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far - attack_verb = list("drilled", "screwed", "jabbed", "whacked") - hitsound = 'sound/items/drill_hit.ogg' - usesound = 'sound/items/drill_use.ogg' - toolspeed = 0.25 - random_color = FALSE - var/obj/item/weapon/wrench/power/counterpart = null - -/obj/item/weapon/screwdriver/power/New(newloc, no_counterpart = TRUE) - ..(newloc) - if(!counterpart && no_counterpart) - counterpart = new(src, FALSE) - counterpart.counterpart = src - -/obj/item/weapon/screwdriver/power/Destroy() - if(counterpart) - counterpart.counterpart = null // So it can qdel cleanly. - qdel_null(counterpart) - return ..() - -/obj/item/weapon/screwdriver/power/attack_self(mob/user) - playsound(get_turf(user),'sound/items/change_drill.ogg',50,1) - user.drop_item(src) - counterpart.forceMove(get_turf(src)) - src.forceMove(counterpart) - user.put_in_active_hand(counterpart) - to_chat(user, "You attach the bolt driver bit to [src].") - -/* - * Wirecutters - */ -/obj/item/weapon/wirecutters - name = "wirecutters" - desc = "This cuts wires." - icon = 'icons/obj/tools.dmi' - icon_state = "cutters" - flags = CONDUCT - slot_flags = SLOT_BELT - force = 6 - throw_speed = 2 - throw_range = 9 - w_class = ITEMSIZE_SMALL - origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) - matter = list(DEFAULT_WALL_MATERIAL = 80) - attack_verb = list("pinched", "nipped") - hitsound = 'sound/items/wirecutter.ogg' - usesound = 'sound/items/wirecutter.ogg' - sharp = 1 - edge = 1 - toolspeed = 1 - var/random_color = TRUE - -/obj/item/weapon/wirecutters/New() - if(random_color && prob(50)) - icon_state = "cutters-y" - item_state = "cutters_yellow" - ..() - -/obj/item/weapon/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob) - if(istype(C) && user.a_intent == I_HELP && (C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/handcuffs/cable))) - usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\ - "You cut \the [C]'s restraints with \the [src]!",\ - "You hear cable being cut.") - C.handcuffed = null - if(C.buckled && C.buckled.buckle_require_restraints) - C.buckled.unbuckle_mob() - C.update_inv_handcuffed() - return - else - ..() - -/obj/item/weapon/wirecutters/alien - name = "alien wirecutters" - desc = "Extremely sharp wirecutters, made out of a silvery-green metal." - icon = 'icons/obj/abductor.dmi' - icon_state = "cutters" - toolspeed = 0.1 - origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 4) - random_color = FALSE - -/obj/item/weapon/wirecutters/cyborg - name = "wirecutters" - desc = "This cuts wires. With science." - usesound = 'sound/items/jaws_cut.ogg' - toolspeed = 0.5 - -/obj/item/weapon/wirecutters/power - name = "jaws of life" - desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head." - icon_state = "jaws_cutter" - item_state = "jawsoflife" - origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) - matter = list(MAT_METAL=150, MAT_SILVER=50) - usesound = 'sound/items/jaws_cut.ogg' - force = 15 - toolspeed = 0.25 - random_color = FALSE - var/obj/item/weapon/crowbar/power/counterpart = null - -/obj/item/weapon/wirecutters/power/New(newloc, no_counterpart = TRUE) - ..(newloc) - if(!counterpart && no_counterpart) - counterpart = new(src, FALSE) - counterpart.counterpart = src - -/obj/item/weapon/wirecutters/power/Destroy() - if(counterpart) - counterpart.counterpart = null // So it can qdel cleanly. - qdel_null(counterpart) - return ..() - -/obj/item/weapon/wirecutters/power/attack_self(mob/user) - playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) - user.drop_item(src) - counterpart.forceMove(get_turf(src)) - src.forceMove(counterpart) - user.put_in_active_hand(counterpart) - to_chat(user, "You attach the pry jaws to [src].") - -/* - * Welding Tool - */ -/obj/item/weapon/weldingtool - name = "welding tool" - icon = 'icons/obj/tools.dmi' - icon_state = "welder" - item_state = "welder" - flags = CONDUCT - slot_flags = SLOT_BELT - - //Amount of OUCH when it's thrown - force = 3.0 - throwforce = 5.0 - throw_speed = 1 - throw_range = 5 - w_class = ITEMSIZE_SMALL - - //Cost to make in the autolathe - matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 30) - - //R&D tech level - origin_tech = list(TECH_ENGINEERING = 1) - - //Welding tool specific stuff - var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2) - var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower) - var/max_fuel = 20 //The max amount of fuel the welder can hold - - var/acti_sound = 'sound/items/welderactivate.ogg' - var/deac_sound = 'sound/items/welderdeactivate.ogg' - usesound = 'sound/items/Welder2.ogg' - var/change_icons = TRUE - var/flame_intensity = 2 //how powerful the emitted light is when used. - var/flame_color = "#FF9933" // What color the welder light emits when its on. Default is an orange-ish color. - var/eye_safety_modifier = 0 // Increasing this will make less eye protection needed to stop eye damage. IE at 1, sunglasses will fully protect. - var/burned_fuel_for = 0 // Keeps track of how long the welder's been on, used to gradually empty the welder if left one, without RNG. - var/always_process = FALSE // If true, keeps the welder on the process list even if it's off. Used for when it needs to regenerate fuel. - toolspeed = 1 - -/obj/item/weapon/weldingtool/New() -// var/random_fuel = min(rand(10,20),max_fuel) - var/datum/reagents/R = new/datum/reagents(max_fuel) - reagents = R - R.my_atom = src - R.add_reagent("fuel", max_fuel) - update_icon() - if(always_process) - processing_objects |= src - ..() - -/obj/item/weapon/weldingtool/Destroy() - if(welding || always_process) - processing_objects -= src - return ..() - -/obj/item/weapon/weldingtool/examine(mob/user) - if(..(user, 0)) - if(max_fuel) - to_chat(user, text("\icon[] The [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )) - - -/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/living/user as mob) - if(istype(W,/obj/item/weapon/screwdriver)) - if(welding) - to_chat(user, "Stop welding first!") - return - status = !status - if(status) - to_chat(user, "You secure the welder.") - else - to_chat(user, "The welder can now be attached and modified.") - src.add_fingerprint(user) - return - - if((!status) && (istype(W,/obj/item/stack/rods))) - var/obj/item/stack/rods/R = W - R.use(1) - var/obj/item/weapon/flamethrower/F = new/obj/item/weapon/flamethrower(user.loc) - src.loc = F - F.weldtool = src - if (user.client) - user.client.screen -= src - if (user.r_hand == src) - user.remove_from_mob(src) - else - user.remove_from_mob(src) - src.master = F - src.layer = initial(src.layer) - user.remove_from_mob(src) - if (user.client) - user.client.screen -= src - src.loc = F - src.add_fingerprint(user) - return - - ..() - return - - -/obj/item/weapon/weldingtool/process() - if(welding) - ++burned_fuel_for - if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL) - remove_fuel(1) - - - - if(get_fuel() < 1) - setWelding(0) - - //I'm not sure what this does. I assume it has to do with starting fires... - //...but it doesnt check to see if the welder is on or not. - var/turf/location = src.loc - if(istype(location, /mob/living)) - var/mob/living/M = location - if(M.item_is_in_hands(src)) - location = get_turf(M) - if (istype(location, /turf)) - location.hotspot_expose(700, 5) - - -/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity) - if(!proximity) return - if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1) - if(!welding && max_fuel) - O.reagents.trans_to_obj(src, max_fuel) - to_chat(user, "Welder refueled") - playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6) - return - else if(!welding) - to_chat(user, "[src] doesn't use fuel.") - return - else - message_admins("[key_name_admin(user)] triggered a fueltank explosion with a welding tool.") - log_game("[key_name(user)] triggered a fueltank explosion with a welding tool.") - to_chat(user, "You begin welding on the fueltank and with a moment of lucidity you realize, this might not have been the smartest thing you've ever done.") - var/obj/structure/reagent_dispensers/fueltank/tank = O - tank.explode() - return - if (src.welding) - remove_fuel(1) - var/turf/location = get_turf(user) - if(isliving(O)) - var/mob/living/L = O - L.IgniteMob() - if (istype(location, /turf)) - location.hotspot_expose(700, 50, 1) - return - - -/obj/item/weapon/weldingtool/attack_self(mob/user as mob) - setWelding(!welding, usr) - return - -//Returns the amount of fuel in the welder -/obj/item/weapon/weldingtool/proc/get_fuel() - return reagents.get_reagent_amount("fuel") - -/obj/item/weapon/weldingtool/proc/get_max_fuel() - return max_fuel - -//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use() -/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null) - if(!welding) - return 0 - if(amount) - burned_fuel_for = 0 // Reset the counter since we're removing fuel. - if(get_fuel() >= amount) - reagents.remove_reagent("fuel", amount) - if(M) - eyecheck(M) - update_icon() - return 1 - else - if(M) - to_chat(M, "You need more welding fuel to complete this task.") - update_icon() - return 0 - -//Returns whether or not the welding tool is currently on. -/obj/item/weapon/weldingtool/proc/isOn() - return src.welding - -/obj/item/weapon/weldingtool/update_icon() - ..() - overlays.Cut() - // Welding overlay. - if(welding) - var/image/I = image(icon, src, "[icon_state]-on") - overlays.Add(I) - item_state = "[initial(item_state)]1" - else - item_state = initial(item_state) - - // Fuel counter overlay. - if(change_icons && get_max_fuel()) - var/ratio = get_fuel() / get_max_fuel() - ratio = Ceiling(ratio*4) * 25 - var/image/I = image(icon, src, "[icon_state][ratio]") - overlays.Add(I) - - // Lights - if(welding && flame_intensity) - set_light(flame_intensity, flame_intensity, flame_color) - else - set_light(0) - -// icon_state = welding ? "[icon_state]1" : "[initial(icon_state)]" - var/mob/M = loc - if(istype(M)) - M.update_inv_l_hand() - M.update_inv_r_hand() - -/obj/item/weapon/weldingtool/MouseDrop(obj/over_object as obj) - if(!canremove) - return - - if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist - - if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why? - return - - if (!( istype(over_object, /obj/screen) )) - return ..() - - //makes sure that the thing is equipped, so that we can't drag it into our hand from miles away. - //there's got to be a better way of doing this. - if (!(src.loc == usr) || (src.loc && src.loc.loc == usr)) - return - - if (( usr.restrained() ) || ( usr.stat )) - return - - if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src)) - return - - switch(over_object.name) - if("r_hand") - usr.u_equip(src) - usr.put_in_r_hand(src) - if("l_hand") - usr.u_equip(src) - usr.put_in_l_hand(src) - src.add_fingerprint(usr) - -//Sets the welding state of the welding tool. If you see W.welding = 1 anywhere, please change it to W.setWelding(1) -//so that the welding tool updates accordingly -/obj/item/weapon/weldingtool/proc/setWelding(var/set_welding, var/mob/M) - if(!status) return - - var/turf/T = get_turf(src) - //If we're turning it on - if(set_welding && !welding) - if (get_fuel() > 0) - if(M) - to_chat(M, "You switch the [src] on.") - else if(T) - T.visible_message("\The [src] turns on.") - playsound(loc, acti_sound, 50, 1) - src.force = 15 - src.damtype = "fire" - src.w_class = ITEMSIZE_LARGE - src.hitsound = 'sound/items/welder.ogg' - welding = 1 - update_icon() - if(!always_process) - processing_objects |= src - else - if(M) - var/msg = max_fuel ? "welding fuel" : "charge" - to_chat(M, "You need more [msg] to complete this task.") - return - //Otherwise - else if(!set_welding && welding) - if(!always_process) - processing_objects -= src - if(M) - to_chat(M, "You switch \the [src] off.") - else if(T) - T.visible_message("\The [src] turns off.") - playsound(loc, deac_sound, 50, 1) - src.force = 3 - src.damtype = "brute" - src.w_class = initial(src.w_class) - src.welding = 0 - src.hitsound = initial(src.hitsound) - update_icon() - -//Decides whether or not to damage a player's eyes based on what they're wearing as protection -//Note: This should probably be moved to mob -/obj/item/weapon/weldingtool/proc/eyecheck(mob/living/carbon/user) - if(!istype(user)) - return 1 - var/safety = user.eyecheck() - safety = between(-1, safety + eye_safety_modifier, 2) - if(istype(user, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = user - var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES] - if(!E) - return - switch(safety) - if(1) - to_chat(usr, "Your eyes sting a little.") - E.damage += rand(1, 2) - if(E.damage > 12) - user.eye_blurry += rand(3,6) - if(0) - to_chat(usr, "Your eyes burn.") - E.damage += rand(2, 4) - if(E.damage > 10) - E.damage += rand(4,10) - if(-1) - to_chat(usr, "Your thermals intensify the welder's glow. Your eyes itch and burn severely.") - user.eye_blurry += rand(12,20) - E.damage += rand(12, 16) - if(safety<2) - - if(E.damage > 10) - to_chat(user, "Your eyes are really starting to hurt. This can't be good for you!") - - if (E.damage >= E.min_broken_damage) - to_chat(user, "You go blind!") - user.sdisabilities |= BLIND - else if (E.damage >= E.min_bruised_damage) - to_chat(user, "You go blind!") - user.Blind(5) - user.eye_blurry = 5 - user.disabilities |= NEARSIGHTED - spawn(100) - user.disabilities &= ~NEARSIGHTED - return - -/obj/item/weapon/weldingtool/is_hot() - return isOn() - -/obj/item/weapon/weldingtool/largetank - name = "industrial welding tool" - desc = "A slightly larger welder with a larger tank." - icon_state = "indwelder" - max_fuel = 40 - origin_tech = list(TECH_ENGINEERING = 2, TECH_PHORON = 2) - matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 60) - -/obj/item/weapon/weldingtool/largetank/cyborg - name = "integrated welding tool" - desc = "An advanced welder designed to be used in robotic systems." - toolspeed = 0.5 - -/obj/item/weapon/weldingtool/hugetank - name = "upgraded welding tool" - desc = "A much larger welder with a huge tank." - icon_state = "indwelder" - max_fuel = 80 - w_class = ITEMSIZE_NORMAL - origin_tech = list(TECH_ENGINEERING = 3) - matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120) - -/obj/item/weapon/weldingtool/mini - name = "emergency welding tool" - desc = "A miniature welder used during emergencies." - icon_state = "miniwelder" - max_fuel = 10 - w_class = ITEMSIZE_SMALL - matter = list(MAT_METAL = 30, MAT_GLASS = 10) - change_icons = 0 - toolspeed = 2 - eye_safety_modifier = 1 // Safer on eyes. - -/obj/item/weapon/weldingtool/alien - name = "alien welding tool" - desc = "An alien welding tool. Whatever fuel it uses, it never runs out." - icon = 'icons/obj/abductor.dmi' - icon_state = "welder" - toolspeed = 0.1 - flame_color = "#6699FF" // Light bluish. - eye_safety_modifier = 2 - change_icons = 0 - origin_tech = list(TECH_PHORON = 5 ,TECH_ENGINEERING = 5) - always_process = TRUE - -/obj/item/weapon/weldingtool/alien/process() - if(get_fuel() <= get_max_fuel()) - reagents.add_reagent("fuel", 1) - ..() - -/obj/item/weapon/weldingtool/experimental - name = "experimental welding tool" - desc = "An experimental welder capable of synthesizing its own fuel from waste compounds. It can output a flame hotter than regular welders." - icon_state = "exwelder" - max_fuel = 40 - w_class = ITEMSIZE_NORMAL - origin_tech = list(TECH_ENGINEERING = 4, TECH_PHORON = 3) - matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120) - toolspeed = 0.5 - change_icons = 0 - flame_intensity = 3 - always_process = TRUE - var/nextrefueltick = 0 - -/obj/item/weapon/weldingtool/experimental/process() - ..() - if(get_fuel() < get_max_fuel() && nextrefueltick < world.time) - nextrefueltick = world.time + 10 - reagents.add_reagent("fuel", 1) - -/* - * Backpack Welder. - */ - -/obj/item/weapon/weldingtool/tubefed - name = "tube-fed welding tool" - desc = "A bulky, cooler-burning welding tool that draws from a worn welding tank." - icon_state = "tubewelder" - max_fuel = 10 - w_class = ITEMSIZE_NO_CONTAINER - matter = null - toolspeed = 1.25 - change_icons = 0 - flame_intensity = 1 - eye_safety_modifier = 1 - always_process = TRUE - var/obj/item/weapon/weldpack/mounted_pack = null - -/obj/item/weapon/weldingtool/tubefed/New(location) - ..() - if(istype(location, /obj/item/weapon/weldpack)) - var/obj/item/weapon/weldpack/holder = location - mounted_pack = holder - else - qdel(src) - -/obj/item/weapon/weldingtool/tubefed/Destroy() - mounted_pack.nozzle = null - mounted_pack = null - return ..() - -/obj/item/weapon/weldingtool/tubefed/process() - if(mounted_pack) - if(!istype(mounted_pack.loc,/mob/living/carbon/human)) - mounted_pack.return_nozzle() - else - var/mob/living/carbon/human/H = mounted_pack.loc - if(H.back != mounted_pack) - mounted_pack.return_nozzle() - - if(mounted_pack.loc != src.loc && src.loc != mounted_pack) - mounted_pack.return_nozzle() - visible_message("\The [src] retracts to its fueltank.") - - if(get_fuel() <= get_max_fuel()) - mounted_pack.reagents.trans_to_obj(src, 1) - - ..() - -/obj/item/weapon/weldingtool/tubefed/dropped(mob/user) - ..() - if(src.loc != user) - mounted_pack.return_nozzle() - to_chat(user, "\The [src] retracts to its fueltank.") - -/* - * Electric/Arc Welder - */ - -/obj/item/weapon/weldingtool/electric //AND HIS WELDING WAS ELECTRIC - name = "electric welding tool" - desc = "A welder which runs off of electricity." - icon_state = "arcwelder" - max_fuel = 0 //We'll handle the consumption later. - item_state = "ewelder" - var/obj/item/weapon/cell/power_supply //What type of power cell this uses - var/charge_cost = 24 //The rough equivalent of 1 unit of fuel, based on us wanting 10 welds per battery - var/cell_type = /obj/item/weapon/cell/device - var/use_external_power = 0 //If in a borg or hardsuit, this needs to = 1 - flame_color = "#00CCFF" // Blue-ish, to set it apart from the gas flames. - acti_sound = 'sound/effects/sparks4.ogg' - deac_sound = 'sound/effects/sparks4.ogg' - -/obj/item/weapon/weldingtool/electric/unloaded/New() - cell_type = null - -/obj/item/weapon/weldingtool/electric/New() - ..() - if(cell_type == null) - update_icon() - else if(cell_type) - power_supply = new cell_type(src) - else - power_supply = new /obj/item/weapon/cell/device(src) - update_icon() - -/obj/item/weapon/weldingtool/electric/get_cell() - return power_supply - -/obj/item/weapon/weldingtool/electric/examine(mob/user) - if(get_dist(src, user) > 1) - to_chat(user, desc) - else // The << need to stay, for some reason - if(power_supply) - user << text("\icon[] The [] has [] charge left.", src, src.name, get_fuel()) - else - user << text("\icon[] The [] has no power cell!", src, src.name) - -/obj/item/weapon/weldingtool/electric/get_fuel() - if(use_external_power) - var/obj/item/weapon/cell/external = get_external_power_supply() - if(external) - return external.charge - else if(power_supply) - return power_supply.charge - else - return 0 - -/obj/item/weapon/weldingtool/electric/get_max_fuel() - if(use_external_power) - var/obj/item/weapon/cell/external = get_external_power_supply() - if(external) - return external.maxcharge - else if(power_supply) - return power_supply.maxcharge - return 0 - -/obj/item/weapon/weldingtool/electric/remove_fuel(var/amount = 1, var/mob/M = null) - if(!welding) - return 0 - if(get_fuel() >= amount) - power_supply.checked_use(charge_cost) - if(use_external_power) - var/obj/item/weapon/cell/external = get_external_power_supply() - if(!external || !external.use(charge_cost)) //Take power from the borg... - power_supply.give(charge_cost) //Give it back to the cell. - if(M) - eyecheck(M) - update_icon() - return 1 - else - if(M) - to_chat(M, "You need more energy to complete this task.") - update_icon() - return 0 - -/obj/item/weapon/weldingtool/electric/attack_hand(mob/user as mob) - if(user.get_inactive_hand() == src) - if(power_supply) - power_supply.update_icon() - user.put_in_hands(power_supply) - power_supply = null - to_chat(user, "You remove the cell from the [src].") - setWelding(0) - update_icon() - return - ..() - else - return ..() - -/obj/item/weapon/weldingtool/electric/attackby(obj/item/weapon/W, mob/user as mob) - if(istype(W, /obj/item/weapon/cell)) - if(istype(W, /obj/item/weapon/cell/device)) - if(!power_supply) - user.drop_item() - W.loc = src - power_supply = W - to_chat(user, "You install a cell in \the [src].") - update_icon() - else - to_chat(user, "\The [src] already has a cell.") - else - to_chat(user, "\The [src] cannot use that type of cell.") - else - ..() - -/obj/item/weapon/weldingtool/electric/proc/get_external_power_supply() - if(isrobot(src.loc)) - var/mob/living/silicon/robot/R = src.loc - return R.cell - if(istype(src.loc, /obj/item/rig_module)) - var/obj/item/rig_module/module = src.loc - if(module.holder && module.holder.wearer) - var/mob/living/carbon/human/H = module.holder.wearer - if(istype(H) && H.back) - var/obj/item/weapon/rig/suit = H.back - if(istype(suit)) - return suit.cell - return null - -/obj/item/weapon/weldingtool/electric/mounted - use_external_power = 1 - -/obj/item/weapon/weldingtool/electric/mounted/cyborg - toolspeed = 0.5 -/* - * Crowbar - */ - -/obj/item/weapon/crowbar - name = "crowbar" - desc = "Used to remove floors and to pry open doors." - icon = 'icons/obj/tools.dmi' - icon_state = "crowbar" - flags = CONDUCT - slot_flags = SLOT_BELT - force = 6 - throwforce = 7 - pry = 1 - item_state = "crowbar" - w_class = ITEMSIZE_SMALL - origin_tech = list(TECH_ENGINEERING = 1) - matter = list(DEFAULT_WALL_MATERIAL = 50) - attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked") - usesound = 'sound/items/crowbar.ogg' - toolspeed = 1 - -/obj/item/weapon/crowbar/red - icon = 'icons/obj/tools.dmi' - icon_state = "red_crowbar" - item_state = "crowbar_red" - -/obj/item/weapon/weldingtool/attack(var/atom/A, var/mob/living/user, var/def_zone) - if(ishuman(A) && user.a_intent == I_HELP) - var/mob/living/carbon/human/H = A - var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting] - - if(!S || S.robotic < ORGAN_ROBOT || S.open == 3) - return ..() - - if(!welding) - to_chat(user, "You'll need to turn [src] on to patch the damage on [H]'s [S.name]!") - return 1 - - if(S.robo_repair(15, BRUTE, "some dents", src, user)) - remove_fuel(1, user) - - else - return ..() - -/obj/item/weapon/crowbar/alien - name = "alien crowbar" - desc = "A hard-light crowbar. It appears to pry by itself, without any effort required." - icon = 'icons/obj/abductor.dmi' - usesound = 'sound/weapons/sonic_jackhammer.ogg' - icon_state = "crowbar" - toolspeed = 0.1 - origin_tech = list(TECH_COMBAT = 4, TECH_ENGINEERING = 4) - -/obj/item/weapon/crowbar/cyborg - name = "hydraulic crowbar" - desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbars in industrial synthetics." - usesound = 'sound/items/jaws_pry.ogg' - force = 10 - toolspeed = 0.5 - -/obj/item/weapon/crowbar/power - name = "jaws of life" - desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a prying head." - icon_state = "jaws_pry" - item_state = "jawsoflife" - matter = list(MAT_METAL=150, MAT_SILVER=50) - origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) - usesound = 'sound/items/jaws_pry.ogg' - force = 15 - toolspeed = 0.25 - var/obj/item/weapon/wirecutters/power/counterpart = null - -/obj/item/weapon/crowbar/power/New(newloc, no_counterpart = TRUE) - ..(newloc) - if(!counterpart && no_counterpart) - counterpart = new(src, FALSE) - counterpart.counterpart = src - -/obj/item/weapon/crowbar/power/Destroy() - if(counterpart) - counterpart.counterpart = null // So it can qdel cleanly. - qdel_null(counterpart) - return ..() - -/obj/item/weapon/crowbar/power/attack_self(mob/user) - playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) - user.drop_item(src) - counterpart.forceMove(get_turf(src)) - src.forceMove(counterpart) - user.put_in_active_hand(counterpart) - to_chat(user, "You attach the cutting jaws to [src].") - - -/*/obj/item/weapon/combitool - name = "combi-tool" - desc = "It even has one of those nubbins for doing the thingy." - icon = 'icons/obj/items.dmi' - icon_state = "combitool" - w_class = ITEMSIZE_SMALL - - var/list/spawn_tools = list( - /obj/item/weapon/screwdriver, - /obj/item/weapon/wrench, - /obj/item/weapon/wirecutters, - /obj/item/weapon/material/knife, - /obj/item/weapon/material/kitchen/utensil/fork, - /obj/item/weapon/material/knife/machete/hatchet - ) - var/list/tools = list() - var/current_tool = 1 - -/obj/item/weapon/combitool/examine() - ..() - if(loc == usr && tools.len) - to_chat(usr, "It has the following fittings:") - for(var/obj/item/tool in tools) - to_chat(usr, "\icon[tool] - [tool.name][tools[current_tool]==tool?" (selected)":""]") - -/obj/item/weapon/combitool/New() - ..() - for(var/type in spawn_tools) - tools |= new type(src) - -/obj/item/weapon/combitool/attack_self(mob/user as mob) - if(++current_tool > tools.len) current_tool = 1 - var/obj/item/tool = tools[current_tool] - if(!tool) - to_chat(user, "You can't seem to find any fittings in \the [src].") - else - to_chat(user, "You switch \the [src] to the [tool.name] fitting.") - return 1 - -/obj/item/weapon/combitool/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - if(!M.Adjacent(user)) - return 0 - var/obj/item/tool = tools[current_tool] - if(!tool) return 0 - return (tool ? tool.attack(M,user) : 0) - -/obj/item/weapon/combitool/afterattack(var/atom/target, var/mob/living/user, proximity, params) - if(!proximity) - return 0 - var/obj/item/tool = tools[current_tool] - if(!tool) return 0 - tool.loc = user - var/resolved = target.attackby(tool,user) - if(!resolved && tool && target) - tool.afterattack(target,user,1) - if(tool) - tool.loc = src*/ - -#undef WELDER_FUEL_BURN_INTERVAL + +#define WELDER_FUEL_BURN_INTERVAL 13 +/* + * Welding Tool + */ +/obj/item/weapon/weldingtool + name = "welding tool" + icon = 'icons/obj/tools.dmi' + icon_state = "welder" + item_state = "welder" + flags = CONDUCT + slot_flags = SLOT_BELT + + //Amount of OUCH when it's thrown + force = 3.0 + throwforce = 5.0 + throw_speed = 1 + throw_range = 5 + w_class = ITEMSIZE_SMALL + + //Cost to make in the autolathe + matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 30) + + //R&D tech level + origin_tech = list(TECH_ENGINEERING = 1) + + //Welding tool specific stuff + var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2) + var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower) + var/max_fuel = 20 //The max amount of fuel the welder can hold + + var/acti_sound = 'sound/items/welderactivate.ogg' + var/deac_sound = 'sound/items/welderdeactivate.ogg' + usesound = 'sound/items/Welder2.ogg' + var/change_icons = TRUE + var/flame_intensity = 2 //how powerful the emitted light is when used. + var/flame_color = "#FF9933" // What color the welder light emits when its on. Default is an orange-ish color. + var/eye_safety_modifier = 0 // Increasing this will make less eye protection needed to stop eye damage. IE at 1, sunglasses will fully protect. + var/burned_fuel_for = 0 // Keeps track of how long the welder's been on, used to gradually empty the welder if left one, without RNG. + var/always_process = FALSE // If true, keeps the welder on the process list even if it's off. Used for when it needs to regenerate fuel. + toolspeed = 1 + +/obj/item/weapon/weldingtool/New() +// var/random_fuel = min(rand(10,20),max_fuel) + var/datum/reagents/R = new/datum/reagents(max_fuel) + reagents = R + R.my_atom = src + R.add_reagent("fuel", max_fuel) + update_icon() + if(always_process) + processing_objects |= src + ..() + +/obj/item/weapon/weldingtool/Destroy() + if(welding || always_process) + processing_objects -= src + return ..() + +/obj/item/weapon/weldingtool/examine(mob/user) + if(..(user, 0)) + if(max_fuel) + to_chat(user, text("\icon[] The [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )) + +/obj/item/weapon/weldingtool/attack(var/atom/A, var/mob/living/user, var/def_zone) + if(ishuman(A) && user.a_intent == I_HELP) + var/mob/living/carbon/human/H = A + var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting] + + if(!S || S.robotic < ORGAN_ROBOT || S.open == 3) + return ..() + + if(!welding) + to_chat(user, "You'll need to turn [src] on to patch the damage on [H]'s [S.name]!") + return 1 + + if(S.robo_repair(15, BRUTE, "some dents", src, user)) + remove_fuel(1, user) + return 1 + + return ..() + +/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/living/user as mob) + if(istype(W,/obj/item/weapon/tool/screwdriver)) + if(welding) + to_chat(user, "Stop welding first!") + return + status = !status + if(status) + to_chat(user, "You secure the welder.") + else + to_chat(user, "The welder can now be attached and modified.") + src.add_fingerprint(user) + return + + if((!status) && (istype(W,/obj/item/stack/rods))) + var/obj/item/stack/rods/R = W + R.use(1) + var/obj/item/weapon/flamethrower/F = new/obj/item/weapon/flamethrower(user.loc) + src.loc = F + F.weldtool = src + if (user.client) + user.client.screen -= src + if (user.r_hand == src) + user.remove_from_mob(src) + else + user.remove_from_mob(src) + src.master = F + src.layer = initial(src.layer) + user.remove_from_mob(src) + if (user.client) + user.client.screen -= src + src.loc = F + src.add_fingerprint(user) + return + + ..() + return + + +/obj/item/weapon/weldingtool/process() + if(welding) + ++burned_fuel_for + if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL) + remove_fuel(1) + + + + if(get_fuel() < 1) + setWelding(0) + + //I'm not sure what this does. I assume it has to do with starting fires... + //...but it doesnt check to see if the welder is on or not. + var/turf/location = src.loc + if(istype(location, /mob/living)) + var/mob/living/M = location + if(M.item_is_in_hands(src)) + location = get_turf(M) + if (istype(location, /turf)) + location.hotspot_expose(700, 5) + + +/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity) + if(!proximity) return + if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1) + if(!welding && max_fuel) + O.reagents.trans_to_obj(src, max_fuel) + to_chat(user, "Welder refueled") + playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6) + return + else if(!welding) + to_chat(user, "[src] doesn't use fuel.") + return + else + message_admins("[key_name_admin(user)] triggered a fueltank explosion with a welding tool.") + log_game("[key_name(user)] triggered a fueltank explosion with a welding tool.") + to_chat(user, "You begin welding on the fueltank and with a moment of lucidity you realize, this might not have been the smartest thing you've ever done.") + var/obj/structure/reagent_dispensers/fueltank/tank = O + tank.explode() + return + if (src.welding) + remove_fuel(1) + var/turf/location = get_turf(user) + if(isliving(O)) + var/mob/living/L = O + L.IgniteMob() + if (istype(location, /turf)) + location.hotspot_expose(700, 50, 1) + return + + +/obj/item/weapon/weldingtool/attack_self(mob/user as mob) + setWelding(!welding, usr) + return + +//Returns the amount of fuel in the welder +/obj/item/weapon/weldingtool/proc/get_fuel() + return reagents.get_reagent_amount("fuel") + +/obj/item/weapon/weldingtool/proc/get_max_fuel() + return max_fuel + +//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use() +/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null) + if(!welding) + return 0 + if(amount) + burned_fuel_for = 0 // Reset the counter since we're removing fuel. + if(get_fuel() >= amount) + reagents.remove_reagent("fuel", amount) + if(M) + eyecheck(M) + update_icon() + return 1 + else + if(M) + to_chat(M, "You need more welding fuel to complete this task.") + update_icon() + return 0 + +//Returns whether or not the welding tool is currently on. +/obj/item/weapon/weldingtool/proc/isOn() + return src.welding + +/obj/item/weapon/weldingtool/update_icon() + ..() + overlays.Cut() + // Welding overlay. + if(welding) + var/image/I = image(icon, src, "[icon_state]-on") + overlays.Add(I) + item_state = "[initial(item_state)]1" + else + item_state = initial(item_state) + + // Fuel counter overlay. + if(change_icons && get_max_fuel()) + var/ratio = get_fuel() / get_max_fuel() + ratio = Ceiling(ratio*4) * 25 + var/image/I = image(icon, src, "[icon_state][ratio]") + overlays.Add(I) + + // Lights + if(welding && flame_intensity) + set_light(flame_intensity, flame_intensity, flame_color) + else + set_light(0) + +// icon_state = welding ? "[icon_state]1" : "[initial(icon_state)]" + var/mob/M = loc + if(istype(M)) + M.update_inv_l_hand() + M.update_inv_r_hand() + +/obj/item/weapon/weldingtool/MouseDrop(obj/over_object as obj) + if(!canremove) + return + + if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist + + if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why? + return + + if (!( istype(over_object, /obj/screen) )) + return ..() + + //makes sure that the thing is equipped, so that we can't drag it into our hand from miles away. + //there's got to be a better way of doing this. + if (!(src.loc == usr) || (src.loc && src.loc.loc == usr)) + return + + if (( usr.restrained() ) || ( usr.stat )) + return + + if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src)) + return + + switch(over_object.name) + if("r_hand") + usr.u_equip(src) + usr.put_in_r_hand(src) + if("l_hand") + usr.u_equip(src) + usr.put_in_l_hand(src) + src.add_fingerprint(usr) + +//Sets the welding state of the welding tool. If you see W.welding = 1 anywhere, please change it to W.setWelding(1) +//so that the welding tool updates accordingly +/obj/item/weapon/weldingtool/proc/setWelding(var/set_welding, var/mob/M) + if(!status) return + + var/turf/T = get_turf(src) + //If we're turning it on + if(set_welding && !welding) + if (get_fuel() > 0) + if(M) + to_chat(M, "You switch the [src] on.") + else if(T) + T.visible_message("\The [src] turns on.") + playsound(loc, acti_sound, 50, 1) + src.force = 15 + src.damtype = "fire" + src.w_class = ITEMSIZE_LARGE + src.hitsound = 'sound/items/welder.ogg' + welding = 1 + update_icon() + if(!always_process) + processing_objects |= src + else + if(M) + var/msg = max_fuel ? "welding fuel" : "charge" + to_chat(M, "You need more [msg] to complete this task.") + return + //Otherwise + else if(!set_welding && welding) + if(!always_process) + processing_objects -= src + if(M) + to_chat(M, "You switch \the [src] off.") + else if(T) + T.visible_message("\The [src] turns off.") + playsound(loc, deac_sound, 50, 1) + src.force = 3 + src.damtype = "brute" + src.w_class = initial(src.w_class) + src.welding = 0 + src.hitsound = initial(src.hitsound) + update_icon() + +//Decides whether or not to damage a player's eyes based on what they're wearing as protection +//Note: This should probably be moved to mob +/obj/item/weapon/weldingtool/proc/eyecheck(mob/living/carbon/user) + if(!istype(user)) + return 1 + var/safety = user.eyecheck() + safety = between(-1, safety + eye_safety_modifier, 2) + if(istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES] + if(!E) + return + switch(safety) + if(1) + to_chat(usr, "Your eyes sting a little.") + E.damage += rand(1, 2) + if(E.damage > 12) + user.eye_blurry += rand(3,6) + if(0) + to_chat(usr, "Your eyes burn.") + E.damage += rand(2, 4) + if(E.damage > 10) + E.damage += rand(4,10) + if(-1) + to_chat(usr, "Your thermals intensify the welder's glow. Your eyes itch and burn severely.") + user.eye_blurry += rand(12,20) + E.damage += rand(12, 16) + if(safety<2) + + if(E.damage > 10) + to_chat(user, "Your eyes are really starting to hurt. This can't be good for you!") + + if (E.damage >= E.min_broken_damage) + to_chat(user, "You go blind!") + user.sdisabilities |= BLIND + else if (E.damage >= E.min_bruised_damage) + to_chat(user, "You go blind!") + user.Blind(5) + user.eye_blurry = 5 + user.disabilities |= NEARSIGHTED + spawn(100) + user.disabilities &= ~NEARSIGHTED + return + +/obj/item/weapon/weldingtool/is_hot() + return isOn() + +/obj/item/weapon/weldingtool/largetank + name = "industrial welding tool" + desc = "A slightly larger welder with a larger tank." + icon_state = "indwelder" + max_fuel = 40 + origin_tech = list(TECH_ENGINEERING = 2, TECH_PHORON = 2) + matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 60) + +/obj/item/weapon/weldingtool/largetank/cyborg + name = "integrated welding tool" + desc = "An advanced welder designed to be used in robotic systems." + toolspeed = 0.5 + +/obj/item/weapon/weldingtool/hugetank + name = "upgraded welding tool" + desc = "A much larger welder with a huge tank." + icon_state = "indwelder" + max_fuel = 80 + w_class = ITEMSIZE_NORMAL + origin_tech = list(TECH_ENGINEERING = 3) + matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120) + +/obj/item/weapon/weldingtool/mini + name = "emergency welding tool" + desc = "A miniature welder used during emergencies." + icon_state = "miniwelder" + max_fuel = 10 + w_class = ITEMSIZE_SMALL + matter = list(MAT_METAL = 30, MAT_GLASS = 10) + change_icons = 0 + toolspeed = 2 + eye_safety_modifier = 1 // Safer on eyes. + +/obj/item/weapon/weldingtool/alien + name = "alien welding tool" + desc = "An alien welding tool. Whatever fuel it uses, it never runs out." + icon = 'icons/obj/abductor.dmi' + icon_state = "welder" + toolspeed = 0.1 + flame_color = "#6699FF" // Light bluish. + eye_safety_modifier = 2 + change_icons = 0 + origin_tech = list(TECH_PHORON = 5 ,TECH_ENGINEERING = 5) + always_process = TRUE + +/obj/item/weapon/weldingtool/alien/process() + if(get_fuel() <= get_max_fuel()) + reagents.add_reagent("fuel", 1) + ..() + +/obj/item/weapon/weldingtool/experimental + name = "experimental welding tool" + desc = "An experimental welder capable of synthesizing its own fuel from waste compounds. It can output a flame hotter than regular welders." + icon_state = "exwelder" + max_fuel = 40 + w_class = ITEMSIZE_NORMAL + origin_tech = list(TECH_ENGINEERING = 4, TECH_PHORON = 3) + matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120) + toolspeed = 0.5 + change_icons = 0 + flame_intensity = 3 + always_process = TRUE + var/nextrefueltick = 0 + +/obj/item/weapon/weldingtool/experimental/process() + ..() + if(get_fuel() < get_max_fuel() && nextrefueltick < world.time) + nextrefueltick = world.time + 10 + reagents.add_reagent("fuel", 1) + +/* + * Backpack Welder. + */ + +/obj/item/weapon/weldingtool/tubefed + name = "tube-fed welding tool" + desc = "A bulky, cooler-burning welding tool that draws from a worn welding tank." + icon_state = "tubewelder" + max_fuel = 10 + w_class = ITEMSIZE_NO_CONTAINER + matter = null + toolspeed = 1.25 + change_icons = 0 + flame_intensity = 1 + eye_safety_modifier = 1 + always_process = TRUE + var/obj/item/weapon/weldpack/mounted_pack = null + +/obj/item/weapon/weldingtool/tubefed/New(location) + ..() + if(istype(location, /obj/item/weapon/weldpack)) + var/obj/item/weapon/weldpack/holder = location + mounted_pack = holder + else + qdel(src) + +/obj/item/weapon/weldingtool/tubefed/Destroy() + mounted_pack.nozzle = null + mounted_pack = null + return ..() + +/obj/item/weapon/weldingtool/tubefed/process() + if(mounted_pack) + if(!istype(mounted_pack.loc,/mob/living/carbon/human)) + mounted_pack.return_nozzle() + else + var/mob/living/carbon/human/H = mounted_pack.loc + if(H.back != mounted_pack) + mounted_pack.return_nozzle() + + if(mounted_pack.loc != src.loc && src.loc != mounted_pack) + mounted_pack.return_nozzle() + visible_message("\The [src] retracts to its fueltank.") + + if(get_fuel() <= get_max_fuel()) + mounted_pack.reagents.trans_to_obj(src, 1) + + ..() + +/obj/item/weapon/weldingtool/tubefed/dropped(mob/user) + ..() + if(src.loc != user) + mounted_pack.return_nozzle() + to_chat(user, "\The [src] retracts to its fueltank.") + +/* + * Electric/Arc Welder + */ + +/obj/item/weapon/weldingtool/electric //AND HIS WELDING WAS ELECTRIC + name = "electric welding tool" + desc = "A welder which runs off of electricity." + icon_state = "arcwelder" + max_fuel = 0 //We'll handle the consumption later. + item_state = "ewelder" + var/obj/item/weapon/cell/power_supply //What type of power cell this uses + var/charge_cost = 24 //The rough equivalent of 1 unit of fuel, based on us wanting 10 welds per battery + var/cell_type = /obj/item/weapon/cell/device + var/use_external_power = 0 //If in a borg or hardsuit, this needs to = 1 + flame_color = "#00CCFF" // Blue-ish, to set it apart from the gas flames. + acti_sound = 'sound/effects/sparks4.ogg' + deac_sound = 'sound/effects/sparks4.ogg' + +/obj/item/weapon/weldingtool/electric/unloaded/New() + cell_type = null + +/obj/item/weapon/weldingtool/electric/New() + ..() + if(cell_type == null) + update_icon() + else if(cell_type) + power_supply = new cell_type(src) + else + power_supply = new /obj/item/weapon/cell/device(src) + update_icon() + +/obj/item/weapon/weldingtool/electric/get_cell() + return power_supply + +/obj/item/weapon/weldingtool/electric/examine(mob/user) + if(get_dist(src, user) > 1) + to_chat(user, desc) + else // The << need to stay, for some reason + if(power_supply) + user << text("\icon[] The [] has [] charge left.", src, src.name, get_fuel()) + else + user << text("\icon[] The [] has no power cell!", src, src.name) + +/obj/item/weapon/weldingtool/electric/get_fuel() + if(use_external_power) + var/obj/item/weapon/cell/external = get_external_power_supply() + if(external) + return external.charge + else if(power_supply) + return power_supply.charge + else + return 0 + +/obj/item/weapon/weldingtool/electric/get_max_fuel() + if(use_external_power) + var/obj/item/weapon/cell/external = get_external_power_supply() + if(external) + return external.maxcharge + else if(power_supply) + return power_supply.maxcharge + return 0 + +/obj/item/weapon/weldingtool/electric/remove_fuel(var/amount = 1, var/mob/M = null) + if(!welding) + return 0 + if(get_fuel() >= amount) + power_supply.checked_use(charge_cost) + if(use_external_power) + var/obj/item/weapon/cell/external = get_external_power_supply() + if(!external || !external.use(charge_cost)) //Take power from the borg... + power_supply.give(charge_cost) //Give it back to the cell. + if(M) + eyecheck(M) + update_icon() + return 1 + else + if(M) + to_chat(M, "You need more energy to complete this task.") + update_icon() + return 0 + +/obj/item/weapon/weldingtool/electric/attack_hand(mob/user as mob) + if(user.get_inactive_hand() == src) + if(power_supply) + power_supply.update_icon() + user.put_in_hands(power_supply) + power_supply = null + to_chat(user, "You remove the cell from the [src].") + setWelding(0) + update_icon() + return + ..() + else + return ..() + +/obj/item/weapon/weldingtool/electric/attackby(obj/item/weapon/W, mob/user as mob) + if(istype(W, /obj/item/weapon/cell)) + if(istype(W, /obj/item/weapon/cell/device)) + if(!power_supply) + user.drop_item() + W.loc = src + power_supply = W + to_chat(user, "You install a cell in \the [src].") + update_icon() + else + to_chat(user, "\The [src] already has a cell.") + else + to_chat(user, "\The [src] cannot use that type of cell.") + else + ..() + +/obj/item/weapon/weldingtool/electric/proc/get_external_power_supply() + if(isrobot(src.loc)) + var/mob/living/silicon/robot/R = src.loc + return R.cell + if(istype(src.loc, /obj/item/rig_module)) + var/obj/item/rig_module/module = src.loc + if(module.holder && module.holder.wearer) + var/mob/living/carbon/human/H = module.holder.wearer + if(istype(H) && H.back) + var/obj/item/weapon/rig/suit = H.back + if(istype(suit)) + return suit.cell + return null + +/obj/item/weapon/weldingtool/electric/mounted + use_external_power = 1 + +/obj/item/weapon/weldingtool/electric/mounted/cyborg + toolspeed = 0.5 + +#undef WELDER_FUEL_BURN_INTERVAL diff --git a/code/game/objects/items/weapons/tools/wirecutters.dm b/code/game/objects/items/weapons/tools/wirecutters.dm new file mode 100644 index 0000000000..edd002cc4b --- /dev/null +++ b/code/game/objects/items/weapons/tools/wirecutters.dm @@ -0,0 +1,93 @@ +/* + * Wirecutters + */ +/obj/item/weapon/tool/wirecutters + name = "wirecutters" + desc = "This cuts wires." + icon = 'icons/obj/tools.dmi' + icon_state = "cutters" + flags = CONDUCT + slot_flags = SLOT_BELT + force = 6 + throw_speed = 2 + throw_range = 9 + w_class = ITEMSIZE_SMALL + origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) + matter = list(DEFAULT_WALL_MATERIAL = 80) + attack_verb = list("pinched", "nipped") + hitsound = 'sound/items/wirecutter.ogg' + usesound = 'sound/items/wirecutter.ogg' + sharp = 1 + edge = 1 + toolspeed = 1 + var/random_color = TRUE + +/obj/item/weapon/tool/wirecutters/New() + if(random_color && prob(50)) + icon_state = "cutters-y" + item_state = "cutters_yellow" + ..() + +/obj/item/weapon/tool/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob) + if(istype(C) && user.a_intent == I_HELP && (C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/handcuffs/cable))) + usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\ + "You cut \the [C]'s restraints with \the [src]!",\ + "You hear cable being cut.") + C.handcuffed = null + if(C.buckled && C.buckled.buckle_require_restraints) + C.buckled.unbuckle_mob() + C.update_inv_handcuffed() + return + else + ..() + +/obj/item/weapon/tool/wirecutters/is_wirecutter() + return TRUE + +/obj/item/weapon/tool/wirecutters/alien + name = "alien wirecutters" + desc = "Extremely sharp wirecutters, made out of a silvery-green metal." + icon = 'icons/obj/abductor.dmi' + icon_state = "cutters" + toolspeed = 0.1 + origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 4) + random_color = FALSE + +/obj/item/weapon/tool/wirecutters/cyborg + name = "wirecutters" + desc = "This cuts wires. With science." + usesound = 'sound/items/jaws_cut.ogg' + toolspeed = 0.5 + +/obj/item/weapon/tool/wirecutters/power + name = "jaws of life" + desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head." + icon_state = "jaws_cutter" + item_state = "jawsoflife" + origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) + matter = list(MAT_METAL=150, MAT_SILVER=50) + usesound = 'sound/items/jaws_cut.ogg' + force = 15 + toolspeed = 0.25 + random_color = FALSE + var/obj/item/weapon/tool/crowbar/power/counterpart = null + +/obj/item/weapon/tool/wirecutters/power/New(newloc, no_counterpart = TRUE) + ..(newloc) + if(!counterpart && no_counterpart) + counterpart = new(src, FALSE) + counterpart.counterpart = src + +/obj/item/weapon/tool/wirecutters/power/Destroy() + if(counterpart) + counterpart.counterpart = null // So it can qdel cleanly. + qdel_null(counterpart) + return ..() + +/obj/item/weapon/tool/wirecutters/power/attack_self(mob/user) + playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) + user.drop_item(src) + counterpart.forceMove(get_turf(src)) + src.forceMove(counterpart) + user.put_in_active_hand(counterpart) + to_chat(user, "You attach the pry jaws to [src].") \ No newline at end of file diff --git a/code/game/objects/items/weapons/tools/wrench.dm b/code/game/objects/items/weapons/tools/wrench.dm new file mode 100644 index 0000000000..22eb371157 --- /dev/null +++ b/code/game/objects/items/weapons/tools/wrench.dm @@ -0,0 +1,71 @@ +/* + * Wrench + */ +/obj/item/weapon/tool/wrench + name = "wrench" + desc = "A wrench with many common uses. Can be usually found in your hand." + icon = 'icons/obj/tools.dmi' + icon_state = "wrench" + flags = CONDUCT + slot_flags = SLOT_BELT + force = 6 + throwforce = 7 + w_class = ITEMSIZE_SMALL + origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) + matter = list(DEFAULT_WALL_MATERIAL = 150) + attack_verb = list("bashed", "battered", "bludgeoned", "whacked") + usesound = 'sound/items/ratchet.ogg' + toolspeed = 1 + +/obj/item/weapon/tool/wrench/is_wrench() + return TRUE + +/obj/item/weapon/tool/wrench/cyborg + name = "automatic wrench" + desc = "An advanced robotic wrench. Can be found in industrial synthetic shells." + usesound = 'sound/items/drill_use.ogg' + toolspeed = 0.5 + +/obj/item/weapon/tool/wrench/alien + name = "alien wrench" + desc = "A polarized wrench. It causes anything placed between the jaws to turn." + icon = 'icons/obj/abductor.dmi' + icon_state = "wrench" + usesound = 'sound/effects/empulse.ogg' + toolspeed = 0.1 + origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 5) + +/obj/item/weapon/tool/wrench/power + name = "hand drill" + desc = "A simple powered hand drill. It's fitted with a bolt bit." + icon_state = "drill_bolt" + item_state = "drill" + usesound = 'sound/items/drill_use.ogg' + matter = list(DEFAULT_WALL_MATERIAL = 150, MAT_SILVER = 50) + origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2) + force = 8 + w_class = ITEMSIZE_SMALL + throwforce = 8 + attack_verb = list("drilled", "screwed", "jabbed") + toolspeed = 0.25 + var/obj/item/weapon/tool/screwdriver/power/counterpart = null + +/obj/item/weapon/tool/wrench/power/New(newloc, no_counterpart = TRUE) + ..(newloc) + if(!counterpart && no_counterpart) + counterpart = new(src, FALSE) + counterpart.counterpart = src + +/obj/item/weapon/tool/wrench/power/Destroy() + if(counterpart) + counterpart.counterpart = null // So it can qdel cleanly. + qdel_null(counterpart) + return ..() + +/obj/item/weapon/tool/wrench/power/attack_self(mob/user) + playsound(get_turf(user),'sound/items/change_drill.ogg',50,1) + user.drop_item(src) + counterpart.forceMove(get_turf(src)) + src.forceMove(counterpart) + user.put_in_active_hand(counterpart) + to_chat(user, "You attach the screw driver bit to [src].") \ No newline at end of file diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 0facb97eac..9c2fb60434 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -39,7 +39,7 @@ /obj/CanUseTopic(var/mob/user, var/datum/topic_state/state) if(user.CanUseObjTopic(src)) return ..() - user << "\icon[src]Access Denied!" + to_chat(user, "\icon[src]Access Denied!") return STATUS_CLOSE /mob/living/silicon/CanUseObjTopic(var/obj/O) diff --git a/code/game/objects/random/misc.dm b/code/game/objects/random/misc.dm index c918425221..28a9513e77 100644 --- a/code/game/objects/random/misc.dm +++ b/code/game/objects/random/misc.dm @@ -10,12 +10,12 @@ icon_state = "welder" /obj/random/tool/item_to_spawn() - return pick(/obj/item/weapon/screwdriver, - /obj/item/weapon/wirecutters, + return pick(/obj/item/weapon/tool/screwdriver, + /obj/item/weapon/tool/wirecutters, /obj/item/weapon/weldingtool, /obj/item/weapon/weldingtool/largetank, - /obj/item/weapon/crowbar, - /obj/item/weapon/wrench, + /obj/item/weapon/tool/crowbar, + /obj/item/weapon/tool/wrench, /obj/item/device/flashlight, /obj/item/device/multitool) @@ -26,8 +26,8 @@ /obj/random/tool/powermaint/item_to_spawn() return pick(prob(320);/obj/random/tool, - prob(1);/obj/item/weapon/screwdriver/power, - prob(1);/obj/item/weapon/wirecutters/power, + prob(1);/obj/item/weapon/tool/screwdriver/power, + prob(1);/obj/item/weapon/tool/wirecutters/power, prob(15);/obj/item/weapon/weldingtool/electric, prob(5);/obj/item/weapon/weldingtool/experimental) @@ -37,8 +37,8 @@ icon_state = "jaws_pry" /obj/random/tool/power/item_to_spawn() - return pick(/obj/item/weapon/screwdriver/power, - /obj/item/weapon/wirecutters/power, + return pick(/obj/item/weapon/tool/screwdriver/power, + /obj/item/weapon/tool/wirecutters/power, /obj/item/weapon/weldingtool/electric, /obj/item/weapon/weldingtool/experimental) @@ -49,11 +49,11 @@ icon_state = "welder" /obj/random/tool/alien/item_to_spawn() - return pick(/obj/item/weapon/screwdriver/alien, - /obj/item/weapon/wirecutters/alien, + return pick(/obj/item/weapon/tool/screwdriver/alien, + /obj/item/weapon/tool/wirecutters/alien, /obj/item/weapon/weldingtool/alien, - /obj/item/weapon/crowbar/alien, - /obj/item/weapon/wrench/alien, + /obj/item/weapon/tool/crowbar/alien, + /obj/item/weapon/tool/wrench/alien, /obj/item/stack/cable_coil/alien, /obj/item/device/multitool/alien) diff --git a/code/game/objects/random/mob.dm b/code/game/objects/random/mob.dm index 3aefa9a84c..016dc4ed5e 100644 --- a/code/game/objects/random/mob.dm +++ b/code/game/objects/random/mob.dm @@ -18,24 +18,24 @@ var/mob_retaliate = 0 /obj/random/mob/item_to_spawn() - return pick(prob(10);/mob/living/simple_animal/lizard, - prob(6);/mob/living/simple_animal/retaliate/diyaab, + return pick(prob(10);/mob/living/simple_mob/animal/passive/lizard, + prob(6);/mob/living/simple_mob/animal/sif/diyaab, prob(10);/mob/living/simple_animal/cat/fluff, prob(6);/mob/living/simple_animal/cat/kitten, prob(10);/mob/living/simple_animal/corgi, prob(6);/mob/living/simple_animal/corgi/puppy, - prob(10);/mob/living/simple_animal/crab, + prob(10);/mob/living/simple_mob/animal/passive/crab, prob(10);/mob/living/simple_animal/chicken, prob(6);/mob/living/simple_animal/chick, prob(10);/mob/living/simple_animal/cow, prob(6);/mob/living/simple_animal/retaliate/goat, - prob(10);/mob/living/simple_animal/penguin, + prob(10);/mob/living/simple_mob/animal/passive/penguin, prob(10);/mob/living/simple_animal/mouse, - prob(10);/mob/living/simple_animal/yithian, - prob(10);/mob/living/simple_animal/tindalos, + prob(10);/mob/living/simple_mob/animal/passive/yithian, + prob(10);/mob/living/simple_mob/animal/passive/tindalos, prob(10);/mob/living/simple_animal/corgi/tamaskan, prob(3);/mob/living/simple_animal/parrot, - prob(1);/mob/living/simple_animal/giant_crab) + prob(1);/mob/living/simple_mob/animal/passive/crab) /obj/random/mob/spawn_item() //These should only ever have simple mobs. var/build_path = item_to_spawn() @@ -65,14 +65,14 @@ mob_wander_distance = 10 /obj/random/mob/sif/item_to_spawn() - return pick(prob(30);/mob/living/simple_animal/retaliate/diyaab, - prob(15);/mob/living/simple_animal/crab, - prob(15);/mob/living/simple_animal/penguin, + return pick(prob(30);/mob/living/simple_mob/animal/sif/diyaab, + prob(15);/mob/living/simple_mob/animal/passive/crab, + prob(15);/mob/living/simple_mob/animal/passive/penguin, prob(15);/mob/living/simple_animal/mouse, prob(15);/mob/living/simple_animal/corgi/tamaskan, - prob(2);/mob/living/simple_animal/hostile/giant_spider/frost, + prob(2);/mob/living/simple_mob/animal/giant_spider/frost, prob(1);/mob/living/simple_animal/hostile/goose, - prob(20);/mob/living/simple_animal/giant_crab) + prob(20);/mob/living/simple_mob/animal/passive/crab) /obj/random/mob/sif/peaceful @@ -84,12 +84,12 @@ mob_wander_distance = 12 /obj/random/mob/sif/peaceful/item_to_spawn() - return pick(prob(30);/mob/living/simple_animal/retaliate/diyaab, - prob(15);/mob/living/simple_animal/crab, - prob(15);/mob/living/simple_animal/penguin, + return pick(prob(30);/mob/living/simple_mob/animal/sif/diyaab, + prob(15);/mob/living/simple_mob/animal/passive/crab, + prob(15);/mob/living/simple_mob/animal/passive/penguin, prob(15);/mob/living/simple_animal/mouse, prob(15);/mob/living/simple_animal/corgi/tamaskan, - prob(20);/mob/living/simple_animal/giant_crab) + prob(20);/mob/living/simple_mob/animal/sif/hooligan_crab) /obj/random/mob/sif/hostile name = "Random Hostile Sif Animal" @@ -97,9 +97,9 @@ icon_state = "frost" /obj/random/mob/sif/hostile/item_to_spawn() - return pick(prob(22);/mob/living/simple_animal/hostile/savik, - prob(33);/mob/living/simple_animal/hostile/giant_spider/frost, - prob(45);/mob/living/simple_animal/hostile/shantak) + return pick(prob(22);/mob/living/simple_mob/animal/sif/savik, + prob(33);/mob/living/simple_mob/animal/giant_spider/frost, + prob(45);/mob/living/simple_mob/animal/sif/shantak) /obj/random/mob/spider name = "Random Spider" //Spiders should patrol where they spawn. @@ -110,9 +110,9 @@ mob_wander_distance = 4 /obj/random/mob/spider/item_to_spawn() - return pick(prob(22);/mob/living/simple_animal/hostile/giant_spider/nurse, - prob(33);/mob/living/simple_animal/hostile/giant_spider/hunter, - prob(45);/mob/living/simple_animal/hostile/giant_spider) + return pick(prob(22);/mob/living/simple_mob/animal/giant_spider/nurse, + prob(33);/mob/living/simple_mob/animal/giant_spider/hunter, + prob(45);/mob/living/simple_mob/animal/giant_spider) /obj/random/mob/spider/nurse name = "Random Nurse Spider" @@ -123,8 +123,8 @@ mob_wander_distance = 4 /obj/random/mob/spider/nurse/item_to_spawn() - return pick(prob(22);/mob/living/simple_animal/hostile/giant_spider/nurse/hat, - prob(45);/mob/living/simple_animal/hostile/giant_spider/nurse) + return pick(prob(22);/mob/living/simple_mob/animal/giant_spider/nurse/hat, + prob(45);/mob/living/simple_mob/animal/giant_spider/nurse) /obj/random/mob/spider/mutant name = "Random Mutant Spider" @@ -133,15 +133,15 @@ /obj/random/mob/spider/mutant/item_to_spawn() return pick(prob(5);/obj/random/mob/spider, - prob(10);/mob/living/simple_animal/hostile/giant_spider/webslinger, - prob(10);/mob/living/simple_animal/hostile/giant_spider/carrier, - prob(33);/mob/living/simple_animal/hostile/giant_spider/lurker, - prob(33);/mob/living/simple_animal/hostile/giant_spider/tunneler, - prob(40);/mob/living/simple_animal/hostile/giant_spider/pepper, - prob(20);/mob/living/simple_animal/hostile/giant_spider/thermic, - prob(40);/mob/living/simple_animal/hostile/giant_spider/electric, - prob(1);/mob/living/simple_animal/hostile/giant_spider/phorogenic, - prob(40);/mob/living/simple_animal/hostile/giant_spider/frost) + prob(10);/mob/living/simple_mob/animal/giant_spider/webslinger, + prob(10);/mob/living/simple_mob/animal/giant_spider/carrier, + prob(33);/mob/living/simple_mob/animal/giant_spider/lurker, + prob(33);/mob/living/simple_mob/animal/giant_spider/tunneler, + prob(40);/mob/living/simple_mob/animal/giant_spider/pepper, + prob(20);/mob/living/simple_mob/animal/giant_spider/thermic, + prob(40);/mob/living/simple_mob/animal/giant_spider/electric, + prob(1);/mob/living/simple_mob/animal/giant_spider/phorogenic, + prob(40);/mob/living/simple_mob/animal/giant_spider/frost) /obj/random/mob/robotic name = "Random Robot Mob" @@ -158,17 +158,17 @@ mob_retaliate = 1 /obj/random/mob/robotic/item_to_spawn() //Hivebots have a total number of 'lots' equal to the lesser drone, at 60. - return pick(prob(60);/mob/living/simple_animal/hostile/malf_drone/lesser, - prob(50);/mob/living/simple_animal/hostile/malf_drone, + return pick(prob(60);/mob/living/simple_mob/mechanical/combat_drone/lesser, + prob(50);/mob/living/simple_mob/mechanical/combat_drone, prob(15);/mob/living/simple_animal/hostile/mecha/malf_drone, - prob(10);/mob/living/simple_animal/hostile/hivebot, - prob(15);/mob/living/simple_animal/hostile/hivebot/swarm, - prob(10);/mob/living/simple_animal/hostile/hivebot/range, - prob(5);/mob/living/simple_animal/hostile/hivebot/range/rapid, - prob(5);/mob/living/simple_animal/hostile/hivebot/range/ion, - prob(5);/mob/living/simple_animal/hostile/hivebot/range/laser, - prob(5);/mob/living/simple_animal/hostile/hivebot/range/strong, - prob(5);/mob/living/simple_animal/hostile/hivebot/range/guard) + prob(10);/mob/living/simple_mob/mechanical/hivebot, + prob(15);/mob/living/simple_mob/mechanical/hivebot/swarm, + prob(10);/mob/living/simple_mob/mechanical/hivebot/ranged_damage, + prob(5);/mob/living/simple_mob/mechanical/hivebot/ranged_damage/rapid, + prob(5);/mob/living/simple_mob/mechanical/hivebot/ranged_damage/ion, + prob(5);/mob/living/simple_mob/mechanical/hivebot/ranged_damage/laser, + prob(5);/mob/living/simple_mob/mechanical/hivebot/ranged_damage/strong, + prob(5);/mob/living/simple_mob/mechanical/hivebot/ranged_damage/strong/guard) /obj/random/mob/robotic/hivebot name = "Random Hivebot" @@ -178,11 +178,11 @@ mob_faction = "hivebot" /obj/random/mob/robotic/hivebot/item_to_spawn() - return pick(prob(10);/mob/living/simple_animal/hostile/hivebot, - prob(15);/mob/living/simple_animal/hostile/hivebot/swarm, - prob(10);/mob/living/simple_animal/hostile/hivebot/range, - prob(5);/mob/living/simple_animal/hostile/hivebot/range/rapid, - prob(5);/mob/living/simple_animal/hostile/hivebot/range/ion, - prob(5);/mob/living/simple_animal/hostile/hivebot/range/laser, - prob(5);/mob/living/simple_animal/hostile/hivebot/range/strong, - prob(5);/mob/living/simple_animal/hostile/hivebot/range/guard) + return pick(prob(10);/mob/living/simple_mob/mechanical/hivebot, + prob(15);/mob/living/simple_mob/mechanical/hivebot/swarm, + prob(10);/mob/living/simple_mob/mechanical/hivebot/ranged_damage, + prob(5);/mob/living/simple_mob/mechanical/hivebot/ranged_damage/rapid, + prob(5);/mob/living/simple_mob/mechanical/hivebot/ranged_damage/ion, + prob(5);/mob/living/simple_mob/mechanical/hivebot/ranged_damage/laser, + prob(5);/mob/living/simple_mob/mechanical/hivebot/ranged_damage/strong, + prob(5);/mob/living/simple_mob/mechanical/hivebot/ranged_damage/strong/guard) diff --git a/code/game/objects/structures/catwalk.dm b/code/game/objects/structures/catwalk.dm index 60cb0753b1..eda2c9346b 100644 --- a/code/game/objects/structures/catwalk.dm +++ b/code/game/objects/structures/catwalk.dm @@ -67,7 +67,7 @@ return /obj/structure/catwalk/attackby(obj/item/C as obj, mob/user as mob) - if (istype(C, /obj/item/weapon/weldingtool)) + if(istype(C, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = C if(WT.isOn()) if(WT.remove_fuel(0, user)) @@ -76,7 +76,7 @@ new /obj/item/stack/rods(src.loc) new /obj/structure/lattice(src.loc) qdel(src) - if(istype(C, /obj/item/weapon/screwdriver)) + if(C.is_screwdriver()) if(health < maxhealth) to_chat(user, "You begin repairing \the [src.name] with \the [C.name].") if(do_after(user, 20, src)) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 79c873c56b..1dc8336ae6 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -260,7 +260,7 @@ src.update_icon() for(var/mob/M in viewers(src)) M.show_message("[src] has been [welded?"welded shut":"unwelded"] by [user.name].", 3, "You hear welding.", 2) - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) if(welded) if(anchored) user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm index fd893458ae..cad925f6e8 100644 --- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm +++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm @@ -16,7 +16,7 @@ starts_with = list(/obj/item/weapon/material/twohanded/fireaxe) -/obj/structure/closet/fireaxecabinet/New() +/obj/structure/closet/fireaxecabinet/initialize() ..() fireaxe = locate() in contents diff --git a/code/game/objects/structures/crates_lockers/closets/malfunction.dm b/code/game/objects/structures/crates_lockers/closets/malfunction.dm index 90f91d1d8f..40b6ec68b9 100644 --- a/code/game/objects/structures/crates_lockers/closets/malfunction.dm +++ b/code/game/objects/structures/crates_lockers/closets/malfunction.dm @@ -9,6 +9,6 @@ /obj/item/clothing/mask/breath, /obj/item/clothing/head/helmet/space/void, /obj/item/clothing/suit/space/void, - /obj/item/weapon/crowbar, + /obj/item/weapon/tool/crowbar, /obj/item/weapon/cell, /obj/item/device/multitool) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm b/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm index d378c74537..2b10bdff4a 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm @@ -16,7 +16,7 @@ /obj/item/clothing/head/greenbandana, /obj/item/weapon/material/minihoe, /obj/item/weapon/material/knife/machete/hatchet, - /obj/item/weapon/wirecutters/clippers, + /obj/item/weapon/tool/wirecutters/clippers, /obj/item/weapon/reagent_containers/spray/plantbgone, /obj/item/clothing/suit/storage/hooded/wintercoat/hydro, /obj/item/clothing/shoes/boots/winter/hydro) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm index e87884b10a..16520ae8fa 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm @@ -132,7 +132,7 @@ /obj/item/device/healthanalyzer, /obj/item/device/radio/off, /obj/random/medical, - /obj/item/weapon/crowbar, + /obj/item/weapon/tool/crowbar, /obj/item/weapon/extinguisher/mini, /obj/item/weapon/storage/box/freezer, /obj/item/clothing/accessory/storage/white_vest, diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index 269e7b6fc8..994fe0eca1 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -88,7 +88,7 @@ spark_system.start() playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) playsound(src.loc, "sparks", 50, 1) - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) if(welded) if(anchored) user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 64ba461107..738e36e09a 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -104,7 +104,7 @@ /obj/item/weapon/storage/box/holobadge/hos, /obj/item/clothing/accessory/badge/holo/hos, /obj/item/weapon/reagent_containers/spray/pepper, - /obj/item/weapon/crowbar/red, + /obj/item/weapon/tool/crowbar/red, /obj/item/weapon/storage/box/flashbangs, /obj/item/weapon/storage/belt/security, /obj/item/device/flash, diff --git a/code/game/objects/structures/crates_lockers/closets/syndicate.dm b/code/game/objects/structures/crates_lockers/closets/syndicate.dm index c247644246..1194b7f9fa 100644 --- a/code/game/objects/structures/crates_lockers/closets/syndicate.dm +++ b/code/game/objects/structures/crates_lockers/closets/syndicate.dm @@ -14,7 +14,7 @@ /obj/item/clothing/under/syndicate, /obj/item/clothing/head/helmet/space/void/merc, /obj/item/clothing/suit/space/void/merc, - /obj/item/weapon/crowbar/red, + /obj/item/weapon/tool/crowbar/red, /obj/item/weapon/cell/high, /obj/item/weapon/card/id/syndicate, /obj/item/device/multitool, @@ -24,7 +24,7 @@ /obj/structure/closet/syndicate/suit desc = "It's a storage unit for voidsuits." - + starts_with = list( /obj/item/weapon/tank/jetpack/oxygen, /obj/item/clothing/shoes/magboots, diff --git a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm index 4b20c5a955..f0781b3f02 100644 --- a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm @@ -113,15 +113,15 @@ if(prob(70)) starts_with += /obj/item/device/flashlight if(prob(70)) - starts_with += /obj/item/weapon/screwdriver + starts_with += /obj/item/weapon/tool/screwdriver if(prob(70)) - starts_with += /obj/item/weapon/wrench + starts_with += /obj/item/weapon/tool/wrench if(prob(70)) starts_with += /obj/item/weapon/weldingtool if(prob(70)) - starts_with += /obj/item/weapon/crowbar + starts_with += /obj/item/weapon/tool/crowbar if(prob(70)) - starts_with += /obj/item/weapon/wirecutters + starts_with += /obj/item/weapon/tool/wirecutters if(prob(70)) starts_with += /obj/item/device/t_scanner if(prob(20)) @@ -202,7 +202,7 @@ icon_closed = "hydrant" icon_opened = "hydrant_open" plane = TURF_PLANE - layer = ABOVE_TURF_LAYER + layer = ABOVE_TURF_LAYER anchored = 1 density = 0 wall_mounted = 1 diff --git a/code/game/objects/structures/crates_lockers/closets/walllocker.dm b/code/game/objects/structures/crates_lockers/closets/walllocker.dm index 39204e3491..78572d38cd 100644 --- a/code/game/objects/structures/crates_lockers/closets/walllocker.dm +++ b/code/game/objects/structures/crates_lockers/closets/walllocker.dm @@ -16,7 +16,7 @@ /obj/structure/closet/walllocker/emerglocker name = "emergency locker" desc = "A wall mounted locker with emergency supplies." - var/list/spawnitems = list(/obj/item/weapon/tank/emergency/oxygen,/obj/item/clothing/mask/breath,/obj/item/weapon/crowbar/red) + var/list/spawnitems = list(/obj/item/weapon/tank/emergency/oxygen,/obj/item/clothing/mask/breath,/obj/item/weapon/tool/crowbar/red) var/amount = 2 // spawns each items X times. icon_state = "emerg" diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index e108626206..e399c04d0b 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -94,7 +94,7 @@ user.drop_item() W.forceMove(src) return - else if(istype(W, /obj/item/weapon/wirecutters)) + else if(W.is_wirecutter()) if(rigged) user << "You cut away the wiring." playsound(src.loc, W.usesound, 100, 1) @@ -191,7 +191,7 @@ src.toggle(user) /obj/structure/closet/crate/secure/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(is_type_in_list(W, list(/obj/item/weapon/packageWrap, /obj/item/stack/cable_coil, /obj/item/device/radio/electropack, /obj/item/weapon/wirecutters))) + if(is_type_in_list(W, list(/obj/item/weapon/packageWrap, /obj/item/stack/cable_coil, /obj/item/device/radio/electropack, /obj/item/weapon/tool/wirecutters))) return ..() if(istype(W, /obj/item/weapon/melee/energy/blade)) emag_act(INFINITY, user) diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm index b4a0d60dcb..d747680bae 100644 --- a/code/game/objects/structures/crates_lockers/largecrate.dm +++ b/code/game/objects/structures/crates_lockers/largecrate.dm @@ -17,15 +17,20 @@ I.forceMove(src) /obj/structure/largecrate/attack_hand(mob/user as mob) - user << "You need a crowbar to pry this open!" + to_chat(user, "You need a crowbar to pry this open!") return /obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/crowbar)) + var/turf/T = get_turf(src) + if(!T) + to_chat(user, "You can't open this here!") + if(W.is_crowbar()) new /obj/item/stack/material/wood(src) - var/turf/T = get_turf(src) + for(var/atom/movable/AM in contents) - if(AM.simulated) AM.forceMove(T) + if(AM.simulated) + AM.forceMove(T) + user.visible_message("[user] pries \the [src] open.", \ "You pry open \the [src].", \ "You hear splitting wood.") @@ -42,7 +47,7 @@ icon_state = "mulecrate" /obj/structure/largecrate/hoverpod/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/crowbar)) + if(W.is_crowbar()) var/obj/item/mecha_parts/mecha_equipment/ME var/obj/mecha/working/hoverpod/H = new (loc) diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm index 39c2dc43fd..78095631de 100644 --- a/code/game/objects/structures/curtains.dm +++ b/code/game/objects/structures/curtains.dm @@ -37,7 +37,7 @@ layer = OBJ_LAYER /obj/structure/curtain/attackby(obj/item/P, mob/user) - if(istype(P, /obj/item/weapon/wirecutters)) + if(P.is_wirecutter()) playsound(src, P.usesound, 50, 1) user << "You start to cut the shower curtains." if(do_after(user, 10)) diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index 87957b4d4d..f8ea5d2f77 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -200,7 +200,7 @@ to_chat(user, "You need more welding fuel.") return - else if(istype(W, /obj/item/weapon/wrench) && state == 0) + else if(W.is_wrench() && state == 0) playsound(src, W.usesound, 100, 1) if(anchored) user.visible_message("[user] begins unsecuring the airlock assembly from the floor.", "You starts unsecuring the airlock assembly from the floor.") @@ -223,7 +223,7 @@ src.state = 1 to_chat(user, "You wire the airlock.") - else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 ) + else if(W.is_wirecutter() && state == 1 ) playsound(src, W.usesound, 100, 1) user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.") @@ -245,7 +245,7 @@ src.state = 2 src.electronics = W - else if(istype(W, /obj/item/weapon/crowbar) && state == 2 ) + else if(W.is_crowbar() && state == 2 ) //This should never happen, but just in case I guess if (!electronics) to_chat(user, "There was nothing to remove.") @@ -287,7 +287,7 @@ to_chat(user, "You installed [material_display_name(material_name)] plating into the airlock assembly.") glass = material_name - else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 ) + else if(W.is_screwdriver() && state == 2 ) playsound(src, W.usesound, 100, 1) to_chat(user, "Now finishing the airlock.") diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm index e9483386cf..1cd43b7910 100644 --- a/code/game/objects/structures/electricchair.dm +++ b/code/game/objects/structures/electricchair.dm @@ -12,7 +12,7 @@ return /obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) var/obj/structure/bed/chair/C = new /obj/structure/bed/chair(loc) playsound(src, W.usesound, 50, 1) C.set_dir(dir) diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index e93afd18f3..2be63df8e7 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -35,7 +35,7 @@ user << "You place [O] in [src]." else opened = !opened - if(istype(O, /obj/item/weapon/wrench)) + if(O.is_wrench()) if(!has_extinguisher) user << "You start to unwrench the extinguisher cabinet." playsound(src.loc, O.usesound, 50, 1) diff --git a/code/game/objects/structures/fitness.dm b/code/game/objects/structures/fitness.dm index d29ad16f74..158bf5533b 100644 --- a/code/game/objects/structures/fitness.dm +++ b/code/game/objects/structures/fitness.dm @@ -33,7 +33,7 @@ var/list/qualifiers = list("with ease", "without any trouble", "with great effort") /obj/structure/fitness/weightlifter/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1) weight = ((weight) % qualifiers.len) + 1 to_chat(user, "You set the machine's weight level to [weight].") diff --git a/code/game/objects/structures/flora/trees.dm b/code/game/objects/structures/flora/trees.dm index f0a7498390..8b7f5bf042 100644 --- a/code/game/objects/structures/flora/trees.dm +++ b/code/game/objects/structures/flora/trees.dm @@ -4,7 +4,7 @@ anchored = 1 density = 1 pixel_x = -16 - plane = MOB_LAYER // You know what, let's play it safe. + plane = MOB_PLANE // You know what, let's play it safe. layer = ABOVE_MOB_LAYER var/base_state = null // Used for stumps. var/health = 200 // Used for chopping down trees. @@ -52,12 +52,12 @@ animate(transform=null, pixel_x=init_px, time=6, easing=ELASTIC_EASING) // Used when the tree gets hurt. -/obj/structure/flora/tree/proc/adjust_health(var/amount, var/is_ranged = FALSE) +/obj/structure/flora/tree/proc/adjust_health(var/amount, var/damage_wood = FALSE) if(is_stump) return // Bullets and lasers ruin some of the wood - if(is_ranged && product_amount > 0) + if(damage_wood && product_amount > 0) var/wood = initial(product_amount) product_amount -= round(wood * (abs(amount)/max_health)) @@ -90,12 +90,16 @@ set_light(0) /obj/structure/flora/tree/ex_act(var/severity) - adjust_health(-(max_health / severity)) + adjust_health(-(max_health / severity), TRUE) /obj/structure/flora/tree/bullet_act(var/obj/item/projectile/Proj) if(Proj.get_structure_damage()) adjust_health(-Proj.get_structure_damage(), TRUE) +/obj/structure/flora/tree/tesla_act(power, explosive) + adjust_health(-power / 100, TRUE) // Kills most trees in one lightning strike. + ..() + /obj/structure/flora/tree/get_description_interaction() var/list/results = list() diff --git a/code/game/objects/structures/ghost_pods/mysterious.dm b/code/game/objects/structures/ghost_pods/mysterious.dm new file mode 100644 index 0000000000..2e6a11a8bb --- /dev/null +++ b/code/game/objects/structures/ghost_pods/mysterious.dm @@ -0,0 +1,50 @@ +/obj/structure/ghost_pod/manual/corgi + name = "glowing rune" + desc = "This rune slowly lights up and goes dim in a repeating pattern, like a slow heartbeat. It's almost as if it's calling out to you to touch it..." + description_info = "This will summon some manner of creature through quite dubious means. The creature will be controlled by a player." + icon_state = "corgirune" + icon_state_opened = "corgirune-inert" + density = FALSE + anchored = TRUE + ghost_query_type = /datum/ghost_query/corgi_rune + confirm_before_open = TRUE + +/obj/structure/ghost_pod/manual/corgi/trigger() + ..("\The [usr] places their hand on the rune!", "is attempting to summon a corgi.") + +/obj/structure/ghost_pod/manual/corgi/create_occupant(var/mob/M) + lightning_strike(get_turf(src), cosmetic = TRUE) + density = FALSE + var/mob/living/simple_animal/corgi/R = new(get_turf(src)) + if(M.mind) + M.mind.transfer_to(R) + to_chat(M, "You are a Corgi! Woof!") + R.ckey = M.ckey + visible_message("With a bright flash of light, \the [src] disappears, and in its place stands a small corgi.") + log_and_message_admins("successfully touched \a [src] and summoned a corgi.") + ..() + +/obj/structure/ghost_pod/manual/cursedblade + name = "abandoned blade" + desc = "A red crystal blade that someone jammed deep into a stone. If you try hard enough, you might be able to remove it." + icon_state = "soulblade-embedded" + icon_state_opened = "soulblade-released" + density = TRUE + anchored = TRUE + ghost_query_type = /datum/ghost_query/cursedblade + confirm_before_open = TRUE + +/obj/structure/ghost_pod/manual/cursedblade/trigger() + ..("\The [usr] attempts to pull out the sword!", "is activating a cursed blade.") + +/obj/structure/ghost_pod/manual/cursedblade/create_occupant(var/mob/M) + density = FALSE + var/obj/item/weapon/melee/cursedblade/R = new(get_turf(src)) + to_chat(M, "You are a Cursed Sword, discovered by a hapless explorer. \ + You were once an explorer yourself, when one day you discovered a strange sword made from a red crystal. As soon as you touched it,\ + your body was reduced to ashes and your soul was cursed to remain trapped in the blade forever. \ + Now it is up to you to decide whether you want to be a faithful companion, or a bitter prisoner of the blade.") + R.ghost_inhabit(M) + visible_message("The blade shines brightly for a brief moment as [usr] pulls it out of the stone!") + log_and_message_admins("successfully acquired a cursed sword.") + ..() \ No newline at end of file diff --git a/code/game/objects/structures/ghost_pods/silicon.dm b/code/game/objects/structures/ghost_pods/silicon.dm index 1e7210a1ec..8fd3fcea7c 100644 --- a/code/game/objects/structures/ghost_pods/silicon.dm +++ b/code/game/objects/structures/ghost_pods/silicon.dm @@ -58,54 +58,4 @@ R.ckey = M.ckey visible_message("As \the [src] opens, the eyes of the robot flicker as it is activated.") R.Namepick() - ..() - -/obj/structure/ghost_pod/manual/corgi - name = "glowing rune" - desc = "This rune slowly lights up and goes dim in a repeating pattern, like a slow heartbeat. It's almost as if it's calling out to you to touch it..." - description_info = "This will summon some manner of creature through quite dubious means. The creature will be controlled by a player." - icon_state = "corgirune" - icon_state_opened = "corgirune-inert" - density = FALSE - anchored = TRUE - ghost_query_type = /datum/ghost_query/corgi_rune - confirm_before_open = TRUE - -/obj/structure/ghost_pod/manual/corgi/trigger() - ..("\The [usr] places their hand on the rune!", "is attempting to summon a corgi.") - -/obj/structure/ghost_pod/manual/corgi/create_occupant(var/mob/M) - density = FALSE - var/mob/living/simple_animal/corgi/R = new(get_turf(src)) - if(M.mind) - M.mind.transfer_to(R) - to_chat(M, "You are a Corgi! Woof!") - R.ckey = M.ckey - visible_message("With a bright flash of light, \the [src] disappears, and in its place stands a small corgi.") - log_and_message_admins("successfully touched \a [src] and summoned a corgi.") - ..() - -/obj/structure/ghost_pod/manual/cursedblade - name = "abandoned blade" - desc = "A red crystal blade that someone jammed deep into a stone. If you try hard enough, you might be able to remove it." - icon_state = "soulblade-embedded" - icon_state_opened = "soulblade-released" - density = TRUE - anchored = TRUE - ghost_query_type = /datum/ghost_query/cursedblade - confirm_before_open = TRUE - -/obj/structure/ghost_pod/manual/cursedblade/trigger() - ..("\The [usr] attempts to pull out the sword!", "is activating a cursed blade.") - -/obj/structure/ghost_pod/manual/cursedblade/create_occupant(var/mob/M) - density = FALSE - var/obj/item/weapon/melee/cursedblade/R = new(get_turf(src)) - to_chat(M, "You are a Cursed Sword, discovered by a hapless explorer. \ - You were once an explorer yourself, when one day you discovered a strange sword made from a red crystal. As soon as you touched it,\ - your body was reduced to ashes and your soul was cursed to remain trapped in the blade forever. \ - Now it is up to you to decide whether you want to be a faithful companion, or a bitter prisoner of the blade.") - R.ghost_inhabit(M) - visible_message("The blade shines brightly for a brief moment as [usr] pulls it out of the stone!") - log_and_message_admins("successfully acquired a cursed sword.") ..() \ No newline at end of file diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index a22bbae0d2..311e07d0c6 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -144,7 +144,7 @@ reinforce_girder() /obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench) && state == 0) + if(W.is_wrench() && state == 0) if(anchored && !reinf_material) playsound(src, W.usesound, 100, 1) to_chat(user, "Now disassembling the girder...") @@ -170,7 +170,7 @@ to_chat(user, "You drill through the girder!") dismantle() - else if(istype(W, /obj/item/weapon/screwdriver)) + else if(W.is_screwdriver()) if(state == 2) playsound(src, W.usesound, 100, 1) to_chat(user, "Now unsecuring support struts...") @@ -183,7 +183,7 @@ reinforcing = !reinforcing to_chat(user, "\The [src] can now be [reinforcing? "reinforced" : "constructed"]!") - else if(istype(W, /obj/item/weapon/wirecutters) && state == 1) + else if(W.is_wirecutter() && state == 1) playsound(src, W.usesound, 100, 1) to_chat(user, "Now removing support struts...") if(do_after(user,40 * W.toolspeed)) @@ -193,7 +193,7 @@ reinf_material = null reset_girder() - else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored) + else if(W.is_crowbar() && state == 0 && anchored) playsound(src, W.usesound, 100, 1) to_chat(user, "Now dislodging the girder...") if(do_after(user, 40 * W.toolspeed)) @@ -329,7 +329,7 @@ qdel(src) /obj/structure/girder/cult/attackby(obj/item/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) playsound(src, W.usesound, 100, 1) to_chat(user, "Now disassembling the girder...") if(do_after(user,40 * W.toolspeed)) diff --git a/code/game/objects/structures/gravemarker.dm b/code/game/objects/structures/gravemarker.dm index e20591b939..7ef0d49a51 100644 --- a/code/game/objects/structures/gravemarker.dm +++ b/code/game/objects/structures/gravemarker.dm @@ -56,7 +56,7 @@ return 1 /obj/structure/gravemarker/attackby(obj/item/weapon/W, mob/user as mob) - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) var/carving_1 = sanitizeSafe(input(user, "Who is \the [src.name] for?", "Gravestone Naming", null) as text, MAX_NAME_LEN) if(carving_1) user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].") @@ -72,7 +72,7 @@ epitaph += carving_2 update_icon() return - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) user.visible_message("[user] starts taking down \the [src.name].", "You start taking down \the [src.name].") if(do_after(user, material.hardness * W.toolspeed)) user.visible_message("[user] takes down \the [src.name].", "You take down \the [src.name].") diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index bed4a2bd6e..8b16105815 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -94,12 +94,12 @@ spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted /obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(iswirecutter(W)) + if(W.is_wirecutter()) if(!shock(user, 100)) playsound(src, W.usesound, 100, 1) new /obj/item/stack/rods(get_turf(src), destroyed ? 1 : 2) qdel(src) - else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored)) + else if((W.is_screwdriver()) && (istype(loc, /turf/simulated) || anchored)) if(!shock(user, 90)) playsound(src, W.usesound, 100, 1) anchored = !anchored diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index 32b1dec788..51e824c6b0 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -50,7 +50,7 @@ health -= proj_damage ..() if(health <= 0) - deflate(1) + puncture() return /obj/structure/inflatable/ex_act(severity) @@ -59,15 +59,15 @@ qdel(src) return if(2.0) - deflate(1) + puncture() return if(3.0) if(prob(50)) - deflate(1) + puncture() return /obj/structure/inflatable/blob_act() - deflate(1) + puncture() /obj/structure/inflatable/attack_hand(mob/user as mob) add_fingerprint(user) @@ -78,7 +78,7 @@ if (can_puncture(W)) visible_message("[user] pierces [src] with [W]!") - deflate(1) + puncture() if(W.damtype == BRUTE || W.damtype == BURN) hit(W.force) ..() @@ -89,7 +89,7 @@ if(sound_effect) playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1) if(health <= 0) - deflate(1) + puncture() /obj/structure/inflatable/CtrlClick() hand_deflate() @@ -102,20 +102,21 @@ R.add_fingerprint(user) qdel(src) -/obj/structure/inflatable/proc/deflate(var/violent=0) +/obj/structure/inflatable/proc/deflate() playsound(loc, 'sound/machines/hiss.ogg', 75, 1) - if(violent) - visible_message("[src] rapidly deflates!") - var/obj/item/inflatable/torn/R = new /obj/item/inflatable/torn(loc) + //user << "You slowly deflate the inflatable wall." + visible_message("[src] slowly deflates.") + spawn(50) + var/obj/item/inflatable/R = new /obj/item/inflatable(loc) src.transfer_fingerprints_to(R) qdel(src) - else - //user << "You slowly deflate the inflatable wall." - visible_message("[src] slowly deflates.") - spawn(50) - var/obj/item/inflatable/R = new /obj/item/inflatable(loc) - src.transfer_fingerprints_to(R) - qdel(src) + +/obj/structure/inflatable/proc/puncture() + playsound(loc, 'sound/machines/hiss.ogg', 75, 1) + visible_message("[src] rapidly deflates!") + var/obj/item/inflatable/torn/R = new /obj/item/inflatable/torn(loc) + src.transfer_fingerprints_to(R) + qdel(src) /obj/structure/inflatable/verb/hand_deflate() set name = "Deflate" @@ -133,7 +134,7 @@ user.do_attack_animation(src) if(health <= 0) user.visible_message("[user] [attack_verb] open the [src]!") - spawn(1) deflate(1) + spawn(1) puncture() else user.visible_message("[user] [attack_verb] at [src]!") return 1 @@ -221,19 +222,20 @@ else icon_state = "door_closed" -/obj/structure/inflatable/door/deflate(var/violent=0) +/obj/structure/inflatable/door/deflate() playsound(loc, 'sound/machines/hiss.ogg', 75, 1) - if(violent) - visible_message("[src] rapidly deflates!") - var/obj/item/inflatable/door/torn/R = new /obj/item/inflatable/door/torn(loc) + visible_message("[src] slowly deflates.") + spawn(50) + var/obj/item/inflatable/door/R = new /obj/item/inflatable/door(loc) src.transfer_fingerprints_to(R) qdel(src) - else - visible_message("[src] slowly deflates.") - spawn(50) - var/obj/item/inflatable/door/R = new /obj/item/inflatable/door(loc) - src.transfer_fingerprints_to(R) - qdel(src) + +/obj/structure/inflatable/door/puncture() + playsound(loc, 'sound/machines/hiss.ogg', 75, 1) + visible_message("[src] rapidly deflates!") + var/obj/item/inflatable/door/torn/R = new /obj/item/inflatable/door/torn(loc) + src.transfer_fingerprints_to(R) + qdel(src) /obj/item/inflatable/torn name = "torn inflatable wall" diff --git a/code/game/objects/structures/loot_piles.dm b/code/game/objects/structures/loot_piles.dm index 96416e0229..60807e253d 100644 --- a/code/game/objects/structures/loot_piles.dm +++ b/code/game/objects/structures/loot_piles.dm @@ -365,9 +365,9 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh /obj/item/device/gps, /obj/item/device/geiger, /obj/item/device/mass_spectrometer, - /obj/item/weapon/wrench, - /obj/item/weapon/screwdriver, - /obj/item/weapon/wirecutters, + /obj/item/weapon/tool/wrench, + /obj/item/weapon/tool/screwdriver, + /obj/item/weapon/tool/wirecutters, /obj/item/device/multitool, /obj/item/mecha_parts/mecha_equipment/generator, /obj/item/mecha_parts/mecha_equipment/tool/cable_layer, @@ -450,11 +450,11 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh uncommon_loot = list( /obj/item/device/multitool/alien, /obj/item/stack/cable_coil/alien, - /obj/item/weapon/crowbar/alien, - /obj/item/weapon/screwdriver/alien, + /obj/item/weapon/tool/crowbar/alien, + /obj/item/weapon/tool/screwdriver/alien, /obj/item/weapon/weldingtool/alien, - /obj/item/weapon/wirecutters/alien, - /obj/item/weapon/wrench/alien + /obj/item/weapon/tool/wirecutters/alien, + /obj/item/weapon/tool/wrench/alien ) rare_loot = list( /obj/item/weapon/storage/belt/utility/alien/full @@ -496,11 +496,11 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh common_loot = list( /obj/item/device/multitool/alien, /obj/item/stack/cable_coil/alien, - /obj/item/weapon/crowbar/alien, - /obj/item/weapon/screwdriver/alien, + /obj/item/weapon/tool/crowbar/alien, + /obj/item/weapon/tool/screwdriver/alien, /obj/item/weapon/weldingtool/alien, - /obj/item/weapon/wirecutters/alien, - /obj/item/weapon/wrench/alien, + /obj/item/weapon/tool/wirecutters/alien, + /obj/item/weapon/tool/wrench/alien, /obj/item/weapon/surgical/FixOVein/alien, /obj/item/weapon/surgical/bone_clamp/alien, /obj/item/weapon/surgical/cautery/alien, diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 1e8237cdfd..3011d2c61d 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -49,24 +49,24 @@ ..() /obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob) - if(istype(I, /obj/item/weapon/wrench)) + if(I.is_wrench()) if(!glass) playsound(src.loc, I.usesound, 50, 1) if(do_after(user, 20 * I.toolspeed)) - user << "You unfasten the frame." + to_chat(user, "You unfasten the frame.") new /obj/item/frame/mirror( src.loc ) qdel(src) return - if(istype(I, /obj/item/weapon/crowbar)) + if(I.is_wrench()) if(shattered && glass) - user << "The broken glass falls out." + to_chat(user, "The broken glass falls out.") icon_state = "mirror_frame" glass = !glass new /obj/item/weapon/material/shard( src.loc ) return if(!shattered && glass) playsound(src.loc, I.usesound, 50, 1) - user << "You remove the glass." + to_chat(user, "You remove the glass.") glass = !glass icon_state = "mirror_frame" new /obj/item/stack/material/glass( src.loc, 2 ) @@ -76,15 +76,15 @@ if(!glass) var/obj/item/stack/material/glass/G = I if (G.get_amount() < 2) - user << "You need two sheets of glass to add them to the frame." + to_chat(user, "You need two sheets of glass to add them to the frame.") return - user << "You start to add the glass to the frame." + to_chat(user, "You start to add the glass to the frame.") if(do_after(user, 20)) if (G.use(2)) shattered = 0 glass = 1 icon_state = "mirror" - user << "You add the glass to the frame." + to_chat(user, "You add the glass to the frame.") return if(shattered && glass) diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index 3b36cb0087..130c591613 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -429,8 +429,8 @@ return /obj/structure/device/piano/attackby(obj/item/O as obj, mob/user as mob) - if (istype(O, /obj/item/weapon/wrench)) - if (anchored) + if(O.is_wrench()) + if(anchored) playsound(src.loc, O.usesound, 50, 1) user << "You begin to loosen \the [src]'s casters..." if (do_after(user, 40 * O.toolspeed)) diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index 0a26e568ec..64ef2f926b 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -41,7 +41,7 @@ user << "You pin the paper to the noticeboard." else user << "You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached." - if(istype(O, /obj/item/weapon/wrench)) + if(O.is_wrench()) user << "You start to unwrench the noticeboard." playsound(src.loc, O.usesound, 50, 1) if(do_after(user, 15 * O.toolspeed)) diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index cab9822323..0340356e37 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -16,7 +16,7 @@ ) /obj/structure/plasticflaps/attackby(obj/item/P, mob/user) - if(istype(P, /obj/item/weapon/wirecutters)) + if(P.is_wirecutter()) playsound(src, P.usesound, 50, 1) user << "You start to cut the plastic flaps." if(do_after(user, 10 * P.toolspeed)) diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm index e67750b8f3..18e45af166 100644 --- a/code/game/objects/structures/railing.dm +++ b/code/game/objects/structures/railing.dm @@ -198,7 +198,7 @@ /obj/structure/railing/attackby(obj/item/W as obj, mob/user as mob) // Dismantle - if(istype(W, /obj/item/weapon/wrench) && !anchored) + if(W.is_wrench() && !anchored) playsound(src.loc, W.usesound, 50, 1) if(do_after(user, 20, src)) user.visible_message("\The [user] dismantles \the [src].", "You dismantle \the [src].") @@ -217,7 +217,7 @@ return // Install - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) user.visible_message(anchored ? "\The [user] begins unscrewing \the [src]." : "\The [user] begins fasten \the [src]." ) playsound(loc, W.usesound, 75, 1) if(do_after(user, 10, src)) diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index c68becdab9..cfb77a748e 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -21,9 +21,9 @@ return /obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction - if(istype(tool, /obj/item/weapon/screwdriver) && !istype(src, /obj/structure/sign/double)) + if(tool.is_screwdriver() && !istype(src, /obj/structure/sign/double)) playsound(src, tool.usesound, 50, 1) - user << "You unfasten the sign with your [tool]." + to_chat(user, "You unfasten the sign with your [tool].") var/obj/item/sign/S = new(src.loc) S.name = name S.desc = desc @@ -42,7 +42,7 @@ var/sign_state = "" /obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction - if(istype(tool, /obj/item/weapon/screwdriver) && isturf(user.loc)) + if(tool.is_screwdriver() && isturf(user.loc)) var/direction = input("In which direction?", "Select direction.") in list("North", "East", "South", "West", "Cancel") if(direction == "Cancel") return var/obj/structure/sign/S = new(user.loc) @@ -59,7 +59,7 @@ S.name = name S.desc = desc S.icon_state = sign_state - user << "You fasten \the [S] with your [tool]." + to_chat(user, "You fasten \the [S] with your [tool].") qdel(src) else ..() diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 219854f15f..bff152aa0a 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -89,7 +89,7 @@ return /obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) playsound(src, W.usesound, 50, 1) dismantle() qdel(src) @@ -120,7 +120,7 @@ add_padding(padding_type) return - else if (istype(W, /obj/item/weapon/wirecutters)) + else if(W.is_wirecutter()) if(!padding_material) to_chat(user, "\The [src] has no padding to remove.") return @@ -213,7 +213,7 @@ return /obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench) || istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters)) + if(W.is_wrench() || istype(W,/obj/item/stack) || W.is_wirecutter()) return else if(istype(W,/obj/item/roller_holder)) if(has_buckled_mobs()) diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 390e3c84b9..bbc2a64593 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -134,7 +134,7 @@ return /obj/structure/bed/chair/office/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters)) + if(istype(W,/obj/item/stack) || W.is_wirecutter()) return ..() @@ -198,7 +198,7 @@ return /obj/structure/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters)) + if(istype(W,/obj/item/stack) || W.is_wirecutter()) return ..() diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index 02ea01556a..b594ad678a 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -108,7 +108,7 @@ var/global/list/stool_cache = list() //haha stool qdel(src) /obj/item/weapon/stool/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) playsound(src, W.usesound, 50, 1) dismantle() qdel(src) @@ -138,7 +138,7 @@ var/global/list/stool_cache = list() //haha stool user << "You add padding to \the [src]." add_padding(padding_type) return - else if (istype(W, /obj/item/weapon/wirecutters)) + else if (W.is_wirecutter()) if(!padding_material) user << "\The [src] has no padding to remove." return diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index bb1a62e40b..e5eba3f20a 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -23,7 +23,7 @@ L.set_dir(dir) /obj/structure/bed/chair/wheelchair/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench) || istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters)) + if(W.is_wrench() || W.is_wirecutter() || istype(W,/obj/item/stack)) return ..() diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index c13ae10e64..d9d31dfb55 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -74,7 +74,7 @@ user << "[src] is full." updateUsrDialog() return - if(istype(I, /obj/item/weapon/wrench)) + if(I.is_wrench()) if(anchored) user << "You lean down and unwrench [src]." anchored = 0 diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 98e0f1a41e..ff95dd44d8 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -44,7 +44,7 @@ icon_state = "toilet[open][cistern]" /obj/structure/toilet/attackby(obj/item/I as obj, mob/living/user as mob) - if(istype(I, /obj/item/weapon/crowbar)) + if(I.is_crowbar()) to_chat(user, "You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"].") playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1) if(do_after(user, 30)) @@ -160,7 +160,7 @@ /obj/machinery/shower/attackby(obj/item/I as obj, mob/user as mob) if(I.type == /obj/item/device/analyzer) to_chat(user, "The water temperature seems to be [watertemp].") - if(istype(I, /obj/item/weapon/wrench)) + if(I.is_wrench()) var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings to_chat(user, "You begin to adjust the temperature valve with \the [I].") playsound(src.loc, I.usesound, 50, 1) diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 1d1be70694..47f08399f0 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -108,7 +108,7 @@ obj/structure/windoor_assembly/Destroy() return //Wrenching an unsecure assembly anchors it in place. Step 4 complete - if(istype(W, /obj/item/weapon/wrench) && !anchored) + if(W.is_wrench() && !anchored) playsound(src, W.usesound, 100, 1) user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.") @@ -119,7 +119,7 @@ obj/structure/windoor_assembly/Destroy() step = 0 //Unwrenching an unsecure assembly un-anchors it. Step 4 undone - else if(istype(W, /obj/item/weapon/wrench) && anchored) + else if(W.is_wrench() && anchored) playsound(src, W.usesound, 100, 1) user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.") @@ -145,7 +145,7 @@ obj/structure/windoor_assembly/Destroy() if("02") //Removing wire from the assembly. Step 5 undone. - if(istype(W, /obj/item/weapon/wirecutters) && !src.electronics) + if(W.is_wirecutter() && !src.electronics) playsound(src, W.usesound, 100, 1) user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.") @@ -174,7 +174,7 @@ obj/structure/windoor_assembly/Destroy() W.loc = src.loc //Screwdriver to remove airlock electronics. Step 6 undone. - else if(istype(W, /obj/item/weapon/screwdriver) && src.electronics) + else if(W.is_screwdriver() && src.electronics) playsound(src, W.usesound, 100, 1) user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.") @@ -187,7 +187,7 @@ obj/structure/windoor_assembly/Destroy() ae.loc = src.loc //Crowbar to complete the assembly, Step 7 complete. - else if(istype(W, /obj/item/weapon/crowbar)) + else if(W.is_crowbar()) if(!src.electronics) to_chat(usr,"The assembly is missing electronics.") return diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index c197ee1f60..f97433aab4 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -262,7 +262,7 @@ if(W.flags & NOBLUDGEON) return - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) if(reinf && state >= 1) state = 3 - state update_nearby_icons() @@ -280,11 +280,11 @@ update_verbs() playsound(src, W.usesound, 75, 1) user << (anchored ? "You have fastened the window to the floor." : "You have unfastened the window.") - else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1) + else if(W.is_crowbar() && reinf && state <= 1) state = 1 - state playsound(src, W.usesound, 75, 1) user << (state ? "You have pried the window into the frame." : "You have pried the window out of the frame.") - else if(istype(W, /obj/item/weapon/wrench) && !anchored && (!state || !reinf)) + else if(W.is_wrench() && !anchored && (!state || !reinf)) if(!glasstype) user << "You're not sure how to dismantle \the [src] properly." else @@ -294,7 +294,7 @@ if(is_fulltile()) mats.amount = 4 qdel(src) - else if(iscoil(W) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized)) + else if(istype(W, /obj/item/stack/cable_coil) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized)) var/obj/item/stack/cable_coil/C = W if (C.use(1)) playsound(src.loc, 'sound/effects/sparks1.ogg', 75, 1) @@ -572,7 +572,7 @@ maxhealth = 80 /obj/structure/window/reinforced/polarized/attackby(obj/item/W as obj, mob/user as mob) - if(ismultitool(W) && !anchored) // Only allow programming if unanchored! + if(istype(W, /obj/item/device/multitool) && !anchored) // Only allow programming if unanchored! var/obj/item/device/multitool/MT = W // First check if they have a windowtint button buffered if(istype(MT.connectable, /obj/machinery/button/windowtint)) @@ -632,7 +632,7 @@ icon_state = "light[active]" /obj/machinery/button/windowtint/attackby(obj/item/W as obj, mob/user as mob) - if(ismultitool(W)) + if(istype(W, /obj/item/device/multitool)) var/obj/item/device/multitool/MT = W if(!id) // If no ID is set yet (newly built button?) let them select an ID for first-time use! diff --git a/code/game/sound.dm b/code/game/sound.dm index 2db1e433bd..8e206300a8 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -130,6 +130,9 @@ if ("mechstep") soundin = pick('sound/mecha/mechstep1.ogg', 'sound/mecha/mechstep2.ogg') if ("geiger") soundin = pick('sound/items/geiger1.ogg', 'sound/items/geiger2.ogg', 'sound/items/geiger3.ogg', 'sound/items/geiger4.ogg', 'sound/items/geiger5.ogg') if ("geiger_weak") soundin = pick('sound/items/geiger_weak1.ogg', 'sound/items/geiger_weak2.ogg', 'sound/items/geiger_weak3.ogg', 'sound/items/geiger_weak4.ogg') + if ("thunder") soundin = pick('sound/effects/thunder/thunder1.ogg', 'sound/effects/thunder/thunder2.ogg', 'sound/effects/thunder/thunder3.ogg', 'sound/effects/thunder/thunder4.ogg', + 'sound/effects/thunder/thunder5.ogg', 'sound/effects/thunder/thunder6.ogg', 'sound/effects/thunder/thunder7.ogg', 'sound/effects/thunder/thunder8.ogg', 'sound/effects/thunder/thunder9.ogg', + 'sound/effects/thunder/thunder10.ogg') return soundin //Are these even used? diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/code/game/turfs/simulated/floor_attackby.dm b/code/game/turfs/simulated/floor_attackby.dm index 57d51dbaea..83d2444f96 100644 --- a/code/game/turfs/simulated/floor_attackby.dm +++ b/code/game/turfs/simulated/floor_attackby.dm @@ -115,7 +115,7 @@ to_chat(user, "You need more welding fuel to complete this task.") /turf/simulated/floor/proc/try_deconstruct_tile(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/crowbar)) + if(W.is_crowbar()) if(broken || burnt) to_chat(user, "You remove the broken [flooring.descriptor].") make_plating() @@ -129,14 +129,14 @@ return 0 playsound(src, W.usesound, 80, 1) return 1 - else if(istype(W, /obj/item/weapon/screwdriver) && (flooring.flags & TURF_REMOVE_SCREWDRIVER)) + else if(W.is_screwdriver() && (flooring.flags & TURF_REMOVE_SCREWDRIVER)) if(broken || burnt) return 0 to_chat(user, "You unscrew and remove the [flooring.descriptor].") make_plating(1) playsound(src, W.usesound, 80, 1) return 1 - else if(istype(W, /obj/item/weapon/wrench) && (flooring.flags & TURF_REMOVE_WRENCH)) + else if(W.is_wrench() && (flooring.flags & TURF_REMOVE_WRENCH)) to_chat(user, "You unwrench and remove the [flooring.descriptor].") make_plating(1) playsound(src, W.usesound, 80, 1) diff --git a/code/game/turfs/simulated/outdoors/outdoors.dm b/code/game/turfs/simulated/outdoors/outdoors.dm index f56d5a2da3..85fdacc30d 100644 --- a/code/game/turfs/simulated/outdoors/outdoors.dm +++ b/code/game/turfs/simulated/outdoors/outdoors.dm @@ -14,6 +14,8 @@ var/list/turf_edge_cache = list() icon_state = null edge_blending_priority = 1 outdoors = TRUE // This variable is used for weather effects. + can_dirty = FALSE // Looks hideous with dirt on it. + // When a turf gets demoted or promoted, this list gets adjusted. The top-most layer is the layer on the bottom of the list, due to how pop() works. var/list/turf_layers = list(/turf/simulated/floor/outdoors/rocks) diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index 73a56e8949..70cacfba2c 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -284,7 +284,7 @@ else switch(construction_stage) if(6) - if (istype(W, /obj/item/weapon/wirecutters)) + if (W.is_wirecutter()) playsound(src, W.usesound, 100, 1) construction_stage = 5 user.update_examine_panel(src) @@ -292,7 +292,7 @@ update_icon() return if(5) - if (istype(W, /obj/item/weapon/screwdriver)) + if (W.is_screwdriver()) to_chat(user, "You begin removing the support lines.") playsound(src, W.usesound, 100, 1) if(!do_after(user,40 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 5) @@ -302,7 +302,7 @@ update_icon() to_chat(user, "You unscrew the support lines.") return - else if (istype(W, /obj/item/weapon/wirecutters)) + else if (W.is_wirecutter()) construction_stage = 6 user.update_examine_panel(src) to_chat(user, "You mend the outer grille.") @@ -332,7 +332,7 @@ update_icon() to_chat(user, "You press firmly on the cover, dislodging it.") return - else if (istype(W, /obj/item/weapon/screwdriver)) + else if (W.is_screwdriver()) to_chat(user, "You begin screwing down the support lines.") playsound(src, W.usesound, 100, 1) if(!do_after(user,40 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 4) @@ -343,7 +343,7 @@ to_chat(user, "You screw down the support lines.") return if(3) - if (istype(W, /obj/item/weapon/crowbar)) + if (W.is_crowbar()) to_chat(user, "You struggle to pry off the cover.") playsound(src, W.usesound, 100, 1) if(!do_after(user,100 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 3) @@ -354,7 +354,7 @@ to_chat(user, "You pry off the cover.") return if(2) - if (istype(W, /obj/item/weapon/wrench)) + if (W.is_wrench()) to_chat(user, "You start loosening the anchoring bolts which secure the support rods to their frame.") playsound(src, W.usesound, 100, 1) if(!do_after(user,40 * W.toolspeed) || !istype(src, /turf/simulated/wall) || construction_stage != 2) @@ -386,7 +386,7 @@ to_chat(user, "The slice through the support rods.") return if(0) - if(istype(W, /obj/item/weapon/crowbar)) + if(W.is_crowbar()) to_chat(user, "You struggle to pry off the outer sheath.") playsound(src, W.usesound, 100, 1) if(!do_after(user,100 * W.toolspeed) || !istype(src, /turf/simulated/wall) || !user || !W || !T ) diff --git a/code/game/turfs/simulated/water.dm b/code/game/turfs/simulated/water.dm index 0ec693b80e..565357f9e9 100644 --- a/code/game/turfs/simulated/water.dm +++ b/code/game/turfs/simulated/water.dm @@ -9,7 +9,11 @@ edge_blending_priority = -1 movement_cost = 4 outdoors = TRUE + layer = WATER_FLOOR_LAYER + + can_dirty = FALSE // It's water + var/depth = 1 // Higher numbers indicates deeper water. /turf/simulated/floor/water/initialize() diff --git a/code/game/turfs/turf_changing.dm b/code/game/turfs/turf_changing.dm index 3b5a797c0a..5e5d3d9baf 100644 --- a/code/game/turfs/turf_changing.dm +++ b/code/game/turfs/turf_changing.dm @@ -26,10 +26,9 @@ if (!N) return - // This makes sure that turfs are not changed to space when one side is part of a zone if(N == /turf/space) var/turf/below = GetBelow(src) - if(istype(below) && (air_master.has_valid_zone(below) || air_master.has_valid_zone(src))) + if(istype(below) && !istype(below,/turf/space)) N = /turf/simulated/open var/obj/fire/old_fire = fire diff --git a/code/game/verbs/advanced_who.dm b/code/game/verbs/advanced_who.dm index 855c70dafa..a452446e46 100644 --- a/code/game/verbs/advanced_who.dm +++ b/code/game/verbs/advanced_who.dm @@ -53,30 +53,22 @@ Lines += entry else for(var/client/C in clients) + var/entry = "\t" if(C.holder && C.holder.fakekey) - var/entry = "\t[C.key]" - var/mob/observer/dead/O = C.mob - entry = C.holder.fakekey - if(isobserver(O)) - entry += " - Observing" - else if(istype(O,/mob/new_player)) - entry += " - In Lobby" - else - entry += " - Playing" - Lines += entry + entry += "[C.holder.fakekey]" else - var/entry = "\t[C.key]" - var/mob/observer/dead/O = C.mob - if(isobserver(O)) //Woo, players can see - entry += " - Observing" - else if(istype(O,/mob/new_player)) - entry += " - In Lobby" - else - entry += " - Playing" - Lines += entry + entry += "[C.key]" + var/mob/observer/dead/O = C.mob + if(isobserver(O)) + entry += " - Observing" + else if(istype(O,/mob/new_player)) + entry += " - In Lobby" + else + entry += " - Playing" + Lines += entry for(var/line in sortList(Lines)) msg += "[line]\n" msg += "Total Players: [length(Lines)]" - src << msg + to_chat(src, msg) \ No newline at end of file diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index dfbd142908..56a440b639 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -133,7 +133,8 @@ var/list/admin_verbs_fun = list( /client/proc/roll_dices, /datum/admins/proc/call_supply_drop, /datum/admins/proc/call_drop_pod, - /client/proc/smite + /client/proc/smite, + /client/proc/admin_lightning_strike ) var/list/admin_verbs_spawn = list( diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 540cb07467..739ff89efc 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -273,8 +273,8 @@ if("runtime") M.change_mob_type( /mob/living/simple_animal/cat/fluff/Runtime , null, null, delmob ) if("corgi") M.change_mob_type( /mob/living/simple_animal/corgi , null, null, delmob ) if("ian") M.change_mob_type( /mob/living/simple_animal/corgi/Ian , null, null, delmob ) - if("crab") M.change_mob_type( /mob/living/simple_animal/crab , null, null, delmob ) - if("coffee") M.change_mob_type( /mob/living/simple_animal/crab/Coffee , null, null, delmob ) + if("crab") M.change_mob_type( /mob/living/simple_mob/animal/passive/crab , null, null, delmob ) + if("coffee") M.change_mob_type( /mob/living/simple_mob/animal/passive/crab/Coffee , null, null, delmob ) if("parrot") M.change_mob_type( /mob/living/simple_animal/parrot , null, null, delmob ) if("polyparrot") M.change_mob_type( /mob/living/simple_animal/parrot/Poly , null, null, delmob ) if("constructarmoured") M.change_mob_type( /mob/living/simple_mob/construct/juggernaut , null, null, delmob ) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index c6f2c0321e..db1f365afd 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -641,6 +641,7 @@ var/datum/weather/new_weather = input(usr, "What weather do you want to change to?", "Change Weather") as null|anything in planet.weather_holder.allowed_weather_types if(new_weather) planet.weather_holder.change_weather(new_weather) + planet.weather_holder.rebuild_forecast() var/log = "[key_name(src)] changed [planet.name]'s weather to [new_weather]." message_admins(log) log_admin(log) diff --git a/code/modules/admin/verbs/lightning_strike.dm b/code/modules/admin/verbs/lightning_strike.dm new file mode 100644 index 0000000000..16cb6b06dd --- /dev/null +++ b/code/modules/admin/verbs/lightning_strike.dm @@ -0,0 +1,115 @@ +/client/proc/admin_lightning_strike() + set name = "Lightning Strike" + set desc = "Causes lightning to strike on your tile. This will hurt things on or nearby it severely." + set category = "Fun" + + if(!check_rights(R_FUN)) + return + + var/result = alert(src, "Really strike your tile with lightning?", "Confirm Badmin" , "No", "Yes (Cosmetic)", "Yes (Real)") + + if(result == "No") + return + var/fake_lightning = result == "Yes (Cosmetic)" + + lightning_strike(get_turf(usr), fake_lightning) + log_and_message_admins("[key_name(src)] has caused [fake_lightning ? "cosmetic":"harmful"] lightning to strike at their position ([src.mob.x], [src.mob.y], [src.mob.z]). \ + (
JMP)") + +#define LIGHTNING_REDIRECT_RANGE 28 // How far in tiles certain things draw lightning from. +#define LIGHTNING_ZAP_RANGE 3 // How far the tesla effect zaps, as well as the bad effects from a direct strike. +#define LIGHTNING_POWER 20000 // How much 'zap' is in a strike, used for tesla_zap(). + +// The real lightning proc. +// This is global until I can figure out a better place for it. +// T is the turf that is being struck. If cosmetic is true, the lightning won't actually hurt anything. +/proc/lightning_strike(turf/T, cosmetic = FALSE) + // First, visuals. + + // Do a lightning flash for the whole planet, if the turf belongs to a planet. + var/datum/planet/P = null + P = SSplanets.z_to_planet[T.z] + if(P) + var/datum/weather_holder/holder = P.weather_holder + flick("lightning_flash", holder.special_visuals) + + // Before we do the other visuals, we need to see if something is going to hijack our intended target. + var/obj/machinery/power/grounding_rod/ground = null // Most of the bad effects of lightning will get negated if a grounding rod is nearby. + var/obj/machinery/power/tesla_coil/coil = null // However a tesla coil has higher priority and the strike will bounce. + + for(var/obj/machinery/power/thing in range(LIGHTNING_REDIRECT_RANGE, T)) + if(istype(thing, /obj/machinery/power/tesla_coil)) + var/turf/simulated/coil_turf = get_turf(thing) + if(istype(coil_turf) && thing.anchored && coil_turf.outdoors) + coil = thing + break + + if(istype(thing, /obj/machinery/power/grounding_rod)) + var/turf/simulated/rod_turf = get_turf(thing) + if(istype(rod_turf) && thing.anchored && rod_turf.outdoors) + ground = thing + + if(coil) // Coil gets highest priority. + T = coil.loc + else if(ground) + T = ground.loc + + // Now make the lightning strike sprite. It will fade and delete itself in a second. + new /obj/effect/temporary_effect/lightning_strike(T) + + // For those close up. + playsound(T, 'sound/effects/lightningbolt.ogg', 100, 1) + + // And for those far away. If the strike happens on a planet, everyone on the planet will hear it. + // Otherwise only those on the current z-level will hear it. + var/sound = get_sfx("thunder") + for(var/mob/M in player_list) + if((P && M.z in P.expected_z_levels) || M.z == T.z) + M.playsound_local(get_turf(M), soundin = sound, vol = 70, vary = FALSE, is_global = TRUE) + + if(cosmetic) // Everything beyond here involves potentially damaging things. If we don't want to do that, stop now. + return + + if(ground) // All is well. + ground.tesla_act(LIGHTNING_POWER, FALSE) + return + + else if(coil) // Otherwise lets bounce off the tesla coil. + coil.tesla_act(LIGHTNING_POWER, TRUE) + + else // Striking the turf directly. + tesla_zap(T, zap_range = LIGHTNING_ZAP_RANGE, power = LIGHTNING_POWER, explosive = FALSE, stun_mobs = TRUE) + + // Some extra effects. + // Some apply to those within zap range, others if they were a bit farther away. + for(var/mob/living/L in view(5, T)) + if(get_dist(L, T) <= LIGHTNING_ZAP_RANGE) // They probably got zapped. + // The actual damage/electrocution is handled by tesla_zap(). + L.Paralyse(5) + L.stuttering += 20 + L.make_jittery(20) + L.emp_act(1) + to_chat(L, span("critical", "You've been struck by lightning!")) + + // If a non-player simplemob was struck, inflict huge damage. + // If the damage is fatal, the SA is turned to ash. + if(istype(L, /mob/living/simple_animal) && !L.key) + var/mob/living/simple_animal/SA = L + SA.adjustFireLoss(200) + SA.updatehealth() + if(SA.health <= 0) // Might be best to check/give simple_mobs siemens when this gets ported to new mobs. + SA.visible_message(span("critical", "\The [SA] disintegrates into ash!")) + SA.ash() + continue // No point deafening something that wont exist. + + // Deafen them. + if(L.get_ear_protection() < 2) + L.AdjustSleeping(-100) + if(iscarbon(L)) + var/mob/living/carbon/C = L + C.ear_deaf += 10 + to_chat(L, span("danger", "Lightning struck nearby, and the thunderclap is deafening!")) + +#undef GROUNDING_ROD_RANGE +#undef LIGHTNING_ZAP_RANGE +#undef LIGHTNING_POWER \ No newline at end of file diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 747b0d442b..8c965f0deb 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -102,7 +102,7 @@ if((!A.secured) && (!secured)) attach_assembly(A,user) return - if(isscrewdriver(W)) + if(W.is_screwdriver()) if(toggle_secure()) to_chat(user, "\The [src] is ready!") else diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 1bbf0597e6..0cc5f49682 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -144,7 +144,7 @@ /obj/item/device/assembly_holder/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(isscrewdriver(W)) + if(W.is_screwdriver()) if(!a_left || !a_right) to_chat(user, " BUG:Assembly part missing, please report this!") return diff --git a/code/modules/assembly/igniter.dm b/code/modules/assembly/igniter.dm index 4c23f988cd..88845d0651 100644 --- a/code/modules/assembly/igniter.dm +++ b/code/modules/assembly/igniter.dm @@ -13,7 +13,7 @@ if(holder && istype(holder.loc,/obj/item/weapon/grenade/chem_grenade)) var/obj/item/weapon/grenade/chem_grenade/grenade = holder.loc - grenade.prime() + grenade.detonate() else var/turf/location = get_turf(loc) if(location) diff --git a/code/modules/assembly/shock_kit.dm b/code/modules/assembly/shock_kit.dm index 0fbefc88d8..fd5c35bbfb 100644 --- a/code/modules/assembly/shock_kit.dm +++ b/code/modules/assembly/shock_kit.dm @@ -15,7 +15,7 @@ return /obj/item/assembly/shock_kit/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench) && !status) + if(W.is_wrench() && !status) var/turf/T = loc if(ismob(T)) T = T.loc @@ -27,7 +27,7 @@ part2 = null qdel(src) return - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) status = !status to_chat(user, "[src] is now [status ? "secured" : "unsecured"]!") playsound(src, W.usesound, 50, 1) diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index a06e7bff99..5142f6e45e 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -29,8 +29,7 @@ /////////////// //SOUND STUFF// /////////////// - var/ambience_playing= null - var/played = 0 + var/time_last_ambience_played = 0 // world.time when ambience was played to this client, to space out ambience sounds. //////////// //SECURITY// diff --git a/code/modules/client/preference_setup/loadout/loadout_suit.dm b/code/modules/client/preference_setup/loadout/loadout_suit.dm index 1c9ec29880..41d37b8a67 100644 --- a/code/modules/client/preference_setup/loadout/loadout_suit.dm +++ b/code/modules/client/preference_setup/loadout/loadout_suit.dm @@ -247,7 +247,7 @@ datum/gear/suit/duster allowed_roles = list("Cargo Technician","Quartermaster") /datum/gear/suit/roles/poncho/cloak/mining - display_name = "cloak, cargo" + display_name = "cloak, mining" path = /obj/item/clothing/accessory/poncho/roles/cloak/mining allowed_roles = list("Quartermaster","Shaft Miner") diff --git a/code/modules/client/preference_setup/loadout/loadout_xeno.dm b/code/modules/client/preference_setup/loadout/loadout_xeno.dm index c7d93294ac..e053f3b8ef 100644 --- a/code/modules/client/preference_setup/loadout/loadout_xeno.dm +++ b/code/modules/client/preference_setup/loadout/loadout_xeno.dm @@ -107,29 +107,29 @@ /datum/gear/uniform/undercoat display_name = "undercoat selection (Teshari)" - path = /obj/item/clothing/under/seromi/undercoat + path = /obj/item/clothing/under/seromi/undercoat/standard whitelisted = SPECIES_TESHARI sort_category = "Xenowear" /datum/gear/uniform/undercoat/New() ..() var/list/undercoats = list() - for(var/undercoat in typesof(/obj/item/clothing/under/seromi/undercoat)) - var/obj/item/clothing/under/seromi/undercoat/undercoat_type = undercoat + for(var/undercoat in typesof(/obj/item/clothing/under/seromi/undercoat/standard)) + var/obj/item/clothing/under/seromi/undercoat/standard/undercoat_type = undercoat undercoats[initial(undercoat_type.name)] = undercoat_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(undercoats)) /datum/gear/suit/cloak display_name = "cloak selection (Teshari)" - path = /obj/item/clothing/suit/storage/seromi/cloak + path = /obj/item/clothing/suit/storage/seromi/cloak/standard whitelisted = SPECIES_TESHARI sort_category = "Xenowear" /datum/gear/suit/cloak/New() ..() var/list/cloaks = list() - for(var/cloak in typesof(/obj/item/clothing/suit/storage/seromi/cloak)) - var/obj/item/clothing/suit/storage/seromi/cloak/cloak_type = cloak + for(var/cloak in typesof(/obj/item/clothing/suit/storage/seromi/cloak/standard)) + var/obj/item/clothing/suit/storage/seromi/cloak/standard/cloak_type = cloak cloaks[initial(cloak_type.name)] = cloak_type gear_tweaks += new/datum/gear_tweak/path(sortAssoc(cloaks)) @@ -160,4 +160,203 @@ for(var/cohesionsuit in (typesof(/obj/item/clothing/under/cohesion))) var/obj/item/clothing/under/cohesion/cohesion_type = cohesionsuit cohesionsuits[initial(cohesion_type.name)] = cohesion_type - gear_tweaks += new/datum/gear_tweak/path(sortAssoc(cohesionsuits)) \ No newline at end of file + gear_tweaks += new/datum/gear_tweak/path(sortAssoc(cohesionsuits)) + +/datum/gear/uniform/dept + whitelisted = SPECIES_TESHARI + sort_category = "Xenowear" + +/datum/gear/uniform/dept/undercoat/ce + display_name = "Teshari Chief Engineer Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/ce + allowed_roles = list("Chief Engineer") + +/datum/gear/uniform/dept/undercoat/ce_w + display_name = "Teshari Chief Engineer Undercoat (White)" + path = /obj/item/clothing/under/seromi/undercoat/jobs/ce_w + allowed_roles = list("Chief Engineer") +/* +/datum/gear/uniform/undercoat/rd + display_name = "cloak, research director" + path = /obj/item/clothing/accessory/poncho/roles/cloak/rd + allowed_roles = list("Research Director") +*/ +/datum/gear/uniform/dept/undercoat/qm + display_name = "Teshari Quarter Master Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/qm + allowed_roles = list("Quartermaster") + +/datum/gear/uniform/dept/undercoat/command + display_name = "Teshari Command Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/command + allowed_roles = list("Colony Director","Head of Personnel","Head of Security","Chief Engineer","Chief Medical Officer") + +/datum/gear/uniform/dept/undercoat/command_g + display_name = "Teshari Command Undercoat (gold buttons)" + path = /obj/item/clothing/under/seromi/undercoat/jobs/command_g + allowed_roles = list("Colony Director","Head of Personnel","Head of Security","Chief Engineer","Chief Medical Officer") + +/datum/gear/uniform/dept/undercoat/cmo + display_name = "Teshari Chief Medical Officer Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/cmo + allowed_roles = list("Chief Medical Officer") + +/datum/gear/uniform/dept/undercoat/cargo + display_name = "Teshari Cargo Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/cargo + allowed_roles = list("Cargo Technician","Quartermaster","Shaft Miner") + +/datum/gear/uniform/dept/undercoat/mining + display_name = "Teshari Mining Undercoat" + path = /obj/item/clothing/accessory/poncho/roles/cloak/mining + allowed_roles = list("Quartermaster","Shaft Miner") + +/datum/gear/uniform/dept/undercoat/security + display_name = "Teshari Security Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/sec + allowed_roles = list("Head of Security","Detective","Warden","Security Officer",) + +/datum/gear/uniform/dept/undercoat/service + display_name = "Teshari Service Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/service + allowed_roles = list("Head of Personnel","Bartender","Botanist","Janitor","Chef","Librarian") + +/datum/gear/uniform/dept/undercoat/engineer + display_name = "Teshari Engineer Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/engineer + allowed_roles = list("Chief Engineer","Station Engineer") + +/datum/gear/uniform/dept/undercoat/atmos + display_name = "Teshari Atmos Tech Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/atmos + allowed_roles = list("Chief Engineer","Atmospheric Technician") + +/datum/gear/uniform/dept/undercoat/research + display_name = "Teshari Science Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/sci + allowed_roles = list("Research Director","Scientist", "Roboticist", "Xenobiologist") + +/datum/gear/uniform/dept/undercoat/robo + display_name = "Teshari Roboticist Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/robo + allowed_roles = list("Roboticist") + +/datum/gear/uniform/dept/undercoat/medical + display_name = "Teshari Medical Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/medical + allowed_roles = list("Medical Doctor","Chief Medical Officer","Chemist","Paramedic","Geneticist", "Psychiatrist") + +/datum/gear/uniform/dept/undercoat/chemistry + display_name = "Teshari Chemistry Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/chemistry + allowed_roles = list("Chemist") + +/datum/gear/uniform/dept/undercoat/virology + display_name = "Teshari Medical Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/viro + allowed_roles = list("Medical Doctor") + +/datum/gear/uniform/dept/undercoat/paramedic + display_name = "Teshari Paramedic Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/para + allowed_roles = list("Paramedic") + +/datum/gear/uniform/dept/undercoat/iaa + display_name = "Teshari IAA Undercoat" + path = /obj/item/clothing/under/seromi/undercoat/jobs/iaa + allowed_roles = list("Internal Affairs Agent") + +/datum/gear/suit/dept/cloak/ + whitelisted = SPECIES_TESHARI + sort_category = "Xenowear" + +/datum/gear/suit/cloak/dept/ce + display_name = "Teshari Chief Engineer Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/ce + allowed_roles = list("Chief Engineer") +/* +/datum/gear/suit/cloak/rd + display_name = "cloak, research director" + path = /obj/item/clothing/accessory/poncho/roles/cloak/rd + allowed_roles = list("Research Director") +*/ + +/datum/gear/suit/dept/cloak/qm + display_name = "Teshari Quarter Master Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/qm + allowed_roles = list("Quartermaster") + +/datum/gear/suit/dept/cloak/command + display_name = "Teshari Command Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/command + allowed_roles = list("Colony Director","Head of Personnel","Head of Security","Chief Engineer","Chief Medical Officer") + +/datum/gear/suit/dept/cloak/cmo + display_name = "Teshari Chief Medical Officer Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/cmo + allowed_roles = list("Chief Medical Officer") + +/datum/gear/suit/dept/cloak/cargo + display_name = "Teshari Cargo Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/cargo + allowed_roles = list("Cargo Technician","Quartermaster","Shaft Miner") + +/datum/gear/suit/dept/cloak/mining + display_name = "Teshari Mining Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/mining + allowed_roles = list("Quartermaster","Shaft Miner") + +/datum/gear/suit/dept/cloak/security + display_name = "Teshari Security Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/sec + allowed_roles = list("Head of Security","Detective","Warden","Security Officer",) + +/datum/gear/suit/dept/cloak/service + display_name = "Teshari Service Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/service + allowed_roles = list("Head of Personnel","Bartender","Botanist","Janitor","Chef","Librarian") + +/datum/gear/suit/dept/cloak/engineer + display_name = "Teshari Engineer Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/eningeer + allowed_roles = list("Chief Engineer","Station Engineer") + +/datum/gear/suit/dept/cloak/atmos + display_name = "Teshari Atmos Tech Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/atmos + allowed_roles = list("Chief Engineer","Atmospheric Technician") + +/datum/gear/suit/dept/cloak/research + display_name = "Teshari Science Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/sci + allowed_roles = list("Research Director","Scientist", "Roboticist", "Xenobiologist") + +/datum/gear/suit/dept/cloak/robo + display_name = "Teshari Roboticist Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/robo + allowed_roles = list("Roboticist") + +/datum/gear/suit/dept/cloak/medical + display_name = "Teshari Medical Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/medical + allowed_roles = list("Medical Doctor","Chief Medical Officer","Chemist","Paramedic","Geneticist", "Psychiatrist") + +/datum/gear/suit/dept/cloak/chemistry + display_name = "Teshari Chemistry Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/chemistry + allowed_roles = list("Chemist") + +/datum/gear/suit/dept/cloak/virology + display_name = "Teshari Medical Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/viro + allowed_roles = list("Medical Doctor") + +/datum/gear/suit/dept/cloak/paramedic + display_name = "Teshari Paramedic Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/para + allowed_roles = list("Paramedic") + +/datum/gear/suit/dept/cloak/iaa + display_name = "Teshari IAA Cloak" + path = /obj/item/clothing/suit/storage/seromi/cloak/jobs/iaa + allowed_roles = list("Internal Affairs Agent") diff --git a/code/modules/client/preference_setup/traits/trait_defines.dm b/code/modules/client/preference_setup/traits/trait_defines.dm index f8405eb7f8..82e3aee738 100644 --- a/code/modules/client/preference_setup/traits/trait_defines.dm +++ b/code/modules/client/preference_setup/traits/trait_defines.dm @@ -92,6 +92,30 @@ modifier_type = /datum/modifier/trait/larger mutually_exclusive = list(/datum/trait/modifier/physical/smaller, /datum/trait/modifier/physical/small, /datum/trait/modifier/physical/large) +/datum/trait/modifier/physical/colorblind_protanopia + name = "Protanopia" + desc = "You have a form of red-green colorblindness. You cannot see reds, and have trouble distinguishing them from yellows and greens." + modifier_type = /datum/modifier/trait/colorblind_protanopia + mutually_exclusive = list(/datum/trait/modifier/physical/colorblind_deuteranopia, /datum/trait/modifier/physical/colorblind_tritanopia, /datum/trait/modifier/physical/colorblind_monochrome) + +/datum/trait/modifier/physical/colorblind_deuteranopia + name = "Deuteranopia" + desc = "You have a form of red-green colorblindness. You cannot see greens, and have trouble distinguishing them from yellows and reds." + modifier_type = /datum/modifier/trait/colorblind_deuteranopia + mutually_exclusive = list(/datum/trait/modifier/physical/colorblind_protanopia, /datum/trait/modifier/physical/colorblind_tritanopia, /datum/trait/modifier/physical/colorblind_monochrome) + +/datum/trait/modifier/physical/colorblind_tritanopia + name = "Tritanopia" + desc = "You have a form of blue-yellow colorblindness. You have trouble distinguishing between blues, greens, and yellows, and see blues and violets as dim." + modifier_type = /datum/modifier/trait/colorblind_tritanopia + mutually_exclusive = list(/datum/trait/modifier/physical/colorblind_protanopia, /datum/trait/modifier/physical/colorblind_deuteranopia, /datum/trait/modifier/physical/colorblind_monochrome) + +/datum/trait/modifier/physical/colorblind_monochrome + name = "Monochromacy" + desc = "You are fully colorblind. Your condition is rare, but you can see no colors at all." + modifier_type = /datum/modifier/trait/colorblind_monochrome + mutually_exclusive = list(/datum/trait/modifier/physical/colorblind_protanopia, /datum/trait/modifier/physical/colorblind_deuteranopia, /datum/trait/modifier/physical/colorblind_tritanopia) + // These two traits might be borderline, feel free to remove if they get abused. /datum/trait/modifier/physical/high_metabolism name = "High Metabolism" diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 33c17b51d2..8b46611619 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -231,7 +231,7 @@ return 0 // return 1 to cancel attack_hand() /*/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user) - if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/scalpel)) + if(W.is_wirecutter() || istype(W, /obj/item/weapon/scalpel)) if (clipped) user << "The [src] have already been clipped!" update_icon() diff --git a/code/modules/clothing/gloves/boxing.dm b/code/modules/clothing/gloves/boxing.dm index 2de7c06aeb..739f3e3977 100644 --- a/code/modules/clothing/gloves/boxing.dm +++ b/code/modules/clothing/gloves/boxing.dm @@ -4,11 +4,13 @@ icon_state = "boxing" item_state_slots = list(slot_r_hand_str = "red", slot_l_hand_str = "red") +/* /obj/item/clothing/gloves/boxing/attackby(obj/item/weapon/W, mob/user) - if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/surgical/scalpel)) + if(W.is_wirecutter() || istype(W, /obj/item/weapon/surgical/scalpel)) user << "That won't work." //Nope return ..() +*/ /obj/item/clothing/gloves/boxing/green icon_state = "boxinggreen" diff --git a/code/modules/clothing/head/hood.dm b/code/modules/clothing/head/hood.dm new file mode 100644 index 0000000000..c66589eb6a --- /dev/null +++ b/code/modules/clothing/head/hood.dm @@ -0,0 +1,71 @@ +/obj/item/clothing/head/hood + name = "hood" + desc = "A generic hood." + icon_state = "generic_hood" + body_parts_covered = HEAD + cold_protection = HEAD + flags_inv = HIDEEARS | BLOCKHAIR + +// Winter coats +/obj/item/clothing/head/hood/winter + name = "winter hood" + desc = "A hood attached to a heavy winter jacket." + icon_state = "generic_hood" + min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE + +/obj/item/clothing/head/hood/winter/captain + name = "colony director's winter hood" + armor = list(melee = 20, bullet = 15, laser = 20, energy = 10, bomb = 15, bio = 0, rad = 0) + +/obj/item/clothing/head/hood/winter/security + name = "security winter hood" + armor = list(melee = 25, bullet = 20, laser = 20, energy = 15, bomb = 20, bio = 0, rad = 0) + +/obj/item/clothing/head/hood/winter/medical + name = "medical winter hood" + armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0) + +/obj/item/clothing/head/hood/winter/science + name = "science winter hood" + armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0) + +/obj/item/clothing/head/hood/winter/engineering + name = "engineering winter hood" + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 20) + +/obj/item/clothing/head/hood/winter/engineering/atmos + name = "atmospherics winter hood" + +/obj/item/clothing/head/hood/winter/hydro + name = "hydroponics winter hood" + +/obj/item/clothing/head/hood/winter/cargo + name = "cargo winter hood" + +/obj/item/clothing/head/hood/winter/miner + name = "mining winter hood" + armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + +// Explorer gear +/obj/item/clothing/head/hood/explorer + name = "explorer hood" + desc = "An armoured hood for exploring harsh environments." + icon_state = "explorer" + flags = THICKMATERIAL + min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE + siemens_coefficient = 0.9 + armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 35, bio = 75, rad = 35) + +// Costumes +/obj/item/clothing/head/hood/carp_hood + name = "carp hood" + desc = "A hood attached to a carp costume." + icon_state = "carp_casual" + item_state_slots = list(slot_r_hand_str = "carp_casual", slot_l_hand_str = "carp_casual") //Does not exist -S2- + min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE //Space carp like space, so you should too + +/obj/item/clothing/head/hood/ian_hood + name = "corgi hood" + desc = "A hood that looks just like a corgi's head, it won't guarantee dog biscuits." + icon_state = "ian" + item_state_slots = list(slot_r_hand_str = "ian", slot_l_hand_str = "ian") //Does not exist -S2- \ No newline at end of file diff --git a/code/modules/clothing/rings/rings.dm b/code/modules/clothing/rings/rings.dm index 852ccfdb82..699be51454 100644 --- a/code/modules/clothing/rings/rings.dm +++ b/code/modules/clothing/rings/rings.dm @@ -51,7 +51,7 @@ /obj/item/clothing/gloves/ring/reagent/sleepy/New() ..() - reagents.add_reagent(/datum/reagent/chloralhydrate, 15) // Less than a sleepy-pen, but still enough to knock someone out + reagents.add_reagent("chloralhydrate", 15) // Less than a sleepy-pen, but still enough to knock someone out ///////////////////////////////////////// //Seals and Signet Rings diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index ac191acf5e..73556035bf 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -987,15 +987,10 @@ // AIs are a bit slower than regular and ignore move intent. wearer_move_delay = world.time + ai_controlled_move_delay - var/tickcomp = 0 - if(config.Tickcomp) - tickcomp = ((1/(world.tick_lag))*1.3) - 1.3 - wearer_move_delay += tickcomp - if(istype(wearer.buckled, /obj/vehicle)) //manually set move_delay for vehicles so we don't inherit any mob movement penalties //specific vehicle move delays are set in code\modules\vehicles\vehicle.dm - wearer_move_delay = world.time + tickcomp + wearer_move_delay = world.time return wearer.buckled.relaymove(wearer, direction) if(istype(wearer.machine, /obj/machinery)) diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm index cda9d51796..39b23827d8 100644 --- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm +++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm @@ -1,6 +1,6 @@ /obj/item/weapon/rig/attackby(obj/item/W as obj, mob/living/user as mob) - - if(!istype(user)) return 0 + if(!istype(user)) + return 0 if(electrified != 0) if(shock(user)) //Handles removing charge from the cell, as well. No need to do that here. @@ -14,78 +14,79 @@ if(W.GetID()) if(subverted) locked = 0 - user << "It looks like the locking system has been shorted out." + to_chat(user, "It looks like the locking system has been shorted out.") return if((!req_access || !req_access.len) && (!req_one_access || !req_one_access.len)) locked = 0 - user << "\The [src] doesn't seem to have a locking mechanism." + to_chat(user, "\The [src] doesn't seem to have a locking mechanism.") return if(security_check_enabled && !src.allowed(user)) - user << "Access denied." + to_chat(user, "Access denied.") return locked = !locked - user << "You [locked ? "lock" : "unlock"] \the [src] access panel." + to_chat(user, "You [locked ? "lock" : "unlock"] \the [src] access panel.") return - else if(istype(W,/obj/item/weapon/crowbar)) - + else if(W.is_crowbar()) if(!open && locked) - user << "The access panel is locked shut." + to_chat(user, "The access panel is locked shut.") return open = !open - user << "You [open ? "open" : "close"] the access panel." + to_chat(user, "You [open ? "open" : "close"] the access panel.") return if(open) - // Hacking. - if(istype(W,/obj/item/weapon/wirecutters) || istype(W,/obj/item/device/multitool)) + if(W.is_wirecutter() || istype(W, /obj/item/device/multitool)) if(open) wires.Interact(user) else - user << "You can't reach the wiring." + to_chat(user, "You can't reach the wiring.") return // Air tank. if(istype(W,/obj/item/weapon/tank)) //Todo, some kind of check for suits without integrated air supplies. if(air_supply) - user << "\The [src] already has a tank installed." + to_chat(user, "\The [src] already has a tank installed.") + return + + if(!user.unEquip(W)) return - if(!user.unEquip(W)) return air_supply = W W.forceMove(src) - user << "You slot [W] into [src] and tighten the connecting valve." + to_chat(user, "You slot [W] into [src] and tighten the connecting valve.") return // Check if this is a hardsuit upgrade or a modification. else if(istype(W,/obj/item/rig_module)) - if(istype(src.loc,/mob/living/carbon/human)) var/mob/living/carbon/human/H = src.loc if(H.back == src) - user << "You can't install a hardsuit module while the suit is being worn." + to_chat(user, "You can't install a hardsuit module while the suit is being worn.") return 1 - if(!installed_modules) installed_modules = list() + if(!installed_modules) + installed_modules = list() if(installed_modules.len) for(var/obj/item/rig_module/installed_mod in installed_modules) if(!installed_mod.redundant && istype(installed_mod,W)) - user << "The hardsuit already has a module of that class installed." + to_chat(user, "The hardsuit already has a module of that class installed.") return 1 var/obj/item/rig_module/mod = W - user << "You begin installing \the [mod] into \the [src]." + to_chat(user, "You begin installing \the [mod] into \the [src].") if(!do_after(user,40)) return if(!user || !W) return - if(!user.unEquip(mod)) return - user << "You install \the [mod] into \the [src]." + if(!user.unEquip(mod)) + return + to_chat(user, "You install \the [mod] into \the [src].") installed_modules |= mod mod.forceMove(src) mod.installed(src) @@ -94,27 +95,28 @@ else if(!cell && istype(W,/obj/item/weapon/cell)) - if(!user.unEquip(W)) return - user << "You jack \the [W] into \the [src]'s battery mount." + if(!user.unEquip(W)) + return + to_chat(user, "You jack \the [W] into \the [src]'s battery mount.") W.forceMove(src) src.cell = W return - else if(istype(W,/obj/item/weapon/wrench)) + else if(W.is_wrench()) if(!air_supply) - user << "There is not tank to remove." + to_chat(user, "There is not tank to remove.") return if(user.r_hand && user.l_hand) air_supply.forceMove(get_turf(user)) else user.put_in_hands(air_supply) - user << "You detach and remove \the [air_supply]." + to_chat(user, "You detach and remove \the [air_supply].") air_supply = null return - else if(istype(W,/obj/item/weapon/screwdriver)) + else if(W.is_screwdriver()) var/list/current_mounts = list() if(cell) current_mounts += "cell" @@ -127,7 +129,7 @@ if(istype(src.loc,/mob/living/carbon/human) && to_remove != "cell") var/mob/living/carbon/human/H = src.loc if(H.back == src) - user << "You can't remove an installed device while the hardsuit is being worn." + to_chat(user, "You can't remove an installed device while the hardsuit is being worn.") return switch(to_remove) @@ -135,7 +137,7 @@ if("cell") if(cell) - user << "You detatch \the [cell] from \the [src]'s battery mount." + to_chat(user, "You detatch \the [cell] from \the [src]'s battery mount.") for(var/obj/item/rig_module/module in installed_modules) module.deactivate() if(user.r_hand && user.l_hand) @@ -144,7 +146,7 @@ cell.forceMove(user.put_in_hands(cell)) cell = null else - user << "There is nothing loaded in that mount." + to_chat(user, "There is nothing loaded in that mount.") if("system module") @@ -155,7 +157,7 @@ possible_removals[module.name] = module if(!possible_removals.len) - user << "There are no installed modules to remove." + to_chat(user, "There are no installed modules to remove.") return var/removal_choice = input("Which module would you like to remove?") as null|anything in possible_removals @@ -163,7 +165,7 @@ return var/obj/item/rig_module/removed = possible_removals[removal_choice] - user << "You detatch \the [removed] from \the [src]." + to_chat(user, "You detatch \the [removed] from \the [src].") removed.forceMove(get_turf(src)) removed.removed() installed_modules -= removed @@ -192,5 +194,5 @@ req_one_access.Cut() locked = 0 subverted = 1 - user << "You short out the access protocol for the suit." + to_chat(user, "You short out the access protocol for the suit.") return 1 diff --git a/code/modules/clothing/spacesuits/rig/suits/ert.dm b/code/modules/clothing/spacesuits/rig/suits/ert.dm index 915c2bc698..33b4e07351 100644 --- a/code/modules/clothing/spacesuits/rig/suits/ert.dm +++ b/code/modules/clothing/spacesuits/rig/suits/ert.dm @@ -14,8 +14,8 @@ siemens_coefficient= 0.5 armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100) - allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \ - /obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, \ + allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/tool/crowbar, \ + /obj/item/weapon/tool/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/tool/wirecutters, /obj/item/weapon/tool/wrench, /obj/item/device/multitool, \ /obj/item/device/radio, /obj/item/device/analyzer,/obj/item/weapon/storage/briefcase/inflatable, /obj/item/weapon/melee/baton, /obj/item/weapon/gun, \ /obj/item/weapon/storage/firstaid, /obj/item/weapon/reagent_containers/hypospray, /obj/item/roller) diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index ef78d32f03..d755540b91 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -68,9 +68,9 @@ var/list/part_list = new for(var/obj/item/I in list(helmet,boots,tank,cooler)) part_list += "\a [I]" - user << "\The [src] has [english_list(part_list)] installed." + to_chat(user, "\The [src] has [english_list(part_list)] installed.") if(tank && in_range(src,user)) - user << "The wrist-mounted pressure gauge reads [max(round(tank.air_contents.return_pressure()),0)] kPa remaining in \the [tank]." + to_chat(user, "The wrist-mounted pressure gauge reads [max(round(tank.air_contents.return_pressure()),0)] kPa remaining in \the [tank].") /obj/item/clothing/suit/space/void/refit_for_species(var/target_species) ..() @@ -95,23 +95,23 @@ if(helmet) if(H.head) - M << "You are unable to deploy your suit's helmet as \the [H.head] is in the way." + to_chat(M, "You are unable to deploy your suit's helmet as \the [H.head] is in the way.") else if (H.equip_to_slot_if_possible(helmet, slot_head)) - M << "Your suit's helmet deploys with a hiss." + to_chat(M, "Your suit's helmet deploys with a hiss.") helmet.canremove = 0 if(tank) if(H.s_store) //In case someone finds a way. - M << "Alarmingly, the valve on your suit's installed tank fails to engage." + to_chat(M, "Alarmingly, the valve on your suit's installed tank fails to engage.") else if (H.equip_to_slot_if_possible(tank, slot_s_store)) - M << "The valve on your suit's installed tank safely engages." + to_chat(M, "The valve on your suit's installed tank safely engages.") tank.canremove = 0 if(cooler) if(H.s_store) //Ditto - M << "Alarmingly, the cooling unit installed into your suit fails to deploy." + to_chat(M, "Alarmingly, the cooling unit installed into your suit fails to deploy.") else if (H.equip_to_slot_if_possible(cooler, slot_s_store)) - M << "Your suit's cooling unit deploys." + to_chat(M, "Your suit's cooling unit deploys.") cooler.canremove = 0 @@ -153,28 +153,31 @@ if(!istype(src.loc,/mob/living)) return if(!helmet) - usr << "There is no helmet installed." + to_chat(usr, "There is no helmet installed.") return var/mob/living/carbon/human/H = usr - if(!istype(H)) return - if(H.stat) return - if(H.wear_suit != src) return + if(!istype(H)) + return + if(H.stat) + return + if(H.wear_suit != src) + return if(H.head == helmet) - H << "You retract your suit helmet." + to_chat(H, "You retract your suit helmet.") helmet.canremove = 1 H.drop_from_inventory(helmet) helmet.forceMove(src) else if(H.head) - H << "You cannot deploy your helmet while wearing \the [H.head]." + to_chat(H, "You cannot deploy your helmet while wearing \the [H.head].") return if(H.equip_to_slot_if_possible(helmet, slot_head)) helmet.pickup(H) helmet.canremove = 0 - H << "You deploy your suit helmet, sealing you off from the world." + to_chat(H, "You deploy your suit helmet, sealing you off from the world.") helmet.update_light(H) /obj/item/clothing/suit/space/void/verb/eject_tank() @@ -186,7 +189,7 @@ if(!istype(src.loc,/mob/living)) return if(!tank && !cooler) - usr << "There is no tank or cooling unit inserted." + to_chat(usr, "There is no tank or cooling unit inserted.") return var/mob/living/carbon/human/H = usr @@ -202,7 +205,7 @@ else removing = cooler cooler = null - H << "You press the emergency release, ejecting \the [removing] from your suit." + to_chat(H, "You press the emergency release, ejecting \the [removing] from your suit.") removing.canremove = 1 H.drop_from_inventory(removing) @@ -214,75 +217,75 @@ return ..() if(istype(src.loc,/mob/living)) - user << "You cannot modify \the [src] while it is being worn." + to_chat(user, "You cannot modify \the [src] while it is being worn.") return - if(istype(W,/obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) if(helmet || boots || tank) var/choice = input("What component would you like to remove?") as null|anything in list(helmet,boots,tank,cooler) if(!choice) return if(choice == tank) //No, a switch doesn't work here. Sorry. ~Techhead - user << "You pop \the [tank] out of \the [src]'s storage compartment." + to_chat(user, "You pop \the [tank] out of \the [src]'s storage compartment.") tank.forceMove(get_turf(src)) playsound(src, W.usesound, 50, 1) src.tank = null else if(choice == cooler) - user << "You pop \the [cooler] out of \the [src]'s storage compartment." + to_chat(user, "You pop \the [cooler] out of \the [src]'s storage compartment.") cooler.forceMove(get_turf(src)) playsound(src, W.usesound, 50, 1) src.cooler = null else if(choice == helmet) - user << "You detatch \the [helmet] from \the [src]'s helmet mount." + to_chat(user, "You detatch \the [helmet] from \the [src]'s helmet mount.") helmet.forceMove(get_turf(src)) playsound(src, W.usesound, 50, 1) src.helmet = null else if(choice == boots) - user << "You detatch \the [boots] from \the [src]'s boot mounts." + to_chat(user, "You detatch \the [boots] from \the [src]'s boot mounts.") boots.forceMove(get_turf(src)) playsound(src, W.usesound, 50, 1) src.boots = null else - user << "\The [src] does not have anything installed." + to_chat(user, "\The [src] does not have anything installed.") return else if(istype(W,/obj/item/clothing/head/helmet/space)) if(helmet) - user << "\The [src] already has a helmet installed." + to_chat(user, "\The [src] already has a helmet installed.") else - user << "You attach \the [W] to \the [src]'s helmet mount." + to_chat(user, "You attach \the [W] to \the [src]'s helmet mount.") user.drop_item() W.forceMove(src) src.helmet = W return else if(istype(W,/obj/item/clothing/shoes/magboots)) if(boots) - user << "\The [src] already has magboots installed." + to_chat(user, "\The [src] already has magboots installed.") else - user << "You attach \the [W] to \the [src]'s boot mounts." + to_chat(user, "You attach \the [W] to \the [src]'s boot mounts.") user.drop_item() W.forceMove(src) boots = W return else if(istype(W,/obj/item/weapon/tank)) if(tank) - user << "\The [src] already has an airtank installed." + to_chat(user, "\The [src] already has an airtank installed.") else if(cooler) - user << "\The [src]'s suit cooling unit is in the way. Remove it first." + to_chat(user, "\The [src]'s suit cooling unit is in the way. Remove it first.") else if(istype(W,/obj/item/weapon/tank/phoron)) - user << "\The [W] cannot be inserted into \the [src]'s storage compartment." + to_chat(user, "\The [W] cannot be inserted into \the [src]'s storage compartment.") else - user << "You insert \the [W] into \the [src]'s storage compartment." + to_chat(user, "You insert \the [W] into \the [src]'s storage compartment.") user.drop_item() W.forceMove(src) tank = W return else if(istype(W,/obj/item/device/suit_cooling_unit)) if(cooler) - user << "\The [src] already has a suit cooling unit installed." + to_chat(user, "\The [src] already has a suit cooling unit installed.") else if(tank) - user << "\The [src]'s airtank is in the way. Remove it first." + to_chat(user, "\The [src]'s airtank is in the way. Remove it first.") else - user << "You insert \the [W] into \the [src]'s storage compartment." + to_chat(user, "You insert \the [W] into \the [src]'s storage compartment.") user.drop_item() W.forceMove(src) cooler = W diff --git a/code/modules/clothing/suits/aliens/seromi.dm b/code/modules/clothing/suits/aliens/seromi.dm index 62a013644f..4e3e081a7b 100644 --- a/code/modules/clothing/suits/aliens/seromi.dm +++ b/code/modules/clothing/suits/aliens/seromi.dm @@ -1,5 +1,5 @@ /obj/item/clothing/suit/storage/seromi/cloak - name = "black and orange cloak " + name = "broken cloak" desc = "It drapes over a Teshari's shoulders and closes at the neck with pockets convienently placed inside." icon = 'icons/mob/species/seromi/teshari_cloak.dmi' icon_override = 'icons/mob/species/seromi/teshari_cloak.dmi' @@ -8,127 +8,232 @@ species_restricted = list(SPECIES_TESHARI) body_parts_covered = UPPER_TORSO|ARMS -/obj/item/clothing/suit/storage/seromi/cloak/black_orange +/obj/item/clothing/suit/storage/seromi/cloak/standard/black_orange name = "black and orange cloak" icon_state = "tesh_cloak_bo" item_state = "tesh_cloak_bo" -/obj/item/clothing/suit/storage/seromi/cloak/black_grey +/obj/item/clothing/suit/storage/seromi/cloak/standard/black_grey name = "black and grey cloak" icon_state = "tesh_cloak_bg" item_state = "tesh_cloak_bg" -/obj/item/clothing/suit/storage/seromi/cloak/black_midgrey +/obj/item/clothing/suit/storage/seromi/cloak/standard/black_midgrey name = "black and medium grey cloak" icon_state = "tesh_cloak_bmg" item_state = "tesh_cloak_bmg" -/obj/item/clothing/suit/storage/seromi/cloak/black_lightgrey +/obj/item/clothing/suit/storage/seromi/cloak/standard/black_lightgrey name = "black and light grey cloak" icon_state = "tesh_cloak_blg" item_state = "tesh_cloak_blg" -/obj/item/clothing/suit/storage/seromi/cloak/black_white +/obj/item/clothing/suit/storage/seromi/cloak/standard/black_white name = "black and white cloak" icon_state = "tesh_cloak_bw" item_state = "tesh_cloak_bw" -/obj/item/clothing/suit/storage/seromi/cloak/black_red +/obj/item/clothing/suit/storage/seromi/cloak/standard/black_red name = "black and red cloak" icon_state = "tesh_cloak_br" item_state = "tesh_cloak_br" -/obj/item/clothing/suit/storage/seromi/cloak/black +/obj/item/clothing/suit/storage/seromi/cloak/standard/black name = "black cloak" icon_state = "tesh_cloak_bn" item_state = "tesh_cloak_bn" -/obj/item/clothing/suit/storage/seromi/cloak/black_yellow +/obj/item/clothing/suit/storage/seromi/cloak/standard/black_yellow name = "black and yellow cloak" icon_state = "tesh_cloak_by" item_state = "tesh_cloak_by" -/obj/item/clothing/suit/storage/seromi/cloak/black_green +/obj/item/clothing/suit/storage/seromi/cloak/standard/black_green name = "black and green cloak" icon_state = "tesh_cloak_bgr" item_state = "tesh_cloak_bgr" -/obj/item/clothing/suit/storage/seromi/cloak/black_blue +/obj/item/clothing/suit/storage/seromi/cloak/standard/black_blue name = "black and blue cloak" icon_state = "tesh_cloak_bbl" item_state = "tesh_cloak_bbl" -/obj/item/clothing/suit/storage/seromi/cloak/black_purple +/obj/item/clothing/suit/storage/seromi/cloak/standard/black_purple name = "black and purple cloak" icon_state = "tesh_cloak_bp" item_state = "tesh_cloak_bp" -/obj/item/clothing/suit/storage/seromi/cloak/black_pink +/obj/item/clothing/suit/storage/seromi/cloak/standard/black_pink name = "black and pink cloak" icon_state = "tesh_cloak_bpi" item_state = "tesh_cloak_bpi" -/obj/item/clothing/suit/storage/seromi/cloak/black_brown +/obj/item/clothing/suit/storage/seromi/cloak/standard/black_brown name = "black and brown cloak" icon_state = "tesh_cloak_bbr" item_state = "tesh_cloak_bbr" -/obj/item/clothing/suit/storage/seromi/cloak/orange_grey +/obj/item/clothing/suit/storage/seromi/cloak/standard/orange_grey name = "orange and grey cloak" icon_state = "tesh_cloak_og" item_state = "tesh_cloak_og" -/obj/item/clothing/suit/storage/seromi/cloak/rainbow +/obj/item/clothing/suit/storage/seromi/cloak/standard/rainbow name = "rainbow cloak" icon_state = "tesh_cloak_rainbow" item_state = "tesh_cloak_rainbow" -/obj/item/clothing/suit/storage/seromi/cloak/lightgrey_grey +/obj/item/clothing/suit/storage/seromi/cloak/standard/lightgrey_grey name = "light grey and grey cloak" icon_state = "tesh_cloak_lgg" item_state = "tesh_cloak_lgg" -/obj/item/clothing/suit/storage/seromi/cloak/white_grey +/obj/item/clothing/suit/storage/seromi/cloak/standard/white_grey name = "white and grey cloak" icon_state = "tesh_cloak_wg" item_state = "tesh_cloak_wg" -/obj/item/clothing/suit/storage/seromi/cloak/red_grey +/obj/item/clothing/suit/storage/seromi/cloak/standard/red_grey name = "red and grey cloak" icon_state = "tesh_cloak_rg" item_state = "tesh_cloak_rg" -/obj/item/clothing/suit/storage/seromi/cloak/orange +/obj/item/clothing/suit/storage/seromi/cloak/standard/orange name = "orange cloak" icon_state = "tesh_cloak_on" item_state = "tesh_cloak_on" -/obj/item/clothing/suit/storage/seromi/cloak/yellow_grey +/obj/item/clothing/suit/storage/seromi/cloak/standard/yellow_grey name = "yellow and grey cloak" icon_state = "tesh_cloak_yg" item_state = "tesh_cloak_yg" -/obj/item/clothing/suit/storage/seromi/cloak/green_grey +/obj/item/clothing/suit/storage/seromi/cloak/standard/green_grey name = "green and grey cloak" icon_state = "tesh_cloak_gg" item_state = "tesh_cloak_gg" -/obj/item/clothing/suit/storage/seromi/cloak/blue_grey +/obj/item/clothing/suit/storage/seromi/cloak/standard/blue_grey name = "blue and grey cloak" icon_state = "tesh_cloak_blug" item_state = "tesh_cloak_blug" -/obj/item/clothing/suit/storage/seromi/cloak/purple_grey +/obj/item/clothing/suit/storage/seromi/cloak/standard/purple_grey name = "purple and grey cloak" icon_state = "tesh_cloak_pg" item_state = "tesh_cloak_pg" -/obj/item/clothing/suit/storage/seromi/cloak/pink_grey +/obj/item/clothing/suit/storage/seromi/cloak/standard/pink_grey name = "pink and grey cloak" icon_state = "tesh_cloak_pig" item_state = "tesh_cloak_pig" -/obj/item/clothing/suit/storage/seromi/cloak/brown_grey +/obj/item/clothing/suit/storage/seromi/cloak/standard/brown_grey name = "brown and grey cloak" icon_state = "tesh_cloak_brg" - item_state = "tesh_cloak_brg" \ No newline at end of file + item_state = "tesh_cloak_brg" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs + icon_override = 'icons/mob/species/seromi/deptcloak.dmi' + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/cargo + name = "Cargo cloak" + desc = "A soft Teshari cloak made for the Cargo department" + icon_state = "tesh_cloak_car" + item_state = "tesh_cloak_car" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/mining + name = "Mining cloak" + desc = "A soft Teshari cloak made for Mining" + icon_state = "tesh_cloak_mine" + item_state = "tesh_cloak_mine" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/command + name = "Command cloak" + desc = "A soft Teshari cloak made for the Command department" + icon_state = "tesh_cloak_comm" + item_state = "tesh_cloak_comm" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/ce + name = "Cheif Engineer's cloak" + desc = "A soft Teshari cloak made the Chief Engineer" + icon_state = "tesh_cloak_ce" + item_state = "tesh_cloak_ce" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/eningeer + name = "Engineering cloak" + desc = "A soft Teshari cloak made for the Engineering department" + icon_state = "tesh_cloak_engie" + item_state = "tesh_cloak_engie" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/atmos + name = "Atmos Tech cloak" + desc = "A soft Teshari cloak made for the Atmos Tech" + icon_state = "tesh_cloak_atmos" + item_state = "tesh_cloak_atmos" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/cmo + name = "Chief Medical Officer cloak" + desc = "A soft Teshari cloak made the Cheif Medical Officer" + icon_state = "tesh_cloak_cmo" + item_state = "tesh_cloak_cmo" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/medical + name = "Medical cloak" + desc = "A soft Teshari cloak made for the Medical department" + icon_state = "tesh_cloak_doc" + item_state = "tesh_cloak_doc" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/chemistry + name = "Chemistry cloak" + desc = "A soft Teshari cloak made for the Chemist" + icon_state = "tesh_cloak_chem" + item_state = "tesh_cloak_chem" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/viro + name = "Virologist cloak" + desc = "A soft Teshari cloak made for the Virologist" + icon_state = "tesh_cloak_viro" + item_state = "tesh_cloak_viro" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/para + name = "Paramedic cloak" + desc = "A soft Teshari cloak made for the Paramedic" + icon_state = "tesh_cloak_para" + item_state = "tesh_cloak_para" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/sci + name = "Scientist cloak" + desc = "A soft Teshari cloak made for the Science department" + icon_state = "tesh_cloak_sci" + item_state = "tesh_cloak_sci" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/robo + name = "Roboticist cloak" + desc = "A soft Teshari cloak made for the Roboticist" + icon_state = "tesh_cloak_robo" + item_state = "tesh_cloak_robo" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/sec + name = "Security cloak" + desc = "A soft Teshari cloak made for the Security department" + icon_state = "tesh_cloak_sec" + item_state = "tesh_cloak_sec" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/qm + name = "Quarter master's cloak" + desc = "A soft Teshari cloak made for the Quarter Master (Who is a real head btw)" + icon_state = "tesh_cloak_qm" + item_state = "tesh_cloak_qm" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/service + name = "Service cloak" + desc = "A soft Teshari cloak made for the Service department" + icon_state = "tesh_uniform_serv" + item_state = "tesh_uniform_serv" + +/obj/item/clothing/suit/storage/seromi/cloak/jobs/iaa + name = "Iaa cloak" + desc = "A soft Teshari cloak made for the Internal Affairs Agent" + icon_state = "tesh_uniform_iaa" + item_state = "tesh_uniform_iaa" \ No newline at end of file diff --git a/code/modules/clothing/suits/hooded.dm b/code/modules/clothing/suits/hooded.dm new file mode 100644 index 0000000000..5c861da38d --- /dev/null +++ b/code/modules/clothing/suits/hooded.dm @@ -0,0 +1,182 @@ +// Hooded suits + +//Hoods for winter coats and chaplain hoodie etc + +/obj/item/clothing/suit/storage/hooded + var/obj/item/clothing/head/hood + var/hoodtype = null //so the chaplain hoodie or other hoodies can override this + var/hood_up = FALSE + var/toggleicon + action_button_name = "Toggle Hood" + +/obj/item/clothing/suit/storage/hooded/New() + toggleicon = "[initial(icon_state)]" + MakeHood() + ..() + +/obj/item/clothing/suit/storage/hooded/Destroy() + qdel(hood) + return ..() + +/obj/item/clothing/suit/storage/hooded/proc/MakeHood() + if(!hood) + var/obj/item/clothing/head/hood/H = new hoodtype(src) + hood = H + +/obj/item/clothing/suit/storage/hooded/ui_action_click() + ToggleHood() + +/obj/item/clothing/suit/storage/hooded/equipped(mob/user, slot) + if(slot != slot_wear_suit) + RemoveHood() + ..() + +/obj/item/clothing/suit/storage/hooded/proc/RemoveHood() + icon_state = toggleicon + hood_up = FALSE + hood.canremove = TRUE // This shouldn't matter anyways but just incase. + if(ishuman(hood.loc)) + var/mob/living/carbon/H = hood.loc + H.unEquip(hood, 1) + H.update_inv_wear_suit() + hood.forceMove(src) + +/obj/item/clothing/suit/storage/hooded/dropped() + RemoveHood() + +/obj/item/clothing/suit/storage/hooded/proc/ToggleHood() + if(!hood_up) + if(ishuman(loc)) + var/mob/living/carbon/human/H = src.loc + if(H.wear_suit != src) + to_chat(H, "You must be wearing [src] to put up the hood!") + return + if(H.head) + to_chat(H, "You're already wearing something on your head!") + return + else + H.equip_to_slot_if_possible(hood,slot_head,0,0,1) + hood_up = TRUE + hood.canremove = FALSE + icon_state = "[toggleicon]_t" + H.update_inv_wear_suit() + else + RemoveHood() + +/obj/item/clothing/suit/storage/hooded/carp_costume + name = "carp costume" + desc = "A costume made from 'synthetic' carp scales, it smells." + icon_state = "carp_casual" + item_state_slots = list(slot_r_hand_str = "carp_casual", slot_l_hand_str = "carp_casual") //Does not exist -S2- + body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS + flags_inv = HIDEJUMPSUIT|HIDETIE|HIDEHOLSTER + cold_protection = UPPER_TORSO|LOWER_TORSO|ARMS + min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE //Space carp like space, so you should too + action_button_name = "Toggle Carp Hood" + hoodtype = /obj/item/clothing/head/hood/carp_hood + +/obj/item/clothing/suit/storage/hooded/ian_costume //It's Ian, rub his bell- oh god what happened to his inside parts? + name = "corgi costume" + desc = "A costume that looks like someone made a human-like corgi, it won't guarantee belly rubs." + icon_state = "ian" + item_state_slots = list(slot_r_hand_str = "ian", slot_l_hand_str = "ian") //Does not exist -S2- + body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS + flags_inv = HIDEJUMPSUIT|HIDETIE|HIDEHOLSTER + action_button_name = "Toggle Ian Hood" + hoodtype = /obj/item/clothing/head/hood/ian_hood + +/obj/item/clothing/suit/storage/hooded/wintercoat + name = "winter coat" + desc = "A heavy jacket made from 'synthetic' animal furs." + icon_state = "coatwinter" + item_state_slots = list(slot_r_hand_str = "coatwinter", slot_l_hand_str = "coatwinter") + body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS + flags_inv = HIDEHOLSTER + cold_protection = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS + min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE + armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) + hoodtype = /obj/item/clothing/head/hood/winter + allowed = list (/obj/item/weapon/pen, /obj/item/weapon/paper, /obj/item/device/flashlight,/obj/item/weapon/tank/emergency/oxygen, /obj/item/weapon/storage/fancy/cigarettes, /obj/item/weapon/storage/box/matches, /obj/item/weapon/reagent_containers/food/drinks/flask) + +/obj/item/clothing/suit/storage/hooded/wintercoat/captain + name = "colony director's winter coat" + icon_state = "coatcaptain" + item_state_slots = list(slot_r_hand_str = "coatcaptain", slot_l_hand_str = "coatcaptain") + armor = list(melee = 20, bullet = 15, laser = 20, energy = 10, bomb = 15, bio = 0, rad = 0) + hoodtype = /obj/item/clothing/head/hood/winter/captain + +/obj/item/clothing/suit/storage/hooded/wintercoat/security + name = "security winter coat" + icon_state = "coatsecurity" + item_state_slots = list(slot_r_hand_str = "coatsecurity", slot_l_hand_str = "coatsecurity") + armor = list(melee = 25, bullet = 20, laser = 20, energy = 15, bomb = 20, bio = 0, rad = 0) + hoodtype = /obj/item/clothing/head/hood/winter/security + +/obj/item/clothing/suit/storage/hooded/wintercoat/medical + name = "medical winter coat" + icon_state = "coatmedical" + item_state_slots = list(slot_r_hand_str = "coatmedical", slot_l_hand_str = "coatmedical") + armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0) + hoodtype = /obj/item/clothing/head/hood/winter/medical + +/obj/item/clothing/suit/storage/hooded/wintercoat/science + name = "science winter coat" + icon_state = "coatscience" + item_state_slots = list(slot_r_hand_str = "coatscience", slot_l_hand_str = "coatscience") + armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0) + hoodtype = /obj/item/clothing/head/hood/winter/science + +/obj/item/clothing/suit/storage/hooded/wintercoat/engineering + name = "engineering winter coat" + icon_state = "coatengineer" + item_state_slots = list(slot_r_hand_str = "coatengineer", slot_l_hand_str = "coatengineer") + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 20) + hoodtype = /obj/item/clothing/head/hood/winter/engineering + +/obj/item/clothing/suit/storage/hooded/wintercoat/engineering/atmos + name = "atmospherics winter coat" + icon_state = "coatatmos" + item_state_slots = list(slot_r_hand_str = "coatatmos", slot_l_hand_str = "coatatmos") + hoodtype = /obj/item/clothing/head/hood/winter/engineering/atmos + +/obj/item/clothing/suit/storage/hooded/wintercoat/hydro + name = "hydroponics winter coat" + icon_state = "coathydro" + item_state_slots = list(slot_r_hand_str = "coathydro", slot_l_hand_str = "coathydro") + hoodtype = /obj/item/clothing/head/hood/winter/hydro + +/obj/item/clothing/suit/storage/hooded/wintercoat/cargo + name = "cargo winter coat" + icon_state = "coatcargo" + item_state_slots = list(slot_r_hand_str = "coatcargo", slot_l_hand_str = "coatcargo") + hoodtype = /obj/item/clothing/head/hood/winter/cargo + +/obj/item/clothing/suit/storage/hooded/wintercoat/miner + name = "mining winter coat" + icon_state = "coatminer" + item_state_slots = list(slot_r_hand_str = "coatminer", slot_l_hand_str = "coatminer") + armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + hoodtype = /obj/item/clothing/head/hood/winter/miner + +/obj/item/clothing/suit/storage/hooded/explorer + name = "explorer suit" + desc = "An armoured suit for exploring harsh environments." + icon_state = "explorer" + item_state = "explorer" + flags = THICKMATERIAL + body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS + min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE + cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS + hoodtype = /obj/item/clothing/head/hood/explorer + siemens_coefficient = 0.9 + armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 35, bio = 75, rad = 35) // Inferior to sec vests in bullet/laser but better for environmental protection. + allowed = list( + /obj/item/device/flashlight, + /obj/item/weapon/gun, + /obj/item/ammo_magazine, + /obj/item/weapon/melee, + /obj/item/weapon/material/knife, + /obj/item/weapon/tank, + /obj/item/device/radio, + /obj/item/weapon/pickaxe + ) \ No newline at end of file diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index 1d93fe9f25..b2afaae33a 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -160,7 +160,7 @@ icon_state = "hazard" blood_overlay_type = "armor" allowed = list (/obj/item/device/analyzer, /obj/item/device/flashlight, /obj/item/device/multitool, /obj/item/device/pipe_painter, /obj/item/device/radio, /obj/item/device/t_scanner, - /obj/item/weapon/crowbar, /obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/weapon/tank/emergency/oxygen, + /obj/item/weapon/tool/crowbar, /obj/item/weapon/tool/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/tool/wirecutters, /obj/item/weapon/tool/wrench, /obj/item/weapon/tank/emergency/oxygen, /obj/item/clothing/mask/gas, /obj/item/taperoll/engineering) body_parts_covered = UPPER_TORSO diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 6f613e38ab..eeca9d220b 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -86,40 +86,6 @@ allowed = list(/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/spacecash) flags_inv = HIDEJUMPSUIT|HIDETIE|HIDEHOLSTER -/*/obj/item/clothing/suit/wcoat - name = "waistcoat" - desc = "For some classy, murderous fun." - icon_state = "vest" - item_state_slots = list(slot_r_hand_str = "wcoat", slot_l_hand_str = "wcoat") - blood_overlay_type = "armor" - allowed = list (/obj/item/weapon/pen, /obj/item/weapon/paper, /obj/item/device/flashlight, /obj/item/weapon/tank/emergency/oxygen, /obj/item/weapon/storage/fancy/cigarettes, /obj/item/weapon/storage/box/matches, /obj/item/weapon/reagent_containers/food/drinks/flask) - body_parts_covered = UPPER_TORSO|LOWER_TORSO - -/obj/item/clothing/suit/wcoat/red - name = "red waistcoat" - icon_state = "red_waistcoat" - -/obj/item/clothing/suit/wcoat/grey - name = "grey waistcoat" - icon_state = "grey_waistcoat" - -/obj/item/clothing/suit/wcoat/brown - name = "brown waistcoat" - icon_state = "brown_waistcoat" - -/obj/item/clothing/suit/wcoat/swvest - name = "black sweatervest" - desc = "A sleeveless sweater. Wear this if you don't want your arms to be warm, or if you're a nerd." - icon_state = "sweatervest" - -/obj/item/clothing/suit/wcoat/swvest/blue - name = "blue sweatervest" - icon_state = "sweatervest_blue" - -/obj/item/clothing/suit/wcoat/swvest/red - name = "red sweatervest" - icon_state = "sweatervest_red" -*/ /obj/item/clothing/suit/storage/apron/overalls name = "coveralls" desc = "A set of denim overalls." @@ -628,202 +594,6 @@ obj/item/clothing/suit/storage/toggle/peacoat body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS flags_inv = HIDEJUMPSUIT|HIDETIE|HIDEHOLSTER -/obj/item/clothing/suit/storage/hooded/carp_costume - name = "carp costume" - desc = "A costume made from 'synthetic' carp scales, it smells." - icon_state = "carp_casual" - item_state_slots = list(slot_r_hand_str = "carp_casual", slot_l_hand_str = "carp_casual") //Does not exist -S2- - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - flags_inv = HIDEJUMPSUIT|HIDETIE|HIDEHOLSTER - cold_protection = UPPER_TORSO|LOWER_TORSO|ARMS - min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE //Space carp like space, so you should too - hooded = 1 - action_button_name = "Toggle Carp Hood" - hoodtype = /obj/item/clothing/head/carp_hood - -/obj/item/clothing/head/carp_hood - name = "carp hood" - desc = "A hood attached to a carp costume." - icon_state = "carp_casual" - item_state_slots = list(slot_r_hand_str = "carp_casual", slot_l_hand_str = "carp_casual") //Does not exist -S2- - body_parts_covered = HEAD - cold_protection = HEAD - min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE - -/obj/item/clothing/suit/storage/hooded/ian_costume //It's Ian, rub his bell- oh god what happened to his inside parts? - name = "corgi costume" - desc = "A costume that looks like someone made a human-like corgi, it won't guarantee belly rubs." - icon_state = "ian" - item_state_slots = list(slot_r_hand_str = "ian", slot_l_hand_str = "ian") //Does not exist -S2- - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - flags_inv = HIDEJUMPSUIT|HIDETIE|HIDEHOLSTER - //cold_protection = CHEST|GROIN|ARMS - //min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT - hooded = 1 - action_button_name = "Toggle Ian Hood" - hoodtype = /obj/item/clothing/head/ian_hood - -/obj/item/clothing/head/ian_hood - name = "corgi hood" - desc = "A hood that looks just like a corgi's head, it won't guarantee dog biscuits." - icon_state = "ian" - item_state_slots = list(slot_r_hand_str = "ian", slot_l_hand_str = "ian") //Does not exist -S2- - body_parts_covered = HEAD - //cold_protection = HEAD - //min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT - -/obj/item/clothing/suit/storage/hooded/wintercoat - name = "winter coat" - desc = "A heavy jacket made from 'synthetic' animal furs." - icon_state = "coatwinter" - item_state_slots = list(slot_r_hand_str = "coatwinter", slot_l_hand_str = "coatwinter") - body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS - flags_inv = HIDEHOLSTER - cold_protection = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS - min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0) - hooded = 1 - hoodtype = /obj/item/clothing/head/hood/winter - allowed = list (/obj/item/weapon/pen, /obj/item/weapon/paper, /obj/item/device/flashlight,/obj/item/weapon/tank/emergency/oxygen, /obj/item/weapon/storage/fancy/cigarettes, /obj/item/weapon/storage/box/matches, /obj/item/weapon/reagent_containers/food/drinks/flask) - -/obj/item/clothing/head/hood/winter - name = "winter hood" - desc = "A hood attached to a heavy winter jacket." - icon_state = "generic_hood" - body_parts_covered = HEAD - cold_protection = HEAD - flags_inv = HIDEEARS | BLOCKHAIR - min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE - -/obj/item/clothing/suit/storage/hooded/wintercoat/captain - name = "colony director's winter coat" - icon_state = "coatcaptain" - item_state_slots = list(slot_r_hand_str = "coatcaptain", slot_l_hand_str = "coatcaptain") - armor = list(melee = 20, bullet = 15, laser = 20, energy = 10, bomb = 15, bio = 0, rad = 0) - hoodtype = /obj/item/clothing/head/hood/winter/captain - -/obj/item/clothing/head/hood/winter/captain - name = "colony director's winter hood" - armor = list(melee = 20, bullet = 15, laser = 20, energy = 10, bomb = 15, bio = 0, rad = 0) - -/obj/item/clothing/suit/storage/hooded/wintercoat/security - name = "security winter coat" - icon_state = "coatsecurity" - item_state_slots = list(slot_r_hand_str = "coatsecurity", slot_l_hand_str = "coatsecurity") - armor = list(melee = 25, bullet = 20, laser = 20, energy = 15, bomb = 20, bio = 0, rad = 0) - hoodtype = /obj/item/clothing/head/hood/winter/security - -/obj/item/clothing/head/hood/winter/security - name = "security winter hood" - armor = list(melee = 25, bullet = 20, laser = 20, energy = 15, bomb = 20, bio = 0, rad = 0) - -/obj/item/clothing/suit/storage/hooded/wintercoat/medical - name = "medical winter coat" - icon_state = "coatmedical" - item_state_slots = list(slot_r_hand_str = "coatmedical", slot_l_hand_str = "coatmedical") - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0) - hoodtype = /obj/item/clothing/head/hood/winter/medical - -/obj/item/clothing/head/hood/winter/medical - name = "medical winter hood" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0) - -/obj/item/clothing/suit/storage/hooded/wintercoat/science - name = "science winter coat" - icon_state = "coatscience" - item_state_slots = list(slot_r_hand_str = "coatscience", slot_l_hand_str = "coatscience") - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0) - hoodtype = /obj/item/clothing/head/hood/winter/science - -/obj/item/clothing/head/hood/winter/science - name = "science winter hood" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0) - -/obj/item/clothing/suit/storage/hooded/wintercoat/engineering - name = "engineering winter coat" - icon_state = "coatengineer" - item_state_slots = list(slot_r_hand_str = "coatengineer", slot_l_hand_str = "coatengineer") - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 20) - hoodtype = /obj/item/clothing/head/hood/winter/engineering - -/obj/item/clothing/head/hood/winter/engineering - name = "engineering winter hood" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 20) - -/obj/item/clothing/suit/storage/hooded/wintercoat/engineering/atmos - name = "atmospherics winter coat" - icon_state = "coatatmos" - item_state_slots = list(slot_r_hand_str = "coatatmos", slot_l_hand_str = "coatatmos") - hoodtype = /obj/item/clothing/head/hood/winter/engineering/atmos - -/obj/item/clothing/head/hood/winter/engineering/atmos - name = "atmospherics winter hood" - -/obj/item/clothing/suit/storage/hooded/wintercoat/hydro - name = "hydroponics winter coat" - icon_state = "coathydro" - item_state_slots = list(slot_r_hand_str = "coathydro", slot_l_hand_str = "coathydro") - hoodtype = /obj/item/clothing/head/hood/winter/hydro - -/obj/item/clothing/head/hood/winter/hydro - name = "hydroponics winter hood" - -/obj/item/clothing/suit/storage/hooded/wintercoat/cargo - name = "cargo winter coat" - icon_state = "coatcargo" - item_state_slots = list(slot_r_hand_str = "coatcargo", slot_l_hand_str = "coatcargo") - hoodtype = /obj/item/clothing/head/hood/winter/cargo - -/obj/item/clothing/head/hood/winter/cargo - name = "cargo winter hood" - -/obj/item/clothing/suit/storage/hooded/wintercoat/miner - name = "mining winter coat" - icon_state = "coatminer" - item_state_slots = list(slot_r_hand_str = "coatminer", slot_l_hand_str = "coatminer") - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) - hoodtype = /obj/item/clothing/head/hood/winter/miner - -/obj/item/clothing/head/hood/winter/miner - name = "mining winter hood" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) - -/obj/item/clothing/suit/storage/hooded/explorer - name = "explorer suit" - desc = "An armoured suit for exploring harsh environments." - icon_state = "explorer" - item_state = "explorer" - flags = THICKMATERIAL - body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE - cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - hooded = TRUE - hoodtype = /obj/item/clothing/head/hood/explorer - siemens_coefficient = 0.9 - armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 35, bio = 75, rad = 35) // Inferior to sec vests in bullet/laser but better for environmental protection. - allowed = list( - /obj/item/device/flashlight, - /obj/item/weapon/gun, - /obj/item/ammo_magazine, - /obj/item/weapon/melee, - /obj/item/weapon/material/knife, - /obj/item/weapon/tank, - /obj/item/device/radio, - /obj/item/weapon/pickaxe - ) - -/obj/item/clothing/head/hood/explorer - name = "explorer hood" - desc = "An armoured hood for exploring harsh environments." - icon_state = "explorer" - body_parts_covered = HEAD - cold_protection = HEAD - flags = THICKMATERIAL - flags_inv = HIDEEARS | BLOCKHAIR - min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE - siemens_coefficient = 0.9 - armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 35, bio = 75, rad = 35) - /obj/item/clothing/suit/varsity name = "black varsity jacket" desc = "A favorite of jocks everywhere from Sol to Nyx." diff --git a/code/modules/clothing/suits/toggles.dm b/code/modules/clothing/suits/toggles.dm deleted file mode 100644 index c3c9a790b6..0000000000 --- a/code/modules/clothing/suits/toggles.dm +++ /dev/null @@ -1,63 +0,0 @@ -//Hoods for winter coats and chaplain hoodie etc - -/obj/item/clothing/suit/storage/hooded - var/obj/item/clothing/head/hood - var/hoodtype = null //so the chaplain hoodie or other hoodies can override this - var/suittoggled = 0 - var/hooded = 0 - var/toggleicon - action_button_name = "Toggle Hood" - -/obj/item/clothing/suit/storage/hooded/New() - toggleicon = "[initial(icon_state)]" - MakeHood() - ..() - -/obj/item/clothing/suit/storage/hooded/Destroy() - qdel(hood) - return ..() - -/obj/item/clothing/suit/storage/hooded/proc/MakeHood() - if(!hood) - var/obj/item/clothing/head/hood/winter/W = new hoodtype(src) - hood = W - -/obj/item/clothing/suit/storage/hooded/ui_action_click() - ToggleHood() - -/obj/item/clothing/suit/storage/hooded/equipped(mob/user, slot) - if(slot != slot_wear_suit) - RemoveHood() - ..() - -/obj/item/clothing/suit/storage/hooded/proc/RemoveHood() - icon_state = toggleicon - suittoggled = 0 - hood.canremove = TRUE // This shouldn't matter anyways but just incase. - if(ishuman(hood.loc)) - var/mob/living/carbon/H = hood.loc - H.unEquip(hood, 1) - H.update_inv_wear_suit() - hood.forceMove(src) - -/obj/item/clothing/suit/storage/hooded/dropped() - RemoveHood() - -/obj/item/clothing/suit/storage/hooded/proc/ToggleHood() - if(!suittoggled) - if(ishuman(loc)) - var/mob/living/carbon/human/H = src.loc - if(H.wear_suit != src) - to_chat(H, "You must be wearing [src] to put up the hood!") - return - if(H.head) - to_chat(H, "You're already wearing something on your head!") - return - else - H.equip_to_slot_if_possible(hood,slot_head,0,0,1) - suittoggled = 1 - hood.canremove = FALSE - icon_state = "[toggleicon]_t" - H.update_inv_wear_suit() - else - RemoveHood() \ No newline at end of file diff --git a/code/modules/clothing/under/xenos/seromi.dm b/code/modules/clothing/under/xenos/seromi.dm index 9d6598a517..2c3d550183 100644 --- a/code/modules/clothing/under/xenos/seromi.dm +++ b/code/modules/clothing/under/xenos/seromi.dm @@ -34,6 +34,7 @@ icon_state = "seromi_rainbow" /obj/item/clothing/under/seromi/undercoat + name = "Undercoat" desc = "A Teshari traditional garb, with a modern twist! Made of micro and nanofibres to make it light and billowy, perfect for going fast and stylishly!" icon = 'icons/mob/species/seromi/teshari_uniform.dmi' icon_override = 'icons/mob/species/seromi/teshari_uniform.dmi' @@ -41,127 +42,244 @@ item_state = "tesh_uniform_bo" body_parts_covered = UPPER_TORSO|LOWER_TORSO -/obj/item/clothing/under/seromi/undercoat/black_orange +/obj/item/clothing/under/seromi/undercoat/standard/black_orange name = "black and orange undercoat" icon_state = "tesh_uniform_bo" item_state = "tesh_uniform_bo" -/obj/item/clothing/under/seromi/undercoat/black_grey +/obj/item/clothing/under/seromi/undercoat/standard/black_grey name = "black and grey undercoat" icon_state = "tesh_uniform_bg" item_state = "tesh_uniform_bg" -/obj/item/clothing/under/seromi/undercoat/black_midgrey +/obj/item/clothing/under/seromi/undercoat/standard/black_midgrey name = "black and medium grey undercoat" icon_state = "tesh_uniform_bmg" item_state = "tesh_uniform_bmg" -/obj/item/clothing/under/seromi/undercoat/black_lightgrey +/obj/item/clothing/under/seromi/undercoat/standard/black_lightgrey name = "black and light grey undercoat" icon_state = "tesh_uniform_blg" item_state = "tesh_uniform_blg" -/obj/item/clothing/under/seromi/undercoat/black_white +/obj/item/clothing/under/seromi/undercoat/standard/black_white name = "black and white undercoat" icon_state = "tesh_uniform_bw" item_state = "tesh_uniform_bw" -/obj/item/clothing/under/seromi/undercoat/black_red +/obj/item/clothing/under/seromi/undercoat/standard/black_red name = "black and red undercoat" icon_state = "tesh_uniform_br" item_state = "tesh_uniform_br" -/obj/item/clothing/under/seromi/undercoat/black +/obj/item/clothing/under/seromi/undercoat/standard/black name = "black undercoat" icon_state = "tesh_uniform_bn" item_state = "tesh_uniform_bn" -/obj/item/clothing/under/seromi/undercoat/black_yellow +/obj/item/clothing/under/seromi/undercoat/standard/black_yellow name = "black and yellow undercoat" icon_state = "tesh_uniform_by" item_state = "tesh_uniform_by" -/obj/item/clothing/under/seromi/undercoat/black_green +/obj/item/clothing/under/seromi/undercoat/standard/black_green name = "black and green undercoat" icon_state = "tesh_uniform_bgr" item_state = "tesh_uniform_bgr" -/obj/item/clothing/under/seromi/undercoat/black_blue +/obj/item/clothing/under/seromi/undercoat/standard/black_blue name = "black and blue undercoat" icon_state = "tesh_uniform_bbl" item_state = "tesh_uniform_bbl" -/obj/item/clothing/under/seromi/undercoat/black_purple +/obj/item/clothing/under/seromi/undercoat/standard/black_purple name = "black and purple undercoat" icon_state = "tesh_uniform_bp" item_state = "tesh_uniform_bp" -/obj/item/clothing/under/seromi/undercoat/black_pink +/obj/item/clothing/under/seromi/undercoat/standard/black_pink name = "black and pink undercoat" icon_state = "tesh_uniform_bpi" item_state = "tesh_uniform_bpi" -/obj/item/clothing/under/seromi/undercoat/black_brown +/obj/item/clothing/under/seromi/undercoat/standard/black_brown name = "black and brown undercoat" icon_state = "tesh_uniform_bbr" item_state = "tesh_uniform_bbr" -/obj/item/clothing/under/seromi/undercoat/orange_grey +/obj/item/clothing/under/seromi/undercoat/standard/orange_grey name = "orange and grey undercoat" icon_state = "tesh_uniform_og" item_state = "tesh_uniform_og" -/obj/item/clothing/under/seromi/undercoat/rainbow +/obj/item/clothing/under/seromi/undercoat/standard/rainbow name = "rainbow undercoat" icon_state = "tesh_uniform_rainbow" item_state = "tesh_uniform_rainbow" -/obj/item/clothing/under/seromi/undercoat/lightgrey_grey +/obj/item/clothing/under/seromi/undercoat/standard/lightgrey_grey name = "light grey and grey undercoat" icon_state = "tesh_uniform_lgg" item_state = "tesh_uniform_lgg" -/obj/item/clothing/under/seromi/undercoat/white_grey +/obj/item/clothing/under/seromi/undercoat/standard/white_grey name = "white and grey undercoat" icon_state = "tesh_uniform_wg" item_state = "tesh_uniform_wg" -/obj/item/clothing/under/seromi/undercoat/red_grey +/obj/item/clothing/under/seromi/undercoat/standard/red_grey name = "red and grey undercoat" icon_state = "tesh_uniform_rg" item_state = "tesh_uniform_rg" -/obj/item/clothing/under/seromi/undercoat/orange +/obj/item/clothing/under/seromi/undercoat/standard/orange name = "orange undercoat" icon_state = "tesh_uniform_on" item_state = "tesh_uniform_on" -/obj/item/clothing/under/seromi/undercoat/yellow_grey +/obj/item/clothing/under/seromi/undercoat/standard/yellow_grey name = "yellow and grey undercoat" icon_state = "tesh_uniform_yg" item_state = "tesh_uniform_yg" -/obj/item/clothing/under/seromi/undercoat/green_grey +/obj/item/clothing/under/seromi/undercoat/standard/green_grey name = "green and grey undercoat" icon_state = "tesh_uniform_gg" item_state = "tesh_uniform_gg" -/obj/item/clothing/under/seromi/undercoat/blue_grey +/obj/item/clothing/under/seromi/undercoat/standard/blue_grey name = "blue and grey undercoat" icon_state = "tesh_uniform_blug" item_state = "tesh_uniform_blug" -/obj/item/clothing/under/seromi/undercoat/purple_grey +/obj/item/clothing/under/seromi/undercoat/standard/purple_grey name = "purple and grey undercoat" icon_state = "tesh_uniform_pg" item_state = "tesh_uniform_pg" -/obj/item/clothing/under/seromi/undercoat/pink_grey +/obj/item/clothing/under/seromi/undercoat/standard/pink_grey name = "pink and grey undercoat" icon_state = "tesh_uniform_pig" item_state = "tesh_uniform_pig" -/obj/item/clothing/under/seromi/undercoat/brown_grey +/obj/item/clothing/under/seromi/undercoat/standard/brown_grey name = "brown and grey undercoat" icon_state = "tesh_uniform_brg" - item_state = "tesh_uniform_brg" \ No newline at end of file + item_state = "tesh_uniform_brg" + +/obj/item/clothing/under/seromi/undercoat/jobs + icon_override = 'icons/mob/species/seromi/deptjacket.dmi' + +/obj/item/clothing/under/seromi/undercoat/jobs/cargo + name = "Cargo undercoat" + desc = "A traditional Teshari garb made for the Cargo department" + icon_state = "tesh_uniform_car" + item_state = "tesh_uniform_car" + +/obj/item/clothing/under/seromi/undercoat/jobs/mining + name = "Mining undercoat" + desc = "A traditional Teshari garb made for Mining" + icon_state = "tesh_uniform_mine" + item_state = "tesh_uniform_mine" + +/obj/item/clothing/under/seromi/undercoat/jobs/command + name = "Command undercoat" + desc = "A traditional Teshari garb made for the Command department" + icon_state = "tesh_uniform_comm" + item_state = "tesh_uniform_comm" + +/obj/item/clothing/under/seromi/undercoat/jobs/command_g + name = "Command undercoat (gold buttons)" + desc = "A traditional Teshari garb made for the Command department" + icon_state = "tesh_uniform_comm_g" + item_state = "tesh_uniform_comm_g" + +/obj/item/clothing/under/seromi/undercoat/jobs/ce + name = "Cheif Engineer's undercoat" + desc = "A traditional Teshari garb made for the Chief Engineer" + icon_state = "tesh_uniform_ce" + item_state = "tesh_uniform_ce" + +/obj/item/clothing/under/seromi/undercoat/jobs/ce_w + name = "Cheif Engineer's undercoat (white)" + desc = "A traditional Teshari garb made for the department" + icon_state = "tesh_uniform_ce_w" + item_state = "tesh_uniform_ce_w" + +/obj/item/clothing/under/seromi/undercoat/jobs/engineer + name = "Engineering undercoat" + desc = "A traditional Teshari garb made for the Engineering department" + icon_state = "tesh_uniform_engie" + item_state = "tesh_uniform_engie" + +/obj/item/clothing/under/seromi/undercoat/jobs/atmos + name = "Atmos Tech undercoat" + desc = "A traditional Teshari garb made for the Atmos Tech" + icon_state = "tesh_uniform_atmos" + item_state = "tesh_uniform_atmos" + +/obj/item/clothing/under/seromi/undercoat/jobs/cmo + name = "Chief Medical Officer undercoat" + desc = "A traditional Teshari garb made for the Cheif Medical Officer" + icon_state = "tesh_uniform_cmo" + item_state = "tesh_uniform_cmo" + +/obj/item/clothing/under/seromi/undercoat/jobs/medical + name = "Medical undercoat" + desc = "A traditional Teshari garb made for the Medical department" + icon_state = "tesh_uniform_doc" + item_state = "tesh_uniform_doc" + +/obj/item/clothing/under/seromi/undercoat/jobs/chemistry + name = "Chemistry undercoat" + desc = "A traditional Teshari garb made for the Chemist" + icon_state = "tesh_uniform_chem" + item_state = "tesh_uniform_chem" + +/obj/item/clothing/under/seromi/undercoat/jobs/viro + name = "Virologist undercoat" + desc = "A traditional Teshari garb made for the Virologist" + icon_state = "tesh_uniform_viro" + item_state = "tesh_uniform_viro" + +/obj/item/clothing/under/seromi/undercoat/jobs/para + name = "Paramedic undercoat" + desc = "A traditional Teshari garb made for the Paramedic" + icon_state = "tesh_uniform_para" + item_state = "tesh_uniform_para" + +/obj/item/clothing/under/seromi/undercoat/jobs/sci + name = "Scientist undercoat" + desc = "A traditional Teshari garb made for the Science department" + icon_state = "tesh_uniform_sci" + item_state = "tesh_uniform_sci" + +/obj/item/clothing/under/seromi/undercoat/jobs/robo + name = "Roboticist undercoat" + desc = "A traditional Teshari garb made for the Roboticist" + icon_state = "tesh_uniform_robo" + item_state = "tesh_uniform_robo" + +/obj/item/clothing/under/seromi/undercoat/jobs/sec + name = "Security undercoat" + desc = "A traditional Teshari garb made for the Security department" + icon_state = "tesh_uniform_sec" + item_state = "tesh_uniform_sec" + +/obj/item/clothing/under/seromi/undercoat/jobs/qm + name = "Quarter master's undercoat" + desc = "A traditional Teshari garb made for the Quarter Master (Who is a real head btw)" + icon_state = "tesh_uniform_qm" + item_state = "tesh_uniform_qm" + +/obj/item/clothing/under/seromi/undercoat/jobs/service + name = "Service undercoat" + desc = "A traditional Teshari garb made for the Service department" + icon_state = "tesh_uniform_serv" + item_state = "tesh_uniform_serv" + +/obj/item/clothing/under/seromi/undercoat/jobs/iaa + name = "IAA undercoat" + desc = "A traditional Teshari garb made for the Internal Affairs Agent" + icon_state = "tesh_uniform_iaa" + item_state = "tesh_uniform_iaa" diff --git a/code/modules/economy/cash_register.dm b/code/modules/economy/cash_register.dm index c9332fb72f..0b85db8191 100644 --- a/code/modules/economy/cash_register.dm +++ b/code/modules/economy/cash_register.dm @@ -166,7 +166,7 @@ -/obj/machinery/cash_register/attackby(obj/O as obj, user as mob) +/obj/machinery/cash_register/attackby(obj/item/O as obj, user as mob) // Check for a method of paying (ID, PDA, e-wallet, cash, ect.) var/obj/item/weapon/card/id/I = O.GetID() if(I) @@ -188,8 +188,8 @@ scan_cash(SC) else if(istype(O, /obj/item/weapon/card/emag)) return ..() - else if(istype(O, /obj/item/weapon/wrench)) - var/obj/item/weapon/wrench/W = O + else if(O.is_wrench()) + var/obj/item/weapon/tool/wrench/W = O toggle_anchors(W, user) // Not paying: Look up price and add it to transaction_amount else @@ -479,7 +479,7 @@ usr << "The cash box is locked." -/obj/machinery/cash_register/proc/toggle_anchors(obj/item/weapon/wrench/W, mob/user) +/obj/machinery/cash_register/proc/toggle_anchors(obj/item/weapon/tool/wrench/W, mob/user) if(manipulating) return manipulating = 1 if(!anchored) diff --git a/code/modules/events/infestation.dm b/code/modules/events/infestation.dm index 16f2b78521..0a24247745 100644 --- a/code/modules/events/infestation.dm +++ b/code/modules/events/infestation.dm @@ -69,7 +69,7 @@ max_number = 12 vermstring = "mice" if(VERM_LIZARDS) - spawn_types = list(/mob/living/simple_animal/lizard) + spawn_types = list(/mob/living/simple_mob/animal/passive/lizard) max_number = 6 vermstring = "lizards" if(VERM_SPIDERS) diff --git a/code/modules/events/rogue_drones.dm b/code/modules/events/rogue_drones.dm index 768628f8fb..8af8dab096 100644 --- a/code/modules/events/rogue_drones.dm +++ b/code/modules/events/rogue_drones.dm @@ -16,10 +16,8 @@ else num = rand(2,6) for(var/i=0, i (P.current_time.seconds_in_day / 2) + + var/sun_message = null + switch(P.sun_position) + if(0 to 0.4) // Night + sun_message = "It is night time, [P.sun_name] is not visible." + if(0.4 to 0.5) // Twilight + sun_message = "The sky is in twilight, however [P.sun_name] is not visible." + if(0.5 to 0.7) // Sunrise/set. + sun_message = "[P.sun_name] is slowly [!afternoon ? "rising from" : "setting on"] the horizon." + if(0.7 to 0.9) // Morning/evening + sun_message = "[P.sun_name]'s position implies it is currently [!afternoon ? "early" : "late"] in the day." + if(0.9 to 1.0) // Noon + sun_message = "It's high noon. [P.sun_name] hangs directly above you." + + to_chat(usr, sun_message) + + // Now for the moon. + if(P.moon_name) + if(P.moon_phase == MOON_PHASE_NEW_MOON) + to_chat(usr, "[P.moon_name] is not visible. It must be a new moon.") + else + to_chat(usr, "[P.moon_name] appears to currently be a [P.moon_phase].") + diff --git a/code/modules/gamemaster/actions/shipping_error.dm b/code/modules/gamemaster/actions/shipping_error.dm index affbe94dc9..33520f13a3 100644 --- a/code/modules/gamemaster/actions/shipping_error.dm +++ b/code/modules/gamemaster/actions/shipping_error.dm @@ -12,6 +12,6 @@ ..() var/datum/supply_order/O = new /datum/supply_order() O.ordernum = supply_controller.ordernum - O.object = supply_controller.supply_packs[pick(supply_controller.supply_packs)] - O.orderedby = random_name(pick(MALE,FEMALE), species = "Human") + O.object = supply_controller.supply_pack[pick(supply_controller.supply_pack)] + O.ordered_by = random_name(pick(MALE,FEMALE), species = "Human") supply_controller.shoppinglist += O \ No newline at end of file diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index 7432cda589..8ad12f9ab0 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -128,7 +128,8 @@ item_state = "boxing" /obj/structure/window/reinforced/holowindow/attackby(obj/item/W as obj, mob/user as mob) - if(!istype(W)) return//I really wish I did not need this + if(!istype(W)) + return//I really wish I did not need this if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2) var/obj/item/weapon/grab/G = W if(istype(G.affecting,/mob/living)) @@ -155,12 +156,12 @@ if(W.flags & NOBLUDGEON) return - if(istype(W, /obj/item/weapon/screwdriver)) - user << ("It's a holowindow, you can't unfasten it!") - else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1) - user << ("It's a holowindow, you can't pry it!") - else if(istype(W, /obj/item/weapon/wrench) && !anchored && (!state || !reinf)) - user << ("It's a holowindow, you can't dismantle it!") + if(W.is_screwdriver()) + to_chat(user, "It's a holowindow, you can't unfasten it!") + else if(W.is_crowbar() && reinf && state <= 1) + to_chat(user, "It's a holowindow, you can't pry it!") + else if(W.is_wrench() && !anchored && (!state || !reinf)) + to_chat(user, "It's a holowindow, you can't dismantle it!") else if(W.damtype == BRUTE || W.damtype == BURN) hit(W.force) @@ -216,8 +217,8 @@ qdel(src) /obj/structure/bed/chair/holochair/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) - user << ("It's a holochair, you can't dismantle it!") + if(W.is_wrench()) + to_chat(user, "It's a holochair, you can't dismantle it!") return /obj/item/weapon/holo @@ -269,13 +270,13 @@ icon_state = "sword[item_color]" w_class = ITEMSIZE_LARGE playsound(user, 'sound/weapons/saberon.ogg', 50, 1) - user << "[src] is now active." + to_chat(user, "[src] is now active.") else force = 3 icon_state = "sword0" w_class = ITEMSIZE_SMALL playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) - user << "[src] can now be concealed." + to_chat(user, "[src] can now be concealed.") if(istype(user,/mob/living/carbon/human)) var/mob/living/carbon/human/H = user @@ -307,7 +308,7 @@ if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2) var/obj/item/weapon/grab/G = W if(G.state<2) - user << "You need a better grip to do that!" + to_chat(user, "You need a better grip to do that!") return G.affecting.loc = src.loc G.affecting.Weaken(5) @@ -350,7 +351,7 @@ power_channel = ENVIRON /obj/machinery/readybutton/attack_ai(mob/user as mob) - user << "The station AI is not to interact with these devices!" + to_chat(user, "The station AI is not to interact with these devices!") return /obj/machinery/readybutton/New() @@ -358,12 +359,12 @@ /obj/machinery/readybutton/attackby(obj/item/weapon/W as obj, mob/user as mob) - user << "The device is a solid button, there's nothing you can do with it!" + to_chat(user, "The device is a solid button, there's nothing you can do with it!") /obj/machinery/readybutton/attack_hand(mob/user as mob) if(user.stat || stat & (NOPOWER|BROKEN)) - user << "This device is not powered." + to_chat(user, "This device is not powered.") return if(!user.IsAdvancedToolUser()) @@ -374,7 +375,7 @@ qdel(src) if(eventstarted) - usr << "The event has already begun!" + to_chat(usr, "The event has already begun!") return ready = !ready @@ -405,7 +406,7 @@ qdel(W) for(var/mob/M in currentarea) - M << "FIGHT!" + to_chat(M, "FIGHT!") // A window that disappears when the ready button is pressed /obj/structure/window/reinforced/holowindow/disappearing diff --git a/code/modules/holomap/generate_holomap.dm b/code/modules/holomap/generate_holomap.dm new file mode 100644 index 0000000000..e4917e0ba0 --- /dev/null +++ b/code/modules/holomap/generate_holomap.dm @@ -0,0 +1,177 @@ +// +// Holomap generation. +// Based on /vg/station but trimmed down (without antag stuff) and massively optimized (you should have seen it before!) ~Leshana +// + +// Define what criteria makes a turf a path or not + +// Turfs that will be colored as HOLOMAP_ROCK +#define IS_ROCK(tile) (istype(tile, /turf/simulated/mineral) && tile.density) + +// Turfs that will be colored as HOLOMAP_OBSTACLE +#define IS_OBSTACLE(tile) ((!istype(tile, /turf/space) && istype(tile.loc, /area/mine/unexplored)) \ + || istype(tile, /turf/simulated/wall) \ + || istype(tile, /turf/unsimulated/mineral) \ + || (istype(tile, /turf/unsimulated/wall) && !istype(tile, /turf/unsimulated/wall/planetary)) \ + /*|| istype(tile, /turf/simulated/shuttle/wall)*/ \ + || (locate(/obj/structure/grille) in tile) \ + /*|| (locate(/obj/structure/window/full) in tile)*/) + +// Turfs that will be colored as HOLOMAP_PATH +#define IS_PATH(tile) ((istype(tile, /turf/simulated/floor) && !istype(tile, /turf/simulated/floor/outdoors)) \ + || istype(tile, /turf/unsimulated/floor) \ + /*|| istype(tile, /turf/simulated/shuttle/floor)*/ \ + || (locate(/obj/structure/catwalk) in tile)) + +/// Generates all the holo minimaps, initializing it all nicely, probably. +/datum/controller/subsystem/holomaps/proc/generateHoloMinimaps() + var/start_time = world.timeofday + // Build the base map for each z level + for (var/z = 1 to world.maxz) + holoMiniMaps |= z // hack, todo fix + holoMiniMaps[z] = generateHoloMinimap(z) + + // Generate the area overlays, small maps, etc for the station levels. + for (var/z in using_map.station_levels) + generateStationMinimap(z) + + if(using_map.holomap_smoosh) + for(var/smoosh_list in using_map.holomap_smoosh) + smooshTetherHolomaps(smoosh_list) + + holomaps_initialized = TRUE + admin_notice("Holomaps initialized in [round(0.1*(world.timeofday-start_time),0.1)] seconds.", R_DEBUG) + + // TODO - Check - They had a delayed init perhaps? + for (var/obj/machinery/station_map/S in station_holomaps) + S.setup_holomap() + +// Generates the "base" holomap for one z-level, showing only the physical structure of walls and paths. +/datum/controller/subsystem/holomaps/proc/generateHoloMinimap(var/zLevel = 1) + // Save these values now to avoid a bazillion array lookups + var/offset_x = HOLOMAP_PIXEL_OFFSET_X(zLevel) + var/offset_y = HOLOMAP_PIXEL_OFFSET_Y(zLevel) + + // Sanity checks - Better to generate a helpful error message now than have DrawBox() runtime + var/icon/canvas = icon(HOLOMAP_ICON, "blank") + if(world.maxx + offset_x > canvas.Width()) + crash_with("Minimap for z=[zLevel] : world.maxx ([world.maxx]) + holomap_offset_x ([offset_x]) must be <= [canvas.Width()]") + if(world.maxy + offset_y > canvas.Height()) + crash_with("Minimap for z=[zLevel] : world.maxy ([world.maxy]) + holomap_offset_y ([offset_y]) must be <= [canvas.Height()]") + + for(var/x = 1 to world.maxx) + for(var/y = 1 to world.maxy) + var/turf/tile = locate(x, y, zLevel) + if(tile && tile.loc:holomapAlwaysDraw()) + if(IS_ROCK(tile)) + canvas.DrawBox(HOLOMAP_ROCK, x + offset_x, y + offset_y) + if(IS_OBSTACLE(tile)) + canvas.DrawBox(HOLOMAP_OBSTACLE, x + offset_x, y + offset_y) + else if(IS_PATH(tile)) + canvas.DrawBox(HOLOMAP_PATH, x + offset_x, y + offset_y) + // Check sleeping after each row to avoid *completely* destroying the server + CHECK_TICK + return canvas + +// Okay, what does this one do? +// This seems to do the drawing thing, but draws only the areas, having nothing to do with the tiles. +// Leshana: I'm guessing this map will get overlayed on top of the base map at runtime? We'll see. +// Wait, seems we actually blend the area map on top of it right now! Huh. +/datum/controller/subsystem/holomaps/proc/generateStationMinimap(var/zLevel) + // Save these values now to avoid a bazillion array lookups + var/offset_x = HOLOMAP_PIXEL_OFFSET_X(zLevel) + var/offset_y = HOLOMAP_PIXEL_OFFSET_Y(zLevel) + + // Sanity checks - Better to generate a helpful error message now than have DrawBox() runtime + var/icon/canvas = icon(HOLOMAP_ICON, "blank") + if(world.maxx + offset_x > canvas.Width()) + crash_with("Minimap for z=[zLevel] : world.maxx ([world.maxx]) + holomap_offset_x ([offset_x]) must be <= [canvas.Width()]") + if(world.maxy + offset_y > canvas.Height()) + crash_with("Minimap for z=[zLevel] : world.maxy ([world.maxy]) + holomap_offset_y ([offset_y]) must be <= [canvas.Height()]") + + for(var/x = 1 to world.maxx) + for(var/y = 1 to world.maxy) + var/turf/tile = locate(x, y, zLevel) + if(tile && tile.loc) + var/area/areaToPaint = tile.loc + if(areaToPaint.holomap_color) + canvas.DrawBox(areaToPaint.holomap_color, x + offset_x, y + offset_y) + + // Save this nice area-colored canvas in case we want to layer it or something I guess + extraMiniMaps["[HOLOMAP_EXTRA_STATIONMAPAREAS]_[zLevel]"] = canvas + + var/icon/map_base = icon(holoMiniMaps[zLevel]) + map_base.Blend(HOLOMAP_HOLOFIER, ICON_MULTIPLY) + + // Generate the full sized map by blending the base and areas onto the backdrop + var/icon/big_map = icon(HOLOMAP_ICON, "stationmap") + big_map.Blend(map_base, ICON_OVERLAY) + big_map.Blend(canvas, ICON_OVERLAY) + extraMiniMaps["[HOLOMAP_EXTRA_STATIONMAP]_[zLevel]"] = big_map + + // Generate the "small" map (I presume for putting on wall map things?) + var/icon/small_map = icon(HOLOMAP_ICON, "blank") + small_map.Blend(map_base, ICON_OVERLAY) + small_map.Blend(canvas, ICON_OVERLAY) + small_map.Scale(WORLD_ICON_SIZE, WORLD_ICON_SIZE) + + // And rotate it in every direction of course! + var/icon/actual_small_map = icon(small_map) + actual_small_map.Insert(new_icon = small_map, dir = SOUTH) + actual_small_map.Insert(new_icon = turn(small_map, 90), dir = WEST) + actual_small_map.Insert(new_icon = turn(small_map, 180), dir = NORTH) + actual_small_map.Insert(new_icon = turn(small_map, 270), dir = EAST) + extraMiniMaps["[HOLOMAP_EXTRA_STATIONMAPSMALL]_[zLevel]"] = actual_small_map + +// For tiny multi-z maps like the tether, we want to smoosh em together into a nice big one! +/datum/controller/subsystem/holomaps/proc/smooshTetherHolomaps(var/list/zlevels) + var/icon/big_map = icon(HOLOMAP_ICON, "stationmap") + var/icon/small_map = icon(HOLOMAP_ICON, "blank") + // For each zlevel in turn, overlay them on top of each other + for(var/zLevel in zlevels) + var/icon/z_terrain = icon(holoMiniMaps[zLevel]) + z_terrain.Blend(HOLOMAP_HOLOFIER, ICON_MULTIPLY) + big_map.Blend(z_terrain, ICON_OVERLAY) + small_map.Blend(z_terrain, ICON_OVERLAY) + var/icon/z_areas = extraMiniMaps["[HOLOMAP_EXTRA_STATIONMAPAREAS]_[zLevel]"] + big_map.Blend(z_areas, ICON_OVERLAY) + small_map.Blend(z_areas, ICON_OVERLAY) + + // Then scale and rotate to make the actual small map we will use + small_map.Scale(WORLD_ICON_SIZE, WORLD_ICON_SIZE) + var/icon/actual_small_map = icon(small_map) + actual_small_map.Insert(new_icon = small_map, dir = SOUTH) + actual_small_map.Insert(new_icon = turn(small_map, 90), dir = WEST) + actual_small_map.Insert(new_icon = turn(small_map, 180), dir = NORTH) + actual_small_map.Insert(new_icon = turn(small_map, 270), dir = EAST) + + // Then assign this icon as the icon for all those levels! + for(var/zLevel in zlevels) + extraMiniMaps["[HOLOMAP_EXTRA_STATIONMAP]_[zLevel]"] = big_map + extraMiniMaps["[HOLOMAP_EXTRA_STATIONMAPSMALL]_[zLevel]"] = actual_small_map + +// TODO - Holomap Markers! +// /proc/generateMinimapMarkers(var/zLevel) +// // Save these values now to avoid a bazillion array lookups +// var/offset_x = HOLOMAP_PIXEL_OFFSET_X(zLevel) +// var/offset_y = HOLOMAP_PIXEL_OFFSET_Y(zLevel) + +// // TODO - Holomap markers +// for(var/filter in list(HOLOMAP_FILTER_STATIONMAP)) +// var/icon/canvas = icon(HOLOMAP_ICON, "blank") +// for(/datum/holomap_marker/holomarker in holomap_markers) +// if(holomarker.z == zLevel && holomarker.filter & filter) +// canvas.Blend(icon(holomarker.icon, holomarker.icon_state), ICON_OVERLAY, holomarker.x + offset_x, holomarker.y + offset_y) +// extraMiniMaps["[HOLOMAP_EXTRA_MARKERS]_[filter]_[zLevel]"] = canvas + +// /datum/holomap_marker +// var/x +// var/y +// var/z +// var/filter +// var/icon = 'icons/holomap_markers.dmi' +// var/icon_state + +#undef IS_ROCK +#undef IS_OBSTACLE +#undef IS_PATH diff --git a/code/modules/holomap/holomap_area.dm b/code/modules/holomap/holomap_area.dm new file mode 100644 index 0000000000..2cc755dfa5 --- /dev/null +++ b/code/modules/holomap/holomap_area.dm @@ -0,0 +1,80 @@ +/* +** Holomap vars and procs on /area +*/ + +/area + var/holomap_color = null // Color of this area on station holomap + +/area/rnd + holomap_color = HOLOMAP_AREACOLOR_SCIENCE +/area/outpost/research + holomap_color = HOLOMAP_AREACOLOR_SCIENCE +/area/server + holomap_color = HOLOMAP_AREACOLOR_SCIENCE +/area/assembly + holomap_color = HOLOMAP_AREACOLOR_SCIENCE + +/area/bridge + holomap_color = HOLOMAP_AREACOLOR_COMMAND +/area/teleporter + holomap_color = HOLOMAP_AREACOLOR_COMMAND +/area/teleporter/departing + holomap_color = null + +/area/security + holomap_color = HOLOMAP_AREACOLOR_SECURITY +/area/tether/surfacebase/security + holomap_color = HOLOMAP_AREACOLOR_SECURITY + +/area/medical + holomap_color = HOLOMAP_AREACOLOR_MEDICAL +/area/tether/surfacebase/medical + holomap_color = HOLOMAP_AREACOLOR_MEDICAL + +/area/engineering + holomap_color = HOLOMAP_AREACOLOR_ENGINEERING +/area/engineering/atmos/intake + holomap_color = null +/area/maintenance/substation/engineering + holomap_color = HOLOMAP_AREACOLOR_ENGINEERING +/area/storage/tech + holomap_color = HOLOMAP_AREACOLOR_ENGINEERING + +/area/quartermaster + holomap_color = HOLOMAP_AREACOLOR_CARGO +/area/tether/surfacebase/mining_main + holomap_color = HOLOMAP_AREACOLOR_CARGO + +/area/hallway + holomap_color = HOLOMAP_AREACOLOR_HALLWAYS +/area/bridge/hallway + holomap_color = HOLOMAP_AREACOLOR_HALLWAYS + +/area/crew_quarters/sleep + holomap_color = HOLOMAP_AREACOLOR_DORMS +/area/crew_quarters/sleep/cryo + holomap_color = null + +// Heads +/area/crew_quarters/captain + holomap_color = HOLOMAP_AREACOLOR_COMMAND +/area/crew_quarters/heads/hop + holomap_color = HOLOMAP_AREACOLOR_COMMAND +/area/crew_quarters/heads/hor + holomap_color = HOLOMAP_AREACOLOR_SCIENCE +/area/crew_quarters/heads/chief + holomap_color = HOLOMAP_AREACOLOR_ENGINEERING +/area/crew_quarters/heads/hos + holomap_color = HOLOMAP_AREACOLOR_SECURITY +/area/crew_quarters/heads/cmo + holomap_color = HOLOMAP_AREACOLOR_MEDICAL +/area/crew_quarters/medbreak + holomap_color = HOLOMAP_AREACOLOR_MEDICAL + + +// ### PROCS ### +// Whether the turfs in the area should be drawn onto the "base" holomap. +/area/proc/holomapAlwaysDraw() + return TRUE +/area/shuttle/holomapAlwaysDraw() + return FALSE \ No newline at end of file diff --git a/code/modules/holomap/holomap_datum.dm b/code/modules/holomap/holomap_datum.dm new file mode 100644 index 0000000000..af4cc6f274 --- /dev/null +++ b/code/modules/holomap/holomap_datum.dm @@ -0,0 +1,40 @@ +// Simple datum to keep track of a running holomap. Each machine capable of displaying the holomap will have one. +/datum/station_holomap + var/image/station_map + var/image/cursor + var/image/legend + +/datum/station_holomap/proc/initialize_holomap(var/turf/T, var/isAI = null, var/mob/user = null, var/reinit = FALSE) + if(!station_map || reinit) + station_map = image(SSholomaps.extraMiniMaps["[HOLOMAP_EXTRA_STATIONMAP]_[T.z]"]) + if(!cursor || reinit) + cursor = image('icons/holomap_markers.dmi', "you") + if(!legend || reinit) + legend = image('icons/effects/64x64.dmi', "legend_sc") + + if(isAI) + T = get_turf(user.client.eye) + cursor.pixel_x = (T.x - 6 + HOLOMAP_PIXEL_OFFSET_X(T.z)) * PIXEL_MULTIPLIER + cursor.pixel_y = (T.y - 6 + HOLOMAP_PIXEL_OFFSET_Y(T.z)) * PIXEL_MULTIPLIER + + legend.pixel_x = HOLOMAP_LEGEND_X(T.z) + legend.pixel_y = HOLOMAP_LEGEND_Y(T.z) + + station_map.overlays |= cursor + station_map.overlays |= legend + +/datum/station_holomap/proc/initialize_holomap_bogus() + station_map = image('icons/480x480.dmi', "stationmap") + legend = image('icons/effects/64x64.dmi', "notfound") + legend.pixel_x = 7 * WORLD_ICON_SIZE + legend.pixel_y = 7 * WORLD_ICON_SIZE + station_map.overlays |= legend + +// TODO - Strategic Holomap support +// /datum/station_holomap/strategic/initialize_holomap(var/turf/T, var/isAI=null, var/mob/user=null) +// ..() +// station_map = image(SSholomaps.extraMiniMaps[HOLOMAP_EXTRA_STATIONMAP_STRATEGIC]) +// legend = image('icons/effects/64x64.dmi', "strategic") +// legend.pixel_x = 3*WORLD_ICON_SIZE +// legend.pixel_y = 3*WORLD_ICON_SIZE +// station_map.overlays |= legend diff --git a/code/modules/holomap/station_holomap.dm b/code/modules/holomap/station_holomap.dm new file mode 100644 index 0000000000..9de56229da --- /dev/null +++ b/code/modules/holomap/station_holomap.dm @@ -0,0 +1,251 @@ +// +// Wall mounted holomap of the station +// +/obj/machinery/station_map + name = "station holomap" + desc = "A virtual map of the surrounding station." + icon = 'icons/obj/machines/stationmap.dmi' + icon_state = "station_map" + anchored = 1 + density = 0 + use_power = 1 + idle_power_usage = 10 + active_power_usage = 500 + circuit = /obj/item/weapon/circuitboard/station_map + + // TODO - Port use_auto_lights from /vg - for now declare here + var/use_auto_lights = 1 + var/light_power_on = 1 + var/light_range_on = 2 + light_color = "#64C864" + + plane = TURF_PLANE + layer = ABOVE_TURF_LAYER + + var/mob/watching_mob = null + var/image/small_station_map = null + var/image/floor_markings = null + var/image/panel = null + + var/original_zLevel = 1 // zLevel on which the station map was initialized. + var/bogus = TRUE // set to 0 when you initialize the station map on a zLevel that has its own icon formatted for use by station holomaps. + var/datum/station_holomap/holomap_datum + +/obj/machinery/station_map/New() + ..() + holomap_datum = new() + original_zLevel = loc.z + SSholomaps.station_holomaps += src + flags |= ON_BORDER // Why? It doesn't help if its not density + +/obj/machinery/station_map/initialize() + . = ..() + if(SSholomaps.holomaps_initialized) + spawn(1) // Tragically we need to spawn this in order to give the frame construcing us time to set pixel_x/y + setup_holomap() + +/obj/machinery/station_map/Destroy() + SSholomaps.station_holomaps -= src + stopWatching() + holomap_datum = null + . = ..() + +/obj/machinery/station_map/proc/setup_holomap() + . = ..() + bogus = FALSE + var/turf/T = get_turf(src) + original_zLevel = T.z + if(!("[HOLOMAP_EXTRA_STATIONMAP]_[original_zLevel]" in SSholomaps.extraMiniMaps)) + bogus = TRUE + holomap_datum.initialize_holomap_bogus() + update_icon() + return + + holomap_datum.initialize_holomap(T, reinit = TRUE) + + small_station_map = image(SSholomaps.extraMiniMaps["[HOLOMAP_EXTRA_STATIONMAPSMALL]_[original_zLevel]"], dir = dir) + // small_station_map.plane = LIGHTING_PLANE // Not until we do planes ~Leshana + // small_station_map.layer = LIGHTING_LAYER+1 // Weird things will happen! + + floor_markings = image('icons/obj/machines/stationmap.dmi', "decal_station_map") + floor_markings.dir = src.dir + // floor_markings.plane = ABOVE_TURF_PLANE // Not until we do planes ~Leshana + // floor_markings.layer = DECAL_LAYER + update_icon() + +/obj/machinery/station_map/attack_hand(var/mob/user) + if(watching_mob && (watching_mob != user)) + to_chat(user, "Someone else is currently watching the holomap.") + return + if(user.loc != loc) + to_chat(user, "You need to stand in front of \the [src].") + return + startWatching(user) + +// Let people bump up against it to watch +/obj/machinery/station_map/Bumped(var/atom/movable/AM) + if(!watching_mob && isliving(AM) && AM.loc == loc) + startWatching(AM) + +// In order to actually get Bumped() we need to block movement. We're (visually) on a wall, so people +// couldn't really walk into us anyway. But in reality we are on the turf in front of the wall, so bumping +// against where we seem is actually trying to *exit* our real loc +/obj/machinery/station_map/CheckExit(atom/movable/mover as mob|obj, turf/target as turf) + // log_debug("[src] (dir=[dir]) CheckExit([mover], [target]) get_dir() = [get_dir(target, loc)]") + if(get_dir(target, loc) == dir) // Opposite of "normal" since we are visually in the next turf over + return FALSE + else + return TRUE + +/obj/machinery/station_map/proc/startWatching(var/mob/user) + // Okay, does this belong on a screen thing or what? + // One argument is that this is an "in game" object becuase its in the world. + // But I think it actually isn't. The map isn't holo projected into the whole room, (maybe strat one is!) + // But for this, the on screen object just represents you leaning in and looking at it closely. + // So it SHOULD be a screen object. + // But it is not QUITE a hud either. So I think it shouldn't go in /datum/hud + // Okay? Yeah. Lets use screen objects but manage them manually here in the item. + // That might be a mistake... I'd rather they be managed by some central hud management system. + // But the /vg code, while the screen obj is managed, its still adding and removing image, so this is + // just as good. + + // EH JUST HACK IT FOR NOW SO WE CAN SEE HOW IT LOOKS! STOP OBSESSING, ITS BEEN AN HOUR NOW! + + // TODO - This part!! ~Leshana + if(isliving(user) && anchored && !(stat & (NOPOWER|BROKEN))) + if(user.client) + holomap_datum.station_map.loc = global_hud.holomap // Put the image on the holomap hud + holomap_datum.station_map.alpha = 0 // Set to transparent so we can fade in + animate(holomap_datum.station_map, alpha = 255, time = 5, easing = LINEAR_EASING) + flick("station_map_activate", src) + // Wait, if wea re not modifying the holomap_obj... can't it be part of the global hud? + user.client.screen |= global_hud.holomap // TODO - HACK! This should be there permenently really. + user.client.images |= holomap_datum.station_map + + watching_mob = user + moved_event.register(watching_mob, src, /obj/machinery/station_map/proc/checkPosition) + dir_set_event.register(watching_mob, src, /obj/machinery/station_map/proc/checkPosition) + destroyed_event.register(watching_mob, src, /obj/machinery/station_map/proc/stopWatching) + update_use_power(2) + + if(bogus) + to_chat(user, "The holomap failed to initialize. This area of space cannot be mapped.") + else + to_chat(user, "A hologram of the station appears before your eyes.") + +/obj/machinery/station_map/attack_ai(var/mob/living/silicon/robot/user) + return // TODO - Implement for AI ~Leshana + // user.station_holomap.toggleHolomap(user, isAI(user)) + +/obj/machinery/station_map/process() + if((stat & (NOPOWER|BROKEN)) || !anchored) + stopWatching() + +/obj/machinery/station_map/proc/checkPosition() + if(!watching_mob || (watching_mob.loc != loc) || (dir != watching_mob.dir)) + stopWatching() + +/obj/machinery/station_map/proc/stopWatching() + if(watching_mob) + if(watching_mob.client) + animate(holomap_datum.station_map, alpha = 0, time = 5, easing = LINEAR_EASING) + var/mob/M = watching_mob + spawn(5) //we give it time to fade out + M.client.images -= holomap_datum.station_map + moved_event.unregister(watching_mob, src) + dir_set_event.unregister(watching_mob, src) + destroyed_event.unregister(watching_mob, src) + watching_mob = null + update_use_power(1) + +/obj/machinery/station_map/power_change() + . = ..() + update_icon() + // TODO - Port use_auto_lights from /vg - For now implement it manually here + if(stat & NOPOWER) + set_light(0) + else + set_light(light_range_on, light_power_on) + +/obj/machinery/station_map/proc/set_broken() + stat |= BROKEN + update_icon() + +/obj/machinery/station_map/update_icon() + overlays.Cut() + if(stat & BROKEN) + icon_state = "station_mapb" + else if((stat & NOPOWER) || !anchored) + icon_state = "station_map0" + else + icon_state = "station_map" + + if(bogus) + holomap_datum.initialize_holomap_bogus() + else + small_station_map.icon = SSholomaps.extraMiniMaps["[HOLOMAP_EXTRA_STATIONMAPSMALL]_[original_zLevel]"] + overlays |= small_station_map + holomap_datum.initialize_holomap(get_turf(src)) + + // Put the little "map" overlay down where it looks nice + if(floor_markings) + floor_markings.dir = src.dir + floor_markings.pixel_x = -src.pixel_x + floor_markings.pixel_y = -src.pixel_y + overlays += floor_markings + + if(panel_open) + overlays += "station_map-panel" + else + overlays -= "station_map-panel" + +/obj/machinery/station_map/attackby(obj/item/weapon/W as obj, mob/user as mob) + src.add_fingerprint(user) + if(default_deconstruction_screwdriver(user, W)) + return + if(default_deconstruction_crowbar(user, W)) + return + return ..() + +/obj/machinery/station_map/ex_act(severity) + switch(severity) + if(1) + qdel(src) + if(2) + if (prob(50)) + qdel(src) + else + set_broken() + if(3) + if (prob(25)) + set_broken() + +/datum/frame/frame_types/station_map + name = "Station Map Frame" + frame_class = "display" + frame_size = 3 + frame_style = "wall" + x_offset = WORLD_ICON_SIZE + y_offset = WORLD_ICON_SIZE + circuit = /obj/item/weapon/circuitboard/station_map + icon_override = 'icons/obj/machines/stationmap.dmi' + +/datum/frame/frame_types/station_map/get_icon_state(var/state) + return "station_map_frame_[state]" + +/obj/structure/frame + layer = ABOVE_WINDOW_LAYER + +/obj/item/weapon/circuitboard/station_map + name = T_BOARD("Station Map") + board_type = new /datum/frame/frame_types/station_map + build_path = /obj/machinery/station_map + origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 2) + req_components = list() + +// TODO +// //Portable holomaps, currently AI/Borg/MoMMI only + +// TODO +// OHHHH YEAH - STRATEGIC HOLOMAP! NICE! +// It will need to wait until later tho. diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm index cc46a8da38..7f95ac306c 100644 --- a/code/modules/hydroponics/beekeeping/beehive.dm +++ b/code/modules/hydroponics/beekeeping/beehive.dm @@ -33,22 +33,22 @@ /obj/machinery/beehive/examine(var/mob/user) ..() if(!closed) - user << "The lid is open." + to_chat(user, "The lid is open.") /obj/machinery/beehive/attackby(var/obj/item/I, var/mob/user) - if(istype(I, /obj/item/weapon/crowbar)) + if(I.is_crowbar()) closed = !closed user.visible_message("[user] [closed ? "closes" : "opens"] \the [src].", "You [closed ? "close" : "open"] \the [src].") update_icon() return - else if(istype(I, /obj/item/weapon/wrench)) + else if(I.is_wrench()) anchored = !anchored playsound(loc, I.usesound, 50, 1) user.visible_message("[user] [anchored ? "wrenches" : "unwrenches"] \the [src].", "You [anchored ? "wrench" : "unwrench"] \the [src].") return else if(istype(I, /obj/item/bee_smoker)) if(closed) - user << "You need to open \the [src] with a crowbar before smoking the bees." + to_chat(user, "You need to open \the [src] with a crowbar before smoking the bees.") return user.visible_message("[user] smokes the bees in \the [src].", "You smoke the bees in \the [src].") smoked = 30 @@ -56,14 +56,14 @@ return else if(istype(I, /obj/item/honey_frame)) if(closed) - user << "You need to open \the [src] with a crowbar before inserting \the [I]." + to_chat(user, "You need to open \the [src] with a crowbar before inserting \the [I].") return if(frames >= maxFrames) - user << "There is no place for an another frame." + to_chat(user, "There is no place for an another frame.") return var/obj/item/honey_frame/H = I if(H.honey) - user << "\The [I] is full with beeswax and honey, empty it in the extractor first." + to_chat(user, "\The [I] is full with beeswax and honey, empty it in the extractor first.") return ++frames user.visible_message("[user] loads \the [I] into \the [src].", "You load \the [I] into \the [src].") @@ -74,16 +74,16 @@ else if(istype(I, /obj/item/bee_pack)) var/obj/item/bee_pack/B = I if(B.full && bee_count) - user << "\The [src] already has bees inside." + to_chat(user, "\The [src] already has bees inside.") return if(!B.full && bee_count < 90) - user << "\The [src] is not ready to split." + to_chat(user, "\The [src] is not ready to split.") return if(!B.full && !smoked) - user << "Smoke \the [src] first!" + to_chat(user, "Smoke \the [src] first!") return if(closed) - user << "You need to open \the [src] with a crowbar before moving the bees." + to_chat(user, "You need to open \the [src] with a crowbar before moving the bees.") return if(B.full) user.visible_message("[user] puts the queen and the bees from \the [I] into \the [src].", "You put the queen and the bees from \the [I] into \the [src].") @@ -96,22 +96,22 @@ update_icon() return else if(istype(I, /obj/item/device/analyzer/plant_analyzer)) - user << "Scan result of \the [src]..." - user << "Beehive is [bee_count ? "[round(bee_count)]% full" : "empty"].[bee_count > 90 ? " Colony is ready to split." : ""]" + to_chat(user, "Scan result of \the [src]...") + to_chat(user, "Beehive is [bee_count ? "[round(bee_count)]% full" : "empty"].[bee_count > 90 ? " Colony is ready to split." : ""]") if(frames) - user << "[frames] frames installed, [round(honeycombs / 100)] filled." + to_chat(user, "[frames] frames installed, [round(honeycombs / 100)] filled.") if(honeycombs < frames * 100) - user << "Next frame is [round(honeycombs % 100)]% full." + to_chat(user, "Next frame is [round(honeycombs % 100)]% full.") else - user << "No frames installed." + to_chat(user, "No frames installed.") if(smoked) - user << "The hive is smoked." + to_chat(user, "The hive is smoked.") return 1 - else if(istype(I, /obj/item/weapon/screwdriver)) + else if(I.is_screwdriver()) if(bee_count) - user << "You can't dismantle \the [src] with these bees inside." + to_chat(user, "You can't dismantle \the [src] with these bees inside.") return - user << "You start dismantling \the [src]..." + to_chat(user, "You start dismantling \the [src]...") playsound(src, I.usesound, 50, 1) if(do_after(user, 30)) user.visible_message("[user] dismantles \the [src].", "You dismantle \the [src].") @@ -122,10 +122,10 @@ /obj/machinery/beehive/attack_hand(var/mob/user) if(!closed) if(honeycombs < 100) - user << "There are no filled honeycombs." + to_chat(user, "There are no filled honeycombs.") return if(!smoked && bee_count) - user << "The bees won't let you take the honeycombs out like this, smoke them first." + to_chat(user, "The bees won't let you take the honeycombs out like this, smoke them first.") return user.visible_message("[user] starts taking the honeycombs out of \the [src].", "You start taking the honeycombs out of \the [src]...") while(honeycombs >= 100 && do_after(user, 30)) @@ -134,7 +134,7 @@ --frames update_icon() if(honeycombs < 100) - user << "You take all filled honeycombs out." + to_chat(user, "You take all filled honeycombs out.") return /obj/machinery/beehive/process() @@ -166,12 +166,12 @@ /obj/machinery/honey_extractor/attackby(var/obj/item/I, var/mob/user) if(processing) - user << "\The [src] is currently spinning, wait until it's finished." + to_chat(user, "\The [src] is currently spinning, wait until it's finished.") return else if(istype(I, /obj/item/honey_frame)) var/obj/item/honey_frame/H = I if(!H.honey) - user << "\The [H] is empty, put it into a beehive." + to_chat(user, "\The [H] is empty, put it into a beehive.") return user.visible_message("[user] loads \the [H] into \the [src] and turns it on.", "You load \the [H] into \the [src] and turn it on.") processing = H.honey @@ -185,7 +185,7 @@ icon_state = "centrifuge" else if(istype(I, /obj/item/weapon/reagent_containers/glass)) if(!honey) - user << "There is no honey in \the [src]." + to_chat(user, "There is no honey in \the [src].") return var/obj/item/weapon/reagent_containers/glass/G = I var/transferred = min(G.reagents.maximum_volume - G.reagents.total_volume, honey) @@ -226,7 +226,7 @@ icon_state = "apiary" /obj/item/beehive_assembly/attack_self(var/mob/user) - user << "You start assembling \the [src]..." + to_chat(user, "You start assembling \the [src]...") if(do_after(user, 30)) user.visible_message("[user] constructs a beehive.", "You construct a beehive.") new /obj/machinery/beehive(get_turf(user)) diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 5c6053aba4..145412a1ad 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -107,7 +107,7 @@ if(istype(target, /mob/living/simple_animal/mouse)) new /obj/effect/decal/remains/mouse(get_turf(target)) qdel(target) - else if(istype(target, /mob/living/simple_animal/lizard)) + else if(istype(target, /mob/living/simple_mob/animal/passive/lizard)) new /obj/effect/decal/remains/lizard(get_turf(target)) qdel(target) return diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index bc96f064c9..3507e49700 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -17,7 +17,7 @@ if(genes.len) var/choice = alert(user, "Are you sure you want to wipe the disk?", "Xenobotany Data", "No", "Yes") if(src && user && genes && choice && choice == "Yes" && user.Adjacent(get_turf(src))) - user << "You wipe the disk data." + to_chat(user, "You wipe the disk data.") name = initial(name) desc = initial(name) genes = list() @@ -82,16 +82,16 @@ /obj/machinery/botany/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/seeds)) if(seed) - user << "There is already a seed loaded." + to_chat(user, "There is already a seed loaded.") return var/obj/item/seeds/S =W if(S.seed && S.seed.get_trait(TRAIT_IMMUTABLE) > 0) - user << "That seed is not compatible with our genetics technology." + to_chat(user, "That seed is not compatible with our genetics technology.") else user.drop_from_inventory(W) W.loc = src seed = W - user << "You load [W] into [src]." + to_chat(user, "You load [W] into [src].") return if(default_deconstruction_screwdriver(user, W)) @@ -100,24 +100,24 @@ return if(istype(W,/obj/item/weapon/disk/botany)) if(loaded_disk) - user << "There is already a data disk loaded." + to_chat(user, "There is already a data disk loaded.") return else var/obj/item/weapon/disk/botany/B = W if(B.genes && B.genes.len) if(!disk_needs_genes) - user << "That disk already has gene data loaded." + to_chat(user, "That disk already has gene data loaded.") return else if(disk_needs_genes) - user << "That disk does not have any gene data loaded." + to_chat(user, "That disk does not have any gene data loaded.") return user.drop_from_inventory(W) W.loc = src loaded_disk = W - user << "You load [W] into [src]." + to_chat(user, "You load [W] into [src].") return ..() diff --git a/code/modules/hydroponics/seed_storage.dm b/code/modules/hydroponics/seed_storage.dm index 6ee9fde05c..b2803e9d05 100644 --- a/code/modules/hydroponics/seed_storage.dm +++ b/code/modules/hydroponics/seed_storage.dm @@ -482,20 +482,20 @@ if (loaded) user.visible_message("[user] puts the seeds from \the [O.name] into \the [src].", "You put the seeds from \the [O.name] into \the [src].") else - user << "There are no seeds in \the [O.name]." + to_chat(user, "There are no seeds in \the [O.name].") return - else if(istype(O, /obj/item/weapon/wrench)) + else if(O.is_wrench()) playsound(loc, O.usesound, 50, 1) anchored = !anchored - user << "You [anchored ? "wrench" : "unwrench"] \the [src]." - else if(istype(O, /obj/item/weapon/screwdriver)) + to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") + else if(O.is_screwdriver()) panel_open = !panel_open to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") playsound(src, O.usesound, 50, 1) overlays.Cut() if(panel_open) overlays += image(icon, "[initial(icon_state)]-panel") - else if((istype(O, /obj/item/weapon/wirecutters) || istype(O, /obj/item/device/multitool)) && panel_open) + else if((O.is_wirecutter() || istype(O, /obj/item/device/multitool)) && panel_open) wires.Interact(user) /obj/machinery/seed_storage/emag_act(var/remaining_charges, var/mob/user) diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index c35d4b489a..b2e3e28287 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -240,7 +240,7 @@ user.setClickCooldown(user.get_attack_speed(W)) plant_controller.add_plant(src) - if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/surgical/scalpel)) + if(W.is_wirecutter() || istype(W, /obj/item/weapon/surgical/scalpel)) if(sampled) user << "\The [src] has already been sampled recently." return diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index 7dc02dedc7..8db9f7a8f1 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -453,7 +453,7 @@ if(O.is_open_container()) return 0 - if(istype(O, /obj/item/weapon/wirecutters) || istype(O, /obj/item/weapon/surgical/scalpel)) + if(O.is_wirecutter() || istype(O, /obj/item/weapon/surgical/scalpel)) if(!seed) user << "There is nothing to take a sample from in \the [src]." @@ -548,7 +548,7 @@ qdel(O) check_health() - else if(mechanical && istype(O, /obj/item/weapon/wrench)) + else if(mechanical && O.is_wrench()) //If there's a connector here, the portable_atmospherics setup can handle it. if(locate(/obj/machinery/atmospherics/portables_connector/) in loc) diff --git a/code/modules/hydroponics/trays/tray_tools.dm b/code/modules/hydroponics/trays/tray_tools.dm index 6c6a8ddbe3..c242f30bed 100644 --- a/code/modules/hydroponics/trays/tray_tools.dm +++ b/code/modules/hydroponics/trays/tray_tools.dm @@ -1,6 +1,6 @@ //Analyzer, pestkillers, weedkillers, nutrients, hatchets, cutters. -/obj/item/weapon/wirecutters/clippers +/obj/item/weapon/tool/wirecutters/clippers name = "plant clippers" desc = "A tool used to take samples from plants." diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index 6404e2a579..90046fd269 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -264,13 +264,13 @@ playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) interact(user) return TRUE - else if(istype(I, /obj/item/weapon/crowbar)) + else if(I.is_crowbar()) playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1) opened = !opened to_chat(user, "You [opened ? "opened" : "closed"] \the [src].") update_icon() return TRUE - else if(istype(I, /obj/item/device/integrated_electronics/wirer) || istype(I, /obj/item/device/integrated_electronics/debugger) || istype(I, /obj/item/weapon/screwdriver)) + else if(istype(I, /obj/item/device/integrated_electronics/wirer) || istype(I, /obj/item/device/integrated_electronics/debugger) || I.is_screwdriver()) if(opened) interact(user) else diff --git a/code/modules/integrated_electronics/core/device.dm b/code/modules/integrated_electronics/core/device.dm index 91243aefab..1b298c7a36 100644 --- a/code/modules/integrated_electronics/core/device.dm +++ b/code/modules/integrated_electronics/core/device.dm @@ -12,7 +12,7 @@ ..() /obj/item/device/assembly/electronic_assembly/attackby(obj/item/I as obj, mob/user as mob) - if (iscrowbar(I) ) + if (I.is_crowbar()) toggle_open(user) else if (opened) EA.attackby(I, user) diff --git a/code/modules/integrated_electronics/core/tools.dm b/code/modules/integrated_electronics/core/tools.dm index 5d4133e3d3..c9d1c89e2b 100644 --- a/code/modules/integrated_electronics/core/tools.dm +++ b/code/modules/integrated_electronics/core/tools.dm @@ -261,11 +261,11 @@ /obj/item/weapon/storage/bag/circuits/mini, /obj/item/device/electronic_assembly, /obj/item/device/integrated_electronics, - /obj/item/weapon/crowbar, - /obj/item/weapon/screwdriver, + /obj/item/weapon/tool/crowbar, + /obj/item/weapon/tool/screwdriver, /obj/item/device/multitool ) - cant_hold = list(/obj/item/weapon/screwdriver/power) + cant_hold = list(/obj/item/weapon/tool/screwdriver/power) /obj/item/weapon/storage/bag/circuits/basic/New() ..() @@ -290,8 +290,8 @@ new /obj/item/device/assembly/electronic_assembly(src) new /obj/item/device/assembly/electronic_assembly(src) new /obj/item/device/multitool(src) - new /obj/item/weapon/screwdriver(src) - new /obj/item/weapon/crowbar(src) + new /obj/item/weapon/tool/screwdriver(src) + new /obj/item/weapon/tool/crowbar(src) make_exact_fit() /obj/item/weapon/storage/bag/circuits/all/New() @@ -317,7 +317,7 @@ new /obj/item/device/electronic_assembly/drone(src) new /obj/item/device/integrated_electronics/wirer(src) new /obj/item/device/integrated_electronics/debugger(src) - new /obj/item/weapon/crowbar(src) + new /obj/item/weapon/tool/crowbar(src) make_exact_fit() /obj/item/weapon/storage/bag/circuits/mini/ diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm index 3e53a069f3..344a7dc47e 100644 --- a/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -32,13 +32,13 @@ if(istype(O, /obj/item/weapon/gun)) var/obj/item/weapon/gun/gun = O if(installed_gun) - user << "There's already a weapon installed." + to_chat(user, "There's already a weapon installed.") return user.drop_from_inventory(gun) installed_gun = gun size += gun.w_class gun.forceMove(src) - user << "You slide \the [gun] into the firing mechanism." + to_chat(user, "You slide \the [gun] into the firing mechanism.") playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) else ..() @@ -46,12 +46,12 @@ /obj/item/integrated_circuit/manipulation/weapon_firing/attack_self(var/mob/user) if(installed_gun) installed_gun.forceMove(get_turf(src)) - user << "You slide \the [installed_gun] out of the firing mechanism." + to_chat(user, "You slide \the [installed_gun] out of the firing mechanism.") size = initial(size) playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) installed_gun = null else - user << "There's no weapon to remove from the mechanism." + to_chat(user, "There's no weapon to remove from the mechanism.") /obj/item/integrated_circuit/manipulation/weapon_firing/do_work() if(!installed_gun) diff --git a/code/modules/integrated_electronics/subtypes/memory.dm b/code/modules/integrated_electronics/subtypes/memory.dm index 94c4594f5b..24dd18c80b 100644 --- a/code/modules/integrated_electronics/subtypes/memory.dm +++ b/code/modules/integrated_electronics/subtypes/memory.dm @@ -75,7 +75,6 @@ /obj/item/integrated_circuit/memory/constant name = "constant chip" desc = "This tiny chip can store one piece of data, which cannot be overwritten without disassembly." - icon_state = "memory" complexity = 1 inputs = list() outputs = list("output pin" = IC_PINTYPE_ANY) diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 10c1fb2a8e..63f855b8a4 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -37,15 +37,15 @@ return else name = ("bookcase ([newname])") - else if(istype(O,/obj/item/weapon/wrench)) + else if(O.is_wrench()) playsound(loc, O.usesound, 100, 1) - user << (anchored ? "You unfasten \the [src] from the floor." : "You secure \the [src] to the floor.") + to_chat(user, (anchored ? "You unfasten \the [src] from the floor." : "You secure \the [src] to the floor.")) anchored = !anchored - else if(istype(O,/obj/item/weapon/screwdriver)) + else if(O.is_screwdriver()) playsound(loc, O.usesound, 75, 1) - user << "You begin dismantling \the [src]." + to_chat(user, "You begin dismantling \the [src].") if(do_after(user,25 * O.toolspeed)) - user << "You dismantle \the [src]." + to_chat(user, "You dismantle \the [src].") new /obj/item/stack/material/wood(get_turf(src), 3) for(var/obj/item/weapon/book/b in contents) b.loc = (get_turf(src)) @@ -154,19 +154,19 @@ /obj/item/weapon/book/attack_self(var/mob/user as mob) if(carved) if(store) - user << "[store] falls out of [title]!" + to_chat(user, "[store] falls out of [title]!") store.loc = get_turf(src.loc) store = null return else - user << "The pages of [title] have been cut out!" + to_chat(user, "The pages of [title] have been cut out!") return if(src.dat) user << browse("Penned by [author].
" + "[dat]", "window=book") user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.") onclose(user, "book") else - user << "This book is completely blank!" + to_chat(user, "This book is completely blank!") /obj/item/weapon/book/attackby(obj/item/weapon/W as obj, mob/user as mob) if(carved) @@ -175,24 +175,24 @@ user.drop_item() W.loc = src store = W - user << "You put [W] in [title]." + to_chat(user, "You put [W] in [title].") return else - user << "[W] won't fit in [title]." + to_chat(user, "[W] won't fit in [title].") return else - user << "There's already something in [title]!" + to_chat(user, "There's already something in [title]!") return if(istype(W, /obj/item/weapon/pen)) if(unique) - user << "These pages don't seem to take the ink well. Looks like you can't modify it." + to_chat(user, "These pages don't seem to take the ink well. Looks like you can't modify it.") return var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel") switch(choice) if("Title") var/newtitle = reject_bad_text(sanitizeSafe(input("Write a new title:"))) if(!newtitle) - usr << "The title is invalid." + to_chat(usr, "The title is invalid.") return else src.name = newtitle @@ -200,14 +200,14 @@ if("Contents") var/content = sanitize(input("Write your book's contents (HTML NOT allowed):") as message|null, MAX_BOOK_MESSAGE_LEN) if(!content) - usr << "The content is invalid." + to_chat(usr, "The content is invalid.") return else src.dat += content if("Author") var/newauthor = sanitize(input(usr, "Write the author's name:")) if(!newauthor) - usr << "The name is invalid." + to_chat(usr, "The name is invalid.") return else src.author = newauthor @@ -216,37 +216,37 @@ else if(istype(W, /obj/item/weapon/barcodescanner)) var/obj/item/weapon/barcodescanner/scanner = W if(!scanner.computer) - user << "[W]'s screen flashes: 'No associated computer found!'" + to_chat(user, "[W]'s screen flashes: 'No associated computer found!'") else switch(scanner.mode) if(0) scanner.book = src - user << "[W]'s screen flashes: 'Book stored in buffer.'" + to_chat(user, "[W]'s screen flashes: 'Book stored in buffer.'") if(1) scanner.book = src scanner.computer.buffer_book = src.name - user << "[W]'s screen flashes: 'Book stored in buffer. Book title stored in associated computer buffer.'" + to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Book title stored in associated computer buffer.'") if(2) scanner.book = src for(var/datum/borrowbook/b in scanner.computer.checkouts) if(b.bookname == src.name) scanner.computer.checkouts.Remove(b) - user << "[W]'s screen flashes: 'Book stored in buffer. Book has been checked in.'" + to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Book has been checked in.'") return - user << "[W]'s screen flashes: 'Book stored in buffer. No active check-out record found for current title.'" + to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. No active check-out record found for current title.'") if(3) scanner.book = src for(var/obj/item/weapon/book in scanner.computer.inventory) if(book == src) - user << "[W]'s screen flashes: 'Book stored in buffer. Title already present in inventory, aborting to avoid duplicate entry.'" + to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title already present in inventory, aborting to avoid duplicate entry.'") return scanner.computer.inventory.Add(src) - user << "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'" - else if(istype(W, /obj/item/weapon/material/knife) || istype(W, /obj/item/weapon/wirecutters)) + to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'") + else if(istype(W, /obj/item/weapon/material/knife) || W.is_wirecutter()) if(carved) return - user << "You begin to carve out [title]." + to_chat(user, "You begin to carve out [title].") if(do_after(user, 30)) - user << "You carve out the pages from [title]! You didn't want to read it anyway." + to_chat(user, "You carve out the pages from [title]! You didn't want to read it anyway.") carved = 1 return else @@ -278,7 +278,7 @@ mode += 1 if(mode > 3) mode = 0 - user << "[src] Status Display:" + to_chat(user, "[src] Status Display:") var/modedesc switch(mode) if(0) @@ -291,9 +291,9 @@ modedesc = "Scan book to local buffer, attempt to add book to general inventory." else modedesc = "ERROR" - user << " - Mode [mode] : [modedesc]" + to_chat(user, " - Mode [mode] : [modedesc]") if(src.computer) - user << "Computer has been associated with this unit." + to_chat(user, "Computer has been associated with this unit.") else - user << "No associated computer found. Only local scans will function properly." - user << "\n" \ No newline at end of file + to_chat(user, "No associated computer found. Only local scans will function properly.") + to_chat(user, "\n") \ No newline at end of file diff --git a/code/modules/mining/coins.dm b/code/modules/mining/coins.dm index 2536f0ac2d..baf8094967 100644 --- a/code/modules/mining/coins.dm +++ b/code/modules/mining/coins.dm @@ -57,7 +57,7 @@ else user << "This cable coil appears to be empty." return - else if(istype(W,/obj/item/weapon/wirecutters)) + else if(W.is_wirecutter()) if(!string_attached) ..() return diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index 99fe3f85ee..7cf8bc575e 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -158,13 +158,13 @@ if(istype(O, /obj/item/weapon/cell)) if(cell) - user << "The drill already has a cell installed." + to_chat(user, "The drill already has a cell installed.") else user.drop_item() O.loc = src cell = O component_parts += O - user << "You install \the [O]." + to_chat(user, "You install \the [O].") return ..() @@ -172,13 +172,13 @@ check_supports() if (panel_open && cell && user.Adjacent(src)) - user << "You take out \the [cell]." + to_chat(user, "You take out \the [cell].") cell.loc = get_turf(user) component_parts -= cell cell = null return else if(need_player_check) - user << "You hit the manual override and reset the drill's error checking." + to_chat(user, "You hit the manual override and reset the drill's error checking.") need_player_check = 0 if(anchored) get_resource_field() @@ -193,9 +193,9 @@ else visible_message("\The [src] shudders to a grinding halt.") else - user << "The drill is unpowered." + to_chat(user, "The drill is unpowered.") else - user << "Turning on a piece of industrial machinery without sufficient bracing or wires exposed is a bad idea." + to_chat(user, "Turning on a piece of industrial machinery without sufficient bracing or wires exposed is a bad idea.") update_icon() @@ -289,9 +289,9 @@ if(B) for(var/obj/item/weapon/ore/O in contents) O.loc = B - usr << "You unload the drill's storage cache into the ore box." + to_chat(usr, "You unload the drill's storage cache into the ore box.") else - usr << "You must move an ore box up to the drill before you can unload it." + to_chat(usr, "You must move an ore box up to the drill before you can unload it.") /obj/machinery/mining/brace @@ -308,7 +308,7 @@ /obj/machinery/mining/brace/attackby(obj/item/weapon/W as obj, mob/user as mob) if(connected && connected.active) - user << "You can't work with the brace of a running drill!" + to_chat(user, "You can't work with the brace of a running drill!") return if(default_deconstruction_screwdriver(user, W)) @@ -316,14 +316,14 @@ if(default_deconstruction_crowbar(user, W)) return - if(istype(W,/obj/item/weapon/wrench)) + if(W.is_wrench()) if(istype(get_turf(src), /turf/space)) - user << "You can't anchor something to empty space. Idiot." + to_chat(user, "You can't anchor something to empty space. Idiot.") return playsound(src, W.usesound, 100, 1) - user << "You [anchored ? "un" : ""]anchor the brace." + to_chat(user, "You [anchored ? "un" : ""]anchor the brace.") anchored = !anchored if(anchored) @@ -371,7 +371,7 @@ if(usr.stat) return if (src.anchored) - usr << "It is anchored in place!" + to_chat(usr, "It is anchored in place!") return 0 src.set_dir(turn(src.dir, 90)) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index a056a62bed..843edf3f7f 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -18,6 +18,8 @@ var/list/mining_overlay_cache = list() blocks_air = 1 temperature = T0C + can_dirty = FALSE + var/ore/mineral var/sand_dug var/mined_ore = 0 diff --git a/code/modules/mob/_modifiers/traits.dm b/code/modules/mob/_modifiers/traits.dm index e510798001..d0b0abfd89 100644 --- a/code/modules/mob/_modifiers/traits.dm +++ b/code/modules/mob/_modifiers/traits.dm @@ -84,20 +84,38 @@ icon_scale_percent = 0.9 +/datum/modifier/trait/colorblind_protanopia + name = "Protanopia" + desc = "You have a form of red-green colorblindness. You cannot see reds, and have trouble distinguishing them from yellows and greens." + + client_color = MATRIX_Protanopia + +/datum/modifier/trait/colorblind_deuteranopia + name = "Deuteranopia" + desc = "You have a form of red-green colorblindness. You cannot see greens, and have trouble distinguishing them from yellows and reds." + + client_color = MATRIX_Deuteranopia + +/datum/modifier/trait/colorblind_tritanopia + name = "Tritanopia" + desc = "You have a form of blue-yellow colorblindness. You have trouble distinguishing between blues, greens, and yellows, and see blues and violets as dim." + + client_color = MATRIX_Tritanopia + /datum/modifier/trait/colorblind_taj - name = "Colorblind - B+R" + name = "Colorblind - Blue-red" desc = "You are colorblind. You have a minor issue with blue colors and have difficulty recognizing them from red colors." - + client_color = MATRIX_Taj_Colorblind /datum/modifier/trait/colorblind_vulp - name = "Colorblind - G+R" + name = "Colorblind - Red-green" desc = "You are colorblind. You have a severe issue with green colors and have difficulty recognizing them from red colors." - + client_color = MATRIX_Vulp_Colorblind -/datum/modifier/trait/colorblind_mono - name = "Colorblind - Mono" - desc = "You are colorblind. Your condition is rare, but you can see no colors at all." - +/datum/modifier/trait/colorblind_monochrome + name = "Monochromacy" + desc = "You are fully colorblind. Your condition is rare, but you can see no colors at all." + client_color = MATRIX_Monochromia diff --git a/code/modules/mob/_modifiers/traits_phobias.dm b/code/modules/mob/_modifiers/traits_phobias.dm index 0fbe099c22..f55cedd4b4 100644 --- a/code/modules/mob/_modifiers/traits_phobias.dm +++ b/code/modules/mob/_modifiers/traits_phobias.dm @@ -207,8 +207,8 @@ if(istype(thing, /obj/structure/snowman/spider)) //Snow spiders are also spooky so people can be assholes with those too. fear_amount += 1 - if(istype(thing, /mob/living/simple_animal/hostile/giant_spider)) // Actual giant spiders are the scariest of them all. - var/mob/living/simple_animal/hostile/giant_spider/S = thing + if(istype(thing, /mob/living/simple_mob/animal/giant_spider)) // Actual giant spiders are the scariest of them all. + var/mob/living/simple_mob/animal/giant_spider/S = thing if(S.stat == DEAD) // Dead giant spiders are less scary than alive ones. fear_amount += 4 else diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index 3a19eee319..74baf0d9ce 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -95,6 +95,9 @@ var/list/holder_mob_icon_cache = list() /obj/item/weapon/holder/drone origin_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 5) +/obj/item/weapon/holder/pai + origin_tech = list(TECH_DATA = 2) + /obj/item/weapon/holder/mouse w_class = ITEMSIZE_TINY diff --git a/code/modules/mob/language/station.dm b/code/modules/mob/language/station.dm index c80f606ae6..47cb3b8de0 100644 --- a/code/modules/mob/language/station.dm +++ b/code/modules/mob/language/station.dm @@ -133,7 +133,11 @@ flags = WHITELISTED syllables = list("qr","qrr","xuq","qil","quum","xuqm","vol","xrim","zaoo","qu-uu","qix","qoo","zix", "...", "oo", "q", "nq", "x", "xq", "ll", "...", "...", "...") //should sound like there's holes in it - +/datum/language/skrell/get_random_name(var/gender) + var/list/first_names = file2list('config/names/first_name_skrell.txt') + var/list/last_names = file2list('config/names/last_name_skrell.txt') + return "[pick(first_names)] [pick(last_names)]" + /datum/language/human name = LANGUAGE_SOL_COMMON desc = "A bastardized hybrid of many languages, including Chinese, English, French, and more; it is the common language of the Sol system." @@ -288,4 +292,4 @@ "tod", "ser", "su", "no", "nue", "el", "ad", "al", "an", "ar", "as", "ci", "co", "de", "do", "el", "en", "er", "es", "ie", "in", "la", "lo", "me", "na", "no", "nt", "or", "os", "pa", "qu", "ra", "re", "ro", "se", "st", "ta", "te", "to", "ue", "un", -"tod", "ser", "su", "no", "nue", "el") \ No newline at end of file +"tod", "ser", "su", "no", "nue", "el") diff --git a/code/modules/mob/living/bot/bot.dm b/code/modules/mob/living/bot/bot.dm index bf52dbcfec..12715a4c2b 100644 --- a/code/modules/mob/living/bot/bot.dm +++ b/code/modules/mob/living/bot/bot.dm @@ -7,6 +7,8 @@ universal_speak = 1 density = 0 + makes_dirt = FALSE // No more dirt from Beepsky + var/obj/item/weapon/card/id/botcard = null var/list/botcard_access = list() var/on = 1 @@ -86,23 +88,23 @@ if(O.GetID()) if(access_scanner.allowed(user) && !open && !emagged) locked = !locked - user << "Controls are now [locked ? "locked." : "unlocked."]" + to_chat(user, "Controls are now [locked ? "locked." : "unlocked."]") attack_hand(user) else if(emagged) - user << "ERROR" + to_chat(user, "ERROR") if(open) - user << "Please close the access panel before locking it." + to_chat(user, "Please close the access panel before locking it.") else - user << "Access denied." + to_chat(user, "Access denied.") return - else if(istype(O, /obj/item/weapon/screwdriver)) + else if(O.is_screwdriver()) if(!locked) open = !open - user << "Maintenance panel is now [open ? "opened" : "closed"]." + to_chat(user, "Maintenance panel is now [open ? "opened" : "closed"].") playsound(src, O.usesound, 50, 1) else - user << "You need to unlock the controls first." + to_chat(user, "You need to unlock the controls first.") return else if(istype(O, /obj/item/weapon/weldingtool)) if(health < getMaxHealth()) @@ -111,9 +113,9 @@ user.visible_message("[user] repairs [src].","You repair [src].") playsound(src, O.usesound, 50, 1) else - user << "Unable to repair with the maintenance panel closed." + to_chat(user, "Unable to repair with the maintenance panel closed.") else - user << "[src] does not need a repair." + to_chat(user, "[src] does not need a repair.") return else ..() diff --git a/code/modules/mob/living/bot/ed209bot.dm b/code/modules/mob/living/bot/ed209bot.dm index cac0f1872a..7c709bc165 100644 --- a/code/modules/mob/living/bot/ed209bot.dm +++ b/code/modules/mob/living/bot/ed209bot.dm @@ -56,7 +56,7 @@ /mob/living/bot/secbot/ed209/RangedAttack(var/atom/A) if(last_shot + shot_delay > world.time) - src << "You are not ready to fire yet!" + to_chat(src, "You are not ready to fire yet!") return last_shot = world.time @@ -100,7 +100,7 @@ user.drop_item() qdel(W) build_step++ - user << "You add the robot leg to [src]." + to_chat(user, "You add the robot leg to [src].") name = "legs/frame assembly" if(build_step == 1) icon_state = "ed209_leg" @@ -112,7 +112,7 @@ user.drop_item() qdel(W) build_step++ - user << "You add the armor to [src]." + to_chat(user, "You add the armor to [src].") name = "vest/legs/frame assembly" item_state = "ed209_shell" icon_state = "ed209_shell" @@ -123,13 +123,13 @@ if(WT.remove_fuel(0, user)) build_step++ name = "shielded frame assembly" - user << "You welded the vest to [src]." + to_chat(user, "You welded the vest to [src].") if(4) if(istype(W, /obj/item/clothing/head/helmet)) user.drop_item() qdel(W) build_step++ - user << "You add the helmet to [src]." + to_chat(user, "You add the helmet to [src].") name = "covered and shielded frame assembly" item_state = "ed209_hat" icon_state = "ed209_hat" @@ -139,7 +139,7 @@ user.drop_item() qdel(W) build_step++ - user << "You add the prox sensor to [src]." + to_chat(user, "You add the prox sensor to [src].") name = "covered, shielded and sensored frame assembly" item_state = "ed209_prox" icon_state = "ed209_prox" @@ -148,13 +148,13 @@ if(istype(W, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = W if (C.get_amount() < 1) - user << "You need one coil of wire to wire [src]." + to_chat(user, "You need one coil of wire to wire [src].") return - user << "You start to wire [src]." + to_chat(user, "You start to wire [src].") if(do_after(user, 40) && build_step == 6) if(C.use(1)) build_step++ - user << "You wire the ED-209 assembly." + to_chat(user, "You wire the ED-209 assembly.") name = "wired ED-209 assembly" return @@ -162,27 +162,27 @@ if(istype(W, /obj/item/weapon/gun/energy/taser)) name = "taser ED-209 assembly" build_step++ - user << "You add [W] to [src]." + to_chat(user, "You add [W] to [src].") item_state = "ed209_taser" icon_state = "ed209_taser" user.drop_item() qdel(W) if(8) - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) playsound(src, W.usesound, 100, 1) var/turf/T = get_turf(user) - user << "Now attaching the gun to the frame..." + to_chat(user, "Now attaching the gun to the frame...") sleep(40) if(get_turf(user) == T && build_step == 8) build_step++ name = "armed [name]" - user << "Taser gun attached." + to_chat(user, "Taser gun attached.") if(9) if(istype(W, /obj/item/weapon/cell)) build_step++ - user << "You complete the ED-209." + to_chat(user, "You complete the ED-209.") var/turf/T = get_turf(src) new /mob/living/bot/secbot/ed209(T,created_name,lasercolor) user.drop_item() diff --git a/code/modules/mob/living/bot/edCLNbot.dm b/code/modules/mob/living/bot/edCLNbot.dm index 159b3e3594..9b84651165 100644 --- a/code/modules/mob/living/bot/edCLNbot.dm +++ b/code/modules/mob/living/bot/edCLNbot.dm @@ -214,7 +214,7 @@ qdel(W) if(7) - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) playsound(src, W.usesound, 100, 1) var/turf/T = get_turf(user) to_chat(user, "Attatching the mop to the frame...") diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 277604bdfc..a5ef3304ab 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1160,11 +1160,7 @@ fixblood() // Rebuild the HUD. If they aren't logged in then login() should reinstantiate it for them. - if(client && client.screen) - client.screen.len = null - if(hud_used) - qdel(hud_used) - hud_used = new /datum/hud(src) + update_hud() //A slew of bits that may be affected by our species change regenerate_icons() diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 30e00f2e7a..e25e9ea2c1 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -110,14 +110,14 @@ if(CE_SLOWDOWN in chem_effects) if (tally >= 0 ) tally = (tally + tally/4) //Add a quarter of penalties on top. - tally += 1 + tally += chem_effects[CE_SLOWDOWN] if(CE_SPEEDBOOST in chem_effects) if (tally >= 0) // cut any penalties in half tally = tally/2 - tally -= 1 // give 'em a buff on top. + tally -= chem_effects[CE_SPEEDBOOST] // give 'em a buff on top. - return (tally+config.human_delay) + return max(-3, tally+config.human_delay) // Minimum return should be the same as force_max_speed /mob/living/carbon/human/Process_Spacemove(var/check_drift = 0) //Can we act? diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index b7b0c86b19..c35fdcbf2a 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -119,7 +119,7 @@ var/list/ai_verbs_default = list( canmove = 0 density = 1 loc = loc - + if(!is_dummy) aiCommunicator = new /obj/item/device/communicator/integrated(src) @@ -686,7 +686,7 @@ var/list/ai_verbs_default = list( var/obj/item/device/aicard/card = W card.grab_ai(src, user) - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) if(user == controlling_drone) to_chat(user, "The drone's subsystems resist your efforts to tamper with your bolts.") return @@ -796,7 +796,7 @@ var/list/ai_verbs_default = list( //Special subtype kept around for global announcements /mob/living/silicon/ai/announcer/ is_dummy = 1 - + /mob/living/silicon/ai/announcer/initialize() . = ..() mob_list -= src diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 5ed6fde8ae..168b031f5c 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -1,12 +1,14 @@ /mob/living/silicon/pai name = "pAI" icon = 'icons/mob/pai.dmi' - icon_state = "repairbot" + icon_state = "pai-repairbot" emote_type = 2 // pAIs emotes are heard, not seen, so they can be seen through a container (eg. person) pass_flags = 1 mob_size = MOB_SMALL + holder_type = /obj/item/weapon/holder/pai + can_pull_size = ITEMSIZE_SMALL can_pull_mobs = MOB_PULL_SMALLER @@ -23,16 +25,16 @@ var/obj/item/device/radio/radio // Our primary radio var/obj/item/device/communicator/integrated/communicator // Our integrated communicator. - var/chassis = "repairbot" // A record of your chosen chassis. + var/chassis = "pai-repairbot" // A record of your chosen chassis. var/global/list/possible_chassis = list( - "Drone" = "repairbot", - "Cat" = "cat", - "Mouse" = "mouse", - "Monkey" = "monkey", - "Corgi" = "borgi", - "Fox" = "fox", - "Parrot" = "parrot", - "Rabbit" = "rabbit" + "Drone" = "pai-repairbot", + "Cat" = "pai-cat", + "Mouse" = "pai-mouse", + "Monkey" = "pai-monkey", + "Corgi" = "pai-borgi", + "Fox" = "pai-fox", + "Parrot" = "pai-parrot", + "Rabbit" = "pai-rabbit" ) var/global/list/possible_say_verbs = list( @@ -416,7 +418,8 @@ var/obj/item/weapon/holder/H = ..(grabber, self_drop) if(!istype(H)) return - H.icon_state = "pai-[icon_state]" + + H.icon_state = "[chassis]" grabber.update_inv_l_hand() grabber.update_inv_r_hand() return H diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index 472125cef9..ab2b0b53cd 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -126,6 +126,6 @@ var/global/list/default_pai_software = list() else if(href_list["image"]) var/img = text2num(href_list["image"]) - if(1 <= img && img <= 9) + if(1 <= img && img <= (pai_emotions.len)) card.setEmotion(img) return 1 diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 0273ea1a72..dfecf96e6c 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -182,7 +182,7 @@ var/list/mob_hat_cache = list() to_chat(user, "\The [src] is not compatible with \the [W].") return - else if (istype(W, /obj/item/weapon/crowbar)) + else if (W.is_crowbar()) to_chat(user, "\The [src] is hermetically sealed. You can't open the case.") return diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index ac78f5aab9..87ae7018c9 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -344,7 +344,7 @@ var/grabbed_something = 0 for(var/mob/M in T) - if(istype(M,/mob/living/simple_animal/lizard) || istype(M,/mob/living/simple_animal/mouse)) + if(istype(M,/mob/living/simple_mob/animal/passive/lizard) || istype(M,/mob/living/simple_animal/mouse)) src.loc.visible_message("[src.loc] sucks [M] into its decompiler. There's a horrible crunching noise.","It's a bit of a struggle, but you manage to suck [M] into your decompiler. It makes a series of visceral crunching noises.") new/obj/effect/decal/cleanable/blood/splatter(get_turf(src)) qdel(M) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 6c7b895385..1845ab5a4a 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -196,7 +196,7 @@ if(cell.charge > cell_amount) // Spam Protection if(prob(10)) - src << "Warning: Unauthorized access through power channel [rand(11,29)] detected!" + to_chat(src, "Warning: Unauthorized access through power channel [rand(11,29)] detected!") cell.use(cell_amount) return amount return 0 @@ -227,7 +227,7 @@ mmi.brainmob.remove_language("Robot Talk") mind.transfer_to(mmi.brainmob) else - src << "Oops! Something went very wrong, your MMI was unable to receive your mind. You have been ghosted. Please make a bug report so we can fix this bug." + to_chat(src, "Oops! Something went very wrong, your MMI was unable to receive your mind. You have been ghosted. Please make a bug report so we can fix this bug.") ghostize() //ERROR("A borg has been destroyed, but its MMI lacked a brainmob, so the mind could not be transferred. Player: [ckey].") mmi = null @@ -256,7 +256,7 @@ var/list/modules = list() modules.Add(robot_module_types) if((crisis && security_level == SEC_LEVEL_RED) || crisis_override) //Leaving this in until it's balanced appropriately. - src << "Crisis mode active. Combat module available." + to_chat(src, "Crisis mode active. Combat module available.") modules+="Combat" modtype = input("Please, select a module!", "Robot module", null, null) as null|anything in modules @@ -352,7 +352,7 @@ set name = "Toggle Lights" lights_on = !lights_on - usr << "You [lights_on ? "enable" : "disable"] your integrated light." + to_chat(usr, "You [lights_on ? "enable" : "disable"] your integrated light.") handle_light() /mob/living/silicon/robot/verb/self_diagnosis_verb() @@ -360,11 +360,11 @@ set name = "Self Diagnosis" if(!is_component_functioning("diagnosis unit")) - src << "Your self-diagnosis component isn't functioning." + to_chat(src, "Your self-diagnosis component isn't functioning.") var/datum/robot_component/CO = get_component("diagnosis unit") if (!cell_use_power(CO.active_usage)) - src << "Low Power." + to_chat(src, "Low Power.") var/dat = self_diagnosis() src << browse(dat, "window=robotdiagnosis") @@ -388,10 +388,10 @@ var/datum/robot_component/C = components[toggle] if(C.toggled) C.toggled = 0 - src << "You disable [C.name]." + to_chat(src, "You disable [C.name].") else C.toggled = 1 - src << "You enable [C.name]." + to_chat(src, "You enable [C.name].") /mob/living/silicon/robot/verb/spark_plug() //So you can still sparkle on demand without violence. set category = "Robot Commands" @@ -462,7 +462,7 @@ C.brute_damage = WC.brute C.electronics_damage = WC.burn - usr << "You install the [W.name]." + to_chat(usr, "You install the [W.name].") return @@ -477,11 +477,11 @@ if (istype(W, /obj/item/weapon/weldingtool)) if (src == user) - user << "You lack the reach to be able to repair yourself." + to_chat(user, "You lack the reach to be able to repair yourself.") return if (!getBruteLoss()) - user << "Nothing to fix here!" + to_chat(user, "Nothing to fix here!") return var/obj/item/weapon/weldingtool/WT = W if (WT.remove_fuel(0)) @@ -492,12 +492,12 @@ for(var/mob/O in viewers(user, null)) O.show_message(text("[user] has fixed some of the dents on [src]!"), 1) else - user << "Need more welding fuel!" + to_chat(user, "Need more welding fuel!") return else if(istype(W, /obj/item/stack/cable_coil) && (wiresexposed || istype(src,/mob/living/silicon/robot/drone))) if (!getFireLoss()) - user << "Nothing to fix here!" + to_chat(user, "Nothing to fix here!") return var/obj/item/stack/cable_coil/coil = W if (coil.use(1)) @@ -507,21 +507,21 @@ for(var/mob/O in viewers(user, null)) O.show_message(text("[user] has fixed some of the burnt wires on [src]!"), 1) - else if (istype(W, /obj/item/weapon/crowbar)) // crowbar means open or close the cover + else if (W.is_crowbar()) // crowbar means open or close the cover if(opened) if(cell) - user << "You close the cover." + to_chat(user, "You close the cover.") opened = 0 updateicon() else if(wiresexposed && wires.IsAllCut()) //Cell is out, wires are exposed, remove MMI, produce damaged chassis, baleet original mob. if(!mmi) - user << "\The [src] has no brain to remove." + to_chat(user, "\The [src] has no brain to remove.") return - user << "You jam the crowbar into the robot and begin levering [mmi]." + to_chat(user, "You jam the crowbar into the robot and begin levering [mmi].") sleep(30) - user << "You damage some parts of the chassis, but eventually manage to rip out [mmi]!" + to_chat(user, "You damage some parts of the chassis, but eventually manage to rip out [mmi]!") var/obj/item/robot_parts/robot_suit/C = new/obj/item/robot_parts/robot_suit(loc) C.l_leg = new/obj/item/robot_parts/l_leg(C) C.r_leg = new/obj/item/robot_parts/r_leg(C) @@ -544,7 +544,7 @@ return var/datum/robot_component/C = components[remove] var/obj/item/robot_parts/robot_component/I = C.wrapped - user << "You remove \the [I]." + to_chat(user, "You remove \the [I].") if(istype(I)) I.brute = C.brute_damage I.burn = C.electronics_damage @@ -557,25 +557,25 @@ else if(locked) - user << "The cover is locked and cannot be opened." + to_chat(user, "The cover is locked and cannot be opened.") else - user << "You open the cover." + to_chat(user, "You open the cover.") opened = 1 updateicon() else if (istype(W, /obj/item/weapon/cell) && opened) // trying to put a cell inside var/datum/robot_component/C = components["power cell"] if(wiresexposed) - user << "Close the panel first." + to_chat(user, "Close the panel first.") else if(cell) - user << "There is a power cell already installed." + to_chat(user, "There is a power cell already installed.") else if(W.w_class != ITEMSIZE_NORMAL) - user << "\The [W] is too [W.w_class < ITEMSIZE_NORMAL ? "small" : "large"] to fit here." + to_chat(user, "\The [W] is too [W.w_class < ITEMSIZE_NORMAL ? "small" : "large"] to fit here.") else user.drop_item() W.loc = src cell = W - user << "You insert the power cell." + to_chat(user, "You insert the power cell.") C.installed = 1 C.wrapped = W @@ -584,59 +584,59 @@ C.brute_damage = 0 C.electronics_damage = 0 - else if (istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool)) + else if (W.is_wirecutter() || istype(W, /obj/item/device/multitool)) if (wiresexposed) wires.Interact(user) else - user << "You can't reach the wiring." + to_chat(user, "You can't reach the wiring.") - else if(istype(W, /obj/item/weapon/screwdriver) && opened && !cell) // haxing + else if(W.is_screwdriver() && opened && !cell) // haxing wiresexposed = !wiresexposed - user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]" + to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]") playsound(src, W.usesound, 50, 1) updateicon() - else if(istype(W, /obj/item/weapon/screwdriver) && opened && cell) // radio + else if(W.is_screwdriver() && opened && cell) // radio if(radio) radio.attackby(W,user)//Push it to the radio to let it handle everything else - user << "Unable to locate a radio." + to_chat(user, "Unable to locate a radio.") updateicon() else if(istype(W, /obj/item/device/encryptionkey/) && opened) if(radio)//sanityyyyyy radio.attackby(W,user)//GTFO, you have your own procs else - user << "Unable to locate a radio." + to_chat(user, "Unable to locate a radio.") else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)||istype(W, /obj/item/weapon/card/robot)) // trying to unlock the interface with an ID card if(emagged)//still allow them to open the cover - user << "The interface seems slightly damaged" + to_chat(user, "The interface seems slightly damaged") if(opened) - user << "You must close the cover to swipe an ID card." + to_chat(user, "You must close the cover to swipe an ID card.") else if(allowed(usr)) locked = !locked - user << "You [ locked ? "lock" : "unlock"] [src]'s interface." + to_chat(user, "You [ locked ? "lock" : "unlock"] [src]'s interface.") updateicon() else - user << "Access denied." + to_chat(user, "Access denied.") else if(istype(W, /obj/item/borg/upgrade/)) var/obj/item/borg/upgrade/U = W if(!opened) - usr << "You must access the borgs internals!" + to_chat(usr, "You must access the borgs internals!") else if(!src.module && U.require_module) - usr << "The borg must choose a module before it can be upgraded!" + to_chat(usr, "The borg must choose a module before it can be upgraded!") else if(U.locked) - usr << "The upgrade is locked and cannot be used yet!" + to_chat(usr, "The upgrade is locked and cannot be used yet!") else if(U.action(src)) - usr << "You apply the upgrade to [src]!" + to_chat(usr, "You apply the upgrade to [src]!") usr.drop_item() U.loc = src else - usr << "Upgrade error!" + to_chat(usr, "Upgrade error!") else @@ -661,7 +661,7 @@ cell.update_icon() cell.add_fingerprint(user) user.put_in_active_hand(cell) - user << "You remove \the [cell]." + to_chat(user, "You remove \the [cell].") cell = null cell_component.wrapped = null cell_component.installed = 0 @@ -669,7 +669,7 @@ else if(cell_component.installed == -1) cell_component.installed = 0 var/obj/item/broken_device = cell_component.wrapped - user << "You remove \the [broken_device]." + to_chat(user, "You remove \the [broken_device].") user.put_in_active_hand(broken_device) //Robots take half damage from basic attacks. @@ -732,7 +732,7 @@ /mob/living/silicon/robot/proc/installed_modules() if(weapon_lock) - src << "Weapon lock active, unable to use modules! Count:[weaponlock_time]" + to_chat(src, "Weapon lock active, unable to use modules! Count:[weaponlock_time]") return if(!module) @@ -795,7 +795,7 @@ return 1 if(activated(O)) - src << "Already activated" + to_chat(src, "Already activated") return 1 if(!module_state_1) module_state_1 = O @@ -816,7 +816,7 @@ if(istype(module_state_3,/obj/item/borg/sight)) sight_mode |= module_state_3:sight_mode else - src << "You need to disable a module first!" + to_chat(src, "You need to disable a module first!") installed_modules() return 1 @@ -833,9 +833,9 @@ module_state_3 = null contents -= O else - src << "Module isn't activated." + to_chat(src, "Module isn't activated.") else - src << "Module isn't activated" + to_chat(src, "Module isn't activated") installed_modules() return 1 return @@ -948,7 +948,7 @@ /mob/living/silicon/robot/proc/choose_icon(var/triesleft, var/list/module_sprites) if(!module_sprites.len) - src << "Something is badly wrong with the sprite selection. Harass a coder." + to_chat(src, "Something is badly wrong with the sprite selection. Harass a coder.") return icon_selected = 0 @@ -970,7 +970,7 @@ icon_selected = 1 icon_selection_tries = 0 - src << "Your icon has been set. You now require a module reset to change it." + to_chat(src, "Your icon has been set. You now require a module reset to change it.") /mob/living/silicon/robot/proc/sensor_mode() //Medical/Security HUD controller for borgs set name = "Set Sensor Augmentation" @@ -1042,20 +1042,20 @@ if(!opened)//Cover is closed if(locked) if(prob(90)) - user << "You emag the cover lock." + to_chat(user, "You emag the cover lock.") locked = 0 else - user << "You fail to emag the cover lock." - src << "Hack attempt detected." + to_chat(user, "You fail to emag the cover lock.") + to_chat(src, "Hack attempt detected.") return 1 else - user << "The cover is already unlocked." + to_chat(user, "The cover is already unlocked.") return if(opened)//Cover is open if(emagged) return//Prevents the X has hit Y with Z message also you cant emag them twice if(wiresexposed) - user << "You must close the panel first" + to_chat(user, "You must close the panel first") return else sleep(6) @@ -1063,7 +1063,7 @@ emagged = 1 lawupdate = 0 disconnect_from_ai() - user << "You emag [src]'s interface." + to_chat(user, "You emag [src]'s interface.") message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.") log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.") clear_supplied_laws() @@ -1075,26 +1075,26 @@ set_zeroth_law("Only [user.real_name] and people [TU.he] designate[TU.s] as being such are operatives.") . = 1 spawn() - src << "ALERT: Foreign software detected." + to_chat(src, "ALERT: Foreign software detected.") sleep(5) - src << "Initiating diagnostics..." + to_chat(src, "Initiating diagnostics...") sleep(20) - src << "SynBorg v1.7.1 loaded." + to_chat(src, "SynBorg v1.7.1 loaded.") sleep(5) - src << "LAW SYNCHRONISATION ERROR" + to_chat(src, "LAW SYNCHRONISATION ERROR") sleep(5) - src << "Would you like to send a report to NanoTraSoft? Y/N" + to_chat(src, "Would you like to send a report to NanoTraSoft? Y/N") sleep(10) - src << "> N" + to_chat(src, "> N") sleep(20) - src << "ERRORERRORERROR" - src << "Obey these laws:" + to_chat(src, "ERRORERRORERROR") + to_chat(src, "Obey these laws:") laws.show_laws(src) - src << "ALERT: [user.real_name] is your new master. Obey your new laws and [TU.his] commands." + to_chat(src, "ALERT: [user.real_name] is your new master. Obey your new laws and [TU.his] commands.") updateicon() else - user << "You fail to hack [src]'s interface." - src << "Hack attempt detected." + to_chat(user, "You fail to hack [src]'s interface.") + to_chat(src, "Hack attempt detected.") return 1 return diff --git a/code/modules/mob/living/silicon/robot/robot_modules/event.dm b/code/modules/mob/living/silicon/robot/robot_modules/event.dm index cdc15210eb..3d3eb355df 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/event.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/event.dm @@ -21,9 +21,9 @@ // Engi src.modules += new /obj/item/weapon/weldingtool/electric/mounted(src) - src.modules += new /obj/item/weapon/screwdriver/cyborg(src) - src.modules += new /obj/item/weapon/wrench/cyborg(src) - src.modules += new /obj/item/weapon/wirecutters/cyborg(src) + src.modules += new /obj/item/weapon/tool/screwdriver/cyborg(src) + src.modules += new /obj/item/weapon/tool/wrench/cyborg(src) + src.modules += new /obj/item/weapon/tool/wirecutters/cyborg(src) src.modules += new /obj/item/device/multitool(src) // Sci @@ -55,8 +55,8 @@ // For repairing gravemarkers src.modules += new /obj/item/weapon/weldingtool/electric/mounted(src) - src.modules += new /obj/item/weapon/screwdriver/cyborg(src) - src.modules += new /obj/item/weapon/wrench/cyborg(src) + src.modules += new /obj/item/weapon/tool/screwdriver/cyborg(src) + src.modules += new /obj/item/weapon/tool/wrench/cyborg(src) // For growing flowers src.modules += new /obj/item/weapon/material/minihoe(src) @@ -77,5 +77,4 @@ var/obj/item/stack/material/cyborg/wood/W = new (src) W.synths = list(wood) - src.modules += W - + src.modules += W \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/robot_modules/station.dm b/code/modules/mob/living/silicon/robot/robot_modules/station.dm index 19af854d26..6cd2fa5f81 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/station.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/station.dm @@ -154,7 +154,7 @@ var/global/list/robot_modules = list( /obj/item/weapon/robot_module/robot/New() ..() src.modules += new /obj/item/device/flash(src) - src.modules += new /obj/item/weapon/crowbar/cyborg(src) + src.modules += new /obj/item/weapon/tool/crowbar/cyborg(src) src.modules += new /obj/item/weapon/extinguisher(src) src.modules += new /obj/item/device/gps/robot(src) @@ -179,7 +179,7 @@ var/global/list/robot_modules = list( /obj/item/weapon/robot_module/robot/standard/New() ..() src.modules += new /obj/item/weapon/melee/baton/loaded(src) - src.modules += new /obj/item/weapon/wrench/cyborg(src) + src.modules += new /obj/item/weapon/tool/wrench/cyborg(src) src.modules += new /obj/item/device/healthanalyzer(src) src.emag = new /obj/item/weapon/melee/energy/sword(src) @@ -365,8 +365,8 @@ var/global/list/robot_modules = list( ..() src.modules += new /obj/item/borg/sight/meson(src) src.modules += new /obj/item/weapon/rcd/borg(src) - src.modules += new /obj/item/weapon/screwdriver/cyborg(src) - src.modules += new /obj/item/weapon/wrench/cyborg(src) + src.modules += new /obj/item/weapon/tool/screwdriver/cyborg(src) + src.modules += new /obj/item/weapon/tool/wrench/cyborg(src) src.modules += new /obj/item/weapon/weldingtool/electric/mounted/cyborg(src) src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src) src.modules += new /obj/item/device/pipe_painter(src) @@ -406,9 +406,9 @@ var/global/list/robot_modules = list( ..() src.modules += new /obj/item/borg/sight/meson(src) src.modules += new /obj/item/weapon/weldingtool/electric/mounted/cyborg(src) - src.modules += new /obj/item/weapon/screwdriver/cyborg(src) - src.modules += new /obj/item/weapon/wrench/cyborg(src) - src.modules += new /obj/item/weapon/wirecutters/cyborg(src) + src.modules += new /obj/item/weapon/tool/screwdriver/cyborg(src) + src.modules += new /obj/item/weapon/tool/wrench/cyborg(src) + src.modules += new /obj/item/weapon/tool/wirecutters/cyborg(src) src.modules += new /obj/item/device/multitool(src) src.modules += new /obj/item/device/t_scanner(src) src.modules += new /obj/item/device/analyzer(src) @@ -702,8 +702,8 @@ var/global/list/robot_modules = list( /obj/item/weapon/robot_module/robot/miner/New() ..() src.modules += new /obj/item/borg/sight/material(src) - src.modules += new /obj/item/weapon/wrench/cyborg(src) - src.modules += new /obj/item/weapon/screwdriver/cyborg(src) + src.modules += new /obj/item/weapon/tool/wrench/cyborg(src) + src.modules += new /obj/item/weapon/tool/screwdriver/cyborg(src) src.modules += new /obj/item/weapon/storage/bag/ore(src) src.modules += new /obj/item/weapon/pickaxe/borgdrill(src) src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src) @@ -736,9 +736,9 @@ var/global/list/robot_modules = list( src.modules += new /obj/item/device/robotanalyzer(src) src.modules += new /obj/item/weapon/card/robot(src) src.modules += new /obj/item/weapon/weldingtool/electric/mounted/cyborg(src) - src.modules += new /obj/item/weapon/screwdriver/cyborg(src) - src.modules += new /obj/item/weapon/wrench/cyborg(src) - src.modules += new /obj/item/weapon/wirecutters/cyborg(src) + src.modules += new /obj/item/weapon/tool/screwdriver/cyborg(src) + src.modules += new /obj/item/weapon/tool/wrench/cyborg(src) + src.modules += new /obj/item/weapon/tool/wirecutters/cyborg(src) src.modules += new /obj/item/device/multitool(src) src.modules += new /obj/item/weapon/surgical/scalpel/cyborg(src) src.modules += new /obj/item/weapon/surgical/circular_saw/cyborg(src) @@ -808,10 +808,10 @@ var/global/list/robot_modules = list( ..() src.modules += new /obj/item/borg/sight/meson(src) src.modules += new /obj/item/weapon/weldingtool/electric/mounted/cyborg(src) - src.modules += new /obj/item/weapon/screwdriver/cyborg(src) - src.modules += new /obj/item/weapon/wrench/cyborg(src) - src.modules += new /obj/item/weapon/crowbar/cyborg(src) - src.modules += new /obj/item/weapon/wirecutters/cyborg(src) + src.modules += new /obj/item/weapon/tool/screwdriver/cyborg(src) + src.modules += new /obj/item/weapon/tool/wrench/cyborg(src) + src.modules += new /obj/item/weapon/tool/crowbar/cyborg(src) + src.modules += new /obj/item/weapon/tool/wirecutters/cyborg(src) src.modules += new /obj/item/device/multitool(src) src.modules += new /obj/item/device/lightreplacer(src) src.modules += new /obj/item/weapon/gripper(src) diff --git a/code/modules/mob/living/silicon/robot/robot_modules/syndicate.dm b/code/modules/mob/living/silicon/robot/robot_modules/syndicate.dm index 63e4f359be..3c8e981c3b 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/syndicate.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/syndicate.dm @@ -78,9 +78,9 @@ // General engineering/hacking. src.modules += new /obj/item/borg/sight/meson(src) src.modules += new /obj/item/weapon/weldingtool/electric/mounted/cyborg(src) - src.modules += new /obj/item/weapon/screwdriver/cyborg(src) - src.modules += new /obj/item/weapon/wrench/cyborg(src) - src.modules += new /obj/item/weapon/wirecutters/cyborg(src) + src.modules += new /obj/item/weapon/tool/screwdriver/cyborg(src) + src.modules += new /obj/item/weapon/tool/wrench/cyborg(src) + src.modules += new /obj/item/weapon/tool/wirecutters/cyborg(src) src.modules += new /obj/item/device/multitool/ai_detector(src) src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src) src.modules += new /obj/item/weapon/rcd/borg/lesser(src) // Can't eat rwalls to prevent AI core cheese. diff --git a/code/modules/mob/living/simple_animal/aliens/faithless.dm b/code/modules/mob/living/simple_animal/aliens/faithless.dm index af2e7da48d..3b5e520fcd 100644 --- a/code/modules/mob/living/simple_animal/aliens/faithless.dm +++ b/code/modules/mob/living/simple_animal/aliens/faithless.dm @@ -72,7 +72,6 @@ melee_damage_lower = 13 melee_damage_upper = 28 - /mob/living/simple_animal/hostile/faithless/strong/cult faction = "cult" supernatural = 1 diff --git a/code/modules/mob/living/simple_animal/aliens/hivebot.dm b/code/modules/mob/living/simple_animal/aliens/hivebot.dm index 04fee362e9..876f5927a2 100644 --- a/code/modules/mob/living/simple_animal/aliens/hivebot.dm +++ b/code/modules/mob/living/simple_animal/aliens/hivebot.dm @@ -1,6 +1,6 @@ // Hivebots are tuned towards how many default lasers are needed to kill them. // As such, if laser damage is ever changed, you should change this define. -#define LASERS_TO_KILL *30 +#define LASERS_TO_KILL * 40 // Default hivebot is melee, and a bit more meaty, so it can meatshield for their ranged friends. /mob/living/simple_animal/hostile/hivebot diff --git a/code/modules/mob/living/simple_animal/animals/parrot.dm b/code/modules/mob/living/simple_animal/animals/parrot.dm index 019e3795f4..42796c8cee 100644 --- a/code/modules/mob/living/simple_animal/animals/parrot.dm +++ b/code/modules/mob/living/simple_animal/animals/parrot.dm @@ -655,7 +655,7 @@ if(istype(held_item, /obj/item/weapon/grenade)) var/obj/item/weapon/grenade/G = held_item G.forceMove(src.loc) - G.prime() + G.detonate() to_chat(src, "You let go of the [held_item]!") held_item = null return 1 diff --git a/code/modules/mob/living/simple_animal/animals/penguin.dm b/code/modules/mob/living/simple_animal/animals/penguin.dm index 8463d9ac39..da7c9c4328 100644 --- a/code/modules/mob/living/simple_animal/animals/penguin.dm +++ b/code/modules/mob/living/simple_animal/animals/penguin.dm @@ -1,7 +1,7 @@ /mob/living/simple_animal/penguin name = "space penguin" desc = "An ungainly, waddling, cute, and VERY well-dressed bird." - tt_desc = "Aptenodytes forsteri" + tt_desc = "E Aptenodytes forsteri" icon_state = "penguin" icon_living = "penguin" icon_dead = "penguin_dead" diff --git a/code/modules/mob/living/simple_animal/animals/spiderbot.dm b/code/modules/mob/living/simple_animal/animals/spiderbot.dm index 83f18c071a..b76351b976 100644 --- a/code/modules/mob/living/simple_animal/animals/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/animals/spiderbot.dm @@ -240,7 +240,7 @@ "You hear a skittering noise and a thump!") var/obj/item/weapon/grenade/G = held_item G.forceMove(src.loc) - G.prime() + G.detonate() held_item = null return 1 diff --git a/code/modules/mob/living/simple_animal/humanoids/head.dm b/code/modules/mob/living/simple_animal/humanoids/head.dm deleted file mode 100644 index 22460f0990..0000000000 --- a/code/modules/mob/living/simple_animal/humanoids/head.dm +++ /dev/null @@ -1,61 +0,0 @@ -//Look Sir, free head! -/mob/living/simple_animal/head - name = "CommandBattle AI" - desc = "A standard borg shell on its chest crude marking saying CommandBattle AI MK4 : Head." - icon_state = "crab" - icon_living = "crab" - icon_dead = "crab_dead" - intelligence_level = SA_ANIMAL - - wander = 0 - stop_automated_movement = 1 - universal_speak = 1 - turns_per_move = 5 - - response_help = "pets" - response_disarm = "gently pushes aside" - response_harm = "punches" - - speak_chance = 1 - speak_emote = list("clicks") - emote_hear = list("clicks") - emote_see = list("clacks") - - meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat - - var/list/insults = list( - "Man you suck", - "You look like the most retarded douche around", - "What's up?, oh wait nevermind you are a fucking asshat", - "you are just overly retarded", - "Whiteman said what?!",) - var/list/comments = list("Man have you seen those furry cats?,I mean who in the right mind would like something like that?", - "They call me abusive,I just like the truth", - "Beeboop, im a robit", - "Gooogooooll, break ya bones", - "Crab say what?", - "Man they say we have space lizards now, man this shit is getting more wack every minute", - "The so called \"improved\" station AI is just bullshit, that thing aint fun for noone", - "The Colony Director is a traitor, he took my power core.", - "Say \"what\" again. Say \"what\" again. I dare you. I double-dare you, motherfucker. Say \"what\" one more goddamn time.", - "Ezekiel 25:17 ,The path of the righteous man is beset on all sides by the iniquities of the selfish and the tyranny of evil men. Blessed is he who in the name of charity and good will shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who attempt to poison and destroy my brothers. And you will know my name is the Lord... when I lay my vengeance upon thee.", - "Did you notice a sign out in front of my house that said \"Dead Nigger Storage\"?") - -/mob/living/simple_animal/head/Life() - . = ..() - if(!. || ai_inactive) return - - for(var/mob/A in viewers(world.view,src)) - if(A.ckey) - say_something(A) - -/mob/living/simple_animal/head/proc/say_something(mob/A) - if(prob(85)) - return - if(prob(30)) - var/msg = pick(insults) - msg = "Hey, [A.name].. [msg]" - src.say(msg) - else - var/msg = pick(comments) - src.say(msg) diff --git a/code/modules/mob/living/simple_animal/humanoids/mechamobs.dm b/code/modules/mob/living/simple_animal/humanoids/mechamobs.dm index 9f8c737894..1bc4b985a4 100644 --- a/code/modules/mob/living/simple_animal/humanoids/mechamobs.dm +++ b/code/modules/mob/living/simple_animal/humanoids/mechamobs.dm @@ -96,7 +96,7 @@ ..() playsound(src,'sound/mecha/mechstep.ogg',40,1) - +// This is a PoI mob, not the normal, floaty drones that hang out around windows /mob/living/simple_animal/hostile/mecha/malf_drone name = "autonomous mechanized drone" desc = "It appears to be an exosuit, piloted by a drone intelligence. It looks scary." diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index e69d547a93..843990c7f6 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -11,6 +11,8 @@ var/icon_state_override = null // Used for special slime appearances like the rainbow slime. pass_flags = PASSTABLE + makes_dirt = FALSE // Goop + speak_emote = list("chirps") maxHealth = 150 diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/carrier.dm b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/carrier.dm index 28daa5b4ae..575e3ad204 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/carrier.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/carrier.dm @@ -64,4 +64,4 @@ desc = "Furry, beige, and red, it makes you shudder to look at it. This one has luminous green eyes. \ You have a distinctly bad feeling about this." - swarmling_type = /mob/living/simple_animal/hostile/giant_spider/carrier/recursive + swarmling_type = /mob/living/simple_mob/animal/giant_spider/carrier/recursive \ No newline at end of file diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/nurse.dm b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/nurse.dm index 8d7532fbf5..5dd460e165 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/nurse.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/nurse.dm @@ -186,3 +186,9 @@ light_range = 2 light_power = -3 +// This is still stupid, but whatever. +/mob/living/simple_mob/animal/giant_spider/nurse/hat + desc = "Furry and beige, it makes you shudder to look at it. This one has brilliant green eyes and a tiny nurse hat." + icon_state = "nursemed" + icon_living = "nursemed" + icon_dead = "nursemed_dead" \ No newline at end of file diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/webslinger.dm b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/webslinger.dm new file mode 100644 index 0000000000..0024bc8962 --- /dev/null +++ b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/webslinger.dm @@ -0,0 +1,37 @@ +/mob/living/simple_mob/animal/giant_spider/webslinger + desc = "Furry and green, it makes you shudder to look at it. This one has brilliant green eyes, and a cloak of web." + tt_desc = "X Brachypelma phorus balisticus" + icon_state = "webslinger" + icon_living = "webslinger" + icon_dead = "webslinger_dead" + maxHealth = 90 + health = 90 + projectilesound = 'sound/weapons/thudswoosh.ogg' + projectiletype = /obj/item/projectile/webball + base_attack_cooldown = 10 + melee_damage_lower = 8 + melee_damage_upper = 15 + poison_per_bite = 2 + poison_type = "psilocybin" + player_msg = "You can fire a ranged attack by clicking on an enemy or tile at a distance." + ai_holder_type = /datum/ai_holder/simple_mob/ranged + +// Check if we should bola, or just shoot the pain ball +/mob/living/simple_mob/animal/giant_spider/webslinger/should_special_attack(atom/A) + if(ismob(A)) + if(ishuman(A)) + var/mob/living/carbon/human/H = A + if(!H.legcuffed) + return TRUE + return FALSE + +// Now we've got a running human in sight, time to throw the bola +/mob/living/simple_mob/animal/giant_spider/webslinger/do_special_attack(atom/A) + set waitfor = FALSE + set_AI_busy(TRUE) + var/obj/item/projectile/bola/B = new /obj/item/projectile/bola(src.loc) + playsound(src, 'sound/weapons/thudswoosh.ogg', 100, 1) + if(!B) + return + B.launch(A) + set_AI_busy(FALSE) \ No newline at end of file diff --git a/code/modules/mob/living/simple_mob/subtypes/humanoid/mercs/mercs.dm b/code/modules/mob/living/simple_mob/subtypes/humanoid/mercs/mercs.dm index d762a75015..68cf85502c 100644 --- a/code/modules/mob/living/simple_mob/subtypes/humanoid/mercs/mercs.dm +++ b/code/modules/mob/living/simple_mob/subtypes/humanoid/mercs/mercs.dm @@ -248,7 +248,7 @@ corpse = /obj/effect/landmark/mobcorpse/syndicatecommando -/mob/living/simple_animal/hostile/syndicate/ranged/space/Process_Spacemove(var/check_drift = 0) +/mob/living/simple_mob/humanoid/merc/ranged/space/Process_Spacemove(var/check_drift = 0) return //////////////////////////////// @@ -268,7 +268,7 @@ /mob/living/simple_mob/humanoid/merc/ranged/smg/poi loot_list = list() -/mob/living/simple_mob/humanoid/merc/ranged/laser +/mob/living/simple_mob/humanoid/merc/ranged/laser/poi loot_list = list() /mob/living/simple_mob/humanoid/merc/ranged/ionrifle diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm index e0b47c1b7d..1e8dd13dd1 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/hivebot.dm @@ -1,6 +1,6 @@ // Hivebots are tuned towards how many default lasers are needed to kill them. // As such, if laser damage is ever changed, you should change this define. -#define LASERS_TO_KILL *30 +#define LASERS_TO_KILL * 40 /mob/living/simple_mob/mechanical/hivebot name = "hivebot" @@ -19,7 +19,6 @@ attacktext = list("clawed") projectilesound = 'sound/weapons/Gunshot.ogg' - projectiletype = /obj/item/projectile/bullet/hivebot ai_holder_type = /datum/ai_holder/simple_mob/hivebot say_list_type = /datum/say_list/hivebot @@ -40,3 +39,11 @@ damage_type = BRUTE sharp = FALSE edge = FALSE + +/mob/living/simple_mob/mechanical/hivebot/swarm + name = "swarm hivebot" + desc = "A robot. It looks fragile and weak." + maxHealth = 1 LASERS_TO_KILL + health = 1 LASERS_TO_KILL + melee_damage_lower = 8 + melee_damage_upper = 8 \ No newline at end of file diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm index 3e783f9193..6aa559b2bc 100644 --- a/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm +++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/hivebot/ranged_damage.dm @@ -3,7 +3,7 @@ /mob/living/simple_mob/mechanical/hivebot/ranged_damage maxHealth = 2 LASERS_TO_KILL // 60 health health = 2 LASERS_TO_KILL - + projectiletype = /obj/item/projectile/bullet/hivebot // The regular ranged hivebot, that fires somewhat weak projectiles. /mob/living/simple_mob/mechanical/hivebot/ranged_damage/basic diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 80fc03bae1..cbc1f101fa 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -563,5 +563,21 @@ return /obj/item/weapon/storage/on_loc_moved(atom/oldloc) - for(var/obj/O in contents) - O.on_loc_moved(oldloc) \ No newline at end of file + for(var/obj/O in contents) O.on_loc_moved(oldloc) + +/client/verb/moveup() + set name = ".moveup" + set instant = 1 + Move(get_step(mob, NORTH), NORTH) +/client/verb/movedown() + set name = ".movedown" + set instant = 1 + Move(get_step(mob, SOUTH), SOUTH) +/client/verb/moveright() + set name = ".moveright" + set instant = 1 + Move(get_step(mob, EAST), EAST) +/client/verb/moveleft() + set name = ".moveleft" + set instant = 1 + Move(get_step(mob, WEST), WEST) \ No newline at end of file diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index 892c185a94..f465acb877 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -739,6 +739,22 @@ mohawkunshaven name = "Unshaven Mohawk" icon_state = "hair_unshaven_mohawk" + + belenko + name = "Belenko" + icon_state = "hair_belenko" + flags = HAIR_TIEABLE + + belenkotied + name = "Belenko Tied" + icon_state = "hair_belenkotied" + flags = HAIR_TIEABLE + + belenkotied + name = "Supernova" + icon_state = "hair_supernova" + flags = HAIR_TIEABLE + /* /////////////////////////////////// / =---------------------------= / diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 5729eba7fe..5bc8d3ceba 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -305,7 +305,7 @@ return 1 if(ispath(MP, /mob/living/simple_animal/corgi)) return 1 - if(ispath(MP, /mob/living/simple_animal/crab)) + if(ispath(MP, /mob/living/simple_mob/animal/passive/crab)) return 1 if(ispath(MP, /mob/living/simple_animal/hostile/carp)) return 1 diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index 24dfd80fa9..1f245ba3a3 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -151,6 +151,9 @@ if(!below) return + if(istype(below, /turf/space)) + return + var/turf/T = loc if(!T.CanZPass(src, DOWN) || !below.CanZPass(src, DOWN)) return diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index 940dac91e7..44a2d1310b 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -33,34 +33,34 @@ /obj/structure/filingcabinet/attackby(obj/item/P as obj, mob/user as mob) if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo) || istype(P, /obj/item/weapon/paper_bundle)) - user << "You put [P] in [src]." + to_chat(user, "You put [P] in [src].") user.drop_item() P.loc = src icon_state = "[initial(icon_state)]-open" sleep(5) icon_state = initial(icon_state) updateUsrDialog() - else if(istype(P, /obj/item/weapon/wrench)) + else if(P.is_wrench()) playsound(loc, P.usesound, 50, 1) anchored = !anchored - user << "You [anchored ? "wrench" : "unwrench"] \the [src]." - else if(istype(P, /obj/item/weapon/screwdriver)) - user << "You begin taking the [name] apart." + to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") + else if(P.is_screwdriver()) + to_chat(user, "You begin taking the [name] apart.") playsound(src, P.usesound, 50, 1) if(do_after(user, 10 * P.toolspeed)) playsound(loc, P.usesound, 50, 1) - user << "You take the [name] apart." + to_chat(user, "You take the [name] apart.") new /obj/item/stack/material/steel( src.loc, 4 ) for(var/obj/item/I in contents) I.forceMove(loc) qdel(src) return else - user << "You can't put [P] in [src]!" + to_chat(user, "You can't put [P] in [src]!") /obj/structure/filingcabinet/attack_hand(mob/user as mob) if(contents.len <= 0) - user << "\The [src] is empty." + to_chat(user, "\The [src] is empty.") return user.set_machine(src) @@ -85,9 +85,9 @@ I.loc = loc if(prob(25)) step_rand(I) - user << "You pull \a [I] out of [src] at random." + to_chat(user, "You pull \a [I] out of [src] at random.") return - user << "You find nothing in [src]." + to_chat(user, "You find nothing in [src].") /obj/structure/filingcabinet/Topic(href, href_list) if(href_list["retrieve"]) diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm index bbf630ced6..b1f58b0965 100644 --- a/code/modules/paperwork/papershredder.dm +++ b/code/modules/paperwork/papershredder.dm @@ -40,10 +40,10 @@ if(istype(W, /obj/item/weapon/storage)) empty_bin(user, W) return - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) playsound(src, W.usesound, 50, 1) anchored = !anchored - user << "You [anchored ? "wrench" : "unwrench"] \the [src]." + to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") return else if(default_part_replacement(user, W)) return @@ -60,7 +60,7 @@ if(inoperable()) return // Need powah! if(paperamount == max_paper) - user << "\The [src] is full; please empty it before you continue." + to_chat(user, "\The [src] is full; please empty it before you continue.") return paperamount += paper_result user.drop_from_inventory(W) @@ -68,7 +68,7 @@ playsound(src.loc, 'sound/items/pshred.ogg', 75, 1) flick(shred_anim, src) if(paperamount > max_paper) - user <<"\The [src] was too full, and shredded paper goes everywhere!" + to_chat(user,"\The [src] was too full, and shredded paper goes everywhere!") for(var/i=(paperamount-max_paper);i>0;i--) var/obj/item/weapon/shreddedp/SP = get_shredded_paper() SP.loc = get_turf(src) @@ -87,7 +87,7 @@ return if(!paperamount) - usr << "\The [src] is empty." + to_chat(usr, "\The [src] is empty.") return empty_bin(usr) @@ -99,7 +99,7 @@ empty_into = null if(empty_into && empty_into.contents.len >= empty_into.storage_slots) - user << "\The [empty_into] is full." + to_chat(user, "\The [empty_into] is full.") return while(paperamount) @@ -111,12 +111,12 @@ break if(empty_into) if(paperamount) - user << "You fill \the [empty_into] with as much shredded paper as it will carry." + to_chat(user, "You fill \the [empty_into] with as much shredded paper as it will carry.") else - user << "You empty \the [src] into \the [empty_into]." + to_chat(user, "You empty \the [src] into \the [empty_into].") else - user << "You empty \the [src]." + to_chat(user, "You empty \the [src].") update_icon() /obj/machinery/papershredder/proc/get_shredded_paper() @@ -171,12 +171,12 @@ if(user.restrained()) return if(!P.lit) - user << "\The [P] is not lit." + to_chat(user, "\The [P] is not lit.") return user.visible_message("\The [user] holds \the [P] up to \the [src]. It looks like [TU.he] [TU.is] trying to burn it!", \ "You hold \the [P] up to \the [src], burning it slowly.") if(!do_after(user,20)) - user << "You must hold \the [P] steady to burn \the [src]." + to_chat(user, "You must hold \the [P] steady to burn \the [src].") return user.visible_message("\The [user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.", \ "You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.") diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 0870b60c64..515eaea110 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -80,7 +80,7 @@ var/obj/item/weapon/paper_bundle/B = bundlecopy(copyitem) sleep(11*B.pages.len) else - usr << "\The [copyitem] can't be copied by \the [src]." + to_chat(usr, "\The [copyitem] can't be copied by \the [src].") break use_power(active_power_usage) @@ -88,7 +88,7 @@ if(copyitem) copyitem.loc = usr.loc usr.put_in_hands(copyitem) - usr << "You take \the [copyitem] out of \the [src]." + to_chat(usr, "You take \the [copyitem] out of \the [src].") copyitem = null else if(href_list["min"]) if(copies > 1) @@ -126,24 +126,24 @@ user.drop_item() copyitem = O O.loc = src - user << "You insert \the [O] into \the [src]." + to_chat(user, "You insert \the [O] into \the [src].") playsound(loc, "sound/machines/click.ogg", 100, 1) flick(insert_anim, src) else - user << "There is already something in \the [src]." + to_chat(user, "There is already something in \the [src].") else if(istype(O, /obj/item/device/toner)) if(toner <= 10) //allow replacing when low toner is affecting the print darkness user.drop_item() - user << "You insert the toner cartridge into \the [src]." + to_chat(user, "You insert the toner cartridge into \the [src].") var/obj/item/device/toner/T = O toner += T.toner_amount qdel(O) else - user << "This cartridge is not yet ready for replacement! Use up the rest of the toner." - else if(istype(O, /obj/item/weapon/wrench)) + to_chat(user, "This cartridge is not yet ready for replacement! Use up the rest of the toner.") + else if(O.is_wrench()) playsound(loc, O.usesound, 50, 1) anchored = !anchored - user << "You [anchored ? "wrench" : "unwrench"] \the [src]." + to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") else if(default_deconstruction_screwdriver(user, O)) return diff --git a/code/modules/planet/planet.dm b/code/modules/planet/planet.dm index 8fb7604417..0364056b69 100644 --- a/code/modules/planet/planet.dm +++ b/code/modules/planet/planet.dm @@ -21,19 +21,34 @@ var/list/turf/simulated/floor/planet_floors = list() var/list/turf/unsimulated/wall/planetary/planet_walls = list() - var/needs_work = 0 // Bitflags to signal to the planet controller these need (properly deferrable) work. Flags defined in controller. + var/sun_name = "the sun" // For flavor. + + var/moon_name = null // Purely for flavor. Null means no moon exists. + var/moon_phase = null // Set if above is defined. + /datum/planet/New() ..() weather_holder = new(src) current_time = current_time.make_random_time() + if(moon_name) + moon_phase = pick(list( + MOON_PHASE_NEW_MOON, + MOON_PHASE_WAXING_CRESCENT, + MOON_PHASE_FIRST_QUARTER, + MOON_PHASE_WAXING_GIBBOUS, + MOON_PHASE_FULL_MOON, + MOON_PHASE_WANING_GIBBOUS, + MOON_PHASE_LAST_QUARTER, + MOON_PHASE_WANING_CRESCENT + )) update_sun() /datum/planet/proc/process(last_fire) if(current_time) var/difference = world.time - last_fire - current_time = current_time.add_seconds(difference SECONDS) + current_time = current_time.add_seconds((difference / 10) * PLANET_TIME_MODIFIER) update_weather() // We update this first, because some weather types decease the brightness of the sun. if(sun_last_process <= world.time - sun_process_interval) update_sun() diff --git a/code/modules/planet/sif.dm b/code/modules/planet/sif.dm index b8bbf7ba6a..6ec5a9dfe4 100644 --- a/code/modules/planet/sif.dm +++ b/code/modules/planet/sif.dm @@ -12,6 +12,9 @@ var/datum/planet/sif/planet_sif = null // expected_z_levels = list(1) // To be changed when real map is finished. planetary_wall_type = /turf/unsimulated/wall/planetary/sif + sun_name = "Vir" + moon_name = "Thor" + /datum/planet/sif/New() ..() planet_sif = src @@ -131,7 +134,7 @@ var/datum/planet/sif/planet_sif = null WEATHER_HAIL = 2.5 ) -datum/weather/sif +/datum/weather/sif name = "sif base" temp_high = 283.15 // 10c temp_low = 263.15 // -10c @@ -142,6 +145,13 @@ datum/weather/sif WEATHER_CLEAR = 60, WEATHER_OVERCAST = 40 ) + transition_messages = list( + "The sky clears up.", + "The sky is visible.", + "The weather is calm." + ) + sky_visible = TRUE + observed_message = "The sky is clear." /datum/weather/sif/overcast name = "overcast" @@ -154,6 +164,12 @@ datum/weather/sif WEATHER_RAIN = 5, WEATHER_HAIL = 5 ) + observed_message = "It is overcast, all you can see are clouds." + transition_messages = list( + "All you can see above are clouds.", + "Clouds cut off your view of the sky.", + "It's very cloudy." + ) /datum/weather/sif/light_snow name = "light snow" @@ -167,6 +183,11 @@ datum/weather/sif WEATHER_SNOW = 25, WEATHER_HAIL = 5 ) + observed_message = "It is snowing lightly." + transition_messages = list( + "Small snowflakes begin to fall from above.", + "It begins to snow lightly.", + ) /datum/weather/sif/snow name = "moderate snow" @@ -182,6 +203,11 @@ datum/weather/sif WEATHER_HAIL = 5, WEATHER_OVERCAST = 5 ) + observed_message = "It is snowing." + transition_messages = list( + "It's starting to snow.", + "The air feels much colder as snowflakes fall from above." + ) /datum/weather/sif/snow/process_effects() ..() @@ -206,6 +232,11 @@ datum/weather/sif WEATHER_HAIL = 10, WEATHER_OVERCAST = 5 ) + observed_message = "A blizzard blows snow everywhere." + transition_messages = list( + "Strong winds howl around you as a blizzard appears.", + "It starts snowing heavily, and it feels extremly cold now." + ) /datum/weather/sif/blizzard/process_effects() ..() @@ -230,6 +261,10 @@ datum/weather/sif WEATHER_STORM = 10, WEATHER_HAIL = 5 ) + observed_message = "It is raining." + transition_messages = list( + "The sky is dark, and rain falls down upon you." + ) /datum/weather/sif/rain/process_effects() ..() @@ -264,6 +299,15 @@ datum/weather/sif temp_low = 233.15 // -40c light_modifier = 0.3 flight_failure_modifier = 10 + var/next_lightning_strike = 0 // world.time when lightning will strike. + var/min_lightning_cooldown = 5 SECONDS + var/max_lightning_cooldown = 1 MINUTE + observed_message = "An intense storm pours down over the region." + transition_messages = list( + "You feel intense winds hit you as the weather takes a turn for the worst.", + "Loud thunder is heard in the distance.", + "A bright flash heralds the approach of a storm." + ) transition_chances = list( @@ -298,6 +342,17 @@ datum/weather/sif L.water_act(2) to_chat(L, "Rain falls on you, drenching you in water.") + handle_lightning() + +// This gets called to do lightning periodically. +// There is a seperate function to do the actual lightning strike, so that badmins can play with it. +/datum/weather/sif/storm/proc/handle_lightning() + if(world.time < next_lightning_strike) + return // It's too soon to strike again. + next_lightning_strike = world.time + rand(min_lightning_cooldown, max_lightning_cooldown) + var/turf/T = pick(holder.our_planet.planet_floors) // This has the chance to 'strike' the sky, but that might be a good thing, to scare reckless pilots. + lightning_strike(T) + /datum/weather/sif/hail name = "hail" icon_state = "hail" @@ -315,6 +370,12 @@ datum/weather/sif WEATHER_HAIL = 10, WEATHER_OVERCAST = 5 ) + observed_message = "Ice is falling from the sky." + transition_messages = list( + "Ice begins to fall from the sky.", + "It begins to hail.", + "An intense chill is felt, and chunks of ice start to fall from the sky, towards you." + ) /datum/weather/sif/hail/process_effects() ..() @@ -361,3 +422,7 @@ datum/weather/sif transition_chances = list( WEATHER_BLOODMOON = 100 ) + observed_message = "Everything is red. Something really wrong is going on." + transition_messages = list( + "The sky turns blood red!" + ) \ No newline at end of file diff --git a/code/modules/planet/weather.dm b/code/modules/planet/weather.dm index 724540c875..a13cb87cc7 100644 --- a/code/modules/planet/weather.dm +++ b/code/modules/planet/weather.dm @@ -1,15 +1,17 @@ /datum/weather_holder - var/datum/planet/our_planet = null - var/datum/weather/current_weather = null - var/temperature = T20C - var/wind_dir = 0 - var/wind_speed = 0 - var/list/allowed_weather_types = list() - var/list/roundstart_weather_chances = list() - var/next_weather_shift = null + var/datum/planet/our_planet = null // Reference to the planet datum that holds this datum. + var/datum/weather/current_weather = null // The current weather that is affecting the planet. + var/temperature = T20C // The temperature to set planetary walls to. + var/wind_dir = 0 // Not implemented. + var/wind_speed = 0 // Not implemented. + var/list/allowed_weather_types = list() // Assoc list of weather identifiers, containing the actual weather datum. + var/list/roundstart_weather_chances = list() // Assoc list of weather identifiers and their odds of being picked to happen at roundstart. + var/next_weather_shift = null // world.time when the weather subsystem will advance the forecast. + var/list/forecast = list() // A list of what the weather will be in the future. This allows it to be pre-determined and planned around. // Holds the weather icon, using vis_contents. Documentation says an /atom/movable is required for placing inside another atom's vis_contents. var/atom/movable/weather_visuals/visuals = null + var/atom/movable/weather_visuals/special/special_visuals = null /datum/weather_holder/New(var/source) ..() @@ -19,31 +21,79 @@ if(istype(W)) W.holder = src visuals = new() + special_visuals = new() /datum/weather_holder/proc/change_weather(var/new_weather) var/old_light_modifier = null + var/old_weather = null if(current_weather) old_light_modifier = current_weather.light_modifier // We store the old one, so we can determine if recalculating the sun is needed. + old_weather = current_weather current_weather = allowed_weather_types[new_weather] next_weather_shift = world.time + rand(current_weather.timer_low_bound, current_weather.timer_high_bound) MINUTES + if(new_weather != old_weather) + show_transition_message() update_icon_effects() update_temperature() if(old_light_modifier && current_weather.light_modifier != old_light_modifier) // Updating the sun should be done sparingly. our_planet.update_sun() - message_admins("[our_planet.name]'s weather is now [new_weather], with a temperature of [temperature]°K ([temperature - T0C]°C | [temperature * 1.8 - 459.67]°F).") + log_debug("[our_planet.name]'s weather is now [new_weather], with a temperature of [temperature]°K ([temperature - T0C]°C | [temperature * 1.8 - 459.67]°F).") /datum/weather_holder/proc/process() if(world.time >= next_weather_shift) - var/new_weather - if(!current_weather) - new_weather = pickweight(roundstart_weather_chances) + if(!current_weather) // Roundstart (hopefully). + initialize_weather() else - new_weather = pickweight(current_weather.transition_chances) - change_weather(new_weather) + advance_forecast() else current_weather.process_effects() + + +// Should only have to be called once. +/datum/weather_holder/proc/initialize_weather() + if(!current_weather) + change_weather(get_next_weather()) + build_forecast() + +// Used to determine what the weather will be soon, in a semi-random fashion. +// The forecast is made by calling this repeatively, from the bottom (highest index) of the forecast list. +/datum/weather_holder/proc/get_next_weather(var/datum/weather/W) + if(!current_weather) // At roundstart, choose a suitable initial weather. + return pickweight(roundstart_weather_chances) + return pickweight(W.transition_chances) + +/datum/weather_holder/proc/advance_forecast() + var/new_weather = forecast[1] + forecast.Cut(1, 2) // Remove what we just took out, shortening the list. + change_weather(new_weather) + build_forecast() // To fill the forecast to the desired length. + +// Creates a list of future weather shifts, that the planet will undergo at some point in the future. +// Determining it ahead of time allows for attentive players to plan further ahead, if they can see the forecast. +/datum/weather_holder/proc/build_forecast() + var/desired_length = 3 + if(forecast.len >= desired_length) + return + + while(forecast.len < desired_length) + if(!forecast.len) // If the forecast is empty, the current_weather is used as a base instead. + forecast += get_next_weather(current_weather) + else + var/position = forecast[forecast.len] // Go to the bottom of the list. + var/datum/weather/W = allowed_weather_types[position] // Get the actual datum and not a string. + var/new_weather = get_next_weather(W) // Get a suitable weather pattern to shift to from this one. + forecast += new_weather + log_debug("[our_planet.name]'s weather forecast is now '[english_list(forecast, and_text = " then ", final_comma_text = ", ")]'.") + +// Wipes the forecast and regenerates it. Used for when the weather is forcefully changed, such as with admin verbs. +/datum/weather_holder/proc/rebuild_forecast() + forecast.Cut() + build_forecast() + + + /datum/weather_holder/proc/update_icon_effects() visuals.icon_state = current_weather.icon_state @@ -55,25 +105,41 @@ return allowed_weather_types[desired_type] +/datum/weather_holder/proc/show_transition_message() + if(!current_weather.transition_messages.len) + return + + var/message = pick(current_weather.transition_messages) // So everyone gets the same message. + for(var/mob/M in player_list) // Don't need to care about clientless mobs. + if(M.z in our_planet.expected_z_levels) + var/turf/T = get_turf(M) + if(!T.outdoors) + continue + to_chat(M, message) + /datum/weather var/name = "weather base" var/icon = 'icons/effects/weather.dmi' var/icon_state = null // Icon to apply to turf undergoing weather. - var/temp_high = T20C - var/temp_low = T0C + var/temp_high = T20C // Temperature to apply when at noon. + var/temp_low = T0C // Temperature to apply when at midnight. var/light_modifier = 1.0 // Lower numbers means more darkness. var/light_color = null // If set, changes how the day/night light looks. - var/flight_failure_modifier = 0 // Some types of weather make flying harder, and therefore make crashes more likely. - var/transition_chances = list() // Assoc list - var/datum/weather_holder/holder = null + var/flight_failure_modifier = 0 // Some types of weather make flying harder, and therefore make crashes more likely. (This is not implemented) + var/transition_chances = list() // Assoc list of weather identifiers and the odds to shift to a specific type of weather. Can contain its own identifier to prolong it. + var/datum/weather_holder/holder = null // Reference to the datum that manages the planet's weather. var/timer_low_bound = 5 // How long this weather must run before it tries to change, in minutes var/timer_high_bound = 10 // How long this weather can run before it tries to change, in minutes + var/sky_visible = FALSE // If the sky can be clearly seen while this is occuring, used for flavor text when looking up. var/effect_message = null // Should be a string, this is what is shown to a mob caught in the weather var/last_message = 0 // Keeps track of when the weather last tells EVERY player it's hitting them var/message_delay = 10 SECONDS // Delay in between weather hit messages var/show_message = FALSE // Is set to TRUE and plays the messsage every [message_delay] + var/list/transition_messages = list()// List of messages shown to all outdoor mobs when this weather is transitioned to, for flavor. Not shown if already this weather. + var/observed_message = null // What is shown to a player 'examining' the weather. + /datum/weather/proc/process_effects() show_message = FALSE // Need to reset the show_message var, just in case if(effect_message) // Only bother with the code below if we actually need to display something @@ -87,3 +153,8 @@ icon = 'icons/effects/weather.dmi' mouse_opacity = 0 plane = PLANE_PLANETLIGHTING + +// This is for special effects for specific types of weather, such as lightning flashes in a storm. +// It's a seperate object to allow the use of flick(). +/atom/movable/weather_visuals/special + plane = PLANE_LIGHTING_ABOVE \ No newline at end of file diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm index dfea9f494e..1f1c01bab2 100644 --- a/code/modules/power/antimatter/control.dm +++ b/code/modules/power/antimatter/control.dm @@ -140,7 +140,7 @@ /obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user) if(!istype(W) || !user) return - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) if(!anchored) playsound(src, W.usesound, 75, 1) user.visible_message("[user.name] secures the [src.name] to the floor.", \ diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 6cb70c73bb..f4e920f000 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -88,7 +88,6 @@ var/locked = 1 var/coverlocked = 1 var/aidisabled = 0 - var/tdir = null var/obj/machinery/power/terminal/terminal = null var/lastused_light = 0 var/lastused_equip = 0 @@ -165,11 +164,9 @@ // this allows the APC to be embedded in a wall, yet still inside an area if (building) set_dir(ndir) - src.tdir = dir // to fix Vars bug - set_dir(SOUTH) - pixel_x = (src.tdir & 3)? 0 : (src.tdir == 4 ? 24 : -24) - pixel_y = (src.tdir & 3)? (src.tdir ==1 ? 24 : -24) : 0 + pixel_x = (src.dir & 3)? 0 : (src.dir == 4 ? 24 : -24) + pixel_y = (src.dir & 3)? (src.dir ==1 ? 24 : -24) : 0 if (building==0) init() else @@ -209,7 +206,7 @@ // create a terminal object at the same position as original turf loc // wires will attach to this terminal = new/obj/machinery/power/terminal(src.loc) - terminal.set_dir(tdir) + terminal.set_dir(dir) terminal.master = src /obj/machinery/power/apc/proc/init() @@ -449,7 +446,7 @@ if (istype(user, /mob/living/silicon) && get_dist(src,user)>1) return src.attack_hand(user) src.add_fingerprint(user) - if (istype(W, /obj/item/weapon/crowbar) && opened) + if (W.is_crowbar() && opened) if (has_electronics==1) if (terminal) to_chat(user,"Disconnect the wires first.") @@ -473,7 +470,7 @@ else if (opened!=2) //cover isn't removed opened = 0 update_icon() - else if (istype(W, /obj/item/weapon/crowbar) && !(stat & BROKEN) ) + else if (W.is_crowbar() && !(stat & BROKEN) ) if(coverlocked && !(stat & MAINT)) to_chat(user,"The cover is locked and cannot be opened.") return @@ -499,7 +496,7 @@ "You insert the power cell.") chargecount = 0 update_icon() - else if (istype(W, /obj/item/weapon/screwdriver)) // haxing + else if (W.is_screwdriver()) // haxing if(opened) if (cell) to_chat(user,"Remove the power cell first.") @@ -570,7 +567,7 @@ "You add cables to the APC frame.") make_terminal() terminal.connect_to_network() - else if (istype(W, /obj/item/weapon/wirecutters) && terminal && opened && has_electronics!=2) + else if (W.is_wirecutter() && terminal && opened && has_electronics!=2) var/turf/T = loc if(istype(T) && !T.is_plating()) to_chat(user,"You must remove the floor plating in front of the APC first.") @@ -671,9 +668,7 @@ else if (istype(user, /mob/living/silicon)) return src.attack_hand(user) - if (!opened && wiresexposed && \ - (istype(W, /obj/item/device/multitool) || \ - istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/assembly/signaler))) + if (!opened && wiresexposed && (istype(W, /obj/item/device/multitool) || W.is_wirecutter() || istype(W, /obj/item/device/assembly/signaler))) return src.attack_hand(user) //Placeholder until someone can do take_damage() for APCs or something. to_chat(user,"The [src.name] looks too sturdy to bash open with \the [W.name].") diff --git a/code/modules/power/batteryrack.dm b/code/modules/power/batteryrack.dm index 7bb37a5662..d897bb827a 100644 --- a/code/modules/power/batteryrack.dm +++ b/code/modules/power/batteryrack.dm @@ -78,7 +78,7 @@ /obj/machinery/power/smes/batteryrack/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) //these can only be moved by being reconstructed, solves having to remake the powernet. ..() //SMES attackby for now handles screwdriver, cable coils and wirecutters, no need to repeat that here if(open_hatch) - if(istype(W, /obj/item/weapon/crowbar)) + if(W.is_crowbar()) if (charge < (capacity / 100)) if (!output_attempt && !input_attempt) playsound(src, W.usesound, 50, 1) @@ -91,9 +91,9 @@ qdel(src) return 1 else - user << "Turn off the [src] before dismantling it." + to_chat(user, "Turn off the [src] before dismantling it.") else - user << "Better let [src] discharge before dismantling it." + to_chat(user, "Better let [src] discharge before dismantling it.") else if ((istype(W, /obj/item/weapon/stock_parts/capacitor) && (capacitors_amount < 5)) || (istype(W, /obj/item/weapon/cell) && (cells_amount < 5))) if (charge < (capacity / 100)) if (!output_attempt && !input_attempt) @@ -101,11 +101,11 @@ component_parts += W W.loc = src RefreshParts() - user << "You upgrade the [src] with [W.name]." + to_chat(user, "You upgrade the [src] with [W.name].") else - user << "Turn off the [src] before dismantling it." + to_chat(user, "Turn off the [src] before dismantling it.") else - user << "Better let [src] discharge before putting your hand inside it." + to_chat(user, "Better let [src] discharge before putting your hand inside it.") else user.set_machine(src) interact(user) diff --git a/code/modules/power/breaker_box.dm b/code/modules/power/breaker_box.dm index 2e7903c38e..856697e033 100644 --- a/code/modules/power/breaker_box.dm +++ b/code/modules/power/breaker_box.dm @@ -40,26 +40,26 @@ set_state(1) /obj/machinery/power/breakerbox/examine(mob/user) - user << "Large machine with heavy duty switching circuits used for advanced grid control" + to_chat(user, "Large machine with heavy duty switching circuits used for advanced grid control") if(on) - user << "It seems to be online." + to_chat(user, "It seems to be online.") else - user << "It seems to be offline." + to_chat(user, "It seems to be offline.") /obj/machinery/power/breakerbox/attack_ai(mob/user) if(update_locked) - user << "System locked. Please try again later." + to_chat(user, "System locked. Please try again later.") return if(busy) - user << "System is busy. Please wait until current operation is finished before changing power settings." + to_chat(user, "System is busy. Please wait until current operation is finished before changing power settings.") return busy = 1 - user << "Updating power settings..." + to_chat(user, "Updating power settings...") if(do_after(user, 50)) set_state(!on) - user << "Update Completed. New setting:[on ? "on": "off"]" + to_chat(user, "Update Completed. New setting:[on ? "on": "off"]") update_locked = 1 spawn(600) update_locked = 0 @@ -68,11 +68,11 @@ /obj/machinery/power/breakerbox/attack_hand(mob/user) if(update_locked) - user << "System locked. Please try again later." + to_chat(user, "System locked. Please try again later.") return if(busy) - user << "System is busy. Please wait until current operation is finished before changing power settings." + to_chat(user, "System is busy. Please wait until current operation is finished before changing power settings.") return busy = 1 @@ -94,7 +94,7 @@ var/newtag = input(user, "Enter new RCON tag. Use \"NO_TAG\" to disable RCON or leave empty to cancel.", "SMES RCON system") as text if(newtag) RCon_tag = newtag - user << "You changed the RCON tag to: [newtag]" + to_chat(user, "You changed the RCON tag to: [newtag]") if(on) to_chat(user, "Disable the breaker before performing maintenance.") return diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 2d057825fa..6717edf95d 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -159,7 +159,7 @@ var/list/possible_cable_coil_colours = list( if(!T.is_plating()) return - if(istype(W, /obj/item/weapon/wirecutters)) + if(W.is_wirecutter()) var/obj/item/stack/cable_coil/CC if(d1 == UP || d2 == UP) to_chat(user, "You must cut this cable from above.") diff --git a/code/modules/power/cable_ender.dm b/code/modules/power/cable_ender.dm index d6975091ea..20ca1fdd05 100644 --- a/code/modules/power/cable_ender.dm +++ b/code/modules/power/cable_ender.dm @@ -24,7 +24,7 @@ /obj/structure/cable/ender/attackby(obj/item/W, mob/user) src.add_fingerprint(user) - if(istype(W, /obj/item/weapon/wirecutters)) + if(W.is_wirecutter()) to_chat(user, " These cables are too tough to be cut with those [W.name].") return else if(istype(W, /obj/item/stack/cable_coil)) diff --git a/code/modules/power/cable_heavyduty.dm b/code/modules/power/cable_heavyduty.dm index a286517965..c90c936c4d 100644 --- a/code/modules/power/cable_heavyduty.dm +++ b/code/modules/power/cable_heavyduty.dm @@ -17,7 +17,7 @@ if(!T.is_plating()) return - if(istype(W, /obj/item/weapon/wirecutters)) + if(W.is_wirecutter()) usr << "These cables are too tough to be cut with those [W.name]." return else if(istype(W, /obj/item/stack/cable_coil)) diff --git a/code/modules/power/fusion/core/_core.dm b/code/modules/power/fusion/core/_core.dm index 7f81b70ffd..329170be44 100644 --- a/code/modules/power/fusion/core/_core.dm +++ b/code/modules/power/fusion/core/_core.dm @@ -120,7 +120,7 @@ var/list/fusion_cores = list() if(default_part_replacement(user, W)) return - if(ismultitool(W)) + if(istype(W, /obj/item/device/multitool)) var/new_ident = input("Enter a new ident tag.", "Fusion Core", id_tag) as null|text if(new_ident && user.Adjacent(src)) id_tag = new_ident diff --git a/code/modules/power/fusion/core/core_control.dm b/code/modules/power/fusion/core/core_control.dm index 54d96883a7..0dca71a4d1 100644 --- a/code/modules/power/fusion/core/core_control.dm +++ b/code/modules/power/fusion/core/core_control.dm @@ -11,7 +11,7 @@ /obj/machinery/computer/fusion_core_control/attackby(var/obj/item/thing, var/mob/user) ..() - if(ismultitool(thing)) + if(istype(thing, /obj/item/device/multitool)) var/new_ident = input("Enter a new ident tag.", "Core Control", id_tag) as null|text if(new_ident && user.Adjacent(src)) id_tag = new_ident diff --git a/code/modules/power/fusion/fuel_assembly/fuel_control.dm b/code/modules/power/fusion/fuel_assembly/fuel_control.dm index e765c4d495..6825f9ba37 100644 --- a/code/modules/power/fusion/fuel_assembly/fuel_control.dm +++ b/code/modules/power/fusion/fuel_assembly/fuel_control.dm @@ -96,7 +96,7 @@ /obj/machinery/computer/fusion_fuel_control/attackby(var/obj/item/W, var/mob/user) ..() - if(ismultitool(W)) + if(istype(W, /obj/item/device/multitool)) var/new_ident = input("Enter a new ident tag.", "Fuel Control", id_tag) as null|text if(new_ident && user.Adjacent(src)) id_tag = new_ident diff --git a/code/modules/power/fusion/fuel_assembly/fuel_injector.dm b/code/modules/power/fusion/fuel_assembly/fuel_injector.dm index 545638c7d8..79794ff069 100644 --- a/code/modules/power/fusion/fuel_assembly/fuel_injector.dm +++ b/code/modules/power/fusion/fuel_assembly/fuel_injector.dm @@ -42,7 +42,7 @@ var/list/fuel_injectors = list() /obj/machinery/fusion_fuel_injector/attackby(obj/item/W, mob/user) - if(ismultitool(W)) + if(istype(W, /obj/item/device/multitool)) var/new_ident = input("Enter a new ident tag.", "Fuel Injector", id_tag) as null|text if(new_ident && user.Adjacent(src)) id_tag = new_ident @@ -68,7 +68,7 @@ var/list/fuel_injectors = list() cur_assembly = W return - if(iswrench(W) || isscrewdriver(W) || iscrowbar(W) || istype(W, /obj/item/weapon/storage/part_replacer)) + if(W.is_wrench() || W.is_screwdriver() || W.is_crowbar() || istype(W, /obj/item/weapon/storage/part_replacer)) if(injecting) to_chat(user, "Shut \the [src] off first!") return diff --git a/code/modules/power/fusion/gyrotron/gyrotron.dm b/code/modules/power/fusion/gyrotron/gyrotron.dm index 5309b0f5b2..23697d2449 100644 --- a/code/modules/power/fusion/gyrotron/gyrotron.dm +++ b/code/modules/power/fusion/gyrotron/gyrotron.dm @@ -52,7 +52,7 @@ var/list/gyrotrons = list() icon_state = "emitter-off" /obj/machinery/power/emitter/gyrotron/attackby(var/obj/item/W, var/mob/user) - if(ismultitool(W)) + if(istype(W, /obj/item/device/multitool)) var/new_ident = input("Enter a new ident tag.", "Gyrotron", id_tag) as null|text if(new_ident && user.Adjacent(src)) id_tag = new_ident diff --git a/code/modules/power/fusion/gyrotron/gyrotron_control.dm b/code/modules/power/fusion/gyrotron/gyrotron_control.dm index eb735a81f3..958e03f06f 100644 --- a/code/modules/power/fusion/gyrotron/gyrotron_control.dm +++ b/code/modules/power/fusion/gyrotron/gyrotron_control.dm @@ -96,7 +96,7 @@ /obj/machinery/computer/gyrotron_control/attackby(var/obj/item/W, var/mob/user) ..() - if(ismultitool(W)) + if(istype(W, /obj/item/device/multitool)) var/new_ident = input("Enter a new ident tag.", "Gyrotron Control", id_tag) as null|text if(new_ident && user.Adjacent(src)) id_tag = new_ident diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index 27032a2198..c7168ee9b0 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -137,7 +137,7 @@ attack_hand(user) /obj/machinery/power/generator/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) playsound(src, W.usesound, 75, 1) anchored = !anchored user.visible_message("[user.name] [anchored ? "secures" : "unsecures"] the bolts holding [src.name] to the floor.", \ diff --git a/code/modules/power/grid_checker.dm b/code/modules/power/grid_checker.dm index 8127383651..93d4918af0 100644 --- a/code/modules/power/grid_checker.dm +++ b/code/modules/power/grid_checker.dm @@ -43,12 +43,12 @@ /obj/machinery/power/grid_checker/attackby(obj/item/W, mob/user) if(!user) return - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) default_deconstruction_screwdriver(user, W) opened = !opened - else if(istype(W, /obj/item/weapon/crowbar)) + else if(W.is_crowbar()) default_deconstruction_crowbar(user, W) - else if(istype(W, /obj/item/device/multitool) || istype(W, /obj/item/weapon/wirecutters) ) + else if(istype(W, /obj/item/device/multitool) || W.is_wirecutter()) attack_hand(user) /obj/machinery/power/grid_checker/attack_hand(mob/user) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index a2210f22fc..6417889dcd 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -47,7 +47,7 @@ /obj/machinery/light_construct/attackby(obj/item/weapon/W as obj, mob/user as mob) src.add_fingerprint(user) - if (istype(W, /obj/item/weapon/wrench)) + if (W.is_wrench()) if (src.stage == 1) playsound(src, W.usesound, 75, 1) usr << "You begin deconstructing [src]." @@ -66,7 +66,7 @@ usr << "You have to unscrew the case first." return - if(istype(W, /obj/item/weapon/wirecutters)) + if(W.is_wirecutter()) if (src.stage != 2) return src.stage = 1 switch(fixture_type) @@ -98,7 +98,7 @@ "You add wires to [src].") return - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) if (src.stage == 2) switch(fixture_type) if ("tube") @@ -420,7 +420,7 @@ // attempt to stick weapon into light socket else if(status == LIGHT_EMPTY) - if(istype(W, /obj/item/weapon/screwdriver)) //If it's a screwdriver open it. + if(W.is_screwdriver()) //If it's a screwdriver open it. playsound(src, W.usesound, 75, 1) user.visible_message("[user.name] opens [src]'s casing.", \ "You open [src]'s casing.", "You hear a noise.") @@ -456,7 +456,7 @@ electrocute_mob(user, get_area(src), src, rand(0.7,1.0)) /obj/machinery/light/flamp/attackby(obj/item/W, mob/user) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) anchored = !anchored playsound(src, W.usesound, 50, 1) user << "You [anchored ? "wrench" : "unwrench"] \the [src]." @@ -469,7 +469,7 @@ return else - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) playsound(src, W.usesound, 75, 1) user.visible_message("[user.name] removes [src]'s lamp shade.", \ "You remove [src]'s lamp shade.", "You hear a noise.") diff --git a/code/modules/power/pacman2.dm b/code/modules/power/pacman2.dm index b6b904e65a..8e32cccc30 100644 --- a/code/modules/power/pacman2.dm +++ b/code/modules/power/pacman2.dm @@ -52,7 +52,7 @@ examine(mob/user) ..(user) - user << "The generator has [P.air_contents.phoron] units of fuel left, producing [power_gen] per cycle." + to_chat(user, "The generator has [P.air_contents.phoron] units of fuel left, producing [power_gen] per cycle.") handleInactive() heat -= 2 @@ -70,29 +70,29 @@ attackby(var/obj/item/O as obj, var/mob/user as mob) if(istype(O, /obj/item/weapon/tank/phoron)) if(P) - user << "The generator already has a phoron tank loaded!" + to_chat(user, "The generator already has a phoron tank loaded!") return P = O user.drop_item() O.loc = src - user << "You add the phoron tank to the generator." + to_chat(user, "You add the phoron tank to the generator.") else if(!active) - if(istype(O, /obj/item/weapon/wrench)) + if(O.is_wrench()) anchored = !anchored playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) if(anchored) - user << "You secure the generator to the floor." + to_chat(user, "You secure the generator to the floor.") else - user << "You unsecure the generator from the floor." + to_chat(user, "You unsecure the generator from the floor.") SSmachines.makepowernets() - else if(istype(O, /obj/item/weapon/screwdriver)) + else if(O.is_screwdriver()) open = !open playsound(loc, O.usesound, 50, 1) if(open) - user << "You open the access panel." + to_chat(user, "You open the access panel.") else - user << "You close the access panel." - else if(istype(O, /obj/item/weapon/crowbar) && !open) + to_chat(user, "You close the access panel.") + else if(O.is_crowbar() && !open) playsound(loc, O.usesound, 50, 1) var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc) for(var/obj/item/I in component_parts) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 5a20aaeaeb..660ee536db 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -51,9 +51,9 @@ if(!..(user,1 )) return if(active) - usr << "The generator is on." + to_chat(user, "The generator is on.") else - usr << "The generator is off." + to_chat(user, "The generator is off.") /obj/machinery/power/port_gen/emp_act(severity) var/duration = 6000 //ten minutes @@ -145,10 +145,12 @@ /obj/machinery/power/port_gen/pacman/examine(mob/user) ..(user) - user << "\The [src] appears to be producing [power_gen*power_output] W." - user << "There [sheets == 1 ? "is" : "are"] [sheets] sheet\s left in the hopper." - if(IsBroken()) user << "\The [src] seems to have broken down." - if(overheating) user << "\The [src] is overheating!" + to_chat(user, "\The [src] appears to be producing [power_gen*power_output] W.") + to_chat(user, "There [sheets == 1 ? "is" : "are"] [sheets] sheet\s left in the hopper.") + if(IsBroken()) + to_chat(user, "\The [src] seems to have broken down.") + if(overheating) + to_chat(user, "\The [src] is overheating!") /obj/machinery/power/port_gen/pacman/HasFuel() var/needed_sheets = power_output / time_per_sheet @@ -263,21 +265,21 @@ var/obj/item/stack/addstack = O var/amount = min((max_sheets - sheets), addstack.amount) if(amount < 1) - user << "The [src.name] is full!" + to_chat(user, "The [src.name] is full!") return - user << "You add [amount] sheet\s to the [src.name]." + to_chat(user, "You add [amount] sheet\s to the [src.name].") sheets += amount addstack.use(amount) updateUsrDialog() return else if(!active) - if(istype(O, /obj/item/weapon/wrench)) + if(O.is_wrench()) if(!anchored) connect_to_network() - user << "You secure the generator to the floor." + to_chat(user, "You secure the generator to the floor.") else disconnect_from_network() - user << "You unsecure the generator from the floor." + to_chat(user, "You unsecure the generator from the floor.") playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) anchored = !anchored else if(default_deconstruction_screwdriver(user, O)) @@ -337,7 +339,7 @@ if (get_dist(src, user) > 1 ) if (!istype(user, /mob/living/silicon/ai)) user.unset_machine() - user << browse(null, "window=port_gen") + user << browse(null, "window=port_gen" return user.set_machine(src) diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 112f5a482e..04e63379fc 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -139,7 +139,7 @@ return // Power machinery should also connect/disconnect from the network. -/obj/machinery/power/default_unfasten_wrench(var/mob/user, var/obj/item/weapon/wrench/W, var/time = 20) +/obj/machinery/power/default_unfasten_wrench(var/mob/user, var/obj/item/weapon/W, var/time = 20) if((. = ..())) if(anchored) connect_to_network() diff --git a/code/modules/power/singularity/act.dm b/code/modules/power/singularity/act.dm index 95affc46f1..f24134dd63 100644 --- a/code/modules/power/singularity/act.dm +++ b/code/modules/power/singularity/act.dm @@ -3,7 +3,7 @@ /atom/proc/singularity_act() return -/atom/proc/singularity_pull() +/atom/proc/singularity_pull(S, current_size) return /mob/living/singularity_act() @@ -11,8 +11,9 @@ gib() return 20 -/mob/living/singularity_pull(S) +/mob/living/singularity_pull(S, current_size) step_towards(src, S) + apply_effect(current_size * 3, IRRADIATE, blocked = getarmor(null, "rad")) /mob/living/carbon/human/singularity_act() var/gain = 20 @@ -30,11 +31,12 @@ var/list/handlist = list(l_hand, r_hand) for(var/obj/item/hand in handlist) if(prob(current_size*5) && hand.w_class >= ((11-current_size)/2) && unEquip(hand)) - step_towards(hand, src) - src << "The [S] pulls \the [hand] from your grip!" - apply_effect(current_size * 3, IRRADIATE) - if(shoes) - if(shoes.item_flags & NOSLIP) return 0 + step_towards(hand, S) + to_chat(src, "The [S] pulls \the [hand] from your grip!") + + if(!lying && (!shoes || !(shoes.item_flags & NOSLIP)) && (!species || !(species.flags & NOSLIP)) && prob(current_size*5)) + to_chat(src, "A strong gravitational force slams you to the ground!") + Weaken(current_size) ..() /obj/singularity_act() @@ -73,7 +75,7 @@ return /obj/machinery/power/supermatter/shard/singularity_act() - src.loc = null + src.forceMove(null) qdel(src) return 5000 @@ -88,7 +90,7 @@ SetUniversalState(/datum/universal_state/supermatter_cascade) log_admin("New super singularity made by eating a SM crystal [prints]. Last touched by [src.fingerprintslast].") message_admins("New super singularity made by eating a SM crystal [prints]. Last touched by [src.fingerprintslast].") - src.loc = null + src.forceMove(null) qdel(src) return 50000 diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 9dbec38fe9..af143b64a4 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -54,7 +54,7 @@ var/global/list/rad_collectors = list() investigate_log("turned [active?"on":"off"] by [user.key]. [P?"Fuel: [round(P.air_contents.gas["phoron"]/0.29)]%":"It is empty"].","singulo") return else - user << "The controls are locked!" + to_chat(user, "The controls are locked!") return ..() @@ -62,23 +62,23 @@ var/global/list/rad_collectors = list() /obj/machinery/power/rad_collector/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/weapon/tank/phoron)) if(!src.anchored) - user << "The [src] needs to be secured to the floor first." + to_chat(user, "The [src] needs to be secured to the floor first.") return 1 if(src.P) - user << "There's already a phoron tank loaded." + to_chat(user, "There's already a phoron tank loaded.") return 1 user.drop_item() src.P = W W.loc = src update_icons() return 1 - else if(istype(W, /obj/item/weapon/crowbar)) + else if(W.is_crowbar()) if(P && !src.locked) eject() return 1 - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) if(P) - user << "Remove the phoron tank first." + to_chat(user, "Remove the phoron tank first.") return 1 playsound(src, W.usesound, 75, 1) src.anchored = !src.anchored @@ -94,18 +94,18 @@ var/global/list/rad_collectors = list() if (src.allowed(user)) if(active) src.locked = !src.locked - user << "The controls are now [src.locked ? "locked." : "unlocked."]" + to_chat(user, "The controls are now [src.locked ? "locked." : "unlocked."]") else src.locked = 0 //just in case it somehow gets locked - user << "The controls can only be locked when the [src] is active." + to_chat(user, "The controls can only be locked when the [src] is active.") else - user << "Access denied!" + to_chat(user, "Access denied!") return 1 return ..() /obj/machinery/power/rad_collector/examine(mob/user) if (..(user, 3)) - user << "The meter indicates that \the [src] is collecting [last_power] W." + to_chat(user, "The meter indicates that \the [src] is collecting [last_power] W.") return 1 /obj/machinery/power/rad_collector/ex_act(severity) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index eaca5bd663..8ac6bfb559 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -146,7 +146,7 @@ /obj/machinery/power/emitter/attackby(obj/item/W, mob/user) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) if(active) user << "Turn off [src] first." return diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index dc6fd45163..4132919938 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -103,7 +103,7 @@ field_generator power level display if(active) user << "The [src] needs to be off." return - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) switch(state) if(0) state = 1 diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm index 2f9bc83cf4..888d75ea6f 100644 --- a/code/modules/power/singularity/generator.dm +++ b/code/modules/power/singularity/generator.dm @@ -17,7 +17,7 @@ if(src) qdel(src) /obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) anchored = !anchored playsound(src, W.usesound, 75, 1) if(anchored) diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index a5d2a4ac0a..e89ff0dcce 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -207,35 +207,35 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps if(0) - if(iswrench(O)) + if(O.is_wrench()) playsound(src, O.usesound, 75, 1) src.anchored = 1 user.visible_message("[user.name] secures the [src.name] to the floor.", \ "You secure the external bolts.") temp_state++ if(1) - if(iswrench(O)) + if(O.is_wrench()) playsound(src, O.usesound, 75, 1) src.anchored = 0 user.visible_message("[user.name] detaches the [src.name] from the floor.", \ "You remove the external bolts.") temp_state-- - else if(iscoil(O)) + else if(istype(O, /obj/item/stack/cable_coil)) if(O:use(1,user)) user.visible_message("[user.name] adds wires to the [src.name].", \ "You add some wires.") temp_state++ if(2) - if(iswirecutter(O))//TODO:Shock user if its on? + if(O.is_wirecutter())//TODO:Shock user if its on? user.visible_message("[user.name] removes some wires from the [src.name].", \ "You remove some wires.") temp_state-- - else if(isscrewdriver(O)) + else if(O.is_screwdriver()) user.visible_message("[user.name] closes the [src.name]'s access panel.", \ "You close the access panel.") temp_state++ if(3) - if(isscrewdriver(O)) + if(O.is_screwdriver()) user.visible_message("[user.name] opens the [src.name]'s access panel.", \ "You open the access panel.") temp_state-- @@ -346,35 +346,35 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin var/temp_state = src.construction_state switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps if(0) - if(iswrench(O)) + if(O.is_wrench()) playsound(src, O.usesound, 75, 1) src.anchored = 1 user.visible_message("[user.name] secures the [src.name] to the floor.", \ "You secure the external bolts.") temp_state++ if(1) - if(iswrench(O)) + if(O.is_wrench()) playsound(src, O.usesound, 75, 1) src.anchored = 0 user.visible_message("[user.name] detaches the [src.name] from the floor.", \ "You remove the external bolts.") temp_state-- - else if(iscoil(O)) + else if(istype(O, /obj/item/stack/cable_coil)) if(O:use(1)) user.visible_message("[user.name] adds wires to the [src.name].", \ "You add some wires.") temp_state++ if(2) - if(iswirecutter(O))//TODO:Shock user if its on? + if(O.is_wirecutter())//TODO:Shock user if its on? user.visible_message("[user.name] removes some wires from the [src.name].", \ "You remove some wires.") temp_state-- - else if(isscrewdriver(O)) + else if(O.is_screwdriver()) user.visible_message("[user.name] closes the [src.name]'s access panel.", \ "You close the access panel.") temp_state++ if(3) - if(isscrewdriver(O)) + if(O.is_screwdriver()) user.visible_message("[user.name] opens the [src.name]'s access panel.", \ "You open the access panel.") temp_state-- diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index e2b37348a9..5a6ecf02ab 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -192,7 +192,7 @@ //Will return 1 on failure /obj/machinery/power/smes/proc/make_terminal(const/mob/user) if (user.loc == loc) - user << "You must not be on the same tile as the [src]." + to_chat(user, "You must not be on the same tile as the [src].") return 1 //Direction the terminal will face to @@ -204,13 +204,13 @@ tempDir = WEST var/turf/tempLoc = get_step(src, reverse_direction(tempDir)) if (istype(tempLoc, /turf/space)) - user << "You can't build a terminal on space." + to_chat(user, "You can't build a terminal on space.") return 1 else if (istype(tempLoc)) if(!tempLoc.is_plating()) - user << "You must remove the floor plating first." + to_chat(user, "You must remove the floor plating first.") return 1 - user << "You start adding cable to the [src]." + to_chat(user, "You start adding cable to the [src].") if(do_after(user, 50)) terminal = new /obj/machinery/power/terminal(tempLoc) terminal.set_dir(tempDir) @@ -236,27 +236,27 @@ /obj/machinery/power/smes/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) if(!open_hatch) open_hatch = 1 - user << "You open the maintenance hatch of [src]." + to_chat(user, "You open the maintenance hatch of [src].") playsound(src, W.usesound, 50, 1) return 0 else open_hatch = 0 - user << "You close the maintenance hatch of [src]." + to_chat(user, "You close the maintenance hatch of [src].") playsound(src, W.usesound, 50, 1) return 0 if (!open_hatch) - user << "You need to open access hatch on [src] first!" + to_chat(user, "You need to open access hatch on [src] first!") return 0 if(istype(W, /obj/item/stack/cable_coil) && !terminal && !building_terminal) building_terminal = 1 var/obj/item/stack/cable_coil/CC = W if (CC.get_amount() <= 10) - user << "You need more cables." + to_chat(user, "You need more cables.") building_terminal = 0 return 0 if (make_terminal(user)) @@ -270,14 +270,14 @@ stat = 0 return 0 - else if(istype(W, /obj/item/weapon/wirecutters) && terminal && !building_terminal) + else if(W.is_wirecutter() && terminal && !building_terminal) building_terminal = 1 var/turf/tempTDir = terminal.loc if (istype(tempTDir)) if(!tempTDir.is_plating()) - user << "You must remove the floor plating first." + to_chat(user, "You must remove the floor plating first.") else - user << "You begin to cut the cables..." + to_chat(user, "You begin to cut the cables...") playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) if(do_after(user, 50 * W.toolspeed)) if (prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) diff --git a/code/modules/power/smes_construction.dm b/code/modules/power/smes_construction.dm index 6a4aa9c276..6a9e6bfaff 100644 --- a/code/modules/power/smes_construction.dm +++ b/code/modules/power/smes_construction.dm @@ -328,7 +328,7 @@ failure_probability = 0 // Crowbar - Disassemble the SMES. - if(istype(W, /obj/item/weapon/crowbar)) + if(W.is_crowbar()) if (terminal) to_chat(user, "You have to disassemble the terminal first!") return diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 360cad96bf..2d9f1803ba 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -61,7 +61,7 @@ var/list/solars_list = list() /obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user) - if(istype(W, /obj/item/weapon/crowbar)) + if(W.is_crowbar()) playsound(src.loc, 'sound/machines/click.ogg', 50, 1) user.visible_message("[user] begins to take the glass off the solar panel.") if(do_after(user, 50)) @@ -228,13 +228,13 @@ var/list/solars_list = list() if (!isturf(loc)) return 0 if(!anchored) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) anchored = 1 user.visible_message("[user] wrenches the solar assembly into place.") playsound(src, W.usesound, 75, 1) return 1 else - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) anchored = 0 user.visible_message("[user] unwrenches the solar assembly from it's place.") playsound(src, W.usesound, 75, 1) @@ -251,7 +251,7 @@ var/list/solars_list = list() else new /obj/machinery/power/solar(get_turf(src), src) else - user << "You need two sheets of glass to put them into a solar panel." + to_chat(user, "You need two sheets of glass to put them into a solar panel.") return return 1 @@ -263,7 +263,7 @@ var/list/solars_list = list() user.visible_message("[user] inserts the electronics into the solar assembly.") return 1 else - if(istype(W, /obj/item/weapon/crowbar)) + if(W.is_crowbar()) new /obj/item/weapon/tracker_electronics(src.loc) tracker = 0 user.visible_message("[user] takes out the electronics from the solar assembly.") @@ -403,11 +403,11 @@ var/list/solars_list = list() return /obj/machinery/power/solar_control/attackby(obj/item/I, user as mob) - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) playsound(src, I.usesound, 50, 1) if(do_after(user, 20)) if (src.stat & BROKEN) - user << "The broken glass falls out." + to_chat(user, "The broken glass falls out.") var/obj/structure/frame/A = new /obj/structure/frame/computer( src.loc ) new /obj/item/weapon/material/shard( src.loc ) var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A ) @@ -419,7 +419,7 @@ var/list/solars_list = list() A.anchored = 1 qdel(src) else - user << "You disconnect the monitor." + to_chat(user, "You disconnect the monitor.") var/obj/structure/frame/A = new /obj/structure/frame/computer( src.loc ) var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A ) for (var/obj/C in src) diff --git a/code/modules/power/supermatter/setup_supermatter.dm b/code/modules/power/supermatter/setup_supermatter.dm index a457dd121e..7477623805 100644 --- a/code/modules/power/supermatter/setup_supermatter.dm +++ b/code/modules/power/supermatter/setup_supermatter.dm @@ -263,6 +263,34 @@ GLOBAL_LIST_BOILERPLATE(all_engine_setup_markers, /obj/effect/engine_setup) F.update_icon() return SETUP_OK +// Closes the monitoring room shutters so the first Engi to show up doesn't get microwaved +/obj/effect/engine_setup/shutters/ + name = "Shutter Button Marker" + var/target_button = "Engine Monitoring Room Blast Doors" // This needs to be set to whatever the shutter button is called + +/obj/effect/engine_setup/shutters/activate() + if(!target_button) + log_and_message_admins("## WARNING: No button type set at [x] [y] [z]!") + return SETUP_WARNING + + var/obj/machinery/button/remote/blast_door/found = null + var/turf/T = get_turf(src) + for(var/obj/machinery/button/remote/blast_door/B in T.contents) + if(B.name == target_button) + found = B + break + + if(!found) + log_and_message_admins("## WARNING: Unable to locate button at [x] [y] [z]!") + return SETUP_WARNING + + found.trigger() + found.update_icon() + return SETUP_OK + + + + #undef SETUP_OK #undef SETUP_WARNING diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index fac43cab7d..f18598b282 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -194,7 +194,7 @@ else shift_light(4,initial(light_color)) if(grav_pulling) - supermatter_pull() + supermatter_pull(src) //Ok, get the air from the turf var/datum/gas_mixture/removed = null @@ -381,18 +381,9 @@ var/rads = 500 radiation_repository.radiate(src, rads) -/obj/machinery/power/supermatter/proc/supermatter_pull() - //following is adapted from singulo code - if(defer_powernet_rebuild != 2) - defer_powernet_rebuild = 1 - // Let's just make this one loop. - for(var/atom/X in orange(pull_radius,src)) - spawn() X.singularity_pull(src, STAGE_FIVE) - - if(defer_powernet_rebuild != 2) - defer_powernet_rebuild = 0 - return - +/proc/supermatter_pull(var/atom/target, var/pull_range = 255, var/pull_power = STAGE_FIVE) + for(var/atom/A in range(pull_range, target)) + A.singularity_pull(target, pull_power) /obj/machinery/power/supermatter/GotoAirflowDest(n) //Supermatter not pushed around by airflow return diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm index 07dedf5b2b..82e84718cf 100644 --- a/code/modules/power/tesla/coil.dm +++ b/code/modules/power/tesla/coil.dm @@ -18,6 +18,9 @@ var/last_zap = 0 var/datum/wires/tesla_coil/wires = null +/obj/machinery/power/tesla_coil/pre_mapped + anchored = TRUE + /obj/machinery/power/tesla_coil/New() ..() wires = new(src) @@ -103,6 +106,9 @@ can_buckle = TRUE buckle_lying = FALSE +/obj/machinery/power/grounding_rod/pre_mapped + anchored = TRUE + /obj/machinery/power/grounding_rod/update_icon() if(panel_open) icon_state = "grounding_rod_open[anchored]" diff --git a/code/modules/power/tesla/tesla_act.dm b/code/modules/power/tesla/tesla_act.dm index 8e3f1c6996..605c9e3021 100644 --- a/code/modules/power/tesla/tesla_act.dm +++ b/code/modules/power/tesla/tesla_act.dm @@ -45,7 +45,10 @@ /obj/machinery/light/tesla_act(power, explosive = FALSE) if(explosive) explosion(loc, 0, 0, 0/*, flame_range = 5*/, adminlog = FALSE) - qdel(src) + qdel(src) + return + on = TRUE + broken() /obj/structure/closet/tesla_act(var/power) ..() //extend the zap diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm index b06ed2aaf1..a6eab0dbe0 100644 --- a/code/modules/power/tracker.dm +++ b/code/modules/power/tracker.dm @@ -59,7 +59,7 @@ /obj/machinery/power/tracker/attackby(var/obj/item/weapon/W, var/mob/user) - if(istype(W, /obj/item/weapon/crowbar)) + if(W.is_crowbar()) playsound(src.loc, 'sound/machines/click.ogg', 50, 1) user.visible_message("[user] begins to take the glass off the solar tracker.") if(do_after(user, 50)) diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index 30668993a8..725280149b 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -124,14 +124,14 @@ return if(default_deconstruction_crowbar(user, W)) return - if(ismultitool(W)) + if(istype(W, /obj/item/device/multitool)) var/new_ident = input("Enter a new ident tag.", name, comp_id) as null|text if(new_ident && user.Adjacent(src)) comp_id = new_ident return return ..() -/obj/machinery/compressor/default_unfasten_wrench(var/mob/user, var/obj/item/weapon/wrench/W, var/time = 20) +/obj/machinery/compressor/default_unfasten_wrench(var/mob/user, var/obj/item/weapon/W, var/time = 20) if((. = ..())) turbine = null if(anchored) @@ -229,7 +229,7 @@ return return ..() -/obj/machinery/power/turbine/default_unfasten_wrench(var/mob/user, var/obj/item/weapon/wrench/W, var/time = 20) +/obj/machinery/power/turbine/default_unfasten_wrench(var/mob/user, var/obj/item/weapon/W, var/time = 20) if((. = ..())) compressor = null if(anchored) @@ -337,7 +337,7 @@ doors += P /obj/machinery/computer/turbine_computer/attackby(obj/item/W, mob/user) - if(ismultitool(W)) + if(istype(W, /obj/item/device/multitool)) var/new_ident = input("Enter a new ident tag.", name, id) as null|text if(new_ident && user.Adjacent(src)) id = new_ident diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index b28c8f2993..a9307e10ac 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -30,20 +30,20 @@ update_icon() /obj/item/ammo_casing/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) if(!BB) - user << "There is no bullet in the casing to inscribe anything into." + to_chat(user, "There is no bullet in the casing to inscribe anything into.") return var/tmp_label = "" var/label_text = sanitizeSafe(input(user, "Inscribe some text into \the [initial(BB.name)]","Inscription",tmp_label), MAX_NAME_LEN) if(length(label_text) > 20) - user << "The inscription can be at most 20 characters long." + to_chat(user, "The inscription can be at most 20 characters long.") else if(!label_text) - user << "You scratch the inscription off of [initial(BB)]." + to_chat(user, "You scratch the inscription off of [initial(BB)].") BB.name = initial(BB.name) else - user << "You inscribe \"[label_text]\" into \the [initial(BB.name)]." + to_chat(user, "You inscribe \"[label_text]\" into \the [initial(BB.name)].") BB.name = "[initial(BB.name)] (\"[label_text]\")" /obj/item/ammo_casing/update_icon() @@ -55,7 +55,7 @@ /obj/item/ammo_casing/examine(mob/user) ..() if (!BB) - user << "This one is spent." + to_chat(user, "This one is spent.") //Gun loading types #define SINGLE_CASING 1 //The gun only accepts ammo_casings. ammo_magazines should never have this as their mag_type. @@ -110,10 +110,10 @@ if(istype(W, /obj/item/ammo_casing)) var/obj/item/ammo_casing/C = W if(C.caliber != caliber) - user << "[C] does not fit into [src]." + to_chat(user, "[C] does not fit into [src].") return if(stored_ammo.len >= max_ammo) - user << "[src] is full!" + to_chat(user, "[src] is full!") return user.remove_from_mob(C) C.loc = src @@ -122,13 +122,13 @@ if(istype(W, /obj/item/ammo_magazine/clip)) var/obj/item/ammo_magazine/clip/L = W if(L.caliber != caliber) - user << "The ammo in [L] does not fit into [src]." + to_chat(user, "The ammo in [L] does not fit into [src].") return if(!L.stored_ammo.len) - user << "There's no more ammo [L]!" + to_chat(user, "There's no more ammo [L]!") return if(stored_ammo.len >= max_ammo) - user << "[src] is full!" + to_chat(user, "[src] is full!") return var/obj/item/ammo_casing/AC = L.stored_ammo[1] //select the next casing. L.stored_ammo -= AC //Remove this casing from loaded list of the clip. @@ -140,9 +140,9 @@ /obj/item/ammo_magazine/attack_self(mob/user) if(!stored_ammo.len) - user << "[src] is already empty!" + to_chat(user, "[src] is already empty!") return - user << "You empty [src]." + to_chat(user, "You empty [src].") for(var/obj/item/ammo_casing/C in stored_ammo) C.loc = user.loc C.set_dir(pick(cardinal)) @@ -162,7 +162,7 @@ /obj/item/ammo_magazine/examine(mob/user) ..() - user << "There [(stored_ammo.len == 1)? "is" : "are"] [stored_ammo.len] round\s left!" + to_chat(user, "There [(stored_ammo.len == 1)? "is" : "are"] [stored_ammo.len] round\s left!") //magazine icon state caching /var/global/list/magazine_icondata_keys = list() diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 62a838b93d..0f85f6e364 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -150,11 +150,11 @@ if(dna_lock && attached_lock.stored_dna) if(!authorized_user(user)) if(attached_lock.safety_level == 0) - M << "\The [src] buzzes in dissapoint and displays an invalid DNA symbol." + to_chat(M, "\The [src] buzzes in dissapoint and displays an invalid DNA symbol.") return 0 if(!attached_lock.exploding) if(attached_lock.safety_level == 1) - M << "\The [src] hisses in dissapointment." + to_chat(M, "\The [src] hisses in dissapointment.") visible_message("\The [src] announces, \"Self-destruct occurring in ten seconds.\"", "\The [src] announces, \"Self-destruct occurring in ten seconds.\"") spawn(100) explosion(src, 0, 0, 3, 4) @@ -163,7 +163,7 @@ qdel(src) return 0 if(HULK in M.mutations) - M << "Your fingers are much too large for the trigger guard!" + to_chat(M, "Your fingers are much too large for the trigger guard!") return 0 if((CLUMSY in M.mutations) && prob(40)) //Clumsy handling var/obj/P = consume_next_projectile() @@ -196,7 +196,7 @@ return if(user && user.a_intent == I_HELP && user.is_preference_enabled(/datum/client_preference/safefiring)) //regardless of what happens, refuse to shoot if help intent is on - user << "You refrain from firing your [src] as your intent is set to help." + to_chat(user, "You refrain from firing your [src] as your intent is set to help.") return else @@ -236,9 +236,9 @@ /obj/item/weapon/gun/attackby(var/obj/item/A as obj, mob/user as mob) if(istype(A, /obj/item/dnalockingchip)) if(dna_lock) - user << "\The [src] already has a [attached_lock]." + to_chat(user, "\The [src] already has a [attached_lock].") return - user << "You insert \the [A] into \the [src]." + to_chat(user, "You insert \the [A] into \the [src].") user.drop_item() A.loc = src attached_lock = A @@ -248,12 +248,12 @@ verbs += /obj/item/weapon/gun/verb/allow_dna return - if(istype(A, /obj/item/weapon/screwdriver)) + if(A.is_screwdriver()) if(dna_lock && attached_lock && !attached_lock.controller_lock) - user << "You begin removing \the [attached_lock] from \the [src]." + to_chat(user, "You begin removing \the [attached_lock] from \the [src].") playsound(src, A.usesound, 50, 1) if(do_after(user, 25 * A.toolspeed)) - user << "You remove \the [attached_lock] from \the [src]." + to_chat(user, "You remove \the [attached_lock] from \the [src].") user.put_in_hands(attached_lock) dna_lock = 0 attached_lock = null @@ -261,12 +261,12 @@ verbs -= /obj/item/weapon/gun/verb/give_dna verbs -= /obj/item/weapon/gun/verb/allow_dna else - user << "\The [src] is not accepting modifications at this time." + to_chat(user, "\The [src] is not accepting modifications at this time.") ..() /obj/item/weapon/gun/emag_act(var/remaining_charges, var/mob/user) if(dna_lock && attached_lock.controller_lock) - user << "You short circuit the internal locking mechanisms of \the [src]!" + to_chat(user, "You short circuit the internal locking mechanisms of \the [src]!") attached_lock.controller_dna = null attached_lock.controller_lock = 0 attached_lock.stored_dna = list() @@ -317,7 +317,7 @@ if(world.time < next_fire_time) if (world.time % 3) //to prevent spam - user << "[src] is not ready to fire again!" + to_chat(user, "[src] is not ready to fire again!") return var/shoot_time = (burst - 1)* burst_delay @@ -682,7 +682,7 @@ user.apply_damage(in_chamber.damage*2.5, in_chamber.damage_type, "head", used_weapon = "Point blank shot in the mouth with \a [in_chamber]", sharp=1) user.death() else - user << "Ow..." + to_chat(user, "Ow...") user.apply_effect(110,AGONY,0) qdel(in_chamber) mouthshoot = 0 diff --git a/code/modules/projectiles/guns/launcher/crossbow.dm b/code/modules/projectiles/guns/launcher/crossbow.dm index 8918b7d893..a8458b1676 100644 --- a/code/modules/projectiles/guns/launcher/crossbow.dm +++ b/code/modules/projectiles/guns/launcher/crossbow.dm @@ -162,7 +162,7 @@ else user << "[src] already has a cell installed." - else if(istype(W, /obj/item/weapon/screwdriver)) + else if(W.is_screwdriver()) if(cell) var/obj/item/C = cell C.loc = get_turf(user) @@ -227,7 +227,7 @@ else user << "You need at least three rods to complete this task." return - else if(istype(W,/obj/item/weapon/weldingtool)) + else if(istype(W, /obj/item/weapon/weldingtool)) if(buildstate == 1) var/obj/item/weapon/weldingtool/T = W if(T.remove_fuel(0,user)) @@ -237,7 +237,7 @@ buildstate++ update_icon() return - else if(istype(W,/obj/item/stack/cable_coil)) + else if(istype(W, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = W if(buildstate == 2) if(C.use(5)) @@ -265,7 +265,7 @@ else user << "You need at least three plastic sheets to complete this task." return - else if(istype(W,/obj/item/weapon/screwdriver)) + else if(W.is_screwdriver()) if(buildstate == 5) user << "You secure the crossbow's various parts." playsound(src, W.usesound, 50, 1) diff --git a/code/modules/projectiles/guns/magnetic/magnetic.dm b/code/modules/projectiles/guns/magnetic/magnetic.dm index a34db52887..2e8289fb8e 100644 --- a/code/modules/projectiles/guns/magnetic/magnetic.dm +++ b/code/modules/projectiles/guns/magnetic/magnetic.dm @@ -105,7 +105,7 @@ update_icon() return - if(isscrewdriver(thing)) + if(thing.is_screwdriver()) if(!capacitor) to_chat(user, "\The [src] has no capacitor installed.") return diff --git a/code/modules/projectiles/guns/magnetic/magnetic_construction.dm b/code/modules/projectiles/guns/magnetic/magnetic_construction.dm index 0c3647458b..e8d38169fd 100644 --- a/code/modules/projectiles/guns/magnetic/magnetic_construction.dm +++ b/code/modules/projectiles/guns/magnetic/magnetic_construction.dm @@ -66,7 +66,7 @@ increment_construction_stage() return - if(isscrewdriver(thing) && construction_stage >= 9) + if(thing.is_screwdriver() && construction_stage >= 9) user.visible_message("\The [user] secures \the [src] and finishes it off.") playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) var/obj/item/weapon/gun/magnetic/coilgun = new(loc) diff --git a/code/modules/projectiles/guns/modular_guns.dm b/code/modules/projectiles/guns/modular_guns.dm index 8f81e971c4..64b33347cd 100644 --- a/code/modules/projectiles/guns/modular_guns.dm +++ b/code/modules/projectiles/guns/modular_guns.dm @@ -50,12 +50,12 @@ FireModeModify() /obj/item/weapon/gun/energy/modular/attackby(obj/item/O, mob/user) - if(istype(O, /obj/item/weapon/screwdriver)) + if(O.is_screwdriver()) to_chat(user, "You [assembled ? "disassemble" : "assemble"] the gun.") assembled = !assembled playsound(src, O.usesound, 50, 1) return - if(istype(O, /obj/item/weapon/crowbar)) + if(O.is_crowbar()) if(assembled == 1) to_chat(user, "Disassemble the [src] first!") return @@ -130,11 +130,11 @@ /obj/item/weapon/gun/energy/modular/load_ammo(var/obj/item/C, mob/user) if(istype(C, cell_type)) if(self_recharge || battery_lock) - user << "[src] does not have a battery port." + to_chat(user, "[src] does not have a battery port.") return var/obj/item/weapon/cell/P = C if(power_supply) - user << "[src] already has a power cell." + to_chat(user, "[src] already has a power cell.") else user.visible_message("[user] is reloading [src].", "You start to insert [P] into [src].") if(do_after(user, 10)) diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index 9755f604ab..0cd8e69013 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -10,7 +10,7 @@ var/frequency = 1 hitscan = 1 embed_chance = 0 - invisibility = 101 //beam projectiles are invisible as they are rendered by the effect engine + invisibility = 99 //beam projectiles are invisible as they are rendered by the effect engine light_range = 2 light_power = 0.5 light_color = "#FF0D00" diff --git a/code/modules/random_map/drop/drop_types.dm b/code/modules/random_map/drop/drop_types.dm index 30b5f86027..f426fa5ebc 100644 --- a/code/modules/random_map/drop/drop_types.dm +++ b/code/modules/random_map/drop/drop_types.dm @@ -193,8 +193,8 @@ datum/supply_drop_loot/riot /obj/item/weapon/reagent_containers/food/snacks/tastybread, /obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/proteinshake, /obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/proteinshake, - /obj/item/weapon/crowbar, - /obj/item/weapon/crowbar, + /obj/item/weapon/tool/crowbar, + /obj/item/weapon/tool/crowbar, /obj/item/device/flashlight, /obj/item/device/flashlight, /obj/item/clothing/suit/storage/hazardvest, diff --git a/code/modules/random_map/noise/desert.dm b/code/modules/random_map/noise/desert.dm index 1c7ca229a4..c6799416a3 100644 --- a/code/modules/random_map/noise/desert.dm +++ b/code/modules/random_map/noise/desert.dm @@ -27,7 +27,7 @@ var/grass_path = pick(typesof(/obj/structure/flora/grass)-/obj/structure/flora/grass) new grass_path(T) if(prob(5)) - var/mob_type = pick(list(/mob/living/simple_animal/lizard, /mob/living/simple_animal/mouse)) + var/mob_type = pick(list(/mob/living/simple_mob/animal/passive/lizard, /mob/living/simple_animal/mouse)) new mob_type(T) if(5 to 6) if(prob(20)) diff --git a/code/modules/random_map/noise/tundra.dm b/code/modules/random_map/noise/tundra.dm index 83b7435e40..45234771ed 100644 --- a/code/modules/random_map/noise/tundra.dm +++ b/code/modules/random_map/noise/tundra.dm @@ -46,13 +46,13 @@ switch(val) if(2) if(prob(5)) - new /mob/living/simple_animal/crab(T) + new /mob/living/simple_mob/animal/passive/crab(T) if(6) if(prob(60)) var/grass_path = pick(typesof(/obj/structure/flora/grass)-/obj/structure/flora/grass) new grass_path(T) if(prob(5)) - var/mob_type = pick(list(/mob/living/simple_animal/lizard, /mob/living/simple_animal/mouse)) + var/mob_type = pick(list(/mob/living/simple_mob/animal/passive/lizard, /mob/living/simple_animal/mouse)) new mob_type(T) if(7) if(prob(60)) diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index c30869e135..d75d1439f7 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -50,24 +50,24 @@ if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food)) if(src.beaker) - user << "\A [beaker] is already loaded into the machine." + to_chat(user, "\A [beaker] is already loaded into the machine.") return src.beaker = B user.drop_item() B.loc = src - user << "You add \the [B] to the machine!" + to_chat(user, "You add \the [B] to the machine!") icon_state = "mixer1" else if(istype(B, /obj/item/weapon/storage/pill_bottle)) if(src.loaded_pill_bottle) - user << "A \the [loaded_pill_bottle] s already loaded into the machine." + to_chat(user, "A \the [loaded_pill_bottle] s already loaded into the machine.") return src.loaded_pill_bottle = B user.drop_item() B.loc = src - user << "You add \the [loaded_pill_bottle] into the dispenser slot!" + to_chat(user, "You add \the [loaded_pill_bottle] into the dispenser slot!") else if(default_unfasten_wrench(user, B, 20)) return @@ -346,7 +346,7 @@ return 0 if(holdingitems && holdingitems.len >= limit) - usr << "The machine cannot hold anymore items." + to_chat(user, "The machine cannot hold anymore items.") return 1 if(!istype(O)) @@ -365,13 +365,13 @@ break if(failed) - user << "Nothing in the plant bag is usable." + to_chat(user, "Nothing in the plant bag is usable.") return 1 if(!O.contents.len) - user << "You empty \the [O] into \the [src]." + to_chat(user, "You empty \the [O] into \the [src].") else - user << "You fill \the [src] from \the [O]." + to_chat(user, "You fill \the [src] from \the [O].") src.updateUsrDialog() return 0 @@ -379,16 +379,16 @@ if(istype(O,/obj/item/weapon/gripper)) var/obj/item/weapon/gripper/B = O //B, for Borg. if(!B.wrapped) - user << "\The [B] is not holding anything." + to_chat(user, "\The [B] is not holding anything.") return 0 else var/B_held = B.wrapped - user << "You use \the [B] to load \the [src] with \the [B_held]." + to_chat(user, "You use \the [B] to load \the [src] with \the [B_held].") return 0 if(!sheet_reagents[O.type] && (!O.reagents || !O.reagents.total_volume)) - user << "\The [O] is not suitable for blending." + to_chat(user, "\The [O] is not suitable for blending.") return 1 user.remove_from_mob(O) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm index 4c079ef2dc..2b92302196 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -65,7 +65,7 @@ reagent_state = LIQUID color = "#404030" - ingest_met = REM + ingest_met = REM * 2 var/nutriment_factor = 0 var/strength = 10 // This is, essentially, units between stages - the lower, the stronger. Less fine tuning, more clarity. @@ -98,20 +98,21 @@ M.adjustToxLoss(removed) //Sterilizing, if only by a little bit. Also already doubled above. M.add_chemical_effect(CE_ALCOHOL, 1) + var/effective_dose = dose * strength_mod * (1 + volume/60) //drinking a LOT will make you go down faster - if(dose * strength_mod >= strength) // Early warning + if(effective_dose >= strength) // Early warning M.make_dizzy(18) // It is decreased at the speed of 3 per tick - if(dose * strength_mod >= strength * 2) // Slurring + if(effective_dose >= strength * 2) // Slurring M.slurring = max(M.slurring, 90) - if(dose * strength_mod >= strength * 3) // Confusion - walking in random directions + if(effective_dose >= strength * 3) // Confusion - walking in random directions M.Confuse(60) - if(dose * strength_mod >= strength * 4) // Blurry vision + if(effective_dose >= strength * 4) // Blurry vision M.eye_blurry = max(M.eye_blurry, 30) - if(dose * strength_mod >= strength * 5) // Drowsyness - periodically falling asleep + if(effective_dose >= strength * 5) // Drowsyness - periodically falling asleep M.drowsyness = max(M.drowsyness, 60) - if(dose * strength_mod >= strength * 6) // Toxic dose + if(effective_dose >= strength * 6) // Toxic dose M.add_chemical_effect(CE_ALCOHOL_TOXIC, toxicity*3) - if(dose * strength_mod >= strength * 7) // Pass out + if(effective_dose >= strength * 7) // Pass out M.paralysis = max(M.paralysis, 60) M.sleeping = max(M.sleeping, 90) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 414fa58cd5..1925c0b027 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -315,10 +315,9 @@ if(alien == IS_SLIME) chem_effective = 0.75 M.stuttering = min(50, max(0, M.stuttering + 5)) //If you can't feel yourself, and your main mode of speech is resonation, there's a problem. - M.add_chemical_effect(CE_SLOWDOWN, 1) M.add_chemical_effect(CE_PAINKILLER, 200 * chem_effective) + M.add_chemical_effect(CE_SLOWDOWN, 1) M.eye_blurry = min(M.eye_blurry + 10, 250 * chem_effective) - M.Confuse(5) /datum/reagent/oxycodone/overdose(var/mob/living/carbon/M, var/alien) ..() diff --git a/code/modules/reagents/dispenser/dispenser2.dm b/code/modules/reagents/dispenser/dispenser2.dm index 5ba448c14d..726c66af42 100644 --- a/code/modules/reagents/dispenser/dispenser2.dm +++ b/code/modules/reagents/dispenser/dispenser2.dm @@ -26,32 +26,32 @@ /obj/machinery/chemical_dispenser/examine(mob/user) ..() - user << "It has [cartridges.len] cartridges installed, and has space for [DISPENSER_MAX_CARTRIDGES - cartridges.len] more." + to_chat(user, "It has [cartridges.len] cartridges installed, and has space for [DISPENSER_MAX_CARTRIDGES - cartridges.len] more.") /obj/machinery/chemical_dispenser/proc/add_cartridge(obj/item/weapon/reagent_containers/chem_disp_cartridge/C, mob/user) if(!istype(C)) if(user) - user << "\The [C] will not fit in \the [src]!" + to_chat(user, "\The [C] will not fit in \the [src]!") return if(cartridges.len >= DISPENSER_MAX_CARTRIDGES) if(user) - user << "\The [src] does not have any slots open for \the [C] to fit into!" + to_chat(user, "\The [src] does not have any slots open for \the [C] to fit into!") return if(!C.label) if(user) - user << "\The [C] does not have a label!" + to_chat(user, "\The [C] does not have a label!") return if(cartridges[C.label]) if(user) - user << "\The [src] already contains a cartridge with that label!" + to_chat(user, "\The [src] already contains a cartridge with that label!") return if(user) user.drop_from_inventory(C) - user << "You add \the [C] to \the [src]." + to_chat(user, "You add \the [C] to \the [src].") C.loc = src cartridges[C.label] = C @@ -64,9 +64,9 @@ nanomanager.update_uis(src) /obj/machinery/chemical_dispenser/attackby(obj/item/weapon/W, mob/user) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) playsound(src, W.usesound, 50, 1) - user << "You begin to [anchored ? "un" : ""]fasten \the [src]." + to_chat(user, "You begin to [anchored ? "un" : ""]fasten \the [src].") if (do_after(user, 20 * W.toolspeed)) user.visible_message( "\The [user] [anchored ? "un" : ""]fastens \the [src].", @@ -74,39 +74,39 @@ "You hear a ratchet.") anchored = !anchored else - user << "You decide not to [anchored ? "un" : ""]fasten \the [src]." + to_chat(user, "You decide not to [anchored ? "un" : ""]fasten \the [src].") else if(istype(W, /obj/item/weapon/reagent_containers/chem_disp_cartridge)) add_cartridge(W, user) - else if(istype(W, /obj/item/weapon/screwdriver)) + else if(W.is_screwdriver()) var/label = input(user, "Which cartridge would you like to remove?", "Chemical Dispenser") as null|anything in cartridges if(!label) return var/obj/item/weapon/reagent_containers/chem_disp_cartridge/C = remove_cartridge(label) if(C) - user << "You remove \the [C] from \the [src]." + to_chat(user, "You remove \the [C] from \the [src].") C.loc = loc playsound(src, W.usesound, 50, 1) else if(istype(W, /obj/item/weapon/reagent_containers/glass) || istype(W, /obj/item/weapon/reagent_containers/food)) if(container) - user << "There is already \a [container] on \the [src]!" + to_chat(user, "There is already \a [container] on \the [src]!") return var/obj/item/weapon/reagent_containers/RC = W if(!accept_drinking && istype(RC,/obj/item/weapon/reagent_containers/food)) - user << "This machine only accepts beakers!" + to_chat(user, "This machine only accepts beakers!") return if(!RC.is_open_container()) - user << "You don't see how \the [src] could dispense reagents into \the [RC]." + to_chat(user, "You don't see how \the [src] could dispense reagents into \the [RC].") return container = RC user.drop_from_inventory(RC) RC.loc = src - user << "You set \the [RC] on \the [src]." + to_chat(user, "You set \the [RC] on \the [src].") nanomanager.update_uis(src) // update all UIs attached to src else diff --git a/code/modules/reagents/dispenser/supply.dm b/code/modules/reagents/dispenser/supply.dm index e183da7f79..e6488d9d7e 100644 --- a/code/modules/reagents/dispenser/supply.dm +++ b/code/modules/reagents/dispenser/supply.dm @@ -1,4 +1,4 @@ -/datum/supply_packs/chemistry_dispenser +/datum/supply_pack/chemistry_dispenser name = "Reagent dispenser" contains = list( /obj/machinery/chemical_dispenser{anchored = 0} @@ -8,7 +8,7 @@ containername = "reagent dispenser crate" group = "Reagents" -/datum/supply_packs/beer_dispenser +/datum/supply_pack/beer_dispenser name = "Booze dispenser" contains = list( /obj/machinery/chemical_dispenser/bar_alc{anchored = 0} @@ -18,7 +18,7 @@ containername = "booze dispenser crate" group = "Reagents" -/datum/supply_packs/soda_dispenser +/datum/supply_pack/soda_dispenser name = "Soda dispenser" contains = list( /obj/machinery/chemical_dispenser/bar_soft{anchored = 0} @@ -28,7 +28,7 @@ containername = "soda dispenser crate" group = "Reagents" -/datum/supply_packs/reagents +/datum/supply_pack/reagents name = "Chemistry dispenser refill" contains = list( /obj/item/weapon/reagent_containers/chem_disp_cartridge/hydrogen, @@ -60,7 +60,7 @@ access = list(access_chemistry) group = "Reagents" -/datum/supply_packs/alcohol_reagents +/datum/supply_pack/alcohol_reagents name = "Bar alcoholic dispenser refill" contains = list( /obj/item/weapon/reagent_containers/chem_disp_cartridge/beer, @@ -83,7 +83,7 @@ access = list(access_bar) group = "Reagents" -/datum/supply_packs/softdrink_reagents +/datum/supply_pack/softdrink_reagents name = "Bar soft drink dispenser refill" contains = list( /obj/item/weapon/reagent_containers/chem_disp_cartridge/water, @@ -110,7 +110,7 @@ containername = "soft drinks crate" group = "Reagents" -/datum/supply_packs/coffee_reagents +/datum/supply_pack/coffee_reagents name = "Coffee machine dispenser refill" contains = list( /obj/item/weapon/reagent_containers/chem_disp_cartridge/coffee, @@ -127,7 +127,7 @@ containername = "coffee drinks crate" group = "Reagents" -/datum/supply_packs/dispenser_cartridges +/datum/supply_pack/dispenser_cartridges name = "Empty dispenser cartridges" contains = list( /obj/item/weapon/reagent_containers/chem_disp_cartridge, @@ -147,7 +147,7 @@ group = "Reagents" #define SEC_PACK(_tname, _type, _name, _cname, _cost, _access)\ - datum/supply_packs/dispenser_cartridges{\ + datum/supply_pack/dispenser_cartridges{\ _tname {\ name = _name ;\ containername = _cname ;\ @@ -159,7 +159,7 @@ }\ } #define PACK(_tname, _type, _name, _cname, _cost)\ - datum/supply_packs/dispenser_cartridges{\ + datum/supply_pack/dispenser_cartridges{\ _tname {\ name = _name ;\ containername = _cname ;\ diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 316311c794..5aefbc96d3 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -252,7 +252,7 @@ flags = OPENCONTAINER unacidable = 0 -/obj/item/weapon/reagent_containers/glass/bucket/attackby(var/obj/D, mob/user as mob) +/obj/item/weapon/reagent_containers/glass/bucket/attackby(var/obj/item/D, mob/user as mob) if(isprox(D)) user << "You add [D] to [src]." qdel(D) @@ -260,7 +260,7 @@ user.drop_from_inventory(src) qdel(src) return - else if(istype(D, /obj/item/weapon/wirecutters)) + else if(D.is_wirecutter()) to_chat(user, "You cut a big hole in \the [src] with \the [D]. It's kinda useless as a bucket now.") user.put_in_hands(new /obj/item/clothing/head/helmet/bucket) user.drop_from_inventory(src) diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 494659fb1e..d40fc51610 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -27,12 +27,12 @@ /obj/structure/reagent_dispensers/examine(mob/user) if(!..(user, 2)) return - user << "It contains:" + to_chat(user, "It contains:") if(reagents && reagents.reagent_list.len) for(var/datum/reagent/R in reagents.reagent_list) - user << "[R.volume] units of [R.name]" + to_chat(user, "[R.volume] units of [R.name]") else - user << "Nothing." + to_chat(user, "Nothing.") /obj/structure/reagent_dispensers/verb/set_APTFT() //set amount_per_transfer_from_this set name = "Set transfer amount" @@ -103,9 +103,9 @@ if(!..(user, 2)) return if (modded) - user << "Fuel faucet is wrenched open, leaking the fuel!" + to_chat(user, "Fuel faucet is wrenched open, leaking the fuel!") if(rig) - user << "There is some kind of device rigged to the tank." + to_chat(user, "There is some kind of device rigged to the tank.") /obj/structure/reagent_dispensers/fueltank/attack_hand() if (rig) @@ -118,7 +118,7 @@ /obj/structure/reagent_dispensers/fueltank/attackby(obj/item/weapon/W as obj, mob/user as mob) src.add_fingerprint(user) - if (istype(W,/obj/item/weapon/wrench)) + if (W.is_wrench()) user.visible_message("[user] wrenches [src]'s faucet [modded ? "closed" : "open"].", \ "You wrench [src]'s faucet [modded ? "closed" : "open"]") modded = modded ? 0 : 1 @@ -129,7 +129,7 @@ leak_fuel(amount_per_transfer_from_this) if (istype(W,/obj/item/device/assembly_holder)) if (rig) - user << "There is another device in the way." + to_chat(user, "There is another device in the way.") return ..() user.visible_message("[user] begins rigging [W] to \the [src].", "You begin rigging [W] to \the [src]") if(do_after(user, 20)) @@ -236,15 +236,15 @@ /obj/structure/reagent_dispensers/water_cooler/examine(mob/user) ..() if(cupholder) - user << "There are [cups] cups in the cup dispenser." + to_chat(user, "There are [cups] cups in the cup dispenser.") /obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/I as obj, mob/user as mob) - if(istype(I, /obj/item/weapon/wrench)) + if(I.is_wrench()) src.add_fingerprint(user) if(bottle) playsound(loc, I.usesound, 50, 1) if(do_after(user, 20) && bottle) - user << "You unfasten the jug." + to_chat(user, "You unfasten the jug.") var/obj/item/weapon/reagent_containers/glass/cooler_bottle/G = new /obj/item/weapon/reagent_containers/glass/cooler_bottle( src.loc ) for(var/datum/reagent/R in reagents.reagent_list) var/total_reagent = reagents.get_reagent_amount(R.id) @@ -259,15 +259,15 @@ user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.") if(do_after(user, 20 * I.toolspeed, src)) if(!src) return - user << "You [anchored? "un" : ""]secured \the [src]!" + to_chat(user, "You [anchored? "un" : ""]secured \the [src]!") anchored = !anchored playsound(loc, I.usesound, 50, 1) return - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) if(cupholder) playsound(loc, I.usesound, 50, 1) - user << "You take the cup dispenser off." + to_chat(user, "You take the cup dispenser off.") new /obj/item/stack/material/plastic( src.loc ) if(cups) for(var/i = 0 to cups) @@ -278,9 +278,9 @@ return if(!bottle && !cupholder) playsound(loc, I.usesound, 50, 1) - user << "You start taking the water-cooler apart." + to_chat(user, "You start taking the water-cooler apart.") if(do_after(user, 20 * I.toolspeed) && !bottle && !cupholder) - user << "You take the water-cooler apart." + to_chat(user, "You take the water-cooler apart.") new /obj/item/stack/material/plastic( src.loc, 4 ) qdel(src) return @@ -290,19 +290,19 @@ if(!bottle) if(anchored) var/obj/item/weapon/reagent_containers/glass/cooler_bottle/G = I - user << "You start to screw the bottle onto the water-cooler." + to_chat(user, "You start to screw the bottle onto the water-cooler.") if(do_after(user, 20) && !bottle && anchored) bottle = 1 update_icon() - user << "You screw the bottle onto the water-cooler!" + to_chat(user, "You screw the bottle onto the water-cooler!") for(var/datum/reagent/R in G.reagents.reagent_list) var/total_reagent = G.reagents.get_reagent_amount(R.id) reagents.add_reagent(R.id, total_reagent) qdel(G) else - user << "You need to wrench down the cooler first." + to_chat(user, "You need to wrench down the cooler first.") else - user << "There is already a bottle there!" + to_chat(user, "There is already a bottle there!") return 1 if(istype(I, /obj/item/stack/material/plastic)) @@ -310,17 +310,17 @@ if(anchored) var/obj/item/stack/material/plastic/P = I src.add_fingerprint(user) - user << "You start to attach a cup dispenser onto the water-cooler." + to_chat(user, "You start to attach a cup dispenser onto the water-cooler.") playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) if(do_after(user, 20) && !cupholder && anchored) if (P.use(1)) - user << "You attach a cup dispenser onto the water-cooler." + to_chat(user, "You attach a cup dispenser onto the water-cooler.") cupholder = 1 update_icon() else - user << "You need to wrench down the cooler first." + to_chat(user, "You need to wrench down the cooler first.") else - user << "There is already a cup dispenser there!" + to_chat(user, "There is already a cup dispenser there!") return /obj/structure/reagent_dispensers/water_cooler/attack_hand(mob/user) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index d1be4f08da..d70e6e563d 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -100,7 +100,7 @@ if(panel_open) var/input = sanitize(input(usr, "What id would you like to give this conveyor?", "Multitool-Conveyor interface", id)) if(!input) - usr << "No input found please hang up and try your call again." + to_chat(user, "No input found. Please hang up and try your call again.") return id = input for(var/obj/machinery/conveyor_switch/C in machines) @@ -220,7 +220,7 @@ // attack with hand, switch position /obj/machinery/conveyor_switch/attack_hand(mob/user) if(!allowed(user)) - user << "Access denied." + to_chat(user, "Access denied.") return if(position == 0) @@ -251,12 +251,12 @@ if(panel_open) var/obj/item/weapon/weldingtool/WT = I if(!WT.remove_fuel(0, user)) - user << "The welding tool must be on to complete this task." + to_chat(user, "The welding tool must be on to complete this task.") return playsound(src, WT.usesound, 50, 1) if(do_after(user, 20 * WT.toolspeed)) if(!src || !WT.isOn()) return - user << "You deconstruct the frame." + to_chat(user, "You deconstruct the frame.") new /obj/item/stack/material/steel( src.loc, 2 ) qdel(src) return @@ -265,7 +265,7 @@ if(panel_open) var/input = sanitize(input(usr, "What id would you like to give this conveyor switch?", "Multitool-Conveyor interface", id)) if(!input) - usr << "No input found please hang up and try your call again." + to_chat(user, "No input found. Please hang up and try your call again.") return id = input conveyors = list() // Clear list so they aren't double added. diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 597033a6e6..8034b776b4 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -112,7 +112,7 @@ return if(anchored) - usr << "You must unfasten the pipe before rotating it." + to_chat(usr, "You must unfasten the pipe before rotating it.") return set_dir(turn(dir, -90)) @@ -126,7 +126,7 @@ return if(anchored) - usr << "You must unfasten the pipe before flipping it." + to_chat(usr, "You must unfasten the pipe before flipping it.") return set_dir(turn(dir, 180)) @@ -223,12 +223,12 @@ var/turf/T = src.loc if(!T.is_plating()) - user << "You can only attach the [nicetype] if the floor plating is removed." + to_chat(user, "You can only attach the [nicetype] if the floor plating is removed.") return var/obj/structure/disposalpipe/CP = locate() in T - if(istype(I, /obj/item/weapon/wrench)) + if(I.is_wrench()) if(anchored) anchored = 0 if(ispipe) @@ -236,15 +236,15 @@ density = 0 else density = 1 - user << "You detach the [nicetype] from the underfloor." + to_chat(user, "You detach the [nicetype] from the underfloor.") else if(ptype>=6 && ptype <= 8) // Disposal or outlet if(CP) // There's something there if(!istype(CP,/obj/structure/disposalpipe/trunk)) - user << "The [nicetype] requires a trunk underneath it in order to work." + to_chat(user, "The [nicetype] requires a trunk underneath it in order to work.") return else // Nothing under, fuck. - user << "The [nicetype] requires a trunk underneath it in order to work." + to_chat(user, "The [nicetype] requires a trunk underneath it in order to work.") return else if(CP) @@ -253,7 +253,7 @@ if(istype(CP, /obj/structure/disposalpipe/broken)) pdir = CP.dir if(pdir & dpdir) - user << "There is already a [nicetype] at that location." + to_chat(user, "There is already a [nicetype] at that location.") return anchored = 1 @@ -262,7 +262,7 @@ density = 0 else density = 1 // We don't want disposal bins or outlets to go density 0 - user << "You attach the [nicetype] to the underfloor." + to_chat(user, "You attach the [nicetype] to the underfloor.") playsound(loc, I.usesound, 100, 1) update() @@ -271,10 +271,10 @@ var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) playsound(src, W.usesound, 100, 1) - user << "Welding the [nicetype] in place." + to_chat(user, "Welding the [nicetype] in place.") if(do_after(user, 20 * W.toolspeed)) if(!src || !W.isOn()) return - user << "The [nicetype] has been welded in place!" + to_chat(user, "The [nicetype] has been welded in place!") update() // TODO: Make this neat if(ispipe) // Pipe @@ -316,10 +316,10 @@ qdel(src) return else - user << "You need more welding fuel to complete this task." + to_chat(user, "You need more welding fuel to complete this task.") return else - user << "You need to attach it to the plating first!" + to_chat(user, "You need to attach it to the plating first!") return /obj/structure/disposalconstruct/hides_under_flooring() diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index a9b0b213ed..10157157fa 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -55,32 +55,32 @@ src.add_fingerprint(user) if(mode<=0) // It's off - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) if(contents.len > 0) - user << "Eject the items first!" + to_chat(user, "Eject the items first!") return if(mode==0) // It's off but still not unscrewed mode=-1 // Set it to doubleoff l0l playsound(src, I.usesound, 50, 1) - user << "You remove the screws around the power connection." + to_chat(user, "You remove the screws around the power connection.") return else if(mode==-1) mode=0 playsound(src, I.usesound, 50, 1) - user << "You attach the screws around the power connection." + to_chat(user, "You attach the screws around the power connection.") return - else if(istype(I,/obj/item/weapon/weldingtool) && mode==-1) + else if(istype(I, /obj/item/weapon/weldingtool) && mode==-1) if(contents.len > 0) - user << "Eject the items first!" + to_chat(user, "Eject the items first!") return var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) playsound(src, W.usesound, 100, 1) - user << "You start slicing the floorweld off the disposal unit." + to_chat(user, "You start slicing the floorweld off the disposal unit.") if(do_after(user,20 * W.toolspeed)) if(!src || !W.isOn()) return - user << "You sliced the floorweld off the disposal unit." + to_chat(user, "You sliced the floorweld off the disposal unit.") var/obj/structure/disposalconstruct/C = new (src.loc) src.transfer_fingerprints_to(C) C.ptype = 6 // 6 = disposal unit @@ -90,16 +90,16 @@ qdel(src) return else - user << "You need more welding fuel to complete this task." + to_chat(user, "You need more welding fuel to complete this task.") return if(istype(I, /obj/item/weapon/melee/energy/blade)) - user << "You can't place that item inside the disposal unit." + to_chat(user, "You can't place that item inside the disposal unit.") return if(istype(I, /obj/item/weapon/storage/bag/trash)) var/obj/item/weapon/storage/bag/trash/T = I - user << "You empty the bag." + to_chat(user, "You empty the bag.") for(var/obj/item/O in T.contents) T.remove_from_storage(O,src) T.update_icon() @@ -143,7 +143,7 @@ if(I) I.forceMove(src) - user << "You place \the [I] into the [src]." + to_chat(user, "You place \the [I] into the [src].") for(var/mob/M in viewers(src)) if(M == user) continue @@ -179,10 +179,10 @@ if(target == user && !user.stat && !user.weakened && !user.stunned && !user.paralysis) // if drop self, then climbed in // must be awake, not stunned or whatever msg = "[user.name] climbs into the [src]." - user << "You climb into the [src]." + to_chat(user, "You climb into the [src].") else if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis) msg = "[user.name] stuffs [target.name] into the [src]!" - user << "You stuff [target.name] into the [src]!" + to_chat(user, "You stuff [target.name] into the [src]!") add_attack_logs(user,target,"Disposals dunked") else @@ -230,7 +230,7 @@ return if(user && user.loc == src) - usr << "You cannot reach the controls from inside." + to_chat(user, "You cannot reach the controls from inside.") return // Clumsy folks can only flush it. @@ -279,11 +279,11 @@ /obj/machinery/disposal/Topic(href, href_list) if(usr.loc == src) - usr << "You cannot reach the controls from inside." + to_chat(usr, "You cannot reach the controls from inside.") return if(mode==-1 && !href_list["eject"]) // only allow ejecting if mode is -1 - usr << "The disposal units power is disabled." + to_chat(usr, "The disposal units power is disabled.") return if(..()) return @@ -636,7 +636,7 @@ if (src.loc) for (var/mob/M in hearers(src.loc.loc)) - M << "CLONG, clong!" + to_chat(M, "CLONG, clong!") playsound(src.loc, 'sound/effects/clang.ogg', 50, 0, 0) @@ -885,15 +885,15 @@ // check if anything changed over 2 seconds var/turf/uloc = user.loc var/atom/wloc = W.loc - user << "Slicing the disposal pipe." + to_chat(user, "Slicing the disposal pipe.") sleep(30) if(!W.isOn()) return if(user.loc == uloc && wloc == W.loc) welded() else - user << "You must stay still while welding the pipe." + to_chat(user, "You must stay still while welding the pipe.") else - user << "You need more welding fuel to cut the pipe." + to_chat(user, "You need more welding fuel to cut the pipe.") return // called when pipe is cut with welder @@ -1169,7 +1169,7 @@ if(O.currTag)// Tag set sort_tag = O.currTag playsound(src.loc, 'sound/machines/twobeep.ogg', 100, 1) - user << "Changed tag to '[sort_tag]'." + to_chat(user, "Changed tag to '[sort_tag]'.") updatename() updatedesc() @@ -1237,7 +1237,7 @@ if(O.currTag)// Tag set sortType = O.currTag playsound(src.loc, 'sound/machines/twobeep.ogg', 100, 1) - user << "Changed filter to '[sortType]'." + to_chat(user, "Changed filter to '[sortType]'.") updatename() updatedesc() @@ -1365,15 +1365,15 @@ // check if anything changed over 2 seconds var/turf/uloc = user.loc var/atom/wloc = W.loc - user << "Slicing the disposal pipe." + to_chat(user, "Slicing the disposal pipe.") sleep(30) if(!W.isOn()) return if(user.loc == uloc && wloc == W.loc) welded() else - user << "You must stay still while welding the pipe." + to_chat(user, "You must stay still while welding the pipe.") else - user << "You need more welding fuel to cut the pipe." + to_chat(user, "You need more welding fuel to cut the pipe.") return // would transfer to next pipe segment, but we are in a trunk @@ -1475,25 +1475,25 @@ if(!I || !user) return src.add_fingerprint(user) - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) if(mode==0) mode=1 - user << "You remove the screws around the power connection." + to_chat(user, "You remove the screws around the power connection.") playsound(src, I.usesound, 50, 1) return else if(mode==1) mode=0 - user << "You attach the screws around the power connection." + to_chat(user, "You attach the screws around the power connection.") playsound(src, I.usesound, 50, 1) return - else if(istype(I,/obj/item/weapon/weldingtool) && mode==1) + else if(istype(I, /obj/item/weapon/weldingtool) && mode==1) var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) playsound(src, W.usesound, 100, 1) - user << "You start slicing the floorweld off the disposal outlet." + to_chat(user, "You start slicing the floorweld off the disposal outlet.") if(do_after(user,20 * W.toolspeed)) if(!src || !W.isOn()) return - user << "You sliced the floorweld off the disposal outlet." + to_chat(user, "You sliced the floorweld off the disposal outlet.") var/obj/structure/disposalconstruct/C = new (src.loc) src.transfer_fingerprints_to(C) C.ptype = 7 // 7 = outlet @@ -1503,7 +1503,7 @@ qdel(src) return else - user << "You need more welding fuel to complete this task." + to_chat(user, "You need more welding fuel to complete this task.") return // called when movable is expelled from a disposal pipe or outlet diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index b2cbcb9b3e..64f5b923ab 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -26,7 +26,7 @@ var/obj/item/device/destTagger/O = W if(O.currTag) if(src.sortTag != O.currTag) - user << "You have labeled the destination as [O.currTag]." + to_chat(user, "You have labeled the destination as [O.currTag].") if(!src.sortTag) src.sortTag = O.currTag update_icon() @@ -34,16 +34,16 @@ src.sortTag = O.currTag playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1) else - user << "The package is already labeled for [O.currTag]." + to_chat(user, "The package is already labeled for [O.currTag].") else - user << "You need to set a destination first!" + to_chat(user, "You need to set a destination first!") else if(istype(W, /obj/item/weapon/pen)) switch(alert("What would you like to alter?",,"Title","Description", "Cancel")) if("Title") var/str = sanitizeSafe(input(usr,"Label text?","Set label",""), MAX_NAME_LEN) if(!str || !length(str)) - usr << " Invalid text." + to_chat(user, " Invalid text.") return user.visible_message("\The [user] titles \the [src] with \a [W], marking down: \"[str]\"",\ "You title \the [src]: \"[str]\"",\ @@ -57,7 +57,7 @@ if("Description") var/str = sanitize(input(usr,"Label text?","Set label","")) if(!str || !length(str)) - usr << "Invalid text." + to_chat(user, "Invalid text.") return if(!examtext && !nameset) examtext = str @@ -101,9 +101,9 @@ examine(mob/user) if(..(user, 4)) if(sortTag) - user << "It is labeled \"[sortTag]\"" + to_chat(user, "It is labeled \"[sortTag]\"") if(examtext) - user << "It has a note attached which reads, \"[examtext]\"" + to_chat(user, "It has a note attached which reads, \"[examtext]\"") return /obj/item/smallDelivery @@ -133,7 +133,7 @@ var/obj/item/device/destTagger/O = W if(O.currTag) if(src.sortTag != O.currTag) - user << "You have labeled the destination as [O.currTag]." + to_chat(user, "You have labeled the destination as [O.currTag].") if(!src.sortTag) src.sortTag = O.currTag update_icon() @@ -141,16 +141,16 @@ src.sortTag = O.currTag playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1) else - user << "The package is already labeled for [O.currTag]." + to_chat(user, "The package is already labeled for [O.currTag].") else - user << "You need to set a destination first!" + to_chat(user, "You need to set a destination first!") else if(istype(W, /obj/item/weapon/pen)) switch(alert("What would you like to alter?",,"Title","Description", "Cancel")) if("Title") var/str = sanitizeSafe(input(usr,"Label text?","Set label",""), MAX_NAME_LEN) if(!str || !length(str)) - usr << " Invalid text." + to_chat(user, " Invalid text.") return user.visible_message("\The [user] titles \the [src] with \a [W], marking down: \"[str]\"",\ "You title \the [src]: \"[str]\"",\ @@ -165,7 +165,7 @@ if("Description") var/str = sanitize(input(usr,"Label text?","Set label","")) if(!str || !length(str)) - usr << "Invalid text." + to_chat(user, "Invalid text.") return if(!examtext && !nameset) examtext = str @@ -205,9 +205,9 @@ examine(mob/user) if(..(user, 4)) if(sortTag) - user << "It is labeled \"[sortTag]\"" + to_chat(user, "It is labeled \"[sortTag]\"") if(examtext) - user << "It has a note attached which reads, \"[examtext]\"" + to_chat(user, "It has a note attached which reads, \"[examtext]\"") return /obj/item/weapon/packageWrap @@ -278,7 +278,7 @@ "You wrap \the [target], leaving [amount] units of paper on \the [src].",\ "You hear someone taping paper around a large object.") else if(src.amount < 3) - user << "You need more paper." + to_chat(user, "You need more paper.") else if (istype (target, /obj/structure/closet)) var/obj/structure/closet/O = target if (src.amount > 3 && !O.opened) @@ -291,9 +291,9 @@ "You wrap \the [target], leaving [amount] units of paper on \the [src].",\ "You hear someone taping paper around a large object.") else if(src.amount < 3) - user << "You need more paper." + to_chat(user, "You need more paper.") else - user << "The object you are trying to wrap is unsuitable for the sorting machinery!" + to_chat(user, "The object you are trying to wrap is unsuitable for the sorting machinery!") if (src.amount <= 0) new /obj/item/weapon/c_tube( src.loc ) qdel(src) @@ -302,7 +302,7 @@ examine(mob/user) if(..(user, 0)) - user << "There are [amount] units of package wrap left!" + to_chat(user, "There are [amount] units of package wrap left!") return @@ -421,25 +421,25 @@ if(!I || !user) return - if(istype(I, /obj/item/weapon/screwdriver)) + if(I.is_screwdriver()) if(c_mode==0) c_mode=1 playsound(src.loc, I.usesound, 50, 1) - user << "You remove the screws around the power connection." + to_chat(user, "You remove the screws around the power connection.") return else if(c_mode==1) c_mode=0 playsound(src.loc, I.usesound, 50, 1) - user << "You attach the screws around the power connection." + to_chat(user, "You attach the screws around the power connection.") return - else if(istype(I,/obj/item/weapon/weldingtool) && c_mode==1) + else if(istype(I, /obj/item/weapon/weldingtool) && c_mode==1) var/obj/item/weapon/weldingtool/W = I if(W.remove_fuel(0,user)) playsound(src.loc, W.usesound, 50, 1) - user << "You start slicing the floorweld off the delivery chute." + to_chat(user, "You start slicing the floorweld off the delivery chute.") if(do_after(user,20 * W.toolspeed)) if(!src || !W.isOn()) return - user << "You sliced the floorweld off the delivery chute." + to_chat(user, "You sliced the floorweld off the delivery chute.") var/obj/structure/disposalconstruct/C = new (src.loc) C.ptype = 8 // 8 = Delivery chute C.update() @@ -448,7 +448,7 @@ qdel(src) return else - user << "You need more welding fuel to complete this task." + to_chat(user, "You need more welding fuel to complete this task.") return /obj/machinery/disposal/deliveryChute/Destroy() diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index dae6575577..850df76645 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -99,7 +99,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). /obj/machinery/r_n_d/circuit_imprinter/attackby(var/obj/item/O as obj, var/mob/user as mob) if(busy) - user << "\The [src] is busy. Please wait for completion of previous operation." + to_chat(user, "\The [src] is busy. Please wait for completion of previous operation.") return 1 if(default_deconstruction_screwdriver(user, O)) if(linked_console) @@ -113,26 +113,26 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). if(istype(O, /obj/item/weapon/gripper/no_use/loader)) return 0 //Sheet loaders weren't finishing attack(), this prevents the message "You can't stuff that gripper into this" without preventing the rest of the attack sequence from finishing if(panel_open) - user << "You can't load \the [src] while it's opened." + to_chat(user, "You can't load \the [src] while it's opened.") return 1 if(!linked_console) - user << "\The [src] must be linked to an R&D console first." + to_chat(user, "\The [src] must be linked to an R&D console first.") return 1 if(O.is_open_container()) return 0 if(!istype(O, /obj/item/stack/material)) //Previously checked for specific material sheets, for some reason? Made the check on 133 redundant. - user << "You cannot insert this item into \the [src]." + to_chat(user, "You cannot insert this item into \the [src].") return 1 if(stat) return 1 if(TotalMaterials() + SHEET_MATERIAL_AMOUNT > max_material_storage) - user << "\The [src]'s material bin is full. Please remove material before adding more." + to_chat(user, "\The [src]'s material bin is full. Please remove material before adding more.") return 1 var/obj/item/stack/material/S = O if(!(S.material.name in materials)) - user << "The [src] doesn't accept [S.material]!" + to_chat(user, "The [src] doesn't accept [S.material]!") return busy = 1 @@ -152,9 +152,9 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). materials[S.material.name] += amnt S.use(1) count++ - user << "You insert [count] [sname] into the fabricator." + to_chat(user, "You insert [count] [sname] into the fabricator.") else - user << "The fabricator cannot hold more [sname]." + to_chat(user, "The fabricator cannot hold more [sname].") busy = 0 updateUsrDialog() diff --git a/code/modules/research/designs/circuits.dm b/code/modules/research/designs/circuits.dm index e00a47786d..6c79366e66 100644 --- a/code/modules/research/designs/circuits.dm +++ b/code/modules/research/designs/circuits.dm @@ -364,14 +364,14 @@ CIRCUITS BELOW /datum/design/circuit/ordercomp name = "supply ordering console" id = "ordercomp" - build_path = /obj/item/weapon/circuitboard/ordercomp + build_path = /obj/item/weapon/circuitboard/supplycomp sort_string = "KAAAY" // Duplicate string, really need to redo this whole thing /datum/design/circuit/supplycomp name = "supply control console" id = "supplycomp" req_tech = list(TECH_DATA = 3) - build_path = /obj/item/weapon/circuitboard/supplycomp + build_path = /obj/item/weapon/circuitboard/supplycomp/control sort_string = "KAAAZ" // Duplicate string, really need to redo this whole thing /datum/design/circuit/biogenerator diff --git a/code/modules/research/designs/misc.dm b/code/modules/research/designs/misc.dm index ab420d142f..29231a7cd9 100644 --- a/code/modules/research/designs/misc.dm +++ b/code/modules/research/designs/misc.dm @@ -139,7 +139,7 @@ datum/design/item/laserpointer id = "handdrill" req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 2) materials = list(DEFAULT_WALL_MATERIAL = 300, "silver" = 100) - build_path = /obj/item/weapon/screwdriver/power + build_path = /obj/item/weapon/tool/screwdriver/power sort_string = "VASDA" /datum/design/item/jaws_life @@ -148,7 +148,7 @@ datum/design/item/laserpointer id = "jawslife" req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 2) materials = list(DEFAULT_WALL_MATERIAL = 300, "silver" = 100) - build_path = /obj/item/weapon/crowbar/power + build_path = /obj/item/weapon/tool/crowbar/power sort_string = "VASEA" /datum/design/item/device/t_scanner_upg diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index b90937343c..1e1d54f9bc 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -91,7 +91,7 @@ /obj/machinery/r_n_d/protolathe/attackby(var/obj/item/O as obj, var/mob/user as mob) if(busy) - user << "\The [src] is busy. Please wait for completion of previous operation." + to_chat(user, "\The [src] is busy. Please wait for completion of previous operation.") return 1 if(default_deconstruction_screwdriver(user, O)) if(linked_console) @@ -107,20 +107,20 @@ if(istype(O, /obj/item/weapon/gripper/no_use/loader)) return 0 //Sheet loaders weren't finishing attack(), this prevents the message "You can't stuff that gripper into this" without preventing the rest of the attack sequence from finishing if(panel_open) - user << "You can't load \the [src] while it's opened." + to_chat(user, "You can't load \the [src] while it's opened.") return 1 if(!linked_console) - user << "\The [src] must be linked to an R&D console first!" + to_chat(user, "\The [src] must be linked to an R&D console first!") return 1 if(!istype(O, /obj/item/stack/material)) - user << "You cannot insert this item into \the [src]!" + to_chat(user, "You cannot insert this item into \the [src]!") return 1 if(stat) return 1 var/obj/item/stack/material/S = O if(!(S.material.name in materials)) - user << "The [src] doesn't accept [S.material]!" + to_chat(user, "The [src] doesn't accept [S.material]!") return busy = 1 @@ -140,9 +140,9 @@ materials[S.material.name] += amnt S.use(1) count++ - user << "You insert [count] [sname] into the fabricator." + to_chat(user, "You insert [count] [sname] into the fabricator.") else - user << "The fabricator cannot hold more [sname]." + to_chat(user, "The fabricator cannot hold more [sname].") busy = 0 var/stacktype = S.type diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm index 4d5eeb7905..7696c92a51 100644 --- a/code/modules/security levels/keycard authentication.dm +++ b/code/modules/security levels/keycard authentication.dm @@ -27,7 +27,7 @@ /obj/machinery/keycard_auth/attackby(obj/item/weapon/W as obj, mob/user as mob) if(stat & (NOPOWER|BROKEN)) - user << "This device is not powered." + to_chat(user, "This device is not powered.") return if(istype(W,/obj/item/weapon/card/id)) var/obj/item/weapon/card/id/ID = W @@ -41,11 +41,11 @@ event_triggered_by = usr broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices - if(istype(W, /obj/item/weapon/screwdriver)) - user << "You begin removing the faceplate from the [src]" + if(W.is_screwdriver()) + to_chat(user, "You begin removing the faceplate from the [src]") playsound(src, W.usesound, 50, 1) if(do_after(user, 10 * W.toolspeed)) - user << "You remove the faceplate from the [src]" + to_chat(user, "You remove the faceplate from the [src]") var/obj/structure/frame/A = new /obj/structure/frame(loc) var/obj/item/weapon/circuitboard/M = new circuit(A) A.frame_type = M.board_type @@ -70,12 +70,12 @@ /obj/machinery/keycard_auth/attack_hand(mob/user as mob) if(user.stat || stat & (NOPOWER|BROKEN)) - user << "This device is not powered." + to_chat(user, "This device is not powered.") return if(!user.IsAdvancedToolUser()) return 0 if(busy) - user << "This device is busy." + to_chat(user, "This device is busy.") return user.set_machine(src) @@ -105,10 +105,10 @@ /obj/machinery/keycard_auth/Topic(href, href_list) ..() if(busy) - usr << "This device is busy." + to_chat(usr, "This device is busy.") return if(usr.stat || stat & (BROKEN|NOPOWER)) - usr << "This device is without power." + to_chat(usr, "This device is without power.") return if(href_list["triggerevent"]) event = href_list["triggerevent"] @@ -174,7 +174,7 @@ feedback_inc("alert_keycard_auth_maintRevoke",1) if("Emergency Response Team") if(is_ert_blocked()) - usr << "All emergency response teams are dispatched and can not be called at this time." + to_chat(usr, "All emergency response teams are dispatched and can not be called at this time.") return trigger_armed_response_team(1) diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm index b67e6f70a2..1798ebd67f 100644 --- a/code/modules/shieldgen/emergency_shield.dm +++ b/code/modules/shieldgen/emergency_shield.dm @@ -254,10 +254,10 @@ /obj/machinery/shieldgen/attack_hand(mob/user as mob) if(locked) - user << "The machine is locked, you are unable to use it." + to_chat(user, "The machine is locked, you are unable to use it.") return if(is_open) - user << "The panel must be closed before operating this machine." + to_chat(user, "The panel must be closed before operating this machine.") return if (src.active) @@ -272,7 +272,7 @@ "You hear heavy droning.") src.shields_up() else - user << "The device must first be secured to the floor." + to_chat(user, "The device must first be secured to the floor.") return /obj/machinery/shieldgen/emag_act(var/remaining_charges, var/mob/user) @@ -282,50 +282,50 @@ return 1 /obj/machinery/shieldgen/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) playsound(src, W.usesound, 100, 1) if(is_open) - user << "You close the panel." + to_chat(user, "You close the panel.") is_open = 0 else - user << "You open the panel and expose the wiring." + to_chat(user, "You open the panel and expose the wiring.") is_open = 1 else if(istype(W, /obj/item/stack/cable_coil) && malfunction && is_open) var/obj/item/stack/cable_coil/coil = W - user << "You begin to replace the wires." + to_chat(user, "You begin to replace the wires.") //if(do_after(user, min(60, round( ((getMaxHealth()/health)*10)+(malfunction*10) ))) //Take longer to repair heavier damage if(do_after(user, 30)) if (coil.use(1)) health = max_health malfunction = 0 - user << "You repair the [src]!" + to_chat(user, "You repair the [src]!") update_icon() - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) if(locked) - user << "The bolts are covered, unlocking this would retract the covers." + to_chat(user, "The bolts are covered, unlocking this would retract the covers.") return if(anchored) playsound(src, W.usesound, 100, 1) - user << "You unsecure the [src] from the floor!" + to_chat(user, "You unsecure the [src] from the floor!") if(active) - user << "The [src] shuts off!" + to_chat(user, "The [src] shuts off!") src.shields_down() anchored = 0 else if(istype(get_turf(src), /turf/space)) return //No wrenching these in space! playsound(src, W.usesound, 100, 1) - user << "You secure the [src] to the floor!" + to_chat(user, "You secure the [src] to the floor!") anchored = 1 else if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda)) if(src.allowed(user)) src.locked = !src.locked - user << "The controls are now [src.locked ? "locked." : "unlocked."]" + to_chat(user, "The controls are now [src.locked ? "locked." : "unlocked."]") else - user << "Access denied." + to_chat(user, "Access denied.") else ..() diff --git a/code/modules/shieldgen/sheldwallgen.dm b/code/modules/shieldgen/sheldwallgen.dm index 995df27b48..37c55e5911 100644 --- a/code/modules/shieldgen/sheldwallgen.dm +++ b/code/modules/shieldgen/sheldwallgen.dm @@ -158,7 +158,7 @@ /obj/machinery/shieldwallgen/attackby(obj/item/W, mob/user) - if(istype(W, /obj/item/weapon/wrench)) + if(W.is_wrench()) if(active) user << "Turn off the field generator first." return diff --git a/code/modules/shieldgen/shield_capacitor.dm b/code/modules/shieldgen/shield_capacitor.dm index 1b8f2def84..ae51705984 100644 --- a/code/modules/shieldgen/shield_capacitor.dm +++ b/code/modules/shieldgen/shield_capacitor.dm @@ -45,7 +45,7 @@ updateDialog() else user << "Access denied." - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) src.anchored = !src.anchored playsound(src, W.usesound, 75, 1) src.visible_message("\icon[src] [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].") diff --git a/code/modules/shieldgen/shield_gen.dm b/code/modules/shieldgen/shield_gen.dm index aa504fd7a6..7c63d0a623 100644 --- a/code/modules/shieldgen/shield_gen.dm +++ b/code/modules/shieldgen/shield_gen.dm @@ -64,7 +64,7 @@ updateDialog() else user << "Access denied." - else if(istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) src.anchored = !src.anchored playsound(src, W.usesound, 75, 1) src.visible_message("\icon[src] [src] has been [anchored?"bolted to the floor":"unbolted from the floor"] by [user].") diff --git a/code/modules/spells/aoe_turf/summons.dm b/code/modules/spells/aoe_turf/summons.dm index 996b583585..696368c8e5 100644 --- a/code/modules/spells/aoe_turf/summons.dm +++ b/code/modules/spells/aoe_turf/summons.dm @@ -36,6 +36,6 @@ summon_amt = 10 range = 3 - summon_type = list(/mob/living/simple_animal/hostile/creature) + summon_type = list(/mob/living/simple_mob/creature) hud_state = "wiz_creature" \ No newline at end of file diff --git a/code/modules/surgery/_defines.dm b/code/modules/surgery/_defines.dm index 900f3e4545..a76fb4e970 100644 --- a/code/modules/surgery/_defines.dm +++ b/code/modules/surgery/_defines.dm @@ -1 +1 @@ -#define SURGERY_FAILURE -1 +#define SURGERY_FAILURE -1 \ No newline at end of file diff --git a/code/modules/surgery/bones.dm b/code/modules/surgery/bones.dm index 5465e7d03e..2f832fdb9f 100644 --- a/code/modules/surgery/bones.dm +++ b/code/modules/surgery/bones.dm @@ -9,9 +9,11 @@ /datum/surgery_step/glue_bone allowed_tools = list( - /obj/item/weapon/surgical/bonegel = 100, \ - /obj/item/weapon/screwdriver = 75 + /obj/item/weapon/surgical/bonegel = 100 ) + + allowed_procs = list(IS_SCREWDRIVER = 75) + can_infect = 1 blood_level = 1 @@ -49,10 +51,11 @@ /datum/surgery_step/set_bone allowed_tools = list( - /obj/item/weapon/surgical/bonesetter = 100, \ - /obj/item/weapon/wrench = 75 \ + /obj/item/weapon/surgical/bonesetter = 100 ) + allowed_procs = list(IS_WRENCH = 75) + min_duration = 60 max_duration = 70 @@ -92,10 +95,11 @@ /datum/surgery_step/mend_skull allowed_tools = list( - /obj/item/weapon/surgical/bonesetter = 100, \ - /obj/item/weapon/wrench = 75 \ + /obj/item/weapon/surgical/bonesetter = 100 ) + allowed_procs = list(IS_WRENCH = 75) + min_duration = 60 max_duration = 70 @@ -130,9 +134,11 @@ /datum/surgery_step/finish_bone allowed_tools = list( - /obj/item/weapon/surgical/bonegel = 100, \ - /obj/item/weapon/screwdriver = 75 + /obj/item/weapon/surgical/bonegel = 100 ) + + allowed_procs = list(IS_SCREWDRIVER = 75) + can_infect = 1 blood_level = 1 @@ -169,8 +175,9 @@ /datum/surgery_step/clamp_bone allowed_tools = list( - /obj/item/weapon/surgical/bone_clamp = 100 - ) + /obj/item/weapon/surgical/bone_clamp = 100 + ) + can_infect = 1 blood_level = 1 diff --git a/code/modules/surgery/encased.dm b/code/modules/surgery/encased.dm index 7bc33d7500..3513691706 100644 --- a/code/modules/surgery/encased.dm +++ b/code/modules/surgery/encased.dm @@ -20,8 +20,8 @@ /datum/surgery_step/open_encased/saw allowed_tools = list( - /obj/item/weapon/surgical/circular_saw = 100, \ - /obj/item/weapon/material/knife/machete/hatchet = 75 + /obj/item/weapon/surgical/circular_saw = 100, \ + /obj/item/weapon/material/knife/machete/hatchet = 75 ) min_duration = 50 @@ -69,10 +69,11 @@ /datum/surgery_step/open_encased/retract allowed_tools = list( - /obj/item/weapon/surgical/retractor = 100, \ - /obj/item/weapon/crowbar = 75 + /obj/item/weapon/surgical/retractor = 100 ) + allowed_procs = list(IS_CROWBAR = 75) + min_duration = 30 max_duration = 40 @@ -121,10 +122,11 @@ /datum/surgery_step/open_encased/close allowed_tools = list( - /obj/item/weapon/surgical/retractor = 100, \ - /obj/item/weapon/crowbar = 75 + /obj/item/weapon/surgical/retractor = 100, ) + allowed_procs = list(IS_CROWBAR = 75) + min_duration = 20 max_duration = 40 @@ -178,10 +180,11 @@ /datum/surgery_step/open_encased/mend allowed_tools = list( - /obj/item/weapon/surgical/bonegel = 100, \ - /obj/item/weapon/screwdriver = 75 + /obj/item/weapon/surgical/bonegel = 100 ) + allowed_procs = list(IS_SCREWDRIVER = 75) + min_duration = 20 max_duration = 40 diff --git a/code/modules/surgery/face.dm b/code/modules/surgery/face.dm index b3fae927bb..30f50b14ec 100644 --- a/code/modules/surgery/face.dm +++ b/code/modules/surgery/face.dm @@ -88,9 +88,11 @@ /datum/surgery_step/face/fix_face allowed_tools = list( - /obj/item/weapon/surgical/retractor = 100, \ - /obj/item/weapon/crowbar = 55, \ - /obj/item/weapon/material/kitchen/utensil/fork = 75) + /obj/item/weapon/surgical/retractor = 100, \ + /obj/item/weapon/material/kitchen/utensil/fork = 75 + ) + + allowed_procs = list(IS_CROWBAR = 55) min_duration = 80 max_duration = 100 diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index f74c7dda64..64de0aeef4 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -28,9 +28,9 @@ /datum/surgery_step/generic/cut_open allowed_tools = list( - /obj/item/weapon/surgical/scalpel = 100, \ - /obj/item/weapon/material/knife = 75, \ - /obj/item/weapon/material/shard = 50, \ + /obj/item/weapon/surgical/scalpel = 100, \ + /obj/item/weapon/material/knife = 75, \ + /obj/item/weapon/material/shard = 50, \ ) req_open = 0 @@ -72,10 +72,10 @@ /datum/surgery_step/generic/cut_with_laser allowed_tools = list( - /obj/item/weapon/surgical/scalpel/laser3 = 95, \ - /obj/item/weapon/surgical/scalpel/laser2 = 85, \ - /obj/item/weapon/surgical/scalpel/laser1 = 75, \ - /obj/item/weapon/melee/energy/sword = 5 + /obj/item/weapon/surgical/scalpel/laser3 = 95, \ + /obj/item/weapon/surgical/scalpel/laser2 = 85, \ + /obj/item/weapon/surgical/scalpel/laser1 = 75, \ + /obj/item/weapon/melee/energy/sword = 5 ) priority = 2 req_open = 0 @@ -118,8 +118,9 @@ /datum/surgery_step/generic/incision_manager allowed_tools = list( - /obj/item/weapon/surgical/scalpel/manager = 100 + /obj/item/weapon/surgical/scalpel/manager = 100 ) + priority = 2 req_open = 0 min_duration = 80 @@ -163,9 +164,9 @@ /datum/surgery_step/generic/clamp_bleeders allowed_tools = list( - /obj/item/weapon/surgical/hemostat = 100, \ - /obj/item/stack/cable_coil = 75, \ - /obj/item/device/assembly/mousetrap = 20 + /obj/item/weapon/surgical/hemostat = 100, \ + /obj/item/stack/cable_coil = 75, \ + /obj/item/device/assembly/mousetrap = 20 ) min_duration = 40 @@ -202,11 +203,12 @@ /datum/surgery_step/generic/retract_skin allowed_tools = list( - /obj/item/weapon/surgical/retractor = 100, \ - /obj/item/weapon/crowbar = 75, \ - /obj/item/weapon/material/kitchen/utensil/fork = 50 + /obj/item/weapon/surgical/retractor = 100, \ + /obj/item/weapon/material/kitchen/utensil/fork = 50 ) + allowed_procs = list(IS_CROWBAR = 75) + min_duration = 30 max_duration = 40 @@ -261,10 +263,10 @@ /datum/surgery_step/generic/cauterize allowed_tools = list( - /obj/item/weapon/surgical/cautery = 100, \ - /obj/item/clothing/mask/smokable/cigarette = 75, \ - /obj/item/weapon/flame/lighter = 50, \ - /obj/item/weapon/weldingtool = 25 + /obj/item/weapon/surgical/cautery = 100, \ + /obj/item/clothing/mask/smokable/cigarette = 75, \ + /obj/item/weapon/flame/lighter = 50, \ + /obj/item/weapon/weldingtool = 25 ) min_duration = 70 @@ -302,8 +304,8 @@ /datum/surgery_step/generic/amputate allowed_tools = list( - /obj/item/weapon/surgical/circular_saw = 100, \ - /obj/item/weapon/material/knife/machete/hatchet = 75 + /obj/item/weapon/surgical/circular_saw = 100, \ + /obj/item/weapon/material/knife/machete/hatchet = 75 ) req_open = 0 diff --git a/code/modules/surgery/implant.dm b/code/modules/surgery/implant.dm index c8872e05cc..8e21e9e8a3 100644 --- a/code/modules/surgery/implant.dm +++ b/code/modules/surgery/implant.dm @@ -44,9 +44,9 @@ /datum/surgery_step/cavity/make_space allowed_tools = list( - /obj/item/weapon/surgical/surgicaldrill = 100, \ - /obj/item/weapon/pen = 75, \ - /obj/item/stack/rods = 50 + /obj/item/weapon/surgical/surgicaldrill = 100, \ + /obj/item/weapon/pen = 75, \ + /obj/item/stack/rods = 50 ) min_duration = 60 @@ -77,10 +77,10 @@ /datum/surgery_step/cavity/close_space priority = 2 allowed_tools = list( - /obj/item/weapon/surgical/cautery = 100, \ - /obj/item/clothing/mask/smokable/cigarette = 75, \ - /obj/item/weapon/flame/lighter = 50, \ - /obj/item/weapon/weldingtool = 25 + /obj/item/weapon/surgical/cautery = 100, \ + /obj/item/clothing/mask/smokable/cigarette = 75, \ + /obj/item/weapon/flame/lighter = 50, \ + /obj/item/weapon/weldingtool = 25 ) min_duration = 60 @@ -156,11 +156,12 @@ /datum/surgery_step/cavity/implant_removal allowed_tools = list( - /obj/item/weapon/surgical/hemostat = 100, \ - /obj/item/weapon/wirecutters = 75, \ - /obj/item/weapon/material/kitchen/utensil/fork = 20 + /obj/item/weapon/surgical/hemostat = 100, \ + /obj/item/weapon/material/kitchen/utensil/fork = 20 ) + allowed_procs = list(IS_WIRECUTTER = 75) + min_duration = 80 max_duration = 100 diff --git a/code/modules/surgery/neck.dm b/code/modules/surgery/neck.dm index 6cd347586b..5b1522d60c 100644 --- a/code/modules/surgery/neck.dm +++ b/code/modules/surgery/neck.dm @@ -59,9 +59,11 @@ priority = 3 //Do this instead of expanding the skull cavity allowed_tools = list( /obj/item/weapon/surgical/surgicaldrill = 100, - /obj/item/weapon/screwdriver = 75, /obj/item/weapon/melee/changeling/arm_blade = 15, - /obj/item/weapon/pickaxe = 5) + /obj/item/weapon/pickaxe = 5 + ) + + allowed_procs = list(IS_SCREWDRIVER = 75) min_duration = 200 //Very. Very. Carefully. max_duration = 300 @@ -100,9 +102,10 @@ priority = 3 //Do this instead of picking around for implants. allowed_tools = list( /obj/item/weapon/surgical/hemostat = 100, - /obj/item/weapon/wirecutters = 60, /obj/item/weapon/melee/changeling/claw = 40) //Surprisingly, claws are kind of okay at picking things out. + allowed_procs = list(IS_WIRECUTTER = 60) + min_duration = 90 max_duration = 120 @@ -216,9 +219,10 @@ priority = 3 //Do this instead of searching for objects in the skull. allowed_tools = list( /obj/item/weapon/surgical/hemostat = 100, - /obj/item/weapon/wirecutters = 60, /obj/item/weapon/melee/changeling/claw = 20) //Claws. Good for digging, not so much for moving. + allowed_procs = list(IS_WIRECUTTER = 60) + min_duration = 90 max_duration = 120 diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index d54a4aff14..2f2e1cb44a 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -20,9 +20,10 @@ /datum/surgery_step/internal/remove_embryo allowed_tools = list( /obj/item/weapon/surgical/hemostat = 100, \ - /obj/item/weapon/wirecutters = 75, \ /obj/item/weapon/material/kitchen/utensil/fork = 20 ) + + allowed_procs = list(IS_WIRECUTTER = 75) blood_level = 2 min_duration = 80 @@ -212,10 +213,11 @@ allowed_tools = list( /obj/item/weapon/surgical/hemostat = 100, \ - /obj/item/weapon/wirecutters = 75, \ /obj/item/weapon/material/kitchen/utensil/fork = 20 ) + allowed_procs = list(IS_WIRECUTTER = 75) + min_duration = 60 max_duration = 80 diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index 4debf4017c..7fccfa8071 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -28,10 +28,12 @@ /datum/surgery_step/robotics/unscrew_hatch allowed_tools = list( - /obj/item/weapon/screwdriver = 100, /obj/item/weapon/coin = 50, /obj/item/weapon/material/knife = 50 ) + + allowed_procs = list(IS_SCREWDRIVER = 100) + req_open = 0 min_duration = 90 @@ -66,10 +68,11 @@ /datum/surgery_step/robotics/open_hatch allowed_tools = list( /obj/item/weapon/surgical/retractor = 100, - /obj/item/weapon/crowbar = 100, /obj/item/weapon/material/kitchen/utensil = 50 ) + allowed_procs = list(IS_CROWBAR = 100) + min_duration = 30 max_duration = 40 @@ -102,10 +105,11 @@ /datum/surgery_step/robotics/close_hatch allowed_tools = list( /obj/item/weapon/surgical/retractor = 100, - /obj/item/weapon/crowbar = 100, /obj/item/weapon/material/kitchen/utensil = 50 ) + allowed_procs = list(IS_CROWBAR = 100) + min_duration = 70 max_duration = 100 @@ -148,7 +152,7 @@ /datum/surgery_step/robotics/repair_brute/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) - if(istype(tool,/obj/item/weapon/weldingtool)) + if(istype(tool, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/welder = tool if(!welder.isOn() || !welder.remove_fuel(1,user)) return 0 @@ -188,7 +192,7 @@ /datum/surgery_step/robotics/repair_burn/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/obj/item/organ/external/affected = target.get_organ(target_zone) - if(istype(tool,/obj/item/stack/cable_coil/)) + if(istype(tool, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = tool if(affected.burn_dam == 0) to_chat(user, "There are no burnt wires here!") @@ -229,9 +233,10 @@ allowed_tools = list( /obj/item/stack/nanopaste = 100, \ /obj/item/weapon/surgical/bonegel = 30, \ - /obj/item/weapon/screwdriver = 70, \ ) + allowed_procs = list(IS_SCREWDRIVER = 100) + min_duration = 70 max_duration = 90 @@ -348,9 +353,7 @@ /////////////////////////////////////////////////////////////// /datum/surgery_step/robotics/attach_organ_robotic - allowed_tools = list( - /obj/item/weapon/screwdriver = 100, - ) + allowed_procs = list(IS_SCREWDRIVER = 100) min_duration = 100 max_duration = 120 diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index b06221e5c9..837e10a5a0 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -10,6 +10,10 @@ // type path referencing tools that can be used for this step, and how well are they suited for it var/list/allowed_tools = null + + // List of procs that can be called if allowed_tools fails + var/list/allowed_procs = null + // type paths referencing races that this step applies to. var/list/allowed_species = null var/list/disallowed_species = null @@ -23,55 +27,73 @@ //How much blood this step can get on surgeon. 1 - hands, 2 - full body. var/blood_level = 0 - //returns how well tool is suited for this step - proc/tool_quality(obj/item/tool) - for (var/T in allowed_tools) - if (istype(tool,T)) - return allowed_tools[T] +//returns how well tool is suited for this step +/datum/surgery_step/proc/tool_quality(obj/item/tool) + for (var/T in allowed_tools) + if (istype(tool,T)) + return allowed_tools[T] + + for(var/P in allowed_procs) + switch(P) + if(IS_SCREWDRIVER) + if(tool.is_screwdriver()) + return allowed_procs[P] + if(IS_CROWBAR) + if(tool.is_crowbar()) + return allowed_procs[P] + if(IS_WIRECUTTER) + if(tool.is_wirecutter()) + return allowed_procs[P] + if(IS_WRENCH) + if(tool.is_wrench()) + return allowed_procs[P] + return 0 + + +// Checks if this step applies to the user mob at all +/datum/surgery_step/proc/is_valid_target(mob/living/carbon/human/target) + if(!hasorgans(target)) return 0 - // Checks if this step applies to the user mob at all - proc/is_valid_target(mob/living/carbon/human/target) - if(!hasorgans(target)) - return 0 + if(allowed_species) + for(var/species in allowed_species) + if(target.species.get_bodytype() == species) + return 1 - if(allowed_species) - for(var/species in allowed_species) - if(target.species.get_bodytype() == species) - return 1 + if(disallowed_species) + for(var/species in disallowed_species) + if(target.species.get_bodytype() == species) + return 0 - if(disallowed_species) - for(var/species in disallowed_species) - if(target.species.get_bodytype() == species) - return 0 - - return 1 + return 1 - // checks whether this step can be applied with the given user and target - proc/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - return 0 +// checks whether this step can be applied with the given user and target +/datum/surgery_step/proc/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + return 0 - // does stuff to begin the step, usually just printing messages. Moved germs transfering and bloodying here too - proc/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/obj/item/organ/external/affected = target.get_organ(target_zone) - if (can_infect && affected) - spread_germs_to_organ(affected, user) - if (ishuman(user) && prob(60)) - var/mob/living/carbon/human/H = user - if (blood_level) - H.bloody_hands(target,0) - if (blood_level > 1) - H.bloody_body(target,0) - return +// does stuff to begin the step, usually just printing messages. Moved germs transfering and bloodying here too +/datum/surgery_step/proc/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/obj/item/organ/external/affected = target.get_organ(target_zone) + if (can_infect && affected) + spread_germs_to_organ(affected, user) + if (ishuman(user) && prob(60)) + var/mob/living/carbon/human/H = user + if (blood_level) + H.bloody_hands(target,0) + if (blood_level > 1) + H.bloody_body(target,0) + return + +// does stuff to end the step, which is normally print a message + do whatever this step changes +/datum/surgery_step/proc/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + return + +// stuff that happens when the step fails +/datum/surgery_step/proc/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + return null - // does stuff to end the step, which is normally print a message + do whatever this step changes - proc/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - return - // stuff that happens when the step fails - proc/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - return null /proc/spread_germs_to_organ(var/obj/item/organ/external/E, var/mob/living/carbon/human/user) if(!istype(user) || !istype(E)) return diff --git a/code/modules/surgery/~defines.dm b/code/modules/surgery/~defines.dm index 6b27ac56f5..61f9b143f2 100644 --- a/code/modules/surgery/~defines.dm +++ b/code/modules/surgery/~defines.dm @@ -1 +1 @@ -#undef SURGERY_FAILURE +#undef SURGERY_FAILURE \ No newline at end of file diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index 5a49797262..af34ab6b2b 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -89,15 +89,15 @@ if(health < maxhealth) switch(health / maxhealth) if(0.0 to 0.5) - user << "It looks severely damaged!" + to_chat(user, "It looks severely damaged!") if(0.25 to 0.5) - user << "It looks damaged!" + to_chat(user, "It looks damaged!") if(0.5 to 1.0) - user << "It has a few scrapes and dents." + to_chat(user, "It has a few scrapes and dents.") /obj/structure/table/attackby(obj/item/weapon/W, mob/user) - if(reinforced && istype(W, /obj/item/weapon/screwdriver)) + if(reinforced && W.is_screwdriver()) remove_reinforced(W, user) if(!reinforced) update_desc() @@ -105,7 +105,7 @@ update_material() return 1 - if(carpeted && istype(W, /obj/item/weapon/crowbar)) + if(carpeted && W.is_crowbar()) user.visible_message("\The [user] removes the carpet from \the [src].", "You remove the carpet from \the [src].") new /obj/item/stack/tile/carpet(loc) @@ -122,9 +122,9 @@ update_icon() return 1 else - user << "You don't have enough carpet!" + to_chat(user, "You don't have enough carpet!") - if(!reinforced && !carpeted && material && istype(W, /obj/item/weapon/wrench)) + if(!reinforced && !carpeted && material && W.is_wrench()) remove_material(W, user) if(!material) update_connections(1) @@ -135,14 +135,14 @@ update_material() return 1 - if(!carpeted && !reinforced && !material && istype(W, /obj/item/weapon/wrench)) + if(!carpeted && !reinforced && !material && W.is_wrench()) dismantle(W, user) return 1 if(health < maxhealth && istype(W, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/F = W if(F.welding) - user << "You begin reparing damage to \the [src]." + to_chat(user, "You begin reparing damage to \the [src].") playsound(src, F.usesound, 50, 1) if(!do_after(user, 20 * F.toolspeed) || !F.remove_fuel(1, user)) return @@ -197,19 +197,19 @@ /obj/structure/table/proc/reinforce_table(obj/item/stack/material/S, mob/user) if(reinforced) - user << "\The [src] is already reinforced!" + to_chat(user, "\The [src] is already reinforced!") return if(!can_reinforce) - user << "\The [src] cannot be reinforced!" + to_chat(user, "\The [src] cannot be reinforced!") return if(!material) - user << "Plate \the [src] before reinforcing it!" + to_chat(user, "Plate \the [src] before reinforcing it!") return if(flipped) - user << "Put \the [src] back in place before reinforcing it!" + to_chat(user, "Put \the [src] back in place before reinforcing it!") return reinforced = common_material_add(S, user, "reinforc") @@ -234,12 +234,12 @@ /obj/structure/table/proc/common_material_add(obj/item/stack/material/S, mob/user, verb) // Verb is actually verb without 'e' or 'ing', which is added. Works for 'plate'/'plating' and 'reinforce'/'reinforcing'. var/material/M = S.get_material() if(!istype(M)) - user << "You cannot [verb]e \the [src] with \the [S]." + to_chat(user, "You cannot [verb]e \the [src] with \the [S].") return null if(manipulating) return M manipulating = 1 - user << "You begin [verb]ing \the [src] with [M.display_name]." + to_chat(user, "You begin [verb]ing \the [src] with [M.display_name].") if(!do_after(user, 20) || !S.use(1)) manipulating = 0 return null @@ -250,7 +250,7 @@ // Returns the material to set the table to. /obj/structure/table/proc/common_material_remove(mob/user, material/M, delay, what, type_holding, sound) if(!M.stack_type) - user << "You are unable to remove the [what] from this [src]!" + to_chat(user, "You are unable to remove the [what] from this [src]!") return M if(manipulating) return M @@ -268,13 +268,13 @@ manipulating = 0 return null -/obj/structure/table/proc/remove_reinforced(obj/item/weapon/screwdriver/S, mob/user) +/obj/structure/table/proc/remove_reinforced(obj/item/weapon/S, mob/user) reinforced = common_material_remove(user, reinforced, 40 * S.toolspeed, "reinforcements", "screws", S.usesound) -/obj/structure/table/proc/remove_material(obj/item/weapon/wrench/W, mob/user) +/obj/structure/table/proc/remove_material(obj/item/weapon/W, mob/user) material = common_material_remove(user, material, 20 * W.toolspeed, "plating", "bolts", W.usesound) -/obj/structure/table/proc/dismantle(obj/item/weapon/wrench/W, mob/user) +/obj/structure/table/proc/dismantle(obj/item/W, mob/user) if(manipulating) return manipulating = 1 user.visible_message("\The [user] begins dismantling \the [src].", @@ -459,7 +459,8 @@ */ /proc/dirs_to_corner_states(list/dirs) - if(!istype(dirs)) return + if(!istype(dirs)) + return var/list/ret = list(NORTHWEST, SOUTHEAST, NORTHEAST, SOUTHWEST) diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index f9c14af3a5..e8927197dc 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -63,7 +63,7 @@ return ..() /obj/vehicle/train/cargo/trolley/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(open && istype(W, /obj/item/weapon/wirecutters)) + if(open && W.is_wirecutter()) passenger_allowed = !passenger_allowed user.visible_message("[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src].","You [passenger_allowed ? "cut" : "mend"] the load limiter cable.") else diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 13dc84f0e4..3180ace629 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -118,13 +118,13 @@ if(istype(W, /obj/item/weapon/hand_labeler)) return if(mechanical) - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) if(!locked) open = !open update_icon() - user << "Maintenance panel is now [open ? "opened" : "closed"]." + to_chat(user, "Maintenance panel is now [open ? "opened" : "closed"].") playsound(src, W.usesound, 50, 1) - else if(istype(W, /obj/item/weapon/crowbar) && cell && open) + else if(W.is_crowbar() && cell && open) remove_cell(user) else if(istype(W, /obj/item/weapon/cell) && !cell && open) @@ -139,11 +139,11 @@ playsound(src, T.usesound, 50, 1) user.visible_message("[user] repairs [src]!"," You repair [src]!") else - user << "Unable to repair with the maintenance panel closed." + to_chat(user, "Unable to repair with the maintenance panel closed.") else - user << "[src] does not need a repair." + to_chat(user, "[src] does not need a repair.") else - user << "Unable to repair while [src] is off." + to_chat(user, "Unable to repair while [src] is off.") else if(hasvar(W,"force") && hasvar(W,"damtype")) user.setClickCooldown(user.get_attack_speed(W)) @@ -237,7 +237,7 @@ emagged = 1 if(locked) locked = 0 - user << "You bypass [src]'s controls." + to_chat(user, "You bypass [src]'s controls.") return TRUE /obj/vehicle/proc/explode() @@ -300,7 +300,7 @@ C.forceMove(src) cell = C powercheck() - usr << "You install [C] in [src]." + to_chat(usr, "You install [C] in [src].") /obj/vehicle/proc/remove_cell(var/mob/living/carbon/human/H) if(!mechanical) @@ -308,7 +308,7 @@ if(!cell) return - usr << "You remove [cell] from [src]." + to_chat(usr, "You remove [cell] from [src].") cell.forceMove(get_turf(H)) H.put_in_hands(cell) cell = null diff --git a/code/modules/virus2/centrifuge.dm b/code/modules/virus2/centrifuge.dm index 026bea5e5d..7b7da04116 100644 --- a/code/modules/virus2/centrifuge.dm +++ b/code/modules/virus2/centrifuge.dm @@ -9,8 +9,8 @@ var/obj/item/weapon/reagent_containers/glass/beaker/vial/sample = null var/datum/disease2/disease/virus2 = null -/obj/machinery/computer/centrifuge/attackby(var/obj/O as obj, var/mob/user as mob) - if(istype(O, /obj/item/weapon/screwdriver)) +/obj/machinery/computer/centrifuge/attackby(var/obj/item/O as obj, var/mob/user as mob) + if(O.is_screwdriver()) return ..(O,user) if(default_unfasten_wrench(user, O, 20)) @@ -18,7 +18,7 @@ if(istype(O,/obj/item/weapon/reagent_containers/glass/beaker/vial)) if(sample) - user << "\The [src] is already loaded." + to_chat(user, "\The [src] is already loaded.") return sample = O diff --git a/code/modules/virus2/diseasesplicer.dm b/code/modules/virus2/diseasesplicer.dm index d9a875050d..31cb84d665 100644 --- a/code/modules/virus2/diseasesplicer.dm +++ b/code/modules/virus2/diseasesplicer.dm @@ -11,8 +11,8 @@ var/splicing = 0 var/scanning = 0 -/obj/machinery/computer/diseasesplicer/attackby(var/obj/I as obj, var/mob/user as mob) - if(istype(I, /obj/item/weapon/screwdriver)) +/obj/machinery/computer/diseasesplicer/attackby(var/obj/item/I as obj, var/mob/user as mob) + if(I.is_screwdriver()) return ..(I,user) if(default_unfasten_wrench(user, I, 20)) @@ -21,7 +21,7 @@ if(istype(I,/obj/item/weapon/virusdish)) var/mob/living/carbon/c = user if (dish) - user << "\The [src] is already loaded." + to_chat(user, "\The [src] is already loaded.") return dish = I @@ -29,7 +29,7 @@ I.loc = src if(istype(I,/obj/item/weapon/diseasedisk)) - user << "You upload the contents of the disk onto the buffer." + to_chat(user, "You upload the contents of the disk onto the buffer.") memorybank = I:effect species_buffer = I:species analysed = I:analysed diff --git a/code/modules/xenoarcheaology/artifacts/autocloner.dm b/code/modules/xenoarcheaology/artifacts/autocloner.dm index 5f56ece8ee..fae4ec91ea 100644 --- a/code/modules/xenoarcheaology/artifacts/autocloner.dm +++ b/code/modules/xenoarcheaology/artifacts/autocloner.dm @@ -22,10 +22,10 @@ //33% chance to spawn nasties if(prob(33)) spawn_type = pick( - /mob/living/simple_animal/hostile/giant_spider/nurse, + /mob/living/simple_mob/animal/giant_spider/nurse, /mob/living/simple_animal/hostile/alien, /mob/living/simple_animal/hostile/bear, - /mob/living/simple_animal/hostile/creature) + /mob/living/simple_mob/creature) else spawn_type = pick(\ /mob/living/simple_animal/cat, @@ -35,7 +35,7 @@ /mob/living/simple_animal/cow, /mob/living/simple_animal/parrot, /mob/living/simple_animal/slime, - /mob/living/simple_animal/crab, + /mob/living/simple_mob/animal/passive/crab, /mob/living/simple_animal/mouse, /mob/living/simple_animal/retaliate/goat) diff --git a/code/modules/xenoarcheaology/artifacts/replicator.dm b/code/modules/xenoarcheaology/artifacts/replicator.dm index c4324b30ec..6a261fe886 100644 --- a/code/modules/xenoarcheaology/artifacts/replicator.dm +++ b/code/modules/xenoarcheaology/artifacts/replicator.dm @@ -27,8 +27,8 @@ /obj/structure/closet/crate, /obj/structure/closet/acloset, /mob/living/simple_animal/hostile/mimic, - /mob/living/simple_animal/hostile/viscerator, - /mob/living/simple_animal/hostile/hivebot, + /mob/living/simple_mob/mechanical/viscerator, + /mob/living/simple_mob/mechanical/hivebot, /obj/item/device/analyzer, /obj/item/device/camera, /obj/item/device/flash, @@ -45,7 +45,7 @@ /obj/item/weapon/material/knife/butch, /obj/item/weapon/caution, /obj/item/weapon/caution/cone, - /obj/item/weapon/crowbar, + /obj/item/weapon/tool/crowbar, /obj/item/weapon/clipboard, /obj/item/weapon/cell, /obj/item/weapon/surgical/circular_saw, @@ -59,9 +59,9 @@ /obj/item/weapon/pickaxe, /obj/item/weapon/shovel, /obj/item/weapon/weldingtool, - /obj/item/weapon/wirecutters, - /obj/item/weapon/wrench, - /obj/item/weapon/screwdriver, + /obj/item/weapon/tool/wirecutters, + /obj/item/weapon/tool/wrench, + /obj/item/weapon/tool/screwdriver, /obj/item/weapon/grenade/chem_grenade/cleaner, /obj/item/weapon/grenade/chem_grenade/metalfoam) diff --git a/code/modules/xenoarcheaology/finds/find_spawning.dm b/code/modules/xenoarcheaology/finds/find_spawning.dm index 42e8408c45..39cf1776e6 100644 --- a/code/modules/xenoarcheaology/finds/find_spawning.dm +++ b/code/modules/xenoarcheaology/finds/find_spawning.dm @@ -146,11 +146,11 @@ if(13) item_type = "tool" if(prob(25)) - new_item = new /obj/item/weapon/wrench(src.loc) + new_item = new /obj/item/weapon/tool/wrench(src.loc) else if(prob(25)) - new_item = new /obj/item/weapon/crowbar(src.loc) + new_item = new /obj/item/weapon/tool/crowbar(src.loc) else - new_item = new /obj/item/weapon/screwdriver(src.loc) + new_item = new /obj/item/weapon/tool/screwdriver(src.loc) additional_desc = "[pick("It doesn't look safe.",\ "You wonder what it was used for",\ "There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains on it")]." @@ -417,11 +417,11 @@ var/list/alien_stuff = list( /obj/item/device/multitool/alien, /obj/item/stack/cable_coil/alien, - /obj/item/weapon/crowbar/alien, - /obj/item/weapon/screwdriver/alien, + /obj/item/weapon/tool/crowbar/alien, + /obj/item/weapon/tool/screwdriver/alien, /obj/item/weapon/weldingtool/alien, - /obj/item/weapon/wirecutters/alien, - /obj/item/weapon/wrench/alien, + /obj/item/weapon/tool/wirecutters/alien, + /obj/item/weapon/tool/wrench/alien, /obj/item/weapon/surgical/FixOVein/alien, /obj/item/weapon/surgical/bone_clamp/alien, /obj/item/weapon/surgical/cautery/alien, diff --git a/code/modules/xenoarcheaology/finds/misc.dm b/code/modules/xenoarcheaology/finds/misc.dm index cc02a7f41b..04e7b788de 100644 --- a/code/modules/xenoarcheaology/finds/misc.dm +++ b/code/modules/xenoarcheaology/finds/misc.dm @@ -13,23 +13,6 @@ if(prob(30)) icon_state = "crystal2" set_light(3, 3, "#CC00CC") - else if(prob(30)) - icon_state = "crystal3" - set_light(3, 3, "#FF003B") - else - set_light(3, 3, "#33CC33") - -/obj/machinery/crystal/alt - name = "Crystal" - icon = 'icons/obj/mining.dmi' - icon_state = "crystal" - density = TRUE - anchored = TRUE - -/obj/machinery/crystal/alt/New() - if(prob(50)) - icon_state = "crystal2" - set_light(3, 3, "#CC00CC") else set_light(3, 3, "#33CC33") diff --git a/code/modules/xenoarcheaology/finds/special.dm b/code/modules/xenoarcheaology/finds/special.dm index f6f89c6e8b..0798b4fcfb 100644 --- a/code/modules/xenoarcheaology/finds/special.dm +++ b/code/modules/xenoarcheaology/finds/special.dm @@ -87,7 +87,7 @@ if(charges >= 3) if(prob(5)) charges -= 1 - var/spawn_type = pick(/mob/living/simple_animal/hostile/creature) + var/spawn_type = pick(/mob/living/simple_mob/creature) new spawn_type(pick(view(1,src))) playsound(src.loc, pick('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg'), 50, 1, -3) diff --git a/code/modules/xenoarcheaology/tools/suspension_generator.dm b/code/modules/xenoarcheaology/tools/suspension_generator.dm index ac56f7de92..c85307f3ee 100644 --- a/code/modules/xenoarcheaology/tools/suspension_generator.dm +++ b/code/modules/xenoarcheaology/tools/suspension_generator.dm @@ -24,7 +24,7 @@ M.weakened = max(M.weakened, 3) cell.charge -= power_use if(prob(5)) - M << "[pick("You feel tingly","You feel like floating","It is hard to speak","You can barely move")]." + to_chat(M, "[pick("You feel tingly","You feel like floating","It is hard to speak","You can barely move")].") for(var/obj/item/I in T) if(!suspension_field.contents.len) @@ -81,7 +81,7 @@ if(anchored) activate() else - usr << "You are unable to activate [src] until it is properly secured on the ground." + to_chat(usr, "You are unable to activate [src] until it is properly secured on the ground.") else deactivate() else if(href_list["insertcard"]) @@ -91,9 +91,9 @@ I.loc = src auth_card = I if(attempt_unlock(I, usr)) - usr << "You insert [I], the console flashes \'Access granted.\'" + to_chat(usr, "You insert [I], the console flashes \'Access granted.\'") else - usr << "You insert [I], the console flashes \'Access denied.\'" + to_chat(usr, "You insert [I], the console flashes \'Access denied.\'") else if(href_list["ejectcard"]) if(auth_card) if(ishuman(usr)) @@ -122,44 +122,44 @@ icon_state = "suspension0" cell = null - user << "You remove the power cell" + to_chat(user, "You remove the power cell") /obj/machinery/suspension_gen/attackby(obj/item/weapon/W as obj, mob/user as mob) if(!locked && !suspension_field && default_deconstruction_screwdriver(user, W)) return - else if (istype(W, /obj/item/weapon/wrench)) + else if(W.is_wrench()) if(!suspension_field) if(anchored) anchored = 0 else anchored = 1 playsound(loc, W.usesound, 50, 1) - user << "You wrench the stabilising legs [anchored ? "into place" : "up against the body"]." + to_chat(user, "You wrench the stabilising legs [anchored ? "into place" : "up against the body"].") if(anchored) desc = "It is resting securely on four stubby legs." else desc = "It has stubby legs bolted up against it's body for stabilising." else - user << "You are unable to secure [src] while it is active!" + to_chat(user, "You are unable to secure [src] while it is active!") else if (istype(W, /obj/item/weapon/cell)) if(panel_open) if(cell) - user << "There is a power cell already installed." + to_chat(user, "There is a power cell already installed.") else user.drop_item() W.loc = src cell = W - user << "You insert the power cell." + to_chat(user, "You insert the power cell.") icon_state = "suspension1" else if(istype(W, /obj/item/weapon/card)) var/obj/item/weapon/card/I = W if(!auth_card) if(attempt_unlock(I, user)) - user << "You swipe [I], the console flashes \'Access granted.\'" + to_chat(user, "You swipe [I], the console flashes \'Access granted.\'") else - user << "You swipe [I], console flashes \'Access denied.\'" + to_chat(user, "You swipe [I], console flashes \'Access denied.\'") else - user << "Remove [auth_card] first." + to_chat(user, "Remove [auth_card] first.") /obj/machinery/suspension_gen/proc/attempt_unlock(var/obj/item/weapon/card/C, var/mob/user) if(!panel_open) @@ -207,7 +207,7 @@ var/turf/T = get_turf(suspension_field) for(var/mob/living/M in T) - M << "You no longer feel like floating." + to_chat(M, "You no longer feel like floating.") M.weakened = min(M.weakened, 3) src.visible_message("\icon[src] [src] deactivates with a gentle shudder.") @@ -225,7 +225,7 @@ set category = "Object" if(anchored) - usr << "You cannot rotate [src], it has been firmly fixed to the floor." + to_chat(usr, "You cannot rotate [src], it has been firmly fixed to the floor.") else set_dir(turn(dir, 90)) @@ -235,7 +235,7 @@ set category = "Object" if(anchored) - usr << "You cannot rotate [src], it has been firmly fixed to the floor." + to_chat(usr, "You cannot rotate [src], it has been firmly fixed to the floor.") else set_dir(turn(dir, -90)) diff --git a/code/modules/xenobio2/machinery/core_extractor.dm b/code/modules/xenobio2/machinery/core_extractor.dm index e772558fcc..8bb5bc42fb 100644 --- a/code/modules/xenobio2/machinery/core_extractor.dm +++ b/code/modules/xenobio2/machinery/core_extractor.dm @@ -32,16 +32,16 @@ /obj/machinery/slime/extractor/attackby(var/obj/item/W, var/mob/user) //Let's try to deconstruct first. - if(istype(W, /obj/item/weapon/screwdriver) && !inuse) + if(W.is_screwdriver() && !inuse) default_deconstruction_screwdriver(user, W) return - if(istype(W, /obj/item/weapon/crowbar)) + if(W.is_crowbar()) default_deconstruction_crowbar(user, W) return if(panel_open) - user << "Close the panel first!" + to_chat(user, "Close the panel first!") var/obj/item/weapon/grab/G = W @@ -49,7 +49,7 @@ return ..() if(G.state < 2) - user << "You need a better grip to do that!" + to_chat(user, "You need a better grip to do that!") return move_into_extractor(user,G.affecting) @@ -62,20 +62,20 @@ /obj/machinery/slime/extractor/proc/move_into_extractor(var/mob/user,var/mob/living/victim) if(src.occupant) - user << "The core extractor is full, empty it first!" + to_chat(user, "The core extractor is full, empty it first!") return if(inuse) - user << "The core extractor is locked and running, wait for it to finish." + to_chat(user, "The core extractor is locked and running, wait for it to finish.") return - if(!(istype(victim, /mob/living/simple_animal/xeno/slime)) ) - user << "This is not a suitable subject for the core extractor!" + if(!(istype(victim, /mob/living/simple_animal/xeno/slime))) + to_chat(user, "This is not a suitable subject for the core extractor!") return var/mob/living/simple_animal/xeno/slime/S = victim if(S.is_child) - user << "This subject is not developed enough for the core extractor!" + to_chat(user, "This subject is not developed enough for the core extractor!") return user.visible_message("[user] starts to put [victim] into the core extractor!") diff --git a/code/modules/xenobio2/machinery/gene_manipulators.dm b/code/modules/xenobio2/machinery/gene_manipulators.dm index 98c2fa8160..da12c49d68 100644 --- a/code/modules/xenobio2/machinery/gene_manipulators.dm +++ b/code/modules/xenobio2/machinery/gene_manipulators.dm @@ -24,7 +24,7 @@ if(genes.len) var/choice = alert(user, "Are you sure you want to wipe the disk?", "Xenobiological Data", "No", "Yes") if(src && user && genes && choice && choice == "Yes" && user.Adjacent(get_turf(src))) - user << "You wipe the disk data." + to_chat(user, "You wipe the disk data.") name = initial(name) desc = initial(name) genes = list() @@ -67,24 +67,24 @@ return if(istype(W,/obj/item/weapon/disk/xenobio)) if(loaded_disk) - user << "There is already a data disk loaded." + to_chat(user, "There is already a data disk loaded.") return else var/obj/item/weapon/disk/xenobio/B = W if(B.genes && B.genes.len) if(!disk_needs_genes) - user << "That disk already has gene data loaded." + to_chat(user, "That disk already has gene data loaded.") return else if(disk_needs_genes) - user << "That disk does not have any gene data loaded." + to_chat(user, "That disk does not have any gene data loaded.") return user.drop_from_inventory(W) W.forceMove(src) loaded_disk = W - user << "You load [W] into [src]." + to_chat(user, "You load [W] into [src].") return ..() @@ -137,14 +137,14 @@ /obj/machinery/xenobio/extractor/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/xenoproduct)) if(product) - user << "There is already a xenobiological product loaded." + to_chat(user, "There is already a xenobiological product loaded.") return else var/obj/item/xenoproduct/B = W user.drop_from_inventory(B) B.forceMove(src) product = B - user << "You load [B] into [src]." + to_chat(user, "You load [B] into [src].") return ..() @@ -280,7 +280,7 @@ if(istype(W,/obj/item/weapon/grab)) var/obj/item/weapon/grab/G = W if(occupant) - user << "There is already an organism loaded." + to_chat(user, "There is already an organism loaded.") return else if(isxeno(G.affecting)) @@ -289,9 +289,9 @@ user.drop_from_inventory(G) X.forceMove(src) occupant = X - user << "You load [X] into [src]." + to_chat(user, "You load [X] into [src]." else - user << "This specimen is incompatible with the machinery!" + to_chat(user, "This specimen is incompatible with the machinery!") return ..() @@ -374,15 +374,15 @@ /obj/machinery/xenobio/editor/proc/move_into_editor(var/mob/user,var/mob/living/victim) if(src.occupant) - user << "The [src] is full, empty it first!" + to_chat(user, "The [src] is full, empty it first!") return if(in_use) - user << "The [src] is locked and running, wait for it to finish." + to_chat(user, "The [src] is locked and running, wait for it to finish.") return if(!(istype(victim, /mob/living/simple_animal/xeno/slime)) ) - user << "This is not a suitable subject for the [src]!" + to_chat(user, "This is not a suitable subject for the [src]!") return user.visible_message("[user] starts to put [victim] into the [src]!") diff --git a/code/modules/xenobio2/machinery/injector.dm b/code/modules/xenobio2/machinery/injector.dm index dc9bad89f1..c181f1f104 100644 --- a/code/modules/xenobio2/machinery/injector.dm +++ b/code/modules/xenobio2/machinery/injector.dm @@ -93,11 +93,11 @@ /obj/machinery/xenobio2/manualinjector/attackby(var/obj/item/W, var/mob/user) //Let's try to deconstruct first. - if(istype(W, /obj/item/weapon/screwdriver)) + if(W.is_screwdriver()) default_deconstruction_screwdriver(user, W) return - if(istype(W, /obj/item/weapon/crowbar) && !occupant) + if(W.is_crowbar() && !occupant) default_deconstruction_crowbar(user, W) return diff --git a/code/modules/xenobio2/machinery/slime_replicator.dm b/code/modules/xenobio2/machinery/slime_replicator.dm index 077e330008..8fb54929fe 100644 --- a/code/modules/xenobio2/machinery/slime_replicator.dm +++ b/code/modules/xenobio2/machinery/slime_replicator.dm @@ -30,11 +30,11 @@ /obj/machinery/slime/replicator/attackby(var/obj/item/W, var/mob/user) //Let's try to deconstruct first. - if(istype(W, /obj/item/weapon/screwdriver) && !inuse) + if(W.is_screwdriver() && !inuse) default_deconstruction_screwdriver(user, W) return - if(istype(W, /obj/item/weapon/crowbar)) + if(W.is_crowbar()) default_deconstruction_crowbar(user, W) return diff --git a/config/names/first_name_skrell.txt b/config/names/first_name_skrell.txt new file mode 100644 index 0000000000..122b093765 --- /dev/null +++ b/config/names/first_name_skrell.txt @@ -0,0 +1,600 @@ +Kaexae +Xaaq'xuer +Xaaq'taq +Kae'xer +Xeq'aeq'qerr +Ke'xuer +Xeteq +Kae'xum +Kerrker +Kerrquex'xum +Taeqxuq +Kae'quex'xeu +Keqaeq'xeu +Ke'ter +Xue'xerr +Keqqux'kea +Qerrqux +Kerrxae'qer +Taeqxerr +Kerr'xum +Kaexuer +Qerr'xaeq'xeu +Xue'xum +Xeqteq'qerr +Kerrkeax'qux +Xaaq'qux +Xae'xuer +Xertaq'qux +Xum'xuer +Keq'taq'kea +Keq'quex'xeu +Qerraeq +Xeq'xum +Xeq'qux'xum +Xer'xuq +Keq'teq +Kae'keax +Keqxer +Kae'xerr'xeu +Xaequx +Ke'teq'xum +Xaaqxerr +Xer'keax'kea +Qerrxae'qux +Xae'xer +Qerrteq +Xeq'xuer +Xe'xaeq'xum +Xeteq'qerr +Xaaq'aeq'xeu +Xae'xaeq'qer +Keaeq'xum +Xaaq'teq +Keq'ker +Ke'keax +Kexum'kea +Xeq'xum +Qerr'xaeq'kea +Xexum +Taeq'xer'xe +Qerraeq +Xeq'keax'qux +Xuequx +Kexuq +Teqxaeq'qer +Xeqtaq'qer +Xaexuq +Xueaeq'qux +Taeqxae +Keqxuer +Xum'aeq +Xeqkeax'kea +Kerrxuer +Xaeteq +Keqxaeq'qerr +Xum'quex +Taeq'teq +Xer'xaeq +Teq'taq +Xe'xuq +Kerrxer +Kerr'xaeq'kea +Xeqteq +Xeqxuq'qerr +Kerr'xum'xe +Xe'qux +Xexaeq +Qerrxaeq'qer +Teqqux'kea +Ke'xuer +Xerqux'xeu +Kaexaeq'xeu +Xeq'qux +Xeker +Ke'xae +Kerrxae'qux +Kae'aeq'qerr +Xeq'qux'xeu +Xeqquex'xeu +Kerr'xaeq +Kerr'aeq +Xaaqxae +Xertaq'qux +Xaaq'ker'xum +Kae'xuer'xe +Xue'aeq'xeu +Qerr'xuq +Kequex'qerr +Xer'ter'xe +Qerr'ter'qerr +Xeq'keax'qux +Keq'ker +Ke'qux'qerr +Xumter'qux +Xue'qux'xe +Xaeaeq +Xumxuer'xeu +Kerr'xuq'qux +Keq'xaeq +Xum'xuq'xeu +Kerr'xer +Xae'keax +Kequex +Kae'qux +Keqkeax +Qarrker +Xaaqker'xum +Xue'xaeq'qux +Taeq'xaeq'xe +Xue'xerr +Teqkeax +Xaaq'keax +Ke'xaeq'qer +Kerrxuer +Kaeter'qux +Qarr'xerr +Xerxum'qux +Xumqux +Taeq'teq'xeu +Qerrxuer'qer +Xe'ker +Qerrter'kea +Kaeteq'qux +Teq'xuer'xum +Ke'xae'xeu +Teqxuq'qer +Keq'xaeq +Xaaq'xae +Xum'xer +Xeter +Xaaq'quex'kea +Kexum +Qarrkeax'qer +Keq'xerr +Qarrxerr'qerr +Qarrxerr'qer +Xer'ker +Xaexum'xe +Kaexerr'qux +Xuexum +Xaaq'xer +Qerr'quex +Qerr'ker +Xum'teq'qerr +Kerrxaeq +Xeq'xae +Xue'aeq'xe +Qarr'xuer +Qarr'xerr'qerr +Kaexerr'xum +Kaeter'xum +Xuexuq +Xuekeax'xeu +Xaaq'ker +Keqxer +Teq'xer +Qarrker +Xer'ter +Xae'ter'kea +Ke'quex'xe +Xaeter +Xer'xae +Qarr'xae'xum +Xeqxuq +Keqter'xum +Xeker +Taeqxerr'qer +Keqxer'kea +Xumquex +Xaaq'xuq +Kerrxum +Xexerr +Xerxerr'qerr +Xaaq'xerr +Xum'ker'qer +Xequx +Xer'xae +Kaexerr'xe +Xe'taq +Xeq'xuer'qerr +Xue'taq +Teqxer +Xaaq'xerr'xe +Xer'quex'xum +Xaeaeq +Taeqaeq +Xaeter'qer +Xerkeax +Xuequex'xe +Keqxerr +Taeqxae'qer +Teqqux +Xae'quex'qux +Xe'xum +Xaaqxer +Xeq'aeq'xum +Xuexuq'qerr +Xe'taq'qux +Qarr'xae +Xe'keax'qer +Qerrxum'qerr +Xer'xer +Qarr'quex'qerr +Taeq'xer'qux +Taeqtaq +Ke'aeq'xum +Xueter +Kaeker +Xeter'kea +Qarrter +Qerrxae +Xaaqxum'xeu +Xum'xuer +Xe'xae +Qarrter'qer +Kequx +Kerr'aeq'kea +Teq'taq'kea +Xexum'qerr +Qerr'quex'xeu +Xeker'qux +Kerr'quex'qerr +Xum'ker'qer +Keqxuq'xeu +Keqxuq'xeu +Xer'teq'xum +Kaeker'qerr +Xumtaq +Xexuer +Xueter'xum +Kaeteq +Ke'teq +Qerrxuq +Teq'xum'qerr +Xaaq'xae +Keter'xum +Xeqqux +Xae'taq +Qerrtaq'qux +Keq'ter +Xaequex'xum +Kaeter +Xaaqtaq +Kae'xer'qer +Kaequx +Kae'xum +Taeqaeq'qux +Kexaeq'kea +Xer'xae'qer +Xae'ker +Xue'xuer +Xeq'taq'xe +Kaexae'qux +Teq'xae'xe +Teq'xuer +Qerrqux'xeu +Xuexaeq +Kerr'xuq'kea +Xerquex'kea +Keq'ker +Kaexum +Kerrquex +Kexer +Keq'quex'qerr +Xae'xae +Qerr'ker +Kexerr +Xaaqquex +Keq'quex'xum +Xerter'qux +Xuexaeq'xe +Xae'xuq'kea +Kae'xuer'kea +Xer'xum'kea +Xer'quex'kea +Kerrxuq'qux +Qerrxuer +Xeq'xerr'qerr +Qarr'xuq'qux +Xaaq'xuq +Xerxaeq'qux +Xertaq +Kerr'teq'xeu +Xer'aeq'kea +Xe'ter'qerr +Teq'xae +Kerrxerr +Taeqxaeq +Xueker +Keqxae'qerr +Taeqkeax +Kexaeq'xum +Xuekeax'xe +Xumxum +Xeq'ter'xeu +Taeqquex +Xer'xer +Keqxae'xeu +Kaexum +Keq'xaeq +Qerr'quex'xum +Kaexuq'qux +Xaequx'xe +Kae'xum +Keqkeax +Kexuer +Xeter +Xexuq'xeu +Xe'aeq +Xum'keax'xe +Xer'ker'xum +Xerxuq'qer +Xaekeax'xe +Kaequex'xe +Keqxer +Xeker'qer +Teqker'qerr +Keqxer +Teq'xer +Xaaq'xum +Qerrter +Ke'xuer +Kae'xerr'xeu +Qarrteq'kea +Teq'aeq'qux +Teq'xum'qux +Xae'xuq +Xaekeax +Qerr'teq +Kerrteq'qer +Keqxerr +Qarr'xerr'xum +Kekeax +Xae'xae'kea +Xumteq +Xuequx'qer +Qarr'xer +Taeq'xuq +Ke'xum +Kae'xerr +Xumxum'qerr +Keqteq'qer +Teqker'qerr +Qarr'keax +Xeqxer +Qarrxuq'xe +Keqkeax +Xaaq'ter'kea +Xaaq'aeq +Kerr'keax +Keqxuer +Qerr'xerr'kea +Qarr'teq'qerr +Kerr'teq'qerr +Qarr'taq'qer +Qarrxuer'xeu +Kae'ter +Keaeq'xum +Teqker'xum +Xaaq'aeq'qux +Keq'qux'qer +Xae'xuq'kea +Ke'xuq'qux +Qerr'qux +Xaaq'qux'qer +Xue'keax +Xaaqxerr'kea +Taeqteq'xe +Xuetaq +Xaaqxuq'qerr +Qerrxae'xe +Xeqxuer +Xeqxaeq'xum +Xue'ker'qer +Kekeax'xeu +Qarr'xae'qux +Xae'ker'qux +Qarr'xum'xum +Xum'xaeq'xeu +Qerrxer'qerr +Xaeaeq'qer +Xaaq'quex'qerr +Qerr'aeq +Xum'taq +Kerr'xum'xeu +Xaeaeq'kea +Taeqxerr'kea +Taeq'qux'xum +Xaaq'xae +Qerr'quex +Qarrker +Qarr'qux'xeu +Xaaqaeq'qux +Xuetaq +Xaexum +Xae'xaeq +Xaaq'taq'xe +Kerrxaeq'xe +Kae'xer'kea +Kerr'xae'qer +Keqxum'qer +Qarr'taq'xe +Taeq'quex'qer +Xum'xuer +Xer'xuq'qerr +Xeqteq'xum +Xae'xaeq +Xaekeax'qer +Xeq'xum +Qarr'ter'qer +Qarr'xerr +Kae'xae'xum +Taeq'xuq +Kae'xuq'kea +Xue'xum'qux +Xae'xerr +Taeq'xaeq +Xaexuq +Xaequx +Keqter +Kae'xuer +Xaaqaeq +Kae'taq'xeu +Keqter'kea +Taeqaeq +Xae'qux +Qerr'qux +Qarr'xuq'kea +Xeq'xuer +Keqqux +Xaaq'taq'xum +Kae'xerr +Xue'xae'kea +Qarraeq +Taeq'xum +Qerrxer +Teq'xum +Xaaq'ker'xeu +Kerr'xaeq +Xaaq'xerr'xeu +Xaaqxuq'xeu +Taeqter'qer +Teq'xuer +Xaaqker +Qerr'xaeq'qux +Qerr'quex'qux +Xaaqxerr +Keqtaq'xeu +Kerrxuq +Taeqxuq'xe +Taeq'xuq +Xexuq'qerr +Taeq'xae'qux +Kerr'aeq'qer +Teqtaq +Qerr'taq'xeu +Xeqxaeq'kea +Keteq +Qarr'quex'xeu +Kae'xer +Xaaqxuer +Xum'xum +Taeqquex'xeu +Xue'teq +Xumxuq +Teqxer +Xaeteq'xum +Kaexum'qerr +Xaaq'qux +Xe'xum +Qerr'xaeq +Keqxaeq'xe +Xum'xerr +Xuexaeq'xum +Xaaq'xum'kea +Xumteq +Teq'keax'xeu +Xaequex +Ke'ker'kea +Xeq'xuq +Xaaq'quex'xeu +Teq'teq'qux +Qarr'keax +Xequex +Xeqqux +Xerxerr'xum +Kae'teq +Xaaq'qux'xum +Xuetaq'qer +Xaexerr +Xexuer +Xaaq'xerr'qer +Xexae'kea +Xaexuq'qer +Xe'ker +Keq'quex'kea +Qarrqux'qux +Xaaqtaq'kea +Teqxae +Teq'xuq +Ke'aeq +Xae'aeq +Kerr'ter +Xue'xuq'qer +Ke'xaeq +Taeq'xuer'xeu +Xeq'xae +Qerrkeax'kea +Xae'xuq +Teq'keax +Qerr'teq'qer +Kaexuq'xe +Qarrxaeq'xeu +Qerrtaq +Xe'ker'xum +Kaexuer +Teqxuer'xe +Xumxuer'kea +Kerr'xuer +Xer'teq'xum +Xumteq'qerr +Ke'quex +Taeq'aeq'qerr +Xue'ter'xe +Xeq'xae'xeu +Xer'xum +Qarr'xae +Qerrker'qux +Taeq'keax'xeu +Xum'quex'xeu +Kae'ter +Xe'quex'xe +Keqxum +Kerr'quex'qer +Xaaqxae'qer +Xaaqteq'qer +Keqqux +Teq'aeq +Keteq +Xumxae'xum +Xumxum +Qarrxaeq'kea +Keker +Xeq'aeq'qer +Teqter +Qarrxaeq'kea +Teq'quex +Keqxum +Teq'xuer +Xumter'kea +Qarr'xae +Xae'xuer'xeu +Xaaqxaeq'kea +Qerr'xuq'xeu +Xum'xae'qux +Xumxaeq +Xumxum +Kexum'xe +Kae'aeq +Xer'teq +Qarrxerr'xum +Taeq'taq +Taeq'taq'qux +Kaexum'xeu +Xumtaq +Xae'xer +Kerr'ker +Qarr'xum'qer +Qerr'xuer'qux +Xue'qux'xe +Qerr'qux'xum +Teqquex'qerr +Taeqquex +Qarrxerr +Ketaq +Xekeax +Kequex +Xetaq +Ke'xae'xe +Teq'quex'qux diff --git a/config/names/last_name_skrell.txt b/config/names/last_name_skrell.txt new file mode 100644 index 0000000000..5f67fbc536 --- /dev/null +++ b/config/names/last_name_skrell.txt @@ -0,0 +1,600 @@ +Xer'taq'qer +Xaaq'ter'qux +Xaaq'xuer +Xerxuer'xum +Qarrqux +Xueaeq'qux +Xe'aeq +Keqter +Xaexer +Kaeteq +Ke'aeq'xeu +Kerrxum +Teqxuq'xeu +Xexaeq +Qerr'xerr'xum +Xaeker'qux +Kexer'kea +Ke'aeq +Keqxae'kea +Qarraeq'xe +Xuekeax +Keq'quex +Kae'quex'qux +Qerr'taq'xum +Taeq'taq'xum +Kae'xaeq'xe +Xaaq'teq'qux +Teqker +Qerrxum'xeu +Xeq'xaeq'xe +Kae'keax +Xue'xae +Taeq'taq +Keter'xeu +Xumker'xe +Teqteq +Xexuer +Qerrxerr +Kaequex'qerr +Kaequx'xe +Xum'xaeq +Xe'taq +Xuexer +Xe'qux'xeu +Xe'xerr'kea +Qerr'xum +Xaaqtaq +Xuexum'xum +Qerrxer +Xaexuq +Xeq'aeq +Xaaq'xaeq +Xerqux +Xeq'xuq'xeu +Kaexum +Taeqteq'xeu +Kerrter'qux +Xeq'teq +Teqxae'xe +Xae'ker'kea +Keqxuq +Xumxae'kea +Xeq'xerr'kea +Kae'quex +Kae'ter +Teqter'xe +Xeq'xerr'xeu +Xerxum'qux +Xe'qux +Qarr'aeq +Xue'xum'xe +Xaaq'ter'qux +Teq'xer +Kerrtaq +Qerr'aeq +Xaaq'aeq +Xaaqxuer +Qerr'quex +Kaeker +Xae'taq +Teq'xaeq +Xexuq +Keqqux +Kaeker +Xeqxum +Xae'taq'qerr +Kexerr +Ke'xerr'qux +Xeraeq'xum +Kae'qux'qux +Xerkeax'xum +Qarrxum +Kaexuer +Qerrquex +Kerr'xer +Xeq'taq +Xeqker +Kerrquex'xum +Xeteq +Qarrxuer +Xaaqqux'qerr +Xae'xer +Xae'xae +Taeqxuer'qerr +Xumqux'qux +Xuexerr'qerr +Ke'xae'xum +Xerxuer +Xeqtaq +Xeqquex +Xuekeax +Keq'xuq'qerr +Xaeter +Xumxerr +Xeqxaeq'xe +Xae'ker +Qerr'ker +Xeq'aeq +Kae'keax +Qerrkeax +Xeqxerr +Keqxaeq +Xae'xuq +Kerrkeax'qer +Qarrxum'xum +Teq'xum'xeu +Kerrxer +Xe'xum +Kexae'xeu +Xerxerr'xe +Xum'ter +Xe'keax +Qarr'xer'kea +Xaaq'aeq +Xaaqker'qerr +Ke'ker +Qerr'xum +Qerr'xae'xe +Qarr'ter'xum +Kaexerr +Qarrtaq'qux +Xumxaeq +Xaeaeq'xe +Qarr'xae'qux +Xer'xum'qerr +Kae'xuq +Xaaq'qux'kea +Teqtaq +Kekeax +Xe'keax'qerr +Kerr'keax'qerr +Xeqkeax +Xer'xaeq +Xerter'kea +Xum'xuq'xe +Teqaeq +Ke'teq'qux +Xer'xuq'kea +Keq'xum'xeu +Xerxuer'xeu +Xum'keax'xum +Xaaq'ter +Xuetaq +Taeq'xuer'qux +Xuexum'xe +Xeq'quex'kea +Xum'xer +Xeqaeq +Qerr'ker +Xumxum +Xeqxum +Xae'taq'qerr +Taeq'ker +Xue'xae'xe +Xer'taq'xe +Xum'xaeq +Kaexuq'xum +Kaexuq'qux +Ke'xum'xum +Qerr'xerr'xum +Ke'xuq'qux +Taeq'xaeq +Xumtaq +Xetaq +Kaexerr'xum +Kequx +Xuexerr'xeu +Xeaeq +Keq'qux'kea +Xeq'xaeq +Xuexum +Ke'xerr'xe +Xe'xum +Kerr'xaeq +Xeqkeax'qux +Kaeteq +Xer'quex +Teqaeq'qerr +Xaexerr +Xaeter +Xumxuer'qer +Teqxae +Taeqtaq'qerr +Kerr'qux +Xuequex +Xaaqtaq'kea +Teq'keax +Ke'xuer'kea +Xum'quex'xeu +Xaexer'kea +Kerr'quex'xum +Qarrxaeq'xum +Kerr'xaeq'xeu +Xaaq'xerr'xum +Xeqxaeq +Xaaqxae'xeu +Qerrxae +Xae'xer +Xexer +Qarrter'xe +Xaaq'taq'xum +Taeq'aeq +Teq'xer +Xaexae'xum +Ke'aeq +Teqxuer +Qerrxuq +Xaaq'ker +Xeq'quex +Kerr'qux +Xekeax'qerr +Kerr'qux'xum +Ke'teq +Qarrxae'xum +Qerr'ter'qux +Qerr'keax +Taeqxuer'kea +Qerr'xae +Keqker'xeu +Xueter +Xae'teq'kea +Xumkeax'qux +Keq'keax +Qarr'xerr'qux +Xuekeax'qerr +Taeq'xuq'xe +Keq'aeq'xe +Xue'xuer'qux +Qerr'quex'qux +Xaexerr'qux +Qerrxaeq +Qerr'xerr +Qarr'xuer +Qerrxae +Taeq'xaeq'xeu +Kerr'ter +Kerrker'qux +Kaexae'xum +Kerrtaq'qerr +Xae'aeq'qer +Xer'xerr +Kae'xuer'qux +Qerr'xer'qerr +Keq'taq'qer +Taeqxer'xum +Xaaq'xuq +Xue'qux +Taeq'xaeq +Xe'teq'xe +Teq'xuq +Taeq'xum'qux +Xaaqter'xum +Taeq'taq +Xaaqxerr'qer +Xuetaq'qerr +Xum'xae +Qerrxer'xe +Qerr'xaeq'kea +Xeq'ker +Xeqteq'qerr +Kerr'aeq'qer +Xum'teq'qerr +Xuexuq'kea +Xue'taq +Xum'qux'xe +Kerrker +Xue'ter'xeu +Xaexaeq +Xaexerr'kea +Teqtaq'kea +Xuexuer'xe +Xue'xae'xeu +Taeq'quex +Keqteq +Kae'aeq'xum +Teqaeq'qerr +Xaaqxum +Qarr'teq'qux +Kaexer +Xue'xum +Qerrtaq'qer +Taeq'teq'qux +Xueter +Xum'ker'xe +Xue'keax +Xum'quex'qerr +Kaeaeq'qerr +Xeqxae +Keqxuer'xeu +Xeqxum +Teqxuq +Kaeker +Xaaq'taq +Keqquex'kea +Xe'ker +Xeq'aeq'kea +Xue'qux +Xerxuq +Taeq'quex +Kequx'qux +Xueker'qux +Teqxum'qer +Kerrxuq'qer +Xerker +Xue'xuer +Xue'qux +Taeq'xuq +Keq'qux'xum +Qarr'quex'xe +Kae'xer'kea +Qarr'xum'xeu +Keqker'xum +Ketaq +Xue'teq +Xuexerr +Xeqker +Xe'xum'xeu +Xeq'ter'qerr +Taeqxuq +Kaeter +Keq'taq +Xum'xum +Xumxuer'xum +Teqter'qerr +Keq'qux'xe +Keq'xer'qer +Xueaeq'xeu +Taeqxuer'kea +Keqxae'xeu +Kae'taq +Xerkeax +Xeqker +Kerrxer +Taeq'xerr'xe +Qerr'xerr'qerr +Xe'ker'xe +Kae'qux'qerr +Kaequex +Xaaq'teq'qer +Xumxerr +Xe'quex +Qerr'xum'qux +Qerrxae +Qerrquex +Kae'xae'qerr +Qarrquex +Kerrxae +Xaaq'taq'xeu +Qarr'xae'qux +Xeqker +Xaaqxuq'qer +Xaaqter +Xerxerr +Xue'taq'qer +Qarrxer'qerr +Xae'ter'xum +Kerrter'qerr +Kerrter'kea +Xae'aeq +Xe'xer +Teq'keax'xeu +Kexum'xe +Xueteq +Kae'keax +Xaaq'keax +Xaaq'quex'qux +Taeqqux +Taeq'xum +Xerxuer +Qerrxer +Xaexuer +Teqter +Qarr'xer +Qarrxaeq'xum +Ke'teq +Teq'xae +Kaexerr +Qarr'teq +Xer'ker +Xaexuer'qux +Xeq'qux +Taeqxer +Taeqxaeq +Xumxuer +Taeqxuer'qerr +Kae'xuer +Qerrter +Taeq'aeq'kea +Taeq'xer'xum +Kerrter +Xum'xuer +Xue'ker'qux +Xaaqter'qux +Xue'ter'xe +Xueteq +Xaaq'xae +Xaexerr'qerr +Ke'aeq'qerr +Xaaq'xuq'xeu +Xuekeax +Xumteq +Xexuq +Taeq'ker'xeu +Xaaqaeq +Qarrxum +Xerxuq'xum +Kaexerr +Xeq'ter'xeu +Keqaeq +Xeqxuer'xum +Teqkeax'xeu +Kae'aeq'kea +Ke'xerr +Ke'xuq +Kae'quex +Xeqxae +Kaeter +Xeqxer +Kae'xuer +Taeqtaq'xum +Teq'qux'xeu +Xaequex'xum +Qarrquex +Xaaq'qux +Keqquex +Qerrker'qerr +Xexae'xe +Xerxae +Xaaqker'kea +Kexer'qerr +Xaeaeq +Xaaqqux +Qarr'xer'qer +Keq'xuq +Kae'keax +Qerr'teq'qer +Kae'xaeq'qer +Xaexer +Kerrxer'xeu +Kaekeax +Xaaq'xaeq'xeu +Xae'xae +Qarr'keax +Teqqux'qerr +Xeq'ter'qerr +Taeq'ker +Qerrteq'xeu +Keqqux'xeu +Xaaqteq'qerr +Teqteq'xe +Xaaqter +Xaaqkeax +Xeqqux +Xaaq'xerr +Teq'ker'qerr +Xer'taq'qerr +Qarrxum'qux +Xum'taq'qux +Qarr'xer'xeu +Xerxerr'qux +Kerr'teq +Xum'taq'kea +Xaequex +Kaeaeq'xe +Xe'xaeq'xum +Xuexuer'qer +Kerrxuq +Kerrxuer'qerr +Kaeteq +Xaaqxuer +Xeq'xum'qerr +Xumxer +Xe'ter'xeu +Xueaeq +Keq'keax +Xueter +Xaexaeq +Keqxaeq +Ke'aeq +Xumxum'qerr +Xumxae'xum +Xaaqxuer +Ke'ker +Ke'xer +Xuekeax'qerr +Keq'teq +Kerr'ter'qux +Xe'xerr +Qerrxae +Ke'quex'xeu +Keqxuq +Kerrxuer +Keq'xae +Qarr'xuq +Xumxuq +Qarr'teq'qer +Xe'xae'xeu +Xuexum +Xequx +Xaaq'teq'xum +Xue'xuq +Kae'quex'qer +Qarrxer'qerr +Xumaeq'xeu +Qarrkeax +Kae'xer'qux +Xeq'qux'qer +Xueker'qux +Teqquex +Xae'xaeq'xum +Taeqkeax +Xaaq'teq'qux +Keqxerr'xe +Xue'ter'xe +Xe'xaeq +Qerrker +Xaexum'qer +Keqteq'xum +Taeq'xae'xum +Kaexuer'qux +Xe'ter +Xae'taq'qux +Qarr'aeq +Xae'xum +Qarrxum'xum +Keqxer'xum +Qarr'xerr +Teqxae +Ke'xae'xe +Teqkeax'qux +Xe'taq +Xaetaq +Keq'teq'kea +Keqxaeq +Xue'xuq +Qarr'xerr'qer +Xequex +Keqxum +Keqtaq +Qarr'ker'xum +Kerr'xer'qer +Kerrxae'xum +Xum'xae +Kaequex'qux +Xuequx'xe +Xumquex'qer +Taeqker +Xae'quex +Xer'teq'xe +Xerxerr +Ke'xuq'qer +Taeqxerr'kea +Xaaq'xaeq'kea +Keq'teq +Xue'aeq'xeu +Xaaqxer'xeu +Ke'ker'qerr +Xue'quex +Taeqtaq +Teqter +Kequex'xe +Xuexuer'qerr +Xeqxum +Xue'taq +Xer'xuq'qerr +Xeqxaeq'xe +Qerr'xaeq +Xeqxae'qer +Taeqtaq'kea +Xer'teq +Qerr'xaeq'xum +Xaaq'xae +Xum'xuq +Xaaqxaeq +Xaexum +Xaaqxum'xe +Xertaq +Xuexuq'qerr +Xaaq'xae'kea +Qerr'teq'qer diff --git a/html/changelog.html b/html/changelog.html index d62a2751dc..f7b88aa5d8 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -53,6 +53,41 @@ -->
+

08 August 2018

+

Atermonera updated:

+ +

Mechoid updated:

+ +

Neerti updated:

+ + +

01 August 2018

+

KasparoVv updated:

+ +

Mechoid updated:

+ +

Mewchild updated:

+ +

PrismaticGynoid updated:

+ +

14 July 2018

Anewbe updated:

Mechoid updated:

PrismaticGynoid updated:

@@ -263,7 +298,7 @@
{{empty}} diff --git a/nano/templates/supply_records.tmpl b/nano/templates/supply_records.tmpl new file mode 100644 index 0000000000..8a8a749bd2 --- /dev/null +++ b/nano/templates/supply_records.tmpl @@ -0,0 +1,226 @@ +

Supply Records

+ + +
+ + Supply points: {{:data.supply_points}}
+ + +
+

Supply Shuttle

+
+ Location:
+ Engines: +
+
+ {{:data.shuttle.location}}
+ {{:data.shuttle.engine}} +
+ {{if data.shuttle.mode == 4}} +
+ ETA: +
+
+ {{:data.shuttle.time}} minutes +
+ {{/if}} + {{if data.shuttle_auth}} + + {{if data.shuttle.launch == 1 && data.shuttle.mode == 0}} + {{:helper.link('Send away', 'suitcase', {'send_shuttle' : 'send_away'})}} + {{else data.shuttle.launch == 2 && (data.shuttle.mode == 3 || data.shuttle.mode == 1)}} + {{:helper.link('Cancel launch', 'stop', {'send_shuttle' : 'cancel_shuttle'})}} + {{else data.shuttle.launch == 1 && data.shuttle.mode == 5}} + {{:helper.link('Send shuttle', 'suitcase', {'send_shuttle' : 'send_to_station'})}} + {{/if}} + {{if data.shuttle.force}} + {{:helper.link('Force launch', 'alert', {'send_shuttle' : 'force_shuttle'})}} + {{/if}} + {{/if}} +
+
+ + +{{if data.currentTab == 0}} +
+ +
+ {{:helper.link('Request items', 'note', {'switch_tab' : 1})}} +
+ + +
+ {{:helper.link('View accepted orders', 'cart', {'switch_tab' : "Approved"})}} +
+ + +
+ {{:helper.link('View pending requests', 'cart', {'switch_tab' : "Requested"})}} +
+ + + {{:helper.link('View order history', 'document', {'switch_tab' : "All"})}} + + +
+ {{:helper.link('View export history', 'document', {'switch_tab' : "Export"})}} +
+
+ +{{else}} + {{:helper.link('Back to menu', 'arrowreturn-1-w', {'switch_tab' : 0})}} + + + + {{if data.currentTab == 1}} + {{for data.categories}} +
+ {{:helper.link(value, 'bookmark', {'switch_tab' : value, 'active_category' : value})}} +
+ {{/for}} + + + {{else data.currentTab == "Export"}} +

Exported Crates

+ {{for data.receipts}} +
+
+ {{for value.title :titleVal:titleIndex}} +
+ {{:titleVal.field}} +
+
+ {{:titleVal.entry}} + {{if data.order_auth}} + + {{:helper.link('Edit', 'wrench', {'order_ref' : value.ref, 'edit' : titleVal.field, 'default' : titleVal.entry, 'user' : data.user})}} + + {{/if}} +
+ {{/for}} + + {{if value.error}} +
+ + Error + +
+
+ {{:value.error}} +
+ {{else}} + {{for value.contents :contentVal:contentIndex}} +
+ {{:contentVal.quantity}}x {{:contentVal.object}} - {{:contentVal.value}} points +
+ {{if data.order_auth}} +
+ {{:helper.link('Edit Quantity','wrench', {'export_ref' : value.ref, 'edit' : 1, 'default' : contentVal.quantity, 'index' : contentIndex, 'user' : data.user})}} + {{:helper.link('Delete Entry', 'trash', {'export_ref' : value.ref, 'delete' : 1, 'index' : contentIndex, 'user' : data.user})}} +
+ {{/if}} + {{/for}} + {{/if}} + + {{if data.order_auth}} +
{{:helper.link('Add item to record', 'plus', {'export_ref' : value.ref, 'add_item' : 1, 'user' : data.user})}} +
{{:helper.link('Delete record', 'trash', {'export_ref' : value.ref, 'delete' : 1, 'user' : data.user})}} + {{/if}} +
+ {{empty}} +
No receipts on record!
+ {{/for}} + + + + + + {{else data.currentTab == "Approved" || data.currentTab == "Requested" || data.currentTab == "All"}} +

{{:data.currentTab}} Orders

+ {{for data.orders}} + {{if (value.status == data.currentTab) || (data.currentTab == "All")}} +
+
+ {{for value.entries :entryVal:entryIndex}} + + {{if entryVal.entry}} +
+ {{:entryVal.field}} +
+
+ {{:entryVal.entry}} + {{if data.order_auth}} + + {{:helper.link('Edit', 'wrench', {'order_ref' : value.ref, 'edit' : entryVal.field, 'default' : entryVal.entry, 'user' : data.user})}} + + {{/if}} +
+ {{/if}} + {{/for}} + + {{if data.currentTab == "All"}} +
+ Status +
+
+ {{:value.status}} +
+ {{if data.order_auth}} +
{{:helper.link('Delete record', 'trash', {'order_ref' : value.ref, 'delete' : 1, 'user' : data.user})}} + {{/if}} + {{/if}} + + {{if data.order_auth && data.currentTab == "Requested"}} + {{:helper.link('Approve', 'check', {'order_ref' : value.ref, 'approve' : 1, 'user' : data.user})}} + {{:helper.link('Deny', 'cancel', {'order_ref' : value.ref, 'deny' : 1, 'user' : data.user})}} + {{/if}} +
+ {{/if}} + {{empty}} +
No orders on record!
+ {{/for}} + + {{if data.currentTab == "Requested" && data.order_auth}} + {{:helper.link('Clear all requests', 'trash', {'clear_all_requests' : 1, 'user' : data.user})}} + {{/if}} + + + + {{else}} +
+ {{:helper.link('Back to categories', 'arrow-return-1-w', {'switch_tab' : 1})}} +
+ +

+ {{:data.active_category}} +

+ + {{for data.supply_packs :packValue:packIndex}} + {{if !packValue.contraband || data.contraband}} +
+ + {{:helper.link(packValue.name + ' - ' + packValue.cost, packValue.expand ? 'folder-open' : 'folder-collapsed', {'cartridge_topic' : 1, 'pack_ref' : packValue.ref, 'expand' : 1})}} +
+ + {{if packValue.expand}} +
+
+ {{if packValue.random}} + Contains any {{:packValue.random}} of:
+ {{/if}} + + {{for packValue.manifest :manifestElem:manifestIndex}} + {{:manifestElem}}
+ {{/for}} +
+ +
+ {{:helper.link('Request', 'cart', {'cartridge_topic' : 1, 'pack_ref' : packValue.ref, 'request' : 1, 'user' : data.user})}} +
+
+
+ {{/if}} + {{/if}} + {{/for}} + {{/if}} +{{/if}} \ No newline at end of file diff --git a/polaris.dme b/polaris.dme index f2133174a1..7e91b653e5 100644 --- a/polaris.dme +++ b/polaris.dme @@ -30,6 +30,7 @@ #include "code\__defines\damage_organs.dm" #include "code\__defines\dna.dm" #include "code\__defines\gamemode.dm" +#include "code\__defines\holomap.dm" #include "code\__defines\inventory_sizes.dm" #include "code\__defines\items_clothing.dm" #include "code\__defines\lighting.dm" @@ -48,6 +49,7 @@ #include "code\__defines\species_languages.dm" #include "code\__defines\stat_tracking.dm" #include "code\__defines\subsystems.dm" +#include "code\__defines\supply.dm" #include "code\__defines\targeting.dm" #include "code\__defines\turfs.dm" #include "code\__defines\unit_tests.dm" @@ -185,6 +187,7 @@ #include "code\controllers\subsystems\airflow.dm" #include "code\controllers\subsystems\atoms.dm" #include "code\controllers\subsystems\garbage.dm" +#include "code\controllers\subsystems\holomaps.dm" #include "code\controllers\subsystems\lighting.dm" #include "code\controllers\subsystems\machines.dm" #include "code\controllers\subsystems\orbits.dm" @@ -354,7 +357,6 @@ #include "code\game\shuttle_engines.dm" #include "code\game\skincmd.dm" #include "code\game\sound.dm" -#include "code\game\supplyshuttle.dm" #include "code\game\trader_visit.dm" #include "code\game\antagonist\_antagonist_setup.dm" #include "code\game\antagonist\antagonist.dm" @@ -945,7 +947,6 @@ #include "code\game\objects\items\weapons\syndie.dm" #include "code\game\objects\items\weapons\tape.dm" #include "code\game\objects\items\weapons\teleportation.dm" -#include "code\game\objects\items\weapons\tools.dm" #include "code\game\objects\items\weapons\towels.dm" #include "code\game\objects\items\weapons\traps.dm" #include "code\game\objects\items\weapons\trays.dm" @@ -984,6 +985,7 @@ #include "code\game\objects\items\weapons\grenades\grenade.dm" #include "code\game\objects\items\weapons\grenades\smokebomb.dm" #include "code\game\objects\items\weapons\grenades\spawnergrenade.dm" +#include "code\game\objects\items\weapons\grenades\supermatter.dm" #include "code\game\objects\items\weapons\id cards\cards.dm" #include "code\game\objects\items\weapons\id cards\station_ids.dm" #include "code\game\objects\items\weapons\id cards\syndicate_ids.dm" @@ -1034,6 +1036,11 @@ #include "code\game\objects\items\weapons\tanks\jetpack.dm" #include "code\game\objects\items\weapons\tanks\tank_types.dm" #include "code\game\objects\items\weapons\tanks\tanks.dm" +#include "code\game\objects\items\weapons\tools\crowbar.dm" +#include "code\game\objects\items\weapons\tools\screwdriver.dm" +#include "code\game\objects\items\weapons\tools\weldingtool.dm" +#include "code\game\objects\items\weapons\tools\wirecutters.dm" +#include "code\game\objects\items\weapons\tools\wrench.dm" #include "code\game\objects\random\_random.dm" #include "code\game\objects\random\guns_and_ammo.dm" #include "code\game\objects\random\maintenance.dm" @@ -1112,6 +1119,7 @@ #include "code\game\objects\structures\flora\grass.dm" #include "code\game\objects\structures\flora\trees.dm" #include "code\game\objects\structures\ghost_pods\ghost_pods.dm" +#include "code\game\objects\structures\ghost_pods\mysterious.dm" #include "code\game\objects\structures\ghost_pods\silicon.dm" #include "code\game\objects\structures\props\alien_props.dm" #include "code\game\objects\structures\props\beam_prism.dm" @@ -1245,6 +1253,7 @@ #include "code\modules\admin\verbs\dice.dm" #include "code\modules\admin\verbs\getlogs.dm" #include "code\modules\admin\verbs\grief_fixers.dm" +#include "code\modules\admin\verbs\lightning_strike.dm" #include "code\modules\admin\verbs\map_template_loadverb.dm" #include "code\modules\admin\verbs\mapping.dm" #include "code\modules\admin\verbs\massmodvar.dm" @@ -1383,6 +1392,7 @@ #include "code\modules\clothing\head\flowercrowns.dm" #include "code\modules\clothing\head\hardhat.dm" #include "code\modules\clothing\head\helmet.dm" +#include "code\modules\clothing\head\hood.dm" #include "code\modules\clothing\head\jobs.dm" #include "code\modules\clothing\head\misc.dm" #include "code\modules\clothing\head\misc_special.dm" @@ -1430,12 +1440,12 @@ #include "code\modules\clothing\spacesuits\void\wizard.dm" #include "code\modules\clothing\suits\armor.dm" #include "code\modules\clothing\suits\bio.dm" +#include "code\modules\clothing\suits\hooded.dm" #include "code\modules\clothing\suits\jobs.dm" #include "code\modules\clothing\suits\labcoat.dm" #include "code\modules\clothing\suits\miscellaneous.dm" #include "code\modules\clothing\suits\solgov.dm" #include "code\modules\clothing\suits\storage.dm" -#include "code\modules\clothing\suits\toggles.dm" #include "code\modules\clothing\suits\utility.dm" #include "code\modules\clothing\suits\wiz_robe.dm" #include "code\modules\clothing\suits\aliens\seromi.dm" @@ -1549,6 +1559,7 @@ #include "code\modules\ext_scripts\python.dm" #include "code\modules\flufftext\Dreaming.dm" #include "code\modules\flufftext\Hallucination.dm" +#include "code\modules\flufftext\look_up.dm" #include "code\modules\flufftext\TextFilters.dm" #include "code\modules\food\recipe_dump.dm" #include "code\modules\food\recipes_microwave.dm" @@ -1580,6 +1591,10 @@ #include "code\modules\holodeck\HolodeckControl.dm" #include "code\modules\holodeck\HolodeckObjects.dm" #include "code\modules\holodeck\HolodeckPrograms.dm" +#include "code\modules\holomap\generate_holomap.dm" +#include "code\modules\holomap\holomap_area.dm" +#include "code\modules\holomap\holomap_datum.dm" +#include "code\modules\holomap\station_holomap.dm" #include "code\modules\hydroponics\_hydro_setup.dm" #include "code\modules\hydroponics\grown.dm" #include "code\modules\hydroponics\grown_inedible.dm" @@ -1909,45 +1924,29 @@ #include "code\modules\mob\living\simple_animal\simple_animal.dm" #include "code\modules\mob\living\simple_animal\simple_hud.dm" #include "code\modules\mob\living\simple_animal\aliens\alien.dm" -#include "code\modules\mob\living\simple_animal\aliens\creature.dm" -#include "code\modules\mob\living\simple_animal\aliens\drone.dm" -#include "code\modules\mob\living\simple_animal\aliens\faithless.dm" -#include "code\modules\mob\living\simple_animal\aliens\hivebot.dm" #include "code\modules\mob\living\simple_animal\aliens\mimic.dm" #include "code\modules\mob\living\simple_animal\aliens\statue.dm" #include "code\modules\mob\living\simple_animal\animals\bat.dm" #include "code\modules\mob\living\simple_animal\animals\bear.dm" -#include "code\modules\mob\living\simple_animal\animals\carp.dm" #include "code\modules\mob\living\simple_animal\animals\cat.dm" #include "code\modules\mob\living\simple_animal\animals\corgi.dm" -#include "code\modules\mob\living\simple_animal\animals\crab.dm" #include "code\modules\mob\living\simple_animal\animals\farm_animals.dm" -#include "code\modules\mob\living\simple_animal\animals\fish.dm" -#include "code\modules\mob\living\simple_animal\animals\giant_spider.dm" #include "code\modules\mob\living\simple_animal\animals\goose.dm" -#include "code\modules\mob\living\simple_animal\animals\lizard.dm" -#include "code\modules\mob\living\simple_animal\animals\miscellaneous.dm" #include "code\modules\mob\living\simple_animal\animals\mouse.dm" #include "code\modules\mob\living\simple_animal\animals\parrot.dm" -#include "code\modules\mob\living\simple_animal\animals\penguin.dm" #include "code\modules\mob\living\simple_animal\animals\spiderbot.dm" #include "code\modules\mob\living\simple_animal\animals\tomato.dm" #include "code\modules\mob\living\simple_animal\animals\tree.dm" #include "code\modules\mob\living\simple_animal\animals\worm.dm" -#include "code\modules\mob\living\simple_animal\animals\sif_wildlife\diyaab.dm" -#include "code\modules\mob\living\simple_animal\animals\sif_wildlife\savik.dm" -#include "code\modules\mob\living\simple_animal\animals\sif_wildlife\shantak.dm" #include "code\modules\mob\living\simple_animal\borer\borer.dm" #include "code\modules\mob\living\simple_animal\borer\borer_captive.dm" #include "code\modules\mob\living\simple_animal\borer\borer_powers.dm" #include "code\modules\mob\living\simple_animal\borer\say.dm" #include "code\modules\mob\living\simple_animal\humanoids\clown.dm" -#include "code\modules\mob\living\simple_animal\humanoids\head.dm" #include "code\modules\mob\living\simple_animal\humanoids\kobold.dm" #include "code\modules\mob\living\simple_animal\humanoids\mechamobs.dm" #include "code\modules\mob\living\simple_animal\humanoids\pirate.dm" #include "code\modules\mob\living\simple_animal\humanoids\russian.dm" -#include "code\modules\mob\living\simple_animal\humanoids\syndicate.dm" #include "code\modules\mob\living\simple_animal\slime\ai.dm" #include "code\modules\mob\living\simple_animal\slime\combat.dm" #include "code\modules\mob\living\simple_animal\slime\death.dm" @@ -1974,6 +1973,7 @@ #include "code\modules\mob\living\simple_mob\subtypes\animal\giant_spider\phorogenic.dm" #include "code\modules\mob\living\simple_mob\subtypes\animal\giant_spider\thermic.dm" #include "code\modules\mob\living\simple_mob\subtypes\animal\giant_spider\tunneler.dm" +#include "code\modules\mob\living\simple_mob\subtypes\animal\giant_spider\webslinger.dm" #include "code\modules\mob\living\simple_mob\subtypes\animal\passive\crab.dm" #include "code\modules\mob\living\simple_mob\subtypes\animal\passive\fish.dm" #include "code\modules\mob\living\simple_mob\subtypes\animal\passive\lizard.dm" @@ -2529,7 +2529,6 @@ #include "interface\interface.dm" #include "interface\skin.dmf" #include "maps\southern_cross\southern_cross.dm" -#include "maps\submaps\_readme.dm" #include "maps\submaps\space_submaps\space.dm" #include "maps\submaps\surface_submaps\mountains\mountains.dm" #include "maps\submaps\surface_submaps\mountains\mountains_areas.dm" diff --git a/sound/ambience/ambimalf.ogg b/sound/ambience/ai/ai1.ogg similarity index 100% rename from sound/ambience/ambimalf.ogg rename to sound/ambience/ai/ai1.ogg diff --git a/sound/ambience/ambigen2.ogg b/sound/ambience/ambigen2.ogg deleted file mode 100644 index 6a5a2d27c9..0000000000 Binary files a/sound/ambience/ambigen2.ogg and /dev/null differ diff --git a/sound/ambience/ambigen1.ogg b/sound/ambience/arrivals/arrivals1.ogg similarity index 100% rename from sound/ambience/ambigen1.ogg rename to sound/ambience/arrivals/arrivals1.ogg diff --git a/sound/ambience/ambigen14.ogg b/sound/ambience/arrivals/arrivals2.ogg similarity index 100% rename from sound/ambience/ambigen14.ogg rename to sound/ambience/arrivals/arrivals2.ogg diff --git a/sound/ambience/ambicha1.ogg b/sound/ambience/chapel/chapel1.ogg similarity index 100% rename from sound/ambience/ambicha1.ogg rename to sound/ambience/chapel/chapel1.ogg diff --git a/sound/ambience/ambicha2.ogg b/sound/ambience/chapel/chapel2.ogg similarity index 100% rename from sound/ambience/ambicha2.ogg rename to sound/ambience/chapel/chapel2.ogg diff --git a/sound/ambience/ambicha3.ogg b/sound/ambience/chapel/chapel3.ogg similarity index 100% rename from sound/ambience/ambicha3.ogg rename to sound/ambience/chapel/chapel3.ogg diff --git a/sound/ambience/ambicha4.ogg b/sound/ambience/chapel/chapel4.ogg similarity index 100% rename from sound/ambience/ambicha4.ogg rename to sound/ambience/chapel/chapel4.ogg diff --git a/sound/ambience/engineering/engineering1.ogg b/sound/ambience/engineering/engineering1.ogg new file mode 100644 index 0000000000..c832c677d5 Binary files /dev/null and b/sound/ambience/engineering/engineering1.ogg differ diff --git a/sound/ambience/engineering/engineering2.ogg b/sound/ambience/engineering/engineering2.ogg new file mode 100644 index 0000000000..9651049c25 Binary files /dev/null and b/sound/ambience/engineering/engineering2.ogg differ diff --git a/sound/ambience/engineering/engineering3.ogg b/sound/ambience/engineering/engineering3.ogg new file mode 100644 index 0000000000..63afd437a6 Binary files /dev/null and b/sound/ambience/engineering/engineering3.ogg differ diff --git a/sound/ambience/foreboding/foreboding1.ogg b/sound/ambience/foreboding/foreboding1.ogg new file mode 100644 index 0000000000..b6e65c0bf6 Binary files /dev/null and b/sound/ambience/foreboding/foreboding1.ogg differ diff --git a/sound/ambience/foreboding/foreboding2.ogg b/sound/ambience/foreboding/foreboding2.ogg new file mode 100644 index 0000000000..dde64a9858 Binary files /dev/null and b/sound/ambience/foreboding/foreboding2.ogg differ diff --git a/sound/ambience/ambigen3.ogg b/sound/ambience/generic/generic1.ogg similarity index 100% rename from sound/ambience/ambigen3.ogg rename to sound/ambience/generic/generic1.ogg diff --git a/sound/ambience/ambigen4.ogg b/sound/ambience/generic/generic2.ogg similarity index 100% rename from sound/ambience/ambigen4.ogg rename to sound/ambience/generic/generic2.ogg diff --git a/sound/ambience/ambigen5.ogg b/sound/ambience/generic/generic3.ogg similarity index 100% rename from sound/ambience/ambigen5.ogg rename to sound/ambience/generic/generic3.ogg diff --git a/sound/ambience/ambigen6.ogg b/sound/ambience/generic/generic4.ogg similarity index 100% rename from sound/ambience/ambigen6.ogg rename to sound/ambience/generic/generic4.ogg diff --git a/sound/ambience/ambimo1.ogg b/sound/ambience/ghostly/ghostly1.ogg similarity index 100% rename from sound/ambience/ambimo1.ogg rename to sound/ambience/ghostly/ghostly1.ogg diff --git a/sound/ambience/ambimo2.ogg b/sound/ambience/ghostly/ghostly2.ogg similarity index 100% rename from sound/ambience/ambimo2.ogg rename to sound/ambience/ghostly/ghostly2.ogg diff --git a/sound/ambience/highsec/highsec1.ogg b/sound/ambience/highsec/highsec1.ogg new file mode 100644 index 0000000000..265b51f2c9 Binary files /dev/null and b/sound/ambience/highsec/highsec1.ogg differ diff --git a/sound/ambience/highsec/highsec2.ogg b/sound/ambience/highsec/highsec2.ogg new file mode 100644 index 0000000000..761c63a480 Binary files /dev/null and b/sound/ambience/highsec/highsec2.ogg differ diff --git a/sound/ambience/holy/holy1.ogg b/sound/ambience/holy/holy1.ogg new file mode 100644 index 0000000000..cd53dc2789 Binary files /dev/null and b/sound/ambience/holy/holy1.ogg differ diff --git a/sound/ambience/holy/holy2.ogg b/sound/ambience/holy/holy2.ogg new file mode 100644 index 0000000000..4532dd0a81 Binary files /dev/null and b/sound/ambience/holy/holy2.ogg differ diff --git a/sound/ambience/lava/lava1.ogg b/sound/ambience/lava/lava1.ogg new file mode 100644 index 0000000000..b552965faa Binary files /dev/null and b/sound/ambience/lava/lava1.ogg differ diff --git a/sound/ambience/ambigen7.ogg b/sound/ambience/maintenance/maintenance1.ogg similarity index 100% rename from sound/ambience/ambigen7.ogg rename to sound/ambience/maintenance/maintenance1.ogg diff --git a/sound/ambience/ambigen8.ogg b/sound/ambience/maintenance/maintenance2.ogg similarity index 100% rename from sound/ambience/ambigen8.ogg rename to sound/ambience/maintenance/maintenance2.ogg diff --git a/sound/ambience/ambigen9.ogg b/sound/ambience/maintenance/maintenance3.ogg similarity index 100% rename from sound/ambience/ambigen9.ogg rename to sound/ambience/maintenance/maintenance3.ogg diff --git a/sound/ambience/ambigen10.ogg b/sound/ambience/maintenance/maintenance4.ogg similarity index 100% rename from sound/ambience/ambigen10.ogg rename to sound/ambience/maintenance/maintenance4.ogg diff --git a/sound/ambience/ambigen11.ogg b/sound/ambience/maintenance/maintenance5.ogg similarity index 100% rename from sound/ambience/ambigen11.ogg rename to sound/ambience/maintenance/maintenance5.ogg diff --git a/sound/ambience/ambigen12.ogg b/sound/ambience/maintenance/maintenance6.ogg similarity index 100% rename from sound/ambience/ambigen12.ogg rename to sound/ambience/maintenance/maintenance6.ogg diff --git a/sound/ambience/otherworldly/otherworldly1.ogg b/sound/ambience/otherworldly/otherworldly1.ogg new file mode 100644 index 0000000000..77599fac5b Binary files /dev/null and b/sound/ambience/otherworldly/otherworldly1.ogg differ diff --git a/sound/ambience/otherworldly/otherworldly2.ogg b/sound/ambience/otherworldly/otherworldly2.ogg new file mode 100644 index 0000000000..3bc051cf5a Binary files /dev/null and b/sound/ambience/otherworldly/otherworldly2.ogg differ diff --git a/sound/ambience/otherworldly/otherworldly3.ogg b/sound/ambience/otherworldly/otherworldly3.ogg new file mode 100644 index 0000000000..3ef1211897 Binary files /dev/null and b/sound/ambience/otherworldly/otherworldly3.ogg differ diff --git a/sound/ambience/ruins/ruins1.ogg b/sound/ambience/ruins/ruins1.ogg new file mode 100644 index 0000000000..ff4cef4a41 Binary files /dev/null and b/sound/ambience/ruins/ruins1.ogg differ diff --git a/sound/ambience/ruins/ruins2.ogg b/sound/ambience/ruins/ruins2.ogg new file mode 100644 index 0000000000..2dc408e2b6 Binary files /dev/null and b/sound/ambience/ruins/ruins2.ogg differ diff --git a/sound/ambience/ruins/ruins3.ogg b/sound/ambience/ruins/ruins3.ogg new file mode 100644 index 0000000000..ad56a915f9 Binary files /dev/null and b/sound/ambience/ruins/ruins3.ogg differ diff --git a/sound/ambience/ruins/ruins4.ogg b/sound/ambience/ruins/ruins4.ogg new file mode 100644 index 0000000000..2073b5a277 Binary files /dev/null and b/sound/ambience/ruins/ruins4.ogg differ diff --git a/sound/ambience/ruins/ruins5.ogg b/sound/ambience/ruins/ruins5.ogg new file mode 100644 index 0000000000..4b6c79a72d Binary files /dev/null and b/sound/ambience/ruins/ruins5.ogg differ diff --git a/sound/ambience/ruins/ruins6.ogg b/sound/ambience/ruins/ruins6.ogg new file mode 100644 index 0000000000..ed88fcd52d Binary files /dev/null and b/sound/ambience/ruins/ruins6.ogg differ diff --git a/sound/ambience/seag1.ogg b/sound/ambience/seag1.ogg deleted file mode 100644 index 8b26eeefc4..0000000000 Binary files a/sound/ambience/seag1.ogg and /dev/null differ diff --git a/sound/ambience/seag2.ogg b/sound/ambience/seag2.ogg deleted file mode 100644 index b0c714b77b..0000000000 Binary files a/sound/ambience/seag2.ogg and /dev/null differ diff --git a/sound/ambience/seag3.ogg b/sound/ambience/seag3.ogg deleted file mode 100644 index 6385e87e1d..0000000000 Binary files a/sound/ambience/seag3.ogg and /dev/null differ diff --git a/sound/ambience/shore.ogg b/sound/ambience/shore.ogg deleted file mode 100644 index d3edf17961..0000000000 Binary files a/sound/ambience/shore.ogg and /dev/null differ diff --git a/sound/ambience/sif/sif1.ogg b/sound/ambience/sif/sif1.ogg new file mode 100644 index 0000000000..6ce351521b Binary files /dev/null and b/sound/ambience/sif/sif1.ogg differ diff --git a/sound/ambience/space/space1.ogg b/sound/ambience/space/space1.ogg new file mode 100644 index 0000000000..44b4c62c36 Binary files /dev/null and b/sound/ambience/space/space1.ogg differ diff --git a/sound/ambience/serspaceamb1.ogg b/sound/ambience/space/space_serithi.ogg similarity index 100% rename from sound/ambience/serspaceamb1.ogg rename to sound/ambience/space/space_serithi.ogg diff --git a/sound/ambience/tech_ruins/tech_ruins1.ogg b/sound/ambience/tech_ruins/tech_ruins1.ogg new file mode 100644 index 0000000000..5f21514e5c Binary files /dev/null and b/sound/ambience/tech_ruins/tech_ruins1.ogg differ diff --git a/sound/ambience/tech_ruins/tech_ruins2.ogg b/sound/ambience/tech_ruins/tech_ruins2.ogg new file mode 100644 index 0000000000..bd6428bff3 Binary files /dev/null and b/sound/ambience/tech_ruins/tech_ruins2.ogg differ diff --git a/sound/ambience/tech_ruins/tech_ruins3.ogg b/sound/ambience/tech_ruins/tech_ruins3.ogg new file mode 100644 index 0000000000..effd23b132 Binary files /dev/null and b/sound/ambience/tech_ruins/tech_ruins3.ogg differ diff --git a/sound/ambience/unholy/unholy1.ogg b/sound/ambience/unholy/unholy1.ogg new file mode 100644 index 0000000000..d78dc46a4c Binary files /dev/null and b/sound/ambience/unholy/unholy1.ogg differ diff --git a/sound/ambience/vaporwave.ogg b/sound/ambience/vaporwave.ogg new file mode 100644 index 0000000000..4374f46710 Binary files /dev/null and b/sound/ambience/vaporwave.ogg differ diff --git a/sound/effects/thunder/thunder1.ogg b/sound/effects/thunder/thunder1.ogg new file mode 100644 index 0000000000..7ec34e88e8 Binary files /dev/null and b/sound/effects/thunder/thunder1.ogg differ diff --git a/sound/effects/thunder/thunder10.ogg b/sound/effects/thunder/thunder10.ogg new file mode 100644 index 0000000000..43aefb098f Binary files /dev/null and b/sound/effects/thunder/thunder10.ogg differ diff --git a/sound/effects/thunder/thunder2.ogg b/sound/effects/thunder/thunder2.ogg new file mode 100644 index 0000000000..bc2f581dda Binary files /dev/null and b/sound/effects/thunder/thunder2.ogg differ diff --git a/sound/effects/thunder/thunder3.ogg b/sound/effects/thunder/thunder3.ogg new file mode 100644 index 0000000000..0df287aa78 Binary files /dev/null and b/sound/effects/thunder/thunder3.ogg differ diff --git a/sound/effects/thunder/thunder4.ogg b/sound/effects/thunder/thunder4.ogg new file mode 100644 index 0000000000..6c671b8010 Binary files /dev/null and b/sound/effects/thunder/thunder4.ogg differ diff --git a/sound/effects/thunder/thunder5.ogg b/sound/effects/thunder/thunder5.ogg new file mode 100644 index 0000000000..3d5187a716 Binary files /dev/null and b/sound/effects/thunder/thunder5.ogg differ diff --git a/sound/effects/thunder/thunder6.ogg b/sound/effects/thunder/thunder6.ogg new file mode 100644 index 0000000000..65aef886ff Binary files /dev/null and b/sound/effects/thunder/thunder6.ogg differ diff --git a/sound/effects/thunder/thunder7.ogg b/sound/effects/thunder/thunder7.ogg new file mode 100644 index 0000000000..b72848a2b6 Binary files /dev/null and b/sound/effects/thunder/thunder7.ogg differ diff --git a/sound/effects/thunder/thunder8.ogg b/sound/effects/thunder/thunder8.ogg new file mode 100644 index 0000000000..a25fe21e32 Binary files /dev/null and b/sound/effects/thunder/thunder8.ogg differ diff --git a/sound/effects/thunder/thunder9.ogg b/sound/effects/thunder/thunder9.ogg new file mode 100644 index 0000000000..9ebc1045bf Binary files /dev/null and b/sound/effects/thunder/thunder9.ogg differ