[MIRROR] *smacks table* Hot Damn! (#3734)

* *smacks table* Hot Damn! (#57269)

* *smacks table* Hot Damn!

Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-03-01 17:49:38 +00:00
committed by GitHub
co-authored by Ryll Ryll
parent 236ed1bb62
commit f5083f498b
14 changed files with 49 additions and 10 deletions
+1
View File
@@ -32,6 +32,7 @@
#define MEDAL_VOID_ASCENSION "Void"
#define MEDAL_TOOLBOX_SOUL "Toolsoul"
#define MEDAL_CHEM_TUT "Beginner Chemist"
#define MEDAL_HOT_DAMN "Hot Damn!"
//Skill medal hub IDs
#define MEDAL_LEGENDARY_MINER "Legendary Miner"
+2 -2
View File
@@ -125,7 +125,7 @@
return SECONDARY_ATTACK_CALL_NORMAL
/obj/attackby(obj/item/I, mob/living/user, params)
return ..() || ((obj_flags & CAN_BE_HIT) && I.attack_obj(src, user))
return ..() || ((obj_flags & CAN_BE_HIT) && I.attack_obj(src, user, params))
/mob/living/attackby(obj/item/I, mob/living/user, params)
if(..())
@@ -202,7 +202,7 @@
return SECONDARY_ATTACK_CALL_NORMAL
/// The equivalent of the standard version of [/obj/item/proc/attack] but for object targets.
/obj/item/proc/attack_obj(obj/O, mob/living/user)
/obj/item/proc/attack_obj(obj/O, mob/living/user, params)
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_OBJ, O, user) & COMPONENT_CANCEL_ATTACK_CHAIN)
return
if(item_flags & NOBLUDGEON)
@@ -159,3 +159,9 @@
desc = "Passed the chemistry tutorial with perfect purity!"
database_id = MEDAL_CHEM_TUT
icon = "chem_tut"
/datum/award/achievement/misc/hot_damn
name = "Hot Damn!"
desc = "Sometimes you need to make some noise to make a point."
database_id = MEDAL_HOT_DAMN
icon = "hotdamn"
+1 -1
View File
@@ -117,7 +117,7 @@
else
return ..()
/obj/item/extinguisher/attack_obj(obj/O, mob/living/user)
/obj/item/extinguisher/attack_obj(obj/O, mob/living/user, params)
if(AttemptRefill(O, user))
refilling = TRUE
return FALSE
+31
View File
@@ -113,6 +113,8 @@
attack_verb_continuous = list("slaps")
attack_verb_simple = list("slap")
hitsound = 'sound/effects/snap.ogg'
/// How many smaller table smacks we can do before we're out
var/table_smacks_left = 3
/obj/item/slapper/attack(mob/M, mob/living/carbon/human/user)
if(ishuman(M))
@@ -126,6 +128,35 @@
"<span class='hear'>You hear a slap.</span>")
return
/obj/item/slapper/attack_obj(obj/O, mob/living/user, params)
if(!istype(O, /obj/structure/table))
return ..()
var/obj/structure/table/the_table = O
var/is_right_clicking = LAZYACCESS(params2list(params), RIGHT_CLICK)
if(is_right_clicking && table_smacks_left == initial(table_smacks_left)) // so you can't do 2 weak slaps followed by a big slam
transform = transform.Scale(5) // BIG slap
if(HAS_TRAIT(user, TRAIT_HULK))
transform = transform.Scale(2)
color = COLOR_GREEN
user.do_attack_animation(the_table)
if(ishuman(user))
var/mob/living/carbon/human/human_user = user
if(istype(human_user.shoes, /obj/item/clothing/shoes/cowboy))
human_user.say(pick("Hot damn!", "Hoo-wee!", "Got-dang!"), spans = list(SPAN_YELL), forced=TRUE)
human_user.client?.give_award(/datum/award/achievement/misc/hot_damn, human_user)
playsound(get_turf(the_table), 'sound/effects/tableslam.ogg', 110, TRUE)
user.visible_message("<b><span class='danger'>[user] slams [user.p_their()] fist down on [the_table]!</span></b>", "<b><span class='danger'>You slam your fist down on [the_table]!</span></b>")
qdel(src)
else
user.do_attack_animation(the_table)
playsound(get_turf(the_table), 'sound/effects/tableslam.ogg', 40, TRUE)
user.visible_message("<span class='notice'>[user] slaps [user.p_their()] hand on [the_table].</span>", "<span class='notice'>You slap your hand on [the_table].</span>", vision_distance=COMBAT_MESSAGE_RANGE)
table_smacks_left--
if(table_smacks_left <= 0)
qdel(src)
/obj/item/noogie
name = "noogie"
desc = "Get someone in an aggressive grab then use this on them to ruin their day."
+1 -1
View File
@@ -33,7 +33,7 @@
if(cell && !(. & EMP_PROTECT_CONTENTS))
cell.emp_act(severity)
/obj/item/inducer/attack_obj(obj/O, mob/living/carbon/user)
/obj/item/inducer/attack_obj(obj/O, mob/living/carbon/user, params)
if(user.combat_mode)
return ..()
@@ -79,7 +79,7 @@
var/list/layers = list("First Layer" = FIRST_DUCT_LAYER, "Second Layer" = SECOND_DUCT_LAYER, "Default Layer" = DUCT_LAYER_DEFAULT,
"Fourth Layer" = FOURTH_DUCT_LAYER, "Fifth Layer" = FIFTH_DUCT_LAYER)
/obj/item/plunger/attack_obj(obj/O, mob/living/user)
/obj/item/plunger/attack_obj(obj/O, mob/living/user, params)
if(layer_mode)
SEND_SIGNAL(O, COMSIG_MOVABLE_CHANGE_DUCT_LAYER, O, target_layer)
return ..()
@@ -198,7 +198,7 @@
/obj/item/gun_control/CanItemAutoclick()
return TRUE
/obj/item/gun_control/attack_obj(obj/O, mob/living/user)
/obj/item/gun_control/attack_obj(obj/O, mob/living/user, params)
user.changeNext_move(CLICK_CD_MELEE)
O.attacked_by(src, user)
+1 -1
View File
@@ -30,7 +30,7 @@
discount_pct_off = text2num(discount_pct_off)
name = "coupon - [round(discount_pct_off * 100)]% off [initial(discounted_pack.name)]"
/obj/item/coupon/attack_obj(obj/O, mob/living/user)
/obj/item/coupon/attack_obj(obj/O, mob/living/user, params)
if(!istype(O, /obj/machinery/computer/cargo))
return ..()
if(discount_pct_off == COUPON_OMEN)
@@ -65,7 +65,7 @@
Die()
/obj/item/clothing/mask/facehugger/attackby(obj/item/O, mob/user, params)
return O.attack_obj(src, user)
return O.attack_obj(src, user, params)
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/clothing/mask/facehugger/attack_hand(mob/user, list/modifiers)
+1
View File
@@ -117,6 +117,7 @@
key = "slap"
key_third_person = "slaps"
hands_use_check = TRUE
cooldown = 3 SECONDS // to prevent endless table slamming
/datum/emote/living/carbon/slap/run_emote(mob/user, params, type_override, intentional)
. = ..()
+1 -1
View File
@@ -995,7 +995,7 @@
..()
shatter()
/obj/item/light/attack_obj(obj/O, mob/living/user)
/obj/item/light/attack_obj(obj/O, mob/living/user, params)
..()
shatter()
+1 -1
View File
@@ -394,7 +394,7 @@
return ..()
return
/obj/item/gun/attack_obj(obj/O, mob/living/user)
/obj/item/gun/attack_obj(obj/O, mob/living/user, params)
if(user.combat_mode)
if(bayonet)
O.attackby(bayonet, user)