mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-09 16:09:15 +00:00
* Initial Commit
* Not quite all was staged, apparently.
* Multiline no longer necessary
* For my convenience...
* Forgot an important little tidbit in routes.tsx
* This updated, apparently.
* And now hell breaks loose
* First batch
* Second Batch
* Third batch (Unit Tests)
* Improvised shotgun ammo is gone; Vibebots are refactored
* UpdatePath sweeps in our fulp_modules/_maps folder
* I can't bring myself to do it.
* Map stuff
* Didn't mean to leave this uncommented
* I carpet-bombed them with Find-Replace. Let's see what linters think
* I sure do hope this is comprehensive and doesn't break other things
* This may take a while
* Next Round
* Hopefully the last batch before getting on with actual fixes
* Telescreens
* :/
* Stragglers
* Helio Emergency Shuttle; NearStation adjustments.
* Only one more commit for greenchecks... Shuttle code be dammed.
* Pff, the file was missing
* Same treatment as the other map files.
* Missed a comma :P
* BZ chambers for Xenobiology
* Odd. Most of these got done earlier. Not sure why this one wasn't.
* Mapping sweep. I didn't adjust C_tags in Theia. Another time.
* The balloon alerts overlap
* I hate TGU I hate TGU
* I meant to say "I hate TG" on the last one. Freudian slip.
* Fix Fix
* Nanite research cost rebalance
* TGU-Update: Step 0
* Yeah I figured it'd do this.
* I accidentally undid this
* Failed to catch this one
* I don't trust hundredths not to break or be broken somewhere.
* Little air alarm tweaks
* Ports #1228
* Stuff I missed
* Silly
* TGU so nice we're going to make it thrice
* Yarn
* Should be all? Fixes cult stun too.
* Thermomachine layers
* Free square spellcheck to rerun tests and see if it's consistent
* All credit goes to QLA for reminding me to actually do this
* Update to e40becd742
* github folder
53 lines
2.2 KiB
Plaintext
53 lines
2.2 KiB
Plaintext
/**
|
|
* One proc for easy spawning of pods in the code to drop off items before whizzling (please don't proc call this in game, it will destroy you)
|
|
*
|
|
* Arguments:
|
|
* * specifications: special mods to the pod, see non var edit specifications for details on what you should fill this with
|
|
* Non var edit specifications:
|
|
* * target = where you want the pod to drop
|
|
* * path = a special specific pod path if you want, this can save you a lot of var edits
|
|
* * style = style of the pod, defaults to the normal pod
|
|
* * spawn = spawned path or a list of the paths spawned, what you're sending basically
|
|
* Returns the pod spawned, in case you want to spawn items yourself and modify them before putting them in.
|
|
*/
|
|
/proc/podspawn(specifications)
|
|
//get non var edit specifications
|
|
var/turf/landing_location = specifications["target"]
|
|
var/spawn_type = specifications["path"]
|
|
var/style = specifications["style"]
|
|
var/list/paths_to_spawn = specifications["spawn"]
|
|
|
|
//setup pod, add contents
|
|
if(!isturf(landing_location))
|
|
landing_location = get_turf(landing_location)
|
|
if(!spawn_type)
|
|
spawn_type = /obj/structure/closet/supplypod/podspawn
|
|
var/obj/structure/closet/supplypod/podspawn/pod = new spawn_type(null, style)
|
|
if(paths_to_spawn && !islist(paths_to_spawn))
|
|
paths_to_spawn = list(paths_to_spawn)
|
|
for(var/atom/movable/path as anything in paths_to_spawn)
|
|
if(!ispath(path))
|
|
path.forceMove(pod)
|
|
else
|
|
var/amount_to_spawn = paths_to_spawn[path] || 1
|
|
if(!isnum(amount_to_spawn))
|
|
stack_trace("amount to spawn for path \"[path]\" is not a number, defaulting to 1")
|
|
amount_to_spawn = 1
|
|
|
|
for(var/item_number in 1 to amount_to_spawn)
|
|
new path(pod)
|
|
|
|
//remove non var edits from specifications
|
|
specifications -= "target"
|
|
specifications -= "style"
|
|
specifications -= "path"
|
|
specifications -= "spawn" //list, we remove the key
|
|
|
|
//rest of specificiations are edits on the pod
|
|
for(var/variable_name in specifications)
|
|
var/variable_value = specifications[variable_name]
|
|
if(!pod.vv_edit_var(variable_name, variable_value))
|
|
stack_trace("WARNING! podspawn vareditting \"[variable_name]\" to \"[variable_value]\" was rejected by the pod!")
|
|
new /obj/effect/pod_landingzone(landing_location, pod)
|
|
return pod
|