[DOCUMENTED AND READY TO MINGLE](EPIC MEME VIDEO INSIDE!) NEW COOL ADMIN TOOL: ADVANCED HIGH DEFINITION SUPPLYPOD SUMMONING (also supplypod refactor) (PLEASE UPTHUMB) (#39936)

MrDoomBringer

admin: Admins can now spawn things in ICly (as well as do a bunch of other cool new stuff) using the Config/Launch Supplypod verb!

code: also supplypods have been refactored
This commit is contained in:
MrDoomBringer
2018-09-20 16:59:52 -04:00
committed by Ling
parent 6de20e6d73
commit f3570388ff
27 changed files with 1957 additions and 632 deletions

File diff suppressed because it is too large Load Diff

33
code/__DEFINES/cargo.dm Normal file
View File

@@ -0,0 +1,33 @@
#define STYLE_STANDARD 1
#define STYLE_BLUESPACE 2
#define STYLE_CENTCOM 3
#define STYLE_SYNDICATE 4
#define STYLE_BLUE 5
#define STYLE_CULT 6
#define STYLE_MISSILE 7
#define STYLE_RED_MISSILE 8
#define STYLE_BOX 9
#define STYLE_HONK 10
#define STYLE_FRUIT 11
#define STYLE_INVISIBLE 12
#define STYLE_GONDOLA 13
#define POD_ICON_STATE 1
#define POD_NAME 2
#define POD_DESC 3
#define POD_STYLES list(\
list("supplypod", "supply pod", "A Nanotrasen supply drop pod."),\
list("bluespacepod", "bluespace supply pod" , "A Nanotrasen Bluespace supply pod. Teleports back to CentCom after delivery."),\
list("centcompod", "\improper Centcom supply pod", "A Nanotrasen supply pod, this one has been marked with Central Command's designations. Teleports back to Centcom after delivery."),\
list("syndiepod", "blood-red supply pod", "A dark, intimidating supply pod, covered in the blood-red markings of the Syndicate. It's probably best to stand back from this."),\
list("squadpod", "\improper MK. II supply pod", "A Nanotrasen supply pod. This one has been marked the markings of some sort of elite strike team."),\
list("cultpod", "bloody supply pod", "A Nanotrasen supply pod covered in scratch-marks, blood, and strange runes."),\
list("missilepod", "cruise missile", "A big ass missile that didn't seem to fully detonate. It was likely launched from some far-off deep space missile silo. There appears to be an auxillery payload hatch on the side, though manually opening it is likely impossible."),\
list("smissilepod", "\improper Syndicate cruise missile", "A big ass, blood-red missile that didn't seem to fully detonate. It was likely launched from some deep space Syndicate missile silo. There appears to be an auxillery payload hatch on the side, though manually opening it is likely impossible."),\
list("boxpod", "\improper Aussec supply crate", "An incredibly sturdy supply crate, designed to withstand orbital re-entry. Has 'Aussec Armory - 2532' engraved on the side."),\
list("honkpod", "\improper HONK pod", "A brightly-colored supply pod. It likely originated from the Clown Federation."),\
list("fruitpod", "\improper Orange", "An angry orange."),\
list("", "\improper S.T.E.A.L.T.H. pod MKVII", "A supply pod that, under normal circumstances, is completely invisible to conventional methods of detection. How are you even seeing this?"),\
list("gondolapod", "gondola", "The silent walker. This one seems to be part of a delivery agency.")\
)

View File

@@ -41,6 +41,15 @@
else if(dx<0)
.+=360
/proc/Get_Pixel_Angle(var/y, var/x)//for getting the angle when animating something's pixel_x and pixel_y
if(!y)
return (x>=0)?90:270
.=arctan(x/y)
if(y<0)
.+=180
else if(x<0)
.+=360
//Returns location. Returns null if no location was found.
/proc/get_teleport_loc(turf/location,mob/target,distance = 1, density = FALSE, errorx = 0, errory = 0, eoffsetx = 0, eoffsety = 0)
/*

View File

@@ -35,6 +35,8 @@
var/atom/middragatom
/client/MouseDown(object, location, control, params)
if (mouse_down_icon)
mouse_pointer_icon = mouse_down_icon
var/delay = mob.CanMobAutoclick(object, location, params)
if(delay)
selected_target[1] = object
@@ -47,6 +49,8 @@
active_mousedown_item.onMouseDown(object, location, params, mob)
/client/MouseUp(object, location, control, params)
if (mouse_up_icon)
mouse_pointer_icon = mouse_up_icon
selected_target[1] = null
if(active_mousedown_item)
active_mousedown_item.onMouseUp(object, location, params, mob)
@@ -61,7 +65,7 @@
if(h)
. = h.CanItemAutoclick(object, location, params)
/mob/proc/canMobMousedown(object, location, params)
/mob/proc/canMobMousedown(atom/object, location, params)
/mob/living/carbon/canMobMousedown(atom/object, location, params)
var/obj/item/H = get_active_held_item()

View File

@@ -29,6 +29,30 @@
/area/centcom/holding
name = "Holding Facility"
/area/centcom/supplypod
name = "Supplypod Facility"
icon_state = "supplypod"
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
/area/centcom/supplypod/podStorage
name = "Supplypod Storage"
icon_state = "supplypod_holding"
/area/centcom/supplypod/loading
name = "Supplypod Loading Facility"
icon_state = "supplypod_loading"
/area/centcom/supplypod/loading/one
name = "Supplypod Loading Bay #1"
/area/centcom/supplypod/loading/two
name = "Supplypod Loading Bay #2"
/area/centcom/supplypod/loading/three
name = "Supplypod Loading Bay #3"
/area/centcom/supplypod/loading/four
name = "Supplypod Loading Bay #4"
//THUNDERDOME
/area/tdome

View File

@@ -40,6 +40,10 @@
density = TRUE
layer = FLY_LAYER
/obj/effect/supplypod_selector
icon_state = "supplypod_selector"
layer = FLY_LAYER
//Makes a tile fully lit no matter what
/obj/effect/fullbright
icon = 'icons/effects/alphacolors.dmi'

View File

@@ -1,156 +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.
#define POD_STANDARD 0
#define POD_BLUESPACE 1
#define POD_CENTCOM 2
//------------------------------------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
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/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, SO)
. = ..()
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()
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
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))
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
icon_state = "supplypod_falling"
/obj/effect/temp_visual/DPfall/Initialize(dropLocation, podID)
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 = "centcompod_falling"
name = "CentCom 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, SO, podID)
. = ..()
var/delayTime = 17 //We're forcefully adminspawned, make it faster
switch(podID)
if(POD_STANDARD)
delayTime = 30
if(POD_BLUESPACE)
delayTime = 15
if(POD_CENTCOM) //Admin smite, even faster.
delayTime = 5//speedy delivery
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(SO, 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(SO, 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 if(podID == POD_CENTCOM)
new /obj/structure/closet/supplypod/bluespacepod/centcompod(drop_location(), SO)//CentCom supplypods dont create explosions; instead they directly deal 40 fire damage to people on the turf
var/turf/T = get_turf(src)
playsound(src, "explosion", 80, 1)
new /obj/effect/hotspot(T)
T.hotspot_expose(700, 50, 1)//same as fireball
for(var/mob/living/M in T.contents)
M.adjustFireLoss(40)
else //We're buildmoded or directly spawned, blow them up damnit.
new /obj/structure/closet/supplypod/bluespacepod/centcompod(drop_location(), SO)
explosion(src, 0, 0, 2, flame_range = 3)
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

View File

@@ -45,6 +45,7 @@ GLOBAL_LIST_INIT(admin_verbs_admin, world.AVerbsAdmin())
/client/proc/cmd_admin_headset_message, /*send an message to somebody through their headset as CentCom*/
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
/client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/
/client/proc/centcom_podlauncher,/*Open a window to launch a Supplypod and configure it or it's contents*/
/client/proc/check_antagonists, /*shows all antags*/
/datum/admins/proc/access_news_network, /*allows access of newscasters*/
/client/proc/jumptocoord, /*we ghost and jump to a coordinate*/
@@ -462,7 +463,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
set desc = "Cause an explosion of varying strength at your location."
var/list/choices = list("Small Bomb (1, 2, 3, 3)", "Medium Bomb (2, 3, 4, 4)", "Big Bomb (3, 5, 7, 5)", "Maxcap", "Custom Bomb")
var/choice = input("What size explosion would you like to produce? WARNING: These ignore the maxcap") as null|anything in choices
var/choice = input("What size explosion would you like to produce? NOTE: You can do all this rapidly and in an IC manner (using cruise missiles!) with the Config/Launch Supplypod verb. WARNING: These ignore the maxcap") as null|anything in choices
var/turf/epicenter = mob.loc
switch(choice)

View File

@@ -1288,23 +1288,18 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
var/turf/endT = spaceDebrisFinishLoc(startside, T.z)
new /obj/effect/immovablerod(startT, endT,target)
if(ADMIN_PUNISHMENT_SUPPLYPOD)
///////load the supply pod up with something!
var/target_path = input(usr,"Enter typepath of an atom you'd like to send with the pod (type \"empty\" to send an empty pod):" ,"Typepath","/obj/item/reagent_containers/food/snacks/grown/harebell") as null|text
if (isnull(target_path))
var/datum/centcom_podlauncher/plaunch = new(usr)
if(!holder)
return
if (target_path == "empty")//if you type "empty", spawn an empty pod
new /obj/effect/DPtarget(get_turf(target), null, POD_CENTCOM)
return
var/delivery = text2path(target_path)
if(!ispath(delivery))
delivery = pick_closest_path(target_path)
if(!delivery)
alert("ERROR: Incorrect / improper path given.")
return
//send the pod
if(iscarbon(target))
target.Stun(10)//takes 0.53 seconds for CentCom pod to land
new /obj/effect/DPtarget(get_turf(target), delivery, POD_CENTCOM)
plaunch.specificTarget = target
plaunch.launchChoice = 0
plaunch.damageChoice = 1
plaunch.explosionChoice = 1
plaunch.temp_pod.damage = 40//bring the mother fuckin ruckus
plaunch.temp_pod.explosionSize = list(0,0,0,2)
plaunch.temp_pod.effectStun = TRUE
plaunch.ui_interact(usr)
if(ADMIN_PUNISHMENT_MAZING)
if(!puzzle_imprison(target))
to_chat(usr,"<span class='warning'>Imprisonment failed!</span>")

View File

@@ -10,6 +10,7 @@
/datum/buildmode_mode/boom/show_help(client/c)
to_chat(c, "<span class='notice'>***********************************************************</span>")
to_chat(c, "<span class='notice'>Mouse Button on obj = Kaboom</span>")
to_chat(c, "<span class='notice'>NOTE: Using the \"Config/Launch Supplypod\" verb allows you to do this in an IC way (ie making a cruise missile come down from the sky and explode wherever you click!)</span>")
to_chat(c, "<span class='notice'>***********************************************************</span>")
/datum/buildmode_mode/boom/change_settings(client/c)

View File

@@ -0,0 +1,511 @@
//The Great and Mighty CentCom Pod Launcher - MrDoomBringer
//This was originally created as a way to get adminspawned items to the station in an IC manner. It's evolved to contain a few more
//features such as item removal, smiting, controllable delivery mobs, and more.
//This works by creating a supplypod (refered to as temp_pod) in a special room in the centcom map.
//IMPORTANT: Even though we call it a supplypod for our purposes, it can take on the appearance and function of many other things: Eg. cruise missiles, boxes, or walking, living gondolas.
//When the user launched the pod, items from special "bays" on the centcom map are taken and put into the supplypod
//The user can change properties of the supplypod using the UI, and change the way that items are taken from the bay (One at a time, ordered, random, etc)
//Many of the effects of the supplypod set here are put into action in supplypod.dm
/client/proc/centcom_podlauncher() //Creates a verb for admins to open up the ui
set name = "Config/Launch Supplypod"
set desc = "Configure and launch a Centcom supplypod full of whatever your heart desires!"
set category = "Admin"
var/datum/centcom_podlauncher/plaunch = new(usr)//create the datum
plaunch.ui_interact(usr)//datum has a tgui component, here we open the window
//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)
/datum/centcom_podlauncher
var/static/list/ignored_atoms = typecacheof(list(null, /mob/dead, /obj/effect/landmark, /obj/docking_port, /atom/movable/lighting_object, /obj/effect/particle_effect/sparks, /obj/effect/DPtarget, /obj/effect/supplypod_selector ))
var/turf/oldTurf //Keeps track of where the user was at if they use the "teleport to centcom" button, so they can go back
var/client/holder //client of whoever is using this datum
var/area/bay //What bay we're using to launch shit from.
var/launchClone = FALSE //If true, then we don't actually launch the thing in the bay. Instead we call duplicateObject() and send the result
var/launchChoice = 1 //Determines if we launch all at once (0) , in order (1), or at random(2)
var/explosionChoice = 0 //Determines if there is no explosion (0), custom explosion (1), or just do a maxcap (2)
var/damageChoice = 0 //Determines if we do no damage (0), custom amnt of damage (1), or gib + 5000dmg (2)
var/launcherActivated = FALSE //check if we've entered "launch mode" (when we click a pod is launched). Used for updating mouse cursor
var/effectBurst = FALSE //Effect that launches 5 at once in a 3x3 area centered on the target
var/numTurfs = 0 //Counts the number of turfs with things we can launch in the chosen bay (in the centcom map)
var/launchCounter = 1 //Used with the "Ordered" launch mode (launchChoice = 1) to see what item is launched
var/specificTarget //Do we want to target a specific mob instead of where we click? Also used for smiting
var/list/orderedArea = list() //Contains an ordered list of turfs in an area (filled in the createOrderedArea() proc), read top-left to bottom-right. Used for the "ordered" launch mode (launchChoice = 1)
var/list/acceptableTurfs = list() //Contians a list of turfs (in the "bay" area on centcom) that have items that can be launched. Taken from orderedArea
var/list/launchList = list() //Contains whatever is going to be put in the supplypod and fired. Taken from acceptableTurfs
var/obj/effect/supplypod_selector/selector = new() //An effect used for keeping track of what item is going to be launched when in "ordered" mode (launchChoice = 1)
var/obj/structure/closet/supplypod/centcompod/temp_pod //The temporary pod that is modified by this datum, then cloned. The buildObject() clone of this pod is what is launched
/datum/centcom_podlauncher/New(H)//H can either be a client or a mob due to byondcode(tm)
if (istype(H,/client))
var/client/C = H
holder = C //if its a client, assign it to holder
else
var/mob/M = H
holder = M.client //if its a mob, assign the mob's client to holder
bay = locate(/area/centcom/supplypod/loading/one) in GLOB.sortedAreas //Locate the default bay (one) from the centcom map
temp_pod = new(locate(/area/centcom/supplypod/podStorage) in GLOB.sortedAreas) //Create a new temp_pod in the podStorage area on centcom (so users are free to look at it and change other variables if needed)
orderedArea = createOrderedArea(bay) //Order all the turfs in the selected bay (top left to bottom right) to a single list. Used for the "ordered" mode (launchChoice = 1)
/datum/centcom_podlauncher/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, \
force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.admin_state)//ui_interact is called when the client verb is called.
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "centcom_podlauncher", "Config/Launch Supplypod", 700, 700, master_ui, state)
ui.open()
/datum/centcom_podlauncher/ui_data(mob/user) //Sends info about the pod to the UI.
var/list/data = list() //*****NOTE*****: Many of these comments are similarly described in supplypod.dm. If you change them here, please consider doing so in the supplypod code as well!
var/B = (istype(bay, /area/centcom/supplypod/loading/one)) ? 1 : (istype(bay, /area/centcom/supplypod/loading/two)) ? 2 : (istype(bay, /area/centcom/supplypod/loading/three)) ? 3 : (istype(bay, /area/centcom/supplypod/loading/four)) ? 4 : 0 //top ten THICCEST FUCKING TERNARY CONDITIONALS OF 2036
data["bay"] = B //Holds the current bay the user is launching objects from. Bays are specific rooms on the centcom map.
data["oldArea"] = (oldTurf ? get_area(oldTurf) : null) //Holds the name of the area that the user was in before using the teleportCentcom action
data["launchClone"] = launchClone //Do we launch the actual items in the bay or just launch clones of them?
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["landingDelay"] = temp_pod.landingDelay //How long the pod takes to land after launching
data["openingDelay"] = temp_pod.openingDelay //How long the pod takes to open after landing
data["departureDelay"] = 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["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 POD_STYLES list in cargo.dm defines to get the proper icon/name/desc for the pod.
data["effectStun"] = temp_pod.effectStun //If true, stuns anyone under the pod when it launches until it lands, forcing them to get hit by the pod. Devilish!
data["effectLimb"] = temp_pod.effectLimb //If true, pops off a limb (if applicable) from anyone caught under the pod when it lands
data["effectBluespace"] = temp_pod.bluespace //If true, the pod deletes (in a shower of sparks) after landing
data["effectStealth"] = temp_pod.effectStealth //If true, a target icon isnt displayed on the turf where the pod will land
data["effectQuiet"] = temp_pod.effectQuiet //The female sniper. If true, the pod makes no noise (including related explosions, opening sounds, etc)
data["effectMissile"] = temp_pod.effectMissile //If true, the pod deletes the second it lands. If you give it an explosion, it will act like a missile exploding as it hits the ground
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["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["giveLauncher"] = launcherActivated //If true, the user is in launch mode, and whenever they click a pod will be launched (either at their mouse position or at a specific target)
data["numObjects"] = numTurfs //Counts the number of turfs that contain a launchable object in the centcom supplypod bay
data["landingSound"] = temp_pod.landingSound //Admin sound to play when the pod lands
data["openingSound"] = temp_pod.openingSound //Admin sound to play when the pod opens
data["leavingSound"] = temp_pod.leavingSound //Admin sound to play when the pod leaves
data["soundVolume"] = temp_pod.soundVolume != 50 //Admin sound to play when the pod leaves
return data
/datum/centcom_podlauncher/ui_act(action, params)
if(..())
return
switch(action)
////////////////////////////UTILITIES//////////////////
if("bay1")
bay = locate(/area/centcom/supplypod/loading/one) in GLOB.sortedAreas //set the "bay" variable to the corresponding room in centcom
refreshBay() //calls refreshBay() which "recounts" the bay to see what items we can launch (among other things).
. = TRUE
if("bay2")
bay = locate(/area/centcom/supplypod/loading/two) in GLOB.sortedAreas
refreshBay()
. = TRUE
if("bay3")
bay = locate(/area/centcom/supplypod/loading/three) in GLOB.sortedAreas
refreshBay()
. = TRUE
if("bay4")
bay = locate(/area/centcom/supplypod/loading/four) in GLOB.sortedAreas
refreshBay()
. = TRUE
if("teleportCentcom") //Teleports the user to the centcom supply loading facility.
var/mob/M = holder.mob //We teleport whatever mob the client is attached to at the point of clicking
oldTurf = get_turf(M) //Used for the "teleportBack" action
var/area/A = locate(/area/centcom/supplypod/loading) in GLOB.sortedAreas
var/list/turfs = list()
for(var/turf/T in A)
turfs.Add(T) //Fill a list with turfs in the area
var/turf/T = safepick(turfs) //Only teleport if the list isn't empty
if(!T) //If the list is empty, error and cancel
to_chat(M, "Nowhere to jump to!")
return
M.forceMove(T) //Perform the actual teleport
log_admin("[key_name(usr)] jumped to [AREACOORD(A)]")
message_admins("[key_name_admin(usr)] jumped to [AREACOORD(A)]")
. = TRUE
if("teleportBack") //After teleporting to centcom, this button allows the user to teleport to the last spot they were at.
var/mob/M = holder.mob
if (!oldTurf) //If theres no turf to go back to, error and cancel
to_chat(M, "Nowhere to jump to!")
return
M.forceMove(oldTurf) //Perform the actual teleport
log_admin("[key_name(usr)] jumped to [AREACOORD(oldTurf)]")
message_admins("[key_name_admin(usr)] jumped to [AREACOORD(oldTurf)]")
. = TRUE
////////////////////////////LAUNCH STYLE CHANGES//////////////////
if("launchClone") //Toggles the launchClone var. See variable declarations above for what this specifically means
launchClone = !launchClone
. = TRUE
if("launchOrdered") //Launch turfs (from the orderedArea list) one at a time in order, from the supplypod bay at centcom
if (launchChoice == 1) //launchChoice 1 represents ordered. If we push "ordered" and it already is, then we go to default value
launchChoice = 0
updateSelector() //Move the selector effect to the next object that will be launched. See variable declarations for more info on the selector effect.
return
launchChoice = 1
updateSelector()
. = TRUE
if("launchRandom") //Pick random turfs from the supplypod bay at centcom to launch
if (launchChoice == 2)
launchChoice = 0
updateSelector()
return
launchChoice = 2
updateSelector()
. = TRUE
////////////////////////////POD EFFECTS//////////////////
if("explosionCustom") //Creates an explosion when the pod lands
if (explosionChoice == 1) //If already a custom explosion, set to default (no explosion)
explosionChoice = 0
temp_pod.explosionSize = list(0,0,0,0)
return
var/list/expNames = list("Devastation", "Heavy Damage", "Light Damage", "Flame") //Explosions have a range of different types of damage
var/list/boomInput = list()
for (var/i=1 to expNames.len) //Gather input from the user for the value of each type of damage
boomInput.Add(input("[expNames[i]] Range", "Enter the [expNames[i]] range of the explosion. WARNING: This ignores the bomb cap!", 0) as null|num)
if (isnull(boomInput[i]))
return
if (!isnum(boomInput[i])) //If the user doesn't input a number, set that specific explosion value to zero
alert(usr, "That wasnt a number! Value set to default (zero) instead.")
boomInput = 0
explosionChoice = 1
temp_pod.explosionSize = boomInput
. = TRUE
if("explosionBus") //Creates a maxcap when the pod lands
if (explosionChoice == 2) //If already a maccap, set to default (no explosion)
explosionChoice = 0
temp_pod.explosionSize = list(0,0,0,0)
return
explosionChoice = 2
temp_pod.explosionSize = list(GLOB.MAX_EX_DEVESTATION_RANGE, GLOB.MAX_EX_HEAVY_RANGE, GLOB.MAX_EX_LIGHT_RANGE,GLOB.MAX_EX_FLAME_RANGE) //Set explosion to max cap of server
. = TRUE
if("damageCustom") //Deals damage to whoevers under the pod when it lands
if (damageChoice == 1) //If already doing custom damage, set back to default (no damage)
damageChoice = 0
temp_pod.damage = 0
return
var/damageInput = input("How much damage to deal", "Enter the amount of brute damage dealt by getting hit", 0) as null|num
if (isnull(damageInput))
return
if (!isnum(damageInput)) //Sanitize the input for damage to deal.s
alert(usr, "That wasnt a number! Value set to default (zero) instead.")
damageInput = 0
damageChoice = 1
temp_pod.damage = damageInput
. = TRUE
if("damageGib") //Gibs whoever is under the pod when it lands. Also deals 5000 damage, just to be sure.
if (damageChoice == 2) //If already gibbing, set back to default (no damage)
damageChoice = 0
temp_pod.damage = 0
temp_pod.effectGib = FALSE
return
damageChoice = 2
temp_pod.damage = 5000
temp_pod.effectGib = TRUE //Gibs whoever is under the pod when it lands
. = TRUE
if("effectName") //Give the supplypod a custom name. Supplypods automatically get their name based on their style (see supplypod/setStyle() proc), so doing this overrides that.
if (temp_pod.adminNamed) //If we're already adminNamed, set the name of the pod back to default
temp_pod.adminNamed = FALSE
temp_pod.setStyle(temp_pod.style) //This resets the name of the pod based on it's current style (see supplypod/setStyle() proc)
return
var/nameInput= input("Custom name", "Enter a custom name", POD_STYLES[temp_pod.style][POD_NAME]) as null|text //Gather input for name and desc
if (isnull(nameInput))
return
var/descInput = input("Custom description", "Enter a custom desc", POD_STYLES[temp_pod.style][POD_DESC]) as null|text //The POD_STYLES is used to get the name, desc, or icon state based on the pod's style
if (isnull(descInput))
return
temp_pod.name = nameInput
temp_pod.desc = descInput
temp_pod.adminNamed = TRUE //This variable is checked in the supplypod/setStyle() proc
. = TRUE
if("effectStun") //Toggle: Any mob under the pod is stunned (cant move) until the pod lands, hitting them!
temp_pod.effectStun = !temp_pod.effectStun
. = TRUE
if("effectLimb") //Toggle: Anyone carbon mob under the pod loses a limb when it lands
temp_pod.effectLimb = !temp_pod.effectLimb
. = TRUE
if("effectBluespace") //Toggle: Deletes the pod after landing
temp_pod.bluespace = !temp_pod.bluespace
. = TRUE
if("effectStealth") //Toggle: There is no red target indicator showing where the pod will land
temp_pod.effectStealth = !temp_pod.effectStealth
. = TRUE
if("effectQuiet") //Toggle: The pod makes no noise (explosions, opening sounds, etc)
temp_pod.effectQuiet = !temp_pod.effectQuiet
. = TRUE
if("effectMissile") //Toggle: The pod deletes the instant it lands. Looks nicer than just setting the open delay and leave delay to zero. Useful for combo-ing with explosions
temp_pod.effectMissile = !temp_pod.effectMissile
. = TRUE
if("effectCircle") //Toggle: The pod can come in from any descent angle. Goof requested this im not sure why but it looks p funny actually
temp_pod.effectCircle = !temp_pod.effectCircle
. = TRUE
if("effectBurst") //Toggle: Launch 5 pods (with a very slight delay between) in a 3x3 area centered around the target
effectBurst = !effectBurst
. = TRUE
if("effectReverse") //Toggle: Don't send any items. Instead, after landing, close (taking any objects inside) and go back to the centcom bay it came from
temp_pod.reversing = !temp_pod.reversing
. = TRUE
if("effectTarget") //Toggle: Launch at a specific mob (instead of at whatever turf you click on). Used for the supplypod smite
if (specificTarget)
specificTarget = null
return
var/list/mobs = getpois()//code stolen from observer.dm
var/inputTarget = input("Select a mob! (Smiting does this automatically)", "Target", null, null) as null|anything in mobs
if (isnull(inputTarget))
return
var/mob/target = mobs[inputTarget]
specificTarget = target///input specific tartget
. = TRUE
////////////////////////////TIMER DELAYS//////////////////
if("landingDelay") //Change the time it takes the pod to land, after firing
if (temp_pod.landingDelay != initial(temp_pod.landingDelay)) //If the landing delay has already been changed when we push the "change value" button, then set it to default
temp_pod.landingDelay = initial(temp_pod.landingDelay)
return
var/timeInput = input("Delay Time", "Enter the time it takes for the pod to land, in seconds", 0.5) as null|num
if (isnull(timeInput))
return
if (!isnum(timeInput)) //Sanitize input, if it doesnt check out, error and set to default
alert(usr, "That wasnt a number! Value set to default ([initial(temp_pod.landingDelay)*0.1]) instead.")
timeInput = initial(temp_pod.landingDelay)
temp_pod.landingDelay = 10 * timeInput
. = TRUE
if("openingDelay") //Change the time it takes the pod to open it's door (and release its contents) after landing
if (temp_pod.openingDelay != initial(temp_pod.openingDelay)) //If the opening delay has already been changed when we push the "change value" button, then set it to default
temp_pod.openingDelay = initial(temp_pod.openingDelay)
return
var/timeInput = input("Delay Time", "Enter the time it takes for the pod to open after landing, in seconds", 3) as null|num
if (isnull(timeInput))
return
if (!isnum(timeInput)) //Sanitize input
alert(usr, "That wasnt a number! Value set to default ([initial(temp_pod.openingDelay)*0.1]) instead.")
timeInput = initial(temp_pod.openingDelay)
temp_pod.openingDelay = 10 * timeInput
. = TRUE
if("departureDelay") //Change the time it takes the pod to leave (if bluespace = true it just deletes, if effectReverse = true it goes back to centcom)
if (temp_pod.departureDelay != initial(temp_pod.departureDelay)) //If the departure delay has already been changed when we push the "change value" button, then set it to default
temp_pod.departureDelay = initial(temp_pod.departureDelay)
return
var/timeInput = input("Delay Time", "Enter the time it takes for the pod to leave after opening, in seconds", 3) as null|num
if (isnull(timeInput))
return
if (!isnum(timeInput))
alert(usr, "That wasnt a number! Value set to default ([initial(temp_pod.departureDelay)*0.1]) instead.")
timeInput = initial(temp_pod.departureDelay)
temp_pod.departureDelay = 10 * timeInput
. = TRUE
////////////////////////////ADMIN SOUNDS//////////////////
if("landingSound") //Admin sound from a local file that plays when the pod lands
if (!isnull(temp_pod.landingSound))
temp_pod.landingSound = null
return
temp_pod.landingSound = input(holder, "Please pick a sound file to play when the pod lands! I reccomend a nice \"oh shit, i'm sorry\", incase you hit someone with the pod.", "Pick a Sound File") as null|sound
. = TRUE
if("openingSound") //Admin sound from a local file that plays when the pod opens
if (!isnull(temp_pod.openingSound))
temp_pod.openingSound = null
return
temp_pod.openingSound = input(holder, "Please pick a sound file to play when the pod opens! I reccomend a stock sound effect of kids cheering at a party, incase your pod is full of fun exciting stuff!", "Pick a Sound File") as null|sound
. = TRUE
if("leavingSound") //Admin sound from a local file that plays when the pod leaves
if (!isnull(temp_pod.leavingSound))
temp_pod.leavingSound = null
return
temp_pod.leavingSound = input(holder, "Please pick a sound file to play when the pod leaves! I reccomend a nice slide whistle sound, especially if you're using the reverse pod effect.", "Pick a Sound File") as null|sound
. = TRUE
if("soundVolume") //Admin sound from a local file that plays when the pod leaves
if (temp_pod.soundVolume != 50)
temp_pod.soundVolume = 50
return
temp_pod.soundVolume = input(holder, "Please pick a volume. Default is between 1 and 100 with 50 being average, but pick whatever. I'm a notification, not a cop. If you still cant hear your sound, consider turning on the Quiet effect. It will silence all pod sounds except for the custom admin ones set by the previous three buttons.", "Pick Admin Sound Volume") as null|num
if (isnull(temp_pod.soundVolume))
temp_pod.soundVolume = 50
. = TRUE
////////////////////////////STYLE CHANGES//////////////////
//Style is a value that is used to keep track of what the pod is supposed to look like. It can be used with the POD_STYLES list (in cargo.dm defines)
//as a way to get the proper icon state, name, and description of the pod.
if("styleStandard")
temp_pod.setStyle(STYLE_STANDARD)
. = TRUE
if("styleBluespace")
temp_pod.setStyle(STYLE_BLUESPACE)
. = TRUE
if("styleSyndie")
temp_pod.setStyle(STYLE_SYNDICATE)
. = TRUE
if("styleBlue")
temp_pod.setStyle(STYLE_BLUE)
. = TRUE
if("styleCult")
temp_pod.setStyle(STYLE_CULT)
. = TRUE
if("styleMissile")
temp_pod.setStyle(STYLE_MISSILE)
. = TRUE
if("styleSMissile")
temp_pod.setStyle(STYLE_RED_MISSILE)
. = TRUE
if("styleBox")
temp_pod.setStyle(STYLE_BOX)
. = TRUE
if("styleHONK")
temp_pod.setStyle(STYLE_HONK)
. = TRUE
if("styleFruit")
temp_pod.setStyle(STYLE_FRUIT)
. = TRUE
if("styleInvisible")
temp_pod.setStyle(STYLE_INVISIBLE)
. = TRUE
if("styleGondola")
temp_pod.setStyle(STYLE_GONDOLA)
. = TRUE
if("refresh") //Refresh the Pod bay. User should press this if they spawn something new in the centcom bay. Automatically called whenever the user launches a pod
refreshBay()
. = TRUE
if("giveLauncher") //Enters the "Launch Mode". When the launcher is activated, temp_pod is cloned, and the result it filled and launched anywhere the user clicks (unless specificTarget is true)
launcherActivated = !launcherActivated
updateCursor(launcherActivated) //Update the cursor of the user to a cool looking target icon
. = TRUE
/datum/centcom_podlauncher/ui_close() //Uses the destroy() proc. When the user closes the UI, we clean up the temp_pod and supplypod_selector variables.
qdel(src)
/datum/centcom_podlauncher/proc/updateCursor(var/launching) //Update the moues of the user
if (holder) //Check to see if we have a client
if (launching) //If the launching param is true, we give the user new mouse icons.
holder.mouse_up_icon = 'icons/effects/supplypod_target.dmi' //Icon for when mouse is released
holder.mouse_down_icon = 'icons/effects/supplypod_down_target.dmi' //Icon for when mouse is pressed
holder.mouse_pointer_icon = holder.mouse_up_icon //Icon for idle mouse (same as icon for when released)
holder.click_intercept = src //Create a click_intercept so we know where the user is clicking
else
var/mob/M = holder.mob
holder.mouse_up_icon = null
holder.mouse_down_icon = null
holder.click_intercept = null
if (M)
M.update_mouse_pointer() //set the moues icons to null, then call update_moues_pointer() which resets them to the correct values based on what the mob is doing (in a mech, holding a spell, etc)()
/datum/centcom_podlauncher/proc/InterceptClickOn(user,params,atom/target) //Click Intercept so we know where to send pods where the user clicks
var/list/pa = params2list(params)
var/left_click = pa.Find("left")
if (launcherActivated)
//Clicking on UI elements shouldn't launch a pod
if(istype(target,/obj/screen))
return FALSE
. = TRUE
if(left_click) //When we left click:
preLaunch() //Fill the acceptableTurfs list from the orderedArea list. Then, fill up the launchList list with items from the acceptableTurfs list based on the manner of launch (ordered, random, etc)
if (!isnull(specificTarget))
target = get_turf(specificTarget) //if we have a specific mob target, then always launch the pod at the turf of the mob
else if (target)
target = get_turf(target) //Make sure we're aiming at a turf rather than an item or effect or something
else
return //if target is null and we don't have a specific target, cancel
if (!effectBurst) //If we're not using burst mode, just launch normally.
launch(target)
else
for (var/i in 1 to 5) //If we're using burst mode, launch 5 pods
if (isnull(target))
break //if our target gets deleted during this, we stop the show
preLaunch() //Same as above
var/LZ = locate(target.x + rand(-1,1), target.y + rand(-1,1), target.z) //Pods are randomly adjacent to (or the same as) the target
if (LZ) //just incase we're on the edge of the map or something that would cause target.x+1 to fail
launch(LZ) //launch the pod at the adjacent turf
else
launch(target) //If we couldn't locate an adjacent turf, just launch at the normal target
sleep(rand()*2) //looks cooler than them all appearing at once. Gives the impression of burst fire.
log_admin("Centcom Supplypod Launch: [key_name(user)] launched a supplypod in [AREACOORD(target)]")
/datum/centcom_podlauncher/proc/refreshBay() //Called whenever the bay is switched, as well as wheneber a pod is launched
orderedArea = createOrderedArea(bay) //Create an ordered list full of turfs form the bay
preLaunch() //Fill acceptable turfs from orderedArea, then fill launchList from acceptableTurfs (see proc for more info)
/datum/centcom_podlauncher/proc/createOrderedArea(area/A) //This assumes the area passed in is a continuous square
if (isnull(A)) //If theres no supplypod bay mapped into centcom, throw an error
to_chat(holder.mob, "No /area/centcom/supplypod/loading/one (or /two or /three or /four) in the world! You can make one yourself (then refresh) for now, but yell at a mapper to fix this, today!")
CRASH("No /area/centcom/supplypod/loading/one (or /two or /three or /four) has been mapped into the centcom z-level!")
return
orderedArea = list()
if (!isemptylist(A.contents)) //Go through the area passed into the proc, and figure out the top left and bottom right corners by calculating max and min values
var/startX = A.contents[1].x //Create the four values (we do it off a.contents[1] so they have some sort of arbitrary initial value. They should be overwritten in a few moments)
var/endX = A.contents[1].x
var/startY = A.contents[1].y
var/endY = A.contents[1].y
for (var/turf/T in A) //For each turf in the area, go through and find:
if (T.x < startX) //The turf with the smallest x value. This is our startX
startX = T.x
else if (T.x > endX) //The turf with the largest x value. This is our endX
endX = T.x
else if (T.y > startY) //The turf with the largest Y value. This is our startY
startY = T.y
else if (T.y < endY) //The turf with the smallest Y value. This is our endY
endY = T.y
for (var/i in endY to startY)
for (var/j in startX to endX)
orderedArea.Add(locate(j,startY - (i - endY),1)) //After gathering the start/end x and y, go through locating each turf from top left to bottom right, like one would read a book
return orderedArea //Return the filled list
/datum/centcom_podlauncher/proc/preLaunch() //Creates a list of acceptable items,
numTurfs = 0 //Counts the number of turfs that can be launched (remember, supplypods either launch all at once or one turf-worth of items at a time)
acceptableTurfs = list()
for (var/turf/T in orderedArea) //Go through the orderedArea list
if (typecache_filter_list_reverse(T.contents, ignored_atoms).len != 0) //if there is something in this turf that isnt in the blacklist, we consider this turf "acceptable" and add it to the acceptableTurfs list
acceptableTurfs.Add(T) //Because orderedArea was an ordered linear list, acceptableTurfs will be as well.
numTurfs ++
launchList = list() //Anything in launchList will go into the supplypod when it is launched
if (!isemptylist(acceptableTurfs) && !temp_pod.reversing && !temp_pod.effectMissile) //We dont fill the supplypod if acceptableTurfs is empty, if the pod is going in reverse (effectReverse=true), or if the pod is acitng like a missile (effectMissile=true)
switch(launchChoice)
if(0) //If we are launching all the turfs at once
for (var/turf/T in acceptableTurfs)
launchList |= typecache_filter_list_reverse(T.contents, ignored_atoms) //We filter any blacklisted atoms and add the rest to the launchList
if(1) //If we are launching one at a time
if (launchCounter > acceptableTurfs.len) //Check if the launchCounter, which acts as an index, is too high. If it is, reset it to 1
launchCounter = 1 //Note that the launchCounter index is incremented in the launch() proc
for (var/atom/movable/O in acceptableTurfs[launchCounter].contents) //Go through the acceptableTurfs list based on the launchCounter index
launchList |= typecache_filter_list_reverse(acceptableTurfs[launchCounter].contents, ignored_atoms) //Filter the specicic turf chosen from acceptableTurfs, and add it to the launchList
if(2) //If we are launching randomly
launchList |= typecache_filter_list_reverse(pick_n_take(acceptableTurfs).contents, ignored_atoms) //filter a random turf from the acceptableTurfs list and add it to the launchList
updateSelector() //Call updateSelector(), which, if we are launching one at a time (launchChoice==2), will move to the next turf that will be launched
//UpdateSelector() is here (instead if the if(1) switch block) because it also moves the selector to nullspace (to hide it) if needed
/datum/centcom_podlauncher/proc/launch(turf/A) //Game time started
if (isnull(A))
return
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.bay = bay //Bay is currently a nonstatic expression, so it cant go into toLaunch using DuplicateObject
toLaunch.update_icon()//we update_icon() here so that the door doesnt "flicker on" right after it lands
if (launchClone) //We arent launching the actual items from the bay, rather we are creating clones and launching those
for (var/atom/movable/O in launchList)
DuplicateObject(O).forceMove(toLaunch) //Duplicate each atom/movable in launchList and forceMove them into the supplypod
new /obj/effect/DPtarget(A, toLaunch) //Create the DPTarget, which will eventually forceMove the temp_pod to it's location
else
for (var/atom/movable/O in launchList) //If we aren't cloning the objects, just go through the launchList
O.forceMove(toLaunch) //and forceMove any atom/moveable into the supplypod
new /obj/effect/DPtarget(A, toLaunch) //Then, create the DPTarget effect, which will eventually forceMove the temp_pod to it's location
if (launchClone)
launchCounter++ //We only need to increment launchCounter if we are cloning objects.
//If we aren't cloning objects, taking and removing the first item each time from the acceptableTurfs list will inherently iterate through the list in order
/datum/centcom_podlauncher/proc/updateSelector() //Ensures that the selector effect will showcase the next item if needed
if (launchChoice == 1 && !isemptylist(acceptableTurfs) && !temp_pod.reversing && !temp_pod.effectMissile) //We only show the selector if we are taking items from the bay
var/index = launchCounter + 1 //launchCounter acts as an index to the ordered acceptableTurfs list, so adding one will show the next item in the list
if (index > acceptableTurfs.len) //out of bounds check
index = 1
selector.forceMove(acceptableTurfs[index]) //forceMove the selector to the next turf in the ordered acceptableTurfs list
else
selector.moveToNullspace() //Otherwise, we move the selector to nullspace until it is needed again
/datum/centcom_podlauncher/Destroy() //The Destroy() proc. This is called by ui_close proc, or whenever the user leaves the game
updateCursor(FALSE) //Make sure our moues cursor resets to default. False means we are not in launch mode
qdel(temp_pod) //Delete the temp_pod
qdel(selector) //Delete the selector effect
. = ..()

View File

@@ -9,7 +9,7 @@
/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 \"1500mm Orbital 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
@@ -20,7 +20,7 @@
var/list/meme_pack_data
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/podType = /obj/structure/closet/supplypod //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
@@ -40,7 +40,7 @@
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 = POD_BLUESPACE//doesnt effect circuit board, making reversal possible
podType = /obj/structure/closet/supplypod/bluespacepod//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
@@ -111,7 +111,7 @@
if(SSshuttle.supplyBlocked)
message = blockade_warning
if(usingBeacon && !beacon)
message = "BEACON ERROR: BEACON MISSING"//beacon was destroyed
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)
@@ -173,7 +173,7 @@
var/LZ
if (istype(beacon) && usingBeacon)//prioritize beacons over landing in cargobay
LZ = get_turf(beacon)
beacon.update_status(SP_LAUNCH)
beacon.update_status(SP_LAUNCH)
else if (!usingBeacon)//find a suitable supplypod landing zone in cargobay
landingzone = GLOB.areas_by_type[/area/quartermaster/storage]
if (!landingzone)
@@ -188,7 +188,7 @@
LZ = pick(empty_turfs)
if (SO.pack.cost <= points_to_check && LZ)//we need to call the cost check again because of the CHECK_TICK call
D.adjust_money(-SO.pack.cost)
new /obj/effect/DPtarget(LZ, SO, podID)
new /obj/effect/DPtarget(LZ, podType, SO)
. = TRUE
update_icon()
else
@@ -206,7 +206,7 @@
for(var/i in 1 to MAX_EMAG_ROCKETS)
var/LZ = pick(empty_turfs)
LAZYREMOVE(empty_turfs, LZ)
new /obj/effect/DPtarget(LZ, SO, podID)
new /obj/effect/DPtarget(LZ, podType, SO)
. = TRUE
update_icon()
CHECK_TICK

View File

@@ -0,0 +1,66 @@
/mob/living/simple_animal/pet/gondola/gondolapod
name = "gondola"
real_name = "gondola"
desc = "The silent walker. This one seems to be part of a delivery agency."
response_help = "pets"
response_disarm = "bops"
response_harm = "kicks"
faction = list("gondola")
turns_per_move = 10
icon = 'icons/mob/gondolapod.dmi'
icon_state = "gondolapod"
icon_living = "gondolapod"
pixel_x = -16//2x2 sprite
pixel_y = -5
layer = TABLE_LAYER//so that deliveries dont appear underneath it
loot = list(/obj/effect/decal/cleanable/blood/gibs, /obj/item/stack/sheet/animalhide/gondola = 2, /obj/item/reagent_containers/food/snacks/meat/slab/gondola = 2)
//Gondolas aren't affected by cold.
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
maxbodytemp = 1500
maxHealth = 200
health = 200
del_on_death = TRUE
var/opened = FALSE
var/obj/structure/closet/supplypod/centcompod/linked_pod
/mob/living/simple_animal/pet/gondola/gondolapod/Initialize(mapload, pod)
linked_pod = pod
name = linked_pod.name
. = ..()
/mob/living/simple_animal/pet/gondola/gondolapod/proc/update_icon()
if(opened)
icon_state = "gondolapod_open"
else
icon_state = "gondolapod"
/mob/living/simple_animal/pet/gondola/gondolapod/verb/deliver()
set name = "Release Contents"
set category = "Gondola"
set desc = "Release any contents stored within your vast belly."
linked_pod.open(src, manual = TRUE)
/mob/living/simple_animal/pet/gondola/gondolapod/verb/check()
set name = "Count Contents"
set category = "Gondola"
set desc = "Take a deep look inside youself, and count up what's inside"
var/total = contents.len
if (total)
to_chat(src, "<span class='notice'>You detect [total] object[total > 1 ? "s" : ""] within your incredibly vast belly.</span>")
else
to_chat(src, "<span class='notice'>A closer look inside yourself reveals... nothing.</span>")
/mob/living/simple_animal/pet/gondola/gondolapod/proc/setOpened()
opened = TRUE
update_icon()
addtimer(CALLBACK(src, .proc/setClosed), 50)
/mob/living/simple_animal/pet/gondola/gondolapod/proc/setClosed()
opened = FALSE
update_icon()
/mob/living/simple_animal/pet/gondola/gondolapod/death()
qdel(linked_pod) //Will cause the open() proc for the linked supplypod to be called with the "broken" parameter set to true, meaning that it will dump its contents on death
qdel(src)
..()

View File

@@ -0,0 +1,271 @@
//The "BDPtarget" temp visual is created by anything that "launches" a supplypod. It makes two things: a falling droppod animation, and the droppod itself.
//------------------------------------SUPPLY POD-------------------------------------//
/obj/structure/closet/supplypod
name = "supply pod" //Names and descriptions are normally created with the setStyle() proc during initialization, but we have these default values here as a failsafe
desc = "A Nanotrasen supply drop pod."
icon = 'icons/obj/supplypods.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" = 100, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 80)
anchored = TRUE //So it cant slide around after landing
anchorable = FALSE
//*****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/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
var/effectGib = FALSE //If true, anyone under the pod will be gibbed when it lands
var/effectStealth = FALSE //If true, a target icon isnt displayed on the turf where the pod will land
var/effectQuiet = FALSE //The female sniper. If true, the pod makes no noise (including related explosions, opening sounds, etc)
var/effectMissile = FALSE //If true, the pod deletes the second it lands. If you give it an explosion, it will act like a missile exploding as it hits the ground
var/effectCircle = FALSE //If true, allows the pod to come in at any angle. Bit of a weird feature but whatever its here
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 POD_STYLES 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/landingSound //Admin sound to play when the pod lands
var/openingSound //Admin sound to play when the pod opens
var/leavingSound //Admin sound to play when the pod leaves
var/soundVolume = 50 //Volume to play sounds at. Ignores the cap
var/bay //Used specifically for the centcom_podlauncher datum. Holds the current bay the user is launching objects from. Bays are specific rooms on the centcom map.
var/list/explosionSize = list(0,0,2,3)
/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/centcompod
style = STYLE_CENTCOM
bluespace = TRUE
explosionSize = list(0,0,0,0)
landingDelay = 5 //Very speedy!
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
/obj/structure/closet/supplypod/Initialize()
..()
setStyle(style, TRUE) //Upon initialization, give the supplypod an iconstate, name, and description based on the "style" variable. This system is important for the centcom_podlauncher to function correctly
/obj/structure/closet/supplypod/update_icon()
cut_overlays()
if (style != STYLE_INVISIBLE) //If we're invisible, we dont bother adding any overlays
if (opened)
add_overlay("[icon_state]_open")
else
add_overlay("[icon_state]_door")
/obj/structure/closet/supplypod/proc/setStyle(chosenStyle, var/duringInit = FALSE) //Used to give the sprite an icon state, name, and description
if (!duringInit && style == chosenStyle) //Check if the input style is already the same as the pod's style. This happens in centcom_podlauncher, and as such we set the style to STYLE_CENTCOM.
setStyle(STYLE_CENTCOM) //We make sure to not check this during initialize() so the standard supplypod works correctly.
return
style = chosenStyle
icon_state = POD_STYLES[chosenStyle][POD_ICON_STATE] //POD_STYLES is a 2D array we treat as a dictionary. The style represents the verticle index, with the icon state, name, and desc being stored in the horizontal indexes of the 2D array.
if (!adminNamed) //We dont want to name it ourselves if it has been specifically named by an admin using the centcom_podlauncher datum
name = POD_STYLES[chosenStyle][POD_NAME]
desc = POD_STYLES[chosenStyle][POD_DESC]
update_icon()
/obj/structure/closet/supplypod/tool_interact(obj/item/W, mob/user)
if (bluespace) //We dont want to worry about interacting with bluespace pods, as they are due to delete themselves soon anyways.
return FALSE
else
..()
/obj/structure/closet/supplypod/ex_act() //Explosions dont do SHIT TO US! This is because supplypods create explosions when they land.
return
/obj/structure/closet/supplypod/contents_explosion() //Supplypods also protect their contents from the harmful effects of fucking exploding.
return
/obj/structure/closet/supplypod/toggle(mob/living/user) //Supplypods shouldn't be able to be manually opened under any circumstances, as the open() proc generates supply order datums
return
/obj/structure/closet/supplypod/proc/preOpen() //Called before the open() proc. Handles anything that occurs right as the pod lands.
var/turf/T = get_turf(src)
var/list/B = explosionSize //Mostly because B is more readable than explosionSize :p
var/boomTotal = 0 //A counter used to check if the explosion does nothing
if (landingSound)
playsound(get_turf(src), landingSound, soundVolume, 0, 0)
for (var/mob/living/M in T)
if (effectLimb && iscarbon(M)) //If effectLimb is true (which means we pop limbs off when we hit people):
var/mob/living/carbon/CM = M
for (var/obj/item/bodypart/bodypart in CM.bodyparts) //Look at the bodyparts in our poor mob beneath our pod as it lands
if(bodypart.body_part != HEAD && bodypart.body_zone != CHEST)//we dont want to kill him, just teach em a lesson!
if (bodypart.dismemberable)
bodypart.dismember() //Using the power of flextape i've sawed this man's limb in half!
break
if (effectGib) //effectGib is on, that means whatever's underneath us better be fucking oof'd on
M.adjustBruteLoss(5000) //THATS A LOT OF DAMAGE (called just in case gib() doesnt work on em)
M.gib() //After adjusting the fuck outta that brute loss we finish the job with some satisfying gibs
M.adjustBruteLoss(damage)
for (var/i in 1 to B.len-1)
boomTotal += i //Count up all the values of the explosion
if (boomTotal != 0) //If the explosion list isn't all zeroes, call an explosion
explosion(get_turf(src), B[1], B[2], B[3], flame_range = B[4], silent = effectQuiet, ignorecap = istype(src, /obj/structure/closet/supplypod/centcompod)) //less advanced equipment than bluespace pod, so larger explosion when landing
else if (!effectQuiet) //If our explosion list IS all zeroes, we still make a nice explosion sound (unless the effectQuiet var is true)
playsound(src, "explosion", landingSound ? 15 : 80, 1)
if (effectMissile) //If we are acting like a missile, then right after we land and finish fucking shit up w explosions, we should delete
opened = TRUE //We set opened to TRUE to avoid spending time trying to open (due to being deleted) during the Destroy() proc
qdel(src)
if (style == STYLE_GONDOLA) //Checks if we are supposed to be a gondola pod. If so, create a gondolapod mob, and move this pod to nullspace. I'd like to give a shout out, to my man oranges
var/mob/living/simple_animal/pet/gondola/gondolapod/benis = new(get_turf(src), src)
benis.contents |= contents //Move the contents of this supplypod into the gondolapod mob.
moveToNullspace()
addtimer(CALLBACK(src, .proc/open, 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
else
addtimer(CALLBACK(src, .proc/open, src), openingDelay) //After the openingDelay passes, we use the open proc from this supplypod, while referencing this supplypod's contents
/obj/structure/closet/supplypod/open(atom/movable/holder, var/broken = FALSE, var/forced = FALSE) //The holder var represents an atom whose contents we will be working with
var/turf/T = get_turf(holder) //Get the turf of whoever's contents we're talking about
var/mob/M
if (istype(holder, /mob)) //Allows mobs to assume the role of the holder, meaning we look at the mob's contents rather than the supplypod's contents. Typically by this point the supplypod's contents have already been moved over to the mob's contents
M = holder
if (M.key && !forced && !broken) //If we are player controlled, then we shouldnt open unless the opening is manual, or if it is due to being destroyed (represented by the "broken" parameter)
return
opened = TRUE //This is to ensure we don't open something that has already been opened
if (openingSound)
playsound(get_turf(holder), openingSound, soundVolume, 0, 0)
INVOKE_ASYNC(holder, .proc/setOpened) //Use the INVOKE_ASYNC proc to call setOpened() on whatever the holder may be, without giving the atom/movable base class a setOpened() proc definition
for (var/thing in holder.contents) //Go through the contents of the holder
if (istype(thing, /datum/supply_order)) //If it's a supply_order datum (here because a supplypod was launched by an expressconsole):
var/datum/supply_order/SO = thing
SO.generate(T) //Generate it! We don't do this earlier because generate() requires a turf
else
var/atom/movable/O = thing //Otherwise, move everything from the contents of the holder to the turf of the holder
O.forceMove(T)
if (!effectQuiet) //If we aren't being quiet, play an open sound
playsound(get_turf(holder), open_sound, 15, 1, -3)
if (broken) //If the pod is opening because it's been destroyed, we end here
return
addtimer(CALLBACK(src, .proc/depart, holder), departureDelay) //Finish up the pod's duties after a certain amount of time
/obj/structure/closet/supplypod/proc/depart(atom/movable/holder)
if (leavingSound)
playsound(get_turf(holder), leavingSound, soundVolume, 0, 0)
if (reversing) //If we're reversing, we call the close proc. This sends the pod back up to centcom
close(holder)
else if (bluespace) //If we're a bluespace pod, then delete ourselves (along with our holder, if a seperate holder exists)
if (style != STYLE_INVISIBLE)
do_sparks(5, TRUE, holder) //Create some sparks right before closing
qdel(src) //Delete ourselves and the holder
if (holder != src)
qdel(holder)
/obj/structure/closet/supplypod/centcompod/close(atom/movable/holder) //Closes the supplypod and sends it back to centcom. Should only ever be called if the "reversing" variable is true
opened = FALSE
INVOKE_ASYNC(holder, .proc/setClosed) //Use the INVOKE_ASYNC proc to call setClosed() on whatever the holder may be, without giving the atom/movable base class a setClosed() proc definition
for (var/atom/movable/O in get_turf(holder))
if (ismob(O) && !isliving(O)) //We dont want to take ghosts with us
continue
O.forceMove(holder) //Put objects inside before we close
var/obj/effect/temp_visual/risingPod = new /obj/effect/temp_visual/DPfall(get_turf(holder), src) //Make a nice animation of flying back up
risingPod.pixel_z = 0 //The initial value of risingPod's pixel_z is 200 because it normally comes down from a high spot
holder.forceMove(bay) //Move the pod back to centcom, where it belongs
animate(risingPod, pixel_z = 200, time = 10, easing = LINEAR_EASING) //Animate our rising pod
reversing = FALSE //Now that we're done reversing, we set this to false (otherwise we would get stuck in an infinite loop of calling the close proc at the bottom of open() )
open(holder, forced = TRUE)
return
/obj/structure/closet/supplypod/proc/setOpened() //Proc exists here, as well as in any atom that can assume the role of a "holder" of a supplypod. Check the open() proc for more details
update_icon()
/obj/structure/closet/supplypod/proc/setClosed() //Ditto
update_icon()
/obj/structure/closet/supplypod/Destroy()
if (!opened) //If we havent opened yet, we're opening because we've been destroyed. Lets dump our contents by opening up
open(src, broken = TRUE)
for (var/thing in src) //Delete any supply_order datums that may lurk in our contents
if (istype(thing, /datum/supply_order))
QDEL_NULL(thing)
return ..()
//------------------------------------FALLING SUPPLY POD-------------------------------------//
/obj/effect/temp_visual/DPfall //Falling pod
name = ""
icon = 'icons/obj/supplypods.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
icon_state = ""
/obj/effect/temp_visual/DPfall/Initialize(dropLocation, obj/structure/closet/supplypod/pod)
if (pod.style != STYLE_INVISIBLE) //Check to ensure the pod isn't invisible
icon_state = "[pod.icon_state]_falling"
name = pod.name
. = ..()
//------------------------------------TEMPORARY_VISUAL-------------------------------------//
/obj/effect/DPtarget //This is the object that forceMoves the supplypod to it's location
name = "Landing Zone Indicator"
desc = "A holographic projection designating the landing zone of something. It's probably best to stand back."
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 //Temporary "falling pod" that we animate
var/obj/structure/closet/supplypod/pod //The supplyPod that will be landing ontop of this target
/obj/effect/ex_act()
return
/obj/effect/DPtarget/Initialize(mapload, podParam, var/supplyorder = null)
if (ispath(podParam)) //We can pass either a path for a pod (as expressconsoles do), or a reference to an instantiated pod (as the centcom_podlauncher does)
podParam = new podParam() //If its just a path, instantiate it
pod = podParam
if (supplyorder)
pod.contents.Add(supplyorder) //Add the supply order to our pod's contents
for (var/mob/living/M in podParam) //If there are any mobs in the supplypod, we want to forceMove them into the target. This is so that they can see where they are about to land, AND so that they don't get sent to the nullspace error room (as the pod is currently in nullspace)
M.forceMove(src)
if(pod.effectStun) //If effectStun is true, stun any mobs caught on this target until the pod gets a chance to hit them
for (var/mob/living/M in get_turf(src))
M.Stun(pod.landingDelay+10, ignore_canstun = TRUE)//you aint goin nowhere, kid.
if (pod.effectStealth) //If effectStealth is true we want to be invisible
alpha = 255
addtimer(CALLBACK(src, .proc/beginLaunch, pod.effectCircle), pod.landingDelay)
/obj/effect/DPtarget/proc/beginLaunch(effectCircle) //Begin the animation for the pod falling. The effectCircle param determines whether the pod gets to come in from any descent angle
fallingPod = new /obj/effect/temp_visual/DPfall(drop_location(), pod)
var/matrix/M = matrix(fallingPod.transform) //Create a new matrix that we can rotate
var/angle = effectCircle ? rand(0,360) : rand(70,110) //The angle that we can come in from
fallingPod.pixel_x = cos(angle)*200 //Use some ADVANCED MATHEMATICS to set the animated pod's position to somewhere on the edge of a circle with the center being the target
fallingPod.pixel_z = sin(angle)*200
var/rotation = Get_Pixel_Angle(fallingPod.pixel_z, fallingPod.pixel_x) //CUSTOM HOMEBREWED proc that is just arctan with extra steps
M.Turn(rotation) //Turn our matrix accordingly
fallingPod.transform = M //Transform the animated pod according to the matrix
M = matrix(pod.transform) //Make another matrix based on the pod
M.Turn(rotation) //Turn the matrix
pod.transform = M //Turn the actual pod (Won't be visible until endLaunch() proc tho)
animate(fallingPod, pixel_z = 0, pixel_x = -16, time = 3, , easing = LINEAR_EASING) //Make the pod fall! At an angle!
addtimer(CALLBACK(src, .proc/endLaunch), 3, TIMER_CLIENT_TIME) //Go onto the last step after a very short falling animation
/obj/effect/DPtarget/proc/endLaunch()
pod.forceMove(drop_location()) //The fallingPod animation is over, now's a good time to forceMove the actual pod into position
for (var/mob/living/M in src) //Remember earlier (initialization) when we moved mobs into the DPTarget so they wouldnt get lost in nullspace? Time to get them out
M.forceMove(pod)
pod.preOpen() //Begin supplypod open procedures. Here effects like explosions, damage, and other dangerous (and potentially admin-caused, if the centcom_podlauncher datum was used) memes will take place
QDEL_NULL(fallingPod) //The fallingPod's (the animated effect, not the actual pod) purpose is complete. It can rest easy now
qdel(src) //ditto
//------------------------------------UPGRADES-------------------------------------//
/obj/item/disk/cargo/bluespace_pod //Disk that can be inserted into the Express Console to allow for Advanced Bluespace Pods
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

View File

@@ -49,6 +49,10 @@
var/obj/screen/click_catcher/void
//These two vars are used to make a special mouse cursor, with a unique icon for clicking
var/mouse_up_icon = null
var/mouse_down_icon = null
var/ip_intel = "Disabled"
//datum that controls the displaying and hiding of tooltips

View File

@@ -30,7 +30,8 @@
/mob/living/simple_animal/pet/gondola/Initialize()
. = ..()
CreateGondola()
if (!(istype(src, /mob/living/simple_animal/pet/gondola/gondolapod)))
CreateGondola()
/mob/living/simple_animal/pet/gondola/proc/CreateGondola()
icon_state = null

View File

@@ -66,6 +66,14 @@
* Used to track UIs for a mob.
**/
/mob/var/list/open_uis = list()
/**
* public
*
* Called on a UI's object when the UI is closed, not to be confused with client/verb/uiclose(), which closes the ui window
*
*
**/
/datum/proc/ui_close()
/**
* verb

View File

@@ -127,6 +127,7 @@
**/
/datum/tgui/proc/close()
user << browse(null, "window=[window_id]") // Close the window.
src_object.ui_close()
SStgui.on_close(src)
for(var/datum/tgui/child in children) // Loop through and close all children.
child.close()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 866 KiB

After

Width:  |  Height:  |  Size: 867 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

BIN
icons/mob/gondolapod.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
icons/obj/supplypods.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -27,6 +27,7 @@
#include "code\__DEFINES\bsql.config.dm"
#include "code\__DEFINES\bsql.dm"
#include "code\__DEFINES\callbacks.dm"
#include "code\__DEFINES\cargo.dm"
#include "code\__DEFINES\cinematics.dm"
#include "code\__DEFINES\cleaning.dm"
#include "code\__DEFINES\clockcult.dm"
@@ -1013,7 +1014,6 @@
#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"
@@ -1390,12 +1390,15 @@
#include "code\modules\buildmode\submodes\variable_edit.dm"
#include "code\modules\cargo\bounty.dm"
#include "code\modules\cargo\bounty_console.dm"
#include "code\modules\cargo\centcom_podlauncher.dm"
#include "code\modules\cargo\console.dm"
#include "code\modules\cargo\export_scanner.dm"
#include "code\modules\cargo\exports.dm"
#include "code\modules\cargo\expressconsole.dm"
#include "code\modules\cargo\gondolapod.dm"
#include "code\modules\cargo\order.dm"
#include "code\modules\cargo\packs.dm"
#include "code\modules\cargo\supplypod.dm"
#include "code\modules\cargo\supplypod_beacon.dm"
#include "code\modules\cargo\bounties\assistant.dm"
#include "code\modules\cargo\bounties\botany.dm"

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,127 @@
<ui-notice>
<span>To use this, simply spawn the atoms you want in one of the four Centcom Supplypod Bays. Items in the bay will then be launched inside your supplypod, one turf-full at a time! You can optionally use the following buttons to configure how the supplypod acts.</span>
</ui-notice>
<ui-display title='Centcom Pod Customization (to be used against helen weinstein)'>
<ui-section label = 'Which supplypod bay will you use?'>
<ui-button style='{{data.bay == 1 ? "selected" : null}}' action='bay1'>Bay #1</ui-button>
<ui-button style='{{data.bay == 2 ? "selected" : null}}' action='bay2'>Bay #2</ui-button>
<ui-button style='{{data.bay == 3 ? "selected" : null}}' action='bay3'>Bay #3</ui-button>
<ui-button style='{{data.bay == 4 ? "selected" : null}}' action='bay4'>Bay #4</ui-button>
</ui-section>
<ui-section label = 'Useful teleport tools!'>
<ui-button action='teleportCentcom'>Teleport to Centcom's Supplypod Loading Bay</ui-button>
<ui-button state='{{data.oldArea ? null : "disabled"}}'action='teleportBack'>Teleport Back to {{data.oldArea ? data.oldArea : "where you were"}}</ui-button>
</ui-section>
<ui-section label='Keep stuff after launching?'>
<ui-button style='{{data.launchClone ? "selected" : null}}' action='launchClone' tooltip-side='left'
tooltip='Choosing this will create a duplicate of the item to be launched in Centcom, allowing you to send one type of item multiple times. Either way, the atoms are forceMoved into the supplypod after it lands (but before it opens).'>Clone and Launch</ui-button>
</ui-section>
<ui-section label='Launch all at once?'>
<ui-button style='{{data.launchChoice == 1 ? "selected" : null}}' action='launchOrdered' tooltip-side='left'
tooltip='Instead of launching everything in the bay at once, this will "scan" things (one turf-full at a time) in order, left to right and top to bottom. Refreshing will reset the "scanner" to the top-leftmost position.'>Ordered</ui-button>
<ui-button style='{{data.launchChoice == 2? "selected" : null}}' action='launchRandom' tooltip-side='left'
tooltip='Instead of launching everything in the bay at once, this will launch one random turf of items at a time.'>Random</ui-button>
</ui-section>
<ui-section label='Add an explosion?'>
<ui-button style='{{data.explosionChoice == 1? "selected" : null}}' action='explosionCustom' tooltip-side='left'
tooltip='This will cause an explosion of whatever size you like (including flame range) to occur as soon as the supplypod lands. Dont worry, supply-pods are explosion-proof!'>Custom Size</ui-button>
<ui-button style='{{data.explosionChoice == 2? "selected" : null}}' action='explosionBus' tooltip-side='left'
tooltip='This will cause a maxcap explosion (dependent on server config) to occur as soon as the supplypod lands. Dont worry, supply-pods are explosion-proof!'>Adminbus</ui-button>
</ui-section>
<ui-section label='Extra damage?' (default = None)>
<ui-button style='{{data.damageChoice == 1 ? "selected" : null}}' action='damageCustom' tooltip-side='left'
tooltip='Anyone caught under the pod when it lands will be dealt this amount of brute damage. Sucks to be them!'>Custom Damage</ui-button>
<ui-button style='{{data.damageChoice == 2 ? "selected" : null}}' action='damageGib' tooltip-side='left'
tooltip='This will attempt to gib any mob caught under the pod when it lands, as well as dealing a nice 5000 brute damage. Ya know, just to be sure!'>Gib</ui-button>
</ui-section>
<ui-section label='Extra effects?'>
<ui-button style='{{data.effectStun ? "selected" : null}}' action='effectStun' tooltip-side='left'
tooltip='Anyone who is on the turf when the supplypod is launched will be stunned until the supplypod lands. They cant get away that easy!'>Stun</ui-button>
<ui-button style='{{data.effectLimb ? "selected" : null}}' action='effectLimb' tooltip-side='left'
tooltip='This will cause anyone caught under the pod to lose a limb, excluding their head.'>Delimb</ui-button>
<ui-button style='{{data.effectBluespace ? "selected" : null}}' action='effectBluespace' tooltip-side='left'
tooltip='Gives the supplypod an advanced Bluespace Recyling Device. After opening, the supplypod will be warped directly to the surface of a nearby NT-designated trash planet (/r/ss13).'>Bluespace</ui-button>
<ui-button style='{{data.effectStealth ? "selected" : null}}' action='effectStealth' tooltip-side='left'
tooltip='This hides the red target icon from appearing when you launch the supplypod. Combos well with the "Invisible" style. Sneak attack, go!'>Stealth</ui-button>
<ui-button style='{{data.effectQuiet ? "selected" : null}}' action='effectQuiet' tooltip-side='left'
tooltip='This will keep the supplypod from making any sounds, except for those specifically set by admins in the Sound section.'>Quiet Landing</ui-button>
<ui-button style='{{data.effectReverse ? "selected" : null}}' action='effectReverse' tooltip-side='left'
tooltip='This pod will not send any items. Instead, after landing, the supplypod will close (similar to a normal closet closing), and then launch back to the right centcom bay to drop off any new contents.'>Reverse Mode</ui-button>
<ui-button style='{{data.effectMissile ? "selected" : null}}' action='effectMissile' tooltip-side='left'
tooltip='This pod will not send any items. Instead, it will immediatley delete after landing (Similar visually to setting openDelay & departDelay to 0, but this looks nicer). Useful if you just wanna fuck some shit up. Combos well with the Missile style.'>Missile Mode</ui-button>
<ui-button style='{{data.effectCircle ? "selected" : null}}' action='effectCircle' tooltip-side='left'
tooltip='This will make the supplypod come in from any angle. Im not sure why this feature exists, but here it is.'>Any Descent Angle</ui-button>
<ui-button style='{{data.effectBurst ? "selected" : null}}' action='effectBurst' tooltip-side='left'
tooltip='This will make each click launch 5 supplypods inaccuratly around the target turf (a 3x3 area). Combos well with the Missle Mode if you dont want shit lying everywhere after.'>Machine Gun Mode</ui-button>
<ui-button style='{{data.effectTarget ? "selected" : null}}' action='effectTarget' tooltip-side='left'
tooltip='This will make the supplypod target a specific atom, instead of the mouses position. Smiting does this automatically!'>Specific Target</ui-button>
<ui-button style='{{data.effectName ? "selected" : null}}' action='effectName' tooltip-side='left'
tooltip='Allows you to add a custom name and description.'>Custom Name/Desc</ui-button>
</ui-section>
<ui-section label='Sound?'>
<ui-button style='{{data.landingSound ? "selected" : null}}' action='landingSound' tooltip-side='left'
tooltip='Choose a sound to play when the pod lands.'>Custom Landing Sound</ui-button>
<ui-button style='{{data.openingSound ? "selected" : null}}' action='openingSound' tooltip-side='left'
tooltip='Choose a sound to play when the pod opens.'>Custom Opening Sound</ui-button>
<ui-button style='{{data.leavingSound ? "selected" : null}}' action='leavingSound' tooltip-side='left'
tooltip='Choose a sound to play when the pod departs (whether that be delection in the case of a bluespace pod, or leaving for centcom for a reversing pod).'>Custom Leaving Sound</ui-button>
<ui-button style='{{data.soundVolume ? "selected" : null}}' action='soundVolume' tooltip-side='left'
tooltip='Choose the volume for the sound to play at. Default values are between 1 and 100, but hey, do whatever. Im a tooltip, not a cop.'>Admin Sound Volume</ui-button>
</ui-section>
<ui-section label='Delay timers?'>
<ui-button style='{{data.landingDelay != 5 ? "selected" : null}}' action='landingDelay' tooltip-side='left'
tooltip='Choose the amount of time it takes for the supplypod to hit the station. By default this value is 0.5 seconds.'>Custom Landing Time</ui-button>
<ui-button style='{{data.openingDelay != 30 ? "selected" : null}}' action='openingDelay' tooltip-side='left'
tooltip='Choose the amount of time it takes for the supplypod to open after landing. Useful for giving whatevers inside the pod a nice dramatic entrance! By default this value is 3 seconds.'>Custom Opening Time</ui-button>
<ui-button style='{{data.departureDelay != 30 ? "selected" : null}}' action='departureDelay' tooltip-side='left'
tooltip='Choose the amount of time it takes for the supplypod to leave after landing. By default this value is 3 seconds.'>Custom Leaving Time</ui-button>
</ui-section>
<ui-section label='Style?'>
<ui-button style='{{data.styleChoice == 1 ? "selected" : null}}' action='styleStandard' tooltip-side='left'
tooltip='Changes the pods style from the default Centcom color scheme to your standard Nanotrasen black and orange. Same color scheme as the normal station-used supplypods.'>Standard</ui-button>
<ui-button style='{{data.styleChoice == 2 ? "selected" : null}}' action='styleBluespace' tooltip-side='left'
tooltip='Changes the pods style from the default Centcom color scheme to the same as the stations upgraded blue-and-white Bluespace Supplypods.'>Advanced</ui-button>
<ui-button style='{{data.styleChoice == 4 ? "selected" : null}}' action='styleSyndie' tooltip-side='left'
tooltip='Changes the pods style from the default Centcom color scheme to a menacing black and blood-red. Great for sending meme-ops in style!'>Syndicate</ui-button>
<ui-button style='{{data.styleChoice == 5 ? "selected" : null}}' action='styleBlue' tooltip-side='left'
tooltip='Changes the pods style from the default Centcom color scheme to a menacing black and dark blue. Great for sending deathsquads in style!'>Deathsquad</ui-button>
<ui-button style='{{data.styleChoice == 6 ? "selected" : null}}' action='styleCult' tooltip-side='left'
tooltip='Changes the pods style from the default Centcom style to a blood and rune covered cult pod!'>Cult Pod</ui-button>
<ui-button style='{{data.styleChoice == 7 ? "selected" : null}}' action='styleMissile' tooltip-side='left'
tooltip='Changes the pods style from the default Centcom style to a large missile. Combos well with a missile mode, so the missile doesnt stick around after landing.'>Missile</ui-button>
<ui-button style='{{data.styleChoice == 8 ? "selected" : null}}' action='styleSMissile' tooltip-side='left'
tooltip='Changes the pods style from the default Centcom style to a large blood-red missile. Combos well with missile mode, so the missile doesnt stick around after landing.'>Syndicate Missile</ui-button>
<ui-button style='{{data.styleChoice == 9 ? "selected" : null}}' action='styleBox' tooltip-side='left'
tooltip='Changes the pods style from the default Centcom style to a large, dark-green military supply crate.'>Supply Crate</ui-button>
<ui-button style='{{data.styleChoice == 10 ? "selected" : null}}' action='styleHONK' tooltip-side='left'
tooltip='Changes the pods style from the default Centcom color scheme to a colorful, clown inspired look.'>HONK</ui-button>
<ui-button style='{{data.styleChoice == 11 ? "selected" : null}}' action='styleFruit' tooltip-side='left'
tooltip='for when an orange is angry'>Fruit~</ui-button>
<ui-button style='{{data.styleChoice== 12 ? "selected" : null}}' action='styleInvisible' tooltip-side='left'
tooltip='Makes the supplypod invisible! Useful for when you want to use this feature with a gateway or something. Combos well with the "Stealth" and "Quiet Landing" effects.'>Invisible</ui-button>
<ui-button style='{{data.styleChoice == 13 ? "selected" : null}}' action='styleGondola' tooltip-side='left'
tooltip='this gondola can control when he wants to deliver his supplies if he has a smart enough mind, so offer up his body to ghosts for maximum enjoyment. (Make sure to turn off bluespace and set a arbitrarily high open-time if you do!)'>Gondola (alive)</ui-button>
</ui-section>
</ui-display>
<ui-display>
<ui-section label = '{{data.numObjects}} turfs with launchable atoms found in Bay #{{data.bay}}'>
<ui-button action='refresh' tooltip-side='right'
tooltip='Manually refreshes the possible things to launch in the pod bay.'>Refresh Pod Bay</ui-button>
</ui-section>
<ui-section>
<ui-button style='{{data.giveLauncher ? "selected" : null}}' action='giveLauncher' tooltip-side='right'
tooltip='THE CODEX ASTARTES CALLS THIS MANEUVER: STEEL RAIN!!'>Enter Launch Mode</ui-button>
</ui-section>
</ui-display>