mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
[MIRROR] prettier all part two (#11229)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
cd7d7fcff5
commit
023f5367d4
@@ -8,7 +8,6 @@ juke
|
|||||||
**/dist
|
**/dist
|
||||||
**/node_modules
|
**/node_modules
|
||||||
html/templates
|
html/templates
|
||||||
html/create_object.html
|
|
||||||
|
|
||||||
# File names / types
|
# File names / types
|
||||||
*.min.*
|
*.min.*
|
||||||
|
|||||||
@@ -1,129 +1,150 @@
|
|||||||
<html>
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Create Object</title>
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
font-size: 9pt;
|
||||||
|
font-family: Verdana, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
<head>
|
h1,
|
||||||
<title>Create Object</title>
|
h2,
|
||||||
<style type="text/css">
|
h3,
|
||||||
body
|
h4,
|
||||||
{
|
h5,
|
||||||
font-size: 9pt;
|
h6 {
|
||||||
font-family: Verdana, sans-serif;
|
color: #00f;
|
||||||
}
|
font-family: Georgia, Arial, sans-serif;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
p.lic {
|
||||||
|
font-size: 6pt;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6
|
<body>
|
||||||
{
|
<form name="spawner" action="byond://?src=/* ref src */" method="get">
|
||||||
color: #00f;
|
<input type="hidden" name="src" value="/* ref src */" />
|
||||||
font-family: Georgia, Arial, sans-serif;
|
/* hreftokenfield */
|
||||||
}
|
<input type="hidden" name="action" value="object_list" />
|
||||||
img {
|
|
||||||
border: 0px;
|
|
||||||
}
|
|
||||||
p.lic {
|
|
||||||
font-size: 6pt;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
Type
|
||||||
<form name="spawner" action="byond://?src=/* ref src */" method="get">
|
<input
|
||||||
<input type="hidden" name="src" value="/* ref src */">
|
type="text"
|
||||||
/* hreftokenfield */
|
name="filter"
|
||||||
<input type="hidden" name="action" value="object_list">
|
value=""
|
||||||
|
onkeypress="submitFirst(event)"
|
||||||
|
style="width: 280px; height: 25"
|
||||||
|
/>
|
||||||
|
<input type="button" value="Search" onclick="updateSearch()" /><br />
|
||||||
|
Offset:
|
||||||
|
<input type="text" name="offset" value="x,y,z" style="width: 250px" />
|
||||||
|
|
||||||
Type <input type="text" name="filter" value="" onkeypress="submitFirst(event)" style="width:280px;height:25"> <input type = "button" value = "Search" onclick = "updateSearch()" /><br>
|
A <input type="radio" name="offset_type" value="absolute" /> R
|
||||||
Offset: <input type="text" name="offset" value="x,y,z" style="width:250px">
|
<input
|
||||||
|
type="radio"
|
||||||
|
name="offset_type"
|
||||||
|
value="relative"
|
||||||
|
checked="checked"
|
||||||
|
/><br />
|
||||||
|
|
||||||
A <input type="radio" name="offset_type" value="absolute">
|
Number:
|
||||||
R <input type="radio" name="offset_type" value="relative" checked="checked"><br>
|
<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 />
|
||||||
|
Where:
|
||||||
|
<select name="object_where" style="width: 320px">
|
||||||
|
<option value="onfloor">On floor below own mob</option>
|
||||||
|
<!-- <option value='inhand'>In own mob's hand</option> -->
|
||||||
|
<option value="inmarked">In marked object</option>
|
||||||
|
</select>
|
||||||
|
<br /><br />
|
||||||
|
Number of matches:
|
||||||
|
<input id="number" value="0" style="width: 180px" /><br />
|
||||||
|
<br /><br />
|
||||||
|
|
||||||
Number: <input type="text" name="object_count" value="1" style="width:30px">
|
<div id="selector_hs">
|
||||||
Dir: <input type="text" name="object_dir" value="2" style="width:30px">
|
<select name="object_list" id="object_list" multiple size="20"></select>
|
||||||
Name: <input type="text" name="object_name" value="" style="width:180px"><br>
|
</div>
|
||||||
Where:
|
|
||||||
<select name='object_where' style="width:320px">
|
|
||||||
<option value='onfloor'>On floor below own mob</option>
|
|
||||||
<!-- <option value='inhand'>In own mob's hand</option> -->
|
|
||||||
<option value='inmarked'>In marked object</option>
|
|
||||||
</select>
|
|
||||||
<br><br>
|
|
||||||
Number of matches: <input id="number" value="0" style="width:180px"><br>
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
<div id="selector_hs">
|
<br />
|
||||||
<select name="object_list" id="object_list" multiple size="20">
|
<input type="submit" value="spawn" />
|
||||||
</select>
|
</form>
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>
|
<script language="JavaScript">
|
||||||
<input type="submit" value="spawn">
|
var old_search = "";
|
||||||
</form>
|
var object_list = document.spawner.object_list;
|
||||||
|
var object_list_container = document.getElementById("selector_hs");
|
||||||
|
// prettier-ignore
|
||||||
|
var object_paths = (null /* object types */);
|
||||||
|
var objects =
|
||||||
|
object_paths == null ? new Array() : object_paths.split(";");
|
||||||
|
|
||||||
<script language="JavaScript">
|
document.spawner.filter.focus();
|
||||||
var old_search = "";
|
populateList(objects);
|
||||||
var object_list = document.spawner.object_list;
|
|
||||||
var object_list_container = document.getElementById('selector_hs');
|
|
||||||
var object_paths = null /* object types */;
|
|
||||||
var objects = object_paths == null ? new Array() : object_paths.split(";");
|
|
||||||
|
|
||||||
document.spawner.filter.focus();
|
function populateList(from_list) {
|
||||||
populateList(objects);
|
var newOpts = "";
|
||||||
|
var i;
|
||||||
|
for (i in from_list) {
|
||||||
|
newOpts +=
|
||||||
|
'<option value="' +
|
||||||
|
from_list[i] +
|
||||||
|
'">' +
|
||||||
|
from_list[i] +
|
||||||
|
"</option>";
|
||||||
|
}
|
||||||
|
object_list_container.innerHTML =
|
||||||
|
'<select name="object_list" id="object_list" multiple size="20">' +
|
||||||
|
newOpts +
|
||||||
|
"</select>";
|
||||||
|
document.getElementById("number").value = from_list.length;
|
||||||
|
}
|
||||||
|
|
||||||
function populateList(from_list)
|
function updateSearch() {
|
||||||
{
|
if (old_search == document.spawner.filter.value) {
|
||||||
var newOpts = '';
|
return false;
|
||||||
var i;
|
}
|
||||||
for (i in from_list)
|
|
||||||
{
|
|
||||||
newOpts += '<option value="' + from_list[i] + '">'
|
|
||||||
+ from_list[i] + '</option>';
|
|
||||||
}
|
|
||||||
object_list_container.innerHTML = '<select name="object_list" id="object_list" multiple size="20">' +
|
|
||||||
newOpts + '</select>';
|
|
||||||
document.getElementById("number").value = from_list.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateSearch()
|
old_search = document.spawner.filter.value;
|
||||||
{
|
|
||||||
if (old_search == document.spawner.filter.value)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
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]);
|
||||||
|
}
|
||||||
|
|
||||||
var filtered = new Array();
|
populateList(filtered);
|
||||||
var i;
|
|
||||||
for (i in objects)
|
|
||||||
{
|
|
||||||
if(objects[i].search(old_search) < 0)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
filtered.push(objects[i]);
|
if (object_list.options.length)
|
||||||
}
|
object_list.options[0].selected = "true";
|
||||||
|
|
||||||
populateList(filtered);
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (object_list.options.length)
|
function submitFirst(event) {
|
||||||
object_list.options[0].selected = 'true';
|
if (!object_list.options.length) {
|
||||||
|
return false;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
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>
|
|
||||||
|
|
||||||
|
if (event.keyCode == 13 || event.which == 13) {
|
||||||
|
object_list.options[0].selected = "true";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1079,4 +1079,4 @@ export const generateBellyString = (belly: Belly, index: number) => {
|
|||||||
result += '</div></div></div>';
|
result += '</div></div></div>';
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user