diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index b8e2918b953..48c660cc479 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -289,15 +289,24 @@ #define MAP_MAXY 5 #define MAP_MAXZ 6 -// /atom/proc/use_check flags. +// `/atom/proc/use_check()` flags, used for customizing guard clauses. + +/// Allows ghosts to interact with the action. #define USE_ALLOW_NONLIVING 1 +/// If set, check result will be dictated by whatever value `IsAdvancedToolUser()` has returned from mob users. #define USE_ALLOW_NON_ADV_TOOL_USR 2 +/// Allows deads to interact with the action. #define USE_ALLOW_DEAD 4 +/// Allows users to interact with the action even if they are incapacitated. #define USE_ALLOW_INCAPACITATED 8 +/// Allows users to interact with the action regardless of their distance to the object. #define USE_ALLOW_NON_ADJACENT 16 +/// Checks if the item is in possession of a user. #define USE_FORCE_SRC_IN_USER 32 +/// Disallows interaction from silicon users. #define USE_DISALLOW_SILICONS 64 -#define USE_DISALLOW_SPECIALS 128 // revenants, zombies, etc +/// Disallows interaction from the mobs specified at `is_mob_special()`, such as zombies and revenants. +#define USE_DISALLOW_SPECIALS 128 #define USE_SUCCESS 0 #define USE_FAIL_NON_ADJACENT 1 diff --git a/code/game/objects/items/devices/paint_sprayer.dm b/code/game/objects/items/devices/paint_sprayer.dm index 6a8cb9a3d7f..a26f416582a 100644 --- a/code/game/objects/items/devices/paint_sprayer.dm +++ b/code/game/objects/items/devices/paint_sprayer.dm @@ -205,17 +205,20 @@ return FALSE /turf/simulated/floor/Click(location, control, params) - if(ishuman(usr)) - var/mob/living/carbon/human/H = usr + if(ishuman(usr) || isrobot(usr)) + var/mob/living/L = usr var/list/modifiers = params2list(params) - var/obj/item/device/paint_sprayer/paint_sprayer = H.get_active_hand() + var/obj/item/device/paint_sprayer/paint_sprayer = L.get_active_hand() if(istype(paint_sprayer)) - if(!istype(H.buckled_to)) - H.face_atom(src) - if(modifiers["ctrl"] && paint_sprayer.pick_color(src, H)) + if(!istype(L.buckled_to)) + L.face_atom(src) + + if(modifiers["ctrl"] && paint_sprayer.pick_color(src, L)) return - if(modifiers["shift"] && paint_sprayer.remove_paint(src, H)) + + if(modifiers["shift"] && paint_sprayer.remove_paint(src, L)) return + . = ..() /obj/item/device/paint_sprayer/proc/pick_color(atom/A, mob/user) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 9fbd3aa26e7..f7574bda114 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -2,28 +2,42 @@ layer = OBJ_LAYER animate_movement = 2 - var/list/matter //Used to store information about the contents of the object. - var/recyclable = FALSE //Whether the object can be recycled (eaten) by something like the Autolathe - var/w_class // Size of the object. - var/list/origin_tech = null //Used by R&D to determine what research bonuses it grants. - var/unacidable = 0 //universal "unacidabliness" var, here so you can use it in any obj. + /// Used to store information about the contents of the object. + var/list/matter + /// Whether the object can be recycled (eaten) by something like the Autolathe + var/recyclable = FALSE + /// Size of the object. + var/w_class + /// Used by R&D to determine what research bonuses it grants. + var/list/origin_tech = null + /// Universal "unacidabliness" var, here so you can use it in any obj. + var/unacidable = FALSE - var/obj_flags //Special flags such as whether or not this object can be rotated. + /// Special flags such as whether or not this object can be rotated. + var/obj_flags + /// Integer. Used for varied damage and item volume calculations. var/throwforce = 1 - var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]" - var/sharp = 0 // whether this object cuts - var/edge = FALSE // whether this object is more likely to dismember - var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! + /// Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]" + var/list/attack_verb + /// Whether this object cuts. + var/sharp = FALSE + /// Whether this object is more likely to dismember its poor foes. + var/edge = FALSE + /// If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! + var/in_use = FALSE + /// Type of damage this object deals. var/damtype = DAMAGE_BRUTE var/force = 0 var/armor_penetration = 0 - var/noslice = 0 // To make it not able to slice things. + /// Makes an object not able to slice things. + var/noslice = FALSE var/being_shocked = 0 - var/icon_species_tag = ""//If set, this holds the 3-letter shortname of a species, used for species-specific worn icons - var/icon_auto_adapt = 0//If 1, this item will automatically change its species tag to match the wearer's species. - //requires that the wearer's species is listed in icon_supported_species_tags + /// If set, this holds the 3-letter shortname of a species, used for species-specific worn icons. + var/icon_species_tag = "" + /// If TRUE, this item will automatically change its species tag to match the wearer's species, given the wearer's species is listed in icon_supported_species_tags. + var/icon_auto_adapt = FALSE /** * A list of strings used with icon_auto_adapt, a list of species which have differing appearances for this item, @@ -31,11 +45,11 @@ */ var/list/icon_supported_species_tags - ///If `TRUE`, will use the `icon_species_tag` var for rendering this item in the left/right hand + /// If `TRUE`, will use the `icon_species_tag` var for rendering this item in the left/right hand. var/icon_species_in_hand = FALSE var/equip_slot = 0 - ///Played when the item is used, for example tools + /// Played when the item is used, for example tools. var/usesound var/toolspeed = 1 diff --git a/code/modules/clothing/spacesuits/rig/suits/combat.dm b/code/modules/clothing/spacesuits/rig/suits/combat.dm index c6fa1584682..3913ab34014 100644 --- a/code/modules/clothing/spacesuits/rig/suits/combat.dm +++ b/code/modules/clothing/spacesuits/rig/suits/combat.dm @@ -3,7 +3,7 @@ desc = "A sleek and dangerous hardsuit for active combat. This one is a Stellar Corporate Conglomerate design in color scheme and make." icon = 'icons/obj/item/clothing/rig/combat.dmi' icon_state = "combat_rig" - icon_supported_species_tags = list("skr", "taj", "unat", "ipc") + icon_supported_species_tags = list("skr", "taj", "una", "ipc") suit_type = "combat hardsuit" armor = list( MELEE = ARMOR_MELEE_MAJOR, diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index ff9882e1af8..27ca224d321 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -7,13 +7,13 @@ // Descriptors and strings. /// Species name. var/name - /// Pluralized name (since "[name]s" is not always valid) + /// Pluralized name (since "[name]s" is not always valid). var/name_plural /// If TRUE, the species' name won't be visible on examine. var/hide_name = FALSE - /// Shortened form of the name, for code use. Must be exactly 3 letter long, and all lowercase + /// Shortened form of the name, for code use. Must be exactly 3 letter long, and all lowercase. var/short_name - /// A name for this overarching species, ie 'Human', 'Skrell', 'IPC'. only used in character creation + /// A name for this overarching species, ie 'Human', 'Skrell', 'IPC'. only used in character creation. var/category_name /// A brief lore summary for use in the chargen screen. var/blurb = "A completely nondescript species." diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 63c2ffdf5f4..8902ccd9614 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -738,9 +738,10 @@ toggle_safety(usr) /obj/item/gun/CtrlClick(var/mob/user) - if(has_safety && user == loc) + if(has_safety && !use_check(user, USE_FORCE_SRC_IN_USER)) toggle_safety(user) return TRUE + . = ..() /obj/item/gun/proc/safety() diff --git a/html/changelogs/kano-dot-bundle-of-fixes.yml b/html/changelogs/kano-dot-bundle-of-fixes.yml new file mode 100644 index 00000000000..3e7c741bb15 --- /dev/null +++ b/html/changelogs/kano-dot-bundle-of-fixes.yml @@ -0,0 +1,10 @@ +author: Kano + +delete-after: True + +changes: + - bugfix: "Fixed combat hardsuits not using unathi specie specific worn sprites." + - bugfix: "Fixed some mapping issues in nka_merchant ship." + - bugfix: "Fixed silicon robots being unable to use ctrl and shift click functions with paint guns." + - bugfix: "Fixed being able to interact with weapon safeties in situations where it shouldn't occur." + - code_imp: "Converted some comments into dmdocs, and documented some parts where it was missing." diff --git a/icons/obj/item/clothing/rig/combat.dmi b/icons/obj/item/clothing/rig/combat.dmi index ffb67789ebf..e8212afc6ce 100644 Binary files a/icons/obj/item/clothing/rig/combat.dmi and b/icons/obj/item/clothing/rig/combat.dmi differ diff --git a/maps/away/ships/nka/nka_merchant/nka_merchant.dmm b/maps/away/ships/nka/nka_merchant/nka_merchant.dmm index acb5dfaabab..5fe62fd052b 100644 --- a/maps/away/ships/nka/nka_merchant/nka_merchant.dmm +++ b/maps/away/ships/nka/nka_merchant/nka_merchant.dmm @@ -315,9 +315,6 @@ }, /area/nka_merchant/engineering) "aQ" = ( -/obj/machinery/power/apc/east{ - req_access = list(213) - }, /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 8 }, @@ -330,6 +327,7 @@ /obj/structure/cable/green{ icon_state = "0-4" }, +/obj/machinery/power/apc/north, /turf/simulated/floor/tiled{ temperature = 278.15 }, @@ -5079,12 +5077,6 @@ temperature = 278.15 }, /area/nka_merchant/warehouse) -"He" = ( -/obj/effect/floor_decal/corner/dark_blue{ - dir = 10 - }, -/turf/simulated/wall/shuttle/space_ship, -/area/nka_merchant/mess) "Hg" = ( /obj/machinery/hologram/holopad/long_range, /obj/effect/overmap/visitable/ship/landable/nka_merchant_shuttle, @@ -6223,12 +6215,6 @@ temperature = 278.15 }, /area/nka_merchant/bridge) -"WO" = ( -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ - dir = 5 - }, -/turf/template_noop, -/area/space) "WS" = ( /obj/machinery/atmospherics/pipe/simple/hidden/aux, /obj/structure/extinguisher_cabinet/east{ @@ -18477,7 +18463,7 @@ iB iB AT aI -ga +Py OG AT xX @@ -19319,7 +19305,7 @@ nE Vj Vj Vj -He +Vj Vj Vj Vj @@ -21269,7 +21255,7 @@ gB iB iB iB -WO +iB iB iB iB