mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
autolathe fixes
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
/obj/machinery/autolathe
|
/obj/machinery/autolathe
|
||||||
name = "autolathe"
|
name = "autolathe"
|
||||||
desc = "It produces items using metal and glass."
|
desc = "It produces items using metal and glass."
|
||||||
icon = 'icons/obj/stationobjs_vr.dmi'
|
|
||||||
icon_state = "autolathe"
|
icon_state = "autolathe"
|
||||||
density = 1
|
density = 1
|
||||||
anchored = 1
|
anchored = 1
|
||||||
@@ -47,13 +46,11 @@
|
|||||||
|
|
||||||
/obj/machinery/autolathe/New()
|
/obj/machinery/autolathe/New()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
/obj/machinery/autolathe/Initialize()
|
||||||
|
. = ..()
|
||||||
wires = new(src)
|
wires = new(src)
|
||||||
component_parts = list()
|
default_apply_parts()
|
||||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
|
||||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
|
||||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
|
||||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
|
||||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
|
||||||
RefreshParts()
|
RefreshParts()
|
||||||
files = new /datum/research/autolathe(src)
|
files = new /datum/research/autolathe(src)
|
||||||
matching_designs = list()
|
matching_designs = list()
|
||||||
@@ -181,7 +178,9 @@
|
|||||||
to_chat(usr, "<span class='warning'>The autolathe queue is full!</span>")
|
to_chat(usr, "<span class='warning'>The autolathe queue is full!</span>")
|
||||||
if(!busy)
|
if(!busy)
|
||||||
busy = 1
|
busy = 1
|
||||||
|
update_icon()
|
||||||
process_queue()
|
process_queue()
|
||||||
|
update_icon()
|
||||||
busy = 0
|
busy = 0
|
||||||
|
|
||||||
if(href_list["remove_from_queue"])
|
if(href_list["remove_from_queue"])
|
||||||
@@ -213,14 +212,16 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/machinery/autolathe/update_icon()
|
/obj/machinery/autolathe/update_icon()
|
||||||
|
overlays.Cut()
|
||||||
|
|
||||||
|
icon_state = initial(icon_state)
|
||||||
|
|
||||||
if(panel_open)
|
if(panel_open)
|
||||||
icon_state = "autolathe_t"
|
overlays.Add(image(icon, "[icon_state]_panel"))
|
||||||
else if(busy)
|
if(stat & NOPOWER)
|
||||||
icon_state = "autolathe_n"
|
return
|
||||||
else
|
if(busy)
|
||||||
if(icon_state == "autolathe_n")
|
icon_state = "[icon_state]_work"
|
||||||
flick("autolathe_u", src) // If lid WAS closed, show opening animation
|
|
||||||
icon_state = "autolathe"
|
|
||||||
|
|
||||||
/obj/machinery/autolathe/RefreshParts()
|
/obj/machinery/autolathe/RefreshParts()
|
||||||
..()
|
..()
|
||||||
@@ -285,7 +286,7 @@
|
|||||||
being_built = list(D, multiplier)
|
being_built = list(D, multiplier)
|
||||||
use_power(power)
|
use_power(power)
|
||||||
icon_state = "autolathe"
|
icon_state = "autolathe"
|
||||||
flick("autolathe_n",src)
|
flick("[initial(icon_state)]_finish", src)
|
||||||
if(is_stack)
|
if(is_stack)
|
||||||
var/list/materials_used = list(DEFAULT_WALL_MATERIAL=metal_cost*multiplier, "glass"=glass_cost*multiplier)
|
var/list/materials_used = list(DEFAULT_WALL_MATERIAL=metal_cost*multiplier, "glass"=glass_cost*multiplier)
|
||||||
//stored_material = list(DEFAULT_WALL_MATERIAL -= materials_used[DEFAULT_WALL_MATERIAL], "glass" -= materials_used["glass"])
|
//stored_material = list(DEFAULT_WALL_MATERIAL -= materials_used[DEFAULT_WALL_MATERIAL], "glass" -= materials_used["glass"])
|
||||||
@@ -526,7 +527,7 @@
|
|||||||
else
|
else
|
||||||
to_chat(user, "You fill \the [src] with \the [eating].")
|
to_chat(user, "You fill \the [src] with \the [eating].")
|
||||||
|
|
||||||
flick("autolathe_o", src) // Plays metal insertion animation. Work out a good way to work out a fitting animation. ~Z
|
flick("autolathe_loading", src) // Plays metal insertion animation. Work out a good way to work out a fitting animation. ~Z
|
||||||
|
|
||||||
if(istype(eating,/obj/item/stack))
|
if(istype(eating,/obj/item/stack))
|
||||||
var/obj/item/stack/stack = eating
|
var/obj/item/stack/stack = eating
|
||||||
@@ -581,9 +582,9 @@
|
|||||||
|
|
||||||
if(!filltype)
|
if(!filltype)
|
||||||
visible_message("[bicon(src)]<b>\The [src]</b> beeps, \"Storage is full. Operation aborted\"")
|
visible_message("[bicon(src)]<b>\The [src]</b> beeps, \"Storage is full. Operation aborted\"")
|
||||||
return
|
break
|
||||||
|
|
||||||
flick("autolathe_o", src)
|
flick("autolathe_loading", src)
|
||||||
|
|
||||||
if(istype(eating,/obj/item/stack))
|
if(istype(eating,/obj/item/stack))
|
||||||
var/obj/item/stack/stack = eating
|
var/obj/item/stack/stack = eating
|
||||||
|
|||||||
Reference in New Issue
Block a user