mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Made items that get unbloodied update their icon during the unbloodying, so you can tell how much you used your gun between getting blood on it and cleaning it.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@791 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -644,7 +644,6 @@
|
|||||||
user << "\blue You inject 5 units of the solution. The syringe now contains [src.reagents.total_volume] units."
|
user << "\blue You inject 5 units of the solution. The syringe now contains [src.reagents.total_volume] units."
|
||||||
return
|
return
|
||||||
|
|
||||||
proc
|
|
||||||
update_icon()
|
update_icon()
|
||||||
var/rounded_vol = round(reagents.total_volume,5)
|
var/rounded_vol = round(reagents.total_volume,5)
|
||||||
if(ismob(loc))
|
if(ismob(loc))
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ obj/item/toy/blink
|
|||||||
w_class = 1.0
|
w_class = 1.0
|
||||||
var/amount_left = 7.0
|
var/amount_left = 7.0
|
||||||
|
|
||||||
proc
|
|
||||||
update_icon()
|
update_icon()
|
||||||
src.icon_state = text("357-[]", src.amount_left)
|
src.icon_state = text("357-[]", src.amount_left)
|
||||||
src.desc = text("There are [] caps\s left!", src.amount_left)
|
src.desc = text("There are [] caps\s left!", src.amount_left)
|
||||||
|
|||||||
@@ -163,6 +163,7 @@
|
|||||||
source2.blood_DNA = null
|
source2.blood_DNA = null
|
||||||
// var/icon/I = new /icon(source2.icon_old, source2.icon_state)
|
// var/icon/I = new /icon(source2.icon_old, source2.icon_state)
|
||||||
source2.icon = source2.icon_old
|
source2.icon = source2.icon_old
|
||||||
|
source2.update_icon()
|
||||||
if (istype(src, /turf/simulated))
|
if (istype(src, /turf/simulated))
|
||||||
var/obj/item/source2 = src
|
var/obj/item/source2 = src
|
||||||
source2.blood_DNA = null
|
source2.blood_DNA = null
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ obj/machinery/airlock_sensor
|
|||||||
var/on = 1
|
var/on = 1
|
||||||
var/alert = 0
|
var/alert = 0
|
||||||
|
|
||||||
proc/update_icon()
|
update_icon()
|
||||||
if(on)
|
if(on)
|
||||||
if(alert)
|
if(alert)
|
||||||
icon_state = "airlock_sensor_alert"
|
icon_state = "airlock_sensor_alert"
|
||||||
@@ -170,7 +170,7 @@ obj/machinery/access_button
|
|||||||
|
|
||||||
var/on = 1
|
var/on = 1
|
||||||
|
|
||||||
proc/update_icon()
|
update_icon()
|
||||||
if(on)
|
if(on)
|
||||||
icon_state = "access_button_standby"
|
icon_state = "access_button_standby"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ obj/machinery/air_sensor
|
|||||||
|
|
||||||
var/datum/radio_frequency/radio_connection
|
var/datum/radio_frequency/radio_connection
|
||||||
|
|
||||||
proc/update_icon()
|
update_icon()
|
||||||
icon_state = "gsensor[on]"
|
icon_state = "gsensor[on]"
|
||||||
|
|
||||||
process()
|
process()
|
||||||
|
|||||||
@@ -30,10 +30,11 @@
|
|||||||
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
proc
|
|
||||||
update_icon()
|
update_icon()
|
||||||
return null
|
return null
|
||||||
|
|
||||||
|
proc
|
||||||
|
|
||||||
connect(obj/machinery/atmospherics/portables_connector/new_port)
|
connect(obj/machinery/atmospherics/portables_connector/new_port)
|
||||||
//Make sure not already connected to something else
|
//Make sure not already connected to something else
|
||||||
if(connected_port || !new_port || new_port.connected_device)
|
if(connected_port || !new_port || new_port.connected_device)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ the blender or the processor: Processor items are solid objects and Blender resu
|
|||||||
on_reagent_change() //When the reagents change, change the icon as well.
|
on_reagent_change() //When the reagents change, change the icon as well.
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
proc
|
|
||||||
update_icon() //Changes the icon depending on how full it is and whether it has the jug attached.
|
update_icon() //Changes the icon depending on how full it is and whether it has the jug attached.
|
||||||
if(src.container)
|
if(src.container)
|
||||||
switch(src.reagents.total_volume)
|
switch(src.reagents.total_volume)
|
||||||
|
|||||||
@@ -160,7 +160,7 @@
|
|||||||
// if NOPOWER, display blank
|
// if NOPOWER, display blank
|
||||||
// if BROKEN, display blue screen of death icon AI uses
|
// if BROKEN, display blue screen of death icon AI uses
|
||||||
// if timing=true, run update display function
|
// if timing=true, run update display function
|
||||||
/obj/machinery/door_timer/proc/update_icon()
|
/obj/machinery/door_timer/update_icon()
|
||||||
if(stat & (NOPOWER))
|
if(stat & (NOPOWER))
|
||||||
icon_state = "frame"
|
icon_state = "frame"
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -156,7 +156,7 @@
|
|||||||
s.set_up(2, 1, src)
|
s.set_up(2, 1, src)
|
||||||
s.start()
|
s.start()
|
||||||
|
|
||||||
/obj/machinery/door/proc/update_icon()
|
/obj/machinery/door/update_icon()
|
||||||
if(density)
|
if(density)
|
||||||
icon_state = "door1"
|
icon_state = "door1"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ obj/machinery/embedded_controller
|
|||||||
user.machine = src
|
user.machine = src
|
||||||
onclose(user, "computer")
|
onclose(user, "computer")
|
||||||
|
|
||||||
proc/update_icon()
|
update_icon()
|
||||||
proc/return_text()
|
proc/return_text()
|
||||||
|
|
||||||
proc/post_signal(datum/signal/signal, comm_line)
|
proc/post_signal(datum/signal/signal, comm_line)
|
||||||
|
|||||||
@@ -569,7 +569,7 @@ However people seem to like it for some reason.
|
|||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/emitter/proc/update_icon()
|
/obj/machinery/emitter/update_icon()
|
||||||
if (active && !(stat & (NOPOWER|BROKEN)))
|
if (active && !(stat & (NOPOWER|BROKEN)))
|
||||||
icon_state = "Emitter +a"
|
icon_state = "Emitter +a"
|
||||||
else
|
else
|
||||||
@@ -1076,7 +1076,7 @@ However people seem to like it for some reason.
|
|||||||
var/list/obj/machinery/containment_field/fields
|
var/list/obj/machinery/containment_field/fields
|
||||||
////FIELD GEN START
|
////FIELD GEN START
|
||||||
|
|
||||||
/obj/machinery/field_generator/proc/update_icon()
|
/obj/machinery/field_generator/update_icon()
|
||||||
if (!active)
|
if (!active)
|
||||||
icon_state = "Field_Gen"
|
icon_state = "Field_Gen"
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
proc/update_icon()
|
update_icon()
|
||||||
if(open)
|
if(open)
|
||||||
icon_state = "sheater-open"
|
icon_state = "sheater-open"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -100,7 +100,6 @@
|
|||||||
|
|
||||||
process()
|
process()
|
||||||
|
|
||||||
proc
|
|
||||||
update_icon()
|
update_icon()
|
||||||
src.overlays = new/list()
|
src.overlays = new/list()
|
||||||
src.underlays = new/list()
|
src.underlays = new/list()
|
||||||
@@ -133,6 +132,8 @@
|
|||||||
//device_overlay.icon = src.icon
|
//device_overlay.icon = src.icon
|
||||||
//device_overlay.icon_state = device_icon
|
//device_overlay.icon_state = device_icon
|
||||||
src.overlays += K
|
src.overlays += K
|
||||||
|
proc
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Exadv1: I know this isn't how it's going to work, but this was just to check
|
Exadv1: I know this isn't how it's going to work, but this was just to check
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
playsound(src.loc, 'Glasshit.ogg', 75, 1)
|
playsound(src.loc, 'Glasshit.ogg', 75, 1)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/displaycase/proc/update_icon()
|
/obj/displaycase/update_icon()
|
||||||
if(src.destroyed)
|
if(src.destroyed)
|
||||||
src.icon_state = "glassboxb[src.occupied]"
|
src.icon_state = "glassboxb[src.occupied]"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -5,9 +5,6 @@ ZIPPO
|
|||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
/obj/item/weapon/cigpacket/proc/update_icon()
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/weapon/cigpacket/update_icon()
|
/obj/item/weapon/cigpacket/update_icon()
|
||||||
src.icon_state = text("cigpacket[]", src.cigcount)
|
src.icon_state = text("cigpacket[]", src.cigcount)
|
||||||
src.desc = text("There are [] cigs\s left!", src.cigcount)
|
src.desc = text("There are [] cigs\s left!", src.cigcount)
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ TELEPORT GUN
|
|||||||
// AMMO
|
// AMMO
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/ammo/proc/update_icon()
|
/obj/item/weapon/ammo/update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -541,7 +541,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
|||||||
|
|
||||||
// ENERGY GUN
|
// ENERGY GUN
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/proc/update_icon()
|
/obj/item/weapon/gun/energy/update_icon()
|
||||||
if (istype(src, /obj/item/weapon/gun/energy/crossbow)) return
|
if (istype(src, /obj/item/weapon/gun/energy/crossbow)) return
|
||||||
var/ratio = src.charges / 10
|
var/ratio = src.charges / 10
|
||||||
ratio = round(ratio, 0.25) * 100
|
ratio = round(ratio, 0.25) * 100
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ STUN BATON
|
|||||||
|
|
||||||
// STUN BATON
|
// STUN BATON
|
||||||
|
|
||||||
/obj/item/weapon/baton/proc/update_icon()
|
/obj/item/weapon/baton/update_icon()
|
||||||
if(src.status)
|
if(src.status)
|
||||||
icon_state = "stunbaton_active"
|
icon_state = "stunbaton_active"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
playsound(src.loc, 'Glasshit.ogg', 75, 1)
|
playsound(src.loc, 'Glasshit.ogg', 75, 1)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/lamarr/proc/update_icon()
|
/obj/lamarr/update_icon()
|
||||||
if(src.destroyed)
|
if(src.destroyed)
|
||||||
src.icon_state = "labcageb[src.occupied]"
|
src.icon_state = "labcageb[src.occupied]"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
src.attack_hand(M)
|
src.attack_hand(M)
|
||||||
AutoUpdateAI(src)
|
AutoUpdateAI(src)
|
||||||
|
|
||||||
|
/obj/proc/update_icon()
|
||||||
|
return
|
||||||
|
|
||||||
/obj/item/proc/updateSelfDialog()
|
/obj/item/proc/updateSelfDialog()
|
||||||
var/mob/M = src.loc
|
var/mob/M = src.loc
|
||||||
|
|||||||
Reference in New Issue
Block a user