mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Makes it harder for Servants to accidentally fuck up
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
/obj/item/clockwork/alloy_shards/medium = 2, \
|
||||
/obj/item/clockwork/alloy_shards/small = 3) //Parts left behind when a structure breaks
|
||||
var/construction_value = 0 //How much value the structure contributes to the overall "power" of the structures on the station
|
||||
var/immune_to_servant_attacks = FALSE //if we ignore attacks from servants of ratvar instead of taking damage
|
||||
|
||||
/obj/structure/destructible/clockwork/New()
|
||||
..()
|
||||
@@ -58,9 +59,24 @@
|
||||
return "<span class='[heavily_damaged ? "alloy":"brass"]'>[t_It] [t_is] at <b>[obj_integrity]/[max_integrity]</b> integrity[heavily_damaged ? "!":"."]</span>"
|
||||
return ..()
|
||||
|
||||
/obj/structure/destructible/clockwork/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
|
||||
if(is_servant_of_ratvar(user) && immune_to_servant_attacks)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/structure/destructible/clockwork/hulk_damage()
|
||||
return 20
|
||||
|
||||
/obj/structure/destructible/clockwork/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
if(is_servant_of_ratvar(user) && immune_to_servant_attacks)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/structure/destructible/clockwork/mech_melee_attack(obj/mecha/M)
|
||||
if(M.occupant && is_servant_of_ratvar(M.occupant) && immune_to_servant_attacks)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/structure/destructible/clockwork/proc/get_efficiency_mod(increasing)
|
||||
if(ratvar_awakens)
|
||||
if(increasing)
|
||||
@@ -96,6 +112,11 @@
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/obj/structure/destructible/clockwork/attacked_by(obj/item/I, mob/living/user)
|
||||
if(is_servant_of_ratvar(user) && immune_to_servant_attacks)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/structure/destructible/clockwork/proc/update_anchored(mob/user, do_damage)
|
||||
if(anchored)
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF | INDESTRUCTIBLE
|
||||
can_be_repaired = FALSE
|
||||
immune_to_servant_attacks = TRUE
|
||||
var/progress_in_seconds = 0 //Once this reaches GATEWAY_RATVAR_ARRIVAL, it's game over
|
||||
var/purpose_fulfilled = FALSE
|
||||
var/first_sound_played = FALSE
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
clockwork_desc = "A binding ring around a target, preventing them from taking action while they're being converted."
|
||||
max_integrity = 25
|
||||
obj_integrity = 25
|
||||
density = 0
|
||||
density = FALSE
|
||||
immune_to_servant_attacks = TRUE
|
||||
icon = 'icons/effects/clockwork_effects.dmi'
|
||||
icon_state = "geisbinding_full"
|
||||
break_message = null
|
||||
|
||||
@@ -92,11 +92,11 @@
|
||||
/obj/proc/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) //used by attack_alien, attack_animal, and attack_slime
|
||||
user.do_attack_animation(src)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
take_damage(damage_amount, damage_type, damage_flag, sound_effect, get_dir(src, user))
|
||||
return take_damage(damage_amount, damage_type, damage_flag, sound_effect, get_dir(src, user))
|
||||
|
||||
/obj/attack_alien(mob/living/carbon/alien/humanoid/user)
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
|
||||
attack_generic(user, 60, BRUTE, "melee", 0)
|
||||
if(attack_generic(user, 60, BRUTE, "melee", 0))
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
|
||||
|
||||
/obj/attack_animal(mob/living/simple_animal/M)
|
||||
if(!M.melee_damage_upper && !M.obj_damage)
|
||||
@@ -106,12 +106,12 @@
|
||||
var/play_soundeffect = 1
|
||||
if(M.environment_smash)
|
||||
play_soundeffect = 0
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
if(M.obj_damage)
|
||||
attack_generic(M, M.obj_damage, M.melee_damage_type, "melee", play_soundeffect)
|
||||
. = attack_generic(M, M.obj_damage, M.melee_damage_type, "melee", play_soundeffect)
|
||||
else
|
||||
attack_generic(M, rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type, "melee", play_soundeffect)
|
||||
return 1
|
||||
. = attack_generic(M, rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type, "melee", play_soundeffect)
|
||||
if(. && !play_soundeffect)
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
|
||||
/obj/attack_slime(mob/living/simple_animal/slime/user)
|
||||
if(!user.is_adult)
|
||||
|
||||
Reference in New Issue
Block a user