Adds the Bluespace Drop Pod upgrade to the cargo express console
This commit is contained in:
committed by
CitadelStationBot
parent
5e1ff26276
commit
8e090b430b
@@ -1,84 +0,0 @@
|
||||
//The "BDPtarget" temp visual is created by the expressconsole, which in turn makes two things: a falling droppod animation, and the droppod itself.
|
||||
|
||||
|
||||
//------------------------------------BLUESPACE DROP POD-------------------------------------//
|
||||
/obj/structure/closet/bsdroppod
|
||||
name = "Supply Drop Pod"
|
||||
desc = "A Nanotrasen supply drop pod."
|
||||
icon = 'icons/obj/2x2.dmi'
|
||||
icon_state = "BDP"
|
||||
pixel_x = -16//2x2 sprite
|
||||
pixel_y = -5
|
||||
layer = TABLE_LAYER//so that the crate inside doesn't appear underneath
|
||||
allow_objects = TRUE
|
||||
allow_dense = TRUE
|
||||
delivery_icon = null
|
||||
can_weld_shut = FALSE
|
||||
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/datum/supply_order/SupplyOrder
|
||||
|
||||
/obj/structure/closet/bsdroppod/Initialize(mapload, datum/supply_order/so)
|
||||
. = ..()
|
||||
SupplyOrder = so//uses Supply Order passed from expressconsole into BDPtarget
|
||||
addtimer(CALLBACK(src, .proc/open), 30)//open 3seconds after appearing
|
||||
|
||||
/obj/structure/closet/bsdroppod/update_icon()
|
||||
cut_overlays()
|
||||
if (opened)
|
||||
add_overlay("BDP_open")
|
||||
else
|
||||
add_overlay("BDP_door")
|
||||
|
||||
/obj/structure/closet/bsdroppod/toggle(mob/living/user)
|
||||
return
|
||||
|
||||
/obj/structure/closet/bsdroppod/open()
|
||||
var/turf/T = get_turf(src)
|
||||
opened = TRUE
|
||||
SupplyOrder.generate(T)//not called during populateContents as supplyorder generation requires a turf
|
||||
update_icon()
|
||||
playsound(src, open_sound, 15, 1, -3)
|
||||
|
||||
/obj/structure/closet/bsdroppod/Destroy()//make some sparks b4 deletion
|
||||
QDEL_NULL(SupplyOrder)
|
||||
return ..()
|
||||
|
||||
//------------------------------------FALLING BLUESPACE DROP POD-------------------------------------//
|
||||
/obj/effect/temp_visual/BDPfall
|
||||
icon = 'icons/obj/2x2.dmi'
|
||||
icon_state = "BDP_falling"
|
||||
pixel_x = -16
|
||||
pixel_y = -5
|
||||
pixel_z = 200
|
||||
name = "Bluespace Drop Pod"
|
||||
desc = "Get out of the way!"
|
||||
layer = FLY_LAYER//that wasnt flying, that was falling with style!
|
||||
randomdir = FALSE
|
||||
|
||||
//------------------------------------TEMPORARY_VISUAL-------------------------------------//
|
||||
/obj/effect/BDPtarget
|
||||
icon = 'icons/mob/actions/actions_items.dmi'
|
||||
icon_state = "sniper_zoom"
|
||||
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
|
||||
light_range = 2
|
||||
var/obj/effect/temp_visual/fallingPod
|
||||
|
||||
/obj/effect/BDPtarget/Initialize(mapload, datum/supply_order/SO)
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/beginLaunch, SO), 30)//wait 3 seconds
|
||||
|
||||
/obj/effect/BDPtarget/proc/beginLaunch(datum/supply_order/SO)
|
||||
fallingPod = new /obj/effect/temp_visual/BDPfall(drop_location())
|
||||
animate(fallingPod, pixel_z = 0, time = 3, easing = LINEAR_EASING)//make and animate a falling pod
|
||||
addtimer(CALLBACK(src, .proc/endLaunch, SO), 3, TIMER_CLIENT_TIME)//fall 0.3seconds
|
||||
|
||||
/obj/effect/BDPtarget/proc/endLaunch(datum/supply_order/SO)
|
||||
new /obj/structure/closet/bsdroppod(drop_location(), SO)//pod is created
|
||||
explosion(src,0,0,2, flame_range = 2) //explosion and camshake (shoutout to @cyberboss)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/BDPtarget/Destroy()
|
||||
QDEL_NULL(fallingPod)//delete falling pod after animation's over
|
||||
return ..()
|
||||
@@ -0,0 +1,118 @@
|
||||
//The "BDPtarget" temp visual is created by the expressconsole, which in turn makes two things: a falling droppod animation, and the droppod itself.
|
||||
|
||||
|
||||
//------------------------------------SUPPLY POD-------------------------------------//
|
||||
/obj/structure/closet/supplypod
|
||||
name = "Supply Drop Pod"
|
||||
desc = "A Nanotrasen supply drop pod."
|
||||
icon = 'icons/obj/2x2.dmi'
|
||||
icon_state = "supplypod"
|
||||
pixel_x = -16//2x2 sprite
|
||||
pixel_y = -5
|
||||
layer = TABLE_LAYER//so that the crate inside doesn't appear underneath
|
||||
allow_objects = TRUE
|
||||
allow_dense = TRUE
|
||||
delivery_icon = null
|
||||
can_weld_shut = FALSE
|
||||
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/datum/supply_order/SupplyOrder
|
||||
|
||||
/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)
|
||||
. = ..()
|
||||
SupplyOrder = so//uses Supply Order passed from expressconsole into BDPtarget
|
||||
addtimer(CALLBACK(src, .proc/open), 30)//open 3seconds after appearing
|
||||
|
||||
/obj/structure/closet/supplypod/update_icon()
|
||||
cut_overlays()
|
||||
if (opened)
|
||||
add_overlay("[icon_state]_open")
|
||||
else
|
||||
add_overlay("[icon_state]_door")
|
||||
|
||||
/obj/structure/closet/supplypod/bluespacepod/tool_interact(obj/item/W, mob/user)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/supplypod/toggle(mob/living/user)
|
||||
return
|
||||
|
||||
/obj/structure/closet/supplypod/open()
|
||||
var/turf/T = get_turf(src)
|
||||
opened = TRUE
|
||||
SupplyOrder.generate(T)//not called during populateContents as supplyorder generation requires a turf
|
||||
update_icon()
|
||||
playsound(src, open_sound, 15, 1, -3)
|
||||
if(istype(src,/obj/structure/closet/supplypod/bluespacepod))
|
||||
addtimer(CALLBACK(src, .proc/sparks), 30)//if bluespace, then 3 seconds after opening, make some sparks and delete
|
||||
|
||||
/obj/structure/closet/supplypod/proc/sparks()//sparks cant be called from addtimer
|
||||
do_sparks(5, TRUE, src)
|
||||
qdel(src)//no need for QDEL_IN if we already have a timer
|
||||
|
||||
/obj/structure/closet/supplypod/Destroy()//make some sparks b4 deletion
|
||||
QDEL_NULL(SupplyOrder)
|
||||
return ..()
|
||||
|
||||
//------------------------------------FALLING SUPPLY POD-------------------------------------//
|
||||
/obj/effect/temp_visual/DPfall
|
||||
icon = 'icons/obj/2x2.dmi'
|
||||
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
|
||||
|
||||
/obj/effect/temp_visual/DPfall/Initialize(var/dropLocation, var/podID)
|
||||
if (podID == 1)
|
||||
icon_state = "bluespacepod_falling"
|
||||
name = "Bluespace Drop Pod"
|
||||
else
|
||||
icon_state = "supplypod_falling"
|
||||
name = "Supply Drop Pod"
|
||||
. = ..()
|
||||
|
||||
//------------------------------------TEMPORARY_VISUAL-------------------------------------//
|
||||
/obj/effect/DPtarget
|
||||
icon = 'icons/mob/actions/actions_items.dmi'
|
||||
icon_state = "sniper_zoom"
|
||||
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
|
||||
light_range = 2
|
||||
var/obj/effect/temp_visual/fallingPod
|
||||
|
||||
/obj/effect/DPtarget/Initialize(mapload, datum/supply_order/SO, var/podID)
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/beginLaunch, SO, podID), 30)//wait 3 seconds
|
||||
|
||||
/obj/effect/DPtarget/proc/beginLaunch(datum/supply_order/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 == 1)//podID 1 = bluespace supplypod, podID 0 = standard supplypod
|
||||
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
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/DPtarget/Destroy()
|
||||
QDEL_NULL(fallingPod)//delete falling pod after animation's over
|
||||
return ..()
|
||||
|
||||
//------------------------------------UPGRADES-------------------------------------//
|
||||
/obj/item/disk/cargo/bluespace_pod
|
||||
name = "Bluespace Drop Pod Upgrade"
|
||||
desc = "This disk provides a firmware update to the Express Supply Console, granting the use of Nanotrasen's Bluespace Drop Pods to the supply department."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "cargodisk"
|
||||
item_state = "card-id"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
@@ -12,7 +12,12 @@
|
||||
var/message
|
||||
var/locked = TRUE
|
||||
var/list/meme_pack_data
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
var/podID = 0//0 is your standard supply droppod (requires dissassembly after landing), 1 is the bluespace drop pod (teleports out after landing)
|
||||
|
||||
>>>>>>> 9ec4f2f... Adds the Bluespace Drop Pod upgrade to the cargo express console (#34560)
|
||||
/obj/machinery/computer/cargo/express/Initialize()
|
||||
. = ..()
|
||||
packin_up()
|
||||
@@ -24,6 +29,12 @@
|
||||
locked = !locked
|
||||
to_chat(user, "<span class='notice'>You [locked ? "lock" : "unlock"] the interface.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/disk/cargo/bluespace_pod))
|
||||
podID = 1//doesnt effect circuit board, so that reversal is possible
|
||||
to_chat(user, "<span class='notice'>You insert the disk into [src], allowing for advanced supply delivery vehicles.</span>")
|
||||
qdel(W)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/cargo/express/emag_act(mob/living/user)
|
||||
if(emagged)
|
||||
return
|
||||
@@ -114,7 +125,7 @@
|
||||
if(empty_turfs && empty_turfs.len)
|
||||
var/LZ = empty_turfs[rand(empty_turfs.len-1)]
|
||||
SSshuttle.points -= SO.pack.cost * 2
|
||||
new /obj/effect/BDPtarget(LZ, SO)
|
||||
new /obj/effect/DPtarget(LZ, SO, podID)
|
||||
. = TRUE
|
||||
update_icon()
|
||||
else
|
||||
@@ -131,7 +142,7 @@
|
||||
for(var/i in 1 to MAX_EMAG_ROCKETS)
|
||||
var/LZ = empty_turfs[rand(empty_turfs.len-1)]
|
||||
LAZYREMOVE(empty_turfs, LZ)
|
||||
new /obj/effect/BDPtarget(LZ, SO)
|
||||
new /obj/effect/DPtarget(LZ, SO, podID)
|
||||
. = TRUE
|
||||
update_icon()
|
||||
CHECK_TICK
|
||||
|
||||
@@ -13,6 +13,16 @@
|
||||
category = list("Mining Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_CARGO
|
||||
|
||||
/datum/design/bluespace_pod
|
||||
name = "Supply Drop Pod Upgrade Disk"
|
||||
desc = "Allows the Cargo Express Console to call down the Bluespace Drop Pod, greatly increasing user saftey."//who?
|
||||
id = "bluespace_pod"//the coder reading this
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_GLASS = 1000)
|
||||
build_path = /obj/item/disk/cargo/bluespace_pod
|
||||
category = list("Mining Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_CARGO
|
||||
|
||||
/datum/design/drill
|
||||
name = "Mining Drill"
|
||||
desc = "Yours is the drill that will pierce through the rock walls."
|
||||
|
||||
@@ -432,7 +432,7 @@
|
||||
display_name = "Advanced Mining Technology"
|
||||
description = "Efficiency Level 127" //dumb mc references
|
||||
prereq_ids = list("basic_mining", "adv_engi", "adv_power", "adv_plasma")
|
||||
design_ids = list("drill_diamond", "jackhammer", "hypermod", "plasmacutter", "plasmacutter_adv")
|
||||
design_ids = list("drill_diamond", "jackhammer", "hypermod", "plasmacutter", "plasmacutter_adv", "bluespace_pod")
|
||||
research_cost = 2500
|
||||
export_price = 5000
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
+1
-1
@@ -1112,7 +1112,6 @@
|
||||
#include "code\game\objects\structures\crates_lockers\closets\utility_closets.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\wardrobe.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\bar.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\bsdroppod.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\cargo.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\engineering.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\freezer.dm"
|
||||
@@ -1123,6 +1122,7 @@
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\scientist.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\secure_closets.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\security.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\closets\secure\supplypod.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\crates\bins.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\crates\critter.dm"
|
||||
#include "code\game\objects\structures\crates_lockers\crates\large.dm"
|
||||
|
||||
Reference in New Issue
Block a user