mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
fixed autolathe perma-freeze bug, also fixed some icon states.
Signed-off-by: CaelAislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -81,13 +81,13 @@
|
|||||||
stack.use(amount)
|
stack.use(amount)
|
||||||
else
|
else
|
||||||
usr.before_take_item(O)
|
usr.before_take_item(O)
|
||||||
|
flick("autolathe_o",src)//plays metal insertion animation
|
||||||
O.loc = src
|
O.loc = src
|
||||||
icon_state = "autolathe"
|
icon_state = "autolathe"
|
||||||
busy = 1
|
busy = 1
|
||||||
use_power(max(1000, (m_amt+g_amt)*amount/10))
|
use_power(max(1000, (m_amt+g_amt)*amount/10))
|
||||||
spawn(16)
|
spawn(16)
|
||||||
icon_state = "autolathe"
|
icon_state = "autolathe"
|
||||||
flick("autolathe_o",src)
|
|
||||||
src.m_amount += m_amt * amount
|
src.m_amount += m_amt * amount
|
||||||
src.g_amount += g_amt * amount
|
src.g_amount += g_amt * amount
|
||||||
if (O && O.loc == src)
|
if (O && O.loc == src)
|
||||||
@@ -185,12 +185,13 @@
|
|||||||
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
|
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
|
||||||
if (!busy)
|
if (!busy)
|
||||||
if(href_list["make"])
|
if(href_list["make"])
|
||||||
while(outputAmount > 0)
|
|
||||||
var/turf/T = src.loc
|
var/turf/T = src.loc
|
||||||
var/obj/template = locate(href_list["make"])
|
var/obj/template = locate(href_list["make"])
|
||||||
var/multiplier = text2num(href_list["multiplier"])
|
var/multiplier = text2num(href_list["multiplier"])
|
||||||
if (!multiplier) multiplier = 1
|
if (!multiplier) multiplier = 1
|
||||||
var/power = max(2000, (template.m_amt+template.g_amt)*multiplier/5)
|
var/power = max(2000, (template.m_amt+template.g_amt)*multiplier/5)
|
||||||
|
restart:
|
||||||
|
if(outputAmount > 0)
|
||||||
if( (src.m_amount >= template.m_amt*multiplier) && (src.g_amount >= template.g_amt*multiplier) )
|
if( (src.m_amount >= template.m_amt*multiplier) && (src.g_amount >= template.g_amt*multiplier) )
|
||||||
use_power(power)
|
use_power(power)
|
||||||
icon_state = "autolathe"
|
icon_state = "autolathe"
|
||||||
@@ -224,9 +225,12 @@
|
|||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
outputAmount -= 1
|
outputAmount -= 1
|
||||||
busy = 0
|
busy = 0
|
||||||
|
goto restart
|
||||||
|
else
|
||||||
|
for(var/mob/M in view(3,src))
|
||||||
|
M << "\red\icon[src] has run out of materials."
|
||||||
else
|
else
|
||||||
outputAmount = 1
|
outputAmount = 1
|
||||||
break
|
|
||||||
if(href_list["act"])
|
if(href_list["act"])
|
||||||
var/temp_wire = href_list["wire"]
|
var/temp_wire = href_list["wire"]
|
||||||
if(href_list["act"] == "pulse")
|
if(href_list["act"] == "pulse")
|
||||||
|
|||||||
Reference in New Issue
Block a user