Merge pull request #13359 from Ghommie/Ghommie-cit838

Turf visuals fix plus corrected names of a couple things.
This commit is contained in:
silicons
2020-09-07 13:42:05 -07:00
committed by GitHub
7 changed files with 23 additions and 9 deletions
+3 -2
View File
@@ -45,8 +45,9 @@
/datum/fantasy_affix/tactical/apply(datum/component/fantasy/comp, newName)
var/obj/item/master = comp.parent
master.AddElement(/datum/element/tactical)
comp.appliedElements += list(/datum/element/tactical)
var/list/dat = list(/datum/element/tactical)
master._AddElement(dat)
comp.appliedElements += list(dat)
return "tactical [newName]"
/datum/fantasy_affix/pyromantic
+11 -3
View File
@@ -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