mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 10:22:13 +00:00
Removes 'release all' buttons from ORM
This commit is contained in:
committed by
CitadelStationBot
parent
7f6edd82d0
commit
db98a60274
@@ -257,26 +257,23 @@
|
|||||||
if("Release")
|
if("Release")
|
||||||
|
|
||||||
if(check_access(inserted_id) || allowed(usr)) //Check the ID inside, otherwise check the user
|
if(check_access(inserted_id) || allowed(usr)) //Check the ID inside, otherwise check the user
|
||||||
if(params["id"] == "all")
|
var/mat_id = params["id"]
|
||||||
materials.retrieve_all(get_step(src, output_dir))
|
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
|
else
|
||||||
var/mat_id = params["id"]
|
desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num
|
||||||
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)
|
var/sheets_to_remove = round(min(desired,50,stored_amount))
|
||||||
return
|
materials.retrieve_sheets(sheets_to_remove, mat_id, get_step(src, output_dir))
|
||||||
|
|
||||||
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))
|
|
||||||
|
|
||||||
else
|
else
|
||||||
to_chat(usr, "<span class='warning'>Required access not found.</span>")
|
to_chat(usr, "<span class='warning'>Required access not found.</span>")
|
||||||
|
|||||||
@@ -57,9 +57,6 @@
|
|||||||
<section class="cell">
|
<section class="cell">
|
||||||
</section>
|
</section>
|
||||||
<section class="cell">
|
<section class="cell">
|
||||||
<ui-button class='center mineral' grid action='Release' params='{"id" : "all"}'>
|
|
||||||
Release All
|
|
||||||
</ui-button>
|
|
||||||
</section>
|
</section>
|
||||||
<section class="cell">
|
<section class="cell">
|
||||||
Ore Value
|
Ore Value
|
||||||
@@ -103,9 +100,6 @@
|
|||||||
</ui-button>
|
</ui-button>
|
||||||
</section>
|
</section>
|
||||||
<section class="cell" align='right'>
|
<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>
|
||||||
</section>
|
</section>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
Reference in New Issue
Block a user