mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +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(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>")
|
||||
|
||||
@@ -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}}
|
||||
|
||||
Reference in New Issue
Block a user