Files
Paradise/icons/create_object.html
baloh.matevz 7769420e4c ADMIN UPDATE
- You can now set the dir and name variables for newly spawned objects, turfs or mobs in the game-panel menu.
- Dirs are:
  - 1: north
  - 2: south
  - 4: east
  - 8: west
  For the rest:
  - northeast = north + east = 1 + 4 = 5

legal values: 1, 2, 4, 8, 5, 6, 9, 10

Leave the name space blank to keep the default name. 

If you assign a custom name for a mob, it will also be set as the real_name, meaning it will stick.

Coder note:
Names and dirs are both assigned after initialization, so they're not respected during New()

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1933 316c924e-a436-60f5-8080-3fe189b3f50e
2011-07-26 18:28:42 +00:00

106 lines
2.5 KiB
HTML

<html>
<head>
<title>Create Object</title>
<style type="text/css">
body
{
font-size: 9pt;
font-family: Verdana, sans-serif;
}
h1, h2, h3, h4, h5, h6
{
color: #00f;
font-family: Georgia, Arial, sans-serif;
}
img {
border: 0px;
}
p.lic {
font-size: 6pt;
}
</style>
</head>
<body>
<form name="spawner" action="byond://?src=/* ref src */" method="get">
<input type="hidden" name="src" value="/* ref src */">
Type <input type="text" name="filter" value="" onkeyup="updateSearch()" onkeypress="submitFirst(event)" style="width:350px"><br>
Offset: <input type="text" name="offset" value="x,y,z" style="width:250px">
A <input type="radio" name="offset_type" value="absolute">
R <input type="radio" name="offset_type" value="relative" checked="checked"><br>
Number: <input type="text" name="object_count" value="1" style="width:30px">
Dir: <input type="text" name="object_dir" value="2" style="width:30px">
Name: <input type="text" name="object_name" value="" style="width:180px"><br><br>
<select name="object_list" id="object_list" size="20" multiple style="width:400px"></select><br>
<input type="submit" value="spawn">
</form>
<script language="JavaScript">
var old_search = "";
var object_list = document.spawner.object_list;
var object_paths = null /* object types */;
var objects = object_paths == null ? new Array() : object_paths.split(";");
document.spawner.filter.focus();
populateList(objects);
function populateList(from_list)
{
object_list.options.length = 0;
var i;
for (i in from_list)
{
var new_option = document.createElement("option");
new_option.value = from_list[i];
new_option.text = from_list[i];
object_list.options.add(new_option);
}
}
function updateSearch()
{
if (old_search == document.spawner.filter.value)
{
return;
}
old_search = document.spawner.filter.value;
var filtered = new Array();
var i;
for (i in objects)
{
if(objects[i].search(old_search) < 0)
{
continue;
}
filtered.push(objects[i]);
}
populateList(filtered);
}
function submitFirst(event)
{
if (!object_list.options.length)
{
return false;
}
if (event.keyCode == 13 || event.which == 13)
{
object_list.options[0].selected = 'true';
}
}
</script>
</body>
</html>