Files
Yogstation/html/create_object.html
alexkar598 2333d64f09 Adds support for 513(and unicode), additionally drops supports for 512 in the process and updates dreamchecker(turdis) and casually fixes about 90 bugs in the codebase (#8324)
* Cherry picks the unicode part 2 PR from TG

* Things

* drop 512 support

* TAN --> tan

* Manually does the things that was in renamed files

* CLAMP --> clamp

* ismovableatom -> ismovable

* bugfixes, tg is bad

* Ports sanitize_name

* Bumps checks

* Fixes new linter errors (#48126)

About The Pull Request

This fixes the errors raised by the new feature I'm adding to the linter: SpaceManiac/SpacemanDMM#119

* Update SpacemanDMM suite to 1.2 (#48785)

* Update SpacemanDMM suite to 1.2

* Fix new lint errors

* Removes unreachable code (#48143)

About The Pull Request

As detected by SpaceManiac/SpacemanDMM#123

* casually fixes 50 bugs

* stoopid evil dreamchecker

* stoopid evil dreamchecker

* stoopid evil dreamchecker

* almost the same thing

* Makes all UIs UTF-8

* Fixes bugs

* Fixes runtimes, some related to 513, some not

* Fixes agent ids

Co-authored-by: MrPerson <spamtaffic@gmail.com>
Co-authored-by: alexkar598 <>
Co-authored-by: spookydonut <github@spooksoftware.com>
2020-05-02 00:43:42 -04:00

130 lines
4.1 KiB
HTML

<html>
<head>
<meta charset='UTF-8'>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- yogs -->
<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;
}
.option.selected, .option.selected:hover {background-color: #4488ff;} /* yogs*/
</style>
</head>
<body>
<form name="spawner" action="byond://?src=/* ref src */" method="get">
<input type="hidden" name="src" value="/* ref src */">
/* hreftokenfield */
Type <input type="text" name="filter" value="" style="width:280px;height:25" oninput="updateSearch()"> <!-- yogs - oninput and remove onkeypress --> <input type = "button" value = "Search" onclick = "updateSearch()" /><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="" style="width:30px">
Name: <input type="text" name="object_name" value="" style="width:180px"><br>
Where:
<select name='object_where' style="width:320px">
<option value='onfloor'>On floor below own mob</option>
<option value='frompod'>On floor below own mob, dropped via supply pod</option>
<option value='inhand'>In own mob's hand</option>
<option value='inmarked'>In marked object</option>
</select>
<br><br>
<!--yogs start-->
<div id="object_list_container" style="width:98%;height: 300px;overflow:auto"></div>
<input type="hidden" name="object_list" value="">
<input type="submit" value="spawn" id="spawn_button" disabled>
<!--yogs end-->
</form>
<script language="JavaScript">
var old_search = "";
var object_list = document.spawner.object_list;
var object_list_container = document.getElementById("object_list_container"); // yogs
var object_paths = null /* object types */;
var objects = object_paths == null ? new Array() : object_paths.split(";");
document.spawner.filter.focus();
// yogs start
for(var i = 0; i < objects.length; i++)
{
var option_div = document.createElement("div");
option_div.setAttribute("data-typepath", objects[i]);
option_div.textContent = objects[i];
option_div.className = "option";
object_list_container.appendChild(option_div);
}
function populateList(from_list)
{
var obj = {};
for(var i = 0; i < from_list.length; i++) obj[from_list[i]] = true;
for(var i = 0; i < object_list_container.childNodes.length; i++) {
var elem = object_list_container.childNodes[i];
var typepath = elem.getAttribute("data-typepath");
elem.style.display = obj[typepath] ? "block" : "none";
if(elem.className == "option selected" && elem.style.display == "none") {
elem.className = "option";
document.getElementById("spawn_button").disabled = true;
}
}
}
document.getElementById("object_list_container").onclick = function onclick(e) {
if(e.target.className == "option") {
for(var i = 0; i < object_list_container.childNodes.length; i++) {
object_list_container.childNodes[i].className = "option";
}
e.target.className = "option selected";
document.getElementById("spawn_button").disabled = false;
object_list.value = e.target.getAttribute("data-typepath");
}
}
// yogs end
function updateSearch()
{
old_search = document.spawner.filter.value.toLowerCase();
/* -- Yogs comment-out, not necessary since we've fixed Create Object being client-crashingly bad.
if (!old_search)
return;
*/
var filtered = new Array();
var i;
for (i in objects)
{
var caseInsensitiveObject = objects[i].toLowerCase();
if(caseInsensitiveObject.search(old_search) < 0)
{
continue;
}
filtered.push(objects[i]);
}
populateList(filtered);
}
</script>
</body>
</html>