mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-23 05:06:50 +01:00
Merge pull request #5829 from kevinz000/tg_vv
Ports TGstation view variables + admin proccall guards, and all the baggage that comes with it
This commit is contained in:
@@ -177,21 +177,21 @@
|
||||
|
||||
if(href_list["amount"])
|
||||
var/id = href_list["add"]
|
||||
var/amount = Clamp((text2num(href_list["amount"])), 0, 200)
|
||||
var/amount = CLAMP((text2num(href_list["amount"])), 0, 200)
|
||||
R.trans_id_to(src, id, amount)
|
||||
|
||||
else if (href_list["addcustom"])
|
||||
|
||||
var/id = href_list["addcustom"]
|
||||
useramount = input("Select the amount to transfer.", 30, useramount) as num
|
||||
useramount = Clamp(useramount, 0, 200)
|
||||
useramount = CLAMP(useramount, 0, 200)
|
||||
src.Topic(null, list("amount" = "[useramount]", "add" = "[id]"))
|
||||
|
||||
else if (href_list["remove"])
|
||||
|
||||
if(href_list["amount"])
|
||||
var/id = href_list["remove"]
|
||||
var/amount = Clamp((text2num(href_list["amount"])), 0, 200)
|
||||
var/amount = CLAMP((text2num(href_list["amount"])), 0, 200)
|
||||
if(mode)
|
||||
reagents.trans_id_to(beaker, id, amount)
|
||||
else
|
||||
@@ -202,7 +202,7 @@
|
||||
|
||||
var/id = href_list["removecustom"]
|
||||
useramount = input("Select the amount to transfer.", 30, useramount) as num
|
||||
useramount = Clamp(useramount, 0, 200)
|
||||
useramount = CLAMP(useramount, 0, 200)
|
||||
src.Topic(null, list("amount" = "[useramount]", "remove" = "[id]"))
|
||||
|
||||
else if (href_list["toggle"])
|
||||
@@ -224,7 +224,7 @@
|
||||
count = input("Select the number of pills to make.", "Max [max_pill_count]", pillamount) as null|num
|
||||
if(!count) //Covers 0 and cancel
|
||||
return
|
||||
count = Clamp(count, 1, max_pill_count)
|
||||
count = CLAMP(count, 1, max_pill_count)
|
||||
|
||||
if(reagents.total_volume/count < 1) //Sanity checking.
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user