Files
Batrachophreno af0312c7d4 Bugfix batch (Pesticide Edition) (#21556)
Fixes https://github.com/Aurorastation/Aurora.3/issues/18504
Fixes https://github.com/Aurorastation/Aurora.3/issues/21064
Fixes https://github.com/Aurorastation/Aurora.3/issues/21267
Fixes https://github.com/Aurorastation/Aurora.3/issues/21455
Fixes https://github.com/Aurorastation/Aurora.3/issues/21535

Miscellaneous bugfixes, code cleanup, etc. Smaller batches this time.

changes:
  - spellcheck: "Renames 'gibber' to 'autobutcher'."
  - code_imp: "Cleans up a lot of old autobutcher code."
- code_imp: "Simplifies and unifies a lot of circuit board naming code."
  - code_imp: "Updates various code comments to DMDocs format."
- balance: "Slightly increased damage of beating someone with a ladder."
- bugfix: "Fixes foreign speech displaying the translated versions in
langchat for non-fluent listeners."
- bugfix: "Fixes whispered speech langchat; whispers are now correctly
italicized."
- bugfix: "Fixes shouted speech langchat; shouts are now correctly
biggified."
  - bugfix: "Adds missing Omni Gas Mixer, Gas Meter options from RFD-P."
- bugfix: "Adds missing circuit boards for bioballistic delivery system,
lysis-isolation centrifuge, and autobutcher to allow for construction
and deconstruction."
- bugfix: "Fixes empty algae chips bag having description set for its
name."
- bugfix: "Adds fallback_specific_heat values to several reagents that
were missing them."
- bugfix: "Fixes antimateriel projectiles being erroneously
damage-capped when hitting walls."
- bugfix: "Fixes laser beam effects not using the base colors of their
beam VFX."
- qol: "Added helpful feedback hint to move closer when someone speaks
aloud within 4 tiles while you're in vacuum (as features go, this one
felt more like a bug to experience)."
  - qol: "Updated various examine hints."

---------

Signed-off-by: Batrachophreno <Batrochophreno@gmail.com>
2025-11-11 10:56:12 +00:00

114 lines
3.5 KiB
Plaintext

/obj/item/ladder_mobile
name = "mobile ladder"
desc = "A lightweight deployable ladder, which you can use to move up or down. Alternatively, you can bash some faces in; it'll hurt, a lot."
icon_state = "mobile_ladder"
item_state = "mobile_ladder"
icon = 'icons/obj/multiz_items.dmi'
contained_sprite = TRUE
throw_range = 3
force = 18
w_class = WEIGHT_CLASS_BULKY
slot_flags = SLOT_BACK
/obj/item/ladder_mobile/mechanics_hints(mob/user, distance, is_adjacent)
. += ..()
. += "Use this on a solid floor (with open space above it) to place the ladder going up."
. += "Use this on an open space turf (with solid floor beneath it) to place the ladder going down."
/obj/item/ladder_mobile/proc/place_ladder(atom/A, mob/user)
if (isopenturf(A)) //Place into open space
var/turf/T = get_turf(A)
var/turf/below_loc = GET_TURF_BELOW(T)
if (!below_loc || (istype(/turf/space, below_loc)))
to_chat(user, SPAN_NOTICE("Why would you do that?! There is only infinite space there..."))
return
user.visible_message(SPAN_WARNING("[user] begins to lower \the [src] into \the [A]."),
SPAN_WARNING("You begin to lower \the [src] into \the [A]."))
if (!handle_action(A, user))
return
// Create the lower ladder first. ladder/Initialize() will make the upper
// ladder create the appropriate links. So the lower ladder must exist first.
var/obj/structure/ladder/mobile/downer = new(below_loc)
downer.allowed_directions = UP
new /obj/structure/ladder/mobile(A)
user.drop_from_inventory(src,get_turf(src))
qdel(src)
else if (istype(A, /turf/simulated/floor) || istype(A, /turf/unsimulated/floor)) //Place onto Floor
var/turf/T = get_turf(A)
var/turf/upper_loc = GET_TURF_ABOVE(T)
if (!upper_loc || !isopenturf(upper_loc))
to_chat(user, SPAN_NOTICE("There is something above. You can't deploy!"))
return
user.visible_message(SPAN_WARNING("[user] begins deploying \the [src] on \the [A]."),
SPAN_WARNING("You begin to deploy \the [src] on \the [A]."))
if (!handle_action(A, user))
return
// Ditto here. Create the lower ladder first.
var/obj/structure/ladder/mobile/downer = new(A)
downer.allowed_directions = UP
new /obj/structure/ladder/mobile(upper_loc)
user.drop_from_inventory(src, get_turf(src))
qdel(src)
/obj/item/ladder_mobile/afterattack(atom/A, mob/user,proximity)
if(!proximity)
return
place_ladder(A,user)
/obj/item/ladder_mobile/proc/handle_action(atom/A, mob/user)
if(!do_after(user, 30, user))
return FALSE
if(!A || QDELETED(src) || QDELETED(user))
// Shit was deleted during delay, call is no longer valid.
return FALSE
return TRUE
/obj/structure/ladder/mobile
base_icon = "mobile_ladder"
/obj/structure/ladder/mobile/AltClick(mob/user)
fold_up(user)
/obj/structure/ladder/mobile/verb/fold()
set name = "Fold Ladder"
set category = "Object"
set src in oview(1)
fold_up(usr)
/obj/structure/ladder/mobile/proc/fold_up(var/mob/user)
if(!istype(user))
return
if(use_check_and_message(user))
return
user.visible_message(SPAN_NOTICE("\The [user] starts folding up \the [src]."),
SPAN_NOTICE("You start folding up \the [src]."))
if(!do_after(user, 30, src))
return
if(QDELETED(src))
return
var/obj/item/ladder_mobile/R = new /obj/item/ladder_mobile(get_turf(user))
transfer_fingerprints_to(R)
user.put_in_hands(R)
user.visible_message(SPAN_NOTICE("\The [user] folds \the [src] up into \the [R]!"),
SPAN_NOTICE("You fold \the [src] up into \the [R]!"))
if(target_down)
QDEL_NULL(target_down)
qdel(src)
else
QDEL_NULL(target_up)
qdel(src)