mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-20 10:37:17 +01:00
Merge pull request #16569 from S34NW/tg_object_sprites
[REQUIRES #16571] TG sprite project: item/obj (part 1)
This commit is contained in:
@@ -10,6 +10,7 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "fax"
|
||||
insert_anim = "faxsend"
|
||||
var/receive_anim = "faxsend"
|
||||
pass_flags = PASSTABLE
|
||||
var/fax_network = "Local Fax Network"
|
||||
/// If true, prevents fax machine from sending messages to NT machines
|
||||
@@ -51,11 +52,17 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/longrange
|
||||
name = "long range fax machine"
|
||||
icon_state = "longfax"
|
||||
insert_anim = "longfaxsend"
|
||||
receive_anim = "longfaxreceive"
|
||||
fax_network = "Central Command Quantum Entanglement Network"
|
||||
long_range_enabled = TRUE
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/longrange/syndie
|
||||
name = "syndicate long range fax machine"
|
||||
icon_state = "fax"
|
||||
insert_anim = "faxsend"
|
||||
receive_anim = "faxsend"
|
||||
emagged = TRUE
|
||||
syndie_restricted = TRUE
|
||||
req_one_access = list(ACCESS_SYNDICATE)
|
||||
@@ -293,7 +300,7 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
if(department == "Unknown")
|
||||
return FALSE //You can't send faxes to "Unknown"
|
||||
|
||||
flick("faxreceive", src)
|
||||
flick(receive_anim, src)
|
||||
|
||||
playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1)
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
var/recharge_counter = 0
|
||||
var/hackedcheck = FALSE
|
||||
var/obj/item/reagent_containers/beaker = null
|
||||
var/image/icon_beaker = null //cached overlay
|
||||
var/list/dispensable_reagents = list("hydrogen", "lithium", "carbon", "nitrogen", "oxygen", "fluorine",
|
||||
"sodium", "aluminum", "silicon", "phosphorus", "sulfur", "chlorine", "potassium", "iron",
|
||||
"copper", "mercury", "plasma", "radium", "water", "ethanol", "sugar", "iodine", "bromine", "silver", "chromium")
|
||||
@@ -130,6 +129,15 @@
|
||||
else
|
||||
stat |= NOPOWER
|
||||
|
||||
/obj/machinery/chem_dispenser/update_icon()
|
||||
if(panel_open)
|
||||
icon_state = "[initial(icon_state)]-o"
|
||||
return
|
||||
if(!powered() && !is_drink)
|
||||
icon_state = "dispenser_nopower"
|
||||
return
|
||||
icon_state = "[initial(icon_state)][beaker ? "_working" : ""]"
|
||||
|
||||
/obj/machinery/chem_dispenser/ex_act(severity)
|
||||
if(severity < 3)
|
||||
if(beaker)
|
||||
@@ -140,7 +148,6 @@
|
||||
..()
|
||||
if(A == beaker)
|
||||
beaker = null
|
||||
overlays.Cut()
|
||||
|
||||
/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
@@ -204,11 +211,6 @@
|
||||
atom_say("Not enough energy to complete operation!")
|
||||
return
|
||||
R.add_reagent(params["reagent"], actual)
|
||||
overlays.Cut()
|
||||
if(!icon_beaker)
|
||||
icon_beaker = mutable_appearance('icons/obj/chemical.dmi', "disp_beaker") //randomize beaker overlay position.
|
||||
icon_beaker.pixel_x = rand(-10, 5)
|
||||
overlays += icon_beaker
|
||||
if("remove")
|
||||
var/amount = text2num(params["amount"])
|
||||
if(!beaker || !amount)
|
||||
@@ -226,7 +228,7 @@
|
||||
if(Adjacent(usr) && !issilicon(usr))
|
||||
usr.put_in_hands(beaker)
|
||||
beaker = null
|
||||
overlays.Cut()
|
||||
update_icon()
|
||||
else
|
||||
return FALSE
|
||||
|
||||
@@ -255,10 +257,7 @@
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You set [I] on the machine.</span>")
|
||||
SStgui.update_uis(src) // update all UIs attached to src
|
||||
if(!icon_beaker)
|
||||
icon_beaker = mutable_appearance('icons/obj/chemical.dmi', "disp_beaker") //randomize beaker overlay position.
|
||||
icon_beaker.pixel_x = rand(-10, 5)
|
||||
overlays += icon_beaker
|
||||
update_icon()
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
underlays += filling
|
||||
|
||||
if(!is_open_container())
|
||||
var/image/lid = image(icon, src, "lid_bottle")
|
||||
var/image/lid = image(icon, src, "lid_[icon_state]")
|
||||
overlays += lid
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/decompile_act(obj/item/matter_decompiler/C, mob/user)
|
||||
|
||||
Reference in New Issue
Block a user