mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Merge pull request #6207 from phil235/RecursiveHearVisibleMessage
Mob inside something can now see visible_message()'s
This commit is contained in:
@@ -102,7 +102,7 @@ The regular pipe you see everywhere, including bent ones.
|
||||
else return 1
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/proc/burst()
|
||||
src.visible_message("<span class='userdanger'>[src] bursts!</span>");
|
||||
visible_message("<span class='danger'>[src] bursts!</span>");
|
||||
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
|
||||
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new
|
||||
smoke.set_up(1,0, src.loc, 0)
|
||||
|
||||
@@ -200,7 +200,6 @@
|
||||
/obj/machinery/door/window/mech_melee_attack(obj/mecha/M)
|
||||
if(M.damtype == "brute")
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
M.occupant_message("<span class='danger'>You hit [src].</span>")
|
||||
visible_message("<span class='danger'>[M.name] has hit [src].</span>")
|
||||
take_damage(M.force)
|
||||
return
|
||||
|
||||
@@ -26,13 +26,14 @@
|
||||
cargo_holder = null
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp/action(atom/target)
|
||||
if(!action_checks(target)) return
|
||||
if(!cargo_holder) return
|
||||
if(!action_checks(target))
|
||||
return
|
||||
if(!cargo_holder)
|
||||
return
|
||||
if(istype(target,/obj))
|
||||
var/obj/O = target
|
||||
if(!O.anchored)
|
||||
if(cargo_holder.cargo.len < cargo_holder.cargo_capacity)
|
||||
occupant_message("You lift [target] and start to load it into cargo compartment.")
|
||||
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
@@ -46,12 +47,12 @@
|
||||
occupant_message("<span class='notice'>[target] successfully loaded.</span>")
|
||||
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
|
||||
else
|
||||
occupant_message("<span class='danger'>You must hold still while handling objects.</span>")
|
||||
occupant_message("<span class='warning'>You must hold still while handling objects.</span>")
|
||||
O.anchored = initial(O.anchored)
|
||||
else
|
||||
occupant_message("<span class='danger'>Not enough room in cargo compartment.</span>")
|
||||
occupant_message("<span class='warning'>Not enough room in cargo compartment.</span>")
|
||||
else
|
||||
occupant_message("<span class='danger'>[target] is firmly secured.</span>")
|
||||
occupant_message("<span class='warning'>[target] is firmly secured.</span>")
|
||||
|
||||
else if(istype(target,/mob/living))
|
||||
var/mob/living/M = target
|
||||
@@ -62,8 +63,9 @@
|
||||
return
|
||||
M.adjustOxyLoss(round(dam_force/2))
|
||||
M.updatehealth()
|
||||
occupant_message("<span class='danger'>You squeeze [target] with [src.name]. Something cracks.</span>")
|
||||
chassis.visible_message("<span class='danger'>[chassis] squeezes [target].</span>")
|
||||
target.visible_message("<span class='danger'>[chassis] squeezes [target].</span>", \
|
||||
"<span class='userdanger'>[chassis] squeezes [target].</span>",\
|
||||
"You hear something crack")
|
||||
add_logs(chassis.occupant, M, "attacked", object="[name]", addition="(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
|
||||
else
|
||||
step_away(M,chassis)
|
||||
@@ -83,20 +85,28 @@
|
||||
force = 15
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/drill/action(atom/target)
|
||||
if(!action_checks(target)) return
|
||||
if(!action_checks(target))
|
||||
return
|
||||
if(isobj(target))
|
||||
var/obj/target_obj = target
|
||||
if(!target_obj.vars.Find("unacidable") || target_obj.unacidable) return
|
||||
if(target_obj.unacidable)
|
||||
return
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
chassis.visible_message("<span class='userdanger'>[chassis] starts to drill [target]</span>", "You hear the drill.")
|
||||
occupant_message("<span class='userdanger'>You start to drill [target]</span>")
|
||||
target.visible_message("<span class='danger'>[chassis] starts to drill [target]</span>", \
|
||||
"<span class='userdanger'>[chassis] starts to drill [target]</span>", \
|
||||
"You hear drilling.")
|
||||
var/T = chassis.loc
|
||||
var/C = target.loc //why are these backwards? we may never know -Pete
|
||||
if(do_after_cooldown(target))
|
||||
if(T == chassis.loc && src == chassis.selected)
|
||||
if(istype(target, /turf/simulated/wall/r_wall))
|
||||
occupant_message("<span class='danger'>[target] is too durable to drill through.</span>")
|
||||
if(istype(src , /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill))
|
||||
if(do_after_cooldown(target))//To slow down how fast mechs can drill through the station
|
||||
log_message("Drilled through [target]")
|
||||
target.ex_act(3)
|
||||
else
|
||||
occupant_message("<span class='danger'>[target] is too durable to drill through.</span>")
|
||||
else if(istype(target, /turf/simulated/mineral))
|
||||
for(var/turf/simulated/mineral/M in range(chassis,1))
|
||||
if(get_dir(chassis,M)&chassis.dir)
|
||||
@@ -122,7 +132,10 @@
|
||||
else if(target.loc == C)
|
||||
log_message("Drilled through [target]")
|
||||
if(isliving(target))
|
||||
drill_mob(target, chassis.occupant)
|
||||
if(istype(src , /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill))
|
||||
drill_mob(target, chassis.occupant, 120)
|
||||
else
|
||||
drill_mob(target, chassis.occupant)
|
||||
else
|
||||
target.ex_act(2)
|
||||
return 1
|
||||
@@ -156,50 +169,6 @@
|
||||
equip_cooldown = 20
|
||||
force = 15
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill/action(atom/target)
|
||||
if(!action_checks(target)) return
|
||||
if(isobj(target))
|
||||
var/obj/target_obj = target
|
||||
if(target_obj.unacidable) return
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
chassis.visible_message("<span class='userdanger'>[chassis] starts to drill [target]</span>", "You hear the drill.")
|
||||
occupant_message("<span class='danger'>You start to drill [target]</span>")
|
||||
var/T = chassis.loc
|
||||
var/C = target.loc //why are these backwards? we may never know -Pete
|
||||
if(do_after_cooldown(target))
|
||||
if(T == chassis.loc && src == chassis.selected)
|
||||
if(istype(target, /turf/simulated/wall/r_wall))
|
||||
if(do_after_cooldown(target))//To slow down how fast mechs can drill through the station
|
||||
log_message("Drilled through [target]")
|
||||
target.ex_act(3)
|
||||
else if(istype(target, /turf/simulated/mineral))
|
||||
for(var/turf/simulated/mineral/M in range(chassis,1))
|
||||
if(get_dir(chassis,M)&chassis.dir)
|
||||
M.gets_drilled()
|
||||
log_message("Drilled through [target]")
|
||||
if(locate(/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp) in chassis.equipment)
|
||||
var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo
|
||||
if(ore_box)
|
||||
for(var/obj/item/weapon/ore/ore in range(chassis,1))
|
||||
if(get_dir(chassis,ore)&chassis.dir)
|
||||
ore.Move(ore_box)
|
||||
else if(istype(target,/turf/simulated/floor/plating/asteroid))
|
||||
for(var/turf/simulated/floor/plating/asteroid/M in range(target,1))
|
||||
M.gets_dug()
|
||||
log_message("Drilled through [target]")
|
||||
if(locate(/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp) in chassis.equipment)
|
||||
var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo
|
||||
if(ore_box)
|
||||
for(var/obj/item/weapon/ore/ore in range(target,1))
|
||||
ore.Move(ore_box)
|
||||
else if(target.loc == C)
|
||||
log_message("Drilled through [target]")
|
||||
if(isliving(target))
|
||||
drill_mob(target, chassis.occupant, 120)
|
||||
else
|
||||
target.ex_act(2)
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill/can_attach(obj/mecha/M as obj)
|
||||
if(..())
|
||||
@@ -756,7 +725,6 @@
|
||||
if(!action_checks(src))
|
||||
return chassis.dynbulletdamage(Proj)
|
||||
if(prob(chassis.deflect_chance*deflect_coeff))
|
||||
chassis.occupant_message("<span class='notice'>The armor deflects incoming projectile.</span>")
|
||||
chassis.visible_message("The [chassis.name] armor deflects the projectile")
|
||||
chassis.log_append_to_last("Armor saved.")
|
||||
else
|
||||
@@ -772,7 +740,6 @@
|
||||
if(!action_checks(A))
|
||||
return chassis.dynhitby(A)
|
||||
if(prob(chassis.deflect_chance*deflect_coeff) || istype(A, /mob/living) || istype(A, /obj/item/mecha_parts/mecha_tracking))
|
||||
chassis.occupant_message("<span class='notice'>The [A] bounces off the armor.</span>")
|
||||
chassis.visible_message("The [A] bounces off the [chassis] armor")
|
||||
chassis.log_append_to_last("Armor saved.")
|
||||
if(istype(A, /mob/living))
|
||||
@@ -1206,7 +1173,6 @@
|
||||
var/obj/O = target
|
||||
if(!O.anchored)
|
||||
if(cargo_holder.cargo.len < cargo_holder.cargo_capacity)
|
||||
chassis.occupant_message("You lift [target] and start to load it into cargo compartment.")
|
||||
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
@@ -1220,26 +1186,25 @@
|
||||
chassis.occupant_message("<span class='notice'>[target] successfully loaded.</span>")
|
||||
chassis.log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
|
||||
else
|
||||
chassis.occupant_message("<span class='danger'>You must hold still while handling objects.</span>")
|
||||
chassis.occupant_message("<span class='warning'>You must hold still while handling objects.</span>")
|
||||
O.anchored = initial(O.anchored)
|
||||
else
|
||||
chassis.occupant_message("<span class='danger'>Not enough room in cargo compartment.</span>")
|
||||
chassis.occupant_message("<span class='warning'>Not enough room in cargo compartment.</span>")
|
||||
else
|
||||
chassis.occupant_message("<span class='danger'>[target] is firmly secured.</span>")
|
||||
chassis.occupant_message("<span class='warning'>[target] is firmly secured.</span>")
|
||||
|
||||
else if(istype(target,/mob/living))
|
||||
var/mob/living/M = target
|
||||
if(M.stat>1) return
|
||||
if(chassis.occupant.a_intent == "harm")
|
||||
chassis.occupant_message("<span class='danger'>You obliterate [target] with [src.name], leaving blood and guts everywhere.</span>")
|
||||
chassis.visible_message("<span class='danger'>[chassis] destroys [target] in an unholy fury.</span>")
|
||||
target.visible_message("<span class='danger'>[chassis] destroys [target] in an unholy fury.</span>", \
|
||||
"<span class='userdanger'>[chassis] destroys [target] in an unholy fury.</span>")
|
||||
if(chassis.occupant.a_intent == "disarm")
|
||||
chassis.occupant_message("<span class='danger'>You tear [target]'s limbs off with [src.name].</span>")
|
||||
chassis.visible_message("<span class='danger'>[chassis] rips [target]'s arms off.</span>")
|
||||
target.visible_message("<span class='danger'>[chassis] rips [target]'s arms off.</span>", \
|
||||
"<span class='userdanger'>[chassis] rips [target]'s arms off.</span>")
|
||||
else
|
||||
step_away(M,chassis)
|
||||
chassis.occupant_message("You smash into [target], sending them flying.")
|
||||
chassis.visible_message("[chassis] tosses [target] like a piece of paper.")
|
||||
target.visible_message("[chassis] tosses [target] like a piece of paper.")
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
do_after_cooldown()
|
||||
|
||||
@@ -320,7 +320,6 @@ obj/mecha/proc/can_use(mob/user)
|
||||
playsound(src, 'sound/items/Welder.ogg', 50, 1)
|
||||
else
|
||||
return
|
||||
M.occupant_message("<span class='danger'>You hit [src].</span>")
|
||||
visible_message("<span class='danger'>[M.name] has hit [src].</span>")
|
||||
take_damage(M.force, damtype)
|
||||
add_logs(M.occupant, src, "attacked", object=M, addition="(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
|
||||
@@ -475,6 +474,7 @@ obj/mecha/proc/can_use(mob/user)
|
||||
var/damage = absorbDamage(amount,type)
|
||||
health -= damage
|
||||
update_health()
|
||||
occupant_message("<span class='userdanger'>Taking damage!</span>")
|
||||
log_append_to_last("Took [damage] points of damage. Damage type: \"[type]\".",1)
|
||||
|
||||
/obj/mecha/proc/absorbDamage(damage,damage_type)
|
||||
@@ -499,7 +499,6 @@ obj/mecha/proc/can_use(mob/user)
|
||||
src.take_damage(15)
|
||||
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
user.visible_message("<span class='danger'>[user] hits [src.name], doing some damage.</span>", "<span class='danger'>You hit [src.name] with all your might. The metal creaks and bends.</span>")
|
||||
src.occupant_message("<span class='userdanger'>[user] hits [src.name], doing some damage.</span>")
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] hits [src.name]. Nothing happens</span>","<span class='danger'>You hit [src.name] with no visible effect.</span>")
|
||||
src.log_append_to_last("Armor saved.")
|
||||
@@ -517,14 +516,11 @@ obj/mecha/proc/can_use(mob/user)
|
||||
src.take_damage(15)
|
||||
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
||||
user << "<span class='danger'>You slash at the armored suit!</span>"
|
||||
visible_message("<span class='danger'>The [user] slashes at [src.name]'s armor!</span>")
|
||||
src.occupant_message("<span class='userdanger'>The [user] slashes at [src.name]'s armor!</span>")
|
||||
else
|
||||
src.log_append_to_last("Armor saved.")
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
||||
user << "\green Your claws had no effect!"
|
||||
src.occupant_message("<span class='notice'>The [user]'s claws are stopped by the armor.</span>")
|
||||
visible_message("<span class='notice'>The [user] rebounds off [src.name]'s armor!</span>")
|
||||
return
|
||||
|
||||
@@ -541,12 +537,10 @@ obj/mecha/proc/can_use(mob/user)
|
||||
src.take_damage(damage)
|
||||
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
visible_message("<span class='danger'>[user] [user.attacktext] [src]!</span>")
|
||||
src.occupant_message("<span class='userdanger'>[user] [user.attacktext] [src]!</span>")
|
||||
add_logs(user, src, "attacked", admin=0)
|
||||
else
|
||||
src.log_append_to_last("Armor saved.")
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
||||
src.occupant_message("<span class='notice'>[user]'s attack is stopped by the armor.</span>")
|
||||
visible_message("<span class='notice'>The [user] rebounds off [src.name]'s armor!</span>")
|
||||
add_logs(user, src, "attacked", admin=0)
|
||||
return
|
||||
@@ -565,7 +559,6 @@ obj/mecha/proc/can_use(mob/user)
|
||||
src.visible_message("The [A] fastens firmly to [src].")
|
||||
return
|
||||
if(prob(src.deflect_chance) || istype(A, /mob))
|
||||
src.occupant_message("<span class='notice'>[A] bounces off the armor.</span>")
|
||||
src.visible_message("[A] bounces off the [src.name] armor")
|
||||
src.log_append_to_last("Armor saved.")
|
||||
if(istype(A, /mob/living))
|
||||
@@ -574,7 +567,6 @@ obj/mecha/proc/can_use(mob/user)
|
||||
else if(istype(A, /obj))
|
||||
var/obj/O = A
|
||||
if(O.throwforce)
|
||||
src.occupant_message("<span class='userdanger'>[src.name] is hit by [A].</span>")
|
||||
src.visible_message("<span class='danger'>[src.name] is hit by [A].</span>")
|
||||
src.take_damage(O.throwforce)
|
||||
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
@@ -589,7 +581,6 @@ obj/mecha/proc/can_use(mob/user)
|
||||
|
||||
/obj/mecha/proc/dynbulletdamage(var/obj/item/projectile/Proj)
|
||||
if(prob(src.deflect_chance))
|
||||
src.occupant_message("<span class='notice'>The armor deflects incoming projectile.</span>")
|
||||
src.visible_message("The [src.name] armor deflects the projectile")
|
||||
src.log_append_to_last("Armor saved.")
|
||||
return
|
||||
@@ -601,7 +592,6 @@ obj/mecha/proc/can_use(mob/user)
|
||||
ignore_threshold = 1
|
||||
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
src.take_damage(Proj.damage,Proj.flag)
|
||||
src.occupant_message("<span class='userdanger'>[src.name] is hit by [Proj]!</span>")
|
||||
src.visible_message("<span class='danger'>[src.name] is hit by [Proj].</span>")
|
||||
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),ignore_threshold)
|
||||
Proj.on_hit(src)
|
||||
@@ -677,14 +667,8 @@ obj/mecha/proc/can_use(mob/user)
|
||||
if(prob(src.deflect_chance))
|
||||
user << "<span class='danger'>The [W] bounces off [src.name] armor.</span>"
|
||||
src.log_append_to_last("Armor saved.")
|
||||
/*
|
||||
for (var/mob/V in viewers(src))
|
||||
if(V.client && !(V.blinded))
|
||||
V.show_message("The [W] bounces off [src.name] armor.", 1)
|
||||
*/
|
||||
return 0
|
||||
else
|
||||
src.occupant_message("<span class='userdanger'>[user] hits [src] with [W].</span>")
|
||||
user.visible_message("<span class='danger'>[user] hits [src] with [W].</span>", "<span class='danger'>You hit [src] with [W].</span>")
|
||||
src.take_damage(W.force,W.damtype)
|
||||
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
/obj/item/toy/balloon/throw_impact(atom/hit_atom)
|
||||
if(src.reagents.total_volume >= 1)
|
||||
src.visible_message("<span class='danger'>The [src] bursts!</span>","You hear a pop and a splash.")
|
||||
src.visible_message("<span class='danger'>\The [src] bursts!</span>","You hear a pop and a splash.")
|
||||
src.reagents.reaction(get_turf(hit_atom))
|
||||
for(var/atom/A in get_turf(hit_atom))
|
||||
src.reagents.reaction(A)
|
||||
@@ -735,7 +735,7 @@ obj/item/toy/cards/deck/attack_hand(mob/user as mob)
|
||||
src.cards -= choice
|
||||
H.pickup(user)
|
||||
user.put_in_active_hand(H)
|
||||
src.visible_message("<span class='notice'>[user] draws a card from the deck.</span>", "<span class='notice'>You draw a card from the deck.</span>")
|
||||
user.visible_message("<span class='notice'>[user] draws a card from the deck.</span>", "<span class='notice'>You draw a card from the deck.</span>")
|
||||
if(cards.len > 26)
|
||||
src.icon_state = "deck_[deckstyle]_full"
|
||||
else if(cards.len > 10)
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
/obj/structure/mech_melee_attack(obj/mecha/M)
|
||||
if(M.damtype == "brute")
|
||||
M.occupant_message("<span class='danger'>You hit [src].</span>")
|
||||
visible_message("<span class='danger'>[M.name] has hit [src].</span>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -76,11 +76,9 @@
|
||||
/turf/simulated/wall/mech_melee_attack(obj/mecha/M)
|
||||
if(M.damtype == "brute")
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
M.occupant_message("<span class='danger'>You hit [src].</span>")
|
||||
visible_message("<span class='danger'>[M.name] has hit [src]!</span>")
|
||||
if(prob(5) && M.force > 20)
|
||||
dismantle_wall(1)
|
||||
M.occupant_message("<span class='warning'>You smash through the wall.</span>")
|
||||
visible_message("<span class='warning'>[src.name] smashes through the wall!</span>")
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
|
||||
|
||||
@@ -441,7 +441,6 @@ emp_act
|
||||
update_damage_overlays(0)
|
||||
updatehealth()
|
||||
|
||||
M.occupant_message("<span class='danger'>You hit [src].</span>")
|
||||
visible_message("<span class='danger'>[M.name] has hit [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] has hit [src]!</span>")
|
||||
add_logs(M.occupant, src, "attacked", object=M, addition="(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
|
||||
|
||||
@@ -267,7 +267,8 @@
|
||||
for(var/mob/M in dead_mob_list)
|
||||
if(!M.client || istype(M, /mob/new_player))
|
||||
continue //skip monkeys, leavers and new players
|
||||
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
|
||||
var/T = get_turf(src)
|
||||
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(T,null)))
|
||||
M.show_message(message)
|
||||
|
||||
|
||||
|
||||
@@ -86,14 +86,12 @@ proc/vol_by_throwforce_and_or_w_class(var/obj/item/I)
|
||||
else
|
||||
return
|
||||
updatehealth()
|
||||
M.occupant_message("<span class='danger'>You hit [src].</span>")
|
||||
visible_message("<span class='danger'>[M.name] has hit [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] has hit [src]!</span>")
|
||||
add_logs(M.occupant, src, "attacked", object=M, addition="(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
|
||||
else
|
||||
step_away(src,M)
|
||||
add_logs(M.occupant, src, "pushed", object=M, admin=0)
|
||||
M.occupant_message("<span class='warning'>You push [src] out of the way.</span>")
|
||||
visible_message("<span class='warning'>[M] pushes [src] out of the way.</span>")
|
||||
|
||||
return
|
||||
|
||||
@@ -18,9 +18,3 @@
|
||||
stat = CONSCIOUS
|
||||
return
|
||||
health = maxHealth - getBruteLoss() - getFireLoss()
|
||||
|
||||
/mob/living/silicon/pai/proc/follow_pai()
|
||||
while(card)
|
||||
loc = get_turf(card)
|
||||
sleep(5)
|
||||
qdel(src) //if there's no pAI we shouldn't exist
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
mouse_opacity = 0
|
||||
density = 0
|
||||
mob_size = 0
|
||||
invisibility = 101
|
||||
|
||||
var/network = "SS13"
|
||||
var/obj/machinery/camera/current = null
|
||||
@@ -51,7 +50,7 @@
|
||||
/mob/living/silicon/pai/New(var/obj/item/device/paicard)
|
||||
make_laws()
|
||||
canmove = 0
|
||||
src.loc = get_turf(paicard)
|
||||
src.loc = paicard
|
||||
card = paicard
|
||||
sradio = new(src)
|
||||
if(card)
|
||||
@@ -66,7 +65,6 @@
|
||||
pda.owner = text("[]", src)
|
||||
pda.name = pda.owner + " (" + pda.ownjob + ")"
|
||||
|
||||
follow_pai()
|
||||
..()
|
||||
|
||||
/mob/living/silicon/pai/make_laws()
|
||||
|
||||
+31
-7
@@ -75,28 +75,52 @@ var/next_mob_id = 0
|
||||
src << msg
|
||||
return
|
||||
|
||||
// Show a message to all mobs in sight of this one
|
||||
// Show a message to all mobs who sees the src mob and the src mob itself
|
||||
// This would be for visible actions by the src mob
|
||||
// message is the message output to anyone who can see e.g. "[src] does something!"
|
||||
// self_message (optional) is what the src mob sees e.g. "You do something!"
|
||||
// self_message (optional) is what the src mob sees e.g. "You do something!"
|
||||
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
|
||||
|
||||
/mob/visible_message(var/message, var/self_message, var/blind_message)
|
||||
for(var/mob/M in viewers(src))
|
||||
var/list/atom_viewers = list()
|
||||
for(var/atom/movable/A in view(src))
|
||||
atom_viewers |= recursive_hear_check(A)
|
||||
atom_viewers |= src
|
||||
for(var/mob/M in atom_viewers)
|
||||
if(M.see_invisible < invisibility)
|
||||
continue //can't view the invisible
|
||||
var/msg = message
|
||||
if(self_message && M==src)
|
||||
msg = self_message
|
||||
M.show_message( msg, 1, blind_message, 2)
|
||||
M.show_message( msg, 1)
|
||||
if(blind_message)
|
||||
var/list/atom_hearers = list()
|
||||
for(var/atom/movable/O in get_hearers_in_view(7, src))
|
||||
if(O in atom_viewers)
|
||||
continue
|
||||
atom_hearers |= O
|
||||
for(var/mob/MOB in atom_hearers)
|
||||
MOB.show_message(blind_message, 2)
|
||||
|
||||
// Show a message to all mobs in sight of this atom
|
||||
// Show a message to all mobs who sees this atom
|
||||
// Use for objects performing visible actions
|
||||
// message is output to anyone who can see, e.g. "The [src] does something!"
|
||||
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
|
||||
|
||||
/atom/proc/visible_message(var/message, var/blind_message)
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message( message, 1, blind_message, 2)
|
||||
var/list/atom_viewers = list()
|
||||
for(var/atom/movable/A in view(src))
|
||||
atom_viewers |= recursive_hear_check(A)
|
||||
for(var/mob/M in atom_viewers)
|
||||
M.show_message( message, 1)
|
||||
if(blind_message)
|
||||
var/list/atom_hearers = list()
|
||||
for(var/atom/movable/O in get_hearers_in_view(7, src))
|
||||
if(O in atom_viewers)
|
||||
continue
|
||||
atom_hearers |= O
|
||||
for(var/mob/MOB in atom_hearers)
|
||||
MOB.show_message(blind_message, 2)
|
||||
|
||||
// Show a message to all mobs in earshot of this one
|
||||
// This would be for audible actions by the src mob
|
||||
|
||||
@@ -91,8 +91,8 @@
|
||||
if(hitsound)
|
||||
var/volume = vol_by_damage()
|
||||
playsound(loc, hitsound, volume, 1, -1)
|
||||
M.visible_message("<span class='danger'>[M] is hit by \a [src] in the [parse_zone(def_zone)]!", \
|
||||
"<span class='userdanger'>[M] is hit by \a [src] in the [parse_zone(def_zone)]!") //X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
|
||||
M.visible_message("<span class='danger'>[M] is hit by \a [src] in the [parse_zone(def_zone)]!</span>", \
|
||||
"<span class='userdanger'>[M] is hit by \a [src] in the [parse_zone(def_zone)]!</span>") //X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
|
||||
add_logs(firer, M, "shot", object="[src]", addition=reagent_note)
|
||||
|
||||
var/turf/new_loc = get_turf(A)
|
||||
|
||||
@@ -284,7 +284,7 @@ datum/reagents/proc/handle_reactions()
|
||||
ME2.Uses--
|
||||
if(ME2.Uses <= 0) // give the notification that the slime core is dead
|
||||
for(var/mob/M in seen)
|
||||
M << "<span class='notice'>\icon[my_atom] The [my_atom]'s power is consumed in the reaction.</span>"
|
||||
M << "<span class='notice'>\icon[my_atom] \The [my_atom]'s power is consumed in the reaction.</span>"
|
||||
ME2.name = "used slime extract"
|
||||
ME2.desc = "This extract has been used up."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user