Skip to content

Commit

Permalink
Batons and Messages (#415)
Browse files Browse the repository at this point in the history
* batong

* tweaks

* oversight with nocell inhands

* fix telescopic batong
  • Loading branch information
Kapu1178 authored Jul 8, 2023
1 parent ca44339 commit 5ac9ec2
Show file tree
Hide file tree
Showing 12 changed files with 187 additions and 145 deletions.
8 changes: 0 additions & 8 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,3 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(

/// IF an object is weak against armor, this is the value that any present armor is multiplied by
#define ARMOR_WEAKENED_MULTIPLIER 2

/// Return values used in item/melee/baton/baton_attack.
/// Does a normal item attack.
#define BATON_DO_NORMAL_ATTACK 1
/// The attack has been stopped. Either because the user was clumsy or the attack was blocked.
#define BATON_ATTACK_DONE 2
/// The baton attack is still going. baton_effect() is called.
#define BATON_ATTACKING 3
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,6 @@

///From mob/living/Say()
#define COMSIG_LIVING_USE_RADIO "living_talk_into_radio"

///From mob/living/proc/set_combat_mode(): (mob/living/user, new_mode)
#define COMSIG_LIVING_TOGGLE_COMBAT_MODE "living_toggle_combat_mode"
19 changes: 9 additions & 10 deletions code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -324,15 +324,14 @@
var/message_hit_area = ""
if(hit_area)
message_hit_area = " in the [hit_area]"
var/attack_message_spectator = "[src] [message_verb_continuous][message_hit_area] with [I]!"
var/attack_message_victim = "Something [message_verb_continuous] you[message_hit_area] with [I]!"
var/attack_message_attacker = "You [message_verb_simple] [src][message_hit_area] with [I]!"
if(user in viewers(src, null))
attack_message_spectator = "[user] [message_verb_continuous] [src][message_hit_area] with [I]!"
attack_message_victim = "[user] [message_verb_continuous] you[message_hit_area] with [I]!"

var/attack_message_spectator = "<b>[src]</b> [message_verb_continuous][message_hit_area] with [I]!"

if(user in viewers(src))
attack_message_spectator = "<b>[user]</b> [message_verb_continuous] <b>[src]</b>[message_hit_area] with [I]!"

if(user == src)
attack_message_victim = "You [message_verb_simple] yourself[message_hit_area] with [I]"
visible_message(span_danger("[attack_message_spectator]"),\
span_userdanger("[attack_message_victim]"), null, COMBAT_MESSAGE_RANGE, user)
to_chat(user, span_danger("[attack_message_attacker]"))
attack_message_spectator = "<b>[user]</b> [message_verb_simple] [user.p_them()]self[message_hit_area] with [I]!"

visible_message(span_danger("[attack_message_spectator]"), vision_distance = COMBAT_MESSAGE_RANGE)
return 1
Loading

0 comments on commit 5ac9ec2

Please sign in to comment.