Merge pull request #5794 from Citadel-Station-13/upstream-merge-36001

[MIRROR] Removes 'release all' buttons from ORM
This commit is contained in:
deathride58
2018-03-05 02:44:10 +00:00
committed by GitHub
3 changed files with 19 additions and 28 deletions
+15 -18
View File
@@ -257,26 +257,23 @@
if("Release")
if(check_access(inserted_id) || allowed(usr)) //Check the ID inside, otherwise check the user
if(params["id"] == "all")
materials.retrieve_all(get_step(src, output_dir))
var/mat_id = params["id"]
if(!materials.materials[mat_id])
return
var/datum/material/mat = materials.materials[mat_id]
var/stored_amount = mat.amount / MINERAL_MATERIAL_AMOUNT
if(!stored_amount)
return
var/desired = 0
if (params["sheets"])
desired = text2num(params["sheets"])
else
var/mat_id = params["id"]
if(!materials.materials[mat_id])
return
var/datum/material/mat = materials.materials[mat_id]
var/stored_amount = mat.amount / MINERAL_MATERIAL_AMOUNT
desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num
if(!stored_amount)
return
var/desired = 0
if (params["sheets"])
desired = text2num(params["sheets"])
else
desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num
var/sheets_to_remove = round(min(desired,50,stored_amount))
materials.retrieve_sheets(sheets_to_remove, mat_id, get_step(src, output_dir))
var/sheets_to_remove = round(min(desired,50,stored_amount))
materials.retrieve_sheets(sheets_to_remove, mat_id, get_step(src, output_dir))
else
to_chat(usr, "<span class='warning'>Required access not found.</span>")
+4 -4
View File
File diff suppressed because one or more lines are too long
@@ -57,9 +57,6 @@
<section class="cell">
</section>
<section class="cell">
<ui-button class='center mineral' grid action='Release' params='{"id" : "all"}'>
Release All
</ui-button>
</section>
<section class="cell">
Ore Value
@@ -103,9 +100,6 @@
</ui-button>
</section>
<section class="cell" align='right'>
<ui-button class='center' grid action='SmeltAll' state={{ (amount >= 1) ? null : 'disabled'}} params='{ "id" : {{id}} }'>
Smelt All
</ui-button>
</section>
</section>
{{/each}}