Removing priority overlays, update_icon() splitup for guns.
This commit is contained in:
@@ -60,7 +60,8 @@
|
||||
if(target)
|
||||
if(!QDELETED(target))
|
||||
location = get_turf(target)
|
||||
target.cut_overlay(plastic_overlay, TRUE)
|
||||
target.cut_overlay(plastic_overlay)
|
||||
UnregisterSignal(target, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/add_plastic_overlay)
|
||||
if(!ismob(target) || full_damage_on_mobs)
|
||||
target.ex_act(EXPLODE_HEAVY, target)
|
||||
else
|
||||
@@ -126,13 +127,17 @@
|
||||
I.embedding["embed_chance"] = 0
|
||||
I.updateEmbedding()
|
||||
|
||||
target.add_overlay(plastic_overlay, TRUE)
|
||||
RegisterSignal(target, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/add_plastic_overlay)
|
||||
target.update_icon()
|
||||
if(!nadeassembly)
|
||||
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>")
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time*10)
|
||||
else
|
||||
qdel(src) //How?
|
||||
|
||||
/obj/item/grenade/plastic/proc/add_plastic_overlay(atom/source, list/overlay_list)
|
||||
overlay_list += plastic_overlay
|
||||
|
||||
/obj/item/grenade/plastic/proc/shout_syndicate_crap(mob/M)
|
||||
if(!M)
|
||||
return
|
||||
|
||||
@@ -186,7 +186,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
|
||||
if(!acid_level)
|
||||
SSacid.processing[src] = src
|
||||
add_overlay(GLOB.acid_overlay, TRUE)
|
||||
update_icon()
|
||||
var/acid_cap = acidpwr * 300 //so we cannot use huge amounts of weak acids to do as well as strong acids.
|
||||
if(acid_level < acid_cap)
|
||||
acid_level = min(acid_level + acidpwr * acid_volume, acid_cap)
|
||||
@@ -224,7 +224,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
if(!(resistance_flags & ON_FIRE) && (resistance_flags & FLAMMABLE))
|
||||
resistance_flags |= ON_FIRE
|
||||
SSfire_burning.processing[src] = src
|
||||
add_overlay(GLOB.fire_overlay, TRUE)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
//called when the obj is destroyed by fire
|
||||
@@ -236,7 +236,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
/obj/proc/extinguish()
|
||||
if(resistance_flags & ON_FIRE)
|
||||
resistance_flags &= ~ON_FIRE
|
||||
cut_overlay(GLOB.fire_overlay, TRUE)
|
||||
update_icon()
|
||||
SSfire_burning.processing -= src
|
||||
|
||||
/obj/zap_act(power, zap_flags, shocked_targets)
|
||||
|
||||
@@ -317,6 +317,13 @@
|
||||
icon_state = unique_reskin[choice]
|
||||
to_chat(M, "[src] is now skinned as '[choice]'.")
|
||||
|
||||
/obj/update_overlays()
|
||||
. = ..()
|
||||
if(acid_level)
|
||||
. += GLOB.acid_overlay
|
||||
if(resistance_flags & ON_FIRE)
|
||||
. += GLOB.fire_overlay
|
||||
|
||||
//Called when the object is constructed by an autolathe
|
||||
//Has a reference to the autolathe so you can do !!FUN!! things with hacked lathes
|
||||
/obj/proc/autolathe_crafted(obj/machinery/autolathe/A)
|
||||
|
||||
Reference in New Issue
Block a user