diff --git a/code/__defines/colors.dm b/code/__defines/colors.dm
index 863a19bc014..7477331b43e 100644
--- a/code/__defines/colors.dm
+++ b/code/__defines/colors.dm
@@ -99,6 +99,7 @@
#define COLOR_VERDANT_GREEN "#287d00"
#define COLOR_SCIENCE_PURPLE "#6633cc"
#define COLOR_DAYLIGHT "#f3e6ca"
+#define COLOR_CHERRY_RED "#902630"
#define PIPE_COLOR_GREY "#808080"
#define PIPE_COLOR_RED "#ff0000"
diff --git a/code/__defines/inventory_sizes.dm b/code/__defines/inventory_sizes.dm
index 39842fd9099..0432f304bd8 100644
--- a/code/__defines/inventory_sizes.dm
+++ b/code/__defines/inventory_sizes.dm
@@ -16,16 +16,17 @@
20 - things that take up an entire turf, like wall girders or door assemblies
*/
-#define ITEM_SIZE_TINY 1
-#define ITEM_SIZE_SMALL 2
-#define ITEM_SIZE_NORMAL 3
-#define ITEM_SIZE_LARGE 4
-#define ITEM_SIZE_HUGE 5
-#define ITEM_SIZE_GARGANTUAN 6
-#define ITEM_SIZE_STRUCTURE 20
+#define ITEM_SIZE_TINY 1
+#define ITEM_SIZE_SMALL 2
+#define ITEM_SIZE_NORMAL 3
+#define ITEM_SIZE_LARGE 4
+#define ITEM_SIZE_HUGE 5
+#define ITEM_SIZE_GARGANTUAN 6
+#define ITEM_SIZE_STRUCTURE 20
+#define ITEM_SIZE_LARGE_STRUCTURE 30
-#define ITEM_SIZE_MIN ITEM_SIZE_TINY
-#define ITEM_SIZE_MAX ITEM_SIZE_STRUCTURE
+#define ITEM_SIZE_MIN ITEM_SIZE_TINY
+#define ITEM_SIZE_MAX ITEM_SIZE_LARGE_STRUCTURE
#define BASE_STORAGE_COST(w_class) (2**(w_class-1)) //1,2,4,8,16,...
diff --git a/code/__defines/tools.dm b/code/__defines/tools.dm
index 294dbdfff6e..3caa322b023 100644
--- a/code/__defines/tools.dm
+++ b/code/__defines/tools.dm
@@ -87,6 +87,7 @@
#define TOOL_PROP_COLOR_NAME "color_name" //Property containing a color name for some tools. Namely the pen tool.
#define TOOL_PROP_COLOR "color" //Property for specifying a color, for something like a pen.
#define TOOL_PROP_USES "uses_left" //Property for things that have a fixed amount of uses. -1 is unlimited.
+#define TOOL_PROP_EMPTY_MESSAGE "empty_msg" //The message given on depletion when a tool runs out of charges.
//Pen specific stuff
#define TOOL_PROP_PEN_FLAG "pen_flag" //Property for pens to specify additional properties about themselves
diff --git a/code/__defines/turfs.dm b/code/__defines/turfs.dm
index 54388d2c38f..6c46f5f1a9f 100644
--- a/code/__defines/turfs.dm
+++ b/code/__defines/turfs.dm
@@ -2,12 +2,10 @@
#define TURF_REMOVE_SCREWDRIVER BITFLAG(1)
#define TURF_REMOVE_SHOVEL BITFLAG(2)
#define TURF_REMOVE_WRENCH BITFLAG(3)
-#define TURF_CAN_BREAK BITFLAG(4)
-#define TURF_CAN_BURN BITFLAG(5)
-#define TURF_IS_FRAGILE BITFLAG(6)
-#define TURF_ACID_IMMUNE BITFLAG(7)
-#define TURF_IS_WET BITFLAG(8)
-#define TURF_HAS_RANDOM_BORDER BITFLAG(9)
+#define TURF_IS_FRAGILE BITFLAG(4)
+#define TURF_ACID_IMMUNE BITFLAG(5)
+#define TURF_IS_WET BITFLAG(6)
+#define TURF_HAS_RANDOM_BORDER BITFLAG(7)
//Used for floor/wall smoothing
#define SMOOTH_NONE 0 //Smooth only with itself
diff --git a/code/__defines/zmimic.dm b/code/__defines/zmimic.dm
index 71982547c3e..a9af1b126f5 100644
--- a/code/__defines/zmimic.dm
+++ b/code/__defines/zmimic.dm
@@ -52,7 +52,7 @@ var/global/list/mimic_defines = list(
)
// Movable flags.
-#define ZMM_IGNORE 1 //! Do not copy this movable.
-#define ZMM_MANGLE_PLANES 2 //! Check this movable's overlays/underlays for explicit plane use and mangle for compatibility with Z-Mimic. If you're using emissive overlays, you probably should be using this flag. Expensive, only use if necessary.
-#define ZMM_LOOKAHEAD 3 //! Look one turf ahead and one turf back when considering z-turfs that might be seeing this atom. Cheap, but not free.
-#define ZMM_LOOKBESIDE 4 //! Look one turf beside (left/right) when considering z-turfs that might be seeing this atom. Cheap, but not free.
+#define ZMM_IGNORE BITFLAG(0) //! Do not copy this movable.
+#define ZMM_MANGLE_PLANES BITFLAG(1) //! Check this movable's overlays/underlays for explicit plane use and mangle for compatibility with Z-Mimic. If you're using emissive overlays, you probably should be using this flag. Expensive, only use if necessary.
+#define ZMM_LOOKAHEAD BITFLAG(2) //! Look one turf ahead and one turf back when considering z-turfs that might be seeing this atom. Cheap, but not free.
+#define ZMM_LOOKBESIDE BITFLAG(3) //! Look one turf beside (left/right) when considering z-turfs that might be seeing this atom. Cheap, but not free.
diff --git a/code/_onclick/adjacent.dm b/code/_onclick/adjacent.dm
index 70e40cb6eb3..328becddbbf 100644
--- a/code/_onclick/adjacent.dm
+++ b/code/_onclick/adjacent.dm
@@ -103,7 +103,7 @@ Quick adjacency (to turf):
return TRUE
if(istype(loc, /obj/item) || istype(loc, /obj/structure))
if(recurse > 0)
- return loc.Adjacent(neighbor,recurse - 1)
+ return loc.Adjacent(neighbor, recurse - 1)
return FALSE
return ..()
@@ -112,7 +112,7 @@ Quick adjacency (to turf):
return TRUE
if(istype(loc, /obj/item) || istype(loc, /obj/structure))
if(recurse > 0)
- return loc.Adjacent(neighbor,recurse - 1)
+ return loc.Adjacent(neighbor, recurse - 1)
return FALSE
return ..()
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index 7544fc7ce5a..3bb7bf3b1a7 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -24,16 +24,18 @@ avoid code duplication. This includes items that may sometimes act as a standard
var/datum/extension/tool/tool = get_extension(src, /datum/extension/tool)
return (tool?.handle_physical_manipulation(user)) || FALSE
+// If TRUE, prevent afterattack from running.
/obj/item/proc/resolve_attackby(atom/A, mob/user, var/click_params)
if(!(item_flags & ITEM_FLAG_NO_PRINT))
add_fingerprint(user)
return A.attackby(src, user, click_params)
+// If TRUE, prevent afterattack from running.
/atom/proc/attackby(obj/item/used_item, mob/user, var/click_params)
if(storage)
if(isrobot(user) && (used_item == user.get_active_held_item()))
return FALSE //Robots can't store their modules.
- if(!storage.can_be_inserted(used_item, user))
+ if(!storage.can_be_inserted(used_item, user, click_params = click_params))
return FALSE
used_item.add_fingerprint(user)
return storage.handle_item_insertion(user, used_item, click_params = click_params)
@@ -44,6 +46,7 @@ avoid code duplication. This includes items that may sometimes act as a standard
if(!.)
return bash(W,user)
+// Return TRUE if further actions (afterattack, etc) should be prevented, FALSE if they can proceed.
/atom/movable/proc/bash(obj/item/weapon, mob/user)
if(isliving(user) && user.a_intent == I_HELP)
return FALSE
@@ -105,6 +108,7 @@ avoid code duplication. This includes items that may sometimes act as a standard
var/mob/living/attackee = null
//I would prefer to rename this attack_as_weapon(), but that would involve touching hundreds of files.
+// If this returns TRUE, the interaction has been handled and other interactions like afterattack should be skipped.
/obj/item/proc/use_on_mob(mob/living/target, mob/living/user, animate = TRUE)
// TODO: revisit if this should be a silent failure/parent call instead, for mob-level storage interactions?
diff --git a/code/controllers/subsystems/mapping.dm b/code/controllers/subsystems/mapping.dm
index 1bdc5ddbdbf..ecc1ad88b1e 100644
--- a/code/controllers/subsystems/mapping.dm
+++ b/code/controllers/subsystems/mapping.dm
@@ -42,7 +42,7 @@ SUBSYSTEM_DEF(mapping)
/// Z-levels available to various consoles, such as the crew monitor. Defaults to station_levels if unset.
var/list/map_levels
/// The turf type used when generating floors between Z-levels at startup.
- var/base_floor_type = /turf/floor/airless
+ var/base_floor_type = /turf/floor/plating/airless
/// Replacement area, if a base_floor_type is generated. Leave blank to skip.
var/base_floor_area
/// A list of connected z-levels to avoid repeatedly rebuilding connections
diff --git a/code/controllers/subsystems/zcopy.dm b/code/controllers/subsystems/zcopy.dm
index ed4fd178390..1f550d0aeeb 100644
--- a/code/controllers/subsystems/zcopy.dm
+++ b/code/controllers/subsystems/zcopy.dm
@@ -496,10 +496,10 @@ SUBSYSTEM_DEF(zcopy)
ASSERT(!QDELETED(object))
var/turf/Tloc = object.loc
- if (!isturf(Tloc) || !Tloc.above)
+ if (!isturf(Tloc) || !MOVABLE_SHALL_MIMIC(object))
return TRUE
- var/turf/T = Tloc.above
+ var/turf/T = GetAbove(Tloc)
ZM_RECORD_START
diff --git a/code/datums/ai/_ai.dm b/code/datums/ai/_ai.dm
index ba6f3d2f81e..fc6101f3129 100644
--- a/code/datums/ai/_ai.dm
+++ b/code/datums/ai/_ai.dm
@@ -44,6 +44,8 @@
/// What directions can we wander in? Uses global.cardinal if unset.
var/list/wander_directions
+ /// Should we retaliate/startle when grabbed or buckled?
+ var/spooked_by_grab = TRUE
/// Can we automatically escape from buckling?
var/can_escape_buckles = FALSE
@@ -314,3 +316,15 @@
if(body)
return body.set_target_zone(ran_zone())
return FALSE
+
+/datum/mob_controller/proc/on_buckled(mob/scary_grabber)
+ if(!scary_grabber || body.buckled_mob != scary_grabber) // the buckle got cancelled somehow?
+ return
+ if(spooked_by_grab && !is_friend(scary_grabber))
+ retaliate(scary_grabber)
+
+/datum/mob_controller/proc/on_grabbed(mob/scary_grabber)
+ if(!scary_grabber)
+ return
+ if(spooked_by_grab && !is_friend(scary_grabber))
+ retaliate(scary_grabber)
\ No newline at end of file
diff --git a/code/datums/extensions/assembly/assembly_interaction.dm b/code/datums/extensions/assembly/assembly_interaction.dm
index e59c7d531da..9e250bb5d7b 100644
--- a/code/datums/extensions/assembly/assembly_interaction.dm
+++ b/code/datums/extensions/assembly/assembly_interaction.dm
@@ -102,4 +102,5 @@
return TRUE
if(istype(W, /obj/item/stock_parts))
- return try_install_component(user, W)
\ No newline at end of file
+ return try_install_component(user, W)
+ return FALSE
\ No newline at end of file
diff --git a/code/datums/extensions/storage/_storage.dm b/code/datums/extensions/storage/_storage.dm
index 2ca74cfaaeb..e6200fdaf08 100644
--- a/code/datums/extensions/storage/_storage.dm
+++ b/code/datums/extensions/storage/_storage.dm
@@ -124,7 +124,7 @@ var/global/list/_test_storage_items = list()
//This proc return 1 if the item can be picked up and 0 if it can't.
//Set the stop_messages to stop it from printing messages
-/datum/storage/proc/can_be_inserted(obj/item/W, mob/user, stop_messages = 0)
+/datum/storage/proc/can_be_inserted(obj/item/W, mob/user, stop_messages = 0, click_params = null)
if(!istype(W)) return //Not an item
if(user && !user.canUnEquip(W))
diff --git a/code/datums/extensions/storage/subtypes_backpack.dm b/code/datums/extensions/storage/subtypes_backpack.dm
index aee6fd622ee..3523c496826 100644
--- a/code/datums/extensions/storage/subtypes_backpack.dm
+++ b/code/datums/extensions/storage/subtypes_backpack.dm
@@ -7,7 +7,7 @@
max_w_class = ITEM_SIZE_NORMAL
max_storage_space = 56
-/datum/storage/backpack/holding/can_be_inserted(obj/item/W, stop_messages = 0)
+/datum/storage/backpack/holding/can_be_inserted(obj/item/W, mob/user, stop_messages = 0, click_params)
if(istype(W, /obj/item/backpack/holding))
return 1
return ..()
diff --git a/code/datums/extensions/storage/subtypes_bag.dm b/code/datums/extensions/storage/subtypes_bag.dm
index f6574b76258..07cdaf12cd2 100644
--- a/code/datums/extensions/storage/subtypes_bag.dm
+++ b/code/datums/extensions/storage/subtypes_bag.dm
@@ -15,7 +15,7 @@
var/obj/item/bag/bag = holder
bag.update_w_class()
-/datum/storage/bag/can_be_inserted(obj/item/W, mob/user, stop_messages = 0)
+/datum/storage/bag/can_be_inserted(obj/item/W, mob/user, stop_messages = 0, click_params = null)
var/mob/living/human/H = ishuman(user) ? user : null // if we're human, then we need to check if bag in a pocket
if(holder.loc?.storage || H?.is_in_pocket(holder))
if(!stop_messages)
diff --git a/code/datums/extensions/storage/subtypes_misc.dm b/code/datums/extensions/storage/subtypes_misc.dm
index faa5805f24c..fec9cd65cdf 100644
--- a/code/datums/extensions/storage/subtypes_misc.dm
+++ b/code/datums/extensions/storage/subtypes_misc.dm
@@ -106,7 +106,7 @@
can_hold = list(/obj/item)
expected_type = /obj/structure/reagent_dispensers/compost_bin
-/datum/storage/hopper/industrial/compost/can_be_inserted(obj/item/W, mob/user, stop_messages = 0)
+/datum/storage/hopper/industrial/compost/can_be_inserted(obj/item/W, mob/user, stop_messages = 0, click_params = null)
. = ..()
if(!.)
return
@@ -120,7 +120,7 @@
/datum/storage/hopper/mortar
max_w_class = ITEM_SIZE_NORMAL * 2
-/datum/storage/hopper/mortar/can_be_inserted(obj/item/inserting_item, mob/user, stop_messages)
+/datum/storage/hopper/mortar/can_be_inserted(obj/item/inserting_item, mob/user, stop_messages, click_params = null)
. = ..()
if(!.)
return
diff --git a/code/datums/extensions/storage/subtypes_pills.dm b/code/datums/extensions/storage/subtypes_pills.dm
index 4c6c3e90272..ca8287f168c 100644
--- a/code/datums/extensions/storage/subtypes_pills.dm
+++ b/code/datums/extensions/storage/subtypes_pills.dm
@@ -17,7 +17,7 @@
if(pop.pop_sound)
playsound(get_turf(pop), pop.pop_sound, 50)
-/datum/storage/pillbottle/foil/can_be_inserted(obj/item/W, mob/user, stop_messages = 0)
+/datum/storage/pillbottle/foil/can_be_inserted(obj/item/W, mob/user, stop_messages = 0, click_params = null)
return FALSE
/datum/storage/pillbottle/foil/remove_from_storage(mob/user, obj/item/W, atom/new_location, skip_update)
diff --git a/code/datums/extensions/storage/subtypes_secure.dm b/code/datums/extensions/storage/subtypes_secure.dm
index 09fe2b16c12..bf501d186be 100644
--- a/code/datums/extensions/storage/subtypes_secure.dm
+++ b/code/datums/extensions/storage/subtypes_secure.dm
@@ -16,7 +16,7 @@
. = ..()
//Must be overriden to prevent gathering from tile and using on items when locked!
-/datum/storage/secure/can_be_inserted(obj/item/W, mob/user, stop_messages)
+/datum/storage/secure/can_be_inserted(obj/item/W, mob/user, stop_messages, click_params = null)
if(is_locked())
if(!stop_messages)
to_chat(user, SPAN_WARNING("\The [holder] is locked, you cannot put anything inside."))
diff --git a/code/datums/extensions/storage/subtypes_sheets.dm b/code/datums/extensions/storage/subtypes_sheets.dm
index 47bc5925019..1db2042cb97 100644
--- a/code/datums/extensions/storage/subtypes_sheets.dm
+++ b/code/datums/extensions/storage/subtypes_sheets.dm
@@ -9,7 +9,7 @@
/datum/storage/sheets/robot
capacity = 500 //Borgs get more because >specialization
-/datum/storage/sheets/can_be_inserted(obj/item/W, mob/user, stop_messages = 0)
+/datum/storage/sheets/can_be_inserted(obj/item/W, mob/user, stop_messages = 0, click_params = null)
if(!istype(W,/obj/item/stack/material))
if(!stop_messages)
to_chat(user, "\The [holder] does not accept [W].")
diff --git a/code/datums/extensions/storage/subtypes_wallet.dm b/code/datums/extensions/storage/subtypes_wallet.dm
index 7f02a4c3e4c..c9318f0146d 100644
--- a/code/datums/extensions/storage/subtypes_wallet.dm
+++ b/code/datums/extensions/storage/subtypes_wallet.dm
@@ -51,7 +51,7 @@
wallet.front_stick = null
/datum/storage/wallet/handle_item_insertion(mob/user, obj/item/W, prevent_warning, skip_update, click_params)
- . = ..(W, prevent_warning)
+ . = ..()
if(. && istype(holder, /obj/item/wallet))
var/obj/item/wallet/wallet = holder
if(!wallet.front_id && istype(W, /obj/item/card/id))
diff --git a/code/datums/inventory_slots/_inventory_slot.dm b/code/datums/inventory_slots/_inventory_slot.dm
index 5f16030d362..204284e6f2c 100644
--- a/code/datums/inventory_slots/_inventory_slot.dm
+++ b/code/datums/inventory_slots/_inventory_slot.dm
@@ -39,6 +39,7 @@
prop.forceMove(user)
prop.hud_layerise()
prop.equipped(user, slot_id)
+ prop.compile_overlays() // avoid world overlays on inventory state and vice versa
// Clean up the preexisting item.
if(held)
diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm
index 5d04432b54e..5fb2378b8b2 100644
--- a/code/datums/outfits/outfit.dm
+++ b/code/datums/outfits/outfit.dm
@@ -99,23 +99,26 @@
post_equip(H)
if(outfit_flags & OUTFIT_HAS_VITALS_SENSOR)
- var/obj/item/clothing/sensor/vitals/sensor
- for(var/check_slot in global.vitals_sensor_equip_slots)
- if(!H.get_inventory_slot_datum(check_slot))
- continue
- if(!sensor) // only create the sensor if we have at least one eligible slot
- sensor = new(get_turf(H))
- var/obj/item/clothing/equipped = H.get_equipped_item(check_slot)
- if(istype(equipped) && !(locate(/obj/item/clothing/sensor/vitals) in equipped.accessories) && equipped.can_attach_accessory(sensor))
- equipped.attach_accessory(null, sensor)
- break
- if(isturf(sensor?.loc))
- H.put_in_hands(sensor)
- else
- qdel(sensor)
+ try_equip_vitals_sensor(H)
return 1
+/decl/outfit/proc/try_equip_vitals_sensor(mob/living/human/H)
+ var/obj/item/clothing/sensor/vitals/sensor
+ for(var/check_slot in global.vitals_sensor_equip_slots)
+ if(!H.get_inventory_slot_datum(check_slot))
+ continue
+ if(!sensor) // only create the sensor if we have at least one eligible slot
+ sensor = new(get_turf(H))
+ var/obj/item/clothing/equipped = H.get_equipped_item(check_slot)
+ if(istype(equipped) && !(locate(/obj/item/clothing/sensor/vitals) in equipped.accessories) && equipped.can_attach_accessory(sensor))
+ equipped.attach_accessory(null, sensor)
+ break
+ if(isturf(sensor?.loc))
+ H.put_in_hands(sensor)
+ else
+ qdel(sensor)
+
/decl/outfit/proc/equip_base(mob/living/human/H, var/equip_adjustments)
set waitfor = FALSE
pre_equip(H)
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index a2ea4962606..01856eb7773 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -737,7 +737,10 @@
LAZYREMOVE(climbers,user)
return FALSE
- var/target_turf = get_turf(src)
+ // handle multitile objects
+ // this should also be fine for non-multitile objects
+ // and ensures we don't ever move more than 1 tile
+ var/target_turf = get_step(user, get_dir(user, src))
//climbing over border objects like railings
if((atom_flags & ATOM_FLAG_CHECKS_BORDER) && get_turf(user) == target_turf)
diff --git a/code/game/atoms_init.dm b/code/game/atoms_init.dm
index 00ea47e6bb0..3a2f3b619c1 100644
--- a/code/game/atoms_init.dm
+++ b/code/game/atoms_init.dm
@@ -118,6 +118,8 @@
// Changing this behavior will almost certainly break power; update accordingly.
if (!ml && loc)
loc.Entered(src, null)
+ if(loc && (z_flags & ZMM_WIDE_LOAD))
+ SSzcopy.discover_movable(src)
/atom/movable/EarlyDestroy(force = FALSE)
loc = null // should NOT use forceMove, in order to avoid events
diff --git a/code/game/atoms_movable_overlay.dm b/code/game/atoms_movable_overlay.dm
index 9d286c7913f..c6beb4d1bec 100644
--- a/code/game/atoms_movable_overlay.dm
+++ b/code/game/atoms_movable_overlay.dm
@@ -42,6 +42,7 @@
/atom/movable/overlay/attackby(obj/item/I, mob/user)
if (master)
return master.attackby(I, user)
+ return TRUE
/atom/movable/overlay/attack_hand(mob/user)
SHOULD_CALL_PARENT(FALSE)
diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm
index 8a4ff9d1bd6..16353f9bf47 100644
--- a/code/game/machinery/CableLayer.dm
+++ b/code/game/machinery/CableLayer.dm
@@ -34,7 +34,7 @@
to_chat(user, "\The [src]'s cable reel is full.")
else
to_chat(user, "You load [result] lengths of cable into [src].")
- return
+ return TRUE
if(IS_WIRECUTTER(O))
if(cable && cable.amount)
@@ -48,6 +48,8 @@
CC.amount = m
else
to_chat(usr, "There's no more cable on the reel.")
+ return TRUE
+ return ..()
/obj/machinery/cablelayer/examine(mob/user)
. = ..()
diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm
index cb50c4a6271..0c9c319aacf 100644
--- a/code/game/machinery/OpTable.dm
+++ b/code/game/machinery/OpTable.dm
@@ -48,7 +48,7 @@
if(stat & (NOPOWER|BROKEN))
to_chat(user, "You try to switch on the suppressor, yet nothing happens.")
- return
+ return TRUE
if(user != victim && !suppressing) // Skip checks if you're doing it to yourself or turning it off, this is an anti-griefing mechanic more than anything.
user.visible_message("\The [user] begins switching on \the [src]'s neural suppressor.")
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index ff647bdbbf5..dd697812746 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -308,7 +308,7 @@
add_fingerprint(user)
if(!beaker)
if(!user.try_unequip(I, src))
- return
+ return TRUE
beaker = I
user.visible_message(SPAN_NOTICE("\The [user] adds \a [I] to \the [src]."), SPAN_NOTICE("You add \a [I] to \the [src]."))
else
diff --git a/code/game/machinery/_machines_base/stock_parts/access_lock.dm b/code/game/machinery/_machines_base/stock_parts/access_lock.dm
index c69c206ed6e..1858545205e 100644
--- a/code/game/machinery/_machines_base/stock_parts/access_lock.dm
+++ b/code/game/machinery/_machines_base/stock_parts/access_lock.dm
@@ -61,8 +61,7 @@
if(I && check_access(I))
locked = !locked
visible_message(SPAN_NOTICE("\The [src] beeps and flashes green twice: it is now [locked ? "" : "un"]locked."))
- return TRUE
- return
+ return TRUE
return ..()
/obj/item/stock_parts/access_lock/attack_self(mob/user)
diff --git a/code/game/machinery/_machines_base/stock_parts/power/battery.dm b/code/game/machinery/_machines_base/stock_parts/power/battery.dm
index f883e307f14..c78b358aea6 100644
--- a/code/game/machinery/_machines_base/stock_parts/power/battery.dm
+++ b/code/game/machinery/_machines_base/stock_parts/power/battery.dm
@@ -163,7 +163,7 @@
return TRUE
if(!user.try_unequip(I, src))
- return
+ return TRUE
add_cell(machine, I)
user.visible_message(\
SPAN_WARNING("\The [user] has inserted the power cell to \the [src]!"),\
@@ -173,6 +173,7 @@
// Interactions without machine
if(!istype(machine))
return ..()
+ return FALSE
/obj/item/stock_parts/power/battery/attack_self(mob/user)
if(cell)
diff --git a/code/game/machinery/_machines_base/stock_parts/power/terminal.dm b/code/game/machinery/_machines_base/stock_parts/power/terminal.dm
index d267e96446e..041e68950f9 100644
--- a/code/game/machinery/_machines_base/stock_parts/power/terminal.dm
+++ b/code/game/machinery/_machines_base/stock_parts/power/terminal.dm
@@ -151,6 +151,7 @@
"You add cables to the \the [machine].")
make_terminal(machine)
return TRUE
+ return FALSE
/obj/item/stock_parts/power/terminal/get_source_info()
. = "The machine can receive power by direct connection to the powernet. "
diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm
index 78f73e8df9c..dc389cb9dec 100644
--- a/code/game/machinery/ai_slipper.dm
+++ b/code/game/machinery/ai_slipper.dm
@@ -25,7 +25,7 @@
/obj/machinery/ai_slipper/attackby(obj/item/W, mob/user)
if(stat & (NOPOWER|BROKEN))
- return
+ return FALSE
if (issilicon(user))
return attack_ai(user)
else // trying to unlock the interface
@@ -41,6 +41,7 @@
interact(user)
else
to_chat(user, "Access denied.")
+ return TRUE
/obj/machinery/ai_slipper/interface_interact(mob/user)
interact(user)
diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm
index e031dac2f19..06bed379ece 100644
--- a/code/game/machinery/atmoalter/scrubber.dm
+++ b/code/game/machinery/atmoalter/scrubber.dm
@@ -185,16 +185,16 @@
if(IS_WRENCH(I))
if(use_power == POWER_USE_ACTIVE)
to_chat(user, "Turn \the [src] off first!")
- return
+ return TRUE
anchored = !anchored
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].")
- return
+ return TRUE
//doesn't hold tanks
if(istype(I, /obj/item/tank))
- return
+ return FALSE
return ..()
@@ -206,6 +206,6 @@
/obj/machinery/portable_atmospherics/powered/scrubber/huge/stationary/attackby(var/obj/item/I, var/mob/user)
if(IS_WRENCH(I))
to_chat(user, "The bolts are too tight for you to unscrew!")
- return
+ return TRUE
return ..()
\ No newline at end of file
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index c87f51eb1f3..ee9a28eee31 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -186,7 +186,7 @@
/obj/machinery/camera/physical_attack_hand(mob/living/human/user)
if(!istype(user))
- return
+ return TRUE
if(user.species.can_shred(user))
user.do_attack_animation(src)
visible_message(SPAN_WARNING("\The [user] slashes at [src]!"))
@@ -194,6 +194,7 @@
add_hiddenprint(user)
take_damage(25)
return TRUE
+ return FALSE
/obj/machinery/camera/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/paper))
diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index efc4136a173..c76905972bc 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -225,9 +225,7 @@ var/global/list/deactivated_ai_cores = list()
qdel(src)
/obj/structure/aicore/deactivated/attackby(var/obj/item/W, var/mob/user)
- if(IS_WRENCH(W) || IS_WELDER(W))
- . = ..()
- else if(istype(W, /obj/item/aicard))
+ if(istype(W, /obj/item/aicard))
var/obj/item/aicard/card = W
var/mob/living/silicon/ai/transfer = locate() in card
if(transfer)
@@ -235,6 +233,7 @@ var/global/list/deactivated_ai_cores = list()
else
to_chat(user, SPAN_DANGER("ERROR: Unable to locate artificial intelligence."))
return TRUE
+ return ..()
/client/proc/empty_ai_core_toggle_latejoin()
set name = "Toggle AI Core Latejoin"
diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm
index 089a92f8471..37ac6e0d729 100644
--- a/code/game/machinery/computer/guestpass.dm
+++ b/code/game/machinery/computer/guestpass.dm
@@ -74,8 +74,8 @@
updateUsrDialog()
else if(giver)
to_chat(user, SPAN_WARNING("There is already ID card inside."))
- return
- ..()
+ return TRUE
+ return ..()
/obj/machinery/computer/guestpass/interface_interact(var/mob/user)
ui_interact(user)
diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm
index a186ccd2320..992d2b211b5 100644
--- a/code/game/machinery/computer/law.dm
+++ b/code/game/machinery/computer/law.dm
@@ -8,8 +8,9 @@
if(istype(O, /obj/item/aiModule))
var/obj/item/aiModule/M = O
M.install(src, user)
+ return TRUE
else
- ..()
+ return ..()
/obj/machinery/computer/upload/ai
name = "\improper AI upload console"
diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm
index e81ec84863a..16503b09fe9 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -40,16 +40,14 @@
/obj/machinery/computer/message_monitor/attackby(obj/item/O, mob/user)
if(stat & (NOPOWER|BROKEN))
- ..()
- return
+ return ..()
if(!istype(user))
- return
+ return TRUE
if(IS_SCREWDRIVER(O) && emag)
//Stops people from just unscrewing the monitor and putting it back to get the console working again.
to_chat(user, "It is too hot to mess with!")
- return
- ..()
- return
+ return TRUE
+ return ..()
/obj/machinery/computer/message_monitor/emag_act(var/remaining_charges, var/mob/user)
diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm
index f43c392a16c..dad8eb391e9 100644
--- a/code/game/machinery/computer/shuttle.dm
+++ b/code/game/machinery/computer/shuttle.dm
@@ -10,37 +10,28 @@
/obj/machinery/computer/shuttle/attackby(var/obj/item/card as obj, var/mob/user as mob)
- if(stat & (BROKEN|NOPOWER)) return
+ if(stat & (BROKEN|NOPOWER)) return TRUE
var/datum/evacuation_controller/shuttle/evac_control = SSevac.evacuation_controller
if(!istype(evac_control))
to_chat(user, "This console should not be in use on this map. Please report this to a developer.")
- return
+ return TRUE
if(!istype(card, /obj/item/card)) // don't try to get an ID card if we're an emag
card = card.GetIdCard() // handles stored IDs in modcomps and similar
if ((!istype(card, /obj/item/card) || evac_control.has_evacuated() || !user))
- return
+ return FALSE
if (istype(card, /obj/item/card/id))
var/obj/item/card/id/id_card = card
- if (!id_card.access) //no access
+ if(!LAZYISIN(id_card.access, access_bridge)) //doesn't have this access
to_chat(user, "The access level of [id_card.registered_name]\'s card is not high enough.")
- return
-
- var/list/cardaccess = id_card.access
- if(!istype(cardaccess, /list) || !cardaccess.len) //no access
- to_chat(user, "The access level of [id_card.registered_name]\'s card is not high enough.")
- return
-
- if(!(access_bridge in id_card.access)) //doesn't have this access
- to_chat(user, "The access level of [id_card.registered_name]\'s card is not high enough.")
- return 0
+ return TRUE
var/choice = alert(user, "Would you like to (un)authorize a shortened launch time? [auth_need - authorized.len] authorization\s are still needed. Use abort to cancel all authorizations.", "Shuttle Launch", "Authorize", "Repeal", "Abort")
if(evac_control.is_prepared() && user.get_active_held_item() != card)
- return 0
+ return TRUE
switch(choice)
if("Authorize")
src.authorized -= id_card.registered_name
@@ -66,16 +57,14 @@
to_world("All authorizations to shortening time for shuttle launch have been revoked!")
src.authorized.len = 0
src.authorized = list( )
+ return TRUE
else if (istype(card, /obj/item/card/emag) && !emagged)
var/choice = alert(user, "Would you like to launch the shuttle?","Shuttle control", "Launch", "Cancel")
- if(!emagged && !evac_control.is_prepared() && user.get_active_held_item() == card)
- switch(choice)
- if("Launch")
- to_world("Alert: Shuttle launch time shortened to 10 seconds!")
- evac_control.set_launch_time(world.time+100)
- emagged = 1
- if("Cancel")
- return
- return
+ if(!emagged && !evac_control.is_prepared() && user.get_active_held_item() == card && choice == "Launch")
+ to_world("Alert: Shuttle launch time shortened to 10 seconds!")
+ evac_control.set_launch_time(world.time+100)
+ emagged = 1
+ return TRUE
+ return FALSE
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index a30c7dfaf79..bfb361cfc83 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -523,22 +523,23 @@
/obj/structure/broken_cryo/attackby(obj/item/W, mob/user)
if (busy)
to_chat(user, SPAN_NOTICE("Someone else is attempting to open this."))
- return
- if (closed)
- if (IS_CROWBAR(W))
- busy = 1
- visible_message("[user] starts to pry the glass cover off of \the [src].")
- if (!do_after(user, 50, src))
- visible_message("[user] stops trying to pry the glass off of \the [src].")
- busy = 0
- return
- closed = 0
- busy = 0
- icon_state = "broken_cryo_open"
- var/obj/dead = new remains_type(loc)
- dead.set_dir(dir) //skeleton is oriented as cryo
- else
+ return TRUE
+ if (!closed)
to_chat(user, SPAN_NOTICE("The glass cover is already open."))
+ return TRUE
+ if (IS_CROWBAR(W))
+ busy = 1
+ visible_message("[user] starts to pry the glass cover off of \the [src].")
+ if (!do_after(user, 50, src))
+ visible_message("[user] stops trying to pry the glass off of \the [src].")
+ busy = 0
+ return TRUE
+ closed = 0
+ busy = 0
+ icon_state = "broken_cryo_open"
+ var/obj/dead = new remains_type(loc)
+ dead.set_dir(dir) //skeleton is oriented as cryo
+ return TRUE
/obj/machinery/cryopod/proc/on_mob_spawn()
playsound(src, 'sound/machines/ding.ogg', 30, 1)
\ No newline at end of file
diff --git a/code/game/machinery/dehumidifier.dm b/code/game/machinery/dehumidifier.dm
index fa5f0789e5e..eaef14277b2 100644
--- a/code/game/machinery/dehumidifier.dm
+++ b/code/game/machinery/dehumidifier.dm
@@ -62,6 +62,7 @@
SPAN_NOTICE("[user] switches [active ? "on" : "off"] \the [src]."),
SPAN_NOTICE("You switch [active ? "on" : "off"] \the [src]."))
return TRUE
+ return FALSE
/obj/machinery/dehumidifier/Process()
if(!active)
diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm
index a4a16386ee9..5b319d56bcb 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -28,15 +28,14 @@
src.icon_state = "barrier[src.locked]"
if ((src.locked == 1.0) && (src.emagged < 2.0))
to_chat(user, "Barrier lock toggled on.")
- return
+ return TRUE
else if ((src.locked == 0.0) && (src.emagged < 2.0))
to_chat(user, "Barrier lock toggled off.")
- return
+ return TRUE
else
spark_at(src, amount=2, cardinal_only = TRUE)
visible_message("BZZzZZzZZzZT")
- return
- return
+ return TRUE
else if(IS_WRENCH(W))
var/current_max_health = get_max_health()
if (current_health < current_max_health)
@@ -44,13 +43,12 @@
emagged = 0
req_access = list(access_security)
visible_message("[user] repairs \the [src]!")
- return
+ return TRUE
else if (src.emagged > 0)
src.emagged = 0
src.req_access = list(access_security)
visible_message("[user] repairs \the [src]!")
- return
- return
+ return TRUE
else
switch(W.atom_damage_type)
if(BURN)
@@ -59,7 +57,8 @@
current_health -= W.get_attack_force(user) * 0.5
if (current_health <= 0)
explode()
- ..()
+ return TRUE
+ return ..()
/obj/machinery/deployable/barrier/explosion_act(severity)
. = ..()
diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm
index 707a91143d3..8b1112a39ed 100644
--- a/code/game/machinery/doors/blast_door.dm
+++ b/code/game/machinery/doors/blast_door.dm
@@ -157,16 +157,16 @@
to_chat(user, "You must remain still while working on \the [src].")
else
to_chat(user, "[src]'s motors resist your effort.")
- return
+ return TRUE
if(istype(C, /obj/item/stack/material) && C.get_material_type() == /decl/material/solid/metal/plasteel)
var/amt = ceil((get_max_health() - current_health)/150)
if(!amt)
to_chat(user, "\The [src] is already fully functional.")
- return
+ return TRUE
var/obj/item/stack/P = C
if(!P.can_use(amt))
to_chat(user, "You don't have enough sheets to repair this! You need at least [amt] sheets.")
- return
+ return TRUE
to_chat(user, "You begin repairing \the [src]...")
if(do_after(user, 5 SECONDS, src))
if(P.use(amt))
@@ -176,6 +176,7 @@
to_chat(user, "You don't have enough sheets to repair this! You need at least [amt] sheets.")
else
to_chat(user, "You must remain still while working on \the [src].")
+ return TRUE
return ..()
// Proc: open()
diff --git a/code/game/machinery/doors/braces.dm b/code/game/machinery/doors/braces.dm
index a7bf4508b10..b55afe45495 100644
--- a/code/game/machinery/doors/braces.dm
+++ b/code/game/machinery/doors/braces.dm
@@ -69,11 +69,9 @@
electronics.attack_self(user)
/obj/item/airlock_brace/attackby(obj/item/W, mob/user)
- ..()
if (istype(W.GetIdCard(), /obj/item/card/id))
if(!airlock)
- attack_self(user)
- return
+ return attack_self(user)
else
var/obj/item/card/id/C = W.GetIdCard()
if(check_access(C))
@@ -83,23 +81,23 @@
unlock_brace(usr)
else
to_chat(user, "You swipe \the [C] through \the [src], but it does not react.")
- return
+ return TRUE
if (istype(W, /obj/item/crowbar/brace_jack))
if(!airlock)
- return
+ return FALSE
var/obj/item/crowbar/brace_jack/C = W
to_chat(user, "You begin forcibly removing \the [src] with \the [C].")
if(do_after(user, rand(150,300), airlock))
to_chat(user, "You finish removing \the [src].")
unlock_brace(user)
- return
+ return TRUE
if(IS_WELDER(W))
var/obj/item/weldingtool/C = W
if(!is_damaged())
to_chat(user, "\The [src] does not require repairs.")
- return
+ return TRUE
if(C.weld(0,user))
playsound(src, 'sound/items/Welder.ogg', 100, 1)
current_health = min(current_health + rand(20,30), get_max_health())
@@ -107,6 +105,8 @@
to_chat(user, "You repair some dents on \the [src]. It is in perfect condition now.")
else
to_chat(user, "You repair some dents on \the [src].")
+ return TRUE
+ return ..()
/obj/item/airlock_brace/physically_destroyed(skip_qdel)
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 8e60582e0a3..fab7e5836fe 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -219,23 +219,22 @@
/obj/machinery/door/firedoor/attackby(obj/item/C, mob/user)
add_fingerprint(user, 0, C)
if(operating)
- return//Already doing something.
+ return TRUE //Already doing something.
if(IS_WELDER(C) && !repairing)
var/obj/item/weldingtool/W = C
if(W.weld(0, user))
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, 2 SECONDS, src))
- if(!W.isOn()) return
+ if(!W.isOn()) return TRUE
blocked = !blocked
user.visible_message("\The [user] [blocked ? "welds" : "unwelds"] \the [src] with \a [W].",\
"You [blocked ? "weld" : "unweld"] \the [src] with \the [W].",\
"You hear something being welded.")
playsound(src, 'sound/items/Welder.ogg', 100, 1)
update_icon()
- return TRUE
else
to_chat(user, SPAN_WARNING("You must remain still to complete this task."))
- return TRUE
+ return TRUE
if(blocked && IS_CROWBAR(C))
user.visible_message("\The [user] pries at \the [src] with \a [C], but \the [src] is welded in place!",\
@@ -255,7 +254,7 @@
user.visible_message("\The [user] starts to force \the [src] [density ? "open" : "closed"] with \a [C]!",\
"You start forcing \the [src] [density ? "open" : "closed"] with \the [C]!",\
"You hear metal strain.")
- if(do_after(user,30,src))
+ if(do_after(user, 3 SECONDS, src))
if(IS_CROWBAR(C))
if(stat & (BROKEN|NOPOWER) || !density)
user.visible_message("\The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!",\
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 1a75bb12f6a..6ec853d2eb8 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -176,7 +176,7 @@
/obj/machinery/door/window/attackby(obj/item/I, mob/user)
//If it's in the process of opening/closing, ignore the click
if(operating)
- return
+ return TRUE
if(bash(I, user))
return TRUE
@@ -191,11 +191,13 @@
else
if (emagged)
to_chat(user, SPAN_WARNING("\The [src] seems to be stuck and refuses to close!"))
- return
+ return TRUE
close()
+ return TRUE
else if (density)
flick("[base_state]deny", src)
+ return TRUE
/obj/machinery/door/window/bash(obj/item/weapon, mob/user)
//Emags and energy swords? You may pass.
diff --git a/code/game/machinery/embedded_controller/airlock_docking_controller.dm b/code/game/machinery/embedded_controller/airlock_docking_controller.dm
index 99141afeb5d..87696262c88 100644
--- a/code/game/machinery/embedded_controller/airlock_docking_controller.dm
+++ b/code/game/machinery/embedded_controller/airlock_docking_controller.dm
@@ -21,8 +21,9 @@
else
code = stars(code)
to_chat(user,"[W]'s screen displays '[code]'")
+ return TRUE
else
- ..()
+ return ..()
/obj/machinery/embedded_controller/radio/airlock/docking_port/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/nanoui/master_ui = null, var/datum/topic_state/state = global.default_topic_state)
var/data[0]
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index 0ad47a51f86..b70c00dbe1a 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -43,8 +43,9 @@
user.visible_message("[user] has disconnected \the [src]'s flashbulb!", "You disconnect \the [src]'s flashbulb!")
if (!src.disable)
user.visible_message("[user] has connected \the [src]'s flashbulb!", "You connect \the [src]'s flashbulb!")
+ return TRUE
else
- ..()
+ return ..()
//Let the AI trigger them directly.
/obj/machinery/flasher/attack_ai()
@@ -134,6 +135,8 @@
else if (src.anchored)
user.show_message(text("[src] is now secured."))
src.overlays += "[base_state]-s"
+ return TRUE
+ return ..()
/obj/machinery/button/flasher
name = "flasher button"
diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm
index b8fd988c7e3..65fef9d81f1 100644
--- a/code/game/machinery/floor_light.dm
+++ b/code/game/machinery/floor_light.dm
@@ -75,6 +75,7 @@ var/global/list/floor_light_cache = list()
if(isnull(damaged))
damaged = 0
return TRUE
+ return FALSE
/obj/machinery/floor_light/interface_interact(var/mob/user)
if(!CanInteract(user, DefaultTopicState()))
diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm
index e51b20d8362..6d804caa374 100644
--- a/code/game/machinery/floorlayer.dm
+++ b/code/game/machinery/floorlayer.dm
@@ -42,14 +42,14 @@
mode[m] = !mode[m]
var/O = mode[m]
user.visible_message("[usr] has set \the [src] [m] mode [!O?"off":"on"].", "You set \the [src] [m] mode [!O?"off":"on"].")
- return
+ return TRUE
if(istype(W, /obj/item/stack/tile))
if(!user.try_unequip(W, T))
- return
+ return TRUE
to_chat(user, "\The [W] successfully loaded.")
TakeTile(T)
- return
+ return TRUE
if(IS_CROWBAR(W))
if(!length(contents))
@@ -60,12 +60,12 @@
to_chat(user, "You remove \the [E] from \the [src].")
E.dropInto(loc)
T = null
- return
+ return TRUE
if(IS_SCREWDRIVER(W))
T = input("Choose tile type.", "Tiles") as null|anything in contents
- return
- ..()
+ return TRUE
+ return ..()
/obj/machinery/floorlayer/examine(mob/user)
. = ..()
diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm
index 77640b003a7..f086a33332b 100644
--- a/code/game/machinery/igniter.dm
+++ b/code/game/machinery/igniter.dm
@@ -128,8 +128,9 @@
else if(!disable)
user.visible_message("[user] has reconnected \the [src]!", "You fix the connection to \the [src].")
update_icon()
+ return TRUE
else
- ..()
+ return ..()
/obj/machinery/sparker/attack_ai()
if (anchored)
diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm
index d6ef1ab8daa..6351cca16c7 100644
--- a/code/game/machinery/jukebox.dm
+++ b/code/game/machinery/jukebox.dm
@@ -157,7 +157,7 @@
add_fingerprint(user)
wrench_floor_bolts(user, 0, W)
power_change()
- return
+ return TRUE
return ..()
/obj/machinery/media/jukebox/emag_act(var/remaining_charges, var/mob/user)
diff --git a/code/game/machinery/kitchen/cooking_machines/_cooker.dm b/code/game/machinery/kitchen/cooking_machines/_cooker.dm
index 96a007811d7..e632cedf9b8 100644
--- a/code/game/machinery/kitchen/cooking_machines/_cooker.dm
+++ b/code/game/machinery/kitchen/cooking_machines/_cooker.dm
@@ -70,29 +70,29 @@
if(cooking)
to_chat(user, "\The [src] is running!")
- return
+ return TRUE
if((. = component_attackby(I, user)))
return
if(!cook_type || (stat & (NOPOWER|BROKEN)))
to_chat(user, "\The [src] is not working.")
- return
+ return TRUE
// We're trying to cook something else. Check if it's valid.
var/obj/item/food/check = I
if(istype(check) && islist(check.cooked) && (cook_type in check.cooked))
to_chat(user, "\The [check] has already been [cook_type].")
- return 0
+ return TRUE
else if(istype(check, /obj/item/chems/glass))
to_chat(user, "That would probably break [src].")
- return 0
+ return TRUE
else if(istype(check, /obj/item/disk/nuclear))
to_chat(user, "Central Command would kill you if you [cook_type] that.")
- return 0
+ return TRUE
else if(!istype(check) && !istype(check, /obj/item/holder))
to_chat(user, "That's not edible.")
- return 0
+ return TRUE
// Gotta hurt.
if(istype(cooking_obj, /obj/item/holder))
@@ -101,7 +101,7 @@
// Not sure why a food item that passed the previous checks would fail to drop, but safety first.
if(!user.try_unequip(I))
- return
+ return TRUE
// We can actually start cooking now.
user.visible_message("\The [user] puts \the [I] into \the [src].")
@@ -115,7 +115,7 @@
// Sanity checks.
if(check_cooking_obj())
- return // Cooking failed/was terminated.
+ return TRUE // Cooking failed/was terminated.
// RIP slow-moving held mobs.
if(istype(cooking_obj, /obj/item/holder))
@@ -183,6 +183,7 @@
cooking = 0
icon_state = off_icon
break
+ return TRUE
/obj/machinery/cooker/proc/check_cooking_obj()
if(!cooking_obj || cooking_obj.loc != src)
diff --git a/code/game/machinery/kitchen/icecream.dm b/code/game/machinery/kitchen/icecream.dm
index 81ee7881574..2a893f6e61b 100644
--- a/code/game/machinery/kitchen/icecream.dm
+++ b/code/game/machinery/kitchen/icecream.dm
@@ -132,11 +132,11 @@
to_chat(user, "There is not enough icecream left!")
else
to_chat(user, "[O] already has icecream in it.")
- return 1
+ return TRUE
else if(ATOM_IS_OPEN_CONTAINER(O))
- return
+ return TRUE
else
- ..()
+ return ..()
/obj/machinery/icecream_vat/proc/make(var/mob/user, var/make_type, var/amount)
for(var/R in get_ingredient_list(make_type))
diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm
index b11991c25ca..e9020da7cf0 100644
--- a/code/game/machinery/kitchen/smartfridge.dm
+++ b/code/game/machinery/kitchen/smartfridge.dm
@@ -187,7 +187,7 @@
/obj/machinery/smartfridge/attackby(var/obj/item/O, var/mob/user)
if(accept_check(O))
if(!user.try_unequip(O))
- return
+ return TRUE
stock_item(O)
user.visible_message("\The [user] has added \the [O] to \the [src].", "You add \the [O] to \the [src].")
update_icon()
diff --git a/code/game/machinery/message_server.dm b/code/game/machinery/message_server.dm
index ba19c1bb7b9..fdec0c2b48e 100644
--- a/code/game/machinery/message_server.dm
+++ b/code/game/machinery/message_server.dm
@@ -140,7 +140,8 @@ var/global/list/message_servers = list()
istype(O,/obj/item/stock_parts/circuitboard/message_monitor))
spamfilter_limit += round(MESSAGE_SERVER_DEFAULT_SPAM_LIMIT / 2)
qdel(O)
- to_chat(user, "You install additional memory and processors into message server. Its filtering capabilities been enhanced.")
+ to_chat(user, "You install additional memory and processors into \the [src]. Its filtering capabilities been enhanced.")
+ return TRUE
else
return ..()
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index 0fedef9c7c8..2e01d126217 100644
--- a/code/game/machinery/navbeacon.dm
+++ b/code/game/machinery/navbeacon.dm
@@ -44,14 +44,13 @@ var/global/list/navbeacons = list()
/obj/machinery/navbeacon/attackby(var/obj/item/I, var/mob/user)
var/turf/T = loc
if(!T.is_plating())
- return // prevent intraction when T-scanner revealed
+ return TRUE // prevent intraction when T-scanner revealed
if(IS_SCREWDRIVER(I))
open = !open
-
user.visible_message("\The [user] [open ? "opens" : "closes"] cover of \the [src].", "You [open ? "open" : "close"] cover of \the [src].")
-
update_icon()
+ return TRUE
else if(I.GetIdCard())
if(open)
@@ -63,7 +62,8 @@ var/global/list/navbeacons = list()
updateDialog()
else
to_chat(user, "You must open the cover first!")
- return
+ return TRUE
+ return FALSE
/obj/machinery/navbeacon/interface_interact(var/mob/user)
interact(user)
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index b6bfde194b1..75221d30278 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -874,21 +874,19 @@ var/global/list/allCasters = list() //Global list that will contain reference to
if(src.scribble_page == src.curr_page)
to_chat(user, SPAN_WARNING("There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?"))
return TRUE
- else
- var/s = input(user, "Write something", "Newspaper") as null | message
- if(!length(s))
- return
- if(!CanPhysicallyInteractWith(user, src))
- to_chat(user, SPAN_WARNING("You must stay close to \the [src]!"))
- return
- if(W.do_tool_interaction(TOOL_PEN, user, src, 0, fuel_expenditure = 1) && !QDELETED(src)) //Make it instant, since handle_writing_literacy does the waiting
- s = sanitize(s)
- s = user.handle_writing_literacy(user, s)
- src.scribble_page = src.curr_page
- src.scribble = s
- src.attack_self(user)
- return TRUE
- return
+ var/s = input(user, "Write something", "Newspaper") as null | message
+ if(!length(s))
+ return TRUE
+ if(!CanPhysicallyInteractWith(user, src))
+ to_chat(user, SPAN_WARNING("You must stay close to \the [src]!"))
+ return TRUE
+ if(W.do_tool_interaction(TOOL_PEN, user, src, 0, fuel_expenditure = 1) && !QDELETED(src)) //Make it instant, since handle_writing_literacy does the waiting
+ s = sanitize(s)
+ s = user.handle_writing_literacy(user, s)
+ src.scribble_page = src.curr_page
+ src.scribble = s
+ src.attack_self(user)
+ return TRUE
return ..()
////////////////////////////////////helper procs
diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm
index d3465ff698f..27e7d81ea03 100644
--- a/code/game/machinery/nuclear_bomb.dm
+++ b/code/game/machinery/nuclear_bomb.dm
@@ -67,7 +67,7 @@ var/global/bomb_set
to_chat(user, "You screw the control panel of \the [src] back on.")
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
flick("lock", src)
- return
+ return TRUE
if(panel_open && (IS_MULTITOOL(O) || IS_WIRECUTTER(O)))
return attack_hand_with_interaction_checks(user)
@@ -75,7 +75,7 @@ var/global/bomb_set
if(extended)
if(istype(O, /obj/item/disk/nuclear))
if(!user.try_unequip(O, src))
- return
+ return TRUE
auth = O
add_fingerprint(user)
return attack_hand_with_interaction_checks(user)
@@ -85,66 +85,67 @@ var/global/bomb_set
if(0)
if(IS_WELDER(O))
var/obj/item/weldingtool/WT = O
- if(!WT.isOn()) return
+ if(!WT.isOn()) return TRUE
if(WT.get_fuel() < 5) // uses up 5 fuel.
to_chat(user, "You need more fuel to complete this task.")
- return
+ return TRUE
user.visible_message("[user] starts cutting loose the anchoring bolt covers on [src].", "You start cutting loose the anchoring bolt covers with [O]...")
- if(do_after(user,40, src))
- if(!src || !user || !WT.weld(5, user)) return
+ if(do_after(user, 4 SECONDS, src))
+ if(QDELETED(src) || QDELETED(user) || !WT.weld(5, user)) return TRUE
user.visible_message("\The [user] cuts through the bolt covers on \the [src].", "You cut through the bolt cover.")
removal_stage = 1
- return
+ return TRUE
if(1)
if(IS_CROWBAR(O))
user.visible_message("[user] starts forcing open the bolt covers on [src].", "You start forcing open the anchoring bolt covers with [O]...")
- if(do_after(user, 15, src))
- if(!src || !user) return
+ if(do_after(user, 1.5 SECONDS, src))
+ if(QDELETED(src) || QDELETED(user)) return TRUE
user.visible_message("\The [user] forces open the bolt covers on \the [src].", "You force open the bolt covers.")
removal_stage = 2
- return
+ return TRUE
if(2)
if(IS_WELDER(O))
var/obj/item/weldingtool/WT = O
- if(!WT.isOn()) return
+ if(!WT.isOn()) return TRUE
if (WT.get_fuel() < 5) // uses up 5 fuel.
to_chat(user, "You need more fuel to complete this task.")
- return
+ return TRUE
user.visible_message("[user] starts cutting apart the anchoring system sealant on [src].", "You start cutting apart the anchoring system's sealant with [O]...")
- if(do_after(user, 40, src))
- if(!src || !user || !WT.weld(5, user)) return
+ if(do_after(user, 4 SECONDS, src))
+ if(QDELETED(src) || QDELETED(user) || !WT.weld(5, user)) return TRUE
user.visible_message("\The [user] cuts apart the anchoring system sealant on \the [src].", "You cut apart the anchoring system's sealant.")
removal_stage = 3
- return
+ return TRUE
if(3)
if(IS_WRENCH(O))
user.visible_message("[user] begins unwrenching the anchoring bolts on [src].", "You begin unwrenching the anchoring bolts...")
- if(do_after(user, 50, src))
- if(!src || !user) return
+ if(do_after(user, 5 SECONDS, src))
+ if(QDELETED(src) || QDELETED(user)) return TRUE
user.visible_message("[user] unwrenches the anchoring bolts on [src].", "You unwrench the anchoring bolts.")
removal_stage = 4
- return
+ return TRUE
if(4)
if(IS_CROWBAR(O))
user.visible_message("[user] begins lifting [src] off of the anchors.", "You begin lifting the device off the anchors...")
- if(do_after(user, 80, src))
- if(!src || !user) return
+ if(do_after(user, 8 SECONDS, src))
+ if(QDELETED(src) || QDELETED(user)) return TRUE
user.visible_message("\The [user] crowbars \the [src] off of the anchors. It can now be moved.", "You jam the crowbar under the nuclear device and lift it off its anchors. You can now move it!")
anchored = FALSE
removal_stage = 5
- return
- ..()
+ return TRUE
+ return ..()
/obj/machinery/nuclearbomb/physical_attack_hand(mob/user)
+ . = FALSE
if(!extended && deployable)
. = TRUE
if(removal_stage < 5)
@@ -469,8 +470,7 @@ var/global/bomb_set
inserters += ch
/obj/machinery/nuclearbomb/station/attackby(obj/item/O, mob/user)
- if(IS_WRENCH(O))
- return
+ return TRUE // cannot be moved
/obj/machinery/nuclearbomb/station/Topic(href, href_list)
if((. = ..()))
diff --git a/code/game/machinery/oxygen_pump.dm b/code/game/machinery/oxygen_pump.dm
index b72f83b4267..27a13a93063 100644
--- a/code/game/machinery/oxygen_pump.dm
+++ b/code/game/machinery/oxygen_pump.dm
@@ -62,6 +62,7 @@
if(breather)
detach_mask(user)
return TRUE
+ return FALSE
/obj/machinery/oxygen_pump/interface_interact(mob/user)
ui_interact(user)
@@ -143,18 +144,21 @@
icon_state = icon_state_open
if(!stat)
icon_state = icon_state_closed
- //TO-DO: Open icon
+ return TRUE
if(istype(W, /obj/item/tank) && (stat & MAINT))
if(tank)
to_chat(user, SPAN_WARNING("\The [src] already has a tank installed!"))
- else
- if(!user.try_unequip(W, src))
- return
- tank = W
- user.visible_message(SPAN_NOTICE("\The [user] installs \the [tank] into \the [src]."), SPAN_NOTICE("You install \the [tank] into \the [src]."))
- src.add_fingerprint(user)
+ return TRUE
+ if(!user.try_unequip(W, src))
+ return TRUE
+ tank = W
+ user.visible_message(SPAN_NOTICE("\The [user] installs \the [tank] into \the [src]."), SPAN_NOTICE("You install \the [tank] into \the [src]."))
+ src.add_fingerprint(user)
+ return TRUE
if(istype(W, /obj/item/tank) && !stat)
to_chat(user, SPAN_WARNING("Please open the maintenance hatch first."))
+ return TRUE
+ return FALSE // TODO: should this be a parent call? do we want this to be (de)constructable?
/obj/machinery/oxygen_pump/examine(mob/user)
. = ..()
diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm
index a27ec6c7ab3..57fe940fe0b 100644
--- a/code/game/machinery/pipe/construction.dm
+++ b/code/game/machinery/pipe/construction.dm
@@ -134,6 +134,7 @@ Buildable meters
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
to_chat(user, "You have fastened \the [src].")
qdel(src)
+ return TRUE
/obj/item/machine_chassis/air_sensor
name = "gas sensor"
diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm
index 457062889fa..647e9c0b572 100644
--- a/code/game/machinery/pipe/pipelayer.dm
+++ b/code/game/machinery/pipe/pipelayer.dm
@@ -45,12 +45,12 @@
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
+ return TRUE
if(IS_CROWBAR(W))
a_dis=!a_dis
user.visible_message("[user] has [!a_dis?"de":""]activated auto-dismantling.", "You [!a_dis?"de":""]activate auto-dismantling.")
- return
+ return TRUE
if(istype(W, /obj/item/stack/material) && W.get_material_type() == /decl/material/solid/metal/steel)
@@ -62,7 +62,7 @@
else
user.visible_message("[user] has loaded metal into \the [src].", "You load metal into \the [src]")
- return
+ return TRUE
if(IS_SCREWDRIVER(W))
if(metal)
@@ -76,8 +76,8 @@
user.visible_message("[user] removes [m] sheet\s of metal from the \the [src].", "You remove [m] sheet\s of metal from \the [src]")
else
to_chat(user, "\The [src] is empty.")
- return
- ..()
+ return TRUE
+ return ..()
/obj/machinery/pipelayer/examine(mob/user)
. = ..()
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index 1aa1dc86ccb..e7f5b123b93 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -236,6 +236,7 @@ var/global/list/turret_icons
new /obj/item/assembly/prox_sensor(loc)
. = ..()
+// TODO: remove these or refactor to use construct states
/obj/machinery/porta_turret/attackby(obj/item/I, mob/user)
if(stat & BROKEN)
if(IS_CROWBAR(I))
@@ -248,17 +249,19 @@ var/global/list/turret_icons
physically_destroyed()
else
to_chat(user, "You remove the turret but did not manage to salvage anything.")
+ return TRUE
+ return FALSE
else if(IS_WRENCH(I))
if(enabled || raised)
to_chat(user, "You cannot unsecure an active turret!")
- return
+ return TRUE
if(wrenching)
to_chat(user, "Someone is already [anchored ? "un" : ""]securing the turret!")
- return
+ return TRUE
if(!anchored && isspaceturf(get_turf(src)))
to_chat(user, "Cannot secure turrets in space!")
- return
+ return TRUE
user.visible_message( \
"[user] begins [anchored ? "un" : ""]securing the turret.", \
@@ -266,19 +269,14 @@ var/global/list/turret_icons
)
wrenching = 1
- if(do_after(user, 50, src))
+ if(do_after(user, 5 SECONDS, src))
//This code handles moving the turret around. After all, it's a portable turret!
- if(!anchored)
- playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
- anchored = TRUE
- update_icon()
- to_chat(user, "You secure the exterior bolts on the turret.")
- else if(anchored)
- playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
- anchored = FALSE
- to_chat(user, "You unsecure the exterior bolts on the turret.")
- update_icon()
+ playsound(loc, 'sound/items/Ratchet.ogg', 100, TRUE)
+ anchored = !anchored
+ update_icon()
+ to_chat(user, "You [anchored ? "secure" : "unsecure"] the exterior bolts on [src].")
wrenching = 0
+ return TRUE
else if(istype(I, /obj/item/card/id)||istype(I, /obj/item/modular_computer))
//Behavior lock/unlock mangement
@@ -288,6 +286,7 @@ var/global/list/turret_icons
updateUsrDialog()
else
to_chat(user, "Access denied.")
+ return TRUE
else
//if the turret was attacked with the intention of harming it:
@@ -298,9 +297,9 @@ var/global/list/turret_icons
if(!attacked && !emagged)
attacked = 1
spawn()
- sleep(60)
+ sleep(6 SECONDS)
attacked = 0
- ..()
+ return TRUE
/obj/machinery/porta_turret/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 33e8bee28d0..fc240f89e81 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -71,6 +71,7 @@
charging = null
update_icon()
return TRUE
+ return FALSE
/obj/machinery/recharger/Process()
if(stat & (NOPOWER|BROKEN) || !anchored)
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index f8ee5e4f63b..2fe46fa3e1d 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -208,26 +208,29 @@ var/global/req_console_information = list()
/obj/machinery/network/requests_console/attackby(var/obj/item/O, var/mob/user)
if (istype(O, /obj/item/card/id))
- if(inoperable(MAINT)) return
- if(screen == RCS_MESSAUTH)
- var/obj/item/card/id/T = O
- msgVerified = text("Verified by [T.registered_name] ([T.assignment])")
- SSnano.update_uis(src)
- if(screen == RCS_ANNOUNCE)
- var/obj/item/card/id/ID = O
- if (access_RC_announce in ID.GetAccess())
- announceAuth = 1
- announcement.announcer = ID.assignment ? "[ID.assignment] [ID.registered_name]" : ID.registered_name
- else
- reset_message()
- to_chat(user, "You are not authorized to send announcements.")
- SSnano.update_uis(src)
+ if(inoperable(MAINT)) return TRUE
+ switch(screen)
+ if(RCS_MESSAUTH)
+ var/obj/item/card/id/T = O
+ msgVerified = text("Verified by [T.registered_name] ([T.assignment])")
+ SSnano.update_uis(src)
+ if(RCS_ANNOUNCE)
+ var/obj/item/card/id/ID = O
+ if (access_RC_announce in ID.GetAccess())
+ announceAuth = 1
+ announcement.announcer = ID.assignment ? "[ID.assignment] [ID.registered_name]" : ID.registered_name
+ else
+ reset_message()
+ to_chat(user, "You are not authorized to send announcements.")
+ SSnano.update_uis(src)
+ return TRUE
if (istype(O, /obj/item/stamp))
- if(inoperable(MAINT)) return
+ if(inoperable(MAINT)) return TRUE
if(screen == RCS_MESSAUTH)
var/obj/item/stamp/T = O
msgStamped = "Stamped with the [T.name]"
SSnano.update_uis(src)
+ return TRUE
return ..()
/obj/machinery/network/requests_console/proc/reset_message(var/mainmenu = 0)
diff --git a/code/game/machinery/self_destruct.dm b/code/game/machinery/self_destruct.dm
index 6b516eb954f..ee842c32e23 100644
--- a/code/game/machinery/self_destruct.dm
+++ b/code/game/machinery/self_destruct.dm
@@ -11,33 +11,35 @@
/obj/machinery/self_destruct/attackby(obj/item/W, mob/user)
if(IS_WELDER(W))
- if(damaged)
- user.visible_message("[user] begins to repair [src].", "You begin repairing [src].")
- if(do_after(usr, 100, src))
- var/obj/item/weldingtool/w = W
- if(w.weld(10))
- damaged = 0
- user.visible_message("[user] repairs [src].", "You repair [src].")
- else
- to_chat(user, "There is not enough fuel to repair [src].")
- return
+ if(!damaged)
+ return FALSE
+ user.visible_message("[user] begins to repair [src].", "You begin repairing [src].")
+ if(do_after(usr, 100, src))
+ var/obj/item/weldingtool/w = W
+ if(w.weld(10))
+ damaged = 0
+ user.visible_message("[user] repairs [src].", "You repair [src].")
+ else
+ to_chat(user, "There is not enough fuel to repair [src].")
+ return TRUE
if(istype(W, /obj/item/nuclear_cylinder))
if(damaged)
to_chat(user, "[src] is damaged, you cannot place the cylinder.")
- return
+ return TRUE
if(cylinder)
to_chat(user, "There is already a cylinder here.")
- return
- user.visible_message("[user] begins to carefully place [W] onto the Inserter.", "You begin to carefully place [W] onto the Inserter.")
+ return TRUE
+ user.visible_message("[user] begins to carefully place [W] onto [src].", "You begin to carefully place [W] onto [src].")
if(do_after(user, 80, src) && user.try_unequip(W, src))
cylinder = W
density = TRUE
- user.visible_message("[user] places [W] onto the Inserter.", "You place [W] onto the Inserter.")
+ user.visible_message("[user] places [W] onto [src].", "You place [W] onto [src].")
update_icon()
- return
- ..()
+ return TRUE
+ return ..()
/obj/machinery/self_destruct/physical_attack_hand(mob/user)
+ . = FALSE
if(cylinder)
. = TRUE
if(armed)
diff --git a/code/game/machinery/self_destruct_storage.dm b/code/game/machinery/self_destruct_storage.dm
index 09f2e613213..d8cd3e9d3a0 100644
--- a/code/game/machinery/self_destruct_storage.dm
+++ b/code/game/machinery/self_destruct_storage.dm
@@ -65,15 +65,6 @@
/obj/machinery/nuclear_cylinder_storage/physical_attack_hand(mob/user)
if(!panel_open)
- if(operable() && locked && check_access(user))
- locked = FALSE
- user.visible_message(
- "\The [user] unlocks \the [src].",
- "You unlock \the [src]."
- )
- update_icon()
- return TRUE
-
if(!locked)
open = !open
user.visible_message(
@@ -82,14 +73,24 @@
)
update_icon()
return TRUE
+ if(operable() && check_access(user))
+ locked = FALSE
+ user.visible_message(
+ "\The [user] unlocks \the [src].",
+ "You unlock \the [src]."
+ )
+ update_icon()
+ return TRUE
else
to_chat(user, SPAN_WARNING("\The [src] is currently in maintenance mode!"))
+ return TRUE
+ return FALSE
/obj/machinery/nuclear_cylinder_storage/attackby(obj/item/O, mob/user)
if(!open && operable() && istype(O, /obj/item/card/id))
if(panel_open)
to_chat(user, SPAN_WARNING("\The [src] is currently in maintenance mode!"))
- return
+ return TRUE
var/obj/item/card/id/id = O
if(check_access(id))
@@ -99,12 +100,12 @@
"You [locked ? "lock" : "unlock"] \the [src]."
)
update_icon()
- return
+ return TRUE
if(open && istype(O, /obj/item/nuclear_cylinder) && (length(cylinders) < max_cylinders))
if(panel_open)
to_chat(user, SPAN_WARNING("\The [src] is currently in maintenance mode!"))
- return
+ return TRUE
user.visible_message(
"\The [user] begins inserting \the [O] into storage.",
@@ -117,8 +118,9 @@
)
cylinders.Add(O)
update_icon()
+ return TRUE
- ..()
+ return ..()
/obj/machinery/nuclear_cylinder_storage/handle_mouse_drop(atom/over, mob/user, params)
if(over == user && open && !panel_open && length(cylinders))
diff --git a/code/game/machinery/singularitybeacon.dm b/code/game/machinery/singularitybeacon.dm
index b47720adbfe..5d8690d5676 100644
--- a/code/game/machinery/singularitybeacon.dm
+++ b/code/game/machinery/singularitybeacon.dm
@@ -58,18 +58,15 @@ var/global/list/singularity_beacons = list()
if(IS_SCREWDRIVER(W))
if(use_power)
to_chat(user, SPAN_DANGER("You need to deactivate the beacon first!"))
- return
+ return TRUE
+ anchored = !anchored
if(anchored)
- anchored = FALSE
- to_chat(user, SPAN_NOTICE("You unscrew the beacon from the floor."))
- return
- else
- anchored = TRUE
to_chat(user, SPAN_NOTICE("You screw the beacon to the floor."))
- return
- ..()
- return
+ else
+ to_chat(user, SPAN_NOTICE("You unscrew the beacon from the floor."))
+ return TRUE
+ return ..()
// Ensure the terminal is always accessible to be plugged in.
/obj/machinery/singularity_beacon/components_are_accessible(var/path)
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index 8cdbd6c835c..e59df75a663 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -91,6 +91,7 @@
user.visible_message("[user] switches [on ? "on" : "off"] \the [src].","You switch [on ? "on" : "off"] \the [src].")
update_icon()
return TRUE
+ return FALSE
/obj/machinery/space_heater/Topic(href, href_list, state = global.physical_topic_state)
if (..())
diff --git a/code/game/machinery/suit_cycler.dm b/code/game/machinery/suit_cycler.dm
index 784d08b1f4a..7f899870a1c 100644
--- a/code/game/machinery/suit_cycler.dm
+++ b/code/game/machinery/suit_cycler.dm
@@ -209,12 +209,12 @@
if(istype(I, /obj/item/clothing/shoes/magboots))
if(locked)
to_chat(user, SPAN_WARNING("The suit cycler is locked."))
- return
+ return TRUE
if(boots)
to_chat(user, SPAN_WARNING("The cycler already contains some boots."))
- return
+ return TRUE
if(!user.try_unequip(I, src))
- return
+ return TRUE
to_chat(user, "You fit \the [I] into the suit cycler.")
set_boots(I)
update_icon()
diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm
index 8088e75e97b..141619bd14f 100644
--- a/code/game/machinery/turret_control.dm
+++ b/code/game/machinery/turret_control.dm
@@ -86,7 +86,7 @@
/obj/machinery/turretid/attackby(obj/item/W, mob/user)
if(stat & BROKEN)
- return
+ return FALSE
if(istype(W, /obj/item/card/id)||istype(W, /obj/item/modular_computer))
if(src.allowed(usr))
@@ -95,7 +95,7 @@
else
locked = !locked
to_chat(user, "You [ locked ? "lock" : "unlock"] the panel.")
- return
+ return TRUE
return ..()
/obj/machinery/turretid/emag_act(var/remaining_charges, var/mob/user)
diff --git a/code/game/machinery/turrets/_turrets.dm b/code/game/machinery/turrets/_turrets.dm
index b3801efe75a..3030bc2bef9 100644
--- a/code/game/machinery/turrets/_turrets.dm
+++ b/code/game/machinery/turrets/_turrets.dm
@@ -133,20 +133,18 @@
update_use_power(POWER_USE_IDLE)
/obj/machinery/turret/attackby(obj/item/I, mob/user)
- if(istype(I, /obj/item/gun))
- if(!installed_gun)
- if(!user.try_unequip(I, src))
- return
- to_chat(user, SPAN_NOTICE("You install \the [I] into \the [src]!"))
- installed_gun = I
- setup_gun()
- return
+ if(istype(I, /obj/item/gun) && !installed_gun)
+ if(!user.try_unequip(I, src))
+ return TRUE
+ to_chat(user, SPAN_NOTICE("You install \the [I] into \the [src]!"))
+ installed_gun = I
+ setup_gun()
+ return TRUE
if(istype(I, /obj/item/ammo_magazine) || istype(I, /obj/item/ammo_casing))
var/obj/item/stock_parts/ammo_box/ammo_box = get_component_of_type(/obj/item/stock_parts/ammo_box)
if(istype(ammo_box))
- ammo_box.attackby(I, user)
- return
+ return ammo_box.attackby(I, user)
. = ..()
// This is called after the gun gets instantiated or slotted in.
diff --git a/code/game/machinery/vending/_vending.dm b/code/game/machinery/vending/_vending.dm
index 9bac9df3284..9e08c83653a 100644
--- a/code/game/machinery/vending/_vending.dm
+++ b/code/game/machinery/vending/_vending.dm
@@ -251,6 +251,7 @@
if(seconds_electrified != 0)
if(shock(user, 100))
return TRUE
+ return FALSE
/obj/machinery/vending/interface_interact(mob/user)
ui_interact(user)
diff --git a/code/game/machinery/wall_frames.dm b/code/game/machinery/wall_frames.dm
index f3f7fb0ed89..7e7e2717612 100644
--- a/code/game/machinery/wall_frames.dm
+++ b/code/game/machinery/wall_frames.dm
@@ -292,7 +292,8 @@
if(.)
M = build_machine_type
to_chat(user, SPAN_NOTICE("You setup \the [src]'s software to work as a '[initial(M.name)]', using \the [W]."))
- return .
+ return TRUE
+ return FALSE
/obj/item/frame/button/airlock_controller/kit
fully_construct = TRUE
@@ -321,7 +322,7 @@
var/choice = input(user, "Chose the type of controller to build:", "Select Controller Type") as null|anything in possible_kit_type_names
if(!choice || !CanPhysicallyInteract(user))
build_machine_type = initial(build_machine_type)
- return
+ return TRUE
build_machine_type = possible_kit_type_names[choice]
M = build_machine_type
to_chat(user, SPAN_NOTICE("You set the kit type to '[initial(M.name)]'!"))
diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm
index d470bdcaf28..a82e8082510 100644
--- a/code/game/machinery/washing_machine.dm
+++ b/code/game/machinery/washing_machine.dm
@@ -97,12 +97,12 @@
if(istype(W, /obj/item/chems/pill/detergent))
if(!(atom_flags & ATOM_FLAG_OPEN_CONTAINER))
to_chat(user, SPAN_WARNING("Open the detergent port first!"))
- return
+ return TRUE
if(reagents.total_volume >= reagents.maximum_volume)
to_chat(user, SPAN_WARNING("The detergent port is full!"))
- return
+ return TRUE
if(!user.try_unequip(W))
- return
+ return TRUE
// Directly transfer to the holder to avoid touch reactions.
W.reagents?.trans_to_holder(reagents, W.reagents.total_volume)
to_chat(user, SPAN_NOTICE("You dissolve \the [W] in the detergent port."))
@@ -131,14 +131,14 @@
else if((!length(wash_whitelist) || is_type_in_list(W, wash_whitelist)) && !is_type_in_list(W, wash_blacklist))
if(W.w_class > max_item_size)
to_chat(user, SPAN_WARNING("\The [W] is too large for \the [src]!"))
- return
+ return TRUE
if(!user.try_unequip(W, src))
- return
+ return TRUE
state |= WASHER_STATE_LOADED
update_icon()
else
to_chat(user, SPAN_WARNING("You can't put \the [W] in \the [src]."))
- return
+ return TRUE
else
to_chat(user, SPAN_NOTICE("\The [src] is full."))
return TRUE
diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm
index 1a577cb0063..a1a3fd87bd3 100644
--- a/code/game/objects/effects/spiders.dm
+++ b/code/game/objects/effects/spiders.dm
@@ -55,6 +55,7 @@
current_health -= damage
healthcheck()
+ return TRUE
/obj/effect/spider/bullet_act(var/obj/item/projectile/Proj)
..()
@@ -194,7 +195,7 @@
. = ..()
/obj/effect/spider/spiderling/attackby(var/obj/item/W, var/mob/user)
- ..()
+ . = ..()
if(current_health > 0)
disturbed()
diff --git a/code/game/objects/items/__item.dm b/code/game/objects/items/__item.dm
index c5bb66a77c5..3575c49f2f4 100644
--- a/code/game/objects/items/__item.dm
+++ b/code/game/objects/items/__item.dm
@@ -93,7 +93,7 @@
var/replaced_in_loadout = TRUE
var/paint_color
- var/paint_verb = "painted"
+ var/paint_verb
/// What dexterity is required to attack with this item?
var/needs_attack_dexterity = DEXTERITY_WIELD_ITEM
@@ -167,6 +167,7 @@
material_key = material
if(material_key)
set_material(material_key)
+ paint_verb ||= "painted" // fallback for the case of no material
. = ..()
@@ -289,7 +290,8 @@
desc_comp += "[desc_damage]"
if(paint_color)
- desc_comp += "\The [src] has been [paint_verb]."
+ var/decl/pronouns/obj_pronouns = get_pronouns() // so we can do 'have' for plural objects like sheets
+ desc_comp += "\The [src] [obj_pronouns.has] been [paint_verb]."
var/added_header = FALSE
if(user?.get_preference_value(/datum/client_preference/inquisitive_examine) == PREF_ON)
@@ -1035,7 +1037,7 @@ modules/mob/living/human/life.dm if you die, you will be zoomed out.
LAZYADD(., slot_belt_str)
// Updates the icons of the mob wearing the clothing item, if any.
-/obj/item/proc/update_clothing_icon()
+/obj/item/proc/update_clothing_icon(do_update_icon = TRUE)
var/mob/wearer = loc
if(!istype(wearer))
return FALSE
@@ -1044,7 +1046,8 @@ modules/mob/living/human/life.dm if you die, you will be zoomed out.
return FALSE
for(var/slot in equip_slots)
wearer.update_equipment_overlay(slot, FALSE)
- wearer.update_icon()
+ if(do_update_icon)
+ wearer.update_icon()
return TRUE
/obj/item/proc/reconsider_client_screen_presence(var/client/client, var/slot)
@@ -1193,7 +1196,11 @@ modules/mob/living/human/life.dm if you die, you will be zoomed out.
return watertight || ..()
// TODO: merge beakers etc down into this proc.
-/obj/item/proc/get_reagents_overlay()
+/// @params:
+/// - state_prefix as text: if non-null, this string is prepended to the reagent overlay state, typically world/inventory/etc
+/// @returns:
+/// - reagent_overlay as /image|null - the overlay image representing the reagents in this object
+/obj/item/proc/get_reagents_overlay(state_prefix)
if(reagents?.total_volume <= 0)
return
var/decl/material/primary_reagent = reagents.get_primary_reagent_decl()
@@ -1204,11 +1211,14 @@ modules/mob/living/human/life.dm if you die, you will be zoomed out.
reagents_state = primary_reagent.reagent_overlay_base
else
reagents_state = "reagent_base"
+ if(state_prefix)
+ reagents_state = "[state_prefix]_[reagents_state]" // prepend world, inventory, or slot
if(!reagents_state || !check_state_in_icon(reagents_state, icon))
return
var/image/reagent_overlay = overlay_image(icon, reagents_state, reagents.get_color(), RESET_COLOR | RESET_ALPHA)
for(var/reagent_type in reagents.reagent_volumes)
var/decl/material/reagent = GET_DECL(reagent_type)
- if(reagent.reagent_overlay && check_state_in_icon(reagent.reagent_overlay, icon))
- reagent_overlay.overlays += overlay_image(icon, reagent.reagent_overlay, reagent.get_reagent_color(), RESET_COLOR | RESET_ALPHA)
+ var/modified_reagent_overlay = state_prefix ? "[state_prefix]_[reagent.reagent_overlay]" : reagent.reagent_overlay
+ if(modified_reagent_overlay && check_state_in_icon(modified_reagent_overlay, icon))
+ reagent_overlay.overlays += overlay_image(icon, modified_reagent_overlay, reagent.get_reagent_color(), RESET_COLOR | RESET_ALPHA)
return reagent_overlay
diff --git a/code/game/objects/items/_item_materials.dm b/code/game/objects/items/_item_materials.dm
index ab9d0ed512a..95bc6402777 100644
--- a/code/game/objects/items/_item_materials.dm
+++ b/code/game/objects/items/_item_materials.dm
@@ -89,6 +89,8 @@
obj_flags |= OBJ_FLAG_CONDUCTIBLE
else
obj_flags &= (~OBJ_FLAG_CONDUCTIBLE)
+ if(isnull(initial(paint_verb)))
+ paint_verb = material.paint_verb
update_attack_force()
update_name()
if(material_armor_multiplier)
diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm
index f3cd559ec44..4313657b12d 100644
--- a/code/game/objects/items/bodybag.dm
+++ b/code/game/objects/items/bodybag.dm
@@ -58,7 +58,7 @@
/obj/structure/closet/body_bag/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/hand_labeler))
- return //Prevent the labeler from opening the bag when trying to apply a label
+ return FALSE //Prevent the labeler from opening the bag when trying to apply a label
. = ..()
/obj/structure/closet/body_bag/store_mobs(var/stored_units)
diff --git a/code/game/objects/items/books/skill/_skill_custom.dm b/code/game/objects/items/books/skill/_skill_custom.dm
index 8cea8528099..2d9bfa2a359 100644
--- a/code/game/objects/items/books/skill/_skill_custom.dm
+++ b/code/game/objects/items/books/skill/_skill_custom.dm
@@ -54,44 +54,43 @@
icon = 'icons/obj/items/books/book_white_question.dmi'
/obj/item/book/skill/custom/attackby(obj/item/pen, mob/user)
- if(IS_PEN(pen))
-
- if(!user.skill_check(SKILL_LITERACY, SKILL_BASIC))
- to_chat(user, SPAN_WARNING("You can't even read, yet you want to write a whole educational textbook?"))
- return
- if(!user.skill_check(SKILL_LITERACY, SKILL_PROF))
- to_chat(user, SPAN_WARNING("You have no clue as to how to write an entire textbook in a way that is actually useful. Maybe a regular book would be better?"))
- return
- var/state_check = skill_option_string // the state skill_option_string is in just before opening the input
- var/choice = input(user, "What would you like to change?","Textbook editing") as null|anything in list("Title", "Author", skill_option_string)
- if(!can_write(pen,user))
- return
+ if(!IS_PEN(pen))
+ return ..()
+ if(!user.skill_check(SKILL_LITERACY, SKILL_BASIC))
+ to_chat(user, SPAN_WARNING("You can't even read, yet you want to write a whole educational textbook?"))
+ return TRUE
+ if(!user.skill_check(SKILL_LITERACY, SKILL_PROF))
+ to_chat(user, SPAN_WARNING("You have no clue as to how to write an entire textbook in a way that is actually useful. Maybe a regular book would be better?"))
+ return TRUE
+ var/state_check = skill_option_string // the state skill_option_string is in just before opening the input
+ var/choice = input(user, "What would you like to change?","Textbook editing") as null|anything in list("Title", "Author", skill_option_string)
+ if(!can_write(pen,user))
+ return TRUE
- switch(choice)
- if("Title")
- edit_title(pen, user)
+ switch(choice)
+ if("Title")
+ edit_title(pen, user)
- if("Skill")
- if(state_check != "Skill") // make sure someone hasn't already started the book while we were staring at menus woops
- to_chat(user, SPAN_WARNING("The skill has already been selected and the writing started."))
- return
- edit_skill(pen, user)
+ if("Skill")
+ if(state_check != "Skill") // make sure someone hasn't already started the book while we were staring at menus woops
+ to_chat(user, SPAN_WARNING("The skill has already been selected and the writing started."))
+ return TRUE
+ edit_skill(pen, user)
- if("Continue writing content")
- if(state_check != "Continue writing content")
- return
- continue_skill(pen, user)
+ if("Continue writing content")
+ if(state_check != "Continue writing content")
+ return TRUE
+ continue_skill(pen, user)
- if("Author")
- edit_author(pen, user)
+ if("Author")
+ edit_author(pen, user)
- else
- return
+ else
+ return TRUE
- if(skill && title && author) // we have everything we need so lets set a good description
- desc = "A handwritten textbook titled [title], by [author]. Looks like it teaches [skill_name]."
- return
- ..()
+ if(skill && title && author) // we have everything we need so lets set a good description
+ desc = "A handwritten textbook titled [title], by [author]. Looks like it teaches [skill_name]."
+ return TRUE
/obj/item/book/skill/custom/proc/can_write(var/obj/item/pen, var/mob/user)
if(user.get_active_held_item() == pen && CanPhysicallyInteractWith(user,src) && !QDELETED(src) && !QDELETED(pen))
diff --git a/code/game/objects/items/crutches.dm b/code/game/objects/items/crutches.dm
new file mode 100644
index 00000000000..19221c12eb7
--- /dev/null
+++ b/code/game/objects/items/crutches.dm
@@ -0,0 +1,59 @@
+/obj/item/crutch
+ abstract_type = /obj/item/crutch
+ name = "crutch"
+ desc = "A mobility aid for those with impaired use of their legs or feet, placed underneath the arm for support."
+ icon = 'icons/obj/items/crutches.dmi'
+ icon_state = ICON_STATE_WORLD
+ base_parry_chance = 10
+ material_alteration = MAT_FLAG_ALTERATION_ALL
+ w_class = ITEM_SIZE_LARGE
+ max_health = null // autoset from material
+ /// The material used for the padding. If null, the crutch is unpadded. Initially a typepath, set to an instance in Initialize.
+ var/decl/material/padding_material
+ /// The color used for the padding, in the case of paint or dye. If null, falls back to padding material color.
+ var/padding_color = null
+
+/obj/item/crutch/Initialize(ml, material_key)
+ padding_material = GET_DECL(padding_material)
+ return ..()
+
+// potential todo: to avoid matter shenanigans make padding a separate item that can be removed via alt interaction and added via attackby?
+// add padding by clicking with sewing tools in active hand and fabric in offhand?
+/obj/item/crutch/create_matter()
+ . = ..()
+ if(padding_material)
+ matter[padding_material.type] += MATTER_AMOUNT_TRACE
+
+/obj/item/crutch/get_stance_support_value()
+ return LIMB_UNUSABLE
+
+/obj/item/crutch/get_autopsy_descriptors()
+ . = ..() + "narrow"
+
+/obj/item/crutch/on_update_icon()
+ . = ..()
+ if(padding_material)
+ add_overlay(overlay_image(icon, "[icon_state]-padding", padding_color || padding_material.color, RESET_COLOR | RESET_ALPHA))
+
+/obj/item/crutch/apply_additional_mob_overlays(mob/living/user_mob, bodytype, image/overlay, slot, bodypart, use_fallback_if_icon_missing = TRUE)
+ if(padding_material)
+ overlay.add_overlay(overlay_image(icon, "[overlay.icon_state]-padding", padding_color || padding_material.color, RESET_COLOR | RESET_ALPHA))
+ . = ..()
+
+/obj/item/crutch/examine(mob/user, distance, infix, suffix)
+ . = ..()
+ if(padding_material)
+ to_chat(user, "It has been padded with [padding_color ? "[padding_material.paint_verb] " : null][padding_material.use_name].")
+
+/obj/item/crutch/aluminum
+ material = /decl/material/solid/metal/aluminium
+
+/obj/item/crutch/aluminum/padded
+ padding_material = /decl/material/solid/organic/plastic/foam
+ padding_color = COLOR_GRAY20
+
+/obj/item/crutch/wooden
+ material = /decl/material/solid/organic/wood // oak
+
+/obj/item/crutch/wooden/padded
+ padding_material = /decl/material/solid/organic/leather
\ No newline at end of file
diff --git a/code/game/objects/items/devices/hacktool.dm b/code/game/objects/items/devices/hacktool.dm
index a6815ebad30..1b06acd9f0d 100644
--- a/code/game/objects/items/devices/hacktool.dm
+++ b/code/game/objects/items/devices/hacktool.dm
@@ -27,8 +27,9 @@
if(IS_SCREWDRIVER(W))
in_hack_mode = !in_hack_mode
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
+ return TRUE
else
- ..()
+ return ..()
/obj/item/multitool/hacktool/resolve_attackby(atom/A, mob/user)
sanity_check()
diff --git a/code/game/objects/items/devices/holowarrant.dm b/code/game/objects/items/devices/holowarrant.dm
index ef61c11117b..63575144f88 100644
--- a/code/game/objects/items/devices/holowarrant.dm
+++ b/code/game/objects/items/devices/holowarrant.dm
@@ -82,20 +82,20 @@
return TOPIC_HANDLED
/obj/item/holowarrant/attackby(obj/item/W, mob/user)
- if(active)
- var/obj/item/card/id/I = W.GetIdCard()
- if(I && check_access_list(I.GetAccess()))
- var/choice = alert(user, "Would you like to authorize this warrant?","Warrant authorization","Yes","No")
- var/datum/report_field/signature/auth = active.field_from_name("Authorized by")
- if(choice == "Yes")
- auth.ask_value(user)
- user.visible_message(SPAN_NOTICE("You swipe \the [I] through \the [src]."),
- SPAN_NOTICE("[user] swipes \the [I] through \the [src]."))
- broadcast_security_hud_message("[active.get_broadcast_summary()] has been authorized by [auth.get_value()].", src)
- else
- to_chat(user, "A red \"Access Denied\" light blinks on \the [src]")
- return 1
- ..()
+ if(!active)
+ return ..()
+ var/obj/item/card/id/I = W.GetIdCard()
+ if(I && check_access_list(I.GetAccess()))
+ var/choice = alert(user, "Would you like to authorize this warrant?","Warrant authorization","Yes","No")
+ var/datum/report_field/signature/auth = active.field_from_name("Authorized by")
+ if(choice == "Yes")
+ auth.ask_value(user)
+ user.visible_message(SPAN_NOTICE("You swipe \the [I] through \the [src]."),
+ SPAN_NOTICE("[user] swipes \the [I] through \the [src]."))
+ broadcast_security_hud_message("[active.get_broadcast_summary()] has been authorized by [auth.get_value()].", src)
+ else
+ to_chat(user, "A red \"Access Denied\" light blinks on \the [src]")
+ return TRUE
//hit other people with it
/obj/item/holowarrant/use_on_mob(mob/living/target, mob/living/user, animate = TRUE)
diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm
index c91167d3d05..3565259a08e 100644
--- a/code/game/objects/items/devices/lightreplacer.dm
+++ b/code/game/objects/items/devices/lightreplacer.dm
@@ -90,32 +90,33 @@
return
. = ..()
+// TODO: Refactor this to check matter or maybe even just use the fabricator recipe for lights directly
/obj/item/lightreplacer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/material) && W.get_material_type() == /decl/material/solid/glass)
var/obj/item/stack/G = W
if(uses >= max_uses)
- to_chat(user, "[src.name] is full.")
- return
+ to_chat(user, "\The [src] is full.")
else if(G.use(1))
- AddUses(16) //Autolathe converts 1 sheet into 16 lights.
+ AddUses(16) //Autolathe converts 1 sheet into 16 lights. // TODO: Make this use matter instead
to_chat(user, "You insert a piece of glass into \the [src]. You have [uses] light\s remaining.")
- return
else
to_chat(user, "You need one sheet of glass to replace lights.")
+ return TRUE
if(istype(W, /obj/item/light))
var/obj/item/light/L = W
if(L.status == 0) // LIGHT OKAY
if(uses < max_uses)
if(!user.try_unequip(L))
- return
+ return TRUE
AddUses(1)
to_chat(user, "You insert \the [L.name] into \the [src]. You have [uses] light\s remaining.")
qdel(L)
- return
+ return TRUE
else
to_chat(user, "You need a working light.")
- return
+ return TRUE
+ return ..()
/obj/item/lightreplacer/attack_self(mob/user)
/* // This would probably be a bit OP. If you want it though, uncomment the code.
diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm
index 9a9348e6b77..890fb77b269 100644
--- a/code/game/objects/items/devices/powersink.dm
+++ b/code/game/objects/items/devices/powersink.dm
@@ -89,6 +89,7 @@
"[user] detaches \the [src] from the cable.", \
"You detach \the [src] from the cable.",
"You hear some wires being disconnected from something.")
+ return TRUE
else
return ..()
diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm
index 338e4d65151..ec7786717f7 100644
--- a/code/game/objects/items/devices/spy_bug.dm
+++ b/code/game/objects/items/devices/spy_bug.dm
@@ -42,8 +42,9 @@
if(istype(W, /obj/item/spy_monitor))
var/obj/item/spy_monitor/SM = W
SM.pair(src, user)
+ return TRUE
else
- ..()
+ return ..()
/obj/item/spy_bug/hear_talk(mob/M, var/msg, verb, decl/language/speaking)
radio.hear_talk(M, msg, speaking)
@@ -90,6 +91,7 @@
/obj/item/spy_monitor/attackby(obj/W, mob/user)
if(istype(W, /obj/item/spy_bug))
pair(W, user)
+ return TRUE
else
return ..()
diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm
index c7aaf05fe82..670c9f9856f 100644
--- a/code/game/objects/items/devices/suit_cooling.dm
+++ b/code/game/objects/items/devices/suit_cooling.dm
@@ -115,7 +115,7 @@
cover_open = 1
to_chat(user, "You unscrew the panel.")
update_icon()
- return
+ return TRUE
if (istype(W, /obj/item/cell))
if(cover_open)
@@ -123,11 +123,11 @@
to_chat(user, "There is a [cell] already installed here.")
else
if(!user.try_unequip(W, src))
- return
+ return TRUE
cell = W
to_chat(user, "You insert \the [cell].")
update_icon()
- return
+ return TRUE
return ..()
diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm
index 9420c22919e..2e5b4f58e20 100644
--- a/code/game/objects/items/devices/taperecorder.dm
+++ b/code/game/objects/items/devices/taperecorder.dm
@@ -42,19 +42,19 @@
if(IS_SCREWDRIVER(I))
maintenance = !maintenance
to_chat(user, "You [maintenance ? "open" : "secure"] the lid.")
- return
+ return TRUE
if(istype(I, /obj/item/magnetic_tape))
if(mytape)
to_chat(user, "There's already a tape inside.")
- return
+ return TRUE
if(!user.try_unequip(I))
- return
+ return TRUE
I.forceMove(src)
mytape = I
to_chat(user, "You insert [I] into [src].")
update_icon()
- return
- ..()
+ return TRUE
+ return ..()
/obj/item/taperecorder/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
@@ -422,21 +422,21 @@
/obj/item/magnetic_tape/attackby(obj/item/I, mob/user, params)
- if(user.incapacitated())
- return
+ if(user.incapacitated()) // TODO: this may not be necessary since OnClick checks before starting the attack chain
+ return TRUE
if(ruined && IS_SCREWDRIVER(I))
if(!max_capacity)
to_chat(user, "There is no tape left inside.")
- return
+ return TRUE
to_chat(user, "You start winding the tape back in...")
if(do_after(user, 120, target = src))
to_chat(user, "You wound the tape back in.")
fix()
- return
+ return TRUE
else if(IS_PEN(I))
if(loc == user)
var/new_name = input(user, "What would you like to label the tape?", "Tape labeling") as null|text
- if(isnull(new_name)) return
+ if(isnull(new_name)) return TRUE
new_name = sanitize_safe(new_name)
if(new_name)
SetName("tape - '[new_name]'")
@@ -444,12 +444,14 @@
else
SetName("tape")
to_chat(user, "You scratch off the label.")
- return
+ return TRUE
else if(IS_WIRECUTTER(I))
cut(user)
+ return TRUE
else if(istype(I, /obj/item/magnetic_tape/loose))
join(user, I)
- ..()
+ return TRUE
+ return ..()
/obj/item/magnetic_tape/proc/cut(mob/user)
if(!LAZYLEN(timestamp))
diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm
index a6fa67849f8..b83f35bca48 100644
--- a/code/game/objects/items/devices/transfer_valve.dm
+++ b/code/game/objects/items/devices/transfer_valve.dm
@@ -15,15 +15,14 @@
/obj/item/transfer_valve/attackby(obj/item/item, mob/user)
var/turf/location = get_turf(src) // For admin logs
if(istype(item, /obj/item/tank))
-
var/T1_weight = 0
var/T2_weight = 0
if(tank_one && tank_two)
to_chat(user, "There are already two tanks attached, remove one first.")
- return
+ return TRUE
if(!user.try_unequip(item, src))
- return
+ return TRUE
if(!tank_one)
tank_one = item
else
@@ -37,21 +36,18 @@
T2_weight = tank_two.w_class
src.w_class = max(initial(src.w_class),T1_weight,T2_weight) //gets w_class of biggest object, because you shouldn't be able to just shove tanks in and have them be tiny.
-
- update_icon()
-
- SSnano.update_uis(src) // update all UIs attached to src
+ . = TRUE
//TODO: Have this take an assemblyholder
else if(isassembly(item))
var/obj/item/assembly/A = item
if(A.secured)
to_chat(user, "The device is secured.")
- return
+ return TRUE
if(attached_device)
to_chat(user, "There is already an device attached to the valve, remove it first.")
- return
+ return TRUE
if(!user.try_unequip(item, src))
- return
+ return TRUE
attached_device = A
to_chat(user, "You attach \the [item] to the valve controls and secure it.")
A.holder = src
@@ -61,8 +57,12 @@
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve. (JMP)")
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
attacher = user
+ . = TRUE
+ if(.)
+ update_icon()
SSnano.update_uis(src) // update all UIs attached to src
- return
+ return TRUE
+ return ..()
/obj/item/transfer_valve/HasProximity(atom/movable/AM)
diff --git a/code/game/objects/items/devices/tvcamera.dm b/code/game/objects/items/devices/tvcamera.dm
index 53c9f559bc5..bbcbc43e488 100644
--- a/code/game/objects/items/devices/tvcamera.dm
+++ b/code/game/objects/items/devices/tvcamera.dm
@@ -97,20 +97,20 @@
/* Assembly by a roboticist */
/obj/item/robot_parts/head/attackby(var/obj/item/assembly/S, mob/user)
- if ((!istype(S, /obj/item/assembly/infra)))
- ..()
- return
+ if (!istype(S, /obj/item/assembly/infra))
+ return ..()
var/obj/item/TVAssembly/A = new(user)
qdel(S)
user.put_in_hands(A)
to_chat(user, "You add the infrared sensor to the robot head.")
qdel(src)
+ return TRUE
/* Using camcorder icon as I can't sprite.
Using robohead because of restricting to roboticist */
/obj/item/TVAssembly
name = "TV Camera assembly"
- desc = "A robotic head with an infrared sensor inside"
+ desc = "A robotic head with an infrared sensor inside."
icon = 'icons/obj/robot_parts.dmi'
icon_state = "head"
item_state = "head"
@@ -118,6 +118,7 @@ Using robohead because of restricting to roboticist */
w_class = ITEM_SIZE_LARGE
material = /decl/material/solid/metal/steel
+// TODO: refactor this to use slapcrafting? remove entirely?
/obj/item/TVAssembly/attackby(var/obj/item/W, var/mob/user)
switch(buildstep)
if(0)
@@ -126,30 +127,30 @@ Using robohead because of restricting to roboticist */
qdel(W)
desc = "This TV camera assembly has a camera module."
buildstep++
+ return TRUE
if(1)
if(istype(W, /obj/item/taperecorder))
qdel(W)
buildstep++
to_chat(user, "You add the tape recorder to [src]")
desc = "This TV camera assembly has a camera and audio module."
- return
+ return TRUE
if(2)
if(IS_COIL(W))
var/obj/item/stack/cable_coil/C = W
if(!C.use(3))
to_chat(user, "You need three cable coils to wire the devices.")
- ..()
- return
+ return TRUE
buildstep++
to_chat(user, SPAN_NOTICE("You wire the assembly."))
desc = "This TV camera assembly has wires sticking out."
- return
+ return TRUE
if(3)
if(IS_WIRECUTTER(W))
to_chat(user, " You trim the wires.")
buildstep++
desc = "This TV camera assembly needs casing."
- return
+ return TRUE
if(4)
if(istype(W, /obj/item/stack/material))
var/obj/item/stack/material/S = W
@@ -159,8 +160,8 @@ Using robohead because of restricting to roboticist */
var/turf/T = get_turf(src)
new /obj/item/camera/tvcamera(T)
qdel(src)
- return
- ..()
+ return TRUE
+ return ..()
/datum/extension/network_device/camera/television
expected_type = /obj/item/camera/tvcamera
diff --git a/code/game/objects/items/glassjar.dm b/code/game/objects/items/glassjar.dm
index 01a23dd12ca..22e99321baa 100644
--- a/code/game/objects/items/glassjar.dm
+++ b/code/game/objects/items/glassjar.dm
@@ -76,12 +76,14 @@
if(contains == 0)
contains = 1
if(contains != 1)
- return
+ return TRUE
if(!user.try_unequip(W, src))
- return
+ return TRUE
var/obj/item/cash/S = W
user.visible_message("[user] puts \the [S] into \the [src].")
update_icon()
+ return TRUE
+ return ..()
/obj/item/glass_jar/on_update_icon() // Also updates name and desc
. = ..()
diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm
index 3caccdad337..6066fbeaede 100644
--- a/code/game/objects/items/latexballoon.dm
+++ b/code/game/objects/items/latexballoon.dm
@@ -1,3 +1,4 @@
+// TODO: This is literally only available from abandoned mining crates. Remove?
/obj/item/latexballon
name = "latex glove"
desc = "A latex glove, usually used as a balloon."
@@ -45,3 +46,5 @@
/obj/item/latexballon/attackby(obj/item/W, mob/user)
if (W.can_puncture())
burst()
+ return TRUE
+ return FALSE
diff --git a/code/game/objects/items/rescuebag.dm b/code/game/objects/items/rescuebag.dm
index c8d9504aa83..da10d3c8500 100644
--- a/code/game/objects/items/rescuebag.dm
+++ b/code/game/objects/items/rescuebag.dm
@@ -35,18 +35,19 @@
if(istype(W,/obj/item/tank))
if(airtank)
to_chat(user, "\The [src] already has an air tank installed.")
- return 1
- else if(user.try_unequip(W))
+ return TRUE
+ if(user.try_unequip(W))
W.forceMove(src)
airtank = W
to_chat(user, "You install \the [W] in \the [src].")
- return 1
+ return TRUE
else if(airtank && IS_SCREWDRIVER(W))
to_chat(user, "You remove \the [airtank] from \the [src].")
airtank.dropInto(loc)
airtank = null
+ return TRUE
else
- ..()
+ return ..()
/obj/item/bodybag/rescue/examine(mob/user)
. = ..()
@@ -88,21 +89,21 @@
add_overlay("tank")
/obj/structure/closet/body_bag/rescue/attackby(obj/item/W, mob/user, var/click_params)
- if(istype(W,/obj/item/tank/))
+ if(istype(W,/obj/item/tank))
if(airtank)
to_chat(user, "\The [src] already has an air tank installed.")
- return 1
else if(user.try_unequip(W, src))
set_tank(W)
to_chat(user, "You install \the [W] in \the [src].")
- return 1
+ return TRUE
else if(airtank && IS_SCREWDRIVER(W))
to_chat(user, "You remove \the [airtank] from \the [src].")
airtank.dropInto(loc)
airtank = null
update_icon()
+ return TRUE
else
- ..()
+ return ..()
/obj/structure/closet/body_bag/rescue/fold(var/user)
var/obj/item/tank/my_tank = airtank
diff --git a/code/game/objects/items/robot/robot_frame.dm b/code/game/objects/items/robot/robot_frame.dm
index 6c6f6857f79..bd8f71787b8 100644
--- a/code/game/objects/items/robot/robot_frame.dm
+++ b/code/game/objects/items/robot/robot_frame.dm
@@ -38,7 +38,7 @@
if(IS_CROWBAR(W))
if(!parts.len)
to_chat(user, SPAN_WARNING("\The [src] has no parts to remove."))
- return
+ return TRUE
var/removing = pick(parts)
var/obj/item/robot_parts/part = parts[removing]
part.forceMove(get_turf(src))
@@ -46,44 +46,44 @@
parts -= removing
to_chat(user, SPAN_WARNING("You lever \the [part] off \the [src]."))
update_icon()
+ return TRUE
// Install a robotic part.
else if (istype(W, /obj/item/robot_parts))
var/obj/item/robot_parts/part = W
if(!required_parts[part.bp_tag] || !istype(W, required_parts[part.bp_tag]))
to_chat(user, SPAN_WARNING("\The [src] is not compatible with \the [W]."))
- return
- if(parts[part.bp_tag])
+ else if(parts[part.bp_tag])
to_chat(user, SPAN_WARNING("\The [src] already has \a [W] installed."))
- return
- if(part.can_install(user) && user.try_unequip(W, src))
+ else if(part.can_install(user) && user.try_unequip(W, src))
parts[part.bp_tag] = part
update_icon()
+ return TRUE
// Install a brain.
else if(istype(W, /obj/item/organ/internal/brain_interface))
if(!isturf(loc))
to_chat(user, SPAN_WARNING("You can't put \the [W] in without the frame being on the ground."))
- return
+ return TRUE
if(!check_completion())
to_chat(user, SPAN_WARNING("The frame is not ready for the central processor to be installed."))
- return
+ return TRUE
var/obj/item/organ/internal/brain_interface/M = W
var/mob/living/brainmob = M?.get_brainmob()
if(!brainmob)
to_chat(user, SPAN_WARNING("Sticking an empty [W.name] into the frame would sort of defeat the purpose."))
- return
+ return TRUE
if(jobban_isbanned(brainmob, ASSIGNMENT_ROBOT))
to_chat(user, SPAN_WARNING("\The [W] does not seem to fit."))
- return
+ return TRUE
if(brainmob.stat == DEAD)
to_chat(user, SPAN_WARNING("Sticking a dead [W.name] into the frame would sort of defeat the purpose."))
- return
+ return TRUE
var/ghost_can_reenter = 0
if(brainmob.mind)
@@ -96,15 +96,15 @@
ghost_can_reenter = 1
if(!ghost_can_reenter)
to_chat(user, SPAN_WARNING("\The [W] is completely unresponsive; there's no point."))
- return
+ return TRUE
if(!user.try_unequip(W))
- return
+ return TRUE
SSstatistics.add_field("cyborg_frames_built",1)
var/mob/living/silicon/robot/O = new product(get_turf(loc))
if(!O)
- return
+ return TRUE
O.central_processor = W
O.set_invisibility(INVISIBILITY_NONE)
@@ -131,13 +131,15 @@
RAISE_EVENT(/decl/observ/cyborg_created, O)
O.Namepick()
qdel(src)
+ return TRUE
else if(IS_PEN(W))
var/t = sanitize_safe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if(t && (in_range(src, user) || loc == user))
created_name = t
+ return TRUE
else
- ..()
+ return ..()
/obj/item/robot_parts/robot_suit/Destroy()
parts.Cut()
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index 8c2ab4a8b85..1ddf859d338 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -107,38 +107,39 @@
return success && ..()
/obj/item/robot_parts/chest/attackby(obj/item/W, mob/user)
- ..()
if(istype(W, /obj/item/cell))
if(src.cell)
to_chat(user, "You have already inserted a cell!")
- return
else
if(!user.try_unequip(W, src))
- return
+ return TRUE
src.cell = W
to_chat(user, "You insert the cell!")
+ return TRUE
if(IS_COIL(W))
if(src.wires)
to_chat(user, "You have already inserted wire!")
- return
else
var/obj/item/stack/cable_coil/coil = W
if(coil.use(1))
src.wires = 1.0
to_chat(user, "You insert the wire!")
+ return TRUE
+ return ..()
/obj/item/robot_parts/head/attackby(obj/item/W, mob/user)
- ..()
if(istype(W, /obj/item/flash))
if(isrobot(user))
var/current_module = user.get_active_held_item()
if(current_module == W)
to_chat(user, "How do you propose to do that?")
- return
+ return TRUE
else
add_flashes(W,user)
else
add_flashes(W,user)
+ return TRUE
+ return ..()
/obj/item/robot_parts/head/proc/add_flashes(obj/item/W, mob/user) //Made into a seperate proc to avoid copypasta
if(src.flash1 && src.flash2)
diff --git a/code/game/objects/items/shooting_range.dm b/code/game/objects/items/shooting_range.dm
index 6bade0a529e..18dce99c9e5 100644
--- a/code/game/objects/items/shooting_range.dm
+++ b/code/game/objects/items/shooting_range.dm
@@ -23,8 +23,9 @@
overlays.Cut()
bulletholes.Cut()
hp = initial(hp)
- to_chat(usr, "You slice off [src]'s uneven chunks of aluminium and scorch marks.")
- return
+ to_chat(user, "You slice off [src]'s uneven chunks of aluminium and scorch marks.")
+ return TRUE
+ return ..()
/obj/item/target/attack_hand(var/mob/user)
// taking pinned targets off!
diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm
index 31e220e6cf3..86363f815e9 100644
--- a/code/game/objects/items/stacks/rods.dm
+++ b/code/game/objects/items/stacks/rods.dm
@@ -60,7 +60,7 @@
if(!can_use(2))
to_chat(user, "You need at least two rods to do this.")
- return
+ return TRUE
if(WT.weld(0,user))
visible_message(SPAN_NOTICE("\The [src] is fused together by \the [user] with \the [WT]."), 3, SPAN_NOTICE("You hear welding."), 2)
@@ -69,13 +69,13 @@
if(user.is_holding_offhand(src))
user.put_in_hands(new_item)
use(2)
- return
+ return TRUE
if (istype(W, /obj/item/stack/tape_roll/duct_tape))
var/obj/item/stack/tape_roll/duct_tape/T = W
if(!T.can_use(4))
to_chat(user, SPAN_WARNING("You need 4 [T.plural_name] to make a splint!"))
- return
+ return TRUE
T.use(4)
var/obj/item/stack/medical/splint/improvised/new_splint = new(user.loc)
@@ -85,10 +85,8 @@
user.visible_message(SPAN_NOTICE("\The [user] constructs \a [new_splint] out of a [singular_name]."), \
SPAN_NOTICE("You use make \a [new_splint] out of a [singular_name]."))
src.use(1)
-
- return
-
- ..()
+ return TRUE
+ return ..()
/obj/item/stack/material/rods/attack_self(mob/user)
add_fingerprint(user)
diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm
index 131b9f2c4ee..a53c61d5bad 100644
--- a/code/game/objects/items/stacks/tiles/tile_types.dm
+++ b/code/game/objects/items/stacks/tiles/tile_types.dm
@@ -286,7 +286,8 @@
/obj/item/stack/tile/carpet/on_update_icon()
. = ..()
color = get_color()
- set_overlays(overlay_image(icon, "[icon_state]-detail", detail_color, RESET_COLOR))
+ if(detail_color)
+ set_overlays(overlay_image(icon, "[icon_state]-detail", detail_color, RESET_COLOR))
/obj/item/stack/tile/carpet/fifty
amount = 50
@@ -370,6 +371,13 @@
/obj/item/stack/tile/carpet/red/fifty
amount = 50
+/obj/item/stack/tile/carpet/rustic
+ name = "rustic carpet"
+ desc = "A piece of simple, rustic carpeting."
+ singular_name = "rustic carpet"
+ paint_color = COLOR_CHESTNUT
+ detail_color = null
+
/obj/item/stack/tile/pool
name = "pool tiling"
desc = "A set of tiles designed to build fluid pools."
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index b6058c4afa8..78dd90338f6 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -496,7 +496,7 @@
name = "foam sword"
desc = "An arcane weapon (made of foam) wielded by the followers of the hit Saturday morning cartoon \"King Nursee and the Acolytes of Heroism\"."
icon = 'icons/obj/items/weapon/swords/cult.dmi'
- material = /decl/material/solid/organic/plastic
+ material = /decl/material/solid/organic/plastic/foam
edge = 0
sharp = 0
diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm
index b652975ccaf..8e40d1f38f8 100644
--- a/code/game/objects/items/weapons/RCD.dm
+++ b/code/game/objects/items/weapons/RCD.dm
@@ -50,19 +50,17 @@
update_icon() //Initializes the ammo counter
/obj/item/rcd/attackby(obj/item/W, mob/user)
-
if(istype(W, /obj/item/rcd_ammo))
var/obj/item/rcd_ammo/cartridge = W
if((stored_matter + cartridge.remaining) > max_stored_matter)
to_chat(user, "The RCD can't hold that many additional matter-units.")
- return
+ return TRUE
stored_matter += cartridge.remaining
qdel(W)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
to_chat(user, "The RCD now holds [stored_matter]/[max_stored_matter] matter-units.")
update_icon()
- return
-
+ return TRUE
if(IS_SCREWDRIVER(W))
crafting = !crafting
if(!crafting)
@@ -70,9 +68,8 @@
else
to_chat(user, "The RCD can now be modified.")
src.add_fingerprint(user)
- return
-
- ..()
+ return TRUE
+ return ..()
/obj/item/rcd/attack_self(mob/user)
//Change the mode
@@ -165,7 +162,7 @@
return 0
/obj/item/rcd/borg/attackby()
- return
+ return FALSE
/obj/item/rcd/borg/can_use(var/mob/user,var/turf/T)
return (user.Adjacent(T) && !user.incapacitated())
@@ -185,7 +182,7 @@
return 0
/obj/item/rcd/mounted/attackby()
- return
+ return FALSE
/obj/item/rcd/mounted/can_use(var/mob/user,var/turf/T)
return (user.Adjacent(T) && !user.incapacitated())
@@ -271,7 +268,7 @@
/decl/hierarchy/rcd_mode/floor_and_walls/base_turf
cost = 1
delay = 2 SECONDS
- work_type = /turf/floor/airless
+ work_type = /turf/floor/plating/airless
/decl/hierarchy/rcd_mode/floor_and_walls/base_turf/can_handle_work(var/rcd, var/turf/target)
return istype(target) && (isspaceturf(target) || istype(target, get_base_turf_by_area(target)))
diff --git a/code/game/objects/items/weapons/RPD.dm b/code/game/objects/items/weapons/RPD.dm
index 1a1af2f8a79..cf1a465a2e3 100644
--- a/code/game/objects/items/weapons/RPD.dm
+++ b/code/game/objects/items/weapons/RPD.dm
@@ -165,10 +165,10 @@ var/global/list/rpd_pipe_selection_skilled = list()
/obj/item/rpd/attackby(var/obj/item/W, var/mob/user)
if(istype(W, /obj/item/pipe))
if(!user.try_unequip(W))
- return
+ return TRUE
recycle(W,user)
- return
- ..()
+ return TRUE
+ return ..()
/obj/item/rpd/proc/recycle(var/obj/item/W,var/mob/user)
if(!user.skill_check(SKILL_ATMOS,SKILL_BASIC))
diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm
index 5184c06fdad..0f0a7ecb4d0 100644
--- a/code/game/objects/items/weapons/RSF.dm
+++ b/code/game/objects/items/weapons/RSF.dm
@@ -28,19 +28,16 @@ RSF
to_chat(user, "It currently holds [stored_matter]/30 fabrication-units.")
/obj/item/rsf/attackby(obj/item/W, mob/user)
- ..()
if (istype(W, /obj/item/rcd_ammo))
-
if ((stored_matter + 10) > 30)
to_chat(user, "The RSF can't hold any more matter.")
- return
-
+ return TRUE
qdel(W)
-
stored_matter += 10
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
to_chat(user, "The RSF now holds [stored_matter]/30 fabrication-units.")
- return
+ return TRUE
+ return ..()
/obj/item/rsf/attack_self(mob/user)
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index 96db0d005ea..f367fe6ebb2 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -44,8 +44,8 @@
if(signature && !signed_by && !user.incapacitated() && Adjacent(user))
signed_by = signature
user.visible_message(SPAN_NOTICE("\The [user] signs \the [src] with a flourish."))
- return
- ..()
+ return TRUE
+ return ..()
/obj/item/card/data
name = "data card"
diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm
index 1ad21ad4a4f..18ed460f4b2 100644
--- a/code/game/objects/items/weapons/defib.dm
+++ b/code/game/objects/items/weapons/defib.dm
@@ -68,19 +68,22 @@
toggle_paddles()
return TRUE
+// TODO: This should really use the cell extension
/obj/item/defibrillator/attackby(obj/item/W, mob/user, params)
if(W == paddles)
reattach_paddles(user)
+ return TRUE
else if(istype(W, /obj/item/cell))
if(bcell)
- to_chat(user, "\the [src] already has a cell.")
+ to_chat(user, "\The [src] already has a cell.")
else
if(!user.try_unequip(W))
- return
+ return TRUE
W.forceMove(src)
bcell = W
to_chat(user, "You install a cell in \the [src].")
update_icon()
+ return TRUE
else if(IS_SCREWDRIVER(W))
if(bcell)
@@ -89,6 +92,8 @@
bcell = null
to_chat(user, "You remove the cell from \the [src].")
update_icon()
+ return TRUE
+ return FALSE
else
return ..()
diff --git a/code/game/objects/items/weapons/electric_welder.dm b/code/game/objects/items/weapons/electric_welder.dm
index 9357b47ec24..cb949be907d 100644
--- a/code/game/objects/items/weapons/electric_welder.dm
+++ b/code/game/objects/items/weapons/electric_welder.dm
@@ -44,7 +44,7 @@
/obj/item/weldingtool/electric/attackby(var/obj/item/W, var/mob/user)
if(istype(W,/obj/item/stack/material/rods) || istype(W, /obj/item/chems/welder_tank))
- return
+ return FALSE // NO ELECTRIC FLAMETHROWER
return ..()
/obj/item/weldingtool/electric/use_fuel(var/amount)
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index 375674a32f9..289c8d6fcd5 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -32,10 +32,11 @@
if(IS_SCREWDRIVER(I))
open_panel = !open_panel
to_chat(user, "You [open_panel ? "open" : "close"] the wire panel.")
+ return TRUE
else if(IS_WIRECUTTER(I) || IS_MULTITOOL(I) || istype(I, /obj/item/assembly/signaler ))
- wires.Interact(user)
+ return wires.Interact(user)
else
- ..()
+ return ..()
/obj/item/plastique/attack_self(mob/user)
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm
index 0aa918ffbc2..a59f5ec44ba 100644
--- a/code/game/objects/items/weapons/gift_wrappaper.dm
+++ b/code/game/objects/items/weapons/gift_wrappaper.dm
@@ -28,17 +28,17 @@
if(!QDELETED(src))
qdel(src)
+// this can't be made, should it just be removed?
+// should it be made into a subtype of closet? of living statue?
/obj/effect/spresent/relaymove(mob/user)
if (user.stat)
return
to_chat(user, "You can't move.")
/obj/effect/spresent/attackby(obj/item/W, mob/user)
- ..()
-
if(!IS_WIRECUTTER(W))
to_chat(user, "I need wirecutters for that.")
- return
+ return TRUE
to_chat(user, "You cut open the present.")
@@ -49,6 +49,7 @@
M.client.perspective = MOB_PERSPECTIVE
qdel(src)
+ return TRUE
/obj/item/a_gift/attack_self(mob/M)
var/gift_type = pick(
diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm
index 8645c5fde80..020e4634208 100644
--- a/code/game/objects/items/weapons/grenades/chem_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm
@@ -53,12 +53,12 @@
var/obj/item/assembly_holder/det = W
if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right)))
to_chat(user, "Assembly must contain one igniter.")
- return
+ return TRUE
if(!det.secured)
to_chat(user, "Assembly must be secured with screwdriver.")
- return
+ return TRUE
if(!user.try_unequip(det, src))
- return
+ return TRUE
path = 1
log_and_message_admins("has attached \a [W] to \the [src].")
to_chat(user, "You add [W] to the metal casing.")
@@ -72,6 +72,7 @@
det_time = 10*T.time
SetName("unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]")
stage = 1
+ . = TRUE
else if(IS_SCREWDRIVER(W) && path != 2)
if(stage == 1)
path = 1
@@ -83,33 +84,40 @@
SetName("fake grenade")
playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, -3)
stage = 2
+ . = TRUE
else if(stage == 2)
if(active && prob(95))
to_chat(user, "You trigger the assembly!")
detonate()
- return
+ return TRUE
else
to_chat(user, "You unlock the assembly.")
playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, -3)
SetName("unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]")
stage = 1
active = FALSE
+ . = TRUE
else if(is_type_in_list(W, allowed_containers) && (!stage || stage==1) && path != 2)
path = 1
if(beakers.len == 2)
to_chat(user, "The grenade can not hold more containers.")
- return
+ return TRUE
else
if(W.reagents.total_volume)
if(!user.try_unequip(W, src))
- return
+ return TRUE
to_chat(user, "You add \the [W] to the assembly.")
beakers += W
stage = 1
SetName("unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]")
+ . = TRUE
else
to_chat(user, "\The [W] is empty.")
- update_icon()
+ return TRUE
+ if(.)
+ update_icon()
+ return TRUE
+ return ..()
/obj/item/grenade/chem_grenade/activate(mob/user)
if(active)
diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm
index afa8ce2a0e5..36bb284a2c5 100644
--- a/code/game/objects/items/weapons/implants/implantcase.dm
+++ b/code/game/objects/items/weapons/implants/implantcase.dm
@@ -39,13 +39,14 @@
else
icon_state = "implantcase-0"
+// TODO: the name stuff here probably doesn't work, this needs an update_name override
/obj/item/implantcase/attackby(obj/item/I, mob/user)
if (IS_PEN(I))
var/t = input(user, "What would you like the label to be?", src.name, null)
if (user.get_active_held_item() != I)
- return
+ return TRUE
if((!in_range(src, usr) && loc != user))
- return
+ return TRUE
t = sanitize_safe(t, MAX_NAME_LEN)
if(t)
SetName("glass case - '[t]'")
@@ -53,9 +54,9 @@
else
SetName(initial(name))
desc = "A case containing an implant."
- else if(istype(I, /obj/item/chems/syringe))
- if(istype(imp,/obj/item/implant/chem))
- imp.attackby(I,user)
+ return TRUE
+ else if(istype(I, /obj/item/chems/syringe) && istype(imp,/obj/item/implant/chem))
+ return imp.attackby(I,user)
else if (istype(I, /obj/item/implanter))
var/obj/item/implanter/M = I
if (M.imp && !imp && !M.imp.implanted)
@@ -69,10 +70,11 @@
update_description()
update_icon()
M.update_icon()
+ return TRUE
else if (istype(I, /obj/item/implant) && user.try_unequip(I, src))
to_chat(usr, "You slide \the [I] into \the [src].")
imp = I
update_description()
update_icon()
- else
- return ..()
\ No newline at end of file
+ return TRUE
+ return ..()
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm
index a0af46a9e31..7f1226b1eae 100644
--- a/code/game/objects/items/weapons/implants/implantpad.dm
+++ b/code/game/objects/items/weapons/implants/implantpad.dm
@@ -23,7 +23,6 @@
return TRUE
/obj/item/implantpad/attackby(obj/item/I, mob/user)
- ..()
if(istype(I, /obj/item/implantcase))
var/obj/item/implantcase/C = I
if(!imp && C.imp)
@@ -35,6 +34,7 @@
C.imp = imp
imp = null
C.update_icon()
+ . = TRUE
else if(istype(I, /obj/item/implanter))
var/obj/item/implanter/C = I
if(!imp && C.imp)
@@ -46,9 +46,14 @@
C.imp = imp
imp = null
C.update_icon()
+ . = TRUE
else if(istype(I, /obj/item/implant) && user.try_unequip(I, src))
imp = I
- update_icon()
+ . = TRUE
+ if(.)
+ update_icon()
+ return TRUE
+ return ..()
/obj/item/implantpad/attack_self(mob/user)
if (imp)
diff --git a/code/game/objects/items/weapons/implants/implants/chem.dm b/code/game/objects/items/weapons/implants/implants/chem.dm
index 882ac22ddcc..ccb8f8467b1 100644
--- a/code/game/objects/items/weapons/implants/implants/chem.dm
+++ b/code/game/objects/items/weapons/implants/implants/chem.dm
@@ -48,8 +48,9 @@ var/global/list/chem_implants = list()
if(do_after(user,5,src))
I.reagents.trans_to_obj(src, 5)
to_chat(user, "You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units.")
+ return TRUE
else
- ..()
+ return ..()
/obj/item/implantcase/chem
name = "glass case - 'chem'"
diff --git a/code/game/objects/items/weapons/material/ashtray.dm b/code/game/objects/items/weapons/material/ashtray.dm
index e659fe3fd4d..fe6ac6673c9 100644
--- a/code/game/objects/items/weapons/material/ashtray.dm
+++ b/code/game/objects/items/weapons/material/ashtray.dm
@@ -28,7 +28,7 @@
if (istype(W,/obj/item/trash/cigbutt) || istype(W,/obj/item/clothing/mask/smokable/cigarette) || istype(W, /obj/item/flame/match))
if (contents.len >= max_butts)
to_chat(user, "\The [src] is full.")
- return
+ return TRUE
if (istype(W,/obj/item/clothing/mask/smokable/cigarette))
var/obj/item/clothing/mask/smokable/cigarette/cig = W
@@ -43,6 +43,7 @@
if(user.try_unequip(W, src))
set_extension(src, /datum/extension/scent/ashtray)
update_icon()
+ return TRUE
return ..()
/obj/item/ashtray/throw_impact(atom/hit_atom)
diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm
index 0b21d442b09..0f7ba375f55 100644
--- a/code/game/objects/items/weapons/material/shards.dm
+++ b/code/game/objects/items/weapons/material/shards.dm
@@ -64,24 +64,24 @@
if(WT.weld(0, user))
material.create_object(get_turf(src))
qdel(src)
- return
+ return TRUE
if(istype(W, /obj/item/stack/cable_coil))
if(!material || (material.shard_type in list(SHARD_SPLINTER, SHARD_SHRAPNEL)))
to_chat(user, SPAN_WARNING("\The [src] is not suitable for using as a shank."))
- return
+ return TRUE
if(has_handle)
to_chat(user, SPAN_WARNING("\The [src] already has a handle."))
- return
+ return TRUE
var/obj/item/stack/cable_coil/cable = W
if(cable.use(3))
to_chat(user, SPAN_NOTICE("You wind some cable around the thick end of \the [src]."))
has_handle = cable.color
SetName("[material.solid_name] shank")
update_icon()
- return
+ return TRUE
to_chat(user, SPAN_WARNING("You need 3 or more units of cable to give \the [src] a handle."))
- return
+ return TRUE
return ..()
/obj/item/shard/on_update_icon()
diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm
index 7b453b2eca3..6520154a48c 100644
--- a/code/game/objects/items/weapons/mop.dm
+++ b/code/game/objects/items/weapons/mop.dm
@@ -69,8 +69,8 @@
/obj/effect/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/mop) || istype(I, /obj/item/soap))
- return
- ..()
+ return FALSE
+ return ..()
/obj/item/mop/advanced
desc = "The most advanced tool in a custodian's arsenal, with a cleaner synthesizer to boot! Just think of all the viscera you will clean up with this!"
diff --git a/code/game/objects/items/weapons/policetape.dm b/code/game/objects/items/weapons/policetape.dm
index 4bab4c615ee..c7443568027 100644
--- a/code/game/objects/items/weapons/policetape.dm
+++ b/code/game/objects/items/weapons/policetape.dm
@@ -89,7 +89,8 @@ var/global/list/image/hazard_overlays //Cached hazard floor overlays for the bar
return ..()
/obj/item/stack/tape_roll/barricade_tape/attack_hand()
- if((. = ..()) && !QDELETED(src))
+ . = ..()
+ if(. && !QDELETED(src))
update_icon()
/**Callback used when whoever holds us moved to a new turf. */
diff --git a/code/game/objects/items/weapons/secrets_disk.dm b/code/game/objects/items/weapons/secrets_disk.dm
index 83a80ac651e..ee152b86151 100644
--- a/code/game/objects/items/weapons/secrets_disk.dm
+++ b/code/game/objects/items/weapons/secrets_disk.dm
@@ -48,7 +48,7 @@
to_chat(user, "You swipe your card and [locked ? "lock":"unlock"] the disk.")
else
to_chat(user, "The disk's screen flashes 'Access Denied'.")
- return
+ return TRUE
. = ..()
/obj/item/disk/secret_project/verb/change_codename()
diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm
index 65a980ac373..db21be248f5 100644
--- a/code/game/objects/items/weapons/shields.dm
+++ b/code/game/objects/items/weapons/shields.dm
@@ -91,8 +91,9 @@
user.visible_message("[user] bashes [src] with [W]!")
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
cooldown = world.time
+ return TRUE
else
- ..()
+ return ..()
/obj/item/shield/riot/metal
name = "plasteel combat shield"
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index c18a442a2fb..3d6aa29ea00 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -64,7 +64,7 @@
/obj/item/belt/holster/attackby(obj/item/W, mob/user)
var/datum/extension/holster/H = get_extension(src, /datum/extension/holster)
if(H.holster(W, user))
- return
+ return TRUE
else
. = ..(W, user)
diff --git a/code/game/objects/items/weapons/storage/fancy/cigarettes.dm b/code/game/objects/items/weapons/storage/fancy/cigarettes.dm
index 8f1f1efa1ff..b8f10502a53 100644
--- a/code/game/objects/items/weapons/storage/fancy/cigarettes.dm
+++ b/code/game/objects/items/weapons/storage/fancy/cigarettes.dm
@@ -25,10 +25,6 @@
. = ..()
/obj/item/box/fancy/cigarettes/use_on_mob(mob/living/target, mob/living/user, animate = TRUE)
-
- if(!ismob(target))
- return
-
if(target == user && user.get_target_zone() == BP_MOUTH && contents.len > 0 && !user.get_equipped_item(slot_wear_mask_str))
// Find ourselves a cig. Note that we could be full of lighters.
var/obj/item/clothing/mask/smokable/cigarette/cig = null
diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm
index 27b3d4c0c4c..3ad6fb923d8 100644
--- a/code/game/objects/items/weapons/storage/lockbox.dm
+++ b/code/game/objects/items/weapons/storage/lockbox.dm
@@ -22,30 +22,30 @@
if (istype(W, /obj/item/card/id))
if(src.broken)
to_chat(user, "It appears to be broken.")
- return
+ return TRUE
if(src.allowed(user))
src.locked = !( src.locked )
if(src.locked)
src.icon_state = src.icon_locked
to_chat(user, "You lock \the [src]!")
storage?.close_all()
- return
else
src.icon_state = src.icon_closed
to_chat(user, "You unlock \the [src]!")
- return
else
to_chat(user, "Access Denied")
+ return TRUE
else if(istype(W, /obj/item/energy_blade))
var/obj/item/energy_blade/blade = W
if(blade.is_special_cutting_tool() && emag_act(INFINITY, user, W, "The locker has been sliced open by [user] with an energy blade!", "You hear metal being sliced and sparks flying."))
spark_at(src.loc, amount=5)
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
+ return TRUE
if(!locked)
- ..()
+ return ..()
else
to_chat(user, "It's locked!")
- return
+ return TRUE
/obj/item/lockbox/emag_act(var/remaining_charges, var/mob/user, var/emag_source, var/visual_feedback = "", var/audible_feedback = "")
if(!broken)
diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm
index 5eb5f0a1de4..19eed200847 100644
--- a/code/game/objects/items/weapons/storage/secure.dm
+++ b/code/game/objects/items/weapons/storage/secure.dm
@@ -49,11 +49,12 @@
/obj/item/secure_storage/attackby(obj/item/W, mob/user)
var/datum/extension/lockable/lock = get_extension(src, /datum/extension/lockable)
if(lock.attackby(W, user))
- return
+ return TRUE
// -> storage/attackby() what with handle insertion, etc
if(!lock.locked)
. = ..()
+ return FALSE
/obj/item/secure_storage/handle_mouse_drop(atom/over, mob/user, params)
var/datum/extension/lockable/lock = get_extension(src, /datum/extension/lockable)
diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm
index 4ae5178f282..506f7399815 100644
--- a/code/game/objects/items/weapons/stunbaton.dm
+++ b/code/game/objects/items/weapons/stunbaton.dm
@@ -172,7 +172,7 @@
return 0
/obj/item/baton/robot/attackby(obj/item/W, mob/user)
- return
+ return FALSE
/obj/item/baton/robot/setup_power_supply(loaded_cell_type, accepted_cell_type, power_supply_extension_type, charge_value)
SHOULD_CALL_PARENT(FALSE)
diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm
index 0ad61e86184..847e581f446 100644
--- a/code/game/objects/items/weapons/tanks/tanks.dm
+++ b/code/game/objects/items/weapons/tanks/tanks.dm
@@ -117,17 +117,17 @@ var/global/list/global/tank_gauge_cache = list()
/obj/item/tank/attackby(var/obj/item/W, var/mob/user)
- ..()
if (istype(loc, /obj/item/assembly))
icon = loc
if (istype(W, /obj/item/scanner/gas))
- return
+ return TRUE
if (istype(W,/obj/item/latexballon))
var/obj/item/latexballon/LB = W
LB.blow(src)
add_fingerprint(user)
+ return TRUE
if(IS_COIL(W))
var/obj/item/stack/cable_coil/C = W
@@ -135,6 +135,7 @@ var/global/list/global/tank_gauge_cache = list()
wired = 1
to_chat(user, "You attach the wires to the tank.")
update_icon(TRUE)
+ return TRUE
if(IS_WIRECUTTER(W))
if(wired && proxyassembly.assembly)
@@ -162,6 +163,7 @@ var/global/list/global/tank_gauge_cache = list()
to_chat(user, "You slip and bump the igniter!")
if(prob(85))
proxyassembly.receive_signal()
+ return TRUE
else if(wired)
if(do_after(user, 10, src))
@@ -171,6 +173,7 @@ var/global/list/global/tank_gauge_cache = list()
else
to_chat(user, "There are no wires to cut!")
+ return TRUE
if(istype(W, /obj/item/assembly_holder))
if(wired)
@@ -184,6 +187,7 @@ var/global/list/global/tank_gauge_cache = list()
to_chat(user, "You stop attaching the assembly.")
else
to_chat(user, "You need to wire the device up first.")
+ return TRUE
if(IS_WELDER(W))
var/obj/item/weldingtool/WT = W
@@ -205,14 +209,17 @@ var/global/list/global/tank_gauge_cache = list()
else
to_chat(user, "The emergency pressure relief valve has already been welded.")
add_fingerprint(user)
+ return TRUE
if(istype(W, /obj/item/flamethrower))
var/obj/item/flamethrower/F = W
if(!F.secured || F.tank || !user.try_unequip(src, F))
- return
+ return TRUE
master = F
F.tank = src
+ return TRUE
+ return ..()
/obj/item/tank/attack_self(mob/user)
add_fingerprint(user)
diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm
index 7a527b80a92..8a9364e1e32 100644
--- a/code/game/objects/items/weapons/tape.dm
+++ b/code/game/objects/items/weapons/tape.dm
@@ -149,9 +149,9 @@
/obj/item/stack/tape_roll/duct_tape/proc/stick(var/obj/item/W, mob/user)
if(!(W.item_flags & ITEM_FLAG_CAN_TAPE) || !user.try_unequip(W))
- return
+ return FALSE
if(!can_use(1))
- return
+ return FALSE
use(1)
var/obj/item/duct_tape/tape = new(get_turf(src))
tape.attach(W)
diff --git a/code/game/objects/items/weapons/tools/weldingtool.dm b/code/game/objects/items/weapons/tools/weldingtool.dm
index 2143a7297eb..6cc583631c2 100644
--- a/code/game/objects/items/weapons/tools/weldingtool.dm
+++ b/code/game/objects/items/weapons/tools/weldingtool.dm
@@ -147,7 +147,7 @@
/obj/item/weldingtool/attackby(obj/item/W, mob/user)
if(welding)
to_chat(user, SPAN_WARNING("Stop welding first!"))
- return
+ return TRUE
if (istype(W, /obj/item/chems/welder_tank))
return insert_tank(W, user)
@@ -213,11 +213,11 @@
//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob.
/obj/item/weldingtool/proc/weld(var/fuel_usage = 1, var/mob/user = null)
if(!welding)
- return
+ return FALSE
if(get_fuel() < fuel_usage)
if(user)
to_chat(user, SPAN_NOTICE("You need more [welding_resource] to complete this task."))
- return
+ return FALSE
use_fuel(fuel_usage)
if(user)
diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm
index 47af2bcad50..73a259e6458 100644
--- a/code/game/objects/items/weapons/weaponry.dm
+++ b/code/game/objects/items/weapons/weaponry.dm
@@ -210,7 +210,7 @@
/obj/effect/energy_net/attackby(obj/item/W, mob/user)
current_health -= W.get_attack_force(user)
healthcheck()
- ..()
+ return TRUE
/obj/effect/energy_net/user_unbuckle_mob(mob/user)
return escape_net(user)
diff --git a/code/game/objects/structures/__structure.dm b/code/game/objects/structures/__structure.dm
index db2c0c92707..6c3032c8709 100644
--- a/code/game/objects/structures/__structure.dm
+++ b/code/game/objects/structures/__structure.dm
@@ -18,7 +18,7 @@
var/mob_offset
var/paint_color
- var/paint_verb = "painted"
+ var/paint_verb
/obj/structure/get_color()
if(paint_color)
@@ -80,7 +80,8 @@
to_chat(user, damage_desc)
if(paint_color)
- to_chat(user, "\The [src] has been [paint_verb].")
+ var/decl/pronouns/structure_pronouns = get_pronouns() // so we can do 'have' for plural objects like sheets
+ to_chat(user, "\The [src] [structure_pronouns.has] been [paint_verb].")
if(tool_interaction_flags & TOOL_INTERACTION_ANCHOR)
if(anchored)
@@ -305,8 +306,15 @@ Note: This proc can be overwritten to allow for different types of auto-alignmen
// Calculation to apply new pixelshift.
var/mouse_x = text2num(click_data["icon-x"])-1 // Ranging from 0 to 31
var/mouse_y = text2num(click_data["icon-y"])-1
- var/cell_x = clamp(round(mouse_x/CELLSIZE), 0, CELLS-1) // Ranging from 0 to CELLS-1
- var/cell_y = clamp(round(mouse_y/CELLSIZE), 0, CELLS-1)
+ var/span_x = CELLS
+ var/span_y = CELLS
+ // In case we're a multitile object.
+ if(bound_width > world.icon_size)
+ span_x = bound_width / CELLSIZE
+ if(bound_height > world.icon_size)
+ span_y = bound_height / CELLSIZE
+ var/cell_x = clamp(round(mouse_x/CELLSIZE), 0, span_x-1) // Ranging from 0 to span_x-1
+ var/cell_y = clamp(round(mouse_y/CELLSIZE), 0, span_y-1)
var/list/center = cached_json_decode(W.center_of_mass)
W.pixel_x = (CELLSIZE * (cell_x + 0.5)) - center["x"]
W.pixel_y = (CELLSIZE * (cell_y + 0.5)) - center["y"]
diff --git a/code/game/objects/structures/_structure_materials.dm b/code/game/objects/structures/_structure_materials.dm
index bd070bd0a05..2c50f024bbe 100644
--- a/code/game/objects/structures/_structure_materials.dm
+++ b/code/game/objects/structures/_structure_materials.dm
@@ -22,6 +22,8 @@
set_opacity(FALSE)
else
set_opacity(initial(opacity))
+ if(isnull(initial(paint_verb)) && !isnull(material))
+ paint_verb = material.paint_verb
hitsound = material?.hitsound || initial(hitsound)
if(max_health != -1)
max_health = initial(max_health) + material?.integrity * get_material_health_modifier()
diff --git a/code/game/objects/structures/banners.dm b/code/game/objects/structures/banners.dm
index c00d20b438a..11f37de7bfd 100644
--- a/code/game/objects/structures/banners.dm
+++ b/code/game/objects/structures/banners.dm
@@ -88,7 +88,6 @@
icon_state = "banner"
material = /decl/material/solid/organic/cloth
color = /decl/material/solid/organic/cloth::color
- paint_verb = "dyed"
max_health = 20
material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_NAME
w_class = ITEM_SIZE_NORMAL
diff --git a/code/game/objects/structures/barrel.dm b/code/game/objects/structures/barrels/barrel.dm
similarity index 74%
rename from code/game/objects/structures/barrel.dm
rename to code/game/objects/structures/barrels/barrel.dm
index 20d0c9d6eb2..c8668066624 100644
--- a/code/game/objects/structures/barrel.dm
+++ b/code/game/objects/structures/barrels/barrel.dm
@@ -1,7 +1,7 @@
/obj/structure/reagent_dispensers/barrel
name = "barrel"
desc = "A stout barrel for storing large amounts of liquids or substances."
- icon = 'icons/obj/structures/barrel.dmi'
+ icon = 'icons/obj/structures/barrels/barrel.dmi'
icon_state = ICON_STATE_WORLD
anchored = TRUE
atom_flags = ATOM_FLAG_CLIMBABLE
@@ -16,10 +16,19 @@
volume = 7500
movable_flags = MOVABLE_FLAG_WHEELED
throwpass = TRUE
+ // Should we draw our lid and liquid contents as overlays?
+ var/show_liquid_contents = TRUE
+ // Rivets, bands, etc. Currently just cosmetic.
+ var/decl/material/metal_material = /decl/material/solid/metal/iron
/obj/structure/reagent_dispensers/barrel/Initialize()
- ..()
- return INITIALIZE_HINT_LATELOAD
+ if(ispath(metal_material))
+ metal_material = GET_DECL(metal_material)
+ if(!istype(metal_material))
+ metal_material = null
+ . = ..()
+ if(. == INITIALIZE_HINT_NORMAL && storage)
+ return INITIALIZE_HINT_LATELOAD // we want to grab our turf contents.
/obj/structure/reagent_dispensers/barrel/attackby(obj/item/W, mob/user)
. = ..()
@@ -48,15 +57,29 @@
update_icon()
/obj/structure/reagent_dispensers/barrel/on_update_icon()
+
. = ..()
- if(ATOM_IS_OPEN_CONTAINER(src))
+
+ // Layer below lid/lid metal.
+ if(metal_material)
+ add_overlay(overlay_image(icon, "[icon_state]-metal", metal_material.color, RESET_COLOR))
+
+ // Add lid/reagents overlay/lid metal.
+ if(show_liquid_contents && ATOM_IS_OPEN_CONTAINER(src))
if(reagents)
var/overlay_amount = NONUNIT_CEILING(reagents.total_liquid_volume / reagents.maximum_volume * 100, 10)
var/image/filling_overlay = overlay_image(icon, "[icon_state]-[overlay_amount]", reagents.get_color(), RESET_COLOR | RESET_ALPHA)
add_overlay(filling_overlay)
add_overlay(overlay_image(icon, "[icon_state]-lidopen", material.color, RESET_COLOR))
+ if(metal_material)
+ add_overlay(overlay_image(icon, "[icon_state]-lidopen-metal", metal_material.color, RESET_COLOR))
else
add_overlay(overlay_image(icon, "[icon_state]-lidclosed", material.color, RESET_COLOR))
+ if(metal_material)
+ add_overlay(overlay_image(icon, "[icon_state]-lidclosed-metal", metal_material.color, RESET_COLOR))
+
+ if(istype(loc, /obj/structure/cask_rack))
+ loc.update_icon()
/obj/structure/reagent_dispensers/barrel/ebony
material = /decl/material/solid/organic/wood/ebony
diff --git a/code/game/objects/structures/barrels/cask.dm b/code/game/objects/structures/barrels/cask.dm
new file mode 100644
index 00000000000..04dbb4ca1ba
--- /dev/null
+++ b/code/game/objects/structures/barrels/cask.dm
@@ -0,0 +1,42 @@
+/obj/structure/reagent_dispensers/barrel/cask
+ name = "cask"
+ desc = "A small barrel used to store moderate amounts of liquids or substances."
+ icon = 'icons/obj/structures/barrels/cask.dmi'
+ anchored = FALSE
+ show_liquid_contents = FALSE
+ storage = null // Intended for storing liquids.
+
+// Horrible workaround for physical interaction checks.
+/obj/structure/reagent_dispensers/barrel/cask/nano_host()
+ return istype(loc, /obj/structure/cask_rack) ? loc : src
+
+/obj/structure/reagent_dispensers/barrel/cask/receive_mouse_drop(atom/dropping, mob/user, params)
+ if(istype(loc, /obj/structure/cask_rack))
+ return loc.receive_mouse_drop(dropping, user, params)
+ return ..()
+
+/obj/structure/reagent_dispensers/barrel/cask/handle_mouse_drop(atom/over, mob/user, params)
+ var/obj/structure/cask_rack/rack = loc
+ if(istype(rack) && isturf(over) && user.Adjacent(over) && rack.Adjacent(over) && rack.try_unstack_barrel(src, over, user))
+ return
+ return ..()
+
+/obj/structure/reagent_dispensers/barrel/cask/ebony
+ material = /decl/material/solid/organic/wood/ebony
+ color = /decl/material/solid/organic/wood/ebony::color
+
+/obj/structure/reagent_dispensers/barrel/cask/ebony/water/populate_reagents()
+ . = ..()
+ add_to_reagents(/decl/material/liquid/water, reagents.maximum_volume)
+
+/obj/structure/reagent_dispensers/barrel/cask/ebony/beer/populate_reagents()
+ . = ..()
+ add_to_reagents(/decl/material/liquid/ethanol/beer, reagents.maximum_volume)
+
+/obj/structure/reagent_dispensers/barrel/cask/ebony/wine/populate_reagents()
+ . = ..()
+ add_to_reagents(/decl/material/liquid/ethanol/wine, reagents.maximum_volume)
+
+/obj/structure/reagent_dispensers/barrel/cask/ebony/oil/populate_reagents()
+ . = ..()
+ add_to_reagents(/decl/material/liquid/nutriment/plant_oil, reagents.maximum_volume)
diff --git a/code/game/objects/structures/barrels/cask_rack.dm b/code/game/objects/structures/barrels/cask_rack.dm
new file mode 100644
index 00000000000..f284886622f
--- /dev/null
+++ b/code/game/objects/structures/barrels/cask_rack.dm
@@ -0,0 +1,156 @@
+/obj/structure/cask_rack
+ name = "cask rack"
+ desc = "A flat rack used to stop a cask from rolling around."
+ icon = 'icons/obj/structures/barrels/cask_rack.dmi'
+ icon_state = ICON_STATE_WORLD
+ anchored = TRUE
+ opacity = FALSE
+ density = FALSE // Recalculated when barrels added or removed
+ w_class = ITEM_SIZE_STRUCTURE
+ material = /decl/material/solid/organic/wood
+ color = /decl/material/solid/organic/wood::color
+ material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_NAME | MAT_FLAG_ALTERATION_DESC
+ var/max_stack = 1
+
+/obj/structure/cask_rack/Initialize(ml, _mat, _reinf_mat)
+ . = ..()
+ if(isturf(loc))
+ for(var/atom/movable/stackable in loc)
+ if(try_stack_barrel(stackable) && length(contents) >= max_stack)
+ return
+
+/obj/structure/cask_rack/examine(mob/user, distance, infix, suffix)
+ . = ..()
+ if(length(contents))
+ to_chat(user, SPAN_NOTICE("It contains [english_list(contents)]."))
+
+/obj/structure/cask_rack/handle_mouse_drop(atom/over, mob/user, params)
+ if(isturf(over) && user.Adjacent(over) && Adjacent(over) && try_unstack_barrel(target = over, user = user))
+ return
+ return ..()
+
+/obj/structure/cask_rack/receive_mouse_drop(atom/dropping, mob/user, params)
+ . = ..()
+ if(!. && user.Adjacent(src) && dropping.Adjacent(src) && user.Adjacent(dropping))
+ return try_stack_barrel(dropping, user)
+
+/obj/structure/cask_rack/on_update_icon()
+ . = ..()
+ if(length(contents))
+ // Workaround for base color getting applied to vis_contents.
+ var/base_color = get_color()
+ color = null
+ var/image/I = image(icon, icon_state)
+ I.color = base_color
+ add_overlay(I)
+ // Reposition/update our contents.
+ var/i = 0
+ var/list/stackable_types = get_stackable_barrel_types()
+ for(var/atom/movable/barrel in contents)
+ if(is_type_in_list(barrel, stackable_types))
+ i++
+ adjust_barrel_offsets(barrel, i)
+ else
+ color = get_color()
+ compile_overlays() // Avoid wonky flickering on contents changes
+
+/obj/structure/cask_rack/proc/adjust_barrel_offsets(atom/movable/barrel, barrel_position)
+ barrel.reset_offsets(anim_time = 0)
+ barrel.vis_flags |= (VIS_INHERIT_LAYER | VIS_INHERIT_PLANE)
+
+/obj/structure/cask_rack/Entered(atom/movable/AM, atom/old_loc)
+ . = ..()
+ if(istype(AM) && !QDELETED(AM) && is_type_in_list(AM, get_stackable_barrel_types()))
+ vis_contents |= AM
+ recalculate_barrel_values()
+
+/obj/structure/cask_rack/Exited(atom/movable/AM, atom/new_loc)
+ . = ..()
+ if(istype(AM) && is_type_in_list(AM, get_stackable_barrel_types()))
+ vis_contents -= AM
+ AM.vis_flags = initial(AM.vis_flags)
+ AM.reset_offsets(anim_time = 0)
+ recalculate_barrel_values()
+
+/obj/structure/cask_rack/proc/recalculate_barrel_values()
+ if(length(contents))
+ density = TRUE
+ anchored = TRUE
+ obj_flags &= ~OBJ_FLAG_ANCHORABLE
+ atom_flags |= ATOM_FLAG_CLIMBABLE
+ else
+ density = FALSE
+ obj_flags |= OBJ_FLAG_ANCHORABLE
+ atom_flags &= ~ATOM_FLAG_CLIMBABLE
+ update_icon()
+
+/obj/structure/cask_rack/proc/try_unstack_barrel(atom/movable/barrel, turf/target, mob/user)
+ if(!loc)
+ return FALSE
+ if(!barrel)
+ if(!length(contents))
+ to_chat(user, SPAN_WARNING("\The [src] has nothing stacked on it."))
+ return FALSE
+ barrel = contents[length(contents)]
+ if(!istype(barrel) || !barrel.simulated)
+ return FALSE
+ if(target && (!isturf(target) || !loc.Adjacent(target))) // TODO: Enter() or CanPass() checks instead of relying on step_towards() below.
+ to_chat(user, SPAN_NOTICE("You cannot move \the [barrel] to \the [target]."))
+ return FALSE
+ to_chat(user, SPAN_NOTICE("You move \the [barrel] off \the [src]."))
+ barrel.dropInto(loc)
+ if(target)
+ step_towards(barrel, target)
+ return TRUE
+
+/obj/structure/cask_rack/proc/try_stack_barrel(atom/movable/barrel, mob/user)
+ if(!istype(barrel) || !barrel.simulated || barrel.anchored)
+ return FALSE
+ if(length(contents) >= max_stack)
+ to_chat(user, SPAN_WARNING("\The [src] is already stacked to capacity."))
+ return FALSE
+ var/list/stackable_types = get_stackable_barrel_types()
+ if(!is_type_in_list(barrel, stackable_types))
+ to_chat(user, SPAN_WARNING("\The [src] is cannot hold \the [barrel]."))
+ return FALSE
+ barrel.forceMove(src)
+ to_chat(user, SPAN_NOTICE("You stack \the [barrel] onto \the [src]."))
+ return TRUE
+
+/obj/structure/cask_rack/proc/get_stackable_barrel_types()
+ var/static/list/_stackable_barrel_types = list(
+ /obj/structure/reagent_dispensers/barrel/cask
+ )
+ return _stackable_barrel_types
+
+// A larger stack, used to arrange up to three casks.
+/obj/structure/cask_rack/large
+ desc = "A flat rack used to stop casks from rolling around."
+ max_stack = 3
+ w_class = ITEM_SIZE_LARGE_STRUCTURE
+ icon = 'icons/obj/structures/barrels/cask_rack_large.dmi'
+
+// We want 'large wooden cask rack' not 'wooden large cask rack'
+/obj/structure/cask_rack/large/update_material_name(override_name)
+ . = ..()
+ SetName("large [name]")
+
+/obj/structure/cask_rack/large/adjust_barrel_offsets(atom/movable/barrel, barrel_position)
+ ..()
+ switch(barrel_position)
+ if(1)
+ barrel.pixel_x -= 7
+ if(2)
+ barrel.pixel_x += 7
+ if(3)
+ barrel.pixel_y += 8
+
+/obj/structure/cask_rack/large/mapped
+ material = /decl/material/solid/organic/wood/ebony
+ color = /decl/material/solid/organic/wood/ebony::color
+
+/obj/structure/cask_rack/large/mapped/Initialize(ml, _mat, _reinf_mat)
+ new /obj/structure/reagent_dispensers/barrel/cask/ebony/water(src)
+ new /obj/structure/reagent_dispensers/barrel/cask/ebony/beer(src)
+ new /obj/structure/reagent_dispensers/barrel/cask/ebony/wine(src)
+ . = ..()
diff --git a/code/game/objects/structures/barsign.dm b/code/game/objects/structures/barsign.dm
index 42f4ad03af0..b867efb2361 100644
--- a/code/game/objects/structures/barsign.dm
+++ b/code/game/objects/structures/barsign.dm
@@ -42,11 +42,11 @@
if(access_bar in card.GetAccess())
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in get_valid_states(0)
if(!sign_type)
- return
+ return TRUE
icon_state = sign_type
to_chat(user, "You change the barsign.")
else
to_chat(user, "Access denied.")
- return
+ return TRUE
return ..()
diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm
index 1fd7e744110..bca9199f37d 100644
--- a/code/game/objects/structures/bedsheet_bin.dm
+++ b/code/game/objects/structures/bedsheet_bin.dm
@@ -26,8 +26,8 @@ LINEN BINS
for(var/i in 1 to rand(2,5))
new /obj/item/chems/glass/rag(get_turf(src))
qdel(src)
- return
- ..()
+ return TRUE
+ return ..()
/obj/item/bedsheet/yellowed
desc = "A surprisingly soft bedsheet. This one is old and yellowed."
@@ -142,9 +142,9 @@ LINEN BINS
if(istype(I, /obj/item/bedsheet))
if(curamount >= max_stored)
to_chat(user, SPAN_WARNING("\The [src] is full!"))
- return
+ return TRUE
if(!user.try_unequip(I, src))
- return
+ return TRUE
LAZYDISTINCTADD(sheets, I)
update_icon()
to_chat(user, SPAN_NOTICE("You put [I] in [src]."))
@@ -156,7 +156,7 @@ LINEN BINS
if(!.)
if(curamount && !hidden && I.w_class < w_class) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
if(!user.try_unequip(I, src))
- return
+ return TRUE
hidden = I
to_chat(user, SPAN_NOTICE("You hide [I] among the sheets."))
return TRUE
diff --git a/code/game/objects/structures/charge_pylon.dm b/code/game/objects/structures/charge_pylon.dm
index b6d071e8f5d..fd12329b714 100644
--- a/code/game/objects/structures/charge_pylon.dm
+++ b/code/game/objects/structures/charge_pylon.dm
@@ -45,12 +45,15 @@
visible_message("\The [user] has been shocked by \the [src]!")
user.throw_at(get_step(user,get_dir(src,user)), 5, 10)
-/obj/structure/charge_pylon/attackby(var/obj/item/grab/grab, mob/user)
- if(!istype(grab))
- return
+/obj/structure/charge_pylon/attackby(var/obj/item/item, mob/user)
+ if(!istype(item, /obj/item/grab))
+ return FALSE
+ var/obj/item/grab/grab = item
var/mob/M = grab.get_affecting_mob()
if(M)
charge_user(M)
+ return TRUE
+ return FALSE
/obj/structure/charge_pylon/Bumped(atom/AM)
if(ishuman(AM))
diff --git a/code/game/objects/structures/crates_lockers/closets/__closet.dm b/code/game/objects/structures/crates_lockers/closets/__closet.dm
index 3130191f59f..70b311eb6dc 100644
--- a/code/game/objects/structures/crates_lockers/closets/__closet.dm
+++ b/code/game/objects/structures/crates_lockers/closets/__closet.dm
@@ -319,7 +319,7 @@ var/global/list/closets = list()
if(!WT.weld(0,user))
if(WT.isOn())
to_chat(user, SPAN_NOTICE("You need more welding fuel to complete this task."))
- return
+ return TRUE
welded = !welded
update_icon()
user.visible_message(SPAN_WARNING("\The [src] has been [welded?"welded shut":"unwelded"] by \the [user]."), blind_message = "You hear welding.", range = 3)
diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm
index a944adc5cd2..b34c334d77e 100644
--- a/code/game/objects/structures/crates_lockers/closets/statue.dm
+++ b/code/game/objects/structures/crates_lockers/closets/statue.dm
@@ -103,6 +103,7 @@
user.do_attack_animation(src)
visible_message("[user] strikes [src] with [I].")
check_health()
+ return TRUE
/obj/structure/closet/statue/receive_mouse_drop(atom/dropping, mob/user, params)
return TRUE
diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm
index 087ab07f181..925b88e9b16 100644
--- a/code/game/objects/structures/crates_lockers/crates.dm
+++ b/code/game/objects/structures/crates_lockers/crates.dm
@@ -9,7 +9,7 @@
var/rigged = 0
/obj/structure/closet/crate/open(mob/user)
- if((atom_flags & ATOM_FLAG_OPEN_CONTAINER) && !opened && can_open(user))
+ if((atom_flags & ATOM_FLAG_CLIMBABLE) && !opened && can_open(user))
object_shaken()
. = ..()
if(.)
@@ -36,28 +36,29 @@
if(opened)
return ..()
else if(istype(W, /obj/item/stack/package_wrap))
- return
+ return FALSE // let afterattack run
else if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(rigged)
to_chat(user, "[src] is already rigged!")
- return
+ return TRUE
if (C.use(1))
to_chat(user, "You rig [src].")
rigged = 1
- return
- else if(istype(W, /obj/item/assembly_holder) || istype(W, /obj/item/assembly))
- if(rigged)
- if(!user.try_unequip(W, src))
- return
- to_chat(user, "You attach [W] to [src].")
- return
+ return TRUE
+ return FALSE
+ else if((istype(W, /obj/item/assembly_holder) || istype(W, /obj/item/assembly)) && rigged)
+ if(!user.try_unequip(W, src))
+ return TRUE
+ to_chat(user, "You attach [W] to [src].")
+ return TRUE
else if(IS_WIRECUTTER(W))
if(rigged)
to_chat(user, "You cut away the wiring.")
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
rigged = 0
- return
+ return TRUE
+ return FALSE
else
return ..()
diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm
index 31bd49e65e3..bffd87cc4fe 100644
--- a/code/game/objects/structures/curtains.dm
+++ b/code/game/objects/structures/curtains.dm
@@ -26,15 +26,15 @@
/obj/item/curtain/attackby(obj/item/W, mob/user)
if(IS_SCREWDRIVER(W))
if(!curtain_kind_path)
- return
+ return TRUE
if(!isturf(loc))
to_chat(user, SPAN_DANGER("You cannot install \the [src] from your hands."))
- return
+ return TRUE
if(isspaceturf(loc))
to_chat(user, SPAN_DANGER("You cannot install \the [src] in space."))
- return
+ return TRUE
user.visible_message(
SPAN_NOTICE("\The [user] begins installing \the [src]."),
@@ -42,17 +42,18 @@
playsound(src, 'sound/items/Screwdriver.ogg', 100, 1)
if(!do_after(user, 4 SECONDS, src))
- return
+ return TRUE
if(QDELETED(src))
- return
+ return TRUE
var/decl/curtain_kind/kind = GET_DECL(curtain_kind_path)
var/obj/structure/curtain/C = kind.make_structure(loc, dir)
transfer_fingerprints_to(C)
qdel(src)
+ return TRUE
else
- ..()
+ return ..()
/obj/item/curtain/on_update_icon()
. = ..()
@@ -110,27 +111,25 @@
return ..()
/obj/structure/curtain/attackby(obj/item/W, mob/user)
- if(IS_SCREWDRIVER(W))
- if(!curtain_kind_path)
- return
-
+ if(IS_SCREWDRIVER(W) && curtain_kind_path)
user.visible_message(
SPAN_NOTICE("\The [user] begins uninstalling \the [src]."),
SPAN_NOTICE("You begin uninstalling \the [src]."))
playsound(src, 'sound/items/Screwdriver.ogg', 100, 1)
if(!do_after(user, 4 SECONDS, src))
- return
+ return TRUE
if(QDELETED(src))
- return
+ return TRUE
var/decl/curtain_kind/kind = GET_DECL(curtain_kind_path)
var/obj/item/curtain/C = kind.make_item(loc)
transfer_fingerprints_to(C)
qdel(src)
+ return TRUE
else
- ..()
+ return ..()
/obj/structure/curtain/proc/toggle()
playsound(src, 'sound/effects/curtain.ogg', 15, 1, -5)
diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm
index 7ecd8f61262..9b6fa1c413a 100644
--- a/code/game/objects/structures/displaycase.dm
+++ b/code/game/objects/structures/displaycase.dm
@@ -96,22 +96,22 @@
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
var/obj/item/card/id/id = W.GetIdCard()
if(istype(id))
- if(allowed(usr))
+ if(allowed(user))
locked = !locked
to_chat(user, "\The [src] was [locked ? "locked" : "unlocked"].")
else
to_chat(user, "\The [src]'s card reader denies you access.")
- return
+ return TRUE
if(isitem(W) && (!locked || destroyed))
if(!W.simulated || W.anchored)
- return
+ return FALSE
if(user.try_unequip(W, src))
W.pixel_x = 0
W.pixel_y = -7
update_icon()
- return
+ return TRUE
. = ..()
/obj/structure/displaycase/attack_hand(mob/user)
@@ -126,7 +126,7 @@
var/obj/item/selected_item
selected_item = show_radial_menu(user, src, make_item_radial_menu_choices(src), radius = 42, require_near = TRUE, use_labels = RADIAL_LABELS_OFFSET)
if(QDELETED(selected_item) || !contents.Find(selected_item) || !Adjacent(user) || user.incapacitated())
- return
+ return TRUE
to_chat(user, SPAN_NOTICE("You remove \the [selected_item] from \the [src]."))
selected_item.dropInto(loc)
@@ -137,3 +137,4 @@
visible_message(SPAN_WARNING("[user] kicks \the [src]."), SPAN_WARNING("You kick \the [src]."))
take_damage(2)
return TRUE
+ return FALSE
diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm
index 2652614a082..93ef799d01a 100644
--- a/code/game/objects/structures/door_assembly.dm
+++ b/code/game/objects/structures/door_assembly.dm
@@ -128,10 +128,10 @@
if(IS_PEN(W))
var/t = sanitize_safe(input(user, "Enter the name for the door.", src.name, src.created_name), MAX_NAME_LEN)
if(!length(t))
- return
+ return TRUE
if(!CanPhysicallyInteractWith(user, src))
to_chat(user, SPAN_WARNING("You must stay close to \the [src]!"))
- return
+ return TRUE
created_name = t
return TRUE
@@ -144,7 +144,7 @@
if(glass_material_datum)
var/mat_name = glass_material_datum.solid_name || glass_material_datum.name
user.visible_message("[user] welds the [mat_name] plating off the airlock assembly.", "You start to weld the [mat_name] plating off the airlock assembly.")
- if(do_after(user, 40,src))
+ if(do_after(user, 4 SECONDS, src))
if(!WT.isOn())
return TRUE
to_chat(user, "You welded the [mat_name] plating off!")
@@ -154,12 +154,12 @@
return TRUE
if(!anchored)
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
- if(do_after(user, 40,src))
+ if(do_after(user, 4 SECONDS, src))
if(!WT.isOn())
- return
+ return TRUE
to_chat(user, "You dissasembled the airlock assembly!")
dismantle_structure(user)
- return TRUE
+ return TRUE
else
to_chat(user, "You need more welding fuel.")
return TRUE
@@ -171,52 +171,56 @@
else
user.visible_message("[user] begins securing the airlock assembly to the floor.", "You begin securing the airlock assembly to the floor.")
- if(do_after(user, 40,src))
- if(!src) return
+ if(do_after(user, 4 SECONDS, src))
+ if(QDELETED(src)) return TRUE
to_chat(user, "You [anchored? "un" : ""]secured the airlock assembly!")
anchored = !anchored
update_icon()
+ return TRUE
else if(IS_COIL(W) && state == 0 && anchored)
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 1)
to_chat(user, "You need one length of coil to wire the airlock assembly.")
- return
+ return TRUE
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
- if(do_after(user, 40,src) && state == 0 && anchored)
+ if(do_after(user, 4 SECONDS, src) && state == 0 && anchored)
if (C.use(1))
src.state = 1
to_chat(user, "You wire the airlock.")
update_icon()
+ return TRUE
else if(IS_WIRECUTTER(W) && state == 1 )
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
if(do_after(user, 40,src))
- if(!src) return
+ if(QDELETED(src)) return TRUE
to_chat(user, "You cut the airlock wires.!")
new/obj/item/stack/cable_coil(src.loc, 1)
src.state = 0
update_icon()
+ return TRUE
else if(istype(W, /obj/item/stock_parts/circuitboard/airlock_electronics) && state == 1)
var/obj/item/stock_parts/circuitboard/airlock_electronics/E = W
if(!ispath(airlock_type, E.build_path))
- return
+ return FALSE
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
if(do_after(user, 40,src))
- if(!src) return
+ if(QDELETED(src)) return TRUE
if(!user.try_unequip(W, src))
- return
+ return TRUE
to_chat(user, "You installed the airlock electronics!")
src.state = 2
src.SetName("Near finished Airlock Assembly")
src.electronics = W
update_icon()
+ return TRUE
else if(IS_CROWBAR(W) && state == 2 )
//This should never happen, but just in case I guess
@@ -224,19 +228,20 @@
to_chat(user, "There was nothing to remove.")
src.state = 1
update_icon()
- return
+ return TRUE
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("\The [user] starts removing the electronics from the airlock assembly.", "You start removing the electronics from the airlock assembly.")
- if(do_after(user, 40,src))
- if(!src) return
+ if(do_after(user, 4 SECONDS, src))
+ if(QDELETED(src)) return TRUE
to_chat(user, "You removed the airlock electronics!")
src.state = 1
src.SetName("Wired Airlock Assembly")
electronics.dropInto(loc)
electronics = null
update_icon()
+ return TRUE
else if(istype(W, /obj/item/stack/material) && !glass)
var/obj/item/stack/material/S = W
@@ -244,26 +249,28 @@
if (S.get_amount() >= 2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
- if(do_after(user, 40,src) && !glass)
+ if(do_after(user, 4 SECONDS, src) && !glass)
if (S.use(2))
to_chat(user, "You installed reinforced glass windows into the airlock assembly.")
glass = 1
glass_material = material_name
update_icon()
return TRUE
+ return FALSE
else if(IS_SCREWDRIVER(W) && state == 2 )
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
to_chat(user, "Now finishing the airlock.")
- if(do_after(user, 40,src))
- if(!src) return
+ if(do_after(user, 4 SECONDS, src))
+ if(QDELETED(src)) return TRUE
to_chat(user, "You finish the airlock!")
var/obj/machinery/door/door = new airlock_type(get_turf(src), dir, FALSE, src)
door.construct_state.post_construct(door) // it eats the circuit inside Initialize
qdel(src)
+ return TRUE
else
- ..()
+ return ..()
/obj/structure/door_assembly/on_update_icon()
..()
diff --git a/code/game/objects/structures/drain.dm b/code/game/objects/structures/drain.dm
index 13d950ed738..cca6fa3bebf 100644
--- a/code/game/objects/structures/drain.dm
+++ b/code/game/objects/structures/drain.dm
@@ -17,7 +17,6 @@
to_chat(user, "It is welded shut.")
/obj/structure/hygiene/drain/attackby(var/obj/item/thing, var/mob/user)
- ..()
if(IS_WELDER(thing))
var/obj/item/weldingtool/WT = thing
if(WT.isOn())
@@ -26,13 +25,13 @@
else
to_chat(user, "Turn \the [thing] on, first.")
update_icon()
- return
+ return TRUE
if(IS_WRENCH(thing))
new /obj/item/drain(src.loc)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
to_chat(user, "[user] unwrenches \the [src].")
qdel(src)
- return
+ return TRUE
return ..()
/obj/structure/hygiene/drain/on_update_icon()
@@ -59,7 +58,7 @@
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
to_chat(user, SPAN_NOTICE("\The [user] wrenches \the [src] down."))
qdel(src)
- return
+ return TRUE
return ..()
/obj/structure/hygiene/drain/bath
diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm
index b2b2358d04f..03d91b43ce4 100644
--- a/code/game/objects/structures/extinguisher.dm
+++ b/code/game/objects/structures/extinguisher.dm
@@ -14,9 +14,11 @@
. = ..()
has_extinguisher = new/obj/item/chems/spray/extinguisher(src)
+// TODO: I wanted to make it so you had to actually use your hand to open it if it's closed, but
+// that'd be out of scope for just an attackby audit. Someone fix this so it can call parent please.
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
if(isrobot(user))
- return
+ return FALSE
if(istype(O, /obj/item/chems/spray/extinguisher))
if(!has_extinguisher && opened && user.try_unequip(O, src))
has_extinguisher = O
@@ -27,6 +29,7 @@
else
opened = !opened
update_icon()
+ return TRUE
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
diff --git a/code/game/objects/structures/fences.dm b/code/game/objects/structures/fences.dm
index 5abc3447cf0..ddeb006f1aa 100644
--- a/code/game/objects/structures/fences.dm
+++ b/code/game/objects/structures/fences.dm
@@ -91,11 +91,11 @@
if(IS_WIRECUTTER(tool))
if(!cuttable)
to_chat(user, SPAN_WARNING("This section of the fence can't be cut."))
- return
+ return TRUE
var/current_stage = hole_size
if(current_stage >= MAX_HOLE_SIZE)
to_chat(user, SPAN_NOTICE("This fence has too much cut out of it already."))
- return
+ return TRUE
if(tool.do_tool_interaction(TOOL_WIRECUTTERS, user, src, CUT_TIME, "cutting through", "cutting through", check_skill = FALSE) && current_stage == hole_size) // do_tool_interaction sleeps, so make sure it hasn't been cut more while we waited
switch(++hole_size)
diff --git a/code/game/objects/structures/fireaxe_cabinet.dm b/code/game/objects/structures/fireaxe_cabinet.dm
index 97e82f89b64..f16681fa2d4 100644
--- a/code/game/objects/structures/fireaxe_cabinet.dm
+++ b/code/game/objects/structures/fireaxe_cabinet.dm
@@ -68,7 +68,7 @@
if(IS_MULTITOOL(O))
toggle_lock(user)
- return
+ return TRUE
if(istype(O, /obj/item/bladed/axe/fire))
if(open)
@@ -79,7 +79,7 @@
fireaxe = O
to_chat(user, "You place \the [fireaxe] into \the [src].")
update_icon()
- return
+ return TRUE
var/force = O.get_attack_force(user)
if(force)
@@ -89,15 +89,15 @@
visible_message("[user] [pick(O.attack_verb)] \the [src]!")
if(damage_threshold > force)
to_chat(user, "Your strike is deflected by the reinforced glass!")
- return
+ return TRUE
if(shattered)
- return
+ return TRUE
shattered = 1
unlocked = 1
open = 1
playsound(user, 'sound/effects/Glassbr3.ogg', 100, 1)
update_icon()
- return
+ return TRUE
return ..()
diff --git a/code/game/objects/structures/fitness.dm b/code/game/objects/structures/fitness.dm
index b83a6aa499e..25be6aa2bf0 100644
--- a/code/game/objects/structures/fitness.dm
+++ b/code/game/objects/structures/fitness.dm
@@ -47,6 +47,8 @@
playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1)
weight = (weight % max_weight) + 1
to_chat(user, "You set the machine's weight level to [weight].")
+ return TRUE
+ return ..()
/obj/structure/fitness/weightlifter/attack_hand(mob/user)
if(!ishuman(user))
diff --git a/code/game/objects/structures/flaps.dm b/code/game/objects/structures/flaps.dm
index cdcc5012722..00e3257a5b6 100644
--- a/code/game/objects/structures/flaps.dm
+++ b/code/game/objects/structures/flaps.dm
@@ -47,11 +47,14 @@
if(user.do_skilled(3 SECONDS, SKILL_CONSTRUCTION, src))
user.visible_message("\The [user] deconstructs \the [src].", "You deconstruct \the [src].")
qdel(src)
+ return TRUE
if(IS_SCREWDRIVER(W) && anchored)
airtight = !airtight
airtight ? become_airtight() : clear_airtight()
user.visible_message("\The [user] adjusts \the [src], [airtight ? "preventing" : "allowing"] air flow.")
- else ..()
+ return TRUE
+ else
+ return ..()
/obj/structure/flaps/explosion_act(severity)
..()
diff --git a/code/game/objects/structures/fountain.dm b/code/game/objects/structures/fountain.dm
index d4d962c6544..7df7c3ee307 100644
--- a/code/game/objects/structures/fountain.dm
+++ b/code/game/objects/structures/fountain.dm
@@ -33,7 +33,7 @@
var/datum/appearance_descriptor/age/age = my_bodytype && LAZYACCESS(my_bodytype.appearance_descriptors, "age")
if(H.isSynthetic() || !my_bodytype || !age)
to_chat(H, SPAN_WARNING("A feeling of foreboding stills your hand. The fountain is not for your kind."))
- return
+ return TRUE
if(alert("As you reach out to touch the fountain, a feeling of doubt overcomes you. Steel yourself and proceed?",,"Yes", "No") == "Yes")
visible_message("\The [H] touches \the [src].")
diff --git a/code/game/objects/structures/fuel_port.dm b/code/game/objects/structures/fuel_port.dm
index 4e5589fd37e..91eef126f0b 100644
--- a/code/game/objects/structures/fuel_port.dm
+++ b/code/game/objects/structures/fuel_port.dm
@@ -52,6 +52,7 @@
add_overlay("[icon_state]_closed")
/obj/structure/fuel_port/attackby(obj/item/W, mob/user)
+ . = FALSE
if(W.do_tool_interaction(TOOL_CROWBAR, user, src, 1 SECOND))
if(open)
playsound(src, sound_open, 25, 0, -3)
@@ -59,19 +60,22 @@
else
playsound(src, sound_close, 15, 1, -3)
open = TRUE
+ . = TRUE
else if(istype(W, /obj/item/tank))
if(!open)
to_chat(user, SPAN_WARNING("\The [src] door is still closed!"))
- return
+ return TRUE
if(locate_tank())
to_chat(user, SPAN_WARNING("\The [src] already has a tank inside!"))
- return
+ return TRUE
else
user.try_unequip(W, src)
+ . = TRUE
- update_icon()
+ if(.)
+ update_icon()
// Walls hide stuff inside them, but we want to be visible.
/obj/structure/fuel_port/hide()
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index 25abc7a0369..d4aed89ecdc 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -101,7 +101,7 @@
if(istype(W, /obj/item/gun/energy/plasmacutter))
var/obj/item/gun/energy/plasmacutter/cutter = W
if(!cutter.slice(user))
- return
+ return TRUE
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
visible_message(SPAN_NOTICE("\The [user] begins slicing apart \the [src] with \the [W]."))
if(do_after(user,reinf_material ? 40: 20,src))
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 14b73b0e268..6bde6ee9cb1 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -191,7 +191,7 @@
if(istype(W,/obj/item/stack/material))
var/obj/item/stack/material/ST = W
if(ST.material.opacity > 0.7)
- return 0
+ return FALSE
var/dir_to_set = 5
if(!is_on_frame())
@@ -201,7 +201,7 @@
dir_to_set = get_dir(loc, user)
if(dir_to_set & (dir_to_set - 1)) //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
to_chat(user, "You can't reach.")
- return
+ return TRUE
place_window(user, loc, dir_to_set, ST)
return TRUE
diff --git a/code/game/objects/structures/holosigns.dm b/code/game/objects/structures/holosigns.dm
index 2d9a51c5737..5e9ace14110 100644
--- a/code/game/objects/structures/holosigns.dm
+++ b/code/game/objects/structures/holosigns.dm
@@ -28,6 +28,7 @@
/obj/structure/holosign/attackby(obj/W, mob/user)
visible_message(SPAN_NOTICE("\The [user] waves \a [W] through \the [src], causing it to dissipate."))
deactivate(user)
+ return TRUE
/obj/structure/holosign/proc/deactivate(mob/living/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
diff --git a/code/game/objects/structures/ironing_board.dm b/code/game/objects/structures/ironing_board.dm
index 95a44a1a42f..77bcb0ec064 100644
--- a/code/game/objects/structures/ironing_board.dm
+++ b/code/game/objects/structures/ironing_board.dm
@@ -63,22 +63,22 @@
if(!density)
if(istype(I,/obj/item/clothing) || istype(I,/obj/item/ironingiron))
to_chat(user, "[src] isn't deployed!")
- return
+ return TRUE
return ..()
if(istype(I,/obj/item/clothing))
if(cloth)
to_chat(user, "[cloth] is already on the ironing table!")
- return
+ return TRUE
if(buckled_mob)
to_chat(user, "[buckled_mob] is already on the ironing table!")
- return
+ return TRUE
if(user.try_unequip(I, src))
cloth = I
events_repository.register(/decl/observ/destroyed, I, src, TYPE_PROC_REF(/obj/structure/bed/roller/ironingboard, remove_item))
update_icon()
- return
+ return TRUE
else if(istype(I,/obj/item/ironingiron))
var/obj/item/ironingiron/R = I
@@ -90,32 +90,32 @@
visible_message("[user] begins ironing [src.buckled_mob]'s [parsed]!", "You begin ironing [buckled_mob]'s [parsed]!")
if(!do_after(user, 40, src))
- return
+ return TRUE
visible_message("[user] irons [src.buckled_mob]'s [parsed]!", "You iron [buckled_mob]'s [parsed]!")
var/obj/item/organ/external/affecting = GET_EXTERNAL_ORGAN(H, zone)
affecting.take_external_damage(0, 15, used_weapon = "Hot metal")
- return
+ return TRUE
if(!cloth)
if(!holding && !R.enabled && user.try_unequip(I, src))
holding = R
events_repository.register(/decl/observ/destroyed, I, src, TYPE_PROC_REF(/obj/structure/bed/roller/ironingboard, remove_item))
update_icon()
- return
+ return TRUE
to_chat(user, "There isn't anything on the ironing board.")
- return
+ return TRUE
visible_message("[user] begins ironing [cloth].")
- if(!do_after(user, 40, src))
- return
+ if(!do_after(user, 4 SECONDS, src))
+ return TRUE
visible_message("[user] finishes ironing [cloth].")
cloth.ironed_state = WRINKLES_NONE
- return
+ return TRUE
- ..()
+ return ..()
/obj/structure/bed/roller/ironingboard/attack_hand(var/mob/user)
if(!user.check_dexterity(DEXTERITY_SIMPLE_MACHINES, TRUE) || buckled_mob)
diff --git a/code/game/objects/structures/iv_drip.dm b/code/game/objects/structures/iv_drip.dm
index 44c3e904348..8dfa1d6269d 100644
--- a/code/game/objects/structures/iv_drip.dm
+++ b/code/game/objects/structures/iv_drip.dm
@@ -88,12 +88,13 @@
if (istype(W, /obj/item/chems))
if(!isnull(src.beaker))
to_chat(user, "There is already a reagent container loaded!")
- return
+ return TRUE
if(!user.try_unequip(W, src))
- return
+ return TRUE
beaker = W
to_chat(user, "You attach \the [W] to \the [src].")
queue_icon_update()
+ return TRUE
else
return ..()
diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm
index 2ffea94388c..b2ed1afb24a 100644
--- a/code/game/objects/structures/janicart.dm
+++ b/code/game/objects/structures/janicart.dm
@@ -27,11 +27,12 @@
/obj/structure/janitorialcart/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/bag/trash) && !mybag)
if(!user.try_unequip(I, src))
- return
+ return TRUE
mybag = I
update_icon()
updateUsrDialog()
to_chat(user, "You put [I] into [src].")
+ return TRUE
else if(istype(I, /obj/item/mop))
if(I.reagents.total_volume < I.reagents.maximum_volume) //if it's not completely soaked we assume they want to wet it, otherwise store it
@@ -41,47 +42,52 @@
reagents.trans_to_obj(I, I.reagents.maximum_volume)
to_chat(user, "You wet [I] in [src].")
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
- return
+ return TRUE
if(!mymop)
if(!user.try_unequip(I, src))
- return
+ return TRUE
mymop = I
update_icon()
updateUsrDialog()
to_chat(user, "You put [I] into [src].")
+ return TRUE
else if(istype(I, /obj/item/chems/spray) && !myspray)
if(!user.try_unequip(I, src))
- return
+ return TRUE
myspray = I
update_icon()
updateUsrDialog()
to_chat(user, "You put [I] into [src].")
+ return TRUE
else if(istype(I, /obj/item/lightreplacer) && !myreplacer)
if(!user.try_unequip(I, src))
- return
+ return TRUE
myreplacer = I
update_icon()
updateUsrDialog()
to_chat(user, "You put [I] into [src].")
+ return TRUE
else if(istype(I, /obj/item/caution))
if(signs < 4)
if(!user.try_unequip(I, src))
- return
+ return TRUE
signs++
update_icon()
updateUsrDialog()
to_chat(user, "You put [I] into [src].")
else
to_chat(user, "[src] can't hold any more signs.")
+ return TRUE
else if(istype(I, /obj/item/chems/glass))
- return // So we do not put them in the trash bag as we mean to fill the mop bucket
+ return FALSE // So we do not put them in the trash bag as we mean to fill the mop bucket; FALSE means run afterattack
else if(mybag)
- mybag.attackby(I, user)
+ return mybag.attackby(I, user)
+ return ..()
/obj/structure/janitorialcart/attack_hand(mob/user)
@@ -225,7 +231,7 @@
if(istype(I, /obj/item/bag/trash))
if(!user.try_unequip(I, src))
- return
+ return TRUE
to_chat(user, SPAN_NOTICE("You hook \the [I] onto the [callme]."))
mybag = I
return TRUE
diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm
index d8fae002798..cfdce2510d7 100644
--- a/code/game/objects/structures/lattice.dm
+++ b/code/game/objects/structures/lattice.dm
@@ -65,22 +65,21 @@
physically_destroyed()
/obj/structure/lattice/attackby(obj/item/C, mob/user)
-
if (istype(C, /obj/item/stack/tile))
var/turf/T = get_turf(src)
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
- return
+ return TRUE
if(IS_WELDER(C))
var/obj/item/weldingtool/WT = C
if(WT.weld(0, user))
deconstruct(user)
- return
+ return TRUE
if(istype(C, /obj/item/gun/energy/plasmacutter))
var/obj/item/gun/energy/plasmacutter/cutter = C
if(!cutter.slice(user))
- return
+ return TRUE
deconstruct(user)
- return
+ return TRUE
if (istype(C, /obj/item/stack/material/rods))
var/ladder = (locate(/obj/structure/ladder) in loc)
@@ -91,13 +90,15 @@
var/obj/item/stack/material/rods/R = C
if(locate(/obj/structure/catwalk) in get_turf(src))
to_chat(user, SPAN_WARNING("There is already a catwalk here."))
- return
+ return TRUE
else if(R.use(2))
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
new /obj/structure/catwalk(src.loc, R.material.type)
- return
+ return TRUE
else
to_chat(user, SPAN_WARNING("You require at least two rods to complete the catwalk."))
+ return TRUE
+ return ..()
/obj/structure/lattice/on_update_icon()
..()
diff --git a/code/game/objects/structures/memorial.dm b/code/game/objects/structures/memorial.dm
index 221284037e0..a320fee2245 100644
--- a/code/game/objects/structures/memorial.dm
+++ b/code/game/objects/structures/memorial.dm
@@ -18,6 +18,8 @@
to_chat(user, "You add \the [T.owner_name]'s \the [T] to \the [src].")
fallen += "[T.owner_rank] [T.owner_name] | [T.owner_branch]"
qdel(T)
+ return TRUE
+ return ..()
/obj/structure/memorial/examine(mob/user, distance)
. = ..()
diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm
index 3f7febf0835..afc4805a96e 100644
--- a/code/game/objects/structures/mop_bucket.dm
+++ b/code/game/objects/structures/mop_bucket.dm
@@ -27,3 +27,5 @@
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
else
to_chat(user, SPAN_WARNING("\The [I] is saturated."))
+ return TRUE
+ return ..()
diff --git a/code/game/objects/structures/pit.dm b/code/game/objects/structures/pit.dm
index f4becc1873f..59f4c6f727f 100644
--- a/code/game/objects/structures/pit.dm
+++ b/code/game/objects/structures/pit.dm
@@ -180,7 +180,7 @@
var/msg = sanitize(input(user, "What should it say?", "Grave marker", html_decode(message)) as text|null)
if(!CanPhysicallyInteract(user))
to_chat(user, SPAN_WARNING("You must stay close to \the [src]!"))
- return
+ return TRUE
if(msg && used_item.do_tool_interaction(TOOL_PEN, user, src, 1 SECOND, fuel_expenditure = 1))
message = msg
return TRUE
@@ -314,7 +314,7 @@
var/msg = sanitize(input(user, "What should it say?", "Grave marker", html_decode(message)) as text|null)
if(!CanPhysicallyInteract(user))
to_chat(user, SPAN_WARNING("You must stay close to \the [src]!"))
- return
+ return TRUE
if(msg && used_item.do_tool_interaction(TOOL_PEN, user, src, 1 SECOND, fuel_expenditure = 1))
message = msg
return TRUE
diff --git a/code/game/objects/structures/quicksand.dm b/code/game/objects/structures/quicksand.dm
index b19e717dfc6..383b435943b 100644
--- a/code/game/objects/structures/quicksand.dm
+++ b/code/game/objects/structures/quicksand.dm
@@ -82,8 +82,9 @@
/obj/effect/quicksand/attackby(obj/item/W, mob/user)
if(!exposed && W.get_attack_force(user))
expose()
+ return TRUE
else
- ..()
+ return ..()
/obj/effect/quicksand/Crossed(atom/movable/AM)
if(!isliving(AM))
diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm
index bd89fda94cd..01e7a84e68a 100644
--- a/code/game/objects/structures/railing.dm
+++ b/code/game/objects/structures/railing.dm
@@ -235,19 +235,19 @@ WOOD_RAILING_SUBTYPE(yew)
visible_message(SPAN_DANGER("\The [user] throws \the [victim] over \the [src]!"))
return TRUE
+// TODO: rewrite to use handle_default_wrench_attackby, bash, etc
/obj/structure/railing/attackby(var/obj/item/W, var/mob/user)
-
// Dismantle
if(IS_WRENCH(W))
if(!anchored)
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
- if(do_after(user, 20, src))
+ if(do_after(user, 2 SECONDS, src))
if(anchored)
- return
+ return TRUE
user.visible_message("\The [user] dismantles \the [src].", "You dismantle \the [src].")
material.create_object(loc, 2)
qdel(src)
- return
+ return TRUE
// Wrench Open
else
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
@@ -258,7 +258,7 @@ WOOD_RAILING_SUBTYPE(yew)
user.visible_message("\The [user] wrenches \the [src] closed.", "You wrench \the [src] closed.")
density = TRUE
update_icon()
- return
+ return TRUE
// Repair
if(IS_WELDER(W))
var/obj/item/weldingtool/F = W
@@ -266,34 +266,34 @@ WOOD_RAILING_SUBTYPE(yew)
var/current_max_health = get_max_health()
if(current_health >= current_max_health)
to_chat(user, "\The [src] does not need repairs.")
- return
+ return TRUE
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 20, src))
if(current_health >= current_max_health)
- return
+ return TRUE
user.visible_message("\The [user] repairs some damage to \the [src].", "You repair some damage to \the [src].")
current_health = min(current_health+(current_max_health/5), current_max_health)
- return
+ return TRUE
// Install
if(IS_SCREWDRIVER(W))
if(!density)
to_chat(user, "You need to wrench \the [src] from back into place first.")
- return
+ return TRUE
user.visible_message(anchored ? "\The [user] begins unscrew \the [src]." : "\The [user] begins fasten \the [src]." )
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
if(do_after(user, 10, src) && density)
to_chat(user, (anchored ? "You have unfastened \the [src] from the floor." : "You have fastened \the [src] to the floor."))
anchored = !anchored
update_icon()
- return
+ return TRUE
var/force = W.get_attack_force(user)
if(force && (W.atom_damage_type == BURN || W.atom_damage_type == BRUTE))
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
visible_message("\The [src] has been [LAZYLEN(W.attack_verb) ? pick(W.attack_verb) : "attacked"] with \the [W] by \the [user]!")
take_damage(force, W.atom_damage_type)
- return
+ return TRUE
. = ..()
/obj/structure/railing/explosion_act(severity)
diff --git a/code/game/objects/structures/rubble.dm b/code/game/objects/structures/rubble.dm
index 2920faf0ac5..69a41833792 100644
--- a/code/game/objects/structures/rubble.dm
+++ b/code/game/objects/structures/rubble.dm
@@ -51,7 +51,7 @@
if(!is_rummaging)
if(!lootleft)
to_chat(user, SPAN_NOTICE("There's nothing left in this one but unusable garbage..."))
- return
+ return TRUE
visible_message(SPAN_NOTICE("\The [user] starts rummaging through \the [src]."))
is_rummaging = TRUE
if(do_after(user, 30))
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index 9f1c725a947..7b78fc8c944 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -21,10 +21,11 @@ FLOOR SAFES
var/space = 0 //the combined w_class of everything in the safe
var/maxspace = 24 //the maximum combined w_class of stuff in the safe
+// TODO: make this use a storage datum?
/obj/structure/safe/Initialize()
for(var/obj/item/I in loc)
if(space >= maxspace)
- return
+ break
if(I.w_class + space <= maxspace) //todo replace with internal storage or something
space += I.w_class
I.forceMove(src)
@@ -142,18 +143,19 @@ FLOOR SAFES
if(open)
if(I.w_class + space <= maxspace)
if(!user.try_unequip(I, src))
- return
+ return TRUE
space += I.w_class
to_chat(user, "You put [I] in [src].")
updateUsrDialog()
- return
+ return TRUE
else
to_chat(user, "[I] won't fit in [src].")
- return
+ return TRUE
else
if(istype(I, /obj/item/clothing/neck/stethoscope))
to_chat(user, "Hold [I] in one of your hands while you manipulate the dial.")
- return
+ return TRUE
+ return FALSE
/obj/structure/safe/explosion_act(severity)
diff --git a/code/game/objects/structures/skele_stand.dm b/code/game/objects/structures/skele_stand.dm
index 63a64f070c8..e45d1c326ea 100644
--- a/code/game/objects/structures/skele_stand.dm
+++ b/code/game/objects/structures/skele_stand.dm
@@ -61,18 +61,21 @@
var/nuname = sanitize(input(user,"What do you want to name this skeleton as?","Skeleton Christening",name) as text|null)
if(nuname && CanPhysicallyInteract(user))
SetName(nuname)
- return 1
+ return TRUE
if(istype(W,/obj/item/clothing))
var/obj/item/clothing/clothes = W
- if(clothes.fallback_slot)
- if(swag[clothes.fallback_slot])
- to_chat(user,SPAN_NOTICE("There is already that kind of clothing on \the [src]."))
- else if(user.try_unequip(W, src))
- swag[clothes.fallback_slot] = W
- update_icon()
- return 1
- else
+ if(!clothes.fallback_slot)
+ return FALSE
+ if(swag[clothes.fallback_slot])
+ to_chat(user,SPAN_NOTICE("There is already that kind of clothing on \the [src]."))
+ else if(user.try_unequip(W, src))
+ swag[clothes.fallback_slot] = W
+ update_icon()
+ return TRUE
+ . = ..()
+ if(!.)
rattle_bones(user, W)
+ return TRUE
/obj/structure/skele_stand/Destroy()
for(var/slot in swag)
diff --git a/code/game/objects/structures/stool_bed_chair_nest_sofa/bed.dm b/code/game/objects/structures/stool_bed_chair_nest_sofa/bed.dm
index 70886c64c30..519dae2ab6e 100644
--- a/code/game/objects/structures/stool_bed_chair_nest_sofa/bed.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest_sofa/bed.dm
@@ -191,6 +191,7 @@
anchored = FALSE
buckle_pixel_shift = list("x" = 0, "y" = 0, "z" = 6)
movable_flags = MOVABLE_FLAG_WHEELED
+ tool_interaction_flags = 0
var/item_form_type = /obj/item/roller //The folded-up object path.
var/obj/item/chems/beaker
var/iv_attached = 0
@@ -214,17 +215,18 @@
iv.pixel_y = 6
add_overlay(iv)
+/obj/structure/bed/roller/can_apply_padding()
+ return FALSE
+
/obj/structure/bed/roller/attackby(obj/item/I, mob/user)
- if(IS_WRENCH(I) || istype(I, /obj/item/stack) || IS_WIRECUTTER(I))
- return 1
if(iv_stand && !beaker && istype(I, /obj/item/chems))
if(!user.try_unequip(I, src))
- return
+ return TRUE
to_chat(user, "You attach \the [I] to \the [src].")
beaker = I
queue_icon_update()
- return 1
- ..()
+ return TRUE
+ return ..()
/obj/structure/bed/roller/attack_hand(mob/user)
if(!beaker || buckled_mob || !user.check_dexterity(DEXTERITY_HOLD_ITEM, TRUE))
diff --git a/code/game/objects/structures/stool_bed_chair_nest_sofa/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest_sofa/chairs.dm
index 5beb7c1b697..93979252fa1 100644
--- a/code/game/objects/structures/stool_bed_chair_nest_sofa/chairs.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest_sofa/chairs.dm
@@ -304,10 +304,8 @@
color = WOOD_COLOR_GENERIC
material = /decl/material/solid/organic/wood
-/obj/structure/bed/chair/wood/attackby(obj/item/W, mob/user)
- if(istype(W,/obj/item/stack) || IS_WIRECUTTER(W))
- return
- ..()
+/obj/structure/bed/chair/wood/can_apply_padding()
+ return FALSE
/obj/structure/bed/chair/wood/mahogany
color = WOOD_COLOR_RICH
diff --git a/code/game/objects/structures/stool_bed_chair_nest_sofa/rustic_chairs.dm b/code/game/objects/structures/stool_bed_chair_nest_sofa/rustic_chairs.dm
new file mode 100644
index 00000000000..b36f4fae215
--- /dev/null
+++ b/code/game/objects/structures/stool_bed_chair_nest_sofa/rustic_chairs.dm
@@ -0,0 +1,27 @@
+/obj/structure/bed/chair/rustic
+ desc = "A simple, rustic-looking chair. Looks like it'd hurt to sit on for too long..."
+ icon = 'icons/obj/structures/rustic_chair.dmi'
+ material = /decl/material/solid/organic/wood/walnut
+ color = /decl/material/solid/organic/wood/walnut::color
+ user_comfort = -0.5
+
+/obj/structure/bed/chair/rustic/update_material_name(override_name)
+ . = ..()
+ SetName("rustic [name]") // rustic oaken chair, not oaken rustic chair
+
+/obj/structure/bed/chair/rustic_fancy
+ name = "chair"
+ desc = "An ornate, detailed chair made from wood. It has armrests!"
+ icon = 'icons/obj/structures/fancy_rustic_chair.dmi'
+ material = /decl/material/solid/organic/wood
+ color = COLOR_WHITE // preview state is precolored
+ reinf_material = /decl/material/solid/organic/cloth
+ padding_color = COLOR_CHERRY_RED
+ user_comfort = 1.25
+
+/obj/structure/bed/chair/rustic_fancy/ebony
+ material = /decl/material/solid/organic/wood/ebony
+
+/obj/structure/bed/chair/rustic_fancy/update_material_name(override_name)
+ . = ..()
+ SetName("fancy [name]") // see above, 'fancy ebony chair' not 'ebony fancy chair'
\ No newline at end of file
diff --git a/code/game/objects/structures/stool_bed_chair_nest_sofa/stools.dm b/code/game/objects/structures/stool_bed_chair_nest_sofa/stools.dm
index dfa2b41a411..59ccd454a5d 100644
--- a/code/game/objects/structures/stool_bed_chair_nest_sofa/stools.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest_sofa/stools.dm
@@ -1,16 +1,15 @@
//Todo: add leather and cloth for arbitrary coloured stools.
/obj/item/stool
- name = "stool"
- desc = "Apply butt."
- icon = 'icons/obj/furniture.dmi'
- icon_state = "stool_preview" //set for the map
- item_state = "stool"
- randpixel = 0
- w_class = ITEM_SIZE_HUGE
- material = DEFAULT_FURNITURE_MATERIAL
- obj_flags = OBJ_FLAG_SUPPORT_MOB | OBJ_FLAG_ROTATABLE
- _base_attack_force = 10
- var/base_icon = "stool"
+ name = "stool"
+ desc = "Apply butt."
+ icon = 'icons/obj/stool.dmi'
+ icon_state = ICON_STATE_WORLD
+ randpixel = 0
+ w_class = ITEM_SIZE_HUGE
+ material = DEFAULT_FURNITURE_MATERIAL
+ material_alteration = MAT_FLAG_ALTERATION_NAME | MAT_FLAG_ALTERATION_COLOR
+ obj_flags = OBJ_FLAG_SUPPORT_MOB | OBJ_FLAG_ROTATABLE
+ _base_attack_force = 10
var/padding_color
var/decl/material/padding_material
@@ -29,32 +28,38 @@
/obj/item/stool/bar
name = "bar stool"
- icon_state = "bar_stool_preview" //set for the map
- item_state = "bar_stool"
- base_icon = "bar_stool"
+ icon = 'icons/obj/bar_stool.dmi'
/obj/item/stool/bar/padded
icon_state = "bar_stool_padded_preview"
padding_material = /decl/material/solid/organic/cloth
padding_color = "#9d2300"
+/obj/item/stool/update_name()
+ ..()
+ if(material_alteration & MAT_FLAG_ALTERATION_NAME)
+ SetName("[padding_material?.adjective_name || material.adjective_name] [base_name || initial(name)]")
+ update_desc()
+
+/obj/item/stool/proc/update_desc()
+ if(padding_material)
+ desc = "A padded stool. Apply butt. It's made of [material.use_name] and covered with [padding_material.use_name]."
+ else
+ desc = "A stool. Apply butt with care. It's made of [material.use_name]."
+
/obj/item/stool/on_update_icon()
. = ..()
- // Prep icon.
- icon_state = ""
- // Base icon.
- var/list/noverlays = list(overlay_image(icon, "[base_icon]_base", get_color(), RESET_COLOR|RESET_ALPHA))
- // Padding overlay.
+ icon_state = get_world_inventory_state()
if(padding_material)
- noverlays += overlay_image(icon, "[base_icon]_padding", padding_color || padding_material.color)
- set_overlays(noverlays)
+ add_overlay(overlay_image(icon, "[icon_state]-padding", padding_color || padding_material.color, RESET_COLOR|RESET_ALPHA))
// Strings.
+ update_name()
+ update_desc()
+
+/obj/item/stool/apply_additional_mob_overlays(mob/living/user_mob, bodytype, image/overlay, slot, bodypart, use_fallback_if_icon_missing)
+ . = ..()
if(padding_material)
- SetName("[padding_material.solid_name] [initial(name)]") //this is not perfect but it will do for now.
- desc = "A padded stool. Apply butt. It's made of [material.use_name] and covered with [padding_material.use_name]."
- else
- SetName("[material.solid_name] [initial(name)]")
- desc = "A stool. Apply butt with care. It's made of [material.use_name]."
+ overlay.add_overlay(overlay_image(icon, "[overlay.icon_state]-padding", padding_color || padding_material.color, RESET_COLOR|RESET_ALPHA))
/obj/item/stool/proc/add_padding(var/padding_type, var/new_padding_color)
padding_material = GET_DECL(padding_type)
@@ -97,52 +102,75 @@
padding_material.create_object(get_turf(src))
qdel(src)
+/// Return TRUE if the stool is capable of supporting padding.
+/// This should not check existing padding state, just whether
+/// the behavior is supported at all.
+/obj/item/stool/proc/can_be_padded()
+ return TRUE
+
/obj/item/stool/attackby(obj/item/W, mob/user)
if(IS_WRENCH(W))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
dismantle()
- qdel(src)
- else if(istype(W,/obj/item/stack))
- if(padding_material)
- to_chat(user, "\The [src] is already padded.")
- return
- var/obj/item/stack/C = W
- if(C.get_amount() < 1) // How??
- qdel(C)
- return
-
- var/padding_type
- var/new_padding_color
- if(istype(W, /obj/item/stack/tile) || istype(W, /obj/item/stack/material/bolt))
- padding_type = W.material?.type
- new_padding_color = W.paint_color
-
- if(padding_type)
- var/decl/material/padding_mat = GET_DECL(padding_type)
- if(!istype(padding_mat) || !(padding_mat.flags & MAT_FLAG_PADDING))
- padding_type = null
-
- if(!padding_type)
- to_chat(user, "You cannot pad \the [src] with that.")
- return
-
- C.use(1)
- if(!isturf(src.loc))
- user.drop_from_inventory(src)
- src.dropInto(loc)
- to_chat(user, "You add padding to \the [src].")
- add_padding(padding_type, new_padding_color)
- return
-
- else if(IS_WIRECUTTER(W))
- if(!padding_material)
- to_chat(user, "\The [src] has no padding to remove.")
- return
- to_chat(user, "You remove the padding from \the [src].")
- playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
- remove_padding()
- else
- ..()
+ return TRUE
+ else if(can_be_padded())
+ if(istype(W,/obj/item/stack))
+ if(padding_material)
+ to_chat(user, "\The [src] is already padded.")
+ return TRUE
+ var/obj/item/stack/C = W
+ if(C.get_amount() < 1) // How??
+ qdel(C)
+ return TRUE
+
+ var/padding_type
+ var/new_padding_color
+ if(istype(W, /obj/item/stack/tile) || istype(W, /obj/item/stack/material/bolt))
+ padding_type = W.material?.type
+ new_padding_color = W.paint_color
+
+ if(padding_type)
+ var/decl/material/padding_mat = GET_DECL(padding_type)
+ if(!istype(padding_mat) || !(padding_mat.flags & MAT_FLAG_PADDING))
+ padding_type = null
+
+ if(!padding_type)
+ to_chat(user, "You cannot pad \the [src] with that.")
+ return TRUE
+
+ C.use(1)
+ if(!isturf(src.loc))
+ user.drop_from_inventory(src)
+ src.dropInto(loc)
+ to_chat(user, "You add padding to \the [src].")
+ add_padding(padding_type, new_padding_color)
+ return TRUE
+
+ else if(IS_WIRECUTTER(W))
+ if(!padding_material)
+ to_chat(user, "\The [src] has no padding to remove.")
+ return TRUE
+ to_chat(user, "You remove the padding from \the [src].")
+ playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
+ remove_padding()
+ return TRUE
+ return ..()
+
+/obj/item/stool/rustic
+ name = "stool"
+ icon = 'icons/obj/stool_rustic.dmi'
+ material = /decl/material/solid/organic/wood/walnut
+ color = /decl/material/solid/organic/wood/walnut::color
+
+/obj/item/stool/rustic/update_name()
+ ..()
+ SetName("rustic [name]") // rustic oaken stool, not oaken rustic stool
+
+/obj/item/stool/rustic/can_be_padded()
+ return FALSE
+
+/obj/item/stool/rustic/update_desc()
+ desc = "A rustic stool carved from wood. It's a little rickety and wobbles under any weight, but it'll do."
//Generated subtypes for mapping porpoises
/obj/item/stool/wood
diff --git a/code/game/objects/structures/stool_bed_chair_nest_sofa/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest_sofa/wheelchair.dm
index 9fcd778de35..caa3e14df93 100644
--- a/code/game/objects/structures/stool_bed_chair_nest_sofa/wheelchair.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest_sofa/wheelchair.dm
@@ -9,6 +9,7 @@
/datum/movement_handler/delay = list(5),
/datum/movement_handler/move_relay_self
)
+ tool_interaction_flags = 0
var/item_form_type = /obj/item/wheelchair_kit
var/bloodiness
@@ -22,10 +23,8 @@
/obj/structure/bed/chair/wheelchair/on_update_icon()
set_overlays(image(icon = 'icons/obj/furniture.dmi', icon_state = "w_overlay", layer = ABOVE_HUMAN_LAYER))
-/obj/structure/bed/chair/wheelchair/attackby(obj/item/W, mob/user)
- if(IS_WRENCH(W) || istype(W,/obj/item/stack) || IS_WIRECUTTER(W))
- return
- ..()
+/obj/structure/bed/chair/wheelchair/can_apply_padding()
+ return FALSE
/obj/structure/bed/chair/wheelchair/attack_hand(mob/user)
if(!user.check_dexterity(DEXTERITY_SIMPLE_MACHINES, TRUE))
diff --git a/code/game/objects/structures/tables.dm b/code/game/objects/structures/tables.dm
index a2194715605..c66281e59f2 100644
--- a/code/game/objects/structures/tables.dm
+++ b/code/game/objects/structures/tables.dm
@@ -270,11 +270,11 @@
/obj/structure/table/update_material_name(override_name)
if(reinf_material)
- name = "[reinf_material.solid_name] table"
+ SetName("[reinf_material.adjective_name] table")
else if(material)
- name = "[material.solid_name] table frame"
+ SetName("[material.adjective_name] table frame")
else
- name = "table frame"
+ SetName("table frame")
/obj/structure/table/update_material_desc(override_desc)
desc = initial(desc)
@@ -296,6 +296,9 @@
alpha = 255
..()
+ if(!handle_generic_blending)
+ return
+
icon_state = "blank"
if(!is_flipped)
mob_offset = initial(mob_offset)
@@ -547,6 +550,8 @@
L.Add(turn(src.dir,90))
for(var/new_dir in L)
var/obj/structure/table/T = locate() in get_step(src.loc,new_dir)
+ if(L == src) // multitile objeeeects!
+ continue
if(blend_with(T) && T.is_flipped && T.dir == dir && !T.unflipping_check(new_dir))
return FALSE
return TRUE
@@ -772,3 +777,139 @@
/obj/structure/table/woodentable_reinforced/ebony/walnut
additional_reinf_material = /decl/material/solid/organic/wood/walnut
+
+// A table that doesn't smooth, intended for bedside tables or otherwise standalone tables.
+// TODO: make table legs use material and tabletop use reinf_material
+// theoretically, this could also be made to use the normal table icon system, unlike desks?
+/obj/structure/table/end
+ name = "end table"
+ icon = 'icons/obj/structures/endtable.dmi'
+ icon_state = "end_table_1"
+ handle_generic_blending = FALSE
+ color = /decl/material/solid/organic/wood/walnut::color
+ material = /decl/material/solid/organic/wood/walnut
+ reinf_material = /decl/material/solid/organic/wood/walnut
+ material_alteration = MAT_FLAG_ALTERATION_ALL
+ can_flip = FALSE
+
+/obj/structure/table/end/alt
+ icon_state = "end_table_2"
+
+/obj/structure/table/end/alt/ebony
+ color = /decl/material/solid/organic/wood/ebony::color
+ material = /decl/material/solid/organic/wood/ebony
+ reinf_material = /decl/material/solid/organic/wood/ebony
+
+/obj/structure/table/end/Initialize()
+ . = ..()
+ // we don't do frames or anything, just skip right to decon
+ tool_interaction_flags |= TOOL_INTERACTION_DECONSTRUCT
+
+/obj/structure/table/end/reinforce_table(obj/item/stack/material/S, mob/user)
+ return FALSE
+
+/obj/structure/table/end/finish_table(obj/item/stack/material/S, mob/user)
+ return FALSE
+
+/obj/structure/table/end/handle_default_screwdriver_attackby(mob/user, obj/item/screwdriver)
+ return FALSE
+
+/obj/structure/table/end/update_material_name(override_name)
+ SetName("[reinf_material.adjective_name] end table")
+
+/obj/structure/table/desk
+ name = "desk"
+ icon_state = "desk_left"
+ icon = 'icons/obj/structures/desk_large.dmi'
+ handle_generic_blending = FALSE
+ color = /decl/material/solid/organic/wood/walnut::color
+ material = /decl/material/solid/organic/wood/walnut
+ reinf_material = /decl/material/solid/organic/wood/walnut
+ storage = /datum/storage/structure/desk
+ bound_width = 64
+ material_alteration = MAT_FLAG_ALTERATION_ALL
+ can_flip = FALSE
+ top_surface_noun = "desktop"
+ /// The pixel height at which point clicks start registering for the tabletop and not the drawers.
+ var/tabletop_height = 9
+
+/obj/structure/table/desk/Initialize()
+ . = ..()
+ // we don't do frames or anything, just skip right to decon
+ tool_interaction_flags |= TOOL_INTERACTION_DECONSTRUCT
+
+/obj/structure/table/desk/right
+ icon_state = "desk_right"
+
+/obj/structure/table/desk/ebony
+ color = /decl/material/solid/organic/wood/ebony::color
+ material = /decl/material/solid/organic/wood/ebony
+ reinf_material = /decl/material/solid/organic/wood/ebony
+
+/obj/structure/table/desk/ebony/right
+ icon_state = "desk_right"
+
+/obj/structure/table/desk/update_material_name(override_name)
+ SetName("[reinf_material.adjective_name] desk")
+
+/obj/structure/table/desk/reinforce_table(obj/item/stack/material/S, mob/user)
+ return FALSE
+
+/obj/structure/table/desk/finish_table(obj/item/stack/material/S, mob/user)
+ return FALSE
+
+/obj/structure/table/desk/handle_default_screwdriver_attackby(mob/user, obj/item/screwdriver)
+ return FALSE
+
+/obj/structure/table/desk/on_update_icon()
+ . = ..()
+ if(storage)
+ if(storage.opened)
+ icon_state = "[initial(icon_state)]_open"
+ else
+ icon_state = initial(icon_state)
+
+/datum/storage/structure/desk
+ use_sound = null
+ open_sound = 'sound/foley/drawer-open.ogg'
+ close_sound = 'sound/foley/drawer-close.ogg'
+ max_storage_space = DEFAULT_BOX_STORAGE * 2 // two drawers!
+
+/datum/storage/structure/desk/can_be_inserted(obj/item/prop, mob/user, stop_messages = 0, click_params = null)
+ var/list/params = params2list(click_params)
+ var/obj/structure/table/desk/desk = holder
+ if(LAZYLEN(params) && text2num(params["icon-y"]) > desk.tabletop_height)
+ return FALSE // don't insert when clicking the tabletop
+ return ..()
+
+/datum/storage/structure/desk/play_open_sound()
+ . = ..()
+ flick("[initial(holder.icon_state)]_opening", holder)
+
+/datum/storage/structure/desk/play_close_sound()
+ . = ..()
+ flick("[initial(holder.icon_state)]_closing", holder)
+
+/obj/structure/table/desk/storage_inserted()
+ if(storage && !storage.opened)
+ playsound(src, 'sound/foley/drawer-oneshot.ogg', 50, FALSE, -5)
+ flick("[initial(icon_state)]_oneoff", src)
+
+/obj/structure/table/desk/dresser
+ icon = 'icons/obj/structures/dresser.dmi'
+ icon_state = "dresser"
+ bound_width = 32
+ top_surface_noun = "surface"
+ tabletop_height = 15
+ mob_offset = 18
+
+/obj/structure/table/desk/dresser/update_material_name(override_name)
+ SetName("[reinf_material.adjective_name] dresser")
+
+/obj/structure/table/desk/dresser/ebony
+ color = /decl/material/solid/organic/wood/ebony::color
+ material = /decl/material/solid/organic/wood/ebony
+ reinf_material = /decl/material/solid/organic/wood/ebony
+
+/datum/storage/structure/desk/dresser
+ max_storage_space = DEFAULT_BOX_STORAGE * 3 // THREE drawers!
\ No newline at end of file
diff --git a/code/game/objects/structures/target_stake.dm b/code/game/objects/structures/target_stake.dm
index 07d1f16441a..d1e4d36df79 100644
--- a/code/game/objects/structures/target_stake.dm
+++ b/code/game/objects/structures/target_stake.dm
@@ -12,6 +12,8 @@
if (!pinned_target && istype(W, /obj/item/target) && user.try_unequip(W, get_turf(src)))
to_chat(user, "You slide [W] into the stake.")
set_target(W)
+ return TRUE
+ return ..()
/obj/structure/target_stake/attack_hand(var/mob/user)
if (!pinned_target || !user.check_dexterity(DEXTERITY_HOLD_ITEM, TRUE))
diff --git a/code/game/objects/structures/under_wardrobe.dm b/code/game/objects/structures/under_wardrobe.dm
index 2a4e6fa7253..db853713b21 100644
--- a/code/game/objects/structures/under_wardrobe.dm
+++ b/code/game/objects/structures/under_wardrobe.dm
@@ -8,12 +8,14 @@
density = TRUE
var/static/list/amount_of_underwear_by_id_card
-/obj/structure/undies_wardrobe/attackby(var/obj/item/underwear/underwear, var/mob/user)
- if(istype(underwear))
+/obj/structure/undies_wardrobe/attackby(var/obj/item/item, var/mob/user)
+ if(istype(item, /obj/item/underwear))
+ var/obj/item/underwear/underwear = item
if(!user.try_unequip(underwear))
- return
+ return TRUE
qdel(underwear)
- user.visible_message("\The [user] inserts \their [underwear.name] into \the [src].", "You insert your [underwear.name] into \the [src].")
+ var/decl/pronouns/user_pronouns = user.get_pronouns()
+ user.visible_message("\The [user] inserts [user_pronouns.his] [underwear.name] into \the [src].", "You insert your [underwear.name] into \the [src].")
var/id = user.GetIdCard()
var/message
@@ -30,9 +32,9 @@
events_repository.register(/decl/observ/destroyed, id, src, TYPE_PROC_REF(/obj/structure/undies_wardrobe, remove_id_card))
else
remove_id_card(id)
-
+ return TRUE
else
- ..()
+ return ..()
/obj/structure/undies_wardrobe/proc/remove_id_card(var/id_card)
LAZYREMOVE(amount_of_underwear_by_id_card, id_card)
diff --git a/code/game/objects/structures/wall_sconce.dm b/code/game/objects/structures/wall_sconce.dm
index 8339a0d3b6c..c66f3e453fd 100644
--- a/code/game/objects/structures/wall_sconce.dm
+++ b/code/game/objects/structures/wall_sconce.dm
@@ -30,6 +30,7 @@
w_class = ITEM_SIZE_LARGE
directional_offset = @'{"NORTH":{"y":24}, "SOUTH":{"y":-1}, "EAST":{"x":10,"y":10}, "WEST":{"x":-10,"y":10}}'
layer = ABOVE_HUMAN_LAYER
+ anchored = TRUE
/// Reference to the currently attached item.
var/obj/item/flame/light_source
/// Whether or not the light source, if present, is automatically lit on Initialize.
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 4d9e2bd2e9c..454e6e9b6b5 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -48,7 +48,7 @@ var/global/list/hygiene_props = list()
clogged--
if(clogged <= 0)
unclog()
- return
+ return TRUE
. = ..()
/obj/structure/hygiene/examine(mob/user)
@@ -182,20 +182,20 @@ var/global/list/hygiene_props = list()
"You hear grinding porcelain.")
cistern = !cistern
update_icon()
- return
+ return TRUE
if(cistern && !isrobot(user)) //STOP PUTTING YOUR MODULES IN THE TOILET.
if(I.w_class > ITEM_SIZE_NORMAL)
to_chat(user, SPAN_WARNING("\The [I] does not fit."))
- return
+ return TRUE
if(w_items + I.w_class > ITEM_SIZE_HUGE)
to_chat(user, SPAN_WARNING("The cistern is full."))
- return
+ return TRUE
if(!user.try_unequip(I, src))
- return
+ return TRUE
w_items += I.w_class
to_chat(user, SPAN_NOTICE("You carefully place \the [I] into the cistern."))
- return
+ return TRUE
. = ..()
@@ -286,7 +286,7 @@ var/global/list/hygiene_props = list()
/obj/structure/hygiene/shower/attackby(obj/item/I, var/mob/user)
if(istype(I, /obj/item/scanner/gas))
to_chat(user, SPAN_NOTICE("The water temperature seems to be [watertemp]."))
- return
+ return TRUE
if(IS_WRENCH(I))
var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
@@ -394,7 +394,7 @@ var/global/list/hygiene_props = list()
if(busy)
to_chat(user, SPAN_WARNING("Someone's already washing here."))
- return
+ return TRUE
var/obj/item/chems/chem_container = hit_with
if (istype(chem_container) && ATOM_IS_OPEN_CONTAINER(chem_container) && chem_container.reagents)
@@ -426,14 +426,14 @@ var/global/list/hygiene_props = list()
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
else
to_chat(user, SPAN_WARNING("\The [hit_with] is saturated."))
- return
+ return TRUE
var/turf/location = user.loc
if(!isturf(location))
- return
+ return FALSE
if(!istype(hit_with))
- return
+ return FALSE
to_chat(usr, SPAN_NOTICE("You start washing \the [hit_with]."))
playsound(loc, 'sound/effects/sink_long.ogg', 75, 1)
@@ -451,6 +451,7 @@ var/global/list/hygiene_props = list()
user.visible_message( \
SPAN_NOTICE("\The [user] washes \a [hit_with] using \the [src]."),
SPAN_NOTICE("You wash \a [hit_with] using \the [src]."))
+ return TRUE
/obj/structure/hygiene/sink/kitchen
@@ -470,7 +471,7 @@ var/global/list/hygiene_props = list()
/obj/structure/hygiene/sink/puddle/attackby(obj/item/O, var/mob/user)
icon_state = "puddle-splash"
- ..()
+ . = ..()
icon_state = "puddle"
//toilet paper interaction for clogging toilets and other facilities
@@ -480,18 +481,19 @@ var/global/list/hygiene_props = list()
return ..()
if (clogged == -1)
to_chat(user, SPAN_WARNING("Try as you might, you can not clog \the [src] with \the [I]."))
- return
+ return TRUE
if (clogged)
to_chat(user, SPAN_WARNING("\The [src] is already clogged."))
- return
+ return TRUE
if (!do_after(user, 3 SECONDS, src))
to_chat(user, SPAN_WARNING("You must stay still to clog \the [src]."))
- return
+ return TRUE
if (clogged || QDELETED(I) || !user.try_unequip(I))
- return
+ return TRUE
to_chat(user, SPAN_NOTICE("You unceremoniously jam \the [src] with \the [I]. What a rebel."))
clog(1)
qdel(I)
+ return TRUE
////////////////////////////////////////////////////
// Toilet Paper Roll
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 751cac70ac9..4ad6358add5 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -150,8 +150,7 @@
if (ishuman(user))
var/mob/living/human/H = user
if(H.species.can_shred(H))
- attack_generic(H,25)
- return
+ return attack_generic(H,25)
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
user.do_attack_animation(src)
@@ -596,7 +595,7 @@
return TRUE
/obj/structure/window/reinforced/crescent/attackby()
- return
+ return TRUE
/obj/structure/window/reinforced/crescent/explosion_act()
SHOULD_CALL_PARENT(FALSE)
diff --git a/code/game/turfs/flooring/_flooring.dm b/code/game/turfs/flooring/_flooring.dm
index 1ff678dddc3..981d5aa6b81 100644
--- a/code/game/turfs/flooring/_flooring.dm
+++ b/code/game/turfs/flooring/_flooring.dm
@@ -80,6 +80,9 @@ var/global/list/flooring_cache = list()
var/holographic = FALSE
var/dirt_color = "#7c5e42"
+ var/list/burned_states
+ var/list/broken_states
+
/decl/flooring/Initialize()
. = ..()
@@ -135,6 +138,14 @@ var/global/list/flooring_cache = list()
if(icon && icon_base)
+ for(var/check_state in broken_states)
+ if(!check_state_in_icon(check_state, icon))
+ . += "missing broken state '[check_state]' in '[icon]'"
+
+ for(var/check_state in burned_states)
+ if(!check_state_in_icon(check_state, icon))
+ . += "missing burned state '[check_state]' in '[icon]'"
+
if(!check_state_in_icon("trench", icon))
. += "no trench wall state"
@@ -179,7 +190,7 @@ var/global/list/flooring_cache = list()
if(color)
target.color = color
- else
+ else if(!can_paint || isnull(target.paint_color))
var/decl/material/use_material = target.get_material()
target.color = use_material?.color
@@ -218,6 +229,20 @@ var/global/list/flooring_cache = list()
if(length(edge_overlays))
target.add_overlay(edge_overlays)
+ if(target.is_floor_broken())
+ target.add_overlay(get_damage_overlay(target._floor_broken))
+ if(target.is_floor_burned())
+ target.add_overlay(get_damage_overlay(target._floor_burned))
+
+/decl/flooring/proc/get_damage_overlay(var/overlay_state)
+ var/cache_key = "[icon]-[overlay_state]"
+ if(!global.flooring_cache[cache_key])
+ var/image/I = image(icon = icon, icon_state = overlay_state)
+ I.blend_mode = BLEND_MULTIPLY
+ I.layer = DECAL_LAYER
+ global.flooring_cache[cache_key] = I
+ return global.flooring_cache[cache_key]
+
/decl/flooring/proc/get_flooring_overlay(var/cache_key, var/icon_base, var/icon_dir = 0, var/external = FALSE, var/edge_layer)
cache_key = "[cache_key]-[edge_layer]"
if(!global.flooring_cache[cache_key])
diff --git a/code/game/turfs/flooring/flooring_carpet.dm b/code/game/turfs/flooring/flooring_carpet.dm
index cf919bd5e10..8c7be4c850f 100644
--- a/code/game/turfs/flooring/flooring_carpet.dm
+++ b/code/game/turfs/flooring/flooring_carpet.dm
@@ -6,11 +6,22 @@
icon_edge_layer = FLOOR_EDGE_CARPET
build_type = /obj/item/stack/tile/carpet
damage_temperature = T0C+200
- flooring_flags = TURF_REMOVE_CROWBAR | TURF_CAN_BURN
+ flooring_flags = TURF_REMOVE_CROWBAR
can_engrave = FALSE
footstep_type = /decl/footsteps/carpet
force_material = /decl/material/solid/organic/cloth
constructed = TRUE
+ burned_states = list(
+ "burned0",
+ "burned1"
+ )
+ broken_states = list(
+ "broken0",
+ "broken1",
+ "broken2",
+ "broken3",
+ "broken4"
+ )
/decl/flooring/carpet/blue
name = "blue carpet"
@@ -50,4 +61,15 @@
/decl/flooring/carpet/red
name = "red carpet"
icon_base = "red"
- build_type = /obj/item/stack/tile/carpet/red
\ No newline at end of file
+ build_type = /obj/item/stack/tile/carpet/red
+
+/decl/flooring/carpet/rustic
+ name = "rustic carpet"
+ desc = "A stretch of simple woven carpet. Cozy, but a little itchy."
+ icon = 'icons/turf/flooring/simple_carpet.dmi'
+ icon_base = "carpet"
+ build_type = /obj/item/stack/tile/carpet/rustic
+ can_paint = TRUE
+ color = null
+ broken_states = null
+ burned_states = null
diff --git a/code/game/turfs/flooring/flooring_misc.dm b/code/game/turfs/flooring/flooring_misc.dm
index 48598df7f40..eaed5e06b52 100644
--- a/code/game/turfs/flooring/flooring_misc.dm
+++ b/code/game/turfs/flooring/flooring_misc.dm
@@ -16,7 +16,7 @@
icon = 'icons/turf/flooring/crystal.dmi'
icon_base = "crystal"
build_type = null
- flooring_flags = TURF_ACID_IMMUNE | TURF_CAN_BREAK | TURF_REMOVE_CROWBAR
+ flooring_flags = TURF_ACID_IMMUNE | TURF_REMOVE_CROWBAR
color = "#00ffe1"
force_material = /decl/material/solid/gemstone/crystal
constructed = TRUE
diff --git a/code/game/turfs/flooring/flooring_plating.dm b/code/game/turfs/flooring/flooring_plating.dm
index f708ff94f77..505bad7a3ed 100644
--- a/code/game/turfs/flooring/flooring_plating.dm
+++ b/code/game/turfs/flooring/flooring_plating.dm
@@ -6,3 +6,14 @@
floor_layer = PLATING_LAYER
force_material = /decl/material/solid/metal/steel
constructed = TRUE
+ burned_states = list(
+ "burned0",
+ "burned1"
+ )
+ broken_states = list(
+ "broken0",
+ "broken1",
+ "broken2",
+ "broken3",
+ "broken4"
+ )
diff --git a/code/game/turfs/flooring/flooring_reinforced.dm b/code/game/turfs/flooring/flooring_reinforced.dm
index 826db236938..a926312bc8f 100644
--- a/code/game/turfs/flooring/flooring_reinforced.dm
+++ b/code/game/turfs/flooring/flooring_reinforced.dm
@@ -13,16 +13,27 @@
force_material = /decl/material/solid/metal/steel
constructed = TRUE
gender = NEUTER
+ burned_states = list(
+ "burned0",
+ "burned1"
+ )
+ broken_states = list(
+ "broken0",
+ "broken1",
+ "broken2",
+ "broken3",
+ "broken4"
+ )
/decl/flooring/reinforced/circuit
- name = "processing strata"
- desc = "A complex network of circuits beneath reinforced glass."
- icon = 'icons/turf/flooring/circuit.dmi'
- icon_base = "bcircuit"
- build_type = null
- flooring_flags = TURF_ACID_IMMUNE | TURF_CAN_BREAK | TURF_REMOVE_WRENCH
- can_paint = 1
- can_engrave = FALSE
+ name = "processing strata"
+ desc = "A complex network of circuits beneath reinforced glass."
+ icon = 'icons/turf/flooring/circuit.dmi'
+ icon_base = "bcircuit"
+ build_type = null
+ flooring_flags = TURF_ACID_IMMUNE | TURF_REMOVE_WRENCH
+ can_paint = 1
+ can_engrave = FALSE
turf_light_range = 2
turf_light_power = 3
turf_light_color = COLOR_BLUE
@@ -43,7 +54,7 @@
desc = "A stretch of plastic shuttle flooring."
icon = 'icons/turf/flooring/shuttle.dmi'
build_type = null
- flooring_flags = TURF_ACID_IMMUNE | TURF_CAN_BREAK | TURF_REMOVE_CROWBAR
+ flooring_flags = TURF_ACID_IMMUNE | TURF_REMOVE_CROWBAR
can_paint = 1
can_engrave = FALSE
gender = NEUTER
diff --git a/code/game/turfs/flooring/flooring_tiled.dm b/code/game/turfs/flooring/flooring_tiled.dm
index 3f826561b8b..96c1fb9c5e9 100644
--- a/code/game/turfs/flooring/flooring_tiled.dm
+++ b/code/game/turfs/flooring/flooring_tiled.dm
@@ -6,7 +6,7 @@
descriptor = "tiles"
color = COLOR_DARK_GUNMETAL
damage_temperature = T0C+1400
- flooring_flags = TURF_REMOVE_CROWBAR | TURF_CAN_BREAK | TURF_CAN_BURN
+ flooring_flags = TURF_REMOVE_CROWBAR
build_type = /obj/item/stack/tile/floor
can_paint = 1
footstep_type = /decl/footsteps/tiles
@@ -15,6 +15,17 @@
space_smooth = SMOOTH_ALL
constructed = TRUE
gender = NEUTER
+ burned_states = list(
+ "burned0",
+ "burned1"
+ )
+ broken_states = list(
+ "broken0",
+ "broken1",
+ "broken2",
+ "broken3",
+ "broken4"
+ )
/decl/flooring/tiling/mono
icon_base = "monotile"
diff --git a/code/game/turfs/flooring/flooring_wood.dm b/code/game/turfs/flooring/flooring_wood.dm
index a7f19021bfe..a9c136bfcb5 100644
--- a/code/game/turfs/flooring/flooring_wood.dm
+++ b/code/game/turfs/flooring/flooring_wood.dm
@@ -3,15 +3,25 @@
desc = "A stretch of closely-fitted wooden planks."
icon = 'icons/turf/flooring/wood.dmi'
icon_base = "wood"
+ has_base_range = 4
damage_temperature = T0C+200
descriptor = "planks"
build_type = /obj/item/stack/tile/wood
- flooring_flags = TURF_CAN_BREAK | TURF_IS_FRAGILE | TURF_REMOVE_SCREWDRIVER
+ flooring_flags = TURF_IS_FRAGILE | TURF_REMOVE_SCREWDRIVER
footstep_type = /decl/footsteps/wood
color = /decl/material/solid/organic/wood::color
force_material = /decl/material/solid/organic/wood
constructed = TRUE
gender = NEUTER
+ broken_states = list(
+ "broken0",
+ "broken1",
+ "broken2",
+ "broken3",
+ "broken4",
+ "broken5",
+ "broken6"
+ )
/decl/flooring/wood/mahogany
color = /decl/material/solid/organic/wood/mahogany::color
diff --git a/code/game/turfs/floors/_floor.dm b/code/game/turfs/floors/_floor.dm
index 42d143ab385..8a5562d03ad 100644
--- a/code/game/turfs/floors/_floor.dm
+++ b/code/game/turfs/floors/_floor.dm
@@ -149,7 +149,9 @@
CRASH("[src] at ([x], [y], [z]) cannot create stack because it has a bad build_material path: '[_flooring.build_material]'")
M.create_object(src, _flooring.build_cost, _flooring.build_type)
else
- new _flooring.build_type(src)
+ var/obj/item/stack/tile/new_tile = new _flooring.build_type(src)
+ if(_flooring.can_paint && paint_color)
+ new_tile.paint_color = paint_color
if(_flooring.has_environment_proc && is_processing)
STOP_PROCESSING(SSobj, src)
diff --git a/code/game/turfs/floors/floor_damage.dm b/code/game/turfs/floors/floor_damage.dm
index b312a1ab300..05e7630e0a1 100644
--- a/code/game/turfs/floors/floor_damage.dm
+++ b/code/game/turfs/floors/floor_damage.dm
@@ -5,14 +5,14 @@
/turf/floor/proc/break_tile()
var/decl/flooring/flooring = get_topmost_flooring()
- if(!istype(flooring) || !(flooring.flooring_flags & TURF_CAN_BREAK) || is_floor_broken())
+ if(!istype(flooring) || !length(flooring.broken_states) || is_floor_broken())
return
set_floor_broken(TRUE)
remove_decals()
/turf/floor/proc/burn_tile(var/exposed_temperature)
var/decl/flooring/flooring = get_topmost_flooring()
- if(!istype(flooring) || !(flooring.flooring_flags & TURF_CAN_BURN) || is_floor_burned())
+ if(!istype(flooring) || !length(flooring.burned_states) || is_floor_burned())
return
set_floor_burned(TRUE)
remove_decals()
diff --git a/code/game/turfs/floors/floor_icon.dm b/code/game/turfs/floors/floor_icon.dm
index 16b41e64ec8..5e060f35848 100644
--- a/code/game/turfs/floors/floor_icon.dm
+++ b/code/game/turfs/floors/floor_icon.dm
@@ -112,11 +112,6 @@
continue
add_overlay(I)
- if(is_floor_broken())
- add_overlay(get_turf_damage_overlay(_floor_broken))
- if(is_floor_burned())
- add_overlay(get_turf_damage_overlay(_floor_burned))
-
if(update_neighbors)
for(var/turf/floor/F in orange(src, 1))
F.queue_ao()
@@ -140,11 +135,11 @@
/turf/floor/proc/is_floor_broken()
var/decl/flooring/flooring = get_topmost_flooring()
- return !isnull(_floor_broken) && (!istype(flooring) || (flooring.flooring_flags & TURF_CAN_BREAK))
+ return !isnull(_floor_broken) && (!istype(flooring) || length(flooring.broken_states))
/turf/floor/proc/is_floor_burned()
var/decl/flooring/flooring = get_topmost_flooring()
- return !isnull(_floor_burned) && (!istype(flooring) || (flooring.flooring_flags & TURF_CAN_BURN))
+ return !isnull(_floor_burned) && (!istype(flooring) || length(flooring.burned_states))
/turf/floor/proc/is_floor_damaged()
return is_floor_broken() || is_floor_burned()
@@ -152,19 +147,10 @@
/turf/floor/proc/set_floor_broken(new_broken, skip_update)
var/decl/flooring/flooring = get_topmost_flooring()
- if(istype(flooring) && !(flooring.flooring_flags & TURF_CAN_BREAK))
+ if(!istype(flooring) || !length(flooring.broken_states))
return FALSE
-
- // Hardcoded because they're bundled into the same icon file at the moment.
- var/static/list/broken_states = list(
- "broken0",
- "broken1",
- "broken2",
- "broken3",
- "broken4"
- )
- if(new_broken && (!istext(new_broken) || !(new_broken in broken_states)))
- new_broken = "broken[rand(0,4)]"
+ if(new_broken && (!istext(new_broken) || !(new_broken in flooring.broken_states)))
+ new_broken = pick(flooring.broken_states)
if(_floor_broken != new_broken)
_floor_broken = new_broken
if(!skip_update)
@@ -175,16 +161,10 @@
/turf/floor/proc/set_floor_burned(new_burned, skip_update)
var/decl/flooring/flooring = get_topmost_flooring()
- if(istype(flooring) && !(flooring.flooring_flags & TURF_CAN_BURN))
+ if(!istype(flooring) || !length(flooring.burned_states))
return FALSE
-
- // Hardcoded because they're bundled into the same icon file at the moment.
- var/static/list/burned_states = list(
- "burned0",
- "burned1"
- )
- if(new_burned && (!istext(new_burned) || !(new_burned in burned_states)))
- new_burned = "burned[rand(0,1)]"
+ if(new_burned && (!istext(new_burned) || !(new_burned in flooring.burned_states)))
+ new_burned = pick(flooring.burned_states)
if(_floor_burned != new_burned)
_floor_burned = new_burned
if(!skip_update)
@@ -192,19 +172,6 @@
return TRUE
return FALSE
-/turf/proc/get_turf_damage_overlay_icon()
- return 'icons/turf/flooring/damage.dmi'
-
-/turf/proc/get_turf_damage_overlay(var/overlay_state)
- var/damage_overlay_icon = get_turf_damage_overlay_icon()
- var/cache_key = "[icon]-[overlay_state]"
- if(!global.flooring_cache[cache_key])
- var/image/I = image(icon = damage_overlay_icon, icon_state = overlay_state)
- I.blend_mode = BLEND_MULTIPLY
- I.layer = DECAL_LAYER
- global.flooring_cache[cache_key] = I
- return global.flooring_cache[cache_key]
-
/decl/flooring/proc/test_link(var/turf/origin, var/turf/opponent)
if(!istype(origin) || !istype(opponent))
return FALSE
diff --git a/code/game/turfs/floors/subtypes/floor_carpet.dm b/code/game/turfs/floors/subtypes/floor_carpet.dm
index 6911f3500e5..8292e7cbdc8 100644
--- a/code/game/turfs/floors/subtypes/floor_carpet.dm
+++ b/code/game/turfs/floors/subtypes/floor_carpet.dm
@@ -5,6 +5,15 @@
icon_state = "brown"
_flooring = /decl/flooring/carpet
+/turf/floor/carpet/broken
+ _floor_broken = TRUE
+
+/turf/floor/carpet/broken/Initialize()
+ . = ..()
+ var/setting_broken = _floor_broken
+ _floor_broken = null
+ set_floor_broken(setting_broken)
+
/turf/floor/carpet/blue
name = "blue carpet"
icon_state = "blue1"
@@ -44,3 +53,11 @@
name = "red carpet"
icon_state = "red"
_flooring = /decl/flooring/carpet/red
+
+/turf/floor/carpet/rustic
+ name = "rustic carpet"
+ icon = 'icons/turf/flooring/simple_carpet.dmi'
+ icon_state = "carpet"
+ _flooring = /decl/flooring/carpet/rustic
+ paint_color = COLOR_CHESTNUT
+ color = COLOR_CHESTNUT
\ No newline at end of file
diff --git a/code/game/turfs/floors/subtypes/floor_circuit.dm b/code/game/turfs/floors/subtypes/floor_circuit.dm
index 5d458a43d9a..f050f13a93e 100644
--- a/code/game/turfs/floors/subtypes/floor_circuit.dm
+++ b/code/game/turfs/floors/subtypes/floor_circuit.dm
@@ -9,6 +9,10 @@
initial_gas = null
temperature = TCMB
+/turf/floor/bluegrid/mainframe
+ name = "mainframe base" // TODO: force name overriding flooring?
+ temperature = 263
+
/turf/floor/greengrid
name = "mainframe floor"
icon = 'icons/turf/flooring/circuit.dmi'
diff --git a/code/game/turfs/floors/subtypes/floor_misc.dm b/code/game/turfs/floors/subtypes/floor_misc.dm
index 437b1cb3398..fbc7d2400e1 100644
--- a/code/game/turfs/floors/subtypes/floor_misc.dm
+++ b/code/game/turfs/floors/subtypes/floor_misc.dm
@@ -4,10 +4,6 @@
icon_state = "lino"
_flooring = /decl/flooring/linoleum
-/turf/floor/airless
- name = "airless plating"
- initial_gas = null
- temperature = TCMB
/turf/floor/crystal
name = "crystal floor"
@@ -56,3 +52,39 @@
// Defining this here as a dummy mapping shorthand so mappers can search for 'plating'.
/turf/floor/plating
+ _base_flooring = /decl/flooring/plating // Setting here so overrides on /turf/floor do not impact explicitly typed plating turfs.
+
+/turf/floor/plating/broken
+ _floor_broken = TRUE
+
+/turf/floor/plating/broken/Initialize(ml, floortype)
+ . = ..()
+ var/setting_broken = _floor_broken
+ _floor_broken = null
+ set_floor_broken(setting_broken)
+
+/turf/floor/plating/airless
+ name = "airless plating"
+ initial_gas = null
+ temperature = TCMB
+
+/turf/floor/plating/airless/broken
+ _floor_broken = TRUE
+
+/turf/floor/plating/airless/broken/Initialize(ml, floortype)
+ . = ..()
+ var/setting_broken = _floor_broken
+ _floor_broken = null
+ set_floor_broken(setting_broken)
+
+/turf/floor/plating/broken/one
+ _floor_broken = "broken1"
+
+/turf/floor/plating/broken/two
+ _floor_broken = "broken2"
+
+/turf/floor/plating/broken/three
+ _floor_broken = "broken3"
+
+/turf/floor/plating/broken/four
+ _floor_broken = "broken4"
diff --git a/code/game/turfs/floors/subtypes/floor_natural.dm b/code/game/turfs/floors/subtypes/floor_natural.dm
index 4b6b98437d5..4b2ddd092f9 100644
--- a/code/game/turfs/floors/subtypes/floor_natural.dm
+++ b/code/game/turfs/floors/subtypes/floor_natural.dm
@@ -11,13 +11,6 @@
color = "#41311b"
_base_flooring = /decl/flooring/dirt
-/turf/floor/wood/walnut
- name = "wooden floor"
- icon = 'icons/turf/flooring/wood.dmi'
- icon_state = "wood"
- color = /decl/material/solid/organic/wood/walnut::color
- _flooring = /decl/flooring/wood/walnut
-
/turf/floor/chlorine_sand
name = "chlorinated sand"
icon = 'icons/turf/flooring/chlorine_sand.dmi'
diff --git a/code/game/turfs/floors/subtypes/floor_static.dm b/code/game/turfs/floors/subtypes/floor_static.dm
index d55afe9df24..47cf104cd6a 100644
--- a/code/game/turfs/floors/subtypes/floor_static.dm
+++ b/code/game/turfs/floors/subtypes/floor_static.dm
@@ -11,7 +11,7 @@
/turf/floor/fixed/attackby(var/obj/item/C, var/mob/user)
if(istype(C, /obj/item/stack) && !IS_COIL(C))
- return
+ return TRUE
return ..()
/turf/floor/fixed/on_update_icon()
diff --git a/code/game/turfs/floors/subtypes/floor_tiled.dm b/code/game/turfs/floors/subtypes/floor_tiled.dm
index 2adff8faa9b..b92260c905e 100644
--- a/code/game/turfs/floors/subtypes/floor_tiled.dm
+++ b/code/game/turfs/floors/subtypes/floor_tiled.dm
@@ -15,6 +15,10 @@
icon_state = "monotiledark"
_flooring = /decl/flooring/tiling/mono/dark
+/turf/floor/tiled/dark/monotile/telecomms
+ name = "telecomms dark floor" // TODO: force name overriding flooring?
+ temperature = 263
+
/turf/floor/tiled/dark/airless
initial_gas = null
@@ -43,6 +47,10 @@
icon_state = "freezer"
_flooring = /decl/flooring/tiling/freezer
+/turf/floor/tiled/freezer/kitchen
+ name = "kitchen freezer floor" // TODO: force override of flooring name
+ temperature = 263
+
/turf/floor/tiled/techmaint
name = "floor"
icon = 'icons/turf/flooring/tiles.dmi'
@@ -104,3 +112,12 @@
name = "airless floor"
initial_gas = null
temperature = TCMB
+
+/turf/floor/tiled/airless/broken
+ _floor_broken = TRUE
+
+/turf/floor/tiled/airless/broken/Initialize()
+ . = ..()
+ var/setting_broken = _floor_broken
+ _floor_broken = null
+ set_floor_broken(setting_broken)
diff --git a/code/game/turfs/floors/subtypes/floor_wood.dm b/code/game/turfs/floors/subtypes/floor_wood.dm
index 89a834a2956..9ab163825a6 100644
--- a/code/game/turfs/floors/subtypes/floor_wood.dm
+++ b/code/game/turfs/floors/subtypes/floor_wood.dm
@@ -1,10 +1,36 @@
/turf/floor/wood
name = "wooden floor"
icon = 'icons/turf/flooring/wood.dmi'
- icon_state = "wood"
+ icon_state = "wood0"
color = /decl/material/solid/organic/wood::color
_flooring = /decl/flooring/wood
+/turf/floor/wood/broken
+ icon_state = "wood_broken0"
+ _floor_broken = TRUE
+
+/turf/floor/wood/broken/Initialize()
+ . = ..()
+ var/setting_broken = _floor_broken
+ _floor_broken = null
+ set_floor_broken(setting_broken)
+
+/turf/floor/wood/broken/one
+ icon_state = "wood_broken1"
+ _floor_broken = "broken1"
+
+/turf/floor/wood/broken/two
+ icon_state = "wood_broken2"
+ _floor_broken = "broken2"
+
+/turf/floor/wood/broken/three
+ icon_state = "wood_broken3"
+ _floor_broken = "broken3"
+
+/turf/floor/wood/broken/four
+ icon_state = "wood_broken4"
+ _floor_broken = "broken4"
+
/turf/floor/wood/mahogany
color = /decl/material/solid/organic/wood/mahogany::color
_flooring = /decl/flooring/wood/mahogany
diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm
index 65a78a72fcf..4dae8e23057 100644
--- a/code/game/turfs/space/space.dm
+++ b/code/game/turfs/space/space.dm
@@ -110,13 +110,14 @@
if(L)
var/obj/item/stack/tile/floor/S = C
if (!S.use(1))
- return
+ return TRUE
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
- ChangeTurf(/turf/floor/airless)
+ ChangeTurf(/turf/floor/plating/airless)
qdel(L)
else
to_chat(user, "The plating is going to need some support.")
return TRUE
+ return FALSE
// Ported from unstable r355
@@ -137,3 +138,6 @@
/turf/space/infinity
name = "\proper infinity"
icon_state = "bluespace"
+
+/turf/space/black
+ icon_state = "black"
diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm
index 7a4b0d889c1..9a6aff50393 100644
--- a/code/game/turfs/space/transit.dm
+++ b/code/game/turfs/space/transit.dm
@@ -3,7 +3,7 @@
//Overwrite because we dont want people building rods in space.
/turf/space/transit/attackby(obj/O, mob/user)
- return
+ return TRUE
/turf/space/transit/Initialize()
. = ..()
diff --git a/code/game/turfs/unsimulated/beach.dm b/code/game/turfs/unsimulated/beach.dm
deleted file mode 100644
index a55e53e0ed2..00000000000
--- a/code/game/turfs/unsimulated/beach.dm
+++ /dev/null
@@ -1,23 +0,0 @@
-/turf/unsimulated/beach
- name = "Beach"
- icon = 'icons/misc/beach.dmi'
- turf_flags = TURF_FLAG_BACKGROUND
- abstract_type = /turf/unsimulated/beach
-
-/turf/unsimulated/beach/sand
- name = "Sand"
- icon_state = "sand"
-
-/turf/unsimulated/beach/coastline
- name = "Coastline"
- icon = 'icons/misc/beach2.dmi'
- icon_state = "sandwater"
-
-/turf/unsimulated/beach/water
- name = "Water"
- icon_state = "water"
- turf_flags = TURF_FLAG_BACKGROUND | TURF_IS_WET | TURF_IS_HOLOMAP_PATH
-
-/turf/unsimulated/beach/water/New()
- ..()
- overlays += image("icon"='icons/misc/beach.dmi',"icon_state"="water2","layer"=MOB_LAYER+0.1)
diff --git a/code/game/turfs/unsimulated/floor.dm b/code/game/turfs/unsimulated/floor.dm
index 21f843cf699..449745e5e12 100644
--- a/code/game/turfs/unsimulated/floor.dm
+++ b/code/game/turfs/unsimulated/floor.dm
@@ -13,21 +13,6 @@
icon_state = "bluespace"
desc = "Looks like eternity."
-/turf/unsimulated/mask
- name = "mask"
- icon = 'icons/turf/walls.dmi'
- icon_state = "rockvault"
-
-/turf/unsimulated/mask_alt // just a second mask type for maps needing two random map runs
- name = "mask"
- icon = 'icons/turf/walls.dmi'
- icon_state = "rockvault"
- color = COLOR_SILVER
-
-/turf/unsimulated/mask/flooded
- flooded = /decl/material/liquid/water
- color = COLOR_LIQUID_WATER
-
/turf/unsimulated/floor/rescue_base
icon_state = "asteroidfloor"
@@ -49,3 +34,83 @@
name = "snowy plating"
icon = 'icons/turf/flooring/snow_plating.dmi'
icon_state = "snowplating"
+
+/turf/unsimulated/floor/wood
+ name = "wooden floor"
+ icon = 'icons/turf/flooring/wood.dmi'
+ icon_state = "wood0"
+
+/turf/unsimulated/floor/wood/broken
+ icon_state = "wood_broken0"
+
+/turf/unsimulated/floor/wood/broken1
+ icon_state = "wood_broken1"
+
+/turf/unsimulated/floor/wood/broken2
+ icon_state = "wood_broken2"
+
+/turf/unsimulated/floor/wood/broken6
+ icon_state = "wood_broken6"
+
+/turf/unsimulated/floor/vault
+ icon_state = "vault"
+
+/turf/unsimulated/floor/dark
+ icon_state = "dark"
+
+/turf/unsimulated/floor/freezer
+ icon_state = "freezerfloor"
+
+/turf/unsimulated/floor/plating
+ name = "plating"
+ icon_state = "plating"
+
+/turf/unsimulated/floor/asteroid
+ icon_state = "asteroid"
+
+/turf/unsimulated/floor/asteroidplating
+ icon_state = "asteroidplating"
+
+/turf/unsimulated/floor/cult
+ name = "plating"
+ icon_state = "cult"
+
+/turf/unsimulated/floor/water
+ name = "water"
+ icon = 'icons/misc/beach.dmi'
+ icon_state = "seashallow"
+
+/turf/unsimulated/floor/lava
+ icon_state = "lava"
+ name = "lava"
+
+/turf/unsimulated/floor/grass
+ name = "grass"
+ icon_state = "grass0"
+
+/turf/unsimulated/floor/steel
+ icon_state = "steel"
+
+/turf/unsimulated/floor/bcircuit
+ icon_state = "bcircuit"
+
+/turf/unsimulated/floor/hydro
+ icon_state = "hydrofloor"
+
+/turf/unsimulated/floor/white
+ icon_state = "white"
+
+/turf/unsimulated/floor/carpet
+ name = "carpet"
+ icon_state = "carpet"
+
+/turf/unsimulated/floor/bcarpet
+ icon_state = "bcarpet"
+
+/turf/unsimulated/floor/sand
+ name = "sand"
+ icon = 'icons/turf/flooring/sand.dmi'
+ icon_state = "sand0"
+
+/turf/unsimulated/floor/lino
+ icon_state = "lino"
diff --git a/code/game/turfs/unsimulated/mask.dm b/code/game/turfs/unsimulated/mask.dm
new file mode 100644
index 00000000000..1b82356696e
--- /dev/null
+++ b/code/game/turfs/unsimulated/mask.dm
@@ -0,0 +1,14 @@
+/turf/unsimulated/mask
+ name = "mask"
+ icon = 'icons/turf/walls.dmi'
+ icon_state = "rockvault"
+
+/turf/unsimulated/mask_alt // just a second mask type for maps needing two random map runs
+ name = "mask"
+ icon = 'icons/turf/walls.dmi'
+ icon_state = "rockvault"
+ color = COLOR_SILVER
+
+/turf/unsimulated/mask/flooded
+ flooded = /decl/material/liquid/water
+ color = COLOR_LIQUID_WATER
diff --git a/code/game/turfs/unsimulated/walls.dm b/code/game/turfs/unsimulated/walls.dm
index 2ad278be533..24193a5e805 100644
--- a/code/game/turfs/unsimulated/walls.dm
+++ b/code/game/turfs/unsimulated/walls.dm
@@ -11,6 +11,9 @@
icon_state = "fakewindows"
opacity = FALSE
+/turf/unsimulated/wall/fakeglass/alt
+ icon_state = "fakewindows2"
+
/turf/unsimulated/wall/other
icon_state = "r_wall"
@@ -19,3 +22,9 @@
desc = "Hideous images dance beneath the surface."
icon = 'icons/turf/walls/cult.dmi'
icon_state = "preview"
+
+/turf/unsimulated/wall/airlock
+ name = "Facility Access"
+ desc = "A secure airlock. Doesn't look like you can get through easily."
+ icon = 'icons/obj/doors/centcomm/door.dmi'
+ icon_state = "closed"
diff --git a/code/game/turfs/walls/_wall.dm b/code/game/turfs/walls/_wall.dm
index f85c812bf9e..084fb135e17 100644
--- a/code/game/turfs/walls/_wall.dm
+++ b/code/game/turfs/walls/_wall.dm
@@ -324,3 +324,7 @@ var/global/list/wall_fullblend_objects = list(
/turf/wall/proc/get_hit_sound()
return 'sound/effects/metalhit.ogg'
+
+// Mapped premade for false walls
+/turf/wall/false
+ can_open = TRUE
diff --git a/code/game/turfs/walls/wall_brick.dm b/code/game/turfs/walls/wall_brick.dm
index 5317df3af83..28f4df68b14 100644
--- a/code/game/turfs/walls/wall_brick.dm
+++ b/code/game/turfs/walls/wall_brick.dm
@@ -36,6 +36,9 @@
/turf/wall/brick/##material_name/shutter { \
shutter_state = FALSE; \
icon_state = "brick_shutter"; \
+}; \
+/turf/wall/brick/##material_name/shutter/open { \
+ shutter_state = TRUE; \
}
MATERIAL_BRICK_WALL(sandstone)
diff --git a/code/game/turfs/walls/wall_log.dm b/code/game/turfs/walls/wall_log.dm
index eb44eda2bef..3d092408226 100644
--- a/code/game/turfs/walls/wall_log.dm
+++ b/code/game/turfs/walls/wall_log.dm
@@ -37,8 +37,10 @@
/turf/wall/log/##material_name/shutter { \
shutter_state = FALSE; \
icon_state = "log_shutter"; \
+}; \
+/turf/wall/log/##material_name/shutter/open { \
+ shutter_state = TRUE; \
}
-
LOG_WALL_SUBTYPE(fungal)
LOG_WALL_SUBTYPE(ebony)
LOG_WALL_SUBTYPE(walnut)
diff --git a/code/game/turfs/walls/wall_types.dm b/code/game/turfs/walls/wall_types.dm
index 06cf0c0f02b..b2375889697 100644
--- a/code/game/turfs/walls/wall_types.dm
+++ b/code/game/turfs/walls/wall_types.dm
@@ -82,7 +82,7 @@
material = /decl/material/solid/metal/alienalloy
/turf/wall/raidershuttle/attackby()
- return
+ return TRUE
//Alien metal walls
/turf/wall/alium
diff --git a/code/modules/ZAS/Atom.dm b/code/modules/ZAS/Atom.dm
index 67489bd4d69..d8575f1f9ce 100644
--- a/code/modules/ZAS/Atom.dm
+++ b/code/modules/ZAS/Atom.dm
@@ -38,3 +38,8 @@
/atom/movable
var/atmos_canpass = CANPASS_ALWAYS
+
+// Make sure you know what you're doing if you call this
+// You probably want CanPass()
+/atom/movable/Cross(atom/movable/crossed_atom)
+ return CanPass(crossed_atom, crossed_atom.loc)
\ No newline at end of file
diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm
index e26b157adde..e583f5664ce 100644
--- a/code/modules/assembly/assembly.dm
+++ b/code/modules/assembly/assembly.dm
@@ -120,15 +120,14 @@
var/obj/item/assembly/assembly = component
if(!assembly.secured && !secured)
attach_assembly(assembly, user)
- return
+ return TRUE
if(IS_SCREWDRIVER(component))
if(toggle_secure())
to_chat(user, SPAN_NOTICE("\The [src] is ready!"))
else
to_chat(user, SPAN_NOTICE("\The [src] can now be attached!"))
- return
- ..()
- return
+ return TRUE
+ return ..()
/obj/item/assembly/Process()
diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm
index 4b312321fb7..c4ef0fcdbfa 100644
--- a/code/modules/assembly/holder.dm
+++ b/code/modules/assembly/holder.dm
@@ -113,7 +113,7 @@
if(IS_SCREWDRIVER(W))
if(!a_left || !a_right)
to_chat(user, "BUG:Assembly part missing, please report this!")
- return
+ return TRUE
a_left.toggle_secure()
a_right.toggle_secure()
secured = !secured
@@ -122,11 +122,8 @@
else
to_chat(user, "\The [src] can now be taken apart!")
update_icon()
- return
- else
- ..()
- return
-
+ return TRUE
+ return ..()
/obj/item/assembly_holder/attack_self(mob/user as mob)
src.add_fingerprint(user)
diff --git a/code/modules/atmospherics/components/unary/outlet_injector.dm b/code/modules/atmospherics/components/unary/outlet_injector.dm
index 5521f5016ca..2c0ed7952a9 100644
--- a/code/modules/atmospherics/components/unary/outlet_injector.dm
+++ b/code/modules/atmospherics/components/unary/outlet_injector.dm
@@ -132,7 +132,7 @@
var/datum/browser/written_digital/popup = new (user, "Vent Configuration Utility", "[src] Configuration Panel", 600, 200)
popup.set_content(jointext(get_console_data(),"
"))
popup.open()
- return
+ return TRUE
return ..()
/decl/public_access/public_variable/volume_rate
diff --git a/code/modules/augment/active/circuit.dm b/code/modules/augment/active/circuit.dm
index 6fe25252764..913820ec276 100644
--- a/code/modules/augment/active/circuit.dm
+++ b/code/modules/augment/active/circuit.dm
@@ -20,7 +20,7 @@
holding = null
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
else to_chat(user, SPAN_WARNING("The augment is empty!"))
- return
+ return TRUE
if(istype(W, /obj/item/electronic_assembly/augment))
if(holding)
to_chat(user, SPAN_WARNING("There's already an assembly in there."))
@@ -28,6 +28,5 @@
holding = W
holding.canremove = 0
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
- return
-
- ..()
\ No newline at end of file
+ return TRUE
+ return ..()
\ No newline at end of file
diff --git a/code/modules/augment/active/cyberbrain.dm b/code/modules/augment/active/cyberbrain.dm
index f8fc92ecca1..caa75054b29 100644
--- a/code/modules/augment/active/cyberbrain.dm
+++ b/code/modules/augment/active/cyberbrain.dm
@@ -56,7 +56,8 @@
/obj/item/organ/internal/augment/active/cyberbrain/attackby(var/obj/item/W, var/mob/user)
var/datum/extension/assembly/assembly = get_extension(src, /datum/extension/assembly)
- if(assembly.attackby(W, user))
+ . = assembly.attackby(W, user)
+ if(.)
return
return ..()
diff --git a/code/modules/augment/augment.dm b/code/modules/augment/augment.dm
index 7297b6a1ba5..9b43eea445c 100644
--- a/code/modules/augment/augment.dm
+++ b/code/modules/augment/augment.dm
@@ -24,8 +24,8 @@
organ_tag = input(user, "Adjust installation parameters") as null|anything in allowed_organs
update_parent_organ()
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- return
- ..()
+ return TRUE
+ return ..()
/obj/item/organ/internal/augment/do_install(var/mob/living/human/target, var/obj/item/organ/external/affected, var/in_place = FALSE, var/update_icon = TRUE, var/detached = FALSE)
. = ..()
diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm
index 576eaf7ad1c..13f96d15a00 100644
--- a/code/modules/awaymissions/gateway.dm
+++ b/code/modules/awaymissions/gateway.dm
@@ -130,7 +130,8 @@
/obj/machinery/gateway/centerstation/attackby(obj/item/W, mob/user)
if(IS_MULTITOOL(W))
to_chat(user, "The gate is already calibrated, there is no work for you to do here.")
- return
+ return TRUE
+ return FALSE
/////////////////////////////////////Away////////////////////////
@@ -226,8 +227,9 @@
if(IS_MULTITOOL(W))
if(calibrated)
to_chat(user, "The gate is already calibrated, there is no work for you to do here.")
- return
+ return TRUE
else
to_chat(user, "Recalibration successful!: This gate's systems have been fine tuned. Travel to this gate will now be on target.")
calibrated = 1
- return
+ return TRUE
+ return FALSE
diff --git a/code/modules/awaymissions/loot.dm b/code/modules/awaymissions/loot.dm
index 4b88e2c9e93..76ee712b3b8 100644
--- a/code/modules/awaymissions/loot.dm
+++ b/code/modules/awaymissions/loot.dm
@@ -12,7 +12,7 @@
if(things && things.len)
for(var/i = lootcount, i > 0, i--)
if(!things.len)
- return
+ break
var/loot_spawn = pick(things)
var/loot_path = text2path(loot_spawn)
diff --git a/code/modules/blob/blob.dm b/code/modules/blob/blob.dm
index 7b7b288a4d5..e8f001355f0 100644
--- a/code/modules/blob/blob.dm
+++ b/code/modules/blob/blob.dm
@@ -168,16 +168,16 @@
if(IS_WIRECUTTER(W))
if(prob(user.skill_fail_chance(SKILL_SCIENCE, 90, SKILL_EXPERT)))
to_chat(user, SPAN_WARNING("You fail to collect a sample from \the [src]."))
- return
+ return TRUE
else
if(!pruned)
to_chat(user, SPAN_NOTICE("You collect a sample from \the [src]."))
new product(user.loc)
pruned = TRUE
- return
+ return TRUE
else
to_chat(user, SPAN_WARNING("\The [src] has already been pruned."))
- return
+ return TRUE
var/damage = 0
switch(W.atom_damage_type)
@@ -189,7 +189,7 @@
damage = (W.get_attack_force(user) / brute_resist)
take_damage(damage, W.atom_damage_type)
- return
+ return TRUE
/obj/effect/blob/core
name = "master nucleus"
diff --git a/code/modules/clothing/_clothing_accessories.dm b/code/modules/clothing/_clothing_accessories.dm
index e75fda7a26c..81e9d41a80a 100644
--- a/code/modules/clothing/_clothing_accessories.dm
+++ b/code/modules/clothing/_clothing_accessories.dm
@@ -65,7 +65,7 @@
if(length(accessories))
for(var/obj/item/clothing/accessory in accessories)
accessory.attackby(I, user)
- return
+ return TRUE
. = ..()
diff --git a/code/modules/clothing/badges/holobadge.dm b/code/modules/clothing/badges/holobadge.dm
index 4f24ba140a4..31aed4af787 100644
--- a/code/modules/clothing/badges/holobadge.dm
+++ b/code/modules/clothing/badges/holobadge.dm
@@ -46,7 +46,7 @@
var/obj/item/card/id/id_card = O.GetIdCard()
if(!id_card)
- return
+ return TRUE
if((badge_access in id_card.access) || emagged)
to_chat(user, "You imprint your ID details onto the badge.")
@@ -54,8 +54,8 @@
set_desc(user)
else
to_chat(user, "[src] rejects your ID, and flashes 'Insufficient access!'")
- return
- ..()
+ return TRUE
+ return ..()
/obj/item/box/holobadge
name = "holobadge box"
diff --git a/code/modules/clothing/gloves/jewelry/rings/material.dm b/code/modules/clothing/gloves/jewelry/rings/material.dm
index d800229d7ef..f2ac541d18e 100644
--- a/code/modules/clothing/gloves/jewelry/rings/material.dm
+++ b/code/modules/clothing/gloves/jewelry/rings/material.dm
@@ -12,12 +12,15 @@
/obj/item/clothing/gloves/ring/material/attackby(var/obj/item/S, var/mob/user)
if(S.sharp)
var/inscription = sanitize(input("Enter an inscription to engrave.", "Inscription") as null|text)
- if(!user.stat && !user.incapacitated() && user.Adjacent(src) && S.loc == user)
- if(!inscription)
- return
- desc = "A ring made from [material.solid_name]."
- to_chat(user, "You carve \"[inscription]\" into \the [src].")
- desc += "
Written on \the [src] is the inscription \"[inscription]\""
+ if(user.stat || !user.incapacitated() || !user.Adjacent(src) || S.loc != user)
+ return TRUE
+ if(!inscription)
+ return TRUE
+ desc = "A ring made from [material.solid_name]."
+ to_chat(user, "You carve \"[inscription]\" into \the [src].")
+ desc += "
Written on \the [src] is the inscription \"[inscription]\""
+ return TRUE
+ return ..()
/obj/item/clothing/gloves/ring/material/OnTopic(var/mob/user, var/list/href_list)
if(href_list["examine"])
diff --git a/code/modules/clothing/masks/cig_crafting.dm b/code/modules/clothing/masks/cig_crafting.dm
index b3cb976a4d1..c3405f77bdf 100644
--- a/code/modules/clothing/masks/cig_crafting.dm
+++ b/code/modules/clothing/masks/cig_crafting.dm
@@ -59,19 +59,20 @@
seed = "finetobacco"
/obj/item/clothing/mask/smokable/cigarette/rolled/attackby(obj/item/I, mob/user)
- if(istype(I, /obj/item/cigarette_filter))
- if(filter)
- to_chat(user, "[src] already has a filter!")
- return
- if(lit)
- to_chat(user, "[src] is lit already!")
- return
- if(user.try_unequip(I))
- to_chat(user, "You stick [I] into \the [src]")
- filter = 1
- SetName("filtered [name]")
- brand = "[brand] with a filter"
- update_icon()
- qdel(I)
- return
- ..()
+ if(!istype(I, /obj/item/cigarette_filter))
+ return ..()
+ if(filter)
+ to_chat(user, "[src] already has a filter!")
+ return TRUE
+ if(lit)
+ to_chat(user, "[src] is lit already!")
+ return TRUE
+ if(!user.try_unequip(I))
+ return TRUE
+ to_chat(user, "You stick [I] into \the [src]")
+ filter = 1
+ SetName("filtered [name]")
+ brand = "[brand] with a filter"
+ update_icon()
+ qdel(I)
+ return TRUE
diff --git a/code/modules/clothing/masks/smokable.dm b/code/modules/clothing/masks/smokable.dm
index 2a806fa672f..89284f65169 100644
--- a/code/modules/clothing/masks/smokable.dm
+++ b/code/modules/clothing/masks/smokable.dm
@@ -110,7 +110,7 @@
if(ismob(loc))
var/mob/living/M = loc
- M.update_equipment_overlay(slot_wear_mask_str, FALSE)
+ update_clothing_icon(do_update_icon = FALSE)
M.update_inhand_overlays()
/obj/item/clothing/mask/smokable/adjust_mob_overlay(mob/living/user_mob, bodytype, image/overlay, slot, bodypart, use_fallback_if_icon_missing = TRUE)
@@ -160,7 +160,6 @@
update_icon()
/obj/item/clothing/mask/smokable/attackby(var/obj/item/W, var/mob/user)
- ..()
if(W.isflamesource() || W.get_heat() >= T100C)
var/text = matchmes
if(istype(W, /obj/item/flame/match))
@@ -179,6 +178,8 @@
text = replacetext(text, "NAME", "[name]")
text = replacetext(text, "FLAME", "[W.name]")
light(text)
+ return TRUE
+ return ..()
/obj/item/clothing/mask/smokable/use_on_mob(mob/living/target, mob/living/user, animate = TRUE)
if(target.on_fire)
@@ -471,11 +472,6 @@
desc = "A manky old cigar butt."
icon = 'icons/clothing/mask/smokables/cigar_butt.dmi'
-/obj/item/clothing/mask/smokable/cigarette/cigar/attackby(var/obj/item/W, var/mob/user)
- ..()
- user.update_equipment_overlay(slot_wear_mask_str, FALSE)
- user.update_inhand_overlays()
-
//Bizarre
/obj/item/clothing/mask/smokable/cigarette/rolled/sausage
name = "sausage"
@@ -559,40 +555,27 @@
SetName("empty [initial(name)]")
/obj/item/clothing/mask/smokable/pipe/attackby(var/obj/item/W, var/mob/user)
- if(istype(W, /obj/item/energy_blade/sword))
- return
-
- ..()
-
- if (istype(W, /obj/item/food))
+ if(istype(W, /obj/item/energy_blade/sword)) // Can't light a pipe with an esword
+ return TRUE
+ if (istype(W, /obj/item/food/grown))
var/obj/item/food/grown/grown = W
if (!grown.dry)
to_chat(user, SPAN_NOTICE("\The [grown] must be dried before you stuff it into \the [src]."))
- return
+ return TRUE
if (smoketime)
to_chat(user, SPAN_NOTICE("\The [src] is already packed."))
- return
+ return TRUE
smoketime = 1000
if(grown.reagents)
grown.reagents.trans_to_obj(src, grown.reagents.total_volume)
SetName("[grown.name]-packed [initial(name)]")
qdel(grown)
-
- else if(istype(W, /obj/item/flame/fuelled/lighter))
- var/obj/item/flame/fuelled/lighter/L = W
- if(L.lit)
- light(SPAN_NOTICE("[user] manages to light their [name] with [W]."))
-
- else if(istype(W, /obj/item/flame/match))
- var/obj/item/flame/match/M = W
- if(M.lit)
- light(SPAN_NOTICE("[user] lights their [name] with their [W]."))
-
- else if(istype(W, /obj/item/assembly/igniter))
- light(SPAN_NOTICE("[user] fiddles with [W], and manages to light their [name] with the power of science."))
-
- user.update_equipment_overlay(slot_wear_mask_str, FALSE)
- user.update_inhand_overlays()
+ update_icon()
+ return TRUE
+ . = ..()
+ if(.)
+ return
+ return TRUE
/obj/item/clothing/mask/smokable/pipe/cobpipe
name = "corn cob pipe"
diff --git a/code/modules/clothing/spacesuits/breaches.dm b/code/modules/clothing/spacesuits/breaches.dm
index 16689040470..82a201e5fcf 100644
--- a/code/modules/clothing/spacesuits/breaches.dm
+++ b/code/modules/clothing/spacesuits/breaches.dm
@@ -190,23 +190,23 @@
repair_power = 1
if(!repair_power)
- return
+ return FALSE
if(ishuman(loc))
var/mob/living/human/H = loc
if(H.get_equipped_item(slot_wear_suit_str) == src)
to_chat(user, SPAN_WARNING("You cannot repair \the [src] while it is being worn."))
- return
+ return TRUE
if(burn_damage <= 0)
to_chat(user, "There is no surface damage on \the [src] to repair.") //maybe change the descriptor to more obvious? idk what
- return
+ return TRUE
var/obj/item/stack/P = W
var/use_amt = min(P.get_amount(), 3)
if(use_amt && P.use(use_amt))
repair_breaches(BURN, use_amt * repair_power, user)
- return
+ return TRUE
else if(IS_WELDER(W))
@@ -214,19 +214,19 @@
var/mob/living/human/H = loc
if(H.get_equipped_item(slot_wear_suit_str) == src)
to_chat(user, SPAN_WARNING("You cannot repair \the [src] while it is being worn."))
- return
+ return TRUE
if (brute_damage <= 0)
to_chat(user, "There is no structural damage on \the [src] to repair.")
- return
+ return TRUE
var/obj/item/weldingtool/WT = W
if(!WT.weld(5))
to_chat(user, SPAN_WARNING("You need more welding fuel to repair this suit."))
- return
+ return TRUE
repair_breaches(BRUTE, 3, user)
- return
+ return TRUE
else if(istype(W, /obj/item/stack/tape_roll/duct_tape))
var/datum/breach/target_breach //Target the largest unpatched breach.
@@ -239,17 +239,13 @@
if(!target_breach)
to_chat(user, "There are no open breaches to seal with \the [W].")
else
- var/mob/living/human/H = user
- if(!istype(H))
- return
-
var/obj/item/stack/tape_roll/duct_tape/D = W
var/amount_needed = ceil(target_breach.class * 2)
if(!D.can_use(amount_needed))
to_chat(user, SPAN_WARNING("There's not enough [D.plural_name] in your [src] to seal \the [target_breach.descriptor] on \the [src]! You need at least [amount_needed] [D.plural_name]."))
- return
+ return TRUE
- if(do_after(user, H.get_equipped_item(slot_wear_suit_str) == src? 60 : 30, isliving(loc)? loc : null)) //Sealing a breach on your own suit is awkward and time consuming
+ if(do_after(user, user.get_equipped_item(slot_wear_suit_str) == src? 6 SECONDS : 3 SECONDS, isliving(loc)? loc : null)) //Sealing a breach on your own suit is awkward and time consuming
D.use(amount_needed)
playsound(src, 'sound/effects/tape.ogg',25)
user.visible_message(
@@ -259,9 +255,8 @@
target_breach.patched = TRUE
target_breach.update_descriptor()
calc_breach_damage()
- return
-
- ..()
+ return TRUE
+ return ..()
/obj/item/clothing/suit/space/examine(mob/user)
. = ..()
diff --git a/code/modules/clothing/spacesuits/rig/modules/modules.dm b/code/modules/clothing/spacesuits/rig/modules/modules.dm
index 9d5a0897ddd..893ec665f88 100644
--- a/code/modules/clothing/spacesuits/rig/modules/modules.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/modules.dm
@@ -75,43 +75,43 @@
if(damage == 0)
to_chat(user, "There is no damage to mend.")
- return
+ return TRUE
to_chat(user, "You start mending the damaged portions of \the [src]...")
if(!do_after(user,30,src) || !W || !src)
- return
+ return TRUE
var/obj/item/stack/nanopaste/paste = W
damage = 0
to_chat(user, "You mend the damage to [src] with [W].")
paste.use(1)
- return
+ return TRUE
else if(IS_COIL(W))
switch(damage)
if(0)
to_chat(user, "There is no damage to mend.")
- return
+ return TRUE
if(2)
to_chat(user, "There is no damage that you are capable of mending with such crude tools.")
- return
+ return TRUE
var/obj/item/stack/cable_coil/cable = W
if(!cable.can_use(5))
to_chat(user, "You need five units of cable to repair \the [src].")
- return
+ return TRUE
to_chat(user, "You start mending the damaged portions of \the [src]...")
if(!do_after(user,30,src) || !W || !src)
- return
+ return TRUE
damage = 1
- to_chat(user, "You mend some of damage to [src] with [W], but you will need more advanced tools to fix it completely.")
+ to_chat(user, "You mend some of the damage to [src] with [W], but you will need more advanced tools to fix it completely.")
cable.use(5)
- return
- ..()
+ return TRUE
+ return ..()
/obj/item/rig_module/Initialize()
. =..()
diff --git a/code/modules/clothing/spacesuits/rig/modules/utility.dm b/code/modules/clothing/spacesuits/rig/modules/utility.dm
index 19d799aa217..b3d1533d3b6 100644
--- a/code/modules/clothing/spacesuits/rig/modules/utility.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/utility.dm
@@ -387,7 +387,7 @@
if(istype(W, /obj/item/tank/jetpack/rig))
if(jets)
to_chat(user, SPAN_WARNING("There's already a propellant tank inside of \the [src]!"))
- return
+ return TRUE
if(user.try_unequip(W))
to_chat(user, SPAN_NOTICE("You insert \the [W] into [src]."))
W.forceMove(src)
diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm
index 79954b69547..9c15918e7ca 100644
--- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm
+++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm
@@ -1,10 +1,10 @@
/obj/item/rig/attackby(obj/item/W, mob/user)
- if(!isliving(user)) return 0
+ if(!isliving(user)) return FALSE
if(electrified != 0)
if(shock(user)) //Handles removing charge from the cell, as well. No need to do that here.
- return
+ return TRUE
// Pass repair items on to the chestpiece.
if(chest && (istype(W,/obj/item/stack/material) || IS_WELDER(W)))
@@ -15,34 +15,35 @@
if(subverted)
locked = 0
to_chat(user, "It looks like the locking system has been shorted out.")
- return
+ return TRUE
if(!length(req_access))
locked = 0
to_chat(user, "\The [src] doesn't seem to have a locking mechanism.")
- return
+ return TRUE
if(security_check_enabled && !src.allowed(user))
to_chat(user, "Access denied.")
- return
+ return TRUE
locked = !locked
to_chat(user, "You [locked ? "lock" : "unlock"] \the [src] access panel.")
- return
+ return TRUE
else if(IS_CROWBAR(W))
if(!open && locked)
to_chat(user, "The access panel is locked shut.")
- return
+ return TRUE
open = !open
to_chat(user, "You [open ? "open" : "close"] the access panel.")
- return
+ return TRUE
else if(IS_SCREWDRIVER(W))
p_open = !p_open
to_chat(user, "You [p_open ? "open" : "close"] the wire cover.")
+ return TRUE
// Hacking.
else if(IS_WIRECUTTER(W) || IS_MULTITOOL(W))
@@ -50,7 +51,7 @@
wires.Interact(user)
else
to_chat(user, "You can't reach the wiring.")
- return
+ return TRUE
if(open)
@@ -60,13 +61,14 @@
if(air_supply)
to_chat(user, "\The [src] already has a tank installed.")
- return
+ return TRUE
- if(!user.try_unequip(W)) return
+ if(!user.try_unequip(W))
+ return TRUE
air_supply = W
W.forceMove(src)
to_chat(user, "You slot [W] into [src] and tighten the connecting valve.")
- return
+ return TRUE
// Check if this is a hardsuit upgrade or a modification.
else if(istype(W,/obj/item/rig_module))
@@ -75,11 +77,11 @@
var/mob/living/human/H = src.loc
if(H.get_equipped_item(slot_back_str) == src)
to_chat(user, "You can't install a hardsuit module while the suit is being worn.")
- return 1
+ return TRUE
if(is_type_in_list(W,banned_modules))
to_chat(user, SPAN_DANGER("\The [src] cannot mount this type of module."))
- return 1
+ return TRUE
var/obj/item/rig_module/mod = W
@@ -88,35 +90,35 @@
for(var/obj/item/rig_module/installed_mod in installed_modules)
if(is_type_in_list(installed_mod,mod.banned_modules))
to_chat(user, SPAN_DANGER("\The [installed_mod] is incompatible with this module."))
- return 1
+ return TRUE
if(installed_mod.banned_modules.len)
if(is_type_in_list(W,installed_mod.banned_modules))
to_chat(user, SPAN_DANGER("\The [installed_mod] is incompatible with this module."))
- return 1
+ return TRUE
if(!installed_mod.redundant && installed_mod.type == W.type)
to_chat(user, "The hardsuit already has a module of that class installed.")
- return 1
+ return TRUE
to_chat(user, "You begin installing \the [mod] into \the [src].")
if(!do_after(user,40,src))
- return
+ return TRUE
if(!user || !W)
- return
- if(!user.try_unequip(mod)) return
+ return TRUE
+ if(!user.try_unequip(mod)) return TRUE
to_chat(user, "You install \the [mod] into \the [src].")
installed_modules |= mod
mod.forceMove(src)
mod.installed(src)
update_icon()
- return 1
+ return TRUE
else if(!cell && istype(W,/obj/item/cell))
- if(!user.try_unequip(W)) return
+ if(!user.try_unequip(W)) return TRUE
to_chat(user, "You jack \the [W] into \the [src]'s battery mount.")
W.forceMove(src)
src.cell = W
- return
+ return TRUE
else if(IS_WRENCH(W))
@@ -127,13 +129,13 @@
var/to_remove = input("Which would you like to modify?") as null|anything in current_mounts
if(!to_remove)
- return
+ return TRUE
if(ishuman(src.loc) && to_remove != "cell" && to_remove != "tank")
var/mob/living/human/H = src.loc
if(H.get_equipped_item(slot_back_str) == src)
to_chat(user, "You can't remove an installed device while the hardsuit is being worn.")
- return
+ return TRUE
switch(to_remove)
@@ -151,7 +153,7 @@
if("tank")
if(!air_supply)
to_chat(user, "There is no tank to remove.")
- return
+ return TRUE
user.put_in_hands(air_supply)
to_chat(user, "You detach and remove \the [air_supply].")
@@ -167,11 +169,11 @@
if(!possible_removals.len)
to_chat(user, "There are no installed modules to remove.")
- return
+ return TRUE
var/removal_choice = input("Which module would you like to remove?") as null|anything in possible_removals
if(!removal_choice)
- return
+ return TRUE
var/obj/item/rig_module/removed = possible_removals[removal_choice]
to_chat(user, "You detach \the [removed] from \the [src].")
@@ -191,15 +193,14 @@
to_chat(user, "\The [S] is empty!")
else
to_chat(user, "You don't see any use for \the [S].")
-
- return
+ return TRUE
// If we've gotten this far, all we have left to do before we pass off to root procs
// is check if any of the loaded modules want to use the item we've been given.
for(var/obj/item/rig_module/module in installed_modules)
if(module.accepts_item(W,user)) //Item is handled in this proc
- return
- ..()
+ return TRUE
+ return ..()
/obj/item/rig/attack_hand(var/mob/user)
diff --git a/code/modules/clothing/webbing/holster.dm b/code/modules/clothing/webbing/holster.dm
index 8c56984d9c8..47ca037c939 100644
--- a/code/modules/clothing/webbing/holster.dm
+++ b/code/modules/clothing/webbing/holster.dm
@@ -15,7 +15,7 @@
/obj/item/clothing/webbing/holster/attackby(obj/item/W, mob/user)
var/datum/extension/holster/H = get_extension(src, /datum/extension/holster)
if(H.holster(W, user))
- return
+ return TRUE
else
. = ..(W, user)
diff --git a/code/modules/crafting/stack_recipes/recipes_planks.dm b/code/modules/crafting/stack_recipes/recipes_planks.dm
index c3dd35a7e40..f8a75075499 100644
--- a/code/modules/crafting/stack_recipes/recipes_planks.dm
+++ b/code/modules/crafting/stack_recipes/recipes_planks.dm
@@ -204,6 +204,16 @@
result_type = /obj/structure/reagent_dispensers/barrel
difficulty = MAT_VALUE_HARD_DIY
+/decl/stack_recipe/planks/furniture/barrel/cask
+ result_type = /obj/structure/reagent_dispensers/barrel/cask
+
+/decl/stack_recipe/planks/furniture/barrel/cask_rack
+ result_type = /obj/structure/cask_rack
+
+/decl/stack_recipe/planks/furniture/barrel/large_cask_rack
+ name = "cask rack, large"
+ result_type = /obj/structure/cask_rack/large
+
/decl/stack_recipe/planks/furniture/table_frame
result_type = /obj/structure/table/frame
category = "furniture"
diff --git a/code/modules/detectivework/microscope/_forensic_machine.dm b/code/modules/detectivework/microscope/_forensic_machine.dm
index 4b2c2f14aae..a5edee029bd 100644
--- a/code/modules/detectivework/microscope/_forensic_machine.dm
+++ b/code/modules/detectivework/microscope/_forensic_machine.dm
@@ -42,28 +42,30 @@
return res + ..()
/obj/machinery/forensic/attackby(obj/item/W, mob/user)
+ if(component_attackby(W, user))
+ return TRUE
+
if(user?.a_intent == I_HURT)
- return ..()
+ return ..() // bash, bash!
if(sample)
- to_chat(user, SPAN_WARNING("There is already a slide in \the [src]."))
- return
+ to_chat(user, SPAN_WARNING("There is already a sample in \the [src]."))
+ return TRUE
- if(istype(W))
- if(istype(W, /obj/item/evidencebag))
- var/obj/item/evidencebag/B = W
- if(B.stored_item)
- to_chat(user, SPAN_NOTICE("You insert \the [B.stored_item] from \the [B]."))
- B.stored_item.forceMove(src)
- set_sample(B.stored_item)
- B.empty()
- return
- if(!user.try_unequip(W, src))
- return
- to_chat(user, SPAN_NOTICE("You insert \the [W] into \the [src]."))
- set_sample(W)
- update_icon()
- return
+ if(istype(W, /obj/item/evidencebag))
+ var/obj/item/evidencebag/B = W
+ if(B.stored_item)
+ to_chat(user, SPAN_NOTICE("You insert \the [B.stored_item] from \the [B]."))
+ B.stored_item.forceMove(src)
+ set_sample(B.stored_item)
+ B.empty()
+ return TRUE
+ if(!user.try_unequip(W, src))
+ return TRUE
+ to_chat(user, SPAN_NOTICE("You insert \the [W] into \the [src]."))
+ set_sample(W)
+ update_icon()
+ return TRUE
/obj/machinery/forensic/proc/get_report()
if(!sample)
diff --git a/code/modules/detectivework/tools/sample_kits/swabs.dm b/code/modules/detectivework/tools/sample_kits/swabs.dm
index be2cc6d32b0..08d0dd1ffcb 100644
--- a/code/modules/detectivework/tools/sample_kits/swabs.dm
+++ b/code/modules/detectivework/tools/sample_kits/swabs.dm
@@ -26,22 +26,22 @@
user.visible_message(SPAN_NOTICE("\The [user] starts swabbing a sample from \the [H]."))
if(!do_mob(user, H, time_to_take))
user.visible_message(SPAN_WARNING("\The [user] tried to take a swab sample from \the [H], but they moved away."))
- return
+ return TRUE
if(user.get_target_zone() == BP_MOUTH)
var/cover = H.get_covering_equipped_item(SLOT_FACE)
if(cover)
to_chat(user, SPAN_WARNING("\The [H]'s [cover] is in the way."))
- return
+ return TRUE
var/unique_enzymes = H.get_unique_enzymes()
if(!unique_enzymes)
to_chat(user, SPAN_WARNING("They don't seem to have DNA!"))
- return
+ return TRUE
if(!H.check_has_mouth())
to_chat(user, SPAN_WARNING("They don't have a mouth."))
- return
+ return TRUE
user.visible_message(SPAN_NOTICE("[user] swabs \the [H]'s mouth for a saliva sample."))
var/datum/forensics/trace_dna/trace = new()
@@ -54,7 +54,7 @@
var/zone = user.get_target_zone()
if(!H.has_organ(zone))
to_chat(user, SPAN_WARNING("They don't have that part!"))
- return
+ return TRUE
var/obj/object_to_swab = GET_EXTERNAL_ORGAN(H, zone)
var/cover = H.get_covering_equipped_item_by_zone(zone)
if(cover)
@@ -68,12 +68,12 @@
has_evidence = TRUE
if(!has_evidence)
to_chat(user, SPAN_WARNING("You can't find anything useful on \the [object_to_swab]."))
- return
+ return TRUE
user.visible_message(SPAN_NOTICE("[user] swabs [H]'s [object_to_swab.name] for a sample."))
var/obj/item/forensics/sample/swab/S = new /obj/item/forensics/sample/swab/(get_turf(user), object_to_swab)
user.put_in_hands(S)
update_icon()
- return 1
+ return TRUE
/obj/item/forensics/sample/swab
diff --git a/code/modules/economy/cael/ATM.dm b/code/modules/economy/cael/ATM.dm
index 4aec5d0c993..bcd301d8c97 100644
--- a/code/modules/economy/cael/ATM.dm
+++ b/code/modules/economy/cael/ATM.dm
@@ -80,19 +80,20 @@
if(emagged > 0)
//prevent inserting id into an emagged ATM
to_chat(user, "[html_icon(src)] CARD READER ERROR. This system has been compromised!")
- return
+ return TRUE
if(stat & NOPOWER)
to_chat(user, "You try to insert your card into [src], but nothing happens.")
- return
+ return TRUE
var/obj/item/card/id/idcard = I
if(!held_card)
if(!user.try_unequip(idcard, src))
- return
+ return TRUE
held_card = idcard
if(authenticated_account && held_card.associated_account_number != authenticated_account.account_number)
authenticated_account = null
attack_hand_with_interaction_checks(user)
+ return TRUE
else if(authenticated_account)
if(istype(I,/obj/item/cash))
@@ -105,6 +106,7 @@
to_chat(user, "You insert [I] into [src].")
attack_hand_with_interaction_checks(user)
qdel(I)
+ return TRUE
if(istype(I,/obj/item/charge_stick))
var/obj/item/charge_stick/stick = I
@@ -118,8 +120,8 @@
to_chat(user, "You insert [I] into [src].")
attack_hand_with_interaction_checks(user)
qdel(I)
- else
- ..()
+ return TRUE
+ return ..()
/obj/machinery/atm/interface_interact(mob/user)
interact(user)
diff --git a/code/modules/economy/cael/EFTPOS.dm b/code/modules/economy/cael/EFTPOS.dm
index cc4ab8dc712..551e88a70c0 100644
--- a/code/modules/economy/cael/EFTPOS.dm
+++ b/code/modules/economy/cael/EFTPOS.dm
@@ -87,7 +87,8 @@
if(linked_account)
scan_card(I, O)
else
- to_chat(usr, "[html_icon(src)]Unable to connect to linked account.")
+ to_chat(user, "[html_icon(src)]Unable to connect to linked account.")
+ return TRUE
else if (istype(O, /obj/item/charge_stick))
var/obj/item/charge_stick/E = O
if (linked_account)
@@ -102,14 +103,14 @@
visible_message("[html_icon(src)] \The [src] chimes.")
transaction_paid = 1
else
- to_chat(usr, "[html_icon(src)]Transaction failed! Please try again.")
+ to_chat(user, "[html_icon(src)]Transaction failed! Please try again.")
else
- to_chat(usr, "[html_icon(src)]\The [O] doesn't have that much money!")
+ to_chat(user, "[html_icon(src)]\The [O] doesn't have that much money!")
else
- to_chat(usr, "[html_icon(src)]EFTPOS is not connected to an account.")
-
+ to_chat(user, "[html_icon(src)]EFTPOS is not connected to an account.")
+ return TRUE
else
- ..()
+ return ..()
/obj/item/eftpos/Topic(var/href, var/href_list)
if(href_list["choice"])
diff --git a/code/modules/economy/worth_cash.dm b/code/modules/economy/worth_cash.dm
index 789152d0f6d..fda0929fe7c 100644
--- a/code/modules/economy/worth_cash.dm
+++ b/code/modules/economy/worth_cash.dm
@@ -60,7 +60,7 @@
var/obj/item/cash/cash = W
if(cash.currency != currency)
to_chat(user, SPAN_WARNING("You can't mix two different currencies, it would be uncivilized."))
- return
+ return TRUE
if(user.try_unequip(W))
adjust_worth(cash.absolute_worth)
var/decl/currency/cur = GET_DECL(currency)
@@ -71,6 +71,8 @@
else if(istype(W, /obj/item/gun/launcher/money))
var/obj/item/gun/launcher/money/L = W
L.absorb_cash(src, user)
+ return TRUE
+ return ..()
/obj/item/cash/on_update_icon()
. = ..()
diff --git a/code/modules/events/meteors.dm b/code/modules/events/meteors.dm
index 824d31b395a..f291cda35f5 100644
--- a/code/modules/events/meteors.dm
+++ b/code/modules/events/meteors.dm
@@ -299,8 +299,8 @@ var/global/list/meteors_major = list(
/obj/effect/meteor/attackby(obj/item/W, mob/user, params)
if(IS_PICK(W))
qdel(src)
- return
- ..()
+ return TRUE
+ return ..()
/obj/effect/meteor/proc/make_debris()
if(meteordrop && dropamt)
diff --git a/code/modules/fabrication/fabricator_intake.dm b/code/modules/fabrication/fabricator_intake.dm
index 420e31c5bc1..8013c8e63da 100644
--- a/code/modules/fabrication/fabricator_intake.dm
+++ b/code/modules/fabrication/fabricator_intake.dm
@@ -100,7 +100,7 @@
if((obj_flags & OBJ_FLAG_ANCHORABLE) && (IS_WRENCH(O) || IS_HAMMER(O)))
return ..()
if(stat & (NOPOWER | BROKEN))
- return
+ return TRUE
// Gate some simple interactions beind intent so people can still feed lathes disks.
if(user.a_intent != I_HURT)
@@ -109,27 +109,27 @@
if(IS_MULTITOOL(O))
var/datum/extension/local_network_member/fabnet = get_extension(src, /datum/extension/local_network_member)
fabnet.get_new_tag(user)
- return
+ return TRUE
// Install new designs.
if(istype(O, /obj/item/disk/design_disk))
var/obj/item/disk/design_disk/disk = O
if(!disk.blueprint)
to_chat(usr, SPAN_WARNING("\The [O] is blank."))
- return
+ return TRUE
if(disk.blueprint in installed_designs)
to_chat(usr, SPAN_WARNING("\The [src] is already loaded with the blueprint stored on \the [O]."))
- return
+ return TRUE
installed_designs += disk.blueprint
design_cache |= disk.blueprint
visible_message(SPAN_NOTICE("\The [user] inserts \the [O] into \the [src], and after a second or so of loud clicking, the fabricator beeps and spits it out again."))
- return
+ return TRUE
// TEMP HACK FIX:
// Autolathes currently do not process atom contents. As a workaround, refuse all atoms with contents.
if(length(O.contents) && !ignore_input_contents_length)
to_chat(user, SPAN_WARNING("\The [src] cannot process an object containing other objects. Empty it out first."))
- return
+ return TRUE
// REMOVE FIX WHEN LATHES TAKE CONTENTS PLS.
// Take reagents, if any are applicable.
@@ -139,8 +139,13 @@
show_intake_message(user, reagents_taken, atom_name, took_reagents = TRUE)
updateUsrDialog()
return TRUE
+
+ if(!can_ingest(O))
+ to_chat(user, SPAN_WARNING("\The [src] cannot process \the [O]."))
+ return TRUE
+
// Take everything if we have a recycler.
- if(can_ingest(O) && !is_robot_module(O) && user.try_unequip(O))
+ if(!is_robot_module(O) && user.try_unequip(O))
var/result = max(take_materials(O, user), max(reagents_taken, take_reagents(O, user, TRUE)))
show_intake_message(user, result, atom_name)
if(result == SUBSTANCE_TAKEN_NONE)
@@ -160,6 +165,7 @@
if(fab_status_flags & FAB_SHOCKED)
shock(user, 50)
return TRUE
+ return FALSE
/obj/machinery/fabricator/interface_interact(mob/user)
if((fab_status_flags & FAB_DISABLED) && !panel_open)
diff --git a/code/modules/games/boardgame.dm b/code/modules/games/boardgame.dm
index f326cc6036d..ee09f1cfba9 100644
--- a/code/modules/games/boardgame.dm
+++ b/code/modules/games/boardgame.dm
@@ -24,8 +24,9 @@
return TRUE
/obj/item/board/attackby(obj/item/I, mob/user)
- if(!addPiece(I,user))
- ..()
+ if(addPiece(I,user))
+ return TRUE
+ return ..()
/obj/item/board/proc/addPiece(obj/item/I, mob/user, var/tile = 0)
if(I.w_class != ITEM_SIZE_TINY) //only small stuff
diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm
index 1ca1c8faa3d..3bd0346b3a8 100644
--- a/code/modules/games/cards.dm
+++ b/code/modules/games/cards.dm
@@ -156,8 +156,8 @@ var/global/list/card_decks = list()
qdel(O)
to_chat(user, "You place your cards on the bottom of \the [src].")
- return
- ..()
+ return TRUE
+ return ..()
/obj/item/deck/verb/draw_card()
diff --git a/code/modules/goals/definitions/department_clerical.dm b/code/modules/goals/definitions/department_clerical.dm
index 0f5ac8c07d8..9538699b386 100644
--- a/code/modules/goals/definitions/department_clerical.dm
+++ b/code/modules/goals/definitions/department_clerical.dm
@@ -132,10 +132,10 @@
if(IS_PEN(W))
if(user.real_name in has_signed)
to_chat(user, SPAN_WARNING("You have already signed \the [src]."))
- return
+ return TRUE
if(!(user.real_name in needs_signed))
to_chat(user, SPAN_WARNING("You can't see anywhere on \the [src] for you to sign; it doesn't need your signature."))
- return
+ return TRUE
LAZYADD(has_signed, user.real_name)
LAZYREMOVE(needs_signed, user.real_name)
user.visible_message(SPAN_NOTICE("\The [user] signs \the [src] with \the [W]."))
diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm
index 95d296ae679..2d9b37d4209 100644
--- a/code/modules/holodeck/HolodeckObjects.dm
+++ b/code/modules/holodeck/HolodeckObjects.dm
@@ -10,7 +10,7 @@
return 0.8
/turf/floor/holofloor/attackby(obj/item/W, mob/user)
- return
+ return TRUE
// HOLOFLOOR DOES NOT GIVE A FUCK
/turf/floor/holofloor/carpet
@@ -56,7 +56,7 @@
/turf/floor/holofloor/wood
name = "wooden floor"
icon = 'icons/turf/flooring/wood.dmi'
- icon_state = "wood"
+ icon_state = "wood0"
color = WOOD_COLOR_CHOCOLATE
_flooring = /decl/flooring/wood
@@ -151,27 +151,27 @@
/obj/machinery/door/window/holowindoor/attackby(obj/item/I, mob/user)
if (src.operating == 1)
- return
+ return TRUE
if(src.density && istype(I, /obj/item) && !istype(I, /obj/item/card))
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
visible_message("\The [src] was hit by \the [I].")
if(I.atom_damage_type == BRUTE || I.atom_damage_type == BURN)
take_damage(I.get_attack_force(user))
- return
+ return TRUE
src.add_fingerprint(user)
- if (!src.requiresID())
- user = null
-
if (src.allowed(user))
if (src.density)
open()
else
close()
+ return TRUE
else if (src.density)
flick("[base_state]deny", src)
+ return TRUE
+ return FALSE
/obj/machinery/door/window/holowindoor/shatter(var/display_message = TRUE)
set_density(FALSE)
@@ -322,6 +322,7 @@
/obj/machinery/readybutton/attackby(obj/item/W, mob/user)
to_chat(user, "The device is a solid button, there's nothing you can do with it!")
+ return TRUE
/obj/machinery/readybutton/physical_attack_hand(mob/user)
currentarea = get_area(src)
diff --git a/code/modules/holomap/holomap.dm b/code/modules/holomap/holomap.dm
index 8b787a8bd18..6c298d6b99c 100644
--- a/code/modules/holomap/holomap.dm
+++ b/code/modules/holomap/holomap.dm
@@ -66,10 +66,10 @@
return ..()
if(watching_mob && (watching_mob != user))
to_chat(user, SPAN_WARNING("Someone else is currently watching the holomap."))
- return
+ return TRUE
if(user.loc != loc)
to_chat(user, SPAN_WARNING("You need to stand in front of \the [src]."))
- return
+ return TRUE
startWatching(user)
return TRUE
diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm
index c96cd9fa269..fdcb8b8adbe 100644
--- a/code/modules/hydroponics/beekeeping/beehive.dm
+++ b/code/modules/hydroponics/beekeeping/beehive.dm
@@ -50,49 +50,49 @@
closed = !closed
user.visible_message("\The [user] [closed ? "closes" : "opens"] \the [src].", "You [closed ? "close" : "open"] \the [src].")
update_icon()
- return
+ return TRUE
else if(IS_WRENCH(I))
anchored = !anchored
user.visible_message("\The [user] [anchored ? "wrenches" : "unwrenches"] \the [src].", "You [anchored ? "wrench" : "unwrench"] \the [src].")
- return
+ return TRUE
else if(istype(I, /obj/item/bee_smoker))
if(closed)
to_chat(user, "You need to open \the [src] with a crowbar before smoking the bees.")
- return
+ return TRUE
user.visible_message("\The [user] smokes the bees in \the [src].", "You smoke the bees in \the [src].")
smoked = 30
update_icon()
- return
+ return TRUE
else if(istype(I, /obj/item/honey_frame))
if(closed)
to_chat(user, "You need to open \the [src] with a crowbar before inserting \the [I].")
- return
+ return TRUE
if(frames >= maxFrames)
to_chat(user, "There is no place for an another frame.")
- return
+ return TRUE
var/obj/item/honey_frame/H = I
if(H.honey)
to_chat(user, "\The [I] is full with beeswax and honey, empty it in the extractor first.")
- return
+ return TRUE
++frames
user.visible_message("\The [user] loads \the [I] into \the [src].", "You load \the [I] into \the [src].")
update_icon()
qdel(I)
- return
+ return TRUE
else if(istype(I, /obj/item/bee_pack))
var/obj/item/bee_pack/B = I
if(B.full && bee_count)
to_chat(user, "\The [src] already has bees inside.")
- return
+ return TRUE
if(!B.full && bee_count < 90)
to_chat(user, "\The [src] is not ready to split.")
- return
+ return TRUE
if(!B.full && !smoked)
to_chat(user, "Smoke \the [src] first!")
- return
+ return TRUE
if(closed)
to_chat(user, "You need to open \the [src] with a crowbar before moving the bees.")
- return
+ return TRUE
if(B.full)
user.visible_message("\The [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].")
bee_count = 20
@@ -102,7 +102,7 @@
bee_count /= 2
B.fill()
update_icon()
- return
+ return TRUE
else if(istype(I, /obj/item/scanner/plant))
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." : ""]")
@@ -114,36 +114,38 @@
to_chat(user, "No frames installed.")
if(smoked)
to_chat(user, "The hive is smoked.")
- return 1
+ return TRUE
else if(IS_SCREWDRIVER(I))
if(bee_count)
to_chat(user, "You can't dismantle \the [src] with these bees inside.")
- return
+ return TRUE
to_chat(user, "You start dismantling \the [src]...")
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 30, src))
user.visible_message("\The [user] dismantles \the [src].", "You dismantle \the [src].")
new /obj/item/beehive_assembly(loc)
qdel(src)
- return
+ return TRUE
+ return FALSE // this should probably not be a machine, so don't do any component interactions
/obj/machinery/beehive/physical_attack_hand(var/mob/user)
- if(!closed)
- . = TRUE
- if(honeycombs < 100)
- to_chat(user, "There are no filled honeycombs.")
- return
- if(!smoked && bee_count)
- to_chat(user, "The bees won't let you take the honeycombs out like this, smoke them first.")
- return
- user.visible_message("\The [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, src))
- new /obj/item/honey_frame/filled(loc)
- honeycombs -= 100
- --frames
- update_icon()
- if(honeycombs < 100)
- to_chat(user, "You take all filled honeycombs out.")
+ if(closed)
+ return FALSE
+ . = TRUE
+ if(honeycombs < 100)
+ to_chat(user, "There are no filled honeycombs.")
+ return
+ if(!smoked && bee_count)
+ to_chat(user, "The bees won't let you take the honeycombs out like this, smoke them first.")
+ return
+ user.visible_message("\The [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, src))
+ new /obj/item/honey_frame/filled(loc)
+ honeycombs -= 100
+ --frames
+ update_icon()
+ if(honeycombs < 100)
+ to_chat(user, "You take all filled honeycombs out.")
/obj/machinery/beehive/Process()
if(closed && !smoked && bee_count)
@@ -188,14 +190,12 @@
/obj/machinery/honey_extractor/attackby(var/obj/item/I, var/mob/user)
if(processing)
to_chat(user, "\The [src] is currently spinning, wait until it's finished.")
- return
- if((. = component_attackby(I, user)))
- return
+ return TRUE
if(istype(I, /obj/item/honey_frame))
var/obj/item/honey_frame/H = I
if(!H.honey)
to_chat(user, "\The [H] is empty, put it into a beehive.")
- return
+ return TRUE
user.visible_message("\The [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
icon_state = "centrifuge_moving"
@@ -206,16 +206,18 @@
honey += processing
processing = 0
icon_state = "centrifuge"
+ return TRUE
else if(istype(I, /obj/item/chems/glass))
if(!honey)
to_chat(user, "There is no honey in \the [src].")
- return
+ return TRUE
var/obj/item/chems/glass/G = I
var/transferred = min(G.reagents.maximum_volume - G.reagents.total_volume, honey)
G.add_to_reagents(/decl/material/liquid/nutriment/honey, transferred)
honey -= transferred
user.visible_message("\The [user] collects honey from \the [src] into \the [G].", "You collect [transferred] units of honey from \the [src] into \the [G].")
- return 1
+ return TRUE
+ return ..() // smack it, interact with components, etc.
/obj/item/bee_smoker
name = "bee smoker"
diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm
index 9477b981d8e..e9cdda705d9 100644
--- a/code/modules/hydroponics/grown_inedible.dm
+++ b/code/modules/hydroponics/grown_inedible.dm
@@ -10,12 +10,12 @@
material = /decl/material/solid/organic/plantmatter
/obj/item/corncob/attackby(obj/item/W, mob/user)
- ..()
if(istype(W, /obj/item/circular_saw) || IS_HATCHET(W) || istype(W, /obj/item/knife))
to_chat(user, "You use [W] to fashion a pipe out of the corn cob!")
new /obj/item/clothing/mask/smokable/pipe/cobpipe (user.loc)
qdel(src)
- return
+ return TRUE
+ return ..()
/obj/item/bananapeel
name = "banana peel"
diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm
index b56c5a6ca90..418afb41d29 100644
--- a/code/modules/hydroponics/seed_machines.dm
+++ b/code/modules/hydroponics/seed_machines.dm
@@ -70,47 +70,43 @@
if(istype(W,/obj/item/seeds))
if(seed)
to_chat(user, "There is already a seed loaded.")
- return
- var/obj/item/seeds/S =W
+ return TRUE
+ var/obj/item/seeds/S = W
if(S.seed && S.seed.get_trait(TRAIT_IMMUTABLE) > 0)
to_chat(user, "That seed is not compatible with our genetics technology.")
else if(user.try_unequip(W, src))
seed = W
to_chat(user, "You load [W] into [src].")
- return
+ return TRUE
if(IS_SCREWDRIVER(W))
open = !open
to_chat(user, "You [open ? "open" : "close"] the maintenance panel.")
- return
+ return TRUE
- if(open)
- if(IS_CROWBAR(W))
- dismantle()
- return
+ if(open && IS_CROWBAR(W))
+ dismantle()
+ return TRUE
if(istype(W,/obj/item/disk/botany))
if(loaded_disk)
to_chat(user, "There is already a data disk loaded.")
- return
+ return TRUE
+ var/obj/item/disk/botany/B = W
+ if(B.genes && B.genes.len)
+ if(!disk_needs_genes)
+ to_chat(user, "That disk already has gene data loaded.")
+ return TRUE
else
- var/obj/item/disk/botany/B = W
-
- if(B.genes && B.genes.len)
- if(!disk_needs_genes)
- to_chat(user, "That disk already has gene data loaded.")
- return
- else
- if(disk_needs_genes)
- to_chat(user, "That disk does not have any gene data loaded.")
- return
- if(!user.try_unequip(W, src))
- return
- loaded_disk = W
- to_chat(user, "You load [W] into [src].")
-
- return
- ..()
+ if(disk_needs_genes)
+ to_chat(user, "That disk does not have any gene data loaded.")
+ return TRUE
+ if(!user.try_unequip(W, src))
+ return TRUE
+ loaded_disk = W
+ to_chat(user, "You load [W] into [src].")
+ return TRUE
+ return ..()
// Allows for a trait to be extracted from a seed packet, destroying that seed.
/obj/machinery/botany/extractor
diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm
index 2fbce535f1f..25734ea911c 100644
--- a/code/modules/hydroponics/spreading/spreading.dm
+++ b/code/modules/hydroponics/spreading/spreading.dm
@@ -36,6 +36,7 @@
/obj/effect/dead_plant/attackby()
..()
qdel(src)
+ return TRUE // if we're deleted we can't do any further interactions
/obj/effect/vine
name = "vine"
@@ -202,18 +203,19 @@
if(W.edge && W.w_class < ITEM_SIZE_NORMAL && user.a_intent != I_HURT)
if(!is_mature())
to_chat(user, SPAN_WARNING("\The [src] is not mature enough to yield a sample yet."))
- return
+ return TRUE
if(!seed)
to_chat(user, SPAN_WARNING("There is nothing to take a sample from."))
- return
+ return TRUE
var/needed_skill = seed.mysterious ? SKILL_ADEPT : SKILL_BASIC
if(prob(user.skill_fail_chance(SKILL_BOTANY, 90, needed_skill)))
to_chat(user, SPAN_WARNING("You failed to get a usable sample."))
else
seed.harvest(user,0,1)
current_health -= (rand(3,5)*5)
+ return TRUE
else
- ..()
+ . = ..()
var/damage = W.get_attack_force(user)
if(W.edge)
damage *= 2
diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm
index 2edad5d68c9..a017cc55a1a 100644
--- a/code/modules/hydroponics/trays/tray.dm
+++ b/code/modules/hydroponics/trays/tray.dm
@@ -568,6 +568,7 @@
if(dead)
remove_dead(user)
return TRUE
+ return FALSE
/obj/machinery/portable_atmospherics/hydroponics/examine(mob/user)
. = ..(user)
diff --git a/code/modules/integrated_electronics/core/printer.dm b/code/modules/integrated_electronics/core/printer.dm
index 0499326aaad..52bd8428add 100644
--- a/code/modules/integrated_electronics/core/printer.dm
+++ b/code/modules/integrated_electronics/core/printer.dm
@@ -70,11 +70,13 @@
var/amt = M.amount
if(amt * SHEET_MATERIAL_AMOUNT + materials[M.material.type] > metal_max)
amt = ceil((metal_max - materials[M.material.type]) / SHEET_MATERIAL_AMOUNT)
- if(M.use(amt))
- materials[M.material.type] = min(metal_max, materials[M.material.type] + amt * SHEET_MATERIAL_AMOUNT)
- to_chat(user, "You insert [M.material.solid_name] into \the [src].")
- if(user)
- attack_self(user) // We're really bad at refreshing the UI, so this is the best we've got.
+ if(!M.use(amt))
+ return FALSE
+ materials[M.material.type] = min(metal_max, materials[M.material.type] + amt * SHEET_MATERIAL_AMOUNT)
+ to_chat(user, "You insert [M.material.solid_name] into \the [src].")
+ if(user)
+ attack_self(user) // We're really bad at refreshing the UI, so this is the best we've got.
+ return TRUE
if(istype(O, /obj/item/disk/integrated_circuit/upgrade/advanced))
if(upgraded)
to_chat(user, "[src] already has this upgrade. ")
@@ -99,22 +101,22 @@
var/obj/item/electronic_assembly/EA = O //microtransactions not included
if(EA.battery)
to_chat(user, "Remove [EA]'s power cell first!")
- return
+ return TRUE
if(EA.assembly_components.len)
if(recycling)
- return
+ return TRUE
if(!EA.opened)
to_chat(user, "You can't reach [EA]'s components to remove them!")
- return
+ return TRUE
for(var/V in EA.assembly_components)
var/obj/item/integrated_circuit/IC = V
if(!IC.removable)
to_chat(user, "[EA] has irremovable components in the casing, preventing you from emptying it.")
- return
+ return TRUE
to_chat(user, "You begin recycling [EA]'s components...")
playsound(src, 'sound/items/electronic_assembly_emptying.ogg', 50, TRUE)
if(!do_after(user, 30, target = src) || recycling) //short channel so you don't accidentally start emptying out a complex assembly
- return
+ return TRUE
recycling = TRUE
for(var/V in EA.assembly_components)
recycle(V, null, EA)
diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm
index 34a70cfee41..0fd00002576 100644
--- a/code/modules/integrated_electronics/subtypes/manipulation.dm
+++ b/code/modules/integrated_electronics/subtypes/manipulation.dm
@@ -39,9 +39,9 @@
var/obj/item/gun/energy/gun = O
if(installed_gun)
to_chat(user, "There's already a weapon installed.")
- return
+ return TRUE
if(!user.try_unequip(gun,src))
- return
+ return TRUE
installed_gun = gun
to_chat(user, "You slide \the [gun] into the firing mechanism.")
playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
@@ -56,8 +56,9 @@
var/datum/firemode/fm = installed_gun.firemodes[installed_gun.sel_mode]
set_pin_data(IC_OUTPUT, 2, fm.name)
push_data()
+ return TRUE
else
- ..()
+ return ..()
/obj/item/integrated_circuit/manipulation/weapon_firing/attack_self(var/mob/user)
if(installed_gun)
@@ -184,10 +185,12 @@
if(istype(G))
if(attached_grenade)
to_chat(user, "There is already a grenade attached!")
- else if(user.try_unequip(G,src))
+ return TRUE
+ if(user.try_unequip(G,src))
user.visible_message("\The [user] attaches \a [G] to \the [src]!", "You attach \the [G] to \the [src].")
attach_grenade(G)
G.forceMove(src)
+ return TRUE
else
return ..()
@@ -650,6 +653,7 @@
/obj/item/integrated_circuit/manipulation/ai/attackby(var/obj/item/I, var/mob/user)
if(is_type_in_list(I, list(/obj/item/aicard, /obj/item/paicard, /obj/item/organ/internal/brain_interface)))
load_ai(user, I)
+ return TRUE
else return ..()
/obj/item/integrated_circuit/manipulation/ai/attack_self(user)
diff --git a/code/modules/locks/lock_construct.dm b/code/modules/locks/lock_construct.dm
index 5a64b0c780b..a1060c0063d 100644
--- a/code/modules/locks/lock_construct.dm
+++ b/code/modules/locks/lock_construct.dm
@@ -27,13 +27,13 @@
K.key_data = lock_data
else
to_chat(user, SPAN_WARNING("\The [I] already unlocks something..."))
- return
+ return TRUE
if(istype(I,/obj/item/lock_construct))
var/obj/item/lock_construct/L = I
src.lock_data = L.lock_data
to_chat(user, SPAN_NOTICE("You copy the lock from \the [L] to \the [src], making them identical."))
- return
- ..()
+ return TRUE
+ return ..()
/obj/item/lock_construct/proc/create_lock(var/atom/target, var/mob/user)
. = new /datum/lock(target, lock_data, material?.type)
diff --git a/code/modules/maps/reader.dm b/code/modules/maps/reader.dm
index 59cc3764bf5..efc444d7b0a 100644
--- a/code/modules/maps/reader.dm
+++ b/code/modules/maps/reader.dm
@@ -373,6 +373,8 @@ var/global/dmm_suite/preloader/_preloader = new
if (clear_contents && is_not_noop)
for (var/type_to_delete in types_to_delete())
for (var/atom/pre_existing in crds)
+ if(crds != pre_existing.loc) // avoid deleting multitile objects unnecessarily, only check their 'real' loc
+ continue
if (istype(pre_existing, type_to_delete))
atoms_to_delete |= pre_existing
diff --git a/code/modules/materials/_materials.dm b/code/modules/materials/_materials.dm
index d5aff1e2028..e615eefe25a 100644
--- a/code/modules/materials/_materials.dm
+++ b/code/modules/materials/_materials.dm
@@ -359,6 +359,10 @@ INITIALIZE_IMMEDIATE(/obj/effect/gas_overlay)
/// How much of this boils away per evaporation run?
var/boil_evaporation_per_run = 1
+ /// What verb is used when describing a colored piece of this material? e.g. 'dyed' or 'painted'
+ /// If an item has a null paint_verb, it automatically sets it based on material.
+ var/paint_verb = "painted"
+
// Placeholders for light tiles and rglass.
/decl/material/proc/reinforce(var/mob/user, var/obj/item/stack/material/used_stack, var/obj/item/stack/material/target_stack, var/use_sheets = 1)
if(!used_stack.can_use(use_sheets))
@@ -457,7 +461,6 @@ INITIALIZE_IMMEDIATE(/obj/effect/gas_overlay)
cocktail_ingredient = TRUE
break
-#define FALSEWALL_STATE "fwall_open"
/decl/material/validate()
. = ..()
@@ -522,12 +525,15 @@ INITIALIZE_IMMEDIATE(/obj/effect/gas_overlay)
total += checking_list[chem]
if(total != 1)
. += "[field] adds up to [total] (should be 1)"
- if(icon_base && !check_state_in_icon(FALSEWALL_STATE, icon_base))
- . += "[type] - '[icon_base]' - missing false wall opening animation '[FALSEWALL_STATE]'"
if(dissolves_in == MAT_SOLVENT_IMMUNE && LAZYLEN(dissolves_into))
. += "material is immune to solvents, but has dissolves_into products."
+ if(!paint_verb)
+ . += "material does not have a paint_verb set"
+ else if(!istext(paint_verb))
+ . += "material has a non-text paint_verb value"
+
for(var/i = 0 to 7)
if(icon_base)
if(!check_state_in_icon("[i]", icon_base))
@@ -562,7 +568,6 @@ INITIALIZE_IMMEDIATE(/obj/effect/gas_overlay)
if(length(color) != 7)
. += "invalid color (not #RRGGBB)"
-#undef FALSEWALL_STATE
// Return the matter comprising this material.
/decl/material/proc/get_matter()
diff --git a/code/modules/materials/definitions/liquids/materials_liquid_soup.dm b/code/modules/materials/definitions/liquids/materials_liquid_soup.dm
index d6b9769954a..364ccab4bfe 100644
--- a/code/modules/materials/definitions/liquids/materials_liquid_soup.dm
+++ b/code/modules/materials/definitions/liquids/materials_liquid_soup.dm
@@ -47,10 +47,11 @@
var/list/name_ingredients = ingredients.Copy()
if(length(name_ingredients) > 3)
name_ingredients.Cut(4)
- if(allergen_flags & ALLERGEN_DAIRY) // TODO: check ALLEGEN_CHEESE for cheese-based soups
- LAZYSET(., DATA_MASK_NAME, "[english_list(name_ingredients)] cream [mask_name_suffix]")
- else
- LAZYSET(., DATA_MASK_NAME, "[english_list(name_ingredients)] [mask_name_suffix]")
+ if(isnull(.[DATA_MASK_NAME]) || .[DATA_MASK_NAME] != newdata?[DATA_MASK_NAME]) // preserve custom name if both have it
+ if(allergen_flags & ALLERGEN_DAIRY) // TODO: check ALLEGEN_CHEESE for cheese-based soups
+ LAZYSET(., DATA_MASK_NAME, "[english_list(name_ingredients)] cream [mask_name_suffix]")
+ else
+ LAZYSET(., DATA_MASK_NAME, "[english_list(name_ingredients)] [mask_name_suffix]")
else
LAZYREMOVE(., DATA_MASK_NAME)
diff --git a/code/modules/materials/definitions/solids/materials_solid_butchery.dm b/code/modules/materials/definitions/solids/materials_solid_butchery.dm
index c106771d16f..666d18c6517 100644
--- a/code/modules/materials/definitions/solids/materials_solid_butchery.dm
+++ b/code/modules/materials/definitions/solids/materials_solid_butchery.dm
@@ -120,6 +120,7 @@
sound_manipulate = 'sound/foley/paperpickup2.ogg'
sound_dropped = 'sound/foley/paperpickup1.ogg'
fishing_bait_value = 0
+ paint_verb = "dyed"
/decl/material/solid/organic/skin/fur/gray
uid = "solid_fur_gray"
diff --git a/code/modules/materials/definitions/solids/materials_solid_organic.dm b/code/modules/materials/definitions/solids/materials_solid_organic.dm
index 14d26af5535..b410f85be58 100644
--- a/code/modules/materials/definitions/solids/materials_solid_organic.dm
+++ b/code/modules/materials/definitions/solids/materials_solid_organic.dm
@@ -39,6 +39,14 @@
tensile_strength = 0.75
compost_value = 0
+/decl/material/solid/organic/plastic/foam
+ name = "foam"
+ lore_text = "A plastic polymer in a sponge-like form, filled with air bubbles that make it springy and compressible."
+ hardness = MAT_VALUE_SOFT + 5
+ taste_description = "foam"
+ color = COLOR_BLUE_GRAY // dunno why foam is this gray-teal color in my mind, but it is. maybe gray would also work
+ uid = "solid_foam"
+
/decl/material/solid/organic/wax
name = "wax"
uid = "solid_wax"
@@ -59,6 +67,7 @@
ignition_point = 473
boiling_point = 643
compost_value = 0.2
+ paint_verb = "colored"
/decl/material/solid/organic/plastic/holographic
name = "holographic plastic"
@@ -126,11 +135,11 @@
sound_manipulate = 'sound/foley/paperpickup2.ogg'
sound_dropped = 'sound/foley/paperpickup1.ogg'
compost_value = 0.8
+ paint_verb = "painted"
/decl/material/solid/organic/cloth
name = "cotton"
uid = "solid_cotton"
- use_name = "cotton"
color = "#ffffff"
stack_origin_tech = @'{"materials":2}'
door_icon_base = "wood"
@@ -152,6 +161,7 @@
sound_dropped = 'sound/foley/paperpickup1.ogg'
compost_value = 0.8
has_textile_fibers = TRUE
+ paint_verb = "dyed"
/decl/material/solid/organic/cloth/hemp
name = "hemp"
@@ -288,6 +298,7 @@
/decl/material/solid/organic/leather/fur
name = "tanned pelt"
uid = "solid_tanned_pelt"
+ paint_verb = "dyed"
/decl/material/solid/organic/leather/chitin
name = "treated chitin"
diff --git a/code/modules/materials/definitions/solids/materials_solid_stone.dm b/code/modules/materials/definitions/solids/materials_solid_stone.dm
index 3454761c950..6334b03f1b8 100644
--- a/code/modules/materials/definitions/solids/materials_solid_stone.dm
+++ b/code/modules/materials/definitions/solids/materials_solid_stone.dm
@@ -9,6 +9,7 @@
brute_armor = 3
conductive = 0
construction_difficulty = MAT_VALUE_NORMAL_DIY
+ wall_flags = WALL_HAS_EDGES
wall_blend_icons = list(
'icons/turf/walls/solid.dmi' = TRUE,
'icons/turf/walls/wood.dmi' = TRUE,
diff --git a/code/modules/materials/definitions/solids/materials_solid_wood.dm b/code/modules/materials/definitions/solids/materials_solid_wood.dm
index 6a6f23c98ba..01629ab0acf 100644
--- a/code/modules/materials/definitions/solids/materials_solid_wood.dm
+++ b/code/modules/materials/definitions/solids/materials_solid_wood.dm
@@ -47,6 +47,7 @@
sound_dropped = 'sound/foley/wooddrop1.ogg'
compost_value = 0.2
temperature_burn_milestone_material = /decl/material/solid/organic/wood
+ paint_verb = "stained"
// Wood is hard but can't really give it an edge.
/decl/material/solid/organic/wood/can_hold_edge()
diff --git a/code/modules/materials/material_stack_animal.dm b/code/modules/materials/material_stack_animal.dm
index adb15ced5a0..1ca093a9c26 100644
--- a/code/modules/materials/material_stack_animal.dm
+++ b/code/modules/materials/material_stack_animal.dm
@@ -79,6 +79,7 @@
singular_name = "feather"
plural_name = "feathers"
stack_merge_type = /obj/item/stack/material/skin/feathers
+ paint_verb = "dyed"
/obj/item/stack/material/bone
name = "bones"
diff --git a/code/modules/mechs/components/_components.dm b/code/modules/mechs/components/_components.dm
index 128278d9d65..64ecc2a71d2 100644
--- a/code/modules/mechs/components/_components.dm
+++ b/code/modules/mechs/components/_components.dm
@@ -49,7 +49,8 @@
/obj/item/mech_component/proc/install_component(var/obj/item/thing, var/mob/user)
if(user.try_unequip(thing, src))
user.visible_message(SPAN_NOTICE("\The [user] installs \the [thing] in \the [src]."))
- return 1
+ return TRUE
+ return FALSE
/obj/item/mech_component/proc/update_component_health()
total_damage = brute_damage + burn_damage
diff --git a/code/modules/mechs/components/arms.dm b/code/modules/mechs/components/arms.dm
index 18785d2f72b..009f02efd0c 100644
--- a/code/modules/mechs/components/arms.dm
+++ b/code/modules/mechs/components/arms.dm
@@ -28,8 +28,11 @@
if(istype(thing,/obj/item/robot_parts/robot_component/actuator))
if(motivator)
to_chat(user, SPAN_WARNING("\The [src] already has an actuator installed."))
- return
- if(install_component(thing, user)) motivator = thing
+ return TRUE
+ if(install_component(thing, user))
+ motivator = thing
+ return TRUE
+ return FALSE
else
return ..()
diff --git a/code/modules/mechs/components/body.dm b/code/modules/mechs/components/body.dm
index e5f1a9a4f1b..4d8016e7138 100644
--- a/code/modules/mechs/components/body.dm
+++ b/code/modules/mechs/components/body.dm
@@ -144,19 +144,27 @@
if(istype(thing,/obj/item/robot_parts/robot_component/diagnosis_unit))
if(diagnostics)
to_chat(user, SPAN_WARNING("\The [src] already has a diagnostic system installed."))
- return
- if(install_component(thing, user)) diagnostics = thing
+ return TRUE
+ if(install_component(thing, user))
+ diagnostics = thing
+ return TRUE
+ return FALSE
else if(istype(thing, /obj/item/cell))
if(cell)
to_chat(user, SPAN_WARNING("\The [src] already has a cell installed."))
- return
- if(install_component(thing,user)) cell = thing
+ return TRUE
+ if(install_component(thing,user))
+ cell = thing
+ return TRUE
+ return FALSE
else if(istype(thing, /obj/item/robot_parts/robot_component/armour/exosuit))
if(m_armour)
to_chat(user, SPAN_WARNING("\The [src] already has armour installed."))
- return
+ return TRUE
if(install_component(thing, user))
m_armour = thing
+ return TRUE
+ return FALSE
else
return ..()
diff --git a/code/modules/mechs/components/frame.dm b/code/modules/mechs/components/frame.dm
index 0e34f5b3455..79dcade3a3a 100644
--- a/code/modules/mechs/components/frame.dm
+++ b/code/modules/mechs/components/frame.dm
@@ -72,23 +72,22 @@
return ..(SOUTH)
/obj/structure/heavy_vehicle_frame/attackby(var/obj/item/thing, var/mob/user)
-
// Removing components.
if(IS_CROWBAR(thing))
if(is_reinforced == FRAME_REINFORCED)
if(!do_after(user, 5 * user.skill_delay_mult(SKILL_DEVICES)) || !material)
- return
+ return TRUE
user.visible_message(SPAN_NOTICE("\The [user] crowbars the reinforcement off \the [src]."))
material.create_object(src.loc, 10)
material = null
is_reinforced = 0
- return
+ return TRUE
var/to_remove = input("Which component would you like to remove") as null|anything in list(arms, body, legs, head)
if(!to_remove)
to_chat(user, SPAN_WARNING("There are no components to remove."))
- return
+ return TRUE
if(uninstall_component(to_remove, user))
if(to_remove == arms)
@@ -101,7 +100,7 @@
head = null
update_icon()
- return
+ return TRUE
// Final construction step.
else if(IS_SCREWDRIVER(thing))
@@ -109,7 +108,7 @@
// Check for basic components.
if(!(arms && legs && head && body))
to_chat(user, SPAN_WARNING("There are still parts missing from \the [src]."))
- return
+ return TRUE
// Check for wiring.
if(is_wired < FRAME_WIRED_ADJUSTED)
@@ -117,7 +116,7 @@
to_chat(user, SPAN_WARNING("\The [src]'s wiring has not been adjusted!"))
else
to_chat(user, SPAN_WARNING("\The [src] is not wired!"))
- return
+ return TRUE
// Check for basing metal internal plating.
if(is_reinforced < FRAME_REINFORCED_WELDED)
@@ -127,14 +126,14 @@
to_chat(user, SPAN_WARNING("\The [src]'s internal reinforcement has not been welded down!"))
else
to_chat(user, SPAN_WARNING("\The [src] has no internal reinforcement!"))
- return
+ return TRUE
visible_message(SPAN_NOTICE("\The [user] begins tightening screws, flipping connectors and finishing off \the [src]."))
if(!user.do_skilled(50, SKILL_DEVICES, src))
- return
+ return TRUE
if(is_reinforced < FRAME_REINFORCED_WELDED || is_wired < FRAME_WIRED_ADJUSTED || !(arms && legs && head && body) || QDELETED(src) || QDELETED(user))
- return
+ return TRUE
// We're all done. Finalize the exosuit and pass the frame to the new system.
var/mob/living/exosuit/M = new(get_turf(src), src)
@@ -147,27 +146,27 @@
body = null
qdel(src)
- return
+ return TRUE
// Installing wiring.
else if(IS_COIL(thing))
if(is_wired)
to_chat(user, SPAN_WARNING("\The [src] has already been wired."))
- return
+ return TRUE
var/obj/item/stack/cable_coil/CC = thing
if(CC.get_amount() < 10)
to_chat(user, SPAN_WARNING("You need at least ten units of cable to complete the exosuit."))
- return
+ return TRUE
user.visible_message("\The [user] begins wiring \the [src]...")
if(!do_after(user, 30 * user.skill_delay_mult(SKILL_ELECTRICAL)))
- return
+ return TRUE
if(!CC || !user || !src || CC.get_amount() < 10 || is_wired)
- return
+ return TRUE
CC.use(10)
user.visible_message("\The [user] installs wiring in \the [src].")
@@ -177,12 +176,12 @@
else if(IS_WIRECUTTER(thing))
if(!is_wired)
to_chat(user, "There is no wiring in \the [src] to neaten.")
- return
+ return TRUE
user.visible_message("\The [user] begins adjusting the wiring inside \the [src]...")
var/last_wiring_state = is_wired
if(!do_after(user, 30 * user.skill_delay_mult(SKILL_ELECTRICAL)) || last_wiring_state != is_wired)
- return
+ return TRUE
visible_message("\The [user] [(is_wired == FRAME_WIRED_ADJUSTED) ? "snips some of" : "neatens"] the wiring in \the [src].")
playsound(user.loc, 'sound/items/Wirecutter.ogg', 100, 1)
@@ -193,15 +192,15 @@
if(M.material)
if(is_reinforced)
to_chat(user, SPAN_WARNING("There is already a material reinforcement installed in \the [src]."))
- return
+ return TRUE
if(M.get_amount() < 10)
to_chat(user, SPAN_WARNING("You need at least ten sheets to reinforce \the [src]."))
- return
+ return TRUE
visible_message("\The [user] begins layering the interior of the \the [src] with \the [M].")
if(!do_after(user, 30 * user.skill_delay_mult(SKILL_DEVICES)) || is_reinforced)
- return
+ return TRUE
visible_message("\The [user] reinforces \the [src] with \the [M].")
playsound(user.loc, 'sound/items/Deconstruct.ogg', 50, 1)
@@ -214,16 +213,16 @@
else if(IS_WRENCH(thing))
if(!is_reinforced)
to_chat(user, SPAN_WARNING("There is no metal to secure inside \the [src]."))
- return
+ return TRUE
if(is_reinforced == FRAME_REINFORCED_WELDED)
to_chat(user, SPAN_WARNING("\The [src]'s internal reinforcment has been welded in."))
- return
+ return TRUE
var/last_reinforced_state = is_reinforced
visible_message("\The [user] begins adjusting the metal reinforcement inside \the [src].")
if(!user.do_skilled(4 SECONDS, SKILL_DEVICES,src) || last_reinforced_state != is_reinforced)
- return
+ return TRUE
visible_message("\The [user] [(is_reinforced == 2) ? "unsecures" : "secures"] the metal reinforcement inside \the [src].")
playsound(user.loc, 'sound/items/Ratchet.ogg', 100, 1)
@@ -233,66 +232,67 @@
var/obj/item/weldingtool/WT = thing
if(!is_reinforced)
to_chat(user, SPAN_WARNING("There is no metal to secure inside \the [src]."))
- return
+ return TRUE
if(is_reinforced == FRAME_REINFORCED)
to_chat(user, SPAN_WARNING("The reinforcement inside \the [src] has not been secured."))
- return
+ return TRUE
if(!WT.isOn())
to_chat(user, SPAN_WARNING("Turn \the [WT] on, first."))
- return
+ return TRUE
if(WT.weld(1, user))
var/last_reinforced_state = is_reinforced
visible_message("\The [user] begins welding the metal reinforcement inside \the [src].")
if(!do_after(user, 20 * user.skill_delay_mult(SKILL_DEVICES)) || last_reinforced_state != is_reinforced)
- return
+ return TRUE
visible_message("\The [user] [(is_reinforced == FRAME_REINFORCED_WELDED) ? "unwelds the reinforcement from" : "welds the reinforcement into"] \the [src].")
is_reinforced = (is_reinforced == FRAME_REINFORCED_WELDED) ? FRAME_REINFORCED_SECURE : FRAME_REINFORCED_WELDED
playsound(user.loc, 'sound/items/Welder.ogg', 50, 1)
else
to_chat(user, SPAN_WARNING("Not enough fuel!"))
- return
+ return TRUE
// Installing basic components.
else if(istype(thing,/obj/item/mech_component/manipulators))
if(arms)
to_chat(user, SPAN_WARNING("\The [src] already has manipulators installed."))
- return
+ return TRUE
if(install_component(thing, user))
if(arms)
thing.dropInto(loc)
- return
+ return TRUE
arms = thing
else if(istype(thing,/obj/item/mech_component/propulsion))
if(legs)
to_chat(user, SPAN_WARNING("\The [src] already has a propulsion system installed."))
- return
+ return TRUE
if(install_component(thing, user))
if(legs)
thing.dropInto(loc)
- return
+ return TRUE
legs = thing
else if(istype(thing,/obj/item/mech_component/sensors))
if(head)
to_chat(user, SPAN_WARNING("\The [src] already has a sensor array installed."))
- return
+ return TRUE
if(install_component(thing, user))
if(head)
thing.dropInto(loc)
- return
+ return TRUE
head = thing
else if(istype(thing,/obj/item/mech_component/chassis))
if(body)
to_chat(user, SPAN_WARNING("\The [src] already has an outer chassis installed."))
- return
+ return TRUE
if(install_component(thing, user))
if(body)
thing.dropInto(loc)
- return
+ return TRUE
body = thing
else
return ..()
update_icon()
+ return TRUE
/obj/structure/heavy_vehicle_frame/proc/install_component(var/obj/item/thing, var/mob/user)
var/obj/item/mech_component/MC = thing
diff --git a/code/modules/mechs/components/head.dm b/code/modules/mechs/components/head.dm
index b6b0263522c..98443399466 100644
--- a/code/modules/mechs/components/head.dm
+++ b/code/modules/mechs/components/head.dm
@@ -59,18 +59,27 @@
if(istype(thing, /obj/item/mech_component/control_module))
if(software)
to_chat(user, SPAN_WARNING("\The [src] already has a control modules installed."))
- return
- if(install_component(thing, user)) software = thing
+ return TRUE
+ if(install_component(thing, user))
+ software = thing
+ return TRUE
+ return FALSE
else if(istype(thing,/obj/item/robot_parts/robot_component/radio))
if(radio)
to_chat(user, SPAN_WARNING("\The [src] already has a radio installed."))
- return
- if(install_component(thing, user)) radio = thing
+ return TRUE
+ if(install_component(thing, user))
+ radio = thing
+ return TRUE
+ return FALSE
else if(istype(thing,/obj/item/robot_parts/robot_component/camera))
if(camera)
to_chat(user, SPAN_WARNING("\The [src] already has a camera installed."))
- return
- if(install_component(thing, user)) camera = thing
+ return TRUE
+ if(install_component(thing, user))
+ camera = thing
+ return TRUE
+ return FALSE
else
return ..()
@@ -107,15 +116,14 @@
to_chat(user, SPAN_NOTICE("It has [max_installed_software - LAZYLEN(installed_software)] empty slot\s remaining out of [max_installed_software]."))
/obj/item/mech_component/control_module/attackby(var/obj/item/thing, var/mob/user)
-
if(istype(thing, /obj/item/stock_parts/circuitboard/exosystem))
install_software(thing, user)
- return
+ return TRUE
if(IS_SCREWDRIVER(thing))
- var/result = ..()
+ . = ..()
update_software()
- return result
+ return
else
return ..()
diff --git a/code/modules/mechs/components/legs.dm b/code/modules/mechs/components/legs.dm
index b6d0d492316..39c096f7153 100644
--- a/code/modules/mechs/components/legs.dm
+++ b/code/modules/mechs/components/legs.dm
@@ -26,8 +26,11 @@
if(istype(thing,/obj/item/robot_parts/robot_component/actuator))
if(motivator)
to_chat(user, SPAN_WARNING("\The [src] already has an actuator installed."))
- return
- if(install_component(thing, user)) motivator = thing
+ return TRUE
+ if(install_component(thing, user))
+ motivator = thing
+ return TRUE
+ return FALSE
else
return ..()
diff --git a/code/modules/mechs/equipment/combat_projectile.dm b/code/modules/mechs/equipment/combat_projectile.dm
index ee9047d24e9..16756e060d6 100644
--- a/code/modules/mechs/equipment/combat_projectile.dm
+++ b/code/modules/mechs/equipment/combat_projectile.dm
@@ -1,13 +1,14 @@
/obj/item/mech_equipment/mounted_system/projectile/attackby(var/obj/item/O, var/mob/user)
var/obj/item/gun/projectile/automatic/A = holding
if(!istype(A))
- return
+ return FALSE
if(istype(O, /obj/item/crowbar))
A.unload_ammo(user)
to_chat(user, SPAN_NOTICE("You remove the ammo magazine from \the [src]."))
else if(istype(O, A.magazine_type))
A.load_ammo(O, user)
to_chat(user, SPAN_NOTICE("You load the ammo magazine into \the [src]."))
+ return TRUE
/obj/item/mech_equipment/mounted_system/projectile/attack_self(var/mob/user)
. = ..()
diff --git a/code/modules/mechs/equipment/medical.dm b/code/modules/mechs/equipment/medical.dm
index 4dc126c7cc7..7c39947f122 100644
--- a/code/modules/mechs/equipment/medical.dm
+++ b/code/modules/mechs/equipment/medical.dm
@@ -31,8 +31,9 @@
/obj/item/mech_equipment/sleeper/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/chems/glass))
- sleeper.attackby(I, user)
- else return ..()
+ return sleeper.attackby(I, user)
+ else
+ return ..()
/obj/item/mech_equipment/sleeper/afterattack(var/atom/target, var/mob/living/user, var/inrange, var/params)
. = ..()
@@ -77,11 +78,11 @@
/obj/machinery/sleeper/mounted/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/chems/glass))
if(!user.try_unequip(I, src))
- return
-
+ return TRUE
if(beaker)
- beaker.forceMove(get_turf(src))
+ user.put_in_hands(beaker)
user.visible_message("\The [user] removes \the [beaker] from \the [src].", "You remove \the [beaker] from \the [src].")
beaker = I
user.visible_message("\The [user] adds \a [I] to \the [src].", "You add \a [I] to \the [src].")
-
+ return TRUE
+ return FALSE
diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm
index b5557bda3c9..15c5846a8a4 100644
--- a/code/modules/mining/abandonedcrates.dm
+++ b/code/modules/mining/abandonedcrates.dm
@@ -173,24 +173,24 @@
. = 0
/obj/structure/closet/crate/secure/loot/attackby(obj/item/W, mob/user)
- if(locked)
- if (IS_MULTITOOL(W)) // Greetings Urist McProfessor, how about a nice game of cows and bulls?
- to_chat(user, "DECA-CODE LOCK ANALYSIS:")
- if (attempts == 1)
- to_chat(user, "* Anti-Tamper system will activate on the next failed access attempt.")
- else
- to_chat(user, "* Anti-Tamper system will activate after [src.attempts] failed access attempts.")
- if(lastattempt.len)
- var/bulls = 0
- var/cows = 0
+ if(!locked || !IS_MULTITOOL(W))
+ return ..()
+ // Greetings Urist McProfessor, how about a nice game of cows and bulls?
+ to_chat(user, "DECA-CODE LOCK ANALYSIS:")
+ if (attempts == 1)
+ to_chat(user, "* Anti-Tamper system will activate on the next failed access attempt.")
+ else
+ to_chat(user, "* Anti-Tamper system will activate after [src.attempts] failed access attempts.")
+ if(lastattempt.len)
+ var/bulls = 0
+ var/cows = 0
- var/list/code_contents = code.Copy()
- for(var/i in 1 to codelen)
- if(lastattempt[i] == code[i])
- ++bulls
- else if(lastattempt[i] in code_contents)
- ++cows
- code_contents -= lastattempt[i]
- to_chat(user, "Last code attempt had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions.")
- return
- ..()
+ var/list/code_contents = code.Copy()
+ for(var/i in 1 to codelen)
+ if(lastattempt[i] == code[i])
+ ++bulls
+ else if(lastattempt[i] in code_contents)
+ ++cows
+ code_contents -= lastattempt[i]
+ to_chat(user, "Last code attempt had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions.")
+ return TRUE
diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm
index 7dd751cd744..acf7751d981 100644
--- a/code/modules/mining/drilling/drill.dm
+++ b/code/modules/mining/drilling/drill.dm
@@ -14,6 +14,7 @@
uncreated_component_parts = null
stat_immune = 0
base_type = /obj/machinery/mining_drill
+ z_flags = ZMM_WIDE_LOAD
/// The drill's FSM, keeping track of which state the drill is currently in.
var/datum/state_machine/drill/state_machine = null
diff --git a/code/modules/mining/machinery/material_extractor.dm b/code/modules/mining/machinery/material_extractor.dm
index bd6e33dc6a4..2481dfbd8b4 100644
--- a/code/modules/mining/machinery/material_extractor.dm
+++ b/code/modules/mining/machinery/material_extractor.dm
@@ -156,28 +156,28 @@
var/datum/extension/atmospherics_connection/connection = get_extension(src, /datum/extension/atmospherics_connection)
if(connection.disconnect())
to_chat(user, SPAN_NOTICE("You disconnect \the [src] from the port."))
- return
+ return TRUE
else
var/obj/machinery/atmospherics/portables_connector/possible_port = locate(/obj/machinery/atmospherics/portables_connector) in loc
if(possible_port)
if(connection.connect(possible_port))
to_chat(user, SPAN_NOTICE("You connect \the [src] to the port."))
- return
+ return TRUE
else
to_chat(user, SPAN_WARNING("\The [src] failed to connect to the port."))
- return
+ return TRUE
if(istype(I, /obj/item/chems/glass))
if(isnull(output_container))
if(!user.try_unequip(I, src))
- return
+ return TRUE
output_container = I
events_repository.register(/decl/observ/destroyed, output_container, src, TYPE_PROC_REF(/obj/machinery/material_processing/extractor, remove_container))
user.visible_message(SPAN_NOTICE("\The [user] places \a [I] in \the [src]."), SPAN_NOTICE("You place \a [I] in \the [src]."))
- return
+ return TRUE
to_chat(user, SPAN_WARNING("\The [src] already has an output container!"))
- return
+ return TRUE
. = ..()
/obj/machinery/material_processing/extractor/proc/remove_container()
diff --git a/code/modules/mob/grab/grab_datum.dm b/code/modules/mob/grab/grab_datum.dm
index 0423cd2b536..333030b75ef 100644
--- a/code/modules/mob/grab/grab_datum.dm
+++ b/code/modules/mob/grab/grab_datum.dm
@@ -218,9 +218,10 @@
/decl/grab/proc/enter_as_up(var/obj/item/grab/grab)
/decl/grab/proc/item_attack(var/obj/item/grab/grab, var/obj/item)
+ return FALSE
/decl/grab/proc/resolve_item_attack(var/obj/item/grab/grab, var/mob/living/human/user, var/obj/item/I, var/target_zone)
- return 0
+ return FALSE
/decl/grab/proc/handle_resist(var/obj/item/grab/grab)
var/mob/living/affecting = grab.get_affecting_mob()
diff --git a/code/modules/mob/grab/grab_object.dm b/code/modules/mob/grab/grab_object.dm
index 5003b39ae9b..2bfa1693d4c 100644
--- a/code/modules/mob/grab/grab_object.dm
+++ b/code/modules/mob/grab/grab_object.dm
@@ -279,7 +279,8 @@
/obj/item/grab/attackby(obj/W, mob/user)
if(user == assailant)
- current_grab.item_attack(src, W)
+ return current_grab.item_attack(src, W)
+ return FALSE
/obj/item/grab/proc/assailant_reverse_facing()
return current_grab.reverse_facing
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index a3b3e4a2b07..5d8cd67706c 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -310,16 +310,18 @@
unequip(object)
if(client)
client.screen -= object
- object.reset_plane_and_layer()
object.screen_loc = null
if(!QDELETED(object))
if(target)
object.forceMove(target)
else
object.dropInto(loc)
+ object.reset_plane_and_layer() // this should be done post-move to avoid wasting an icon update
if(isitem(object))
var/obj/item/item = object
item.dropped(src, play_dropsound)
+ if(!QDELETED(object)) // dropped might qdelete us
+ object.compile_overlays() // avoid world overlays on inventory state and vice versa
return TRUE
/mob/proc/drop_held_items()
diff --git a/code/modules/mob/living/bot/bot.dm b/code/modules/mob/living/bot/bot.dm
index 89b581adbf3..4a88a0fa035 100644
--- a/code/modules/mob/living/bot/bot.dm
+++ b/code/modules/mob/living/bot/bot.dm
@@ -94,7 +94,7 @@
to_chat(user, "Please close the access panel before locking it.")
else
to_chat(user, "Access denied.")
- return
+ return TRUE
else if(IS_SCREWDRIVER(O))
if(!locked)
open = !open
@@ -102,7 +102,7 @@
Interact(usr)
else
to_chat(user, "You need to unlock the controls first.")
- return
+ return TRUE
else if(IS_WELDER(O))
if(current_health < get_max_health())
if(open)
@@ -112,9 +112,9 @@
to_chat(user, "Unable to repair with the maintenance panel closed.")
else
to_chat(user, "\The [src] does not need a repair.")
- return
+ return TRUE
else
- ..()
+ return ..()
/mob/living/bot/attack_ai(var/mob/living/user)
Interact(user)
diff --git a/code/modules/mob/living/bot/medibot.dm b/code/modules/mob/living/bot/medibot.dm
index e0f4c842d86..cf174faa8ce 100644
--- a/code/modules/mob/living/bot/medibot.dm
+++ b/code/modules/mob/living/bot/medibot.dm
@@ -159,18 +159,18 @@
if(istype(O, /obj/item/chems/glass))
if(locked)
to_chat(user, "You cannot insert a beaker because the panel is locked.")
- return
+ return TRUE
if(!isnull(reagent_glass))
to_chat(user, "There is already a beaker loaded.")
- return
+ return TRUE
if(!user.try_unequip(O, src))
- return
+ return TRUE
reagent_glass = O
to_chat(user, "You insert [O].")
- return
+ return TRUE
else
- ..()
+ return ..()
/mob/living/bot/medbot/default_disarm_interaction(mob/user)
if(!is_tipped)
diff --git a/code/modules/mob/living/bot/mulebot.dm b/code/modules/mob/living/bot/mulebot.dm
index 255cc333ade..12d54b83759 100644
--- a/code/modules/mob/living/bot/mulebot.dm
+++ b/code/modules/mob/living/bot/mulebot.dm
@@ -116,7 +116,7 @@
safety = !safety
/mob/living/bot/mulebot/attackby(var/obj/item/O, var/mob/user)
- ..()
+ . = ..()
update_icon()
/mob/living/bot/mulebot/proc/obeyCommand(var/command)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 6f062779895..9740e233298 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -1521,12 +1521,12 @@ default behaviour is:
if(grab.get_affecting_mob() == src && !istype(grab.current_grab, /decl/grab/simple/control))
qdel(grab)
if(istype(ai))
- ai.retaliate(M)
+ ai.on_buckled(M)
/mob/living/try_make_grab(mob/living/user, defer_hand = FALSE)
. = ..()
if(istype(ai))
- ai.retaliate(user)
+ ai.on_grabbed(user)
/mob/living/can_buckle_mob(var/mob/living/dropping)
. = ..() && stat == CONSCIOUS && !buckled && dropping.mob_size <= mob_size
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 7fd42741310..feec39924e9 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -559,7 +559,6 @@ var/global/list/custom_ai_icons_by_ckey_and_name = list()
/mob/living/silicon/ai/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/aicard))
-
var/obj/item/aicard/card = W
card.grab_ai(src, user)
@@ -568,24 +567,23 @@ var/global/list/custom_ai_icons_by_ckey_and_name = list()
user.visible_message("\The [user] starts to unbolt \the [src] from the plating...")
if(!do_after(user,40, src))
user.visible_message("\The [user] decides not to unbolt \the [src].")
- return
+ return TRUE
user.visible_message("\The [user] finishes unfastening \the [src]!")
anchored = FALSE
- return
+ return TRUE
else
user.visible_message("\The [user] starts to bolt \the [src] to the plating...")
if(!do_after(user,40,src))
user.visible_message("\The [user] decides not to bolt \the [src].")
- return
+ return TRUE
user.visible_message("\The [user] finishes fastening down \the [src]!")
anchored = TRUE
- return
+ return TRUE
if(try_stock_parts_install(W, user))
- return
+ return TRUE
if(try_stock_parts_removal(W, user))
- return
- else
- return ..()
+ return TRUE
+ return ..()
/mob/living/silicon/ai/proc/control_integrated_radio()
set name = "Radio Settings"
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index 9abf40bffb9..742c03a9c49 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -284,9 +284,9 @@ var/global/list/possible_say_verbs = list(
to_chat(src, SPAN_NOTICE("Your access has been updated!"))
return FALSE // don't continue processing click callstack.
if(try_stock_parts_install(W, user))
- return
+ return TRUE
if(try_stock_parts_removal(W, user))
- return
+ return TRUE
var/force = W.get_attack_force(user)
if(force)
visible_message(SPAN_DANGER("[user] attacks [src] with [W]!"))
@@ -296,7 +296,7 @@ var/global/list/possible_say_verbs = list(
spawn(1)
if(stat != DEAD) fold()
- return
+ return TRUE
/mob/living/silicon/pai/default_interaction(mob/user)
. = ..()
diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm
index 117cea77129..e8c86f234f8 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone.dm
@@ -167,33 +167,26 @@
//Drones cannot be upgraded with borg modules so we need to catch some items before they get used in ..().
/mob/living/silicon/robot/drone/attackby(var/obj/item/W, var/mob/user)
-
if(istype(W, /obj/item/borg/upgrade))
to_chat(user, "\The [src] is not compatible with \the [W].")
return TRUE
-
else if(IS_CROWBAR(W) && user.a_intent != I_HURT)
to_chat(user, "\The [src] is hermetically sealed. You can't open the case.")
- return
-
+ return TRUE
else if (istype(W, /obj/item/card/id)||istype(W, /obj/item/modular_computer))
-
if(stat == DEAD)
-
if(!get_config_value(/decl/config/toggle/on/allow_drone_spawn) || emagged || should_be_dead()) //It's dead, Dave.
to_chat(user, "The interface is fried, and a distressing burned smell wafts from the robot's interior. You're not rebooting this one.")
- return
-
+ return TRUE
if(!allowed(usr))
to_chat(user, "Access denied.")
- return
-
+ return TRUE
var/decl/pronouns/pronouns = user.get_pronouns()
user.visible_message( \
SPAN_NOTICE("\The [user] swipes [pronouns.his] ID card through \the [src], attempting to reboot it."), \
SPAN_NOTICE("You swipe your ID card through \the [src], attempting to reboot it."))
request_player()
- return
+ return TRUE
var/decl/pronouns/pronouns = user.get_pronouns()
user.visible_message( \
@@ -204,9 +197,8 @@
shut_down()
else
to_chat(user, SPAN_DANGER("Access denied."))
- return
-
- ..()
+ return TRUE
+ return ..()
/mob/living/silicon/robot/drone/emag_act(var/remaining_charges, var/mob/user)
if(!client || stat == DEAD)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 4d2dd4da771..e588fc13400 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -443,7 +443,6 @@
return 2
/mob/living/silicon/robot/attackby(obj/item/W, mob/user)
-
if(istype(W, /obj/item/inducer) || istype(W, /obj/item/handcuffs))
return TRUE
@@ -452,7 +451,7 @@
var/datum/robot_component/C = components[V]
if(!C.installed && C.accepts_component(W))
if(!user.try_unequip(W))
- return
+ return TRUE
C.installed = 1
C.wrapped = W
C.install()
@@ -463,20 +462,19 @@
C.brute_damage = WC.brute_damage
C.electronics_damage = WC.burn_damage
- to_chat(usr, "You install the [W.name].")
- return
+ to_chat(user, "You install the [W.name].")
+ return TRUE
// If the robot is having something inserted which will remain inside it, self-inserting must be handled before exiting to avoid logic errors. Use the handle_selfinsert proc.
if(try_stock_parts_install(W, user))
- return
+ return TRUE
if(IS_WELDER(W) && user.a_intent != I_HURT)
if (src == user)
to_chat(user, "You lack the reach to be able to repair yourself.")
- return
-
+ return TRUE
if (!get_damage(BRUTE))
to_chat(user, "Nothing to fix here!")
- return
+ return TRUE
var/obj/item/weldingtool/WT = W
if (WT.weld(0))
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
@@ -485,22 +483,22 @@
user.visible_message(SPAN_NOTICE("\The [user] has fixed some of the dents on \the [src]!"))
else
to_chat(user, "Need more welding fuel!")
- return
+ return TRUE
else if(istype(W, /obj/item/stack/cable_coil) && (wiresexposed || isdrone(src)))
if (!get_damage(BURN))
to_chat(user, "Nothing to fix here!")
- return
+ return TRUE
var/obj/item/stack/cable_coil/coil = W
if (coil.use(1))
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
heal_damage(BURN, 30)
user.visible_message(SPAN_NOTICE("\The [user] has fixed some of the burnt wires on \the [src]!"))
+ return TRUE
else if(IS_CROWBAR(W) && user.a_intent != I_HURT) // crowbar means open or close the cover - we all know what a crowbar is by now
if(opened)
if(cell)
-
user.visible_message(
SPAN_NOTICE("\The [user] begins clasping shut \the [src]'s maintenance hatch."),
SPAN_NOTICE("You begin closing up \the [src]."))
@@ -514,7 +512,7 @@
//Cell is out, wires are exposed, remove CPU, produce damaged chassis, baleet original mob.
if(!central_processor)
to_chat(user, "\The [src] has no central processor to remove.")
- return
+ return TRUE
user.visible_message(
SPAN_NOTICE("\The [user] begins ripping \the [central_processor] out of \the [src]."),
@@ -522,7 +520,6 @@
if(do_after(user, 50, src))
dismantle(user)
-
else
// Okay we're not removing the cell or a CPU, but maybe something else?
var/list/removable_components = list()
@@ -534,7 +531,7 @@
removable_components |= stock_parts
var/remove = input(user, "Which component do you want to pry out?", "Remove Component") as null|anything in removable_components
if(!remove || !opened || !(remove in (stock_parts|components)) || !Adjacent(user))
- return
+ return TRUE
var/obj/item/removed_item
if(istype(components[remove], /datum/robot_component))
var/datum/robot_component/C = components[remove]
@@ -562,7 +559,7 @@
to_chat(user, "You open \the [src]'s maintenance hatch.")
opened = 1
update_icon()
-
+ return TRUE
else if (istype(W, /obj/item/cell) && opened) // trying to put a cell inside
var/datum/robot_component/C = components["power cell"]
if(wiresexposed)
@@ -581,62 +578,64 @@
// This means that removing and replacing a power cell will repair the mount.
C.brute_damage = 0
C.electronics_damage = 0
-
+ return TRUE
else if(IS_WIRECUTTER(W) || IS_MULTITOOL(W))
if (wiresexposed)
wires.Interact(user)
else
to_chat(user, "You can't reach the wiring.")
+ return TRUE
else if(IS_SCREWDRIVER(W) && opened && !cell) // haxing
wiresexposed = !wiresexposed
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"].")
update_icon()
-
+ return TRUE
else if(IS_SCREWDRIVER(W) && opened && cell) // radio
if(silicon_radio)
silicon_radio.attackby(W,user)//Push it to the radio to let it handle everything
else
to_chat(user, "Unable to locate a radio.")
update_icon()
-
+ return TRUE
else if(istype(W, /obj/item/encryptionkey/) && opened)
if(silicon_radio)//sanityyyyyy
silicon_radio.attackby(W,user)//GTFO, you have your own procs
else
to_chat(user, "Unable to locate a radio.")
+ return TRUE
else if (istype(W, /obj/item/card/id)||istype(W, /obj/item/modular_computer)||istype(W, /obj/item/card/robot)) // trying to unlock the interface with an ID card
if(emagged)//still allow them to open the cover
to_chat(user, "The interface seems slightly damaged.")
if(opened)
to_chat(user, "You must close the cover to swipe an ID card.")
else
- if(allowed(usr))
+ if(allowed(user))
locked = !locked
to_chat(user, "You [ locked ? "lock" : "unlock"] [src]'s interface.")
update_icon()
else
to_chat(user, "Access denied.")
+ return TRUE
else if(istype(W, /obj/item/borg/upgrade))
var/obj/item/borg/upgrade/U = W
if(!opened)
- to_chat(usr, "You must access the borgs internals!")
+ to_chat(user, "You must access [src]'s internals!")
else if(!src.module && U.require_module)
- to_chat(usr, "The borg must choose a module before he can be upgraded!")
+ to_chat(user, "[src] must choose a module before they can be upgraded!")
else if(U.locked)
- to_chat(usr, "The upgrade is locked and cannot be used yet!")
+ to_chat(user, "The upgrade is locked and cannot be used yet!")
else
if(U.action(src))
if(!user.try_unequip(U, src))
- return
- to_chat(usr, "You apply the upgrade to [src]!")
+ return TRUE
+ to_chat(user, "You apply the upgrade to [src]!")
handle_selfinsert(W, user)
else
- to_chat(usr, "Upgrade error!")
-
- else
- if(!(istype(W, /obj/item/robotanalyzer) || istype(W, /obj/item/scanner/health)) && W.get_attack_force(user) && user.a_intent != I_HELP)
- spark_at(src, 5, holder=src)
- return ..()
+ to_chat(user, "Upgrade error!")
+ return TRUE
+ if(!(istype(W, /obj/item/robotanalyzer) || istype(W, /obj/item/scanner/health)) && W.get_attack_force(user) && user.a_intent != I_HELP)
+ spark_at(src, 5, holder=src)
+ return ..()
/mob/living/silicon/robot/proc/handle_selfinsert(obj/item/W, mob/user)
if ((user == src) && istype(get_active_held_item(),/obj/item/gripper))
diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm
index afc7f628eb2..eef4666321c 100644
--- a/code/modules/mob/living/simple_animal/friendly/corgi.dm
+++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm
@@ -127,15 +127,14 @@
dance()
/mob/living/simple_animal/corgi/attackby(var/obj/item/O, var/mob/user) //Marker -Agouri
- if(istype(O, /obj/item/newspaper))
- if(!stat)
- visible_message(SPAN_NOTICE("\The [user] baps \the [src] on the nose with the rolled-up [O.name]!"))
- spawn(0)
- for(var/i in list(1,2,4,8,4,2,1,2))
- set_dir(i)
- sleep(1)
+ if(istype(O, /obj/item/newspaper) && !stat)
+ visible_message(SPAN_NOTICE("\The [user] baps \the [src] on the nose with the rolled-up [O.name]!"))
+ var/datum/mob_controller/corgi/corgi_ai = ai
+ if(istype(corgi_ai))
+ corgi_ai.dance()
+ return TRUE
else
- ..()
+ return ..()
/mob/living/simple_animal/corgi/puppy
name = "\improper corgi puppy"
diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
index c0fb4c3055b..b1df77c7be4 100644
--- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
+++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
@@ -245,19 +245,19 @@ var/global/chicken_count = 0
global.chicken_count -= 1
/mob/living/simple_animal/fowl/chicken/attackby(var/obj/item/O, var/mob/user)
- if(istype(O, /obj/item/food)) //feedin' dem chickens
- var/obj/item/food/G = O
- if(findtext(G.get_grown_tag(), "wheat")) // includes chopped, crushed, dried etc.
- if(!stat && eggsleft < 4)
- user.visible_message(SPAN_NOTICE("[user] feeds \the [O] to \the [src]! It clucks happily."), SPAN_NOTICE("You feed \the [O] to \the [src]! It clucks happily."), SPAN_NOTICE("You hear clucking."))
- qdel(O)
- eggsleft += rand(1, 2)
- else
- to_chat(user, SPAN_NOTICE("\The [src] doesn't seem hungry!"))
+ if(istype(O, /obj/item/food))
+ return ..()
+ var/obj/item/food/G = O //feedin' dem chickens
+ if(findtext(G.get_grown_tag(), "wheat")) // includes chopped, crushed, dried etc.
+ if(!stat && eggsleft < 4)
+ user.visible_message(SPAN_NOTICE("[user] feeds \the [O] to \the [src]! It clucks happily."), SPAN_NOTICE("You feed \the [O] to \the [src]! It clucks happily."), SPAN_NOTICE("You hear clucking."))
+ qdel(O)
+ eggsleft += rand(1, 2)
else
- to_chat(user, "\The [src] doesn't seem interested in that.")
+ to_chat(user, SPAN_NOTICE("\The [src] doesn't seem hungry!"))
else
- ..()
+ to_chat(user, "\The [src] doesn't seem interested in that.")
+ return TRUE
/mob/living/simple_animal/fowl/chicken/handle_living_non_stasis_processes()
if((. = ..()) && prob(1) && eggsleft > 0)
diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm
index 8c03c14db01..c32b39b1a42 100644
--- a/code/modules/mob/living/simple_animal/hostile/bear.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bear.dm
@@ -108,7 +108,7 @@
var/datum/mob_controller/aggressive/bear/bearbrain = ai
bearbrain.stance_step = 12
ai.set_target(user)
- ..()
+ return ..()
/mob/living/simple_animal/hostile/bear/attack_hand(mob/user)
if(istype(ai))
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/parrot.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/parrot.dm
index a517ee82346..5f8e5040ffb 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/parrot.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/parrot.dm
@@ -332,15 +332,14 @@
//Mobs with objects
/mob/living/simple_animal/hostile/parrot/attackby(var/obj/item/O, var/mob/user)
- ..()
- if(!stat && !client && !istype(O, /obj/item/stack/medical))
- if(O.get_attack_force(user))
- if(parrot_state == PARROT_PERCH)
- parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
- parrot_interest = user
- parrot_state = PARROT_SWOOP | PARROT_FLEE
- drop_held_item(0)
- update_icon()
+ . = ..()
+ if(!stat && !client && !istype(O, /obj/item/stack/medical) && O.get_attack_force(user))
+ if(parrot_state == PARROT_PERCH)
+ parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
+ parrot_interest = user
+ parrot_state = PARROT_SWOOP | PARROT_FLEE
+ drop_held_item(0)
+ update_icon()
//Bullets
/mob/living/simple_animal/hostile/parrot/bullet_act(var/obj/item/projectile/Proj)
diff --git a/code/modules/mob/living/simple_animal/passive/horse.dm b/code/modules/mob/living/simple_animal/passive/horse.dm
index b2b7590e9bc..d9ea080a559 100644
--- a/code/modules/mob/living/simple_animal/passive/horse.dm
+++ b/code/modules/mob/living/simple_animal/passive/horse.dm
@@ -21,6 +21,7 @@
emote_speech = list("Neigh!","NEIGH!","Neigh?")
emote_hear = list("neighs","whinnies")
emote_see = list("canters", "scuffs the ground", "shakes its mane", "tosses its head")
+ spooked_by_grab = FALSE // todo: tamed vs untamed?
/datum/mob_controller/passive/horse/retaliate(atom/source)
SHOULD_CALL_PARENT(FALSE)
diff --git a/code/modules/mob_holder/_holder.dm b/code/modules/mob_holder/_holder.dm
index 7efdbfa7f9c..a462eff5ba0 100644
--- a/code/modules/mob_holder/_holder.dm
+++ b/code/modules/mob_holder/_holder.dm
@@ -143,4 +143,7 @@
/obj/item/holder/attackby(obj/item/W, mob/user)
for(var/mob/M in src.contents)
- M.attackby(W,user)
+ . = M.attackby(W,user)
+ if(.)
+ return
+ return FALSE
\ No newline at end of file
diff --git a/code/modules/modular_computers/computers/modular_computer/interaction.dm b/code/modules/modular_computers/computers/modular_computer/interaction.dm
index b219fec7dcf..6bb4a4f41b8 100644
--- a/code/modules/modular_computers/computers/modular_computer/interaction.dm
+++ b/code/modules/modular_computers/computers/modular_computer/interaction.dm
@@ -87,20 +87,21 @@
/obj/item/modular_computer/attackby(var/obj/item/W, var/mob/user)
var/datum/extension/assembly/assembly = get_extension(src, /datum/extension/assembly)
- if(assembly.attackby(W, user))
+ . = assembly.attackby(W, user)
+ if(.)
update_verbs()
- return
+ return TRUE
if(IS_PEN(W) && (W.w_class <= ITEM_SIZE_TINY) && stores_pen)
if(istype(stored_pen))
to_chat(user, "There is already a pen in [src].")
- return
+ return TRUE
if(!user.try_unequip(W, src))
- return
+ return TRUE
stored_pen = W
update_verbs()
to_chat(user, "You insert [W] into [src].")
- return
+ return TRUE
return ..()
/obj/item/modular_computer/examine(mob/user)
diff --git a/code/modules/modular_computers/hardware/ai_slot.dm b/code/modules/modular_computers/hardware/ai_slot.dm
index 8fb4f56a57a..c25e0abb1d5 100644
--- a/code/modules/modular_computers/hardware/ai_slot.dm
+++ b/code/modules/modular_computers/hardware/ai_slot.dm
@@ -22,19 +22,19 @@
..()
/obj/item/stock_parts/computer/ai_slot/attackby(var/obj/item/W, var/mob/user)
- if(..())
- return 1
if(istype(W, /obj/item/aicard))
if(stored_card)
to_chat(user, "\The [src] is already occupied.")
- return
+ return TRUE
if(!user.try_unequip(W, src))
- return
+ return TRUE
do_insert_ai(user, W)
return TRUE
if(IS_SCREWDRIVER(W))
to_chat(user, "You manually remove \the [stored_card] from \the [src].")
do_eject_ai(user)
+ return TRUE
+ return ..()
/obj/item/stock_parts/computer/ai_slot/Destroy()
if(stored_card)
diff --git a/code/modules/modular_computers/hardware/charge_stick_slot.dm b/code/modules/modular_computers/hardware/charge_stick_slot.dm
index d2f7b010d7c..451696ff85d 100644
--- a/code/modules/modular_computers/hardware/charge_stick_slot.dm
+++ b/code/modules/modular_computers/hardware/charge_stick_slot.dm
@@ -82,9 +82,9 @@
loc.verbs |= /obj/item/stock_parts/computer/charge_stick_slot/proc/verb_eject_stick
return TRUE
-/obj/item/stock_parts/computer/charge_stick_slot/attackby(obj/item/card/id/I, mob/user)
+/obj/item/stock_parts/computer/charge_stick_slot/attackby(obj/item/charge_stick/I, mob/user)
if(!istype(I))
- return
+ return ..()
insert_stick(I, user)
return TRUE
diff --git a/code/modules/modular_computers/hardware/disk_slot.dm b/code/modules/modular_computers/hardware/disk_slot.dm
index 3bf653e67b4..cae1cb5fccf 100644
--- a/code/modules/modular_computers/hardware/disk_slot.dm
+++ b/code/modules/modular_computers/hardware/disk_slot.dm
@@ -99,7 +99,7 @@
/obj/item/stock_parts/computer/data_disk_drive/attackby(obj/item/disk/new_disk, mob/user)
if(!istype(new_disk))
- return
+ return ..()
insert_disk(new_disk, user)
return TRUE
diff --git a/code/modules/modular_computers/hardware/drive_slot.dm b/code/modules/modular_computers/hardware/drive_slot.dm
index dacade6012b..8da6019f774 100644
--- a/code/modules/modular_computers/hardware/drive_slot.dm
+++ b/code/modules/modular_computers/hardware/drive_slot.dm
@@ -96,7 +96,7 @@
/obj/item/stock_parts/computer/drive_slot/attackby(obj/item/stock_parts/computer/hard_drive/portable/I, mob/user)
if(!istype(I))
- return
+ return ..()
insert_drive(I, user)
return TRUE
diff --git a/code/modules/modular_computers/hardware/lan_port.dm b/code/modules/modular_computers/hardware/lan_port.dm
index 09e516f290b..cde307de70d 100644
--- a/code/modules/modular_computers/hardware/lan_port.dm
+++ b/code/modules/modular_computers/hardware/lan_port.dm
@@ -95,3 +95,4 @@
to_chat(user, SPAN_NOTICE("You cut the cables and dismantle the network terminal."))
qdel(terminal)
return TRUE
+ return FALSE
\ No newline at end of file
diff --git a/code/modules/modular_computers/hardware/nano_printer.dm b/code/modules/modular_computers/hardware/nano_printer.dm
index 68b4968a247..6495b77d0ed 100644
--- a/code/modules/modular_computers/hardware/nano_printer.dm
+++ b/code/modules/modular_computers/hardware/nano_printer.dm
@@ -37,11 +37,12 @@
return 0
return 1
+// TODO: unify with /obj/item/stock_parts/printer somehow?
/obj/item/stock_parts/computer/nano_printer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/paper))
if(stored_paper >= max_paper)
to_chat(user, "You try to add \the [W] into \the [src], but its paper bin is full.")
- return
+ return TRUE
to_chat(user, "You insert \the [W] into [src].")
qdel(W)
@@ -51,13 +52,16 @@
var/num_of_pages_added = 0
if(stored_paper >= max_paper)
to_chat(user, "You try to add \the [W] into \the [src], but its paper bin is full.")
- return
- for(var/obj/item/bundleitem in B) //loop through items in bundle
- if(istype(bundleitem, /obj/item/paper)) //if item is paper (and not photo), add into the bin
- B.pages.Remove(bundleitem)
- qdel(bundleitem)
- num_of_pages_added++
- stored_paper++
+ return TRUE
+ if(!B.is_blank())
+ if(user)
+ to_chat(user, SPAN_WARNING("\The [B] contains some non-blank pages, or something else than paper sheets!"))
+ return TRUE
+ for(var/obj/item/paper/bundleitem in B) //loop through papers in bundle
+ B.pages.Remove(bundleitem)
+ qdel(bundleitem)
+ num_of_pages_added++
+ stored_paper++
if(stored_paper >= max_paper) //check if the printer is full yet
to_chat(user, "The printer has been filled to full capacity.")
break
@@ -71,4 +75,5 @@
else //if at least two items remain, just update the bundle icon
B.update_icon()
to_chat(user, "You add [num_of_pages_added] papers from \the [W] into \the [src].")
- return
+ return TRUE
+ return ..()
diff --git a/code/modules/modular_computers/hardware/scanners/scanner.dm b/code/modules/modular_computers/hardware/scanners/scanner.dm
index b84dc782e6d..ea42566d7a0 100644
--- a/code/modules/modular_computers/hardware/scanners/scanner.dm
+++ b/code/modules/modular_computers/hardware/scanners/scanner.dm
@@ -54,8 +54,10 @@
/obj/item/stock_parts/computer/scanner/proc/do_on_afterattack(mob/user, atom/target, proximity)
+// TODO: Revisit to see if we can make do_on_attackby return a bool so that normal afterattack can run.
/obj/item/stock_parts/computer/scanner/attackby(obj/W, mob/user)
do_on_attackby(user, W)
+ return TRUE
/obj/item/stock_parts/computer/scanner/proc/do_on_attackby(mob/user, atom/target)
diff --git a/code/modules/multiz/map_data.dm b/code/modules/multiz/map_data.dm
index 38a074ba092..ea7f0954511 100644
--- a/code/modules/multiz/map_data.dm
+++ b/code/modules/multiz/map_data.dm
@@ -7,11 +7,11 @@
var/turf/edge_type ///< What the map edge should be formed with. (null = world.turf)
// If the height is more than 1, we mark all contained levels as connected.
-// This is in New because it is an auxiliary effect specifically needed pre-init.
+// This initializes immediately because it is an auxiliary effect specifically needed pre-SSatoms init.
INITIALIZE_IMMEDIATE(/obj/abstract/map_data)
/obj/abstract/map_data/Initialize(mapload, _height)
if(!istype(loc)) // Using loc.z is safer when using the maploader and New.
- return
+ return INITIALIZE_HINT_QDEL
if(_height)
height = _height
for(var/i = (loc.z - height + 1) to (loc.z-1))
diff --git a/code/modules/multiz/zmimic/mimic_movable.dm b/code/modules/multiz/zmimic/mimic_movable.dm
index 23d2964cf06..32f5f80e691 100644
--- a/code/modules/multiz/zmimic/mimic_movable.dm
+++ b/code/modules/multiz/zmimic/mimic_movable.dm
@@ -148,6 +148,7 @@
/atom/movable/openspace/mimic/attackby(obj/item/W, mob/user)
to_chat(user, SPAN_NOTICE("\The [src] is too far away."))
+ return TRUE
/atom/movable/openspace/mimic/attack_hand(mob/user)
SHOULD_CALL_PARENT(FALSE)
@@ -195,7 +196,7 @@
z_flags = ZMM_IGNORE // Only one of these should ever be visible at a time, the mimic logic will handle that.
/atom/movable/openspace/turf_proxy/attackby(obj/item/W, mob/user)
- loc.attackby(W, user)
+ return loc.attackby(W, user)
/atom/movable/openspace/turf_proxy/attack_hand(mob/user as mob)
SHOULD_CALL_PARENT(FALSE)
@@ -223,7 +224,7 @@
delegate = loc:below
/atom/movable/openspace/turf_mimic/attackby(obj/item/W, mob/user)
- loc.attackby(W, user)
+ return loc.attackby(W, user)
/atom/movable/openspace/turf_mimic/attack_hand(mob/user as mob)
SHOULD_CALL_PARENT(FALSE)
diff --git a/code/modules/organs/external/_external.dm b/code/modules/organs/external/_external.dm
index 4b7aea6abdf..1968e2ec7a0 100644
--- a/code/modules/organs/external/_external.dm
+++ b/code/modules/organs/external/_external.dm
@@ -260,7 +260,7 @@
if(length(connecting_limb.children))
to_chat(usr, SPAN_WARNING("You cannot connect additional limbs to \the [connecting_limb]."))
- return
+ return TRUE
var/mob/holder = loc
if(istype(holder))
@@ -270,7 +270,7 @@
forceMove(connecting_limb)
if(loc != connecting_limb)
- return
+ return TRUE
if(istype(connecting_limb.owner))
connecting_limb.owner.add_organ(src, connecting_limb)
@@ -283,10 +283,10 @@
if(LAZYLEN(children))
to_chat(usr, SPAN_WARNING("You cannot connect additional limbs to \the [src]."))
- return
+ return TRUE
if(!user.try_unequip(connecting_limb, src))
- return
+ return TRUE
if(istype(connecting_limb.owner))
connecting_limb.owner.add_organ(connecting_limb, src)
@@ -297,7 +297,7 @@
else
to_chat(user, SPAN_WARNING("\The [connecting_limb] cannot be connected to \the [src]."))
- return
+ return TRUE
if(combined)
to_chat(user, SPAN_NOTICE("You connect \the [connecting_limb] to \the [src]."))
@@ -305,15 +305,15 @@
update_icon()
connecting_limb.compile_icon()
connecting_limb.update_icon()
- return
+ return TRUE
//Remove sub-limbs
if(used_item.get_tool_quality(TOOL_SAW) && LAZYLEN(children) && try_saw_off_child(used_item, user))
- return
+ return TRUE
//Remove internal items/organs/implants
if(try_remove_internal_item(used_item, user))
- return
- ..()
+ return TRUE
+ return ..()
//Handles removing internal organs/implants/items still in the detached limb.
/obj/item/organ/external/proc/try_remove_internal_item(var/obj/item/used_item, var/mob/user)
diff --git a/code/modules/organs/internal/cell.dm b/code/modules/organs/internal/cell.dm
index f08b5aad7ed..fbae8b33d6b 100644
--- a/code/modules/organs/internal/cell.dm
+++ b/code/modules/organs/internal/cell.dm
@@ -60,29 +60,32 @@
if(cell)
cell.emp_act(severity)
+// TODO: Make this use the cell extension instead?
+// Or have it grant a subtype of cell extension to the mob, maybe?
/obj/item/organ/internal/cell/attackby(obj/item/W, mob/user)
if(IS_SCREWDRIVER(W))
if(open)
- open = 0
+ open = FALSE
to_chat(user, SPAN_NOTICE("You screw the battery panel in place."))
else
- open = 1
+ open = TRUE
to_chat(user, SPAN_NOTICE("You unscrew the battery panel."))
-
- if(IS_CROWBAR(W))
- if(open)
+ return TRUE
+ else if(open)
+ if(IS_CROWBAR(W))
if(cell)
user.put_in_hands(cell)
to_chat(user, SPAN_NOTICE("You remove \the [cell] from \the [src]."))
cell = null
-
- if (istype(W, /obj/item/cell))
- if(open)
+ return TRUE
+ else if (istype(W, /obj/item/cell))
if(cell)
to_chat(user, SPAN_WARNING("There is a power cell already installed."))
else if(user.try_unequip(W, src))
cell = W
to_chat(user, SPAN_NOTICE("You insert \the [cell]."))
+ return TRUE
+ return ..()
/obj/item/organ/internal/cell/on_add_effects()
. = ..()
diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm
index 9bf040c7490..169c7cde0d4 100644
--- a/code/modules/organs/organ.dm
+++ b/code/modules/organs/organ.dm
@@ -379,21 +379,21 @@
owner.update_health()
/obj/item/organ/use_on_mob(mob/living/target, mob/living/user, animate = TRUE)
-
if(BP_IS_PROSTHETIC(src) || !istype(target) || !istype(user) || (user != target && user.a_intent == I_HELP))
return ..()
if(alert("Do you really want to use this organ as food? It will be useless for anything else afterwards.",,"Ew, no.","Bon appetit!") == "Ew, no.")
to_chat(user, SPAN_NOTICE("You successfully repress your cannibalistic tendencies."))
- return
+ return TRUE
if(QDELETED(src))
- return
+ return TRUE
if(!user.try_unequip(src))
- return
+ return TRUE
target.attackby(convert_to_food(user), user)
+ return TRUE
/obj/item/organ/proc/convert_to_food(mob/user)
var/obj/item/food/organ/yum = new(get_turf(src))
diff --git a/code/modules/overmap/disperser/disperser.dm b/code/modules/overmap/disperser/disperser.dm
index 8283e28a897..77110bc3f4e 100644
--- a/code/modules/overmap/disperser/disperser.dm
+++ b/code/modules/overmap/disperser/disperser.dm
@@ -20,6 +20,7 @@
playsound(src, 'sound/items/jaws_pry.ogg', 50, 1)
else
to_chat(user,"The maintenance panel must be screwed open for this!")
+ return TRUE
else
return ..()
diff --git a/code/modules/overmap/ftl_shunt/core.dm b/code/modules/overmap/ftl_shunt/core.dm
index eea9868992d..269e858851f 100644
--- a/code/modules/overmap/ftl_shunt/core.dm
+++ b/code/modules/overmap/ftl_shunt/core.dm
@@ -585,16 +585,15 @@
QDEL_NULL(fuel)
/obj/machinery/ftl_shunt/fuel_port/attackby(var/obj/item/O, var/mob/user)
- if(istype(O, /obj/item/fuel_assembly))
- if(!fuel)
- if(!do_after(user, 2 SECONDS, src) || fuel)
- return
- if(!user || !user.try_unequip(O, src))
- return
- fuel = O
- max_fuel = get_fuel_joules(TRUE)
- update_icon()
+ if(istype(O, /obj/item/fuel_assembly) && !fuel)
+ if(!do_after(user, 2 SECONDS, src) || fuel)
return TRUE
+ if(!user || !user.try_unequip(O, src))
+ return TRUE
+ fuel = O
+ max_fuel = get_fuel_joules(TRUE)
+ update_icon()
+ return TRUE
. = ..()
diff --git a/code/modules/overmap/ships/machines/fusion_thruster.dm b/code/modules/overmap/ships/machines/fusion_thruster.dm
index cb4aee84e4c..c8e10e58d04 100644
--- a/code/modules/overmap/ships/machines/fusion_thruster.dm
+++ b/code/modules/overmap/ships/machines/fusion_thruster.dm
@@ -29,7 +29,7 @@
var/datum/extension/local_network_member/lanm = get_extension(src, /datum/extension/local_network_member)
var/datum/local_network/lan = lanm.get_local_network()
- if(lan)
+ if(lan)
var/list/fusion_cores = lan.get_devices(/obj/machinery/fusion_core)
if(fusion_cores && fusion_cores.len)
harvest_from = fusion_cores[1]
@@ -40,5 +40,5 @@
var/datum/extension/local_network_member/lanm = get_extension(src, /datum/extension/local_network_member)
if(lanm.get_new_tag(user))
find_core()
- return
+ return TRUE
return ..()
\ No newline at end of file
diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm
index 9227787900a..19b2df3bfbe 100644
--- a/code/modules/paperwork/clipboard.dm
+++ b/code/modules/paperwork/clipboard.dm
@@ -70,7 +70,7 @@
var/obj/item/top_paper = top_paper()
if(istype(W, /obj/item/paper) || istype(W, /obj/item/photo))
if(!user.try_unequip(W, src))
- return
+ return TRUE
push_paper(W)
to_chat(user, SPAN_NOTICE("You clip the [W] onto \the [src]."))
return TRUE
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index 2634c4b0e60..1a5bbeb9e74 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -138,7 +138,8 @@ var/global/list/adminfaxes = list() //cache for faxes that have been sent to
/obj/machinery/faxmachine/attackby(obj/item/I, mob/user)
if(istype(construct_state, /decl/machine_construction/default/panel_closed))
if(istype(I, /obj/item/paper) || istype(I, /obj/item/photo) || istype(I, /obj/item/paper_bundle))
- return insert_scanner_item(I, user)
+ insert_scanner_item(I, user)
+ return TRUE
. = ..()
/obj/machinery/faxmachine/ui_data(mob/user, ui_key)
diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm
index c63df5d0d77..e6014e8f4f7 100644
--- a/code/modules/paperwork/filingcabinet.dm
+++ b/code/modules/paperwork/filingcabinet.dm
@@ -28,16 +28,16 @@
. = ..()
/obj/structure/filing_cabinet/attackby(obj/item/P, mob/user)
- if(is_type_in_list(P, can_hold))
- if(!user.try_unequip(P, src))
- return
- add_fingerprint(user)
- to_chat(user, SPAN_NOTICE("You put [P] in [src]."))
- flick("[initial(icon_state)]-open",src)
- updateUsrDialog()
+ if(!is_type_in_list(P, can_hold))
+ return ..()
+ if(!user.try_unequip(P, src))
return TRUE
+ add_fingerprint(user)
+ to_chat(user, SPAN_NOTICE("You put [P] in [src]."))
+ flick("[initial(icon_state)]-open",src)
+ updateUsrDialog()
+ return TRUE
- return ..()
/obj/structure/filing_cabinet/interact(mob/user)
user.set_machine(src)
var/dat = "