mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01: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:
@@ -100,39 +100,40 @@
|
||||
|
||||
process()
|
||||
|
||||
update_icon()
|
||||
src.overlays = new/list()
|
||||
src.underlays = new/list()
|
||||
if(!tank_one && !tank_two && !attached_device)
|
||||
icon_state = "valve_1"
|
||||
return
|
||||
icon_state = "valve"
|
||||
var/tank_one_icon = ""
|
||||
var/tank_two_icon = ""
|
||||
if(tank_one)
|
||||
tank_one_icon = tank_one.icon_state
|
||||
if(tank_two)
|
||||
tank_two_icon = tank_two.icon_state
|
||||
if(tank_one)
|
||||
var/icon/I = new(src.icon, icon_state = "[tank_one_icon]")
|
||||
//var/obj/overlay/tank_one_overlay = new
|
||||
//tank_one_overlay.icon = src.icon
|
||||
//tank_one_overlay.icon_state = tank_one_icon
|
||||
src.underlays += I
|
||||
if(tank_two)
|
||||
var/icon/J = new(src.icon, icon_state = "[tank_two_icon]")
|
||||
//I.Flip(EAST) this breaks the perspective!
|
||||
J.Shift(WEST, 13)
|
||||
//var/obj/underlay/tank_two_overlay = new
|
||||
//tank_two_overlay.icon = I
|
||||
src.underlays += J
|
||||
if(attached_device)
|
||||
var/icon/K = new(src.icon, icon_state = "device")
|
||||
//var/obj/overlay/device_overlay = new
|
||||
//device_overlay.icon = src.icon
|
||||
//device_overlay.icon_state = device_icon
|
||||
src.overlays += K
|
||||
proc
|
||||
update_icon()
|
||||
src.overlays = new/list()
|
||||
src.underlays = new/list()
|
||||
if(!tank_one && !tank_two && !attached_device)
|
||||
icon_state = "valve_1"
|
||||
return
|
||||
icon_state = "valve"
|
||||
var/tank_one_icon = ""
|
||||
var/tank_two_icon = ""
|
||||
if(tank_one)
|
||||
tank_one_icon = tank_one.icon_state
|
||||
if(tank_two)
|
||||
tank_two_icon = tank_two.icon_state
|
||||
if(tank_one)
|
||||
var/icon/I = new(src.icon, icon_state = "[tank_one_icon]")
|
||||
//var/obj/overlay/tank_one_overlay = new
|
||||
//tank_one_overlay.icon = src.icon
|
||||
//tank_one_overlay.icon_state = tank_one_icon
|
||||
src.underlays += I
|
||||
if(tank_two)
|
||||
var/icon/J = new(src.icon, icon_state = "[tank_two_icon]")
|
||||
//I.Flip(EAST) this breaks the perspective!
|
||||
J.Shift(WEST, 13)
|
||||
//var/obj/underlay/tank_two_overlay = new
|
||||
//tank_two_overlay.icon = I
|
||||
src.underlays += J
|
||||
if(attached_device)
|
||||
var/icon/K = new(src.icon, icon_state = "device")
|
||||
//var/obj/overlay/device_overlay = new
|
||||
//device_overlay.icon = src.icon
|
||||
//device_overlay.icon_state = device_icon
|
||||
src.overlays += K
|
||||
|
||||
|
||||
/*
|
||||
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)
|
||||
return
|
||||
|
||||
/obj/displaycase/proc/update_icon()
|
||||
/obj/displaycase/update_icon()
|
||||
if(src.destroyed)
|
||||
src.icon_state = "glassboxb[src.occupied]"
|
||||
else
|
||||
|
||||
@@ -5,9 +5,6 @@ ZIPPO
|
||||
|
||||
|
||||
*/
|
||||
/obj/item/weapon/cigpacket/proc/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/cigpacket/update_icon()
|
||||
src.icon_state = text("cigpacket[]", src.cigcount)
|
||||
src.desc = text("There are [] cigs\s left!", src.cigcount)
|
||||
|
||||
@@ -96,7 +96,7 @@ TELEPORT GUN
|
||||
// AMMO
|
||||
|
||||
|
||||
/obj/item/weapon/ammo/proc/update_icon()
|
||||
/obj/item/weapon/ammo/update_icon()
|
||||
return
|
||||
|
||||
|
||||
@@ -541,7 +541,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
|
||||
|
||||
// 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
|
||||
var/ratio = src.charges / 10
|
||||
ratio = round(ratio, 0.25) * 100
|
||||
|
||||
@@ -69,7 +69,7 @@ STUN BATON
|
||||
|
||||
// STUN BATON
|
||||
|
||||
/obj/item/weapon/baton/proc/update_icon()
|
||||
/obj/item/weapon/baton/update_icon()
|
||||
if(src.status)
|
||||
icon_state = "stunbaton_active"
|
||||
else
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
playsound(src.loc, 'Glasshit.ogg', 75, 1)
|
||||
return
|
||||
|
||||
/obj/lamarr/proc/update_icon()
|
||||
/obj/lamarr/update_icon()
|
||||
if(src.destroyed)
|
||||
src.icon_state = "labcageb[src.occupied]"
|
||||
else
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
src.attack_hand(M)
|
||||
AutoUpdateAI(src)
|
||||
|
||||
/obj/proc/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/proc/updateSelfDialog()
|
||||
var/mob/M = src.loc
|
||||
|
||||
Reference in New Issue
Block a user