Merge pull request #11259 from Ghommie/Ghommie-cit590

Porting update_icon improvements.
This commit is contained in:
kevinz000
2020-02-28 04:30:12 -07:00
committed by GitHub
122 changed files with 738 additions and 727 deletions

View File

@@ -35,7 +35,7 @@
return FALSE
return TRUE
/obj/machinery/ntnet_relay/update_icon()
/obj/machinery/ntnet_relay/update_icon_state()
if(is_operational())
icon_state = "bus"
else

View File

@@ -178,23 +178,22 @@
else
return NUKE_OFF_UNLOCKED
/obj/machinery/nuclearbomb/update_icon()
if(deconstruction_state == NUKESTATE_INTACT)
switch(get_nuke_state())
if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED)
icon_state = "nuclearbomb_base"
update_icon_interior()
update_icon_lights()
if(NUKE_ON_TIMING)
cut_overlays()
icon_state = "nuclearbomb_timing"
if(NUKE_ON_EXPLODING)
cut_overlays()
icon_state = "nuclearbomb_exploding"
else
/obj/machinery/nuclearbomb/update_icon_state()
if(deconstruction_state != NUKESTATE_INTACT)
icon_state = "nuclearbomb_base"
update_icon_interior()
update_icon_lights()
return
switch(get_nuke_state())
if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED)
icon_state = "nuclearbomb_base"
if(NUKE_ON_TIMING)
icon_state = "nuclearbomb_timing"
if(NUKE_ON_EXPLODING)
icon_state = "nuclearbomb_exploding"
/obj/machinery/nuclearbomb/update_overlays()
. = ..()
update_icon_interior()
update_icon_lights()
/obj/machinery/nuclearbomb/proc/update_icon_interior()
cut_overlay(interior)

View File

@@ -54,7 +54,6 @@ GLOBAL_LIST_EMPTY(allCasters)
return ..()
/obj/machinery/newscaster/update_icon()
cut_overlays()
if(stat & (NOPOWER|BROKEN))
icon_state = "newscaster_off"
else
@@ -62,19 +61,23 @@ GLOBAL_LIST_EMPTY(allCasters)
icon_state = "newscaster_wanted"
else
icon_state = "newscaster_normal"
if(alert)
add_overlay("newscaster_alert")
/obj/machinery/newscaster/update_overlays()
. = ..()
if(!(stat & (NOPOWER|BROKEN)) && !GLOB.news_network.wanted_issue.active && alert)
. += "newscaster_alert"
var/hp_percent = obj_integrity * 100 /max_integrity
switch(hp_percent)
if(75 to 100)
return
if(50 to 75)
add_overlay("crack1")
. += "crack1"
if(25 to 50)
add_overlay("crack2")
. += "crack2"
else
add_overlay("crack3")
. += "crack3"
/obj/machinery/newscaster/power_change()
if(stat & BROKEN)

View File

@@ -21,6 +21,9 @@
handedness = prob(50)
icon_state = "cursehand[handedness]"
/obj/item/projectile/curse_hand/update_icon_state()
icon_state = "[initial(icon_state)][handedness]"
/obj/item/projectile/curse_hand/fire(setAngle)
if(starting)
arm = starting.Beam(src, icon_state = "curse[handedness]", time = INFINITY, maxdistance = INFINITY, beam_type=/obj/effect/ebeam/curse_arm)
@@ -40,7 +43,8 @@
if(CHECK_BITFIELD(movement_type, UNSTOPPABLE))
playsound(src, 'sound/effects/curse3.ogg', 25, 1, -1)
var/turf/T = get_step(src, dir)
new/obj/effect/temp_visual/dir_setting/curse/hand(T, dir, handedness)
var/obj/effect/temp_visual/dir_setting/curse/hand/leftover = new(T, dir)
leftover.icon_state = icon_state
for(var/obj/effect/temp_visual/dir_setting/curse/grasp_portal/G in starting)
qdel(G)
new /obj/effect/temp_visual/dir_setting/curse/grasp_portal/fading(starting, dir)