mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
Podspawn admin verb, like Spawn, but more IC (#41981)
* Podspawn admin verb, like spawn, but more IC 🆑 coiax admin: New 'Podspawn' verb, which functions like 'Spawn', except any atoms movable spawned will be dropped in via a no-damage, no-explosion Centcom supply pod. /🆑 Essentially, sometimes you want to spawn stuff in, quickly, in an adhoc manner. Use of the full Centcom launchbay is fine if you're doing a full blown drop or event or want some customisation, but sometimes you want a quick supply pod. The admin smite "Supply Pod (Quick)" has been used for this purpose, but it has a side effect of setting people on fire and damaging them, which isn't what you want if it's just for spawning stuff in. * Adds option to Game Panel->Create Object * Code review I
This commit is contained in:
@@ -1323,7 +1323,7 @@
|
||||
|
||||
var/atom/target //Where the object will be spawned
|
||||
var/where = href_list["object_where"]
|
||||
if (!( where in list("onfloor","inhand","inmarked") ))
|
||||
if (!( where in list("onfloor","frompod","inhand","inmarked") ))
|
||||
where = "onfloor"
|
||||
|
||||
|
||||
@@ -1334,7 +1334,7 @@
|
||||
where = "onfloor"
|
||||
target = usr
|
||||
|
||||
if("onfloor")
|
||||
if("onfloor", "frompod")
|
||||
switch(href_list["offset_type"])
|
||||
if ("absolute")
|
||||
target = locate(0 + X,0 + Y,0 + Z)
|
||||
@@ -1350,7 +1350,12 @@
|
||||
else
|
||||
target = marked_datum
|
||||
|
||||
var/obj/structure/closet/supplypod/centcompod/pod
|
||||
|
||||
if(target)
|
||||
if(where == "frompod")
|
||||
pod = new()
|
||||
|
||||
for (var/path in paths)
|
||||
for (var/i = 0; i < number; i++)
|
||||
if(path in typesof(/turf))
|
||||
@@ -1359,7 +1364,12 @@
|
||||
if(N && obj_name)
|
||||
N.name = obj_name
|
||||
else
|
||||
var/atom/O = new path(target)
|
||||
var/atom/O
|
||||
if(where == "frompod")
|
||||
O = new path(pod)
|
||||
else
|
||||
O = new path(target)
|
||||
|
||||
if(!QDELETED(O))
|
||||
O.flags_1 |= ADMIN_SPAWNED_1
|
||||
if(obj_dir)
|
||||
@@ -1379,6 +1389,8 @@
|
||||
R.module.add_module(I, TRUE, TRUE)
|
||||
R.activate_module(I)
|
||||
|
||||
if(pod)
|
||||
new /obj/effect/DPtarget(target, pod)
|
||||
|
||||
if (number == 1)
|
||||
log_admin("[key_name(usr)] created a [english_list(paths)]")
|
||||
|
||||
Reference in New Issue
Block a user