Turf visuals fix plus corrected names of a couple things.
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
#define COMSIG_ELEMENT_DETACH "element_detach"
|
||||
|
||||
/// sent to the component itself when unregistered from a parent
|
||||
#define COMSIG_COMPONENT_UNREGISTER_PARENT "component_unregister_parent"
|
||||
#define COMSIG_COMPONENT_UNREGISTER_PARENT "component_unregister_parent"
|
||||
/// sent to the component itself when registered to a parent
|
||||
#define COMSIG_COMPONENT_REGISTER_PARENT "component_register_parent"
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
// /atom signals
|
||||
//from base of atom/proc/Initialize(): sent any time a new atom is created
|
||||
#define COMSIG_ATOM_CREATED "atom_created"
|
||||
//from SSatoms InitAtom - Only if the atom was not deleted or failed initialization
|
||||
#define COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE "atom_init_success"
|
||||
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params)
|
||||
#define COMPONENT_NO_AFTERATTACK 1 //Return this in response if you don't want afterattack to be called
|
||||
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" //from base of atom/attack_hulk(): (/mob/living/carbon/human)
|
||||
|
||||
@@ -90,6 +90,8 @@ SUBSYSTEM_DEF(atoms)
|
||||
qdeleted = TRUE
|
||||
else if(!(A.flags_1 & INITIALIZED_1))
|
||||
BadInitializeCalls[the_type] |= BAD_INIT_DIDNT_INIT
|
||||
else
|
||||
SEND_SIGNAL(A,COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE)
|
||||
|
||||
return qdeleted || QDELING(A)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -46,4 +46,5 @@
|
||||
var/turf/T = loc
|
||||
if(!istype(T)) //you know this will happen somehow
|
||||
CRASH("Turf decal initialized in an object/nullspace")
|
||||
T.AddElement(/datum/element/decal, icon, icon_state, dir, CLEAN_GOD, color, null, null, alpha)
|
||||
var/turn_dir = 180 - dir2angle(T.dir) //Turning a dir by 0 results in a roulette of random dirs.
|
||||
T.AddElement(/datum/element/decal, icon, icon_state, turn_dir ? turn(dir, turn_dir) : dir, CLEAN_GOD, color, null, null, alpha)
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
cost = 300
|
||||
contains = list(/obj/item/storage/toolbox/mechanical)
|
||||
|
||||
/datum/supply_pack/goody/electrical_toolbox // mostly just to water down coupon probability
|
||||
name = "Mechanical Toolbox"
|
||||
/datum/supply_pack/goody/electrical_toolbox
|
||||
name = "Electrical Toolbox"
|
||||
desc = "A fully stocked electrical toolbox, for when you're too lazy to just print them out."
|
||||
cost = 300
|
||||
contains = list(/obj/item/storage/toolbox/electrical)
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
mutantrace_variation = STYLE_DIGITIGRADE|STYLE_NO_ANTHRO_ICON|USE_TAUR_CLIP_MASK
|
||||
|
||||
/obj/item/clothing/under/costume/christmas/croptop/green
|
||||
name = "green feminine christmas suit"
|
||||
name = "green croptop christmas suit"
|
||||
desc = "A simple green christmas suit. Smells minty!"
|
||||
icon_state = "christmasfemaleg"
|
||||
item_state = "christmasfemaleg"
|
||||
|
||||
Reference in New Issue
Block a user