Adds a Supplypod-delivery admin smite (#38069)
* wa la * oop forgot an icon * buildmode compatibility * ok * makes centcompod default * CentCom pods fall faster and are capatilized right * yike * yike2 * FASTER * white space and default icon state * spacemaniac thanks
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
//The "BDPtarget" temp visual is created by the expressconsole, which in turn makes two things: a falling droppod animation, and the droppod itself.
|
||||
#define POD_STANDARD 0
|
||||
#define POD_BLUESPACE 1
|
||||
#define POD_CENTCOM 2
|
||||
|
||||
//------------------------------------SUPPLY POD-------------------------------------//
|
||||
/obj/structure/closet/supplypod
|
||||
@@ -18,17 +19,25 @@
|
||||
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 90, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
anchored = TRUE
|
||||
anchorable = FALSE
|
||||
var/generated = FALSE
|
||||
var/datum/supply_order/SupplyOrder
|
||||
var/atom/other_delivery
|
||||
|
||||
/obj/structure/closet/supplypod/bluespacepod
|
||||
name = "Bluespace Drop Pod"
|
||||
desc = "A Nanotrasen Bluespace drop pod. Teleports back to CentCom after delivery."
|
||||
icon_state = "bluespacepod"
|
||||
|
||||
/obj/structure/closet/supplypod/Initialize(mapload, datum/supply_order/so)
|
||||
/obj/structure/closet/supplypod/bluespacepod/centcompod
|
||||
name = "CentCom Drop Pod"
|
||||
desc = "A Nanotrasen Bluespace drop pod, this one has been marked with Central Command's designations. Teleports back to Centcom after delivery."
|
||||
icon_state = "centcompod"
|
||||
|
||||
/obj/structure/closet/supplypod/Initialize(mapload, var/SO)
|
||||
. = ..()
|
||||
SupplyOrder = so//uses Supply Order passed from expressconsole into BDPtarget
|
||||
if(istype(SO, /datum/supply_order))
|
||||
SupplyOrder = SO//uses Supply Order passed from expressconsole into BDPtarget
|
||||
else
|
||||
other_delivery = SO//if the object is not a supply order, we force the object in the pod
|
||||
addtimer(CALLBACK(src, .proc/open), 30)//open 3seconds after appearing
|
||||
|
||||
/obj/structure/closet/supplypod/update_icon()
|
||||
@@ -47,9 +56,10 @@
|
||||
/obj/structure/closet/supplypod/open()
|
||||
var/turf/T = get_turf(src)
|
||||
opened = TRUE
|
||||
if(!generated)
|
||||
generated = TRUE
|
||||
if(SupplyOrder)
|
||||
SupplyOrder.generate(T)//not called during populateContents as supplyorder generation requires a turf
|
||||
if(other_delivery)
|
||||
new other_delivery(T)
|
||||
update_icon()
|
||||
playsound(src, open_sound, 15, 1, -3)
|
||||
if(istype(src,/obj/structure/closet/supplypod/bluespacepod))
|
||||
@@ -66,21 +76,24 @@
|
||||
//------------------------------------FALLING SUPPLY POD-------------------------------------//
|
||||
/obj/effect/temp_visual/DPfall
|
||||
icon = 'icons/obj/2x2.dmi'
|
||||
icon_state = "supplypod_falling"
|
||||
pixel_x = -16
|
||||
pixel_y = -5
|
||||
pixel_z = 200
|
||||
desc = "Get out of the way!"
|
||||
layer = FLY_LAYER//that wasnt flying, that was falling with style!
|
||||
randomdir = FALSE
|
||||
icon_state = "supplypod_falling"
|
||||
|
||||
/obj/effect/temp_visual/DPfall/Initialize(var/dropLocation, var/podID)
|
||||
if (podID == POD_BLUESPACE)
|
||||
if (podID == POD_STANDARD)
|
||||
icon_state = "supplypod_falling"
|
||||
name = "Supply Drop Pod"
|
||||
else if (podID == POD_BLUESPACE)
|
||||
icon_state = "bluespacepod_falling"
|
||||
name = "Bluespace Drop Pod"
|
||||
else
|
||||
icon_state = "supplypod_falling"
|
||||
name = "Supply Drop Pod"
|
||||
icon_state = "centcompod_falling"
|
||||
name = "CentCom Drop Pod"
|
||||
. = ..()
|
||||
|
||||
//------------------------------------TEMPORARY_VISUAL-------------------------------------//
|
||||
@@ -91,22 +104,34 @@
|
||||
light_range = 2
|
||||
var/obj/effect/temp_visual/fallingPod
|
||||
|
||||
/obj/effect/DPtarget/Initialize(mapload, datum/supply_order/SO, var/podID)
|
||||
/obj/effect/DPtarget/Initialize(mapload, var/SO, var/podID)
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/beginLaunch, SO, podID), podID == POD_BLUESPACE ? 15 : 30)//standard pods take 3 seconds to come in, bluespace pods take 1.5
|
||||
var/delayTime = 0
|
||||
switch(podID)
|
||||
if(POD_STANDARD)
|
||||
delayTime = 30
|
||||
if(POD_BLUESPACE)
|
||||
delayTime = 15
|
||||
if(POD_CENTCOM)
|
||||
delayTime = 1
|
||||
|
||||
/obj/effect/DPtarget/proc/beginLaunch(datum/supply_order/SO, var/podID)
|
||||
addtimer(CALLBACK(src, .proc/beginLaunch, SO, podID), delayTime)//standard pods take 3 seconds to come in, bluespace pods take 1.5
|
||||
|
||||
/obj/effect/DPtarget/proc/beginLaunch(var/SO, var/podID)
|
||||
fallingPod = new /obj/effect/temp_visual/DPfall(drop_location(), podID)
|
||||
animate(fallingPod, pixel_z = 0, time = 3, easing = LINEAR_EASING)//make and animate a falling pod
|
||||
addtimer(CALLBACK(src, .proc/endLaunch, SO, podID), 3, TIMER_CLIENT_TIME)//fall 0.3seconds
|
||||
|
||||
/obj/effect/DPtarget/proc/endLaunch(datum/supply_order/SO, var/podID)
|
||||
if (podID == POD_BLUESPACE)
|
||||
/obj/effect/DPtarget/proc/endLaunch(var/SO, var/podID)
|
||||
if (podID == POD_STANDARD)
|
||||
new /obj/structure/closet/supplypod(drop_location(), SO)//pod is created
|
||||
explosion(src,0,0,2, flame_range = 3) //less advanced equipment than bluespace pod, so larger explosion when landing
|
||||
else if (podID == POD_BLUESPACE)
|
||||
new /obj/structure/closet/supplypod/bluespacepod(drop_location(), SO)//pod is created
|
||||
explosion(src,0,0,2, flame_range = 1) //explosion and camshake (shoutout to @cyberboss)
|
||||
else
|
||||
new /obj/structure/closet/supplypod(drop_location(), SO)//pod is created
|
||||
explosion(src,0,0,2, flame_range = 3) //less advanced equipment than bluespace pod, so larger explosion when landing
|
||||
new /obj/structure/closet/supplypod/bluespacepod/centcompod(drop_location(), SO)
|
||||
explosion(src,0,0,2, flame_range = 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/DPtarget/Destroy()
|
||||
@@ -120,4 +145,4 @@
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "cargodisk"
|
||||
item_state = "card-id"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
Reference in New Issue
Block a user