Ports elements: Lightweight shared/global components.

This commit is contained in:
Ghommie
2019-11-28 01:47:20 +01:00
parent 8cec8fa506
commit dd9116ee70
14 changed files with 110 additions and 37 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
/obj/item/clothing/ears/earmuffs/ComponentInitialize()
. = ..()
AddComponent(/datum/component/earhealing)
AddElement(/datum/element/earhealing)
AddComponent(/datum/component/wearertargeting/earprotection, list(SLOT_EARS))
/obj/item/clothing/ears/headphones
@@ -1098,9 +1098,9 @@
status_flags &= ~CANPUSH
if(module.clean_on_move)
AddComponent(/datum/component/cleaning)
AddElement(/datum/element/cleaning)
else
qdel(GetComponent(/datum/component/cleaning))
RemoveElement(/datum/element/cleaning)
hat_offset = module.hat_offset
@@ -168,6 +168,7 @@
/mob/living/simple_animal/hostile/alien/maid/Initialize(mapload)
. = ..()
AddElement(/datum/element/cleaning)
/mob/living/simple_animal/hostile/alien/maid/AttackingTarget()
if(ismovableatom(target))
+2 -2
View File
@@ -14,7 +14,7 @@
D.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 4), TEXT_SOUTH = list(0, 7), TEXT_EAST = list(-12, 7), TEXT_WEST = list( 12, 7)))
if(floorbuffer)
AddComponent(/datum/component/cleaning)
AddElement(/datum/element/cleaning)
/obj/vehicle/ridden/janicart/Destroy()
if(mybag)
@@ -50,7 +50,7 @@
floorbuffer = TRUE
qdel(I)
to_chat(user, "<span class='notice'>You upgrade [src] with the floor buffer.</span>")
AddComponent(/datum/component/cleaning)
AddElement(/datum/element/cleaning)
update_icon()
else
return ..()