OpenDream Cleanup Pass (#67036)

OpenDream can detect BYONDisms that BYOND or SpacemanDMM miss. This PR fixes all of the issues it found in TG. Each change is explained in code comments below.
This commit is contained in:
ike709
2022-05-18 02:29:51 -04:00
committed by GitHub
parent a98c65be6b
commit 8dbdff492d
7 changed files with 15 additions and 13 deletions
+6 -4
View File
@@ -91,8 +91,9 @@
. = user.transferItemToLoc(I, parent)
// Using stacks
else if(istype(I, /obj/item/stack))
. = I.use_tool(parent, user, 0, volume=50, amount=current_step["amount"])
else
if(istype(I, /obj/item/stack))
. = I.use_tool(parent, user, 0, volume=50, amount=current_step["amount"])
// Going backwards? Undo the last action. Drop/respawn the items used in last action, if any.
@@ -108,8 +109,9 @@
if(located_item)
located_item.forceMove(drop_location())
else if(ispath(target_step_key, /obj/item/stack))
new target_step_key(drop_location(), target_step["amount"])
else
if(ispath(target_step_key, /obj/item/stack))
new target_step_key(drop_location(), target_step["amount"])
/datum/component/construction/proc/spawn_result()
// Some constructions result in new components being added.
+2 -2
View File
@@ -130,11 +130,11 @@
holder = null
// Disposal pipes related shits
/datum/component/squeak/proc/disposing_react(datum/source, obj/structure/disposalholder/holder, obj/machinery/disposal/source)
/datum/component/squeak/proc/disposing_react(datum/source, obj/structure/disposalholder/disposal_holder, obj/machinery/disposal/disposal_source)
SIGNAL_HANDLER
//We don't need to worry about unregistering this signal as it will happen for us automaticaly when the holder is qdeleted
RegisterSignal(holder, COMSIG_ATOM_DIR_CHANGE, .proc/holder_dir_change)
RegisterSignal(disposal_holder, COMSIG_ATOM_DIR_CHANGE, .proc/holder_dir_change)
/datum/component/squeak/proc/holder_dir_change(datum/source, old_dir, new_dir)
SIGNAL_HANDLER
+1 -1
View File
@@ -598,7 +598,7 @@
if(pod.effectStun) //If effectStun is true, stun any mobs caught on this pod_landingzone until the pod gets a chance to hit them
for (var/mob/living/target_living in get_turf(src))
target_living.Stun(pod.delays[POD_TRANSIT]+10, ignore_canstun = TRUE)//you ain't goin nowhere, kid.
if (pod.delays[POD_FALLING] == initial(pod.delays[POD_FALLING]) && pod.delays[POD_TRANSIT] + pod.delays[POD_FALLING] < pod.fallingSoundLength)
if (pod.delays[POD_TRANSIT] + pod.delays[POD_FALLING] < pod.fallingSoundLength)
pod.fallingSoundLength = 3 //The default falling sound is a little long, so if the landing time is shorter than the default falling sound, use a special, shorter default falling sound
pod.fallingSound = 'sound/weapons/mortar_whistle.ogg'
var/soundStartTime = pod.delays[POD_TRANSIT] - pod.fallingSoundLength + pod.delays[POD_FALLING]
@@ -35,11 +35,11 @@
/datum/custom_order/moth_clothing/New(datum/venue/our_venue)
var/mob/living/carbon/buffet = our_venue.restaurant_portal?.turned_on_portal?.resolve()
if (!istype(buffet)) // Always asks for the clothes that you have on, but this is a fallback.
wanted_clothing_type = pick_weight(
wanted_clothing_type = pick_weight(list(
/obj/item/clothing/head/chefhat = 3,
/obj/item/clothing/shoes/sneakers/black = 3,
/obj/item/clothing/gloves/color/black = 1,
)
))
return
var/list/orderable = list()
-1
View File
@@ -467,7 +467,6 @@
/datum/mafia_role/lawyer/proc/release(datum/mafia_controller/game)
SIGNAL_HANDLER
. = ..()
if(current_target)
current_target.role_flags &= ~ROLE_ROLEBLOCKED
current_target = null
@@ -297,7 +297,7 @@
to_chat(M, "[FOLLOW_LINK(M, user)] [ghost_message]")
// Log in the talk log
user.log_talk(message, LOG_PDA, tag="[rigged ? "Rigged" : ""] PDA: [initial(message_data["name"])] to [signal.format_target()]")
user.log_talk(message, LOG_PDA, tag="[rigged ? "Rigged" : ""] PDA: [message_data["name"]] to [signal.format_target()]")
if(rigged)
log_bomber(user, "sent a rigged PDA message (Name: [message_data["name"]]. Job: [message_data["job"]]) to [english_list(string_targets)] [!is_special_character(user) ? "(SENT BY NON-ANTAG)" : ""]")
to_chat(user, span_info("PDA message sent to [signal.format_target()]: [signal.format_message()]"))
@@ -60,8 +60,9 @@
mytray.mutateweed()
if(1 to 32)
mytray.mutatepest(user)
else if(prob(20))
mytray.visible_message(span_warning("Nothing happens..."))
else
if(prob(20))
mytray.visible_message(span_warning("Nothing happens..."))
/datum/reagent/medicine/adminordrazine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.heal_bodypart_damage(5 * REM * delta_time, 5 * REM * delta_time)