mirror of
https://github.com/evilew/GS13-Citadel.git
synced 2026-08-23 13:18:26 +01:00
procs
This commit is contained in:
@@ -344,7 +344,7 @@
|
||||
if (temp_pod.effectShrapnel == TRUE) //If already doing custom damage, set back to default (no shrapnel)
|
||||
temp_pod.effectShrapnel = FALSE
|
||||
return
|
||||
var/shrapnelInput = input("Please enter the type of pellet cloud you'd like to create on landing (Can be any projectile!)", "Projectile Typepath", 0) in sortList(subtypesof(/obj/item/projectile), /proc/cmp_typepaths_asc)
|
||||
var/shrapnelInput = input("Please enter the type of pellet cloud you'd like to create on landing (Can be any projectile!)", "Projectile Typepath", 0) in sortList(subtypesof(/obj/item/projectile), GLOBAL_PROC_REF(cmp_typepaths_asc))
|
||||
if (isnull(shrapnelInput))
|
||||
return
|
||||
var/shrapnelMagnitude = input("Enter the magnitude of the pellet cloud. This is usually a value around 1-5. Please note that Ryll-Ryll has asked me to tell you that if you go too crazy with the projectiles you might crash the server. So uh, be gentle!", "Shrapnel Magnitude", 0) as null|num
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
anomalous_box_provided = TRUE
|
||||
log_game("An anomalous pizza box was provided in a pizza crate at during cargo delivery")
|
||||
if(prob(50))
|
||||
addtimer(CALLBACK(src, .proc/anomalous_pizza_report), rand(300, 1800))
|
||||
addtimer(CALLBACK(src, PROC_REF(anomalous_pizza_report)), rand(300, 1800))
|
||||
else
|
||||
message_admins("An anomalous pizza box was silently created with no command report in a pizza crate delivery.")
|
||||
break
|
||||
|
||||
@@ -275,11 +275,11 @@
|
||||
var/mob/living/simple_animal/pet/gondola/gondolapod/benis = new(turf_underneath, src)
|
||||
benis.contents |= contents //Move the contents of this supplypod into the gondolapod mob.
|
||||
moveToNullspace()
|
||||
addtimer(CALLBACK(src, .proc/open_pod, benis), delays[POD_OPENING]) //After the opening delay passes, we use the open proc from this supplyprod while referencing the contents of the "holder", in this case the gondolapod mob
|
||||
addtimer(CALLBACK(src, PROC_REF(open_pod), benis), delays[POD_OPENING]) //After the opening delay passes, we use the open proc from this supplyprod while referencing the contents of the "holder", in this case the gondolapod mob
|
||||
else if (style == STYLE_SEETHROUGH)
|
||||
open_pod(src)
|
||||
else
|
||||
addtimer(CALLBACK(src, .proc/open_pod, src), delays[POD_OPENING]) //After the opening delay passes, we use the open proc from this supplypod, while referencing this supplypod's contents
|
||||
addtimer(CALLBACK(src, PROC_REF(open_pod), src), delays[POD_OPENING]) //After the opening delay passes, we use the open proc from this supplypod, while referencing this supplypod's contents
|
||||
|
||||
/obj/structure/closet/supplypod/proc/open_pod(atom/movable/holder, broken = FALSE, forced = FALSE) //The holder var represents an atom whose contents we will be working with
|
||||
if (!holder)
|
||||
@@ -307,9 +307,9 @@
|
||||
startExitSequence(src)
|
||||
else
|
||||
if (reversing)
|
||||
addtimer(CALLBACK(src, .proc/SetReverseIcon), delays[POD_LEAVING]/2) //Finish up the pod's duties after a certain amount of time
|
||||
addtimer(CALLBACK(src, PROC_REF(SetReverseIcon)), delays[POD_LEAVING]/2) //Finish up the pod's duties after a certain amount of time
|
||||
if(!stay_after_drop) // Departing should be handled manually
|
||||
addtimer(CALLBACK(src, .proc/startExitSequence, holder), delays[POD_LEAVING]*(4/5)) //Finish up the pod's duties after a certain amount of time
|
||||
addtimer(CALLBACK(src, PROC_REF(startExitSequence), holder), delays[POD_LEAVING]*(4/5)) //Finish up the pod's duties after a certain amount of time
|
||||
|
||||
/obj/structure/closet/supplypod/proc/startExitSequence(atom/movable/holder)
|
||||
if (leavingSound)
|
||||
@@ -330,7 +330,7 @@
|
||||
take_contents(holder)
|
||||
playsound(holder, close_sound, soundVolume*0.75, TRUE, -3)
|
||||
holder.setClosed()
|
||||
addtimer(CALLBACK(src, .proc/preReturn, holder), delays[POD_LEAVING] * 0.2) //Start to leave a bit after closing for cinematic effect
|
||||
addtimer(CALLBACK(src, PROC_REF(preReturn), holder), delays[POD_LEAVING] * 0.2) //Start to leave a bit after closing for cinematic effect
|
||||
|
||||
/obj/structure/closet/supplypod/take_contents(atom/movable/holder)
|
||||
var/turf/turf_underneath = holder.drop_location()
|
||||
@@ -407,7 +407,7 @@
|
||||
deleteRubble()
|
||||
animate(holder, alpha = 0, time = 8, easing = QUAD_EASING|EASE_IN, flags = ANIMATION_PARALLEL)
|
||||
animate(holder, pixel_z = 400, time = 10, easing = QUAD_EASING|EASE_IN, flags = ANIMATION_PARALLEL) //Animate our rising pod
|
||||
addtimer(CALLBACK(src, .proc/handleReturnAfterDeparting, holder), 15) //Finish up the pod's duties after a certain amount of time
|
||||
addtimer(CALLBACK(src, PROC_REF(handleReturnAfterDeparting), holder), 15) //Finish up the pod's duties after a certain amount of time
|
||||
|
||||
/obj/structure/closet/supplypod/setOpened() //Proc exists here, as well as in any atom that can assume the role of a "holder" of a supplypod. Check the open_pod() proc for more details
|
||||
opened = TRUE
|
||||
@@ -583,8 +583,8 @@
|
||||
if (soundStartTime < 0)
|
||||
soundStartTime = 1
|
||||
if (!pod.effectQuiet && !(pod.pod_flags & FIRST_SOUNDS))
|
||||
addtimer(CALLBACK(src, .proc/playFallingSound), soundStartTime)
|
||||
addtimer(CALLBACK(src, .proc/beginLaunch, pod.effectCircle), pod.delays[POD_TRANSIT])
|
||||
addtimer(CALLBACK(src, PROC_REF(playFallingSound)), soundStartTime)
|
||||
addtimer(CALLBACK(src, PROC_REF(beginLaunch), pod.effectCircle), pod.delays[POD_TRANSIT])
|
||||
|
||||
/obj/effect/pod_landingzone/proc/playFallingSound()
|
||||
playsound(src, pod.fallingSound, pod.soundVolume, TRUE, 6)
|
||||
@@ -607,7 +607,7 @@
|
||||
if (pod.style != STYLE_INVISIBLE)
|
||||
animate(pod.get_filter("motionblur"), y = 0, time = pod.delays[POD_FALLING], flags = ANIMATION_PARALLEL)
|
||||
animate(pod, pixel_z = -1 * abs(sin(rotation))*4, pixel_x = SUPPLYPOD_X_OFFSET + (sin(rotation) * 20), time = pod.delays[POD_FALLING], easing = LINEAR_EASING, flags = ANIMATION_PARALLEL) //Make the pod fall! At an angle!
|
||||
addtimer(CALLBACK(src, .proc/endLaunch), pod.delays[POD_FALLING], TIMER_CLIENT_TIME) //Go onto the last step after a very short falling animation
|
||||
addtimer(CALLBACK(src, PROC_REF(endLaunch)), pod.delays[POD_FALLING], TIMER_CLIENT_TIME) //Go onto the last step after a very short falling animation
|
||||
|
||||
/obj/effect/pod_landingzone/proc/setupSmoke(rotation)
|
||||
if (pod.style == STYLE_INVISIBLE || pod.style == STYLE_SEETHROUGH)
|
||||
@@ -623,7 +623,7 @@
|
||||
smoke_part.pixel_y = abs(cos(rotation))*32 * i
|
||||
smoke_part.add_filter("smoke_blur", 1, gauss_blur_filter(size = 4))
|
||||
var/time = (pod.delays[POD_FALLING] / length(smoke_effects))*(length(smoke_effects)-i)
|
||||
addtimer(CALLBACK(smoke_part, /obj/effect/supplypod_smoke/.proc/drawSelf, i), time, TIMER_CLIENT_TIME) //Go onto the last step after a very short falling animation
|
||||
addtimer(CALLBACK(smoke_part, TYPE_PROC_REF(/obj/effect/supplypod_smoke, drawSelf), i), time, TIMER_CLIENT_TIME) //Go onto the last step after a very short falling animation
|
||||
QDEL_IN(smoke_part, pod.delays[POD_FALLING] + 35)
|
||||
|
||||
/obj/effect/pod_landingzone/proc/drawSmoke()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
launched = TRUE
|
||||
playsound(src,'sound/machines/triple_beep.ogg',50,0)
|
||||
playsound(src,'sound/machines/warning-buzzer.ogg',50,0)
|
||||
addtimer(CALLBACK(src, .proc/endLaunch), 33)//wait 3.3 seconds (time it takes for supplypod to land), then update icon
|
||||
addtimer(CALLBACK(src, PROC_REF(endLaunch)), 33)//wait 3.3 seconds (time it takes for supplypod to land), then update icon
|
||||
if (SP_UNLINK)
|
||||
linked = FALSE
|
||||
playsound(src,'sound/machines/synth_no.ogg',50,0)
|
||||
|
||||
Reference in New Issue
Block a user