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:
coiax
2019-01-04 15:00:04 +00:00
committed by Jordan Brown
parent c4213f13ab
commit d94c5cacb0
5 changed files with 48 additions and 11 deletions

View File

@@ -641,16 +641,41 @@
var/chosen = pick_closest_path(object)
if(!chosen)
return
var/turf/T = get_turf(usr)
if(ispath(chosen, /turf))
var/turf/T = get_turf(usr.loc)
T.ChangeTurf(chosen)
else
var/atom/A = new chosen(usr.loc)
var/atom/A = new chosen(T)
A.flags_1 |= ADMIN_SPAWNED_1
log_admin("[key_name(usr)] spawned [chosen] at [AREACOORD(usr)]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Spawn Atom") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/podspawn_atom(object as text)
set category = "Debug"
set desc = "(atom path) Spawn an atom via supply drop"
set name = "Podspawn"
if(!check_rights(R_SPAWN))
return
var/chosen = pick_closest_path(object)
if(!chosen)
return
var/turf/T = get_turf(usr)
if(ispath(chosen, /turf))
T.ChangeTurf(chosen)
else
var/obj/structure/closet/supplypod/centcompod/pod = new()
var/atom/A = new chosen(pod)
A.flags_1 |= ADMIN_SPAWNED_1
new /obj/effect/DPtarget(T, pod)
log_admin("[key_name(usr)] pod-spawned [chosen] at [AREACOORD(usr)]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Podspawn Atom") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/spawn_cargo(object as text)
set category = "Debug"
set desc = "(atom path) Spawn a cargo crate"