atmos cc, cpl

This commit is contained in:
Letter N
2021-02-12 11:50:39 +08:00
parent 8a0c932d55
commit 3167dd8e22
8 changed files with 244 additions and 159 deletions
+28 -26
View File
@@ -20,8 +20,7 @@
set name = "Config/Launch Supplypod"
set desc = "Configure and launch a CentCom supplypod full of whatever your heart desires!"
set category = "Admin.Events"
var/datum/centcom_podlauncher/plaunch = new(usr)//create the datum
plaunch.ui_interact(usr)//datum has a tgui component, here we open the window
new /datum/centcom_podlauncher(usr)//create the datum
//Variables declared to change how items in the launch bay are picked and launched. (Almost) all of these are changed in the ui_act proc
//Some effect groups are choices, while other are booleans. This is because some effects can stack, while others dont (ex: you can stack explosion and quiet, but you cant stack ordered launch and random launch)
@@ -56,7 +55,6 @@
var/list/cam_plane_masters
var/obj/screen/background/cam_background
var/tabIndex = 1
var/list/timers = list("landingDelay", "fallDuration", "openingDelay", "departureDelay")
var/renderLighting = FALSE
/datum/centcom_podlauncher/New(user) //user can either be a client or a mob
@@ -148,10 +146,9 @@
data["launchChoice"] = launchChoice //Launch turfs all at once (0), ordered (1), or randomly(1)
data["explosionChoice"] = explosionChoice //An explosion that occurs when landing. Can be no explosion (0), custom explosion (1), or maxcap (2)
data["damageChoice"] = damageChoice //Damage that occurs to any mob under the pod when it lands. Can be no damage (0), custom damage (1), or gib+5000dmg (2)
data["delay_1"] = temp_pod.landingDelay //How long the pod takes to land after launching
data["delay_2"] = temp_pod.fallDuration //How long the pod's falling animation lasts
data["delay_3"] = temp_pod.openingDelay //How long the pod takes to open after landing
data["delay_4"] = temp_pod.departureDelay //How long the pod takes to leave after opening (if bluespace=true, it deletes. if reversing=true, it flies back to centcom)
data["delays"] = temp_pod.delays
data["rev_delays"] = temp_pod.reverse_delays
data["custom_rev_delay"] = temp_pod.custom_rev_delay
data["styleChoice"] = temp_pod.style //Style is a variable that keeps track of what the pod is supposed to look like. It acts as an index to the GLOB.podstyles list in cargo.dm defines to get the proper icon/name/desc for the pod.
data["effectShrapnel"] = temp_pod.effectShrapnel //If true, creates a cloud of shrapnel of a decided type and magnitude on landing
data["shrapnelType"] = "[temp_pod.shrapnel_type]" //Path2String
@@ -166,7 +163,7 @@
data["effectCircle"] = temp_pod.effectCircle //If true, allows the pod to come in at any angle. Bit of a weird feature but whatever its here
data["effectBurst"] = effectBurst //IOf true, launches five pods at once (with a very small delay between for added coolness), in a 3x3 area centered around the area
data["effectReverse"] = temp_pod.reversing //If true, the pod will not send any items. Instead, after opening, it will close again (picking up items/mobs) and fly back to centcom
data["reverseOptionList"] = temp_pod.reverseOptionList
data["reverse_option_list"] = temp_pod.reverse_option_list
data["effectTarget"] = specificTarget //Launches the pod at the turf of a specific mob target, rather than wherever the user clicked. Useful for smites
data["effectName"] = temp_pod.adminNamed //Determines whether or not the pod has been named by an admin. If true, the pod's name will not get overridden when the style of the pod changes (changing the style of the pod normally also changes the name+desc)
data["podName"] = temp_pod.name
@@ -182,7 +179,8 @@
return data
/datum/centcom_podlauncher/ui_act(action, params)
if(..())
. = ..()
if(.)
return
switch(action)
////////////////////////////UTILITIES//////////////////
@@ -398,7 +396,7 @@
. = TRUE
if("reverseOption")
var/reverseOption = params["reverseOption"]
temp_pod.reverseOptionList[reverseOption] = !temp_pod.reverseOptionList[reverseOption]
temp_pod.reverse_option_list[reverseOption] = !temp_pod.reverse_option_list[reverseOption]
. = TRUE
if("effectTarget") //Toggle: Launch at a specific mob (instead of at whatever turf you click on). Used for the supplypod smite
if (specificTarget)
@@ -415,13 +413,19 @@
////////////////////////////TIMER DELAYS//////////////////
if("editTiming") //Change the different timers relating to the pod
var/delay = params["timer"]
var/timer = timers[delay]
var/value = params["value"]
temp_pod.vars[timer] = value * 10
var/reverse = params["reverse"]
if (reverse)
temp_pod.reverse_delays[delay] = value * 10
else
temp_pod.delays[delay] = value * 10
. = TRUE
if("resetTiming")
for (var/timer in timers)
temp_pod.vars[timer] = initial(temp_pod.vars[timer])
temp_pod.delays = list(POD_TRANSIT = 20, POD_FALLING = 4, POD_OPENING = 30, POD_LEAVING = 30)
temp_pod.reverse_delays = list(POD_TRANSIT = 20, POD_FALLING = 4, POD_OPENING = 30, POD_LEAVING = 30)
. = TRUE
if("toggleRevDelays")
temp_pod.custom_rev_delay = !temp_pod.custom_rev_delay
. = TRUE
////////////////////////////ADMIN SOUNDS//////////////////
if("fallingSound") //Admin sound from a local file that plays when the pod lands
@@ -544,7 +548,7 @@
var/turf/drop = locate(coords_list[1], coords_list[2], coords_list[3])
setupView(RANGE_TURFS(3, drop))
/datum/centcom_podlauncher/proc/setupView(var/list/visible_turfs)
/datum/centcom_podlauncher/proc/setupView(list/visible_turfs)
var/list/bbox = get_bbox_of_atoms(visible_turfs)
var/size_x = bbox[3] - bbox[1] + 1
var/size_y = bbox[4] - bbox[2] + 1
@@ -553,7 +557,7 @@
cam_background.icon_state = "clear"
cam_background.fill_rect(1, 1, size_x, size_y)
/datum/centcom_podlauncher/proc/updateCursor(var/forceClear = FALSE) //Update the mouse of the user
/datum/centcom_podlauncher/proc/updateCursor(forceClear = FALSE) //Update the mouse of the user
if (!holder) //Can't update the mouse icon if the client doesnt exist!
return
if (!forceClear && (launcherActivated || picking_dropoff_turf)) //If the launching param is true, we give the user new mouse icons.
@@ -702,11 +706,10 @@
/datum/centcom_podlauncher/proc/launch(turf/target_turf) //Game time started
if (isnull(target_turf))
return
var/obj/structure/closet/supplypod/centcompod/toLaunch = DuplicateObject(temp_pod, sameloc = TRUE) //Duplicate the temp_pod (which we have been varediting or configuring with the UI) and store the result
var/obj/structure/closet/supplypod/centcompod/toLaunch = DuplicateObject(temp_pod) //Duplicate the temp_pod (which we have been varediting or configuring with the UI) and store the result
toLaunch.update_icon()//we update_icon() here so that the door doesnt "flicker on" right after it lands
//We don't have this area, lets just have it where we had the temp pod
//var/shippingLane = GLOB.areas_by_type[/area/centcom/supplypod/supplypod_temp_holding]
//toLaunch.forceMove(shippingLane)
var/shippingLane = GLOB.areas_by_type[/area/centcom/supplypod/supplypod_temp_holding]
toLaunch.forceMove(shippingLane)
if (launchClone) //We arent launching the actual items from the bay, rather we are creating clones and launching those
if(launchRandomItem)
var/launch_candidate = pick_n_take(launchList)
@@ -792,7 +795,7 @@
for (var/mob/living/M in whoDyin)
admin_ticket_log(M, "[key_name_admin(usr)] [msg]")
/datum/centcom_podlauncher/proc/loadData(var/list/dataToLoad)
/datum/centcom_podlauncher/proc/loadData(list/dataToLoad)
bayNumber = dataToLoad["bayNumber"]
customDropoff = dataToLoad["customDropoff"]
renderLighting = dataToLoad["renderLighting"]
@@ -801,10 +804,9 @@
launchChoice = dataToLoad["launchChoice"] //Launch turfs all at once (0), ordered (1), or randomly(1)
explosionChoice = dataToLoad["explosionChoice"] //An explosion that occurs when landing. Can be no explosion (0), custom explosion (1), or maxcap (2)
damageChoice = dataToLoad["damageChoice"] //Damage that occurs to any mob under the pod when it lands. Can be no damage (0), custom damage (1), or gib+5000dmg (2)
temp_pod.landingDelay = dataToLoad["delay_1"] //How long the pod takes to land after launching
temp_pod.fallDuration = dataToLoad["delay_2"] //How long the pod's falling animation lasts
temp_pod.openingDelay = dataToLoad["delay_3"] //How long the pod takes to open after landing
temp_pod.departureDelay = dataToLoad["delay_4"] //How long the pod takes to leave after opening (if bluespace=true, it deletes. if reversing=true, it flies back to centcom)
temp_pod.delays = dataToLoad["delays"]
temp_pod.reverse_delays = dataToLoad["rev_delays"]
temp_pod.custom_rev_delay = dataToLoad["custom_rev_delay"]
temp_pod.setStyle(dataToLoad["styleChoice"]) //Style is a variable that keeps track of what the pod is supposed to look like. It acts as an index to the GLOB.podstyles list in cargo.dm defines to get the proper icon/name/desc for the pod.
temp_pod.effectShrapnel = dataToLoad["effectShrapnel"] //If true, creates a cloud of shrapnel of a decided type and magnitude on landing
temp_pod.shrapnel_type = text2path(dataToLoad["shrapnelType"])
@@ -819,7 +821,7 @@
temp_pod.effectCircle = dataToLoad["effectCircle"] //If true, allows the pod to come in at any angle. Bit of a weird feature but whatever its here
effectBurst = dataToLoad["effectBurst"] //IOf true, launches five pods at once (with a very small delay between for added coolness), in a 3x3 area centered around the area
temp_pod.reversing = dataToLoad["effectReverse"] //If true, the pod will not send any items. Instead, after opening, it will close again (picking up items/mobs) and fly back to centcom
temp_pod.reverseOptionList = dataToLoad["reverseOptionList"]
temp_pod.reverse_option_list = dataToLoad["reverse_option_list"]
specificTarget = dataToLoad["effectTarget"] //Launches the pod at the turf of a specific mob target, rather than wherever the user clicked. Useful for smites
temp_pod.adminNamed = dataToLoad["effectName"] //Determines whether or not the pod has been named by an admin. If true, the pod's name will not get overridden when the style of the pod changes (changing the style of the pod normally also changes the name+desc)
temp_pod.name = dataToLoad["podName"]
+47 -49
View File
@@ -23,9 +23,9 @@
//*****NOTE*****: Many of these comments are similarly described in centcom_podlauncher.dm. If you change them here, please consider doing so in the centcom podlauncher code as well!
var/adminNamed = FALSE //Determines whether or not the pod has been named by an admin. If true, the pod's name will not get overridden when the style of the pod changes (changing the style of the pod normally also changes the name+desc)
var/bluespace = FALSE //If true, the pod deletes (in a shower of sparks) after landing
var/landingDelay = 30 //How long the pod takes to land after launching
var/openingDelay = 30 //How long the pod takes to open after landing
var/departureDelay = 30 //How long the pod takes to leave after opening. If bluespace = TRUE, it deletes. If reversing = TRUE, it flies back to centcom.
var/delays = list(POD_TRANSIT = 30, POD_FALLING = 4, POD_OPENING = 30, POD_LEAVING = 30)
var/reverse_delays = list(POD_TRANSIT = 30, POD_FALLING = 4, POD_OPENING = 30, POD_LEAVING = 30)
var/custom_rev_delay = FALSE
var/damage = 0 //Damage that occurs to any mob under the pod when it lands.
var/effectStun = FALSE //If true, stuns anyone under the pod when it launches until it lands, forcing them to get hit by the pod. Devilish!
var/effectLimb = FALSE //If true, pops off a limb (if applicable) from anyone caught under the pod when it lands
@@ -38,7 +38,6 @@
var/style = STYLE_STANDARD //Style is a variable that keeps track of what the pod is supposed to look like. It acts as an index to the GLOB.podstyles list in cargo.dm defines to get the proper icon/name/desc for the pod.
var/reversing = FALSE //If true, the pod will not send any items. Instead, after opening, it will close again (picking up items/mobs) and fly back to centcom
var/list/reverse_dropoff_coords //Turf that the reverse pod will drop off it's newly-acquired cargo to
var/fallDuration = 4
var/fallingSoundLength = 11
var/fallingSound = 'sound/weapons/mortar_long_whistle.ogg'//Admin sound to play before the pod lands
var/landingSound //Admin sound to play when the pod lands
@@ -57,14 +56,13 @@
var/effectShrapnel = FALSE
var/shrapnel_type = /obj/item/projectile/bullet/shrapnel
var/shrapnel_magnitude = 3
var/list/reverseOptionList = list("Mobs"=FALSE,"Objects"=FALSE,"Anchored"=FALSE,"Underfloor"=FALSE,"Wallmounted"=FALSE,"Floors"=FALSE,"Walls"=FALSE)
var/list/reverse_option_list = list("Mobs"=FALSE,"Objects"=FALSE,"Anchored"=FALSE,"Underfloor"=FALSE,"Wallmounted"=FALSE,"Floors"=FALSE,"Walls"=FALSE, "Mecha"=FALSE)
var/list/turfs_in_cargo = list()
/obj/structure/closet/supplypod/bluespacepod
style = STYLE_BLUESPACE
bluespace = TRUE
explosionSize = list(0,0,1,2)
landingDelay = 15 //Slightly quicker than the supplypod
/obj/structure/closet/supplypod/extractionpod
name = "Syndicate Extraction Pod"
@@ -73,16 +71,16 @@
style = STYLE_SYNDICATE
bluespace = TRUE
explosionSize = list(0,0,1,2)
landingDelay = 25 //Longer than others
delays = list(POD_TRANSIT = 25, POD_FALLING = 4, POD_OPENING = 30, POD_LEAVING = 30)
/obj/structure/closet/supplypod/centcompod
style = STYLE_CENTCOM
bluespace = TRUE
explosionSize = list(0,0,0,0)
landingDelay = 20 //Very speedy!
delays = list(POD_TRANSIT = 20, POD_FALLING = 4, POD_OPENING = 30, POD_LEAVING = 30)
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
/obj/structure/closet/supplypod/Initialize(var/customStyle = FALSE)
/obj/structure/closet/supplypod/Initialize(mapload, customStyle = FALSE)
. = ..()
if (!loc)
var/shippingLane = GLOB.areas_by_type[/area/centcom/supplypod/supplypod_temp_holding] //temporary holder for supplypods mid-transit
@@ -212,9 +210,8 @@
var/obj/error_landmark = locate(/obj/effect/landmark/error) in GLOB.landmarks_list
var/turf/error_landmark_turf = get_turf(error_landmark)
reverse_dropoff_coords = list(error_landmark_turf.x, error_landmark_turf.y, error_landmark_turf.z)
landingDelay = initial(landingDelay) //Reset the landing timers so we land on whatever turf we're aiming at normally. Will be changed to be editable later (tm)
fallDuration = initial(fallDuration) //This is so if someone adds a really long dramatic landing time they don't have to sit through it twice on the pod's return trip
openingDelay = initial(openingDelay)
if (custom_rev_delay)
delays = reverse_delays
backToNonReverseIcon()
var/turf/return_turf = locate(reverse_dropoff_coords[1], reverse_dropoff_coords[2], reverse_dropoff_coords[3])
new /obj/effect/pod_landingzone(return_turf, src)
@@ -274,11 +271,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), openingDelay) //After the openingDelay 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/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), openingDelay) //After the openingDelay passes, we use the open proc from this supplypod, while referencing this supplypod's contents
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
/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)
@@ -306,9 +303,9 @@
startExitSequence(src)
else
if (reversing)
addtimer(CALLBACK(src, .proc/SetReverseIcon), departureDelay/2) //Finish up the pod's duties after a certain amount of time
addtimer(CALLBACK(src, .proc/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), departureDelay*(4/5)) //Finish up the pod's duties after a certain amount of time
addtimer(CALLBACK(src, .proc/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)
@@ -329,7 +326,7 @@
take_contents(holder)
playsound(holder, close_sound, soundVolume*0.75, TRUE, -3)
holder.setClosed()
addtimer(CALLBACK(src, .proc/preReturn, holder), departureDelay * 0.2) //Start to leave a bit after closing for cinematic effect
addtimer(CALLBACK(src, .proc/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()
@@ -355,7 +352,7 @@
if(to_insert.invisibility == INVISIBILITY_ABSTRACT)
return FALSE
if(ismob(to_insert))
if(!reverseOptionList["Mobs"])
if(!reverse_option_list["Mobs"])
return FALSE
if(!isliving(to_insert)) //let's not put ghosts or camera mobs inside
return FALSE
@@ -374,32 +371,30 @@
return FALSE
if(istype(obj_to_insert, /obj/effect/supplypod_rubble))
return FALSE
if(obj_to_insert.level == 1)
return FALSE // underfloor, until we get hide components.
/*
if((obj_to_insert.comp_lookup && obj_to_insert.comp_lookup[COMSIG_OBJ_HIDE]) && reverseOptionList["Underfloor"])
// if((obj_to_insert.comp_lookup && obj_to_insert.comp_lookup[COMSIG_OBJ_HIDE]) && reverse_option_list["Underfloor"])
// return TRUE
// else if ((obj_to_insert.comp_lookup && obj_to_insert.comp_lookup[COMSIG_OBJ_HIDE]) && !reverse_option_list["Underfloor"])
// return FALSE
if(isProbablyWallMounted(obj_to_insert) && reverse_option_list["Wallmounted"])
return TRUE
else if ((obj_to_insert.comp_lookup && obj_to_insert.comp_lookup[COMSIG_OBJ_HIDE]) && !reverseOptionList["Underfloor"])
else if (isProbablyWallMounted(obj_to_insert) && !reverse_option_list["Wallmounted"])
return FALSE
*/
if(isProbablyWallMounted(obj_to_insert) && reverseOptionList["Wallmounted"])
if(!obj_to_insert.anchored && reverse_option_list["Unanchored"])
return TRUE
else if (isProbablyWallMounted(obj_to_insert) && !reverseOptionList["Wallmounted"])
return FALSE
if(!obj_to_insert.anchored && reverseOptionList["Unanchored"])
if(obj_to_insert.anchored && !ismecha(obj_to_insert) && reverse_option_list["Anchored"]) //Mecha are anchored but there is a separate option for them
return TRUE
if(obj_to_insert.anchored && reverseOptionList["Anchored"])
if(ismecha(obj_to_insert) && reverse_option_list["Mecha"])
return TRUE
return FALSE
else if (isturf(to_insert))
if(isfloorturf(to_insert) && reverseOptionList["Floors"])
if(isfloorturf(to_insert) && reverse_option_list["Floors"])
return TRUE
if(isfloorturf(to_insert) && !reverseOptionList["Floors"])
if(isfloorturf(to_insert) && !reverse_option_list["Floors"])
return FALSE
if(isclosedturf(to_insert) && reverseOptionList["Walls"])
if(isclosedturf(to_insert) && reverse_option_list["Walls"])
return TRUE
if(isclosedturf(to_insert) && !reverseOptionList["Walls"])
if(isclosedturf(to_insert) && !reverse_option_list["Walls"])
return FALSE
return FALSE
return TRUE
@@ -459,10 +454,12 @@
if(!glow_effect)
return
glow_effect.layer = LOW_ITEM_LAYER
glow_effect.fadeAway(openingDelay)
glow_effect.fadeAway(delays[POD_OPENING])
glow_effect = null
/obj/structure/closet/supplypod/Destroy()
deleteRubble()
endGlow()
open_pod(src, broken = TRUE) //Lets dump our contents by opening up
return ..()
@@ -536,9 +533,9 @@
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
/obj/effect/pod_landingzone_effect/Initialize(mapload, obj/structure/closet/supplypod/pod)
. = ..()
transform = matrix() * 1.5
animate(src, transform = matrix()*0.01, time = pod.landingDelay+pod.fallDuration)
..()
animate(src, transform = matrix()*0.01, time = pod.delays[POD_TRANSIT]+pod.delays[POD_FALLING])
/obj/effect/pod_landingzone //This is the object that forceMoves the supplypod to it's location
name = "Landing Zone Indicator"
@@ -564,11 +561,12 @@
if (!pod.effectStealth)
helper = new (drop_location(), pod)
alpha = 255
animate(src, transform = matrix().Turn(90), time = pod.landingDelay+pod.fallDuration)
animate(src, transform = matrix().Turn(90), time = pod.delays[POD_TRANSIT]+pod.delays[POD_FALLING])
if (single_order)
if (istype(single_order, /datum/supply_order))
var/datum/supply_order/SO = single_order
SO.generate(pod)
if (SO.pack.crate_type)
SO.generate(pod)
else if (istype(single_order, /atom/movable))
var/atom/movable/O = single_order
O.forceMove(pod)
@@ -576,16 +574,16 @@
mob_in_pod.reset_perspective(src)
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.landingDelay+10, ignore_canstun = TRUE)//you ain't goin nowhere, kid.
if (pod.fallDuration == initial(pod.fallDuration) && pod.landingDelay + pod.fallDuration < pod.fallingSoundLength)
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)
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.landingDelay - pod.fallingSoundLength + pod.fallDuration
var/soundStartTime = pod.delays[POD_TRANSIT] - pod.fallingSoundLength + pod.delays[POD_FALLING]
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.landingDelay)
addtimer(CALLBACK(src, .proc/beginLaunch, pod.effectCircle), pod.delays[POD_TRANSIT])
/obj/effect/pod_landingzone/proc/playFallingSound()
playsound(src, pod.fallingSound, pod.soundVolume, TRUE, 6)
@@ -606,9 +604,9 @@
pod.transform = matrix().Turn(rotation)
pod.layer = FLY_LAYER
if (pod.style != STYLE_INVISIBLE)
animate(pod.get_filter("motionblur"), y = 0, time = pod.fallDuration, flags = ANIMATION_PARALLEL)
animate(pod, pixel_z = -1 * abs(sin(rotation))*4, pixel_x = SUPPLYPOD_X_OFFSET + (sin(rotation) * 20), time = pod.fallDuration, easing = LINEAR_EASING, flags = ANIMATION_PARALLEL) //Make the pod fall! At an angle!
addtimer(CALLBACK(src, .proc/endLaunch), pod.fallDuration, TIMER_CLIENT_TIME) //Go onto the last step after a very short falling animation
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
/obj/effect/pod_landingzone/proc/setupSmoke(rotation)
if (pod.style == STYLE_INVISIBLE || pod.style == STYLE_SEETHROUGH)
@@ -622,17 +620,17 @@
smoke_effects[i] = smoke_part
smoke_part.pixel_x = sin(rotation)*32 * i
smoke_part.pixel_y = abs(cos(rotation))*32 * i
smoke_part.filters += filter(type = "blur", size = 4)
var/time = (pod.fallDuration / length(smoke_effects))*(length(smoke_effects)-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
QDEL_IN(smoke_part, pod.fallDuration + 35)
QDEL_IN(smoke_part, pod.delays[POD_FALLING] + 35)
/obj/effect/pod_landingzone/proc/drawSmoke()
if (pod.style == STYLE_INVISIBLE || pod.style == STYLE_SEETHROUGH)
return
for (var/obj/effect/supplypod_smoke/smoke_part in smoke_effects)
animate(smoke_part, alpha = 0, time = 20, flags = ANIMATION_PARALLEL)
animate(smoke_part.filters[1], size = 6, time = 15, easing = CUBIC_EASING|EASE_OUT, flags = ANIMATION_PARALLEL)
animate(smoke_part.get_filter("smoke_blur"), size = 6, time = 15, easing = CUBIC_EASING|EASE_OUT, flags = ANIMATION_PARALLEL)
/obj/effect/pod_landingzone/proc/endLaunch()
pod.tryMakeRubble(drop_location())
+3 -3
View File
@@ -507,7 +507,7 @@
to_chat(body,"<span class='warning'>You will attempt to kill [target.body.real_name] tonight.</span>")
/datum/mafia_role/traitor/proc/try_to_kill(datum/mafia_controller/source)
SIGNAL_HANDLER
// SIGNAL_HANDLER
var/datum/mafia_role/target = current_victim
current_victim = null
@@ -571,7 +571,7 @@
to_chat(body,"<span class='danger'>You will hunt everyone in a flickering room down tonight.</span>")
/datum/mafia_role/nightmare/proc/flicker_or_hunt(datum/mafia_controller/source)
SIGNAL_HANDLER
// SIGNAL_HANDLER
if(game_status != MAFIA_ALIVE || !flicker_target)
return
@@ -736,7 +736,7 @@
RegisterSignal(src,COMSIG_MAFIA_ON_KILL,.proc/prank)
/datum/mafia_role/clown/proc/prank(datum/source,datum/mafia_controller/game,lynch)
SIGNAL_HANDLER
// SIGNAL_HANDLER
if(lynch)
var/datum/mafia_role/victim = pick(game.judgement_guilty_votes + game.judgement_abstain_votes)