mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
Cargo Update: Cargo Supplypod Beacons! (#37345)
(THE CODEX ASTARTES CALLS THIS MANEUVER: STEEL RAIN) [New sprite!] * file the boy asdh beacon overlays first pass complete bring out the drinks boys fixes! fixes! whups fix name speed makes coffin a crate to prevent runtimes sprite fuckup:the musical whups more fixes why tf was screengen modified??? TO THE FILE devices changes things p[omf pomf uhg alright fuk it issue fix pt 1 in which i make merge conflicts my bitch by fixing devices.dmi and tgui.js oh shit forgot about the items repath hm nah merge conflict a then all ya gotta do is whip * shiv review me code reeeeeeeeeeeeeeee * rebase conflict * anturk * asdf * wooooeeeeeeh makin bacon * dont forget about lil old me * id like to give a shoutout, to my man spacemaniac. on the soul plane. rip in peice, my bugs. rip in peice * spacy man what is ur spacy plan * 1st * 2nd * organization also a thing * so i figured out why defines didnt work sometimes across files. this fixes the last issue rn * forgot to cop the commit * fuck how am i so stupid * adds comments and agrees with spacemaniac * asdfghjk
This commit is contained in:
committed by
Tad Hardesty
parent
729ad5578f
commit
32c8d0abc5
@@ -2166,7 +2166,7 @@
|
||||
/turf/open/floor/plasteel,
|
||||
/area/ruin/space/derelict/arrival)
|
||||
"hj" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/turf/open/floor/plasteel/dark,
|
||||
/area/ruin/space/derelict/medical/chapel)
|
||||
"hk" = (
|
||||
@@ -2600,7 +2600,7 @@
|
||||
dir = 4;
|
||||
req_access_txt = "25"
|
||||
},
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/turf/open/floor/plating,
|
||||
/area/ruin/space/derelict/medical/chapel)
|
||||
"iL" = (
|
||||
|
||||
@@ -3688,7 +3688,7 @@
|
||||
/turf/open/floor/vault,
|
||||
/area/awaymission/academy/academyengine)
|
||||
"mm" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/turf/open/floor/plating,
|
||||
/area/awaymission/academy/academyengine)
|
||||
"mn" = (
|
||||
|
||||
@@ -13123,7 +13123,7 @@
|
||||
/turf/open/floor/plasteel,
|
||||
/area/gateway)
|
||||
"aHi" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/obj/structure/window/reinforced{
|
||||
dir = 8
|
||||
},
|
||||
@@ -13148,7 +13148,7 @@
|
||||
/turf/open/floor/plasteel/dark,
|
||||
/area/chapel/main)
|
||||
"aHl" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/obj/machinery/door/window/eastleft{
|
||||
name = "Coffin Storage";
|
||||
req_access_txt = "22"
|
||||
@@ -13685,7 +13685,7 @@
|
||||
/turf/open/floor/plasteel/grimy,
|
||||
/area/chapel/office)
|
||||
"aID" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/obj/structure/window/reinforced{
|
||||
dir = 4
|
||||
},
|
||||
@@ -14220,7 +14220,7 @@
|
||||
/turf/open/floor/plasteel/grimy,
|
||||
/area/chapel/office)
|
||||
"aJV" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/obj/machinery/door/window/eastleft{
|
||||
dir = 8;
|
||||
name = "Coffin Storage";
|
||||
|
||||
@@ -69042,7 +69042,7 @@
|
||||
/turf/open/floor/plating,
|
||||
/area/chapel/main)
|
||||
"cPB" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/obj/machinery/light/small{
|
||||
dir = 1
|
||||
},
|
||||
@@ -69050,7 +69050,7 @@
|
||||
/turf/open/floor/plating,
|
||||
/area/chapel/main)
|
||||
"cPC" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/obj/structure/window/reinforced{
|
||||
dir = 4
|
||||
},
|
||||
@@ -69300,7 +69300,7 @@
|
||||
/turf/open/floor/plating,
|
||||
/area/maintenance/aft)
|
||||
"cPZ" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/turf/open/floor/plating,
|
||||
/area/chapel/main)
|
||||
"cQa" = (
|
||||
@@ -69663,7 +69663,7 @@
|
||||
/turf/open/floor/plasteel,
|
||||
/area/science/xenobiology)
|
||||
"cQT" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/obj/machinery/light/small,
|
||||
/turf/open/floor/plating,
|
||||
/area/chapel/main)
|
||||
@@ -74811,7 +74811,7 @@
|
||||
/turf/open/floor/wood,
|
||||
/area/security/vacantoffice)
|
||||
"djX" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/obj/machinery/door/window/eastleft{
|
||||
name = "Coffin Storage";
|
||||
req_access_txt = "22"
|
||||
|
||||
@@ -13142,7 +13142,7 @@
|
||||
/turf/open/floor/plating,
|
||||
/area/maintenance/department/cargo)
|
||||
"aIq" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/obj/item/toy/figure/lawyer,
|
||||
/obj/effect/decal/cleanable/cobweb{
|
||||
icon_state = "cobweb2"
|
||||
@@ -13559,7 +13559,7 @@
|
||||
/turf/open/floor/plating,
|
||||
/area/maintenance/department/cargo)
|
||||
"aJw" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/obj/item/toy/figure/chaplain,
|
||||
/turf/open/floor/plating,
|
||||
/area/maintenance/department/cargo)
|
||||
@@ -13885,7 +13885,7 @@
|
||||
/turf/open/floor/plating,
|
||||
/area/maintenance/department/cargo)
|
||||
"aKr" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/obj/item/toy/figure/curator,
|
||||
/turf/open/floor/plating,
|
||||
/area/maintenance/department/cargo)
|
||||
@@ -14258,7 +14258,7 @@
|
||||
/turf/open/floor/plating,
|
||||
/area/maintenance/department/crew_quarters/bar)
|
||||
"aLI" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/turf/open/floor/plating,
|
||||
/area/maintenance/department/crew_quarters/bar)
|
||||
"aLK" = (
|
||||
@@ -42855,7 +42855,7 @@
|
||||
/turf/open/floor/plasteel/hydrofloor,
|
||||
/area/chapel/main/monastery)
|
||||
"ciz" = (
|
||||
/obj/structure/closet/coffin,
|
||||
/obj/structure/closet/crate/coffin,
|
||||
/turf/open/floor/plasteel/dark,
|
||||
/area/chapel/main/monastery)
|
||||
"ciA" = (
|
||||
|
||||
@@ -182,7 +182,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
|
||||
new/datum/stack_recipe("winged wooden chair", /obj/structure/chair/wood/wings, 3, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("coffin", /obj/structure/closet/crate/coffin, 5, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("dog bed", /obj/structure/bed/dogbed, 10, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
|
||||
@@ -125,17 +125,6 @@
|
||||
new /obj/item/storage/fancy/candle_box(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/coffin
|
||||
name = "coffin"
|
||||
desc = "It's a burial receptacle for the dearly departed."
|
||||
icon_state = "coffin"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
horizontal = TRUE
|
||||
delivery_icon = "deliverycrate"
|
||||
material_drop = /obj/item/stack/sheet/mineral/wood
|
||||
material_drop_amount = 5
|
||||
|
||||
/obj/structure/closet/wardrobe/red
|
||||
name = "security wardrobe"
|
||||
icon_door = "red"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
//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
|
||||
|
||||
//------------------------------------SUPPLY POD-------------------------------------//
|
||||
/obj/structure/closet/supplypod
|
||||
@@ -52,11 +53,11 @@
|
||||
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
|
||||
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)
|
||||
@@ -74,7 +75,7 @@
|
||||
randomdir = FALSE
|
||||
|
||||
/obj/effect/temp_visual/DPfall/Initialize(var/dropLocation, var/podID)
|
||||
if (podID == 1)
|
||||
if (podID == POD_BLUESPACE)
|
||||
icon_state = "bluespacepod_falling"
|
||||
name = "Bluespace Drop Pod"
|
||||
else
|
||||
@@ -92,15 +93,15 @@
|
||||
|
||||
/obj/effect/DPtarget/Initialize(mapload, datum/supply_order/SO, var/podID)
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/beginLaunch, SO, podID), 30)//wait 3 seconds
|
||||
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
|
||||
|
||||
/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
|
||||
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
|
||||
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
|
||||
|
||||
@@ -64,6 +64,15 @@
|
||||
manifest = null
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/crate/coffin
|
||||
name = "coffin"
|
||||
desc = "It's a burial receptacle for the dearly departed."
|
||||
icon_state = "coffin"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
material_drop = /obj/item/stack/sheet/mineral/wood
|
||||
material_drop_amount = 5
|
||||
|
||||
/obj/structure/closet/crate/internals
|
||||
desc = "An internals crate."
|
||||
name = "internals crate"
|
||||
|
||||
@@ -387,7 +387,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
|
||||
return H.reagents.has_reagent("holy water")
|
||||
return 0
|
||||
if(BANISH_COFFIN)
|
||||
return (body && istype(body.loc, /obj/structure/closet/coffin))
|
||||
return (body && istype(body.loc, /obj/structure/closet/crate/coffin))
|
||||
if(BANISH_FORMALDYHIDE)
|
||||
if(iscarbon(body))
|
||||
var/mob/living/carbon/H = body
|
||||
|
||||
@@ -26,7 +26,10 @@
|
||||
export_types = list(/obj/structure/closet/crate/wooden)
|
||||
exclude_types = list()
|
||||
|
||||
|
||||
/datum/export/large/crate/coffin
|
||||
cost = 250//50 wooden crates cost 2000 points, and you can make 10 coffins in seconds with those planks. Each coffin selling for 250 means you can make a net gain of 500 points for wasting your time making coffins.
|
||||
unit_name = "coffin"
|
||||
export_types = list(/obj/structure/closet/crate/coffin)
|
||||
|
||||
/datum/export/large/reagent_dispenser
|
||||
cost = 100 // +0-400 depending on amount of reagents left
|
||||
|
||||
@@ -1,23 +1,38 @@
|
||||
#define MAX_EMAG_ROCKETS 8
|
||||
#define BEACON_COST 5000
|
||||
#define SP_LINKED 1
|
||||
#define SP_READY 2
|
||||
#define SP_LAUNCH 3
|
||||
#define SP_UNLINK 4
|
||||
#define SP_UNREADY 5
|
||||
|
||||
/obj/machinery/computer/cargo/express
|
||||
name = "express supply console"
|
||||
desc = "This console allows the user to purchase a package \
|
||||
with 1/40th of the delivery time: made possible by NanoTrasen's new \"Drop Pod Railgun\".\
|
||||
with 1/40th of the delivery time: made possible by NanoTrasen's new \"1500mm Orbital Railgun\".\
|
||||
All sales are near instantaneous - please choose carefully"
|
||||
icon_screen = "supply_express"
|
||||
circuit = /obj/item/circuitboard/computer/cargo/express
|
||||
blockade_warning = "Bluespace instability detected. Delivery impossible."
|
||||
req_access = list(ACCESS_QM)
|
||||
var/message
|
||||
var/locked = TRUE
|
||||
var/printed_beacons = 0 //number of beacons printed. Used to determine beacon names.
|
||||
var/list/meme_pack_data
|
||||
var/podID = 0//0 is your standard supply droppod (requires dissassembly after landing), 1 is the bluespace drop pod (teleports out after landing)
|
||||
var/obj/item/supplypod_beacon/beacon //the linked supplypod beacon
|
||||
var/area/landingzone = /area/quartermaster/storage //where we droppin boys
|
||||
var/podID = POD_STANDARD //0 is your standard supply supplypod (requires dissassembly after landing), 1 is the bluespace supply pod (teleports out after landing)
|
||||
var/cooldown = 0 //cooldown to prevent printing supplypod beacon spam
|
||||
var/locked = TRUE //is the console locked? unlock with ID
|
||||
var/usingBeacon = FALSE //is the console in beacon mode? exists to let beacon know when a pod may come in
|
||||
|
||||
/obj/machinery/computer/cargo/express/Initialize()
|
||||
. = ..()
|
||||
packin_up()
|
||||
|
||||
/obj/machinery/computer/cargo/express/Destroy()
|
||||
if(beacon)
|
||||
beacon.unlink_console()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/cargo/express/attackby(obj/item/W, mob/living/user, params)
|
||||
if((istype(W, /obj/item/card/id) || istype(W, /obj/item/pda)) && allowed(user))
|
||||
@@ -25,17 +40,24 @@
|
||||
to_chat(user, "<span class='notice'>You [locked ? "lock" : "unlock"] the interface.</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/disk/cargo/bluespace_pod))
|
||||
podID = 1//doesnt effect circuit board, so that reversal is possible
|
||||
podID = POD_BLUESPACE//doesnt effect circuit board, making reversal possible
|
||||
to_chat(user, "<span class='notice'>You insert the disk into [src], allowing for advanced supply delivery vehicles.</span>")
|
||||
qdel(W)
|
||||
return TRUE
|
||||
else if(istype(W, /obj/item/supplypod_beacon))
|
||||
var/obj/item/supplypod_beacon/sb = W
|
||||
if (sb.express_console != src)
|
||||
sb.link_console(src, user)
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is already linked to [sb].</span>")
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/cargo/express/emag_act(mob/living/user)
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user] swipes a suspicious card through [src]!</span>",
|
||||
"<span class='notice'>You change the routing protocols, allowing the Drop Pod to land anywhere on the station.</span>")
|
||||
"<span class='notice'>You change the routing protocols, allowing the Supply Pod to land anywhere on the station.</span>")
|
||||
obj_flags |= EMAGGED
|
||||
// This also sets this on the circuit board
|
||||
var/obj/item/circuitboard/computer/cargo/board = circuit
|
||||
@@ -68,29 +90,58 @@
|
||||
ui = new(user, src, ui_key, "cargo_express", name, 1000, 800, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
|
||||
/obj/machinery/computer/cargo/express/ui_data(mob/user)
|
||||
var/canBeacon = beacon && (isturf(beacon.loc) || ismob(beacon.loc))//is the beacon in a valid location?
|
||||
var/list/data = list()
|
||||
data["locked"] = locked
|
||||
data["locked"] = locked//swipe an ID to unlock
|
||||
data["siliconUser"] = user.has_unlimited_silicon_privilege
|
||||
data["beaconzone"] = beacon ? get_area(beacon) : ""//where is the beacon located? outputs in the tgui
|
||||
data["usingBeacon"] = usingBeacon //is the mode set to deliver to the beacon or the cargobay?
|
||||
data["canBeacon"] = !usingBeacon || canBeacon //is the mode set to beacon delivery, and is the beacon in a valid location?
|
||||
data["canBuyBeacon"] = cooldown <= 0 && SSshuttle.points >= BEACON_COST
|
||||
data["beaconError"] = usingBeacon && !canBeacon ? "(BEACON ERROR)" : ""//changes button text to include an error alert if necessary
|
||||
data["hasBeacon"] = beacon != null//is there a linked beacon?
|
||||
data["beaconName"] = beacon ? beacon.name : "No Beacon Found"
|
||||
data["printMsg"] = cooldown > 0 ? "Print Beacon for [BEACON_COST] credits ([cooldown])" : "Print Beacon for [BEACON_COST] credits"//buttontext for printing beacons
|
||||
data["points"] = SSshuttle.points
|
||||
data["supplies"] = list()
|
||||
message = "Sales are near-instantaneous - please choose carefully."
|
||||
if(SSshuttle.supplyBlocked)
|
||||
message = blockade_warning
|
||||
if(usingBeacon && !beacon)
|
||||
message = "BEACON ERROR: BEACON MISSING"//beacon was destroyed
|
||||
else if (usingBeacon && !canBeacon)
|
||||
message = "BEACON ERROR: MUST BE EXPOSED"//beacon's loc/user's loc must be a turf
|
||||
if(obj_flags & EMAGGED)
|
||||
message = "(&!#@ERROR: ROUTING_#PROTOCOL MALF(*CT#ON. $UG%ESTE@ ACT#0N: !^/PULS3-%E)ET CIR*)ITB%ARD."
|
||||
|
||||
data["message"] = message
|
||||
if(!meme_pack_data)
|
||||
packin_up()
|
||||
stack_trace("You didn't give the cargo tech good advice, and he ripped the manifest. As a result, there was no pack data for [src]")
|
||||
data["supplies"] = meme_pack_data
|
||||
|
||||
if (cooldown > 0)//cooldown used for printing beacons
|
||||
cooldown--
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/cargo/express/ui_act(action, params, datum/tgui/ui)
|
||||
switch(action)
|
||||
if("LZCargo")
|
||||
usingBeacon = FALSE
|
||||
if (beacon)
|
||||
beacon.update_status(SP_UNREADY) //ready light on beacon will turn off
|
||||
if("LZBeacon")
|
||||
usingBeacon = TRUE
|
||||
if (beacon)
|
||||
beacon.update_status(SP_READY) //turns on the beacon's ready light
|
||||
if("printBeacon")
|
||||
if (SSshuttle.points >= BEACON_COST)
|
||||
cooldown = 10//a ~ten second cooldown for printing beacons to prevent spam
|
||||
var/obj/item/supplypod_beacon/C = new /obj/item/supplypod_beacon(drop_location())
|
||||
C.link_console(src, usr)//rather than in beacon's Initialize(), we can assign the computer to the beacon by reusing this proc)
|
||||
printed_beacons++//printed_beacons starts at 0, so the first one out will be called beacon # 1
|
||||
beacon.name = "Supply Pod Beacon #[printed_beacons]"
|
||||
SSshuttle.points -= BEACON_COST
|
||||
|
||||
if("add")//Generate Supply Order first
|
||||
var/id = text2path(params["id"])
|
||||
var/datum/supply_pack/pack = SSshuttle.supply_packs[id]
|
||||
@@ -108,35 +159,43 @@
|
||||
rank = "Silicon"
|
||||
var/reason = ""
|
||||
var/list/empty_turfs
|
||||
var/area/landingzone
|
||||
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason)
|
||||
if(!(obj_flags & EMAGGED))
|
||||
if(SO.pack.cost <= SSshuttle.points)
|
||||
landingzone = locate(/area/quartermaster/storage) in GLOB.sortedAreas
|
||||
for(var/turf/open/floor/T in landingzone.contents)
|
||||
if(is_blocked_turf(T))
|
||||
continue
|
||||
LAZYADD(empty_turfs, T)
|
||||
CHECK_TICK
|
||||
if(empty_turfs && empty_turfs.len)
|
||||
var/LZ = empty_turfs[rand(empty_turfs.len-1)]
|
||||
var/LZ
|
||||
if (istype(beacon) && usingBeacon)//prioritize beacons over landing in cargobay
|
||||
LZ = get_turf(beacon)
|
||||
beacon.update_status(SP_LAUNCH)
|
||||
else if (!usingBeacon)//find a suitable supplypod landing zone in cargobay
|
||||
landingzone = locate(/area/quartermaster/storage) in GLOB.sortedAreas
|
||||
if (!landingzone)
|
||||
WARNING("[src] couldnt find a Quartermaster/Storage (aka cargobay) area on the station, and as such it has set the supplypod landingzone to the area it resides in.")
|
||||
landingzone = get_area(src)
|
||||
for(var/turf/open/floor/T in landingzone.contents)//uses default landing zone
|
||||
if(is_blocked_turf(T))
|
||||
continue
|
||||
LAZYADD(empty_turfs, T)
|
||||
CHECK_TICK
|
||||
if(empty_turfs && empty_turfs.len)
|
||||
LZ = pick(empty_turfs)
|
||||
if (SO.pack.cost <= SSshuttle.points && LZ)//we need to call the cost check again because of the CHECK_TICK call
|
||||
SSshuttle.points -= SO.pack.cost
|
||||
new /obj/effect/DPtarget(LZ, SO, podID)
|
||||
. = TRUE
|
||||
update_icon()
|
||||
else
|
||||
if(SO.pack.cost * (0.72*MAX_EMAG_ROCKETS) <= SSshuttle.points) // bulk discount :^)
|
||||
landingzone = locate(pick(GLOB.the_station_areas)) in GLOB.sortedAreas
|
||||
landingzone = locate(pick(GLOB.the_station_areas)) in GLOB.sortedAreas //override default landing zone
|
||||
for(var/turf/open/floor/T in landingzone.contents)
|
||||
if(is_blocked_turf(T))
|
||||
continue
|
||||
LAZYADD(empty_turfs, T)
|
||||
CHECK_TICK
|
||||
if(empty_turfs && empty_turfs.len)
|
||||
SSshuttle.points -= SO.pack.cost * (1.2*MAX_EMAG_ROCKETS)
|
||||
SSshuttle.points -= SO.pack.cost * (0.72*MAX_EMAG_ROCKETS)
|
||||
SO.generateRequisition(get_turf(src))
|
||||
for(var/i in 1 to MAX_EMAG_ROCKETS)
|
||||
var/LZ = empty_turfs[rand(empty_turfs.len-1)]
|
||||
var/LZ = pick(empty_turfs)
|
||||
LAZYREMOVE(empty_turfs, LZ)
|
||||
new /obj/effect/DPtarget(LZ, SO, podID)
|
||||
. = TRUE
|
||||
|
||||
@@ -2092,6 +2092,17 @@
|
||||
contains = list(/obj/item/storage/box/fountainpens)
|
||||
crate_type = /obj/structure/closet/crate/wooden
|
||||
|
||||
/datum/supply_pack/misc/funeral
|
||||
name = "Funeral Supply crate"
|
||||
desc = "At the end of the day, someone's gonna want someone dead. Give them a proper send-off with these funeral supplies! Contains a coffin with burial garmets and flowers."
|
||||
cost = 600
|
||||
contains = list(/obj/item/clothing/under/burial,
|
||||
/obj/item/reagent_containers/food/snacks/grown/harebell,
|
||||
/obj/item/reagent_containers/food/snacks/grown/poppy/geranium
|
||||
)
|
||||
crate_name = "coffin"
|
||||
crate_type = /obj/structure/closet/crate/coffin
|
||||
|
||||
/datum/supply_pack/misc/religious_supplies
|
||||
name = "Religious Supplies Crate"
|
||||
desc = "Keep your local chaplain happy and well-supplied, lest they call down judgement upon your cargo bay. Contains two bottles of holywater, bibles, chaplain robes, and burial garmets."
|
||||
@@ -2101,9 +2112,8 @@
|
||||
/obj/item/storage/book/bible/booze,
|
||||
/obj/item/storage/book/bible/booze,
|
||||
/obj/item/clothing/suit/hooded/chaplain_hoodie,
|
||||
/obj/item/clothing/suit/hooded/chaplain_hoodie,
|
||||
/obj/item/clothing/under/burial,
|
||||
/obj/item/clothing/under/burial)
|
||||
/obj/item/clothing/suit/hooded/chaplain_hoodie
|
||||
)
|
||||
crate_name = "religious supplies crate"
|
||||
|
||||
/datum/supply_pack/misc/toner
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/obj/item/supplypod_beacon
|
||||
name = "Supply Pod Beacon"
|
||||
desc = "A device that can be linked to an Express Supply Console for precision supply pod deliveries. Alt-click to remove link."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "supplypod_beacon"
|
||||
item_state = "radio"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/obj/machinery/computer/cargo/express/express_console
|
||||
var/linked = FALSE
|
||||
var/ready = FALSE
|
||||
var/launched = FALSE
|
||||
|
||||
/obj/item/supplypod_beacon/proc/update_status(var/consoleStatus)
|
||||
switch(consoleStatus)
|
||||
if (SP_LINKED)
|
||||
linked = TRUE
|
||||
playsound(src,'sound/machines/twobeep.ogg',50,0)
|
||||
if (SP_READY)
|
||||
ready = TRUE
|
||||
if (SP_LAUNCH)
|
||||
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
|
||||
if (SP_UNLINK)
|
||||
linked = FALSE
|
||||
playsound(src,'sound/machines/synth_no.ogg',50,0)
|
||||
if (SP_UNREADY)
|
||||
ready = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/supplypod_beacon/update_icon()
|
||||
cut_overlays()
|
||||
if (launched)
|
||||
add_overlay("sp_green")
|
||||
else if (ready)
|
||||
add_overlay("sp_yellow")
|
||||
else if (linked)
|
||||
add_overlay("sp_orange")
|
||||
|
||||
/obj/item/supplypod_beacon/proc/endLaunch()
|
||||
launched = FALSE
|
||||
update_status()
|
||||
|
||||
/obj/item/supplypod_beacon/examine(user)
|
||||
..()
|
||||
if(!express_console)
|
||||
to_chat(user, "<span class='notice'>[src] is not currently linked to a Express Supply console.</span>")
|
||||
|
||||
/obj/item/supplypod_beacon/Destroy()
|
||||
if(express_console)
|
||||
express_console.beacon = null
|
||||
return ..()
|
||||
|
||||
/obj/item/supplypod_beacon/proc/unlink_console()
|
||||
if(express_console)
|
||||
express_console.beacon = null
|
||||
express_console = null
|
||||
update_status(SP_UNLINK)
|
||||
update_status(SP_UNREADY)
|
||||
|
||||
/obj/item/supplypod_beacon/proc/link_console(obj/machinery/computer/cargo/express/C, mob/living/user)
|
||||
if (C.beacon)//if new console has a beacon, then...
|
||||
C.beacon.unlink_console()//unlink the old beacon from new console
|
||||
if (express_console)//if this beacon has an express console
|
||||
express_console.beacon = null//remove the connection the expressconsole has from beacons
|
||||
express_console = C//set the linked console var to the console
|
||||
express_console.beacon = src//out with the old in with the news
|
||||
update_status(SP_LINKED)
|
||||
if (express_console.usingBeacon)
|
||||
update_status(SP_READY)
|
||||
to_chat(user, "<span class='notice'>[src] linked to [C].</span>")
|
||||
|
||||
/obj/item/supplypod_beacon/AltClick(mob/user)
|
||||
if (!user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
if (express_console)
|
||||
unlink_console()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There is no linked console!</span>")
|
||||
|
||||
/obj/item/supplypod_beacon/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/pen)) //give a tag that is visible from the linked express console
|
||||
var/new_beacon_name = stripped_input(user, "What would you like the tag to be?")
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if(new_beacon_name)
|
||||
name += " ([tag])"
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/datum/species/vampire/spec_life(mob/living/carbon/human/C)
|
||||
. = ..()
|
||||
if(istype(C.loc, /obj/structure/closet/coffin))
|
||||
if(istype(C.loc, /obj/structure/closet/crate/coffin))
|
||||
C.heal_overall_damage(4,4)
|
||||
C.adjustToxLoss(-4)
|
||||
C.adjustOxyLoss(-4)
|
||||
|
||||
@@ -136,3 +136,4 @@ Averagejoe82 = Game Master
|
||||
The Dreamweaver = Game Master
|
||||
88Naoki = Game Master
|
||||
Naksuasdf = Game Master
|
||||
MrDoomBringer = Game Master
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 23 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 40 KiB |
@@ -1347,6 +1347,7 @@
|
||||
#include "code\modules\cargo\expressconsole.dm"
|
||||
#include "code\modules\cargo\order.dm"
|
||||
#include "code\modules\cargo\packs.dm"
|
||||
#include "code\modules\cargo\supplypod_beacon.dm"
|
||||
#include "code\modules\cargo\bounties\assistant.dm"
|
||||
#include "code\modules\cargo\bounties\chef.dm"
|
||||
#include "code\modules\cargo\bounties\item.dm"
|
||||
|
||||
+18
-19
File diff suppressed because one or more lines are too long
@@ -21,6 +21,13 @@
|
||||
|
||||
{{#if !data.locked }}
|
||||
<ui-display title='Express Cargo Console'>
|
||||
|
||||
<ui-section label='Landing Location'>
|
||||
<ui-button state='{{data.usingBeacon ? null : "selected"}}' action='LZCargo'> Cargo Bay</ui-button>
|
||||
<ui-button state='{{data.hasBeacon ? data.usingBeacon ? "selected" : null : "disabled"}}' action='LZBeacon'> {{data.beaconzone}} ({{data.beaconName}})</ui-button>
|
||||
<ui-button state='{{data.canBuyBeacon ? null : "disabled"}}' action='printBeacon'> {{data.printMsg}}</ui-button>
|
||||
</ui-section>
|
||||
|
||||
<ui-section label='Credits'>
|
||||
<span>{{Math.floor(adata.points)}}</span>
|
||||
</ui-section>
|
||||
@@ -34,7 +41,7 @@
|
||||
<tab name='{{name}}'>
|
||||
{{#each packs}}
|
||||
<ui-section label='{{name}}' candystripe right>
|
||||
<ui-button tooltip='{{desc}}' tooltip-side='left' action='add' params='{"id": "{{id}}"}'>{{cost}} Credits</ui-button>
|
||||
<ui-button state='{{data.canBeacon ? null : "disabled"}}' tooltip='{{desc}}' tooltip-side='left' action='add' params='{"id": "{{id}}"}'>{{cost}} Credits {{data.beaconError}}</ui-button>
|
||||
</ui-section>
|
||||
{{/each}}
|
||||
</tab>
|
||||
|
||||
Reference in New Issue
Block a user