mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-26 22:57:39 +01:00
More 515 Compatibility
This commit is contained in:
committed by
CHOMPStation2
parent
3129a35fe2
commit
2281afdf24
@@ -290,7 +290,7 @@
|
||||
winset(user, "mapwindow", "focus=true")
|
||||
break
|
||||
if (timeout)
|
||||
addtimer(CALLBACK(src, .proc/close), timeout)
|
||||
addtimer(CALLBACK(src, PROC_REF(close)), timeout)
|
||||
|
||||
/datum/browser/modal/proc/wait()
|
||||
while (opentime && selectedbutton <= 0 && (!timeout || opentime+timeout > world.time))
|
||||
|
||||
@@ -34,7 +34,7 @@ var/list/runechat_image_cache = list()
|
||||
|
||||
var/image/emote_image = image('icons/UI_Icons/chat/chat_icons.dmi', icon_state = "emote")
|
||||
runechat_image_cache["emote"] = emote_image
|
||||
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/chatmessage
|
||||
@@ -99,10 +99,10 @@ var/list/runechat_image_cache = list()
|
||||
if(!target || !owner)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
// Register client who owns this message
|
||||
owned_by = owner.client
|
||||
RegisterSignal(owned_by, COMSIG_PARENT_QDELETING, .proc/qdel_self)
|
||||
RegisterSignal(owned_by, COMSIG_PARENT_QDELETING, PROC_REF(qdel_self))
|
||||
|
||||
var/extra_length = owned_by.is_preference_enabled(/datum/client_preference/runechat_long_messages)
|
||||
var/maxlen = extra_length ? CHAT_MESSAGE_EXT_LENGTH : CHAT_MESSAGE_LENGTH
|
||||
@@ -147,10 +147,10 @@ var/list/runechat_image_cache = list()
|
||||
// Icon on both ends?
|
||||
//var/image/I = runechat_image_cache["emote"]
|
||||
//text = "\icon[I][text]\icon[I]"
|
||||
|
||||
|
||||
// Icon on one end?
|
||||
//LAZYADD(prefixes, "\icon[runechat_image_cache["emote"]]")
|
||||
|
||||
|
||||
// Asterisks instead?
|
||||
text = "* [text] *"
|
||||
|
||||
@@ -168,7 +168,7 @@ var/list/runechat_image_cache = list()
|
||||
|
||||
// Translate any existing messages upwards, apply exponential decay factors to timers
|
||||
message_loc = target.runechat_holder(src)
|
||||
RegisterSignal(message_loc, COMSIG_PARENT_QDELETING, .proc/qdel_self)
|
||||
RegisterSignal(message_loc, COMSIG_PARENT_QDELETING, PROC_REF(qdel_self))
|
||||
if(owned_by.seen_messages)
|
||||
var/idx = 1
|
||||
var/combined_height = approx_lines
|
||||
@@ -255,7 +255,7 @@ var/list/runechat_image_cache = list()
|
||||
if(!message)
|
||||
return
|
||||
*/
|
||||
|
||||
|
||||
var/list/extra_classes = list()
|
||||
extra_classes += existing_extra_classes
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/component/personal_crafting/Initialize()
|
||||
if(ismob(parent))
|
||||
RegisterSignal(parent, COMSIG_MOB_CLIENT_LOGIN, .proc/create_mob_button)
|
||||
RegisterSignal(parent, COMSIG_MOB_CLIENT_LOGIN, PROC_REF(create_mob_button))
|
||||
|
||||
/datum/component/personal_crafting/proc/create_mob_button(mob/user, client/CL)
|
||||
// SIGNAL_HANDLER
|
||||
@@ -12,7 +12,7 @@
|
||||
C.alpha = H.ui_alpha
|
||||
LAZYADD(H.other_important, C)
|
||||
CL.screen += C
|
||||
RegisterSignal(C, COMSIG_CLICK, .proc/component_ui_interact)
|
||||
RegisterSignal(C, COMSIG_CLICK, PROC_REF(component_ui_interact))
|
||||
|
||||
/datum/component/personal_crafting
|
||||
var/busy
|
||||
@@ -279,28 +279,28 @@
|
||||
if(amt <= 0)//since machinery can have 0 aka CRAFTING_MACHINERY_USE - i.e. use it, don't consume it!
|
||||
continue
|
||||
|
||||
// If the path is in R.parts, we want to grab those to stuff into the product
|
||||
// If the path is in R.parts, we want to grab those to stuff into the product
|
||||
var/amt_to_transfer = 0
|
||||
if(is_path_in_list(path_key, R.parts))
|
||||
amt_to_transfer = R.parts[path_key]
|
||||
|
||||
|
||||
|
||||
// Reagent: gotta go sniffing in all the beakers
|
||||
if(ispath(path_key, /datum/reagent))
|
||||
var/datum/reagent/reagent = path_key
|
||||
var/id = initial(reagent.id)
|
||||
|
||||
for(var/obj/item/weapon/reagent_containers/RC in surroundings)
|
||||
for(var/obj/item/weapon/reagent_containers/RC in surroundings)
|
||||
// Found everything we need
|
||||
if(amt <= 0 && amt_to_transfer <= 0)
|
||||
break
|
||||
break
|
||||
|
||||
// If we need to keep any to put in the new object, pull it out
|
||||
if(amt_to_transfer > 0)
|
||||
var/A = RC.reagents.trans_id_to(parts["reagents"], id, amt_to_transfer)
|
||||
amt_to_transfer -= A
|
||||
amt -= A
|
||||
|
||||
|
||||
// If we need to consume some amount of it
|
||||
if(amt > 0)
|
||||
var/datum/reagent/RG = RC.reagents.get_reagent(id)
|
||||
@@ -322,27 +322,27 @@
|
||||
parts["items"] += split
|
||||
amt_to_transfer -= split.get_amount()
|
||||
amt -= split.get_amount()
|
||||
|
||||
|
||||
if(amt > 0)
|
||||
var/A = min(amt, S.get_amount())
|
||||
if(S.use(A))
|
||||
amt -= A
|
||||
|
||||
|
||||
|
||||
else // Just a regular item. Find them all and delete them
|
||||
for(var/atom/movable/I in surroundings)
|
||||
if(amt <= 0 && amt_to_transfer <= 0)
|
||||
break
|
||||
|
||||
|
||||
if(!istype(I, path_key))
|
||||
continue
|
||||
|
||||
|
||||
// Special case: the reagents may be needed for other recipes
|
||||
if(istype(I, /obj/item/weapon/reagent_containers))
|
||||
var/obj/item/weapon/reagent_containers/RC = I
|
||||
if(RC.reagents.total_volume > 0)
|
||||
continue
|
||||
|
||||
|
||||
// We're using it for something
|
||||
amt--
|
||||
|
||||
@@ -351,7 +351,7 @@
|
||||
parts["items"] += I
|
||||
amt_to_transfer--
|
||||
continue
|
||||
|
||||
|
||||
// Snowflake handling of reagent containers and storage atoms.
|
||||
// If we consumed them in our crafting, we should dump their contents out before qdeling them.
|
||||
if(istype(I, /obj/item/weapon/reagent_containers))
|
||||
@@ -369,7 +369,7 @@
|
||||
// SIGNAL_HANDLER
|
||||
|
||||
if(user == parent)
|
||||
INVOKE_ASYNC(src, .proc/tgui_interact, user)
|
||||
INVOKE_ASYNC(src, PROC_REF(tgui_interact), user)
|
||||
|
||||
/datum/component/personal_crafting/tgui_state(mob/user)
|
||||
return GLOB.tgui_not_incapacitated_turf_state
|
||||
@@ -499,7 +499,7 @@
|
||||
//Also these are typepaths so sadly we can't just do "[a]"
|
||||
L += "[req[req_atom]] [initial(req_atom.name)]"
|
||||
req_text += L.Join(" OR ")
|
||||
|
||||
|
||||
for(var/obj/machinery/content as anything in R.machinery)
|
||||
req_text += "[R.reqs[content]] [initial(content.name)]"
|
||||
if(R.additional_req_text)
|
||||
@@ -530,4 +530,4 @@
|
||||
name = "crafting menu"
|
||||
icon = 'icons/mob/screen/midnight.dmi'
|
||||
icon_state = "craft"
|
||||
screen_loc = ui_smallquad
|
||||
screen_loc = ui_smallquad
|
||||
|
||||
@@ -76,9 +76,9 @@
|
||||
. = ..()
|
||||
|
||||
if(!(mat_container_flags & MATCONTAINER_NO_INSERT))
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/on_attackby)
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(on_attackby))
|
||||
if(mat_container_flags & MATCONTAINER_EXAMINE)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_examine)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine))
|
||||
|
||||
|
||||
/datum/component/material_container/vv_edit_var(var_name, var_value)
|
||||
@@ -86,12 +86,12 @@
|
||||
. = ..()
|
||||
if(var_name == NAMEOF(src, mat_container_flags) && parent)
|
||||
if(!(old_flags & MATCONTAINER_EXAMINE) && mat_container_flags & MATCONTAINER_EXAMINE)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_examine)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine))
|
||||
else if(old_flags & MATCONTAINER_EXAMINE && !(mat_container_flags & MATCONTAINER_EXAMINE))
|
||||
UnregisterSignal(parent, COMSIG_PARENT_EXAMINE)
|
||||
|
||||
if(old_flags & MATCONTAINER_NO_INSERT && !(mat_container_flags & MATCONTAINER_NO_INSERT))
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/on_attackby)
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(on_attackby))
|
||||
else if(!(old_flags & MATCONTAINER_NO_INSERT) && mat_container_flags & MATCONTAINER_NO_INSERT)
|
||||
UnregisterSignal(parent, COMSIG_PARENT_ATTACKBY)
|
||||
|
||||
|
||||
@@ -111,15 +111,15 @@
|
||||
/datum/component/overlay_lighting/RegisterWithParent()
|
||||
. = ..()
|
||||
if(directional)
|
||||
RegisterSignal(parent, COMSIG_ATOM_DIR_CHANGE, .proc/on_parent_dir_change)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/on_parent_moved)
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_RANGE, .proc/set_range)
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_POWER, .proc/set_power)
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_COLOR, .proc/set_color)
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_ON, .proc/on_toggle)
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_FLAGS, .proc/on_light_flags_change)
|
||||
RegisterSignal(parent, COMSIG_ATOM_USED_IN_CRAFT, .proc/on_parent_crafted)
|
||||
RegisterSignal(parent, COMSIG_LIGHT_EATER_QUEUE, .proc/on_light_eater)
|
||||
RegisterSignal(parent, COMSIG_ATOM_DIR_CHANGE, PROC_REF(on_parent_dir_change))
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(on_parent_moved))
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_RANGE, PROC_REF(set_range))
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_POWER, PROC_REF(set_power))
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_COLOR, PROC_REF(set_color))
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_ON, PROC_REF(on_toggle))
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_FLAGS, PROC_REF(on_light_flags_change))
|
||||
RegisterSignal(parent, COMSIG_ATOM_USED_IN_CRAFT, PROC_REF(on_parent_crafted))
|
||||
RegisterSignal(parent, COMSIG_LIGHT_EATER_QUEUE, PROC_REF(on_light_eater))
|
||||
var/atom/movable/movable_parent = parent
|
||||
if(movable_parent.light_flags & LIGHT_ATTACHED)
|
||||
overlay_lighting_flags |= LIGHTING_ATTACHED
|
||||
@@ -155,17 +155,17 @@
|
||||
set_parent_attached_to(null)
|
||||
set_holder(null)
|
||||
clean_old_turfs()
|
||||
|
||||
|
||||
qdel(visible_mask, TRUE)
|
||||
visible_mask = null
|
||||
|
||||
|
||||
if(directional)
|
||||
qdel(directional_atom, TRUE)
|
||||
directional_atom = null
|
||||
|
||||
|
||||
qdel(cone, TRUE)
|
||||
cone = null
|
||||
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -229,15 +229,15 @@
|
||||
var/atom/movable/old_parent_attached_to = .
|
||||
UnregisterSignal(old_parent_attached_to, list(COMSIG_PARENT_QDELETING, COMSIG_MOVABLE_MOVED, COMSIG_LIGHT_EATER_QUEUE))
|
||||
if(old_parent_attached_to == current_holder)
|
||||
RegisterSignal(old_parent_attached_to, COMSIG_PARENT_QDELETING, .proc/on_holder_qdel)
|
||||
RegisterSignal(old_parent_attached_to, COMSIG_MOVABLE_MOVED, .proc/on_holder_moved)
|
||||
RegisterSignal(old_parent_attached_to, COMSIG_LIGHT_EATER_QUEUE, .proc/on_light_eater)
|
||||
RegisterSignal(old_parent_attached_to, COMSIG_PARENT_QDELETING, PROC_REF(on_holder_qdel))
|
||||
RegisterSignal(old_parent_attached_to, COMSIG_MOVABLE_MOVED, PROC_REF(on_holder_moved))
|
||||
RegisterSignal(old_parent_attached_to, COMSIG_LIGHT_EATER_QUEUE, PROC_REF(on_light_eater))
|
||||
if(parent_attached_to)
|
||||
if(parent_attached_to == current_holder)
|
||||
UnregisterSignal(current_holder, list(COMSIG_PARENT_QDELETING, COMSIG_MOVABLE_MOVED, COMSIG_LIGHT_EATER_QUEUE))
|
||||
RegisterSignal(parent_attached_to, COMSIG_PARENT_QDELETING, .proc/on_parent_attached_to_qdel)
|
||||
RegisterSignal(parent_attached_to, COMSIG_MOVABLE_MOVED, .proc/on_parent_attached_to_moved)
|
||||
RegisterSignal(parent_attached_to, COMSIG_LIGHT_EATER_QUEUE, .proc/on_light_eater)
|
||||
RegisterSignal(parent_attached_to, COMSIG_PARENT_QDELETING, PROC_REF(on_parent_attached_to_qdel))
|
||||
RegisterSignal(parent_attached_to, COMSIG_MOVABLE_MOVED, PROC_REF(on_parent_attached_to_moved))
|
||||
RegisterSignal(parent_attached_to, COMSIG_LIGHT_EATER_QUEUE, PROC_REF(on_light_eater))
|
||||
check_holder()
|
||||
|
||||
|
||||
@@ -257,11 +257,11 @@
|
||||
clean_old_turfs()
|
||||
return
|
||||
if(new_holder != parent && new_holder != parent_attached_to)
|
||||
RegisterSignal(new_holder, COMSIG_PARENT_QDELETING, .proc/on_holder_qdel)
|
||||
RegisterSignal(new_holder, COMSIG_MOVABLE_MOVED, .proc/on_holder_moved)
|
||||
RegisterSignal(new_holder, COMSIG_LIGHT_EATER_QUEUE, .proc/on_light_eater)
|
||||
RegisterSignal(new_holder, COMSIG_PARENT_QDELETING, PROC_REF(on_holder_qdel))
|
||||
RegisterSignal(new_holder, COMSIG_MOVABLE_MOVED, PROC_REF(on_holder_moved))
|
||||
RegisterSignal(new_holder, COMSIG_LIGHT_EATER_QUEUE, PROC_REF(on_light_eater))
|
||||
if(directional)
|
||||
RegisterSignal(new_holder, COMSIG_ATOM_DIR_CHANGE, .proc/on_holder_dir_change)
|
||||
RegisterSignal(new_holder, COMSIG_ATOM_DIR_CHANGE, PROC_REF(on_holder_dir_change))
|
||||
if(overlay_lighting_flags & LIGHTING_ON)
|
||||
make_luminosity_update()
|
||||
add_dynamic_lumi()
|
||||
@@ -444,7 +444,7 @@
|
||||
if(final_distance > SHORT_CAST && !(ALL_CARDINALS & current_direction))
|
||||
final_distance -= 1
|
||||
var/turf/scanning = get_turf(current_holder)
|
||||
|
||||
|
||||
. = 0
|
||||
for(var/i in 1 to final_distance)
|
||||
var/turf/next_turf = get_step(scanning, current_direction)
|
||||
@@ -464,7 +464,7 @@
|
||||
if(final_distance > SHORT_CAST && !(ALL_CARDINALS & get_dir(GET_PARENT, target)))
|
||||
final_distance -= 1
|
||||
var/turf/scanning = get_turf(GET_PARENT)
|
||||
|
||||
|
||||
. = 0
|
||||
for(var/i in 1 to final_distance)
|
||||
var/next_dir = get_dir(scanning, target)
|
||||
@@ -477,9 +477,9 @@
|
||||
directional_atom.forceMove(scanning)
|
||||
var/turf/Ts = get_turf(GET_PARENT)
|
||||
var/turf/To = get_turf(GET_LIGHT_SOURCE)
|
||||
|
||||
|
||||
var/angle = Get_Angle(Ts, To)
|
||||
|
||||
|
||||
directional_atom.face_light(GET_PARENT, angle, .)
|
||||
set_cone_direction(NORTH, angle)
|
||||
|
||||
@@ -510,7 +510,7 @@
|
||||
return
|
||||
current_direction = newdir
|
||||
set_cone_direction(newdir)
|
||||
|
||||
|
||||
if(newdir & NORTH)
|
||||
cone.pixel_y = 16
|
||||
else if(newdir & SOUTH)
|
||||
@@ -522,7 +522,7 @@
|
||||
else
|
||||
cone.pixel_y = 0
|
||||
directional_atom.pixel_y = 0
|
||||
|
||||
|
||||
if(newdir & EAST)
|
||||
cone.pixel_x = 16
|
||||
else if(newdir & WEST)
|
||||
@@ -538,7 +538,7 @@
|
||||
else
|
||||
cone.pixel_x = 0
|
||||
directional_atom.pixel_x = 0
|
||||
|
||||
|
||||
if(!skip_update && (overlay_lighting_flags & LIGHTING_ON))
|
||||
make_luminosity_update()
|
||||
|
||||
@@ -549,7 +549,7 @@
|
||||
return
|
||||
|
||||
UnregisterSignal(parent, COMSIG_ATOM_USED_IN_CRAFT)
|
||||
RegisterSignal(new_craft, COMSIG_ATOM_USED_IN_CRAFT, .proc/on_parent_crafted)
|
||||
RegisterSignal(new_craft, COMSIG_ATOM_USED_IN_CRAFT, PROC_REF(on_parent_crafted))
|
||||
set_parent_attached_to(new_craft)
|
||||
|
||||
/// Handles putting the source for overlay lights into the light eater queue since we aren't tracked by [/atom/var/light_sources]
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
/datum/component/resize_guard/RegisterWithParent()
|
||||
// When our parent mob enters any atom, we check resize
|
||||
RegisterSignal(parent, COMSIG_ATOM_ENTERING, .proc/check_resize)
|
||||
RegisterSignal(parent, COMSIG_ATOM_ENTERING, PROC_REF(check_resize))
|
||||
|
||||
/datum/component/resize_guard/UnregisterFromParent()
|
||||
UnregisterSignal(parent, COMSIG_ATOM_ENTERING)
|
||||
@@ -16,4 +16,4 @@
|
||||
if(A?.limit_mob_size)
|
||||
var/mob/living/L = parent
|
||||
L.resize(L.size_multiplier)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -63,11 +63,11 @@
|
||||
if(!check_rights(NONE))
|
||||
return
|
||||
var/list/names = list()
|
||||
var/list/componentsubtypes = sortTim(subtypesof(/datum/component), /proc/cmp_typepaths_asc)
|
||||
var/list/componentsubtypes = sortTim(subtypesof(/datum/component), GLOBAL_PROC_REF(cmp_typepaths_asc))
|
||||
names += "---Components---"
|
||||
names += componentsubtypes
|
||||
names += "---Elements---"
|
||||
names += sortTim(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
|
||||
names += sortTim(subtypesof(/datum/element), GLOBAL_PROC_REF(cmp_typepaths_asc))
|
||||
var/result = tgui_input_list(usr, "Choose a component/element to add:", "Add Component/Element", names)
|
||||
if(!usr || !result || result == "---Components---" || result == "---Elements---")
|
||||
return
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
SEND_SIGNAL(target, COMSIG_ELEMENT_ATTACH, src)
|
||||
if(element_flags & ELEMENT_DETACH)
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/OnTargetDelete, override = TRUE)
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(OnTargetDelete), override = TRUE)
|
||||
|
||||
/datum/element/proc/OnTargetDelete(datum/source, force)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
CRASH("Invalid ID in conflict checking element.")
|
||||
if(isnull(src.id))
|
||||
src.id = id
|
||||
RegisterSignal(target, COMSIG_CONFLICT_ELEMENT_CHECK, .proc/check)
|
||||
RegisterSignal(target, COMSIG_CONFLICT_ELEMENT_CHECK, PROC_REF(check))
|
||||
|
||||
/datum/element/conflict_checking/proc/check(datum/source, id_to_check)
|
||||
if(id == id_to_check)
|
||||
@@ -32,4 +32,4 @@
|
||||
for(var/i in GetAllContents())
|
||||
var/atom/movable/AM = i
|
||||
if(SEND_SIGNAL(AM, COMSIG_CONFLICT_ELEMENT_CHECK, id) & ELEMENT_CONFLICT_FOUND)
|
||||
++.
|
||||
++.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
. = ..()
|
||||
if(!ismovable(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/on_target_move)
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(on_target_move))
|
||||
var/atom/movable/movable_target = target
|
||||
if(isturf(movable_target.loc))
|
||||
var/turf/turf_loc = movable_target.loc
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
our_turf.plane = OPENSPACE_PLANE
|
||||
our_turf.layer = OPENSPACE_LAYER
|
||||
|
||||
RegisterSignal(target, COMSIG_TURF_MULTIZ_DEL, .proc/on_multiz_turf_del, override = TRUE)
|
||||
RegisterSignal(target, COMSIG_TURF_MULTIZ_NEW, .proc/on_multiz_turf_new, override = TRUE)
|
||||
RegisterSignal(target, COMSIG_TURF_MULTIZ_DEL, PROC_REF(on_multiz_turf_del), override = TRUE)
|
||||
RegisterSignal(target, COMSIG_TURF_MULTIZ_NEW, PROC_REF(on_multiz_turf_new), override = TRUE)
|
||||
|
||||
update_multiz(our_turf, TRUE, TRUE)
|
||||
|
||||
@@ -75,12 +75,16 @@
|
||||
if(!ispath(path))
|
||||
warning("Z-level [our_turf] has invalid baseturf '[get_base_turf_by_area(our_turf)]' in area '[get_area(our_turf)]'")
|
||||
path = /turf/space
|
||||
|
||||
|
||||
var/do_plane = ispath(path, /turf/space) ? SPACE_PLANE : null
|
||||
var/do_state = ispath(path, /turf/space) ? "white" : initial(path.icon_state)
|
||||
|
||||
|
||||
var/mutable_appearance/underlay_appearance = mutable_appearance(initial(path.icon), do_state, layer = TURF_LAYER-0.02, plane = do_plane)
|
||||
underlay_appearance.appearance_flags = RESET_ALPHA | RESET_COLOR
|
||||
our_turf.underlays += underlay_appearance
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
|
||||
>>>>>>> b6b3a1357c... Merge pull request #14976 from ItsSelis/selis-515compat
|
||||
return TRUE
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
if(query_sound)
|
||||
SEND_SOUND(C, sound(query_sound))
|
||||
|
||||
tgui_alert_async(D, question, "[role_name] request", list("Yes", "No", "Never for this round"), CALLBACK(src, .proc/get_reply), wait_time SECONDS)
|
||||
tgui_alert_async(D, question, "[role_name] request", list("Yes", "No", "Never for this round"), CALLBACK(src, PROC_REF(get_reply)), wait_time SECONDS)
|
||||
|
||||
/// Process an async alert response
|
||||
/datum/ghost_query/proc/get_reply(response)
|
||||
@@ -87,7 +87,7 @@
|
||||
else if(finished) // Already finished candidate list
|
||||
to_chat(D, "<span class='warning'>Unfortunately, you were not fast enough, and there are no more available roles. Sorry.</span>")
|
||||
else // Prompt a second time
|
||||
tgui_alert_async(D, "Are you sure you want to play as a [role_name]?", "[role_name] request", list("I'm Sure", "Nevermind"), CALLBACK(src, .proc/get_reply), wait_time SECONDS)
|
||||
tgui_alert_async(D, "Are you sure you want to play as a [role_name]?", "[role_name] request", list("I'm Sure", "Nevermind"), CALLBACK(src, PROC_REF(get_reply)), wait_time SECONDS)
|
||||
|
||||
if("I'm Sure")
|
||||
if(!evaluate_candidate(D)) // Failed revalidation
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
if(!chance || prob(chance))
|
||||
play(get_sound(starttime))
|
||||
if(!timerid)
|
||||
timerid = addtimer(CALLBACK(src, .proc/sound_loop, world.time), mid_length, TIMER_STOPPABLE | TIMER_LOOP)
|
||||
timerid = addtimer(CALLBACK(src, PROC_REF(sound_loop), world.time), mid_length, TIMER_STOPPABLE | TIMER_LOOP)
|
||||
|
||||
/datum/looping_sound/proc/play(soundfile)
|
||||
var/list/atoms_cache = output_atoms
|
||||
@@ -121,7 +121,7 @@
|
||||
if(start_sound)
|
||||
play(start_sound)
|
||||
start_wait = start_length
|
||||
addtimer(CALLBACK(src, .proc/sound_loop), start_wait)
|
||||
addtimer(CALLBACK(src, PROC_REF(sound_loop)), start_wait)
|
||||
|
||||
/datum/looping_sound/proc/on_stop()
|
||||
if(end_sound)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
/datum/looping_sound/sequence/sound_loop(starttime)
|
||||
iterate_on_sequence()
|
||||
|
||||
timerid = addtimer(CALLBACK(src, .proc/sound_loop, world.time), next_iteration_delay, TIMER_STOPPABLE)
|
||||
timerid = addtimer(CALLBACK(src, PROC_REF(sound_loop), world.time), next_iteration_delay, TIMER_STOPPABLE)
|
||||
|
||||
#define MORSE_DOT "*" // Yes this is an asterisk but its easier to see on a computer compared to a period.
|
||||
#define MORSE_DASH "-"
|
||||
@@ -172,4 +172,4 @@
|
||||
return spaces_between_letters
|
||||
|
||||
#undef MORSE_DOT
|
||||
#undef MORSE_DASH
|
||||
#undef MORSE_DASH
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
to_chat(user, "<span class='warning'>You'll need [key_name] in one of your hands to move \the [ridden].</span>")
|
||||
|
||||
/datum/riding/proc/Unbuckle(atom/movable/M)
|
||||
// addtimer(CALLBACK(ridden, /atom/movable/.proc/unbuckle_mob, M), 0, TIMER_UNIQUE)
|
||||
// addtimer(CALLBACK(ridden, TYPE_PROC_REF(/atom/movable, unbuckle_mob), M), 0, TIMER_UNIQUE)
|
||||
spawn(0)
|
||||
// On /tg/ this uses the fancy CALLBACK system. Not entirely sure why they needed to do so with a duration of 0,
|
||||
// so if there is a reason, this should replicate it close enough. Hopefully.
|
||||
|
||||
Reference in New Issue
Block a user