mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-06 06:52:39 +00:00
Revert "Allows admins to pass parameters to New() (#26613)"
This reverts commit 9d0185c023.
This commit is contained in:
@@ -610,41 +610,20 @@
|
||||
set desc = "(atom path) Spawn an atom"
|
||||
set name = "Spawn"
|
||||
|
||||
return usr.client.spawn_atom_impl(object, FALSE)
|
||||
|
||||
/datum/admins/proc/spawn_atom_adv(object as text)
|
||||
set category = "Debug"
|
||||
set desc = "(atom path) Spawn an atom with New() parameters"
|
||||
set name = "Advanced Spawn"
|
||||
|
||||
return usr.client.spawn_atom_impl(object, TRUE)
|
||||
|
||||
|
||||
/client/proc/spawn_atom_impl(object, params)
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
var/chosen = pick_closest_path(object)
|
||||
if(!chosen)
|
||||
return
|
||||
|
||||
var/list/arguments
|
||||
if(ispath(chosen,/turf))
|
||||
var/turf/T = get_turf(usr.loc)
|
||||
T.ChangeTurf(chosen)
|
||||
else
|
||||
if(params)
|
||||
arguments = usr.client.get_callproc_args(TRUE)
|
||||
|
||||
if(!usr)
|
||||
return
|
||||
|
||||
arguments = list(usr.loc) + arguments
|
||||
|
||||
var/atom/A = new chosen(arglist(arguments))
|
||||
var/atom/A = new chosen(usr.loc)
|
||||
A.admin_spawned = TRUE
|
||||
|
||||
log_admin("[key_name(usr)] spawned [chosen] at [COORD(usr)][LAZYLEN(arguments) > 1 ? " with parameters [print_single_line(arguments)]": ""]")
|
||||
log_admin("[key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])")
|
||||
SSblackbox.add_details("admin_verb","Spawn Atom") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user