mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-05 23:21:53 +00:00
View vars and game panel spawning updated:
- You can now edit variables for clients. You however can't mass-edit them. - Common variables are displayed on top of the view variables menu. Screenshot shows examples of mobs, objects and datums. Screenthot: http://www.kamletos.si/view_var_lost_count1.PNG - Fixed the problem where long type paths ruined everything forever in view vars. Screenshot: http://www.kamletos.si/view_var_lost_count2.PNG - Added an option to the spawn object/mob/turf screens which lets you pick whether you want the item to spawn under your mob or in the object you have marked. You can only spawn stuff in objects of type /atom. Screenshot: http://www.kamletos.si/spawn_objects.PNG git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2280 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -967,33 +967,59 @@
|
||||
if(!obj_dir || !(obj_dir in list(1,2,4,8,5,6,9,10)))
|
||||
obj_dir = 2
|
||||
var/obj_name = sanitize(href_list["object_name"])
|
||||
var/where = href_list["object_where"]
|
||||
if (!( where in list("onfloor","inhand","inmarked") ))
|
||||
where = "onfloor"
|
||||
|
||||
//TODO ERRORAGE
|
||||
if( where == "inhand" )
|
||||
usr << "Support for inhand not available yet. Will spawn on floor."
|
||||
where = "onfloor"
|
||||
//END TODO ERRORAGE
|
||||
|
||||
if ( where == "inhand" ) //Can only give when human or monkey
|
||||
if ( !( ishuman(usr) || ismonkey(usr) ) )
|
||||
usr << "Can only spawn in hand when you're a human or a monkey."
|
||||
where = "onfloor"
|
||||
else if ( usr.get_active_hand() )
|
||||
usr << "Your active hand is full. Spawning on floor."
|
||||
where = "onfloor"
|
||||
if ( where == "inmarked" )
|
||||
if ( !marked_datum )
|
||||
usr << "You don't have any object marked. Abandoning spawn."
|
||||
return
|
||||
else
|
||||
if ( !istype(marked_datum,/atom) )
|
||||
usr << "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn."
|
||||
return
|
||||
|
||||
var/atom/target //Where the object will be spawned
|
||||
switch ( where )
|
||||
if ( "onfloor" )
|
||||
switch (href_list["offset_type"])
|
||||
if ("absolute")
|
||||
target = locate(0 + X,0 + Y,0 + Z)
|
||||
if ("relative")
|
||||
target = locate(loc.x + X,loc.y + Y,loc.z + Z)
|
||||
if ( "inmarked" )
|
||||
target = marked_datum
|
||||
|
||||
|
||||
//TODO ERRORAGE - Give support for "inhand"
|
||||
|
||||
if(target)
|
||||
for (var/path in paths)
|
||||
for (var/i = 0; i < number; i++)
|
||||
var/atom/O = new path(target)
|
||||
if(O)
|
||||
O.dir = obj_dir
|
||||
if(obj_name)
|
||||
O.name = obj_name
|
||||
if(istype(O,/mob))
|
||||
var/mob/M = O
|
||||
M.real_name = obj_name
|
||||
|
||||
for (var/i = 1 to number)
|
||||
switch (href_list["offset_type"])
|
||||
if ("absolute")
|
||||
for (var/path in paths)
|
||||
var/atom/O = new path(locate(0 + X,0 + Y,0 + Z))
|
||||
if(O)
|
||||
O.dir = obj_dir
|
||||
if(obj_name)
|
||||
O.name = obj_name
|
||||
if(istype(O,/mob))
|
||||
var/mob/M = O
|
||||
M.real_name = obj_name
|
||||
|
||||
if ("relative")
|
||||
if (loc)
|
||||
for (var/path in paths)
|
||||
var/atom/O = new path(locate(loc.x + X,loc.y + Y,loc.z + Z))
|
||||
if(O)
|
||||
O.dir = obj_dir
|
||||
if(obj_name)
|
||||
O.name = obj_name
|
||||
if(istype(O,/mob))
|
||||
var/mob/M = O
|
||||
M.real_name = obj_name
|
||||
else
|
||||
return
|
||||
|
||||
if (number == 1)
|
||||
log_admin("[key_name(usr)] created a [english_list(paths)]")
|
||||
|
||||
Reference in New Issue
Block a user