mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Moves integrity to the atom level (ported from tgstation/tgstation#61183), and allows turfs to be destroyed in the same way objects can. Many things which destroy walls have been reworked to use the integrity system instead, and walls can now be destroyed through conventional means like hitting them with something strong. They can also be repaired with welding tools while not on harm intent. Reinforced walls are still very strong and require powerful tools or weapons to damage. Also changes some demolition modifiers slightly to fit the new system: emitters have 2.4x, overcharged emitters have 4x, and pulse rifles have 6x. Standard wall - 300 integrity, 20 damage deflection, 60 melee/bullet/laser armor Reinforced wall - 400 integrity, 75 damage deflection, 80 melee/bullet armor, 60 laser armor
48 lines
1.6 KiB
Plaintext
48 lines
1.6 KiB
Plaintext
#define BAD_ART 12.5
|
|
#define GOOD_ART 25
|
|
#define GREAT_ART 50
|
|
|
|
/datum/component/art
|
|
var/impressiveness = 0
|
|
|
|
/datum/component/art/Initialize(impress)
|
|
impressiveness = impress
|
|
if(isobj(parent))
|
|
RegisterSignal(parent, COMSIG_ATOM_EXAMINE, PROC_REF(on_obj_examine))
|
|
else
|
|
RegisterSignal(parent, COMSIG_ATOM_EXAMINE, PROC_REF(on_other_examine))
|
|
if(isstructure(parent))
|
|
RegisterSignal(parent, COMSIG_ATOM_ATTACK_HAND, PROC_REF(on_attack_hand))
|
|
if(isitem(parent))
|
|
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, PROC_REF(apply_moodlet))
|
|
|
|
/datum/component/art/proc/apply_moodlet(mob/M, impress)
|
|
M.visible_message("[M] stops to admire [parent].", \
|
|
span_notice("You take in [parent], admiring the fine craftsmanship."))
|
|
switch(impress)
|
|
if(GREAT_ART to INFINITY)
|
|
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "artgreat", /datum/mood_event/artgreat)
|
|
if (GOOD_ART to GREAT_ART)
|
|
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "artgood", /datum/mood_event/artgood)
|
|
if (BAD_ART to GOOD_ART)
|
|
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "artok", /datum/mood_event/artok)
|
|
if (0 to BAD_ART)
|
|
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "artbad", /datum/mood_event/artbad)
|
|
|
|
/datum/component/art/proc/on_other_examine(datum/source, mob/M)
|
|
apply_moodlet(M, impressiveness)
|
|
|
|
/datum/component/art/proc/on_obj_examine(datum/source, mob/M)
|
|
var/obj/O = parent
|
|
apply_moodlet(M, impressiveness *(O.get_integrity()/O.max_integrity))
|
|
|
|
/datum/component/art/proc/on_attack_hand(datum/source, mob/M)
|
|
to_chat(M, "You start examining [parent].")
|
|
if(!do_after(M, 2 SECONDS, parent))
|
|
return
|
|
on_obj_examine(source, M)
|
|
|
|
#undef BAD_ART
|
|
#undef GOOD_ART
|
|
#undef GREAT_ART
|