mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Fix corner-case runtimes for removed jobs, other minor fixes (#94822)
* Fix runtimes in `/datum/id_trim` and when equipping corpses if a map's .json file fully removes a job * Remove unused `/datum/powernet/var/number` * Fix ctrl+clicking a telescreen to mute it also activating it normally * Unmark `_liver.dm` as executable
This commit is contained in:
@@ -25,6 +25,9 @@
|
||||
/datum/id_trim/job/New()
|
||||
if(ispath(job))
|
||||
job = SSjob.get_job_type(job)
|
||||
if (isnull(job))
|
||||
// Not a valid job. Maybe removed by the map.
|
||||
return
|
||||
|
||||
if(isnull(job_changes))
|
||||
job_changes = SSmapping.current_map.job_changes
|
||||
|
||||
@@ -57,9 +57,9 @@
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/machinery/computer/security/telescreen/entertainment/click_ctrl(mob/user)
|
||||
. = ..()
|
||||
balloon_alert(user, speakers.should_be_listening ? "muted" : "unmuted")
|
||||
speakers.toggle_mute()
|
||||
return CLICK_ACTION_SUCCESS
|
||||
|
||||
MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/security/telescreen/entertainment, 32)
|
||||
|
||||
|
||||
+1
-1
@@ -356,7 +356,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/virtualspeaker)
|
||||
radio = _radio
|
||||
source = M
|
||||
if(istype(M))
|
||||
name = radio.anonymize ? "Unknown" : M.get_voice(add_id_name = TRUE)
|
||||
name = radio?.anonymize ? "Unknown" : M.get_voice(add_id_name = TRUE)
|
||||
verb_say = M.get_default_say_verb()
|
||||
verb_ask = M.verb_ask
|
||||
verb_exclaim = M.verb_exclaim
|
||||
|
||||
@@ -29,12 +29,12 @@ ADMIN_VERB(power_debug, R_DEBUG, "Check Power", "Verifies the integrity of the p
|
||||
if (!PN.nodes || !PN.nodes.len)
|
||||
if(PN.cables && (PN.cables.len > 1))
|
||||
var/obj/structure/cable/C = PN.cables[1]
|
||||
results += "Powernet with no nodes! (number [PN.number]) - example cable at [ADMIN_VERBOSEJMP(C)]"
|
||||
results += "Powernet with no nodes! Example cable at [ADMIN_VERBOSEJMP(C)]"
|
||||
|
||||
if (!PN.cables || (PN.cables.len < 10))
|
||||
if(PN.cables && (PN.cables.len > 1))
|
||||
var/obj/structure/cable/C = PN.cables[1]
|
||||
results += "Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [ADMIN_VERBOSEJMP(C)]"
|
||||
results += "Powernet with fewer than 10 cables! Example cable at [ADMIN_VERBOSEJMP(C)]"
|
||||
|
||||
for(var/turf/T in world.contents)
|
||||
var/cable_layers //cache all cable layers (which are bitflags) present
|
||||
|
||||
@@ -420,8 +420,8 @@
|
||||
stack_trace("pda_slot was set but we couldn't find a PDA!")
|
||||
return
|
||||
|
||||
pda.imprint_id(equipped.real_name, equipped_job.title)
|
||||
pda.update_ringtone(equipped_job.job_tone)
|
||||
pda.imprint_id(equipped.real_name, equipped_job?.title || equipped.job)
|
||||
pda.update_ringtone(equipped_job?.job_tone)
|
||||
pda.UpdateDisplay()
|
||||
|
||||
var/client/equipped_client = GLOB.directory[ckey(equipped.mind?.key)]
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// each contiguous network of cables & nodes
|
||||
/////////////////////////////////////
|
||||
/datum/powernet
|
||||
var/number // unique id
|
||||
var/list/cables = list() // all cables & junctions
|
||||
var/list/nodes = list() // all connected machines
|
||||
|
||||
|
||||
Executable → Regular
Reference in New Issue
Block a user