mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Ports TGstation view variables + admin proccall guards, and all the baggage that comes with it
This commit is contained in:
@@ -70,13 +70,13 @@
|
||||
if(href_list["set_limit"])
|
||||
var/datum/ship_engine/E = locate(href_list["engine"])
|
||||
var/newlim = input("Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit()) as num
|
||||
var/limit = Clamp(newlim/100, 0, 1)
|
||||
var/limit = CLAMP(newlim/100, 0, 1)
|
||||
if(E)
|
||||
E.set_thrust_limit(limit)
|
||||
|
||||
if(href_list["limit"])
|
||||
var/datum/ship_engine/E = locate(href_list["engine"])
|
||||
var/limit = Clamp(E.get_thrust_limit() + text2num(href_list["limit"]), 0, 1)
|
||||
var/limit = CLAMP(E.get_thrust_limit() + text2num(href_list["limit"]), 0, 1)
|
||||
if(E)
|
||||
E.set_thrust_limit(limit)
|
||||
|
||||
|
||||
@@ -130,9 +130,9 @@
|
||||
R.fields["y"] = linked.y
|
||||
if("new")
|
||||
var/newx = input("Input new entry x coordinate", "Coordinate input", linked.x) as num
|
||||
R.fields["x"] = Clamp(newx, 1, world.maxx)
|
||||
R.fields["x"] = CLAMP(newx, 1, world.maxx)
|
||||
var/newy = input("Input new entry y coordinate", "Coordinate input", linked.y) as num
|
||||
R.fields["y"] = Clamp(newy, 1, world.maxy)
|
||||
R.fields["y"] = CLAMP(newy, 1, world.maxy)
|
||||
known_sectors += R
|
||||
|
||||
if (href_list["remove"])
|
||||
@@ -142,12 +142,12 @@
|
||||
if (href_list["setx"])
|
||||
var/newx = input("Input new destiniation x coordinate", "Coordinate input", dx) as num|null
|
||||
if (newx)
|
||||
dx = Clamp(newx, 1, world.maxx)
|
||||
dx = CLAMP(newx, 1, world.maxx)
|
||||
|
||||
if (href_list["sety"])
|
||||
var/newy = input("Input new destiniation y coordinate", "Coordinate input", dy) as num|null
|
||||
if (newy)
|
||||
dy = Clamp(newy, 1, world.maxy)
|
||||
dy = CLAMP(newy, 1, world.maxy)
|
||||
|
||||
if (href_list["x"] && href_list["y"])
|
||||
dx = text2num(href_list["x"])
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
return res
|
||||
|
||||
/obj/effect/map/ship/proc/adjust_speed(n_x, n_y)
|
||||
speed[1] = Clamp(speed[1] + n_x, -default_delay, default_delay)
|
||||
speed[2] = Clamp(speed[2] + n_y, -default_delay, default_delay)
|
||||
speed[1] = CLAMP(speed[1] + n_x, -default_delay, default_delay)
|
||||
speed[2] = CLAMP(speed[2] + n_y, -default_delay, default_delay)
|
||||
if(is_still())
|
||||
toggle_move_stars(map_z)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user