Turf visuals fix plus corrected names of a couple things.
This commit is contained in:
@@ -41,19 +41,27 @@
|
||||
var/atom/A = target
|
||||
num_decals_per_atom[A]--
|
||||
if(!num_decals_per_atom[A])
|
||||
UnregisterSignal(A, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_COMPONENT_CLEAN_ACT, COMSIG_PARENT_EXAMINE, COMSIG_ATOM_UPDATE_OVERLAYS))
|
||||
UnregisterSignal(A, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE,
|
||||
COMSIG_COMPONENT_CLEAN_ACT, COMSIG_PARENT_EXAMINE, COMSIG_ATOM_UPDATE_OVERLAYS))
|
||||
LAZYREMOVE(num_decals_per_atom, A)
|
||||
apply(A)
|
||||
return ..()
|
||||
|
||||
/datum/element/decal/proc/apply(atom/target)
|
||||
target.update_icon()
|
||||
if(target.flags_1 & INITIALIZED_1)
|
||||
target.update_icon() //could use some queuing here now maybe.
|
||||
else if(!QDELETED(target) && num_decals_per_atom[target] == 1)
|
||||
RegisterSignal(target, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE, .proc/late_update_icon)
|
||||
if(isitem(target))
|
||||
addtimer(CALLBACK(target, /obj/item/.proc/update_slot_icon), 0, TIMER_UNIQUE)
|
||||
|
||||
/datum/element/decal/proc/late_update_icon(atom/source)
|
||||
source.update_icon()
|
||||
UnregisterSignal(source,COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE)
|
||||
|
||||
/datum/element/decal/proc/apply_overlay(atom/source, list/overlay_list)
|
||||
if(first_dir)
|
||||
pic.dir = turn(first_dir, -dir2angle(source.dir))
|
||||
pic.dir = first_dir == SOUTH ? source.dir : turn(first_dir, dir2angle(source.dir)-180) //Never turn a dir by 0.
|
||||
for(var/i in 1 to num_decals_per_atom[source])
|
||||
overlay_list += pic
|
||||
|
||||
|
||||
Reference in New Issue
Block a user