Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-23-10-2025

This commit is contained in:
Roxy
2025-10-23 17:38:23 -04:00
453 changed files with 20635 additions and 15897 deletions
+2 -1
View File
@@ -261,7 +261,8 @@
AddElement(/datum/element/contextual_screentip_bare_hands, rmb_text = "Toggle interface lock")
AddElement(/datum/element/contextual_screentip_mob_typechecks, hovering_mob_typechecks)
find_and_hang_on_wall()
if(mapload)
find_and_hang_on_wall()
/obj/machinery/power/apc/Destroy()
if(malfai)
+11
View File
@@ -77,3 +77,14 @@
/obj/item/stock_parts/power_store/battery/crap/empty
empty = TRUE
/obj/item/stock_parts/power_store/battery/infinite
name = "infinite-capacity megacell"
desc = "A transdimensional megacell with an inexhaustible capacity."
icon_state = "icellbig"
maxcharge = INFINITY
chargerate = INFINITY
ratingdesc = FALSE
/obj/item/stock_parts/power_store/battery/infinite/use(used, force = FALSE)
return used
+1 -1
View File
@@ -603,7 +603,7 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(
/obj/item/stack/cable_coil/proc/try_heal_loop(atom/interacting_with, mob/living/user, repeating = FALSE)
var/mob/living/carbon/human/attacked_humanoid = interacting_with
var/obj/item/clothing/under/uniform = attacked_humanoid.w_uniform
if(uniform?.repair_sensors(src, user))
if(uniform?.repair_sensors(user))
return ITEM_INTERACT_SUCCESS
var/obj/item/bodypart/affecting = attacked_humanoid.get_bodypart(check_zone(user.zone_selected))
+1 -1
View File
@@ -163,7 +163,7 @@
ratingdesc = FALSE
/obj/item/stock_parts/power_store/cell/infinite/use(used, force = FALSE)
return TRUE
return used
/obj/item/stock_parts/power_store/cell/infinite/abductor
name = "void core"
+18 -34
View File
@@ -120,8 +120,12 @@
RegisterSignal(src, COMSIG_LIGHT_EATER_ACT, PROC_REF(on_light_eater))
AddElement(/datum/element/atmos_sensitive, mapload)
AddElement(/datum/element/contextual_screentip_bare_hands, rmb_text = "Remove bulb")
if(mapload)
find_and_hang_on_wall()
/obj/machinery/light/find_and_hang_on_wall()
if(break_if_moved)
find_and_hang_on_wall(custom_drop_callback = CALLBACK(src, PROC_REF(knock_down)))
return ..()
/obj/machinery/light/post_machine_initialize()
. = ..()
@@ -143,6 +147,11 @@
QDEL_NULL(cell)
return ..()
/obj/machinery/light/Exited(atom/movable/gone, direction)
. = ..()
if(gone == cell)
cell = null
/obj/machinery/light/setDir(newdir)
. = ..()
set_light(l_dir = REVERSE_DIR(dir))
@@ -426,34 +435,26 @@
electrocute_mob(user, get_area(src), src, (rand(7,10) * 0.1), TRUE)
/obj/machinery/light/on_deconstruction(disassembled)
var/obj/structure/light_construct/new_light = null
var/current_stage = 2
if(!disassembled)
current_stage = 1
var/atom/drop_point = drop_location()
var/obj/item/wallframe/light_fixture/frame = null
switch(fitting)
if("tube")
new_light = new /obj/structure/light_construct(loc)
new_light.icon_state = "tube-construct-stage[current_stage]"
frame = new /obj/item/wallframe/light_fixture(drop_point)
if("bulb")
new_light = new /obj/structure/light_construct/small(loc)
new_light.icon_state = "bulb-construct-stage[current_stage]"
new_light.setDir(dir)
new_light.stage = current_stage
frame = new /obj/item/wallframe/light_fixture/small(drop_point)
if(!disassembled)
new_light.take_damage(new_light.max_integrity * 0.5, sound_effect=FALSE)
frame.take_damage(frame.max_integrity * 0.5, sound_effect = FALSE)
if(status != LIGHT_BROKEN)
break_light_tube()
if(status != LIGHT_EMPTY)
drop_light_tube()
new /obj/item/stack/cable_coil(loc, 1, "red")
transfer_fingerprints_to(new_light)
transfer_fingerprints_to(frame)
var/obj/item/stock_parts/power_store/real_cell = get_cell()
if(!QDELETED(real_cell))
new_light.cell = real_cell
real_cell.forceMove(new_light)
cell = null
real_cell.forceMove(drop_point)
/obj/machinery/light/attacked_by(obj/item/attacking_object, mob/living/user, list/modifiers, list/attack_modifiers)
. = ..()
@@ -735,23 +736,6 @@
continue
INVOKE_ASYNC(src, PROC_REF(flicker))
/**
* All the effects that occur when a light falls off a wall that it was hung onto.
*/
/obj/machinery/light/proc/knock_down()
if (fitting == "bulb")
new /obj/item/wallframe/light_fixture/small(drop_location())
else
new /obj/item/wallframe/light_fixture(drop_location())
new /obj/item/stack/cable_coil(drop_location(), 1, "red")
if(status != LIGHT_BROKEN)
break_light_tube(FALSE)
if(status != LIGHT_EMPTY)
drop_light_tube()
if(cell)
cell.forceMove(drop_location())
qdel(src)
/obj/machinery/light/floor
name = "floor light"
desc = "A lightbulb you can walk on without breaking it, amazing."
@@ -28,11 +28,10 @@
fire = 80
acid = 50
/obj/structure/light_construct/Initialize(mapload, ndir, building)
/obj/structure/light_construct/Initialize(mapload)
. = ..()
if(building)
setDir(ndir)
find_and_hang_on_wall()
if(mapload)
find_and_hang_on_wall()
/obj/structure/light_construct/Destroy()
QDEL_NULL(cell)
@@ -107,11 +106,9 @@
return
to_chat(user, span_notice("You begin deconstructing [src]..."))
if (tool.use_tool(src, user, 30, volume=50))
new /obj/item/stack/sheet/iron(drop_location(), sheets_refunded)
user.visible_message(span_notice("[user.name] deconstructs [src]."), \
span_notice("You deconstruct [src]."), span_hear("You hear a ratchet."))
playsound(src, 'sound/items/deconstruct.ogg', 75, TRUE)
qdel(src)
return
if(istype(tool, /obj/item/stack/cable_coil))
@@ -159,10 +156,12 @@
/obj/structure/light_construct/blob_act(obj/structure/blob/attacking_blob)
if(attacking_blob && attacking_blob.loc == loc)
qdel(src)
deconstruct(FALSE)
/obj/structure/light_construct/atom_deconstruct(disassembled = TRUE)
/obj/structure/light_construct/atom_deconstruct(disassembled)
new /obj/item/stack/sheet/iron(loc, sheets_refunded)
if(stage == LIGHT_CONSTRUCT_WIRED)
new /obj/item/stack/cable_coil(drop_location(), 1, "red")
/obj/structure/light_construct/small
name = "small light fixture frame"
+33 -21
View File
@@ -56,7 +56,12 @@
return ITEM_INTERACT_BLOCKING
return ..()
/// checks if the connector is free; if not, alerts a user and returns FALSE
/**
* Checks if the connector is free
* Arguments
*
* * mob/living/user - the player doing the checking
*/
/obj/machinery/power/smes/connector/proc/connector_free(mob/living/user)
PRIVATE_PROC(TRUE)
@@ -86,15 +91,19 @@
total_capacity = 1
for(var/obj/item/stock_parts/power_store/power_cell in component_parts)
component_parts -= power_cell
SStgui.close_uis(src)
update_appearance(UPDATE_OVERLAYS)
/obj/machinery/power/smes/connector/ui_act(action, params)
// prevent UI interactions if there's no SMES
/obj/machinery/power/smes/connector/ui_interact(mob/user, datum/tgui/ui)
if(!connected_smes)
balloon_alert(usr, "needs a connected SMES!")
balloon_alert(user, "no power bank!")
return FALSE
return ..()
/obj/machinery/power/smes/connector/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
return connected_smes ? ..() : FALSE
/// The actual portable part of the portable SMES system. Pretty useless without an actual connector.
/obj/machinery/smesbank
name = "portable power storage unit"
@@ -195,7 +204,6 @@
// adapted from portable atmos connection code
/obj/machinery/smesbank/wrench_act(mob/living/user, obj/item/wrench)
if(connected_port)
wrench.play_tool_sound(src)
if(!wrench.use_tool(src, user, 8 SECONDS))
return ITEM_INTERACT_BLOCKING
user.visible_message( \
@@ -208,14 +216,9 @@
return ITEM_INTERACT_SUCCESS
var/obj/machinery/power/smes/connector/possible_connector = locate(/obj/machinery/power/smes/connector) in loc
if(!possible_connector)
to_chat(user, span_notice("There's no power connector to connect to."))
if(!wrench.use_tool(src, user, 4 SECONDS, extra_checks = CALLBACK(src, PROC_REF(connect_port), possible_connector, user, TRUE)))
return ITEM_INTERACT_BLOCKING
wrench.play_tool_sound(src)
if(!wrench.use_tool(src, user, 4 SECONDS))
return ITEM_INTERACT_BLOCKING
if(!connect_port(possible_connector))
to_chat(user, span_notice("[src] failed to connect to [possible_connector]."))
if(!connect_port(possible_connector, user))
return ITEM_INTERACT_BLOCKING
user.visible_message( \
"[user] connects [src].", \
@@ -231,30 +234,39 @@
update_appearance(UPDATE_OVERLAYS)
return ITEM_INTERACT_SUCCESS
/obj/machinery/smesbank/default_deconstruction_crowbar(obj/item/crowbar/crowbar)
if(istype(crowbar) && connected_port)
balloon_alert(usr, "disconnect from [connected_port] first!")
/obj/machinery/smesbank/crowbar_act(mob/living/user, obj/item/tool)
if(connected_port)
balloon_alert(user, "disconnect from [connected_port] first!")
return ITEM_INTERACT_FAILURE
return ..()
if(default_deconstruction_crowbar(tool))
return ITEM_INTERACT_SUCCESS
/**
* Attempt to connect the portable SMES to a given connector. Adapted from portable atmos connection code.
*
* Arguments
* * obj/machinery/power/smes/connector/possible_connector - the connector we are trying to link with
* * mob/living/user - the mob trying to connect the port
* * check_only - don't connect but check if we can
*/
/obj/machinery/smesbank/proc/connect_port(obj/machinery/power/smes/connector/possible_connector)
/obj/machinery/smesbank/proc/connect_port(obj/machinery/power/smes/connector/possible_connector, mob/living/user, check_only = FALSE)
PRIVATE_PROC(TRUE)
//Make sure not already connected to something else
if(connected_port || !possible_connector || possible_connector.connected_smes || possible_connector.panel_open)
if(QDELETED(possible_connector))
if(user)
balloon_alert(user, "no connector!")
return FALSE
//Make sure are close enough for a valid connection
if(possible_connector.loc != get_turf(src))
//Make sure not already connected to something else
if(possible_connector.panel_open)
if(user)
balloon_alert(user, "close connector panel!")
return FALSE
//Perform the connection
if(check_only)
return TRUE
connected_port = possible_connector
connected_port.connect_smes(src)
set_anchored(TRUE)