mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Merge pull request #10032 from variableundefined/SqueakComponent
Add in squeak component & refactor bikehorn, mouse to use it.
This commit is contained in:
@@ -411,6 +411,7 @@ BLIND // can't see anything
|
||||
..()
|
||||
|
||||
/obj/item/clothing/shoes/proc/step_action(var/mob/living/carbon/human/H) //squeek squeek
|
||||
SEND_SIGNAL(src, COMSIG_SHOES_STEP_ACTION)
|
||||
if(shoe_sound)
|
||||
var/turf/T = get_turf(H)
|
||||
|
||||
|
||||
@@ -69,15 +69,17 @@
|
||||
item_state = "clown"
|
||||
item_color = "clown"
|
||||
flags_size = ONESIZEFITSALL
|
||||
var/honk_sound = 'sound/items/bikehorn.ogg'
|
||||
|
||||
/obj/item/clothing/under/rank/clown/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg' = 1), 50)
|
||||
|
||||
/obj/item/clothing/under/rank/clown/hit_reaction()
|
||||
playsound(loc, honk_sound, 50, 1, -1)
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(H.mind && H.mind.assigned_role == "Clown")
|
||||
score_clownabuse++
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/under/rank/head_of_personnel
|
||||
desc = "It's a jumpsuit worn by someone who works in the position of \"Head of Personnel\"."
|
||||
|
||||
@@ -1490,9 +1490,9 @@
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
lefthand_file = 'icons/mob/inhands/fluff_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/fluff_righthand.dmi'
|
||||
honk_sounds = list('sound/items/teri_horn.ogg' = 1)
|
||||
icon_state = "teri_horn"
|
||||
item_state = "teri_horn"
|
||||
honk_sound = 'sound/items/teri_horn.ogg'
|
||||
|
||||
/obj/item/clothing/accessory/medal/fluff/elo //V-Force_Bomber: E.L.O.
|
||||
name = "distinguished medal of loyalty and excellence"
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
can_collar = 1
|
||||
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
|
||||
|
||||
/mob/living/simple_animal/mouse/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/squeak, list('sound/effects/mousesqueek.ogg' = 1), 50)
|
||||
|
||||
/mob/living/simple_animal/mouse/handle_automated_speech()
|
||||
..()
|
||||
if(prob(speak_chance))
|
||||
@@ -81,39 +85,15 @@
|
||||
get_scooped(M)
|
||||
..()
|
||||
|
||||
//make mice fit under tables etc? this was hacky, and not working
|
||||
/*
|
||||
/mob/living/simple_animal/mouse/Move(var/dir)
|
||||
|
||||
var/turf/target_turf = get_step(src,dir)
|
||||
//CanReachThrough(src.loc, target_turf, src)
|
||||
var/can_fit_under = 0
|
||||
if(target_turf.ZCanPass(get_turf(src),1))
|
||||
can_fit_under = 1
|
||||
|
||||
..(dir)
|
||||
if(can_fit_under)
|
||||
src.loc = target_turf
|
||||
for(var/d in cardinal)
|
||||
var/turf/O = get_step(T,d)
|
||||
//Simple pass check.
|
||||
if(O.ZCanPass(T, 1) && !(O in open) && !(O in closed) && O in possibles)
|
||||
open += O
|
||||
*/
|
||||
|
||||
///mob/living/simple_animal/mouse/restrained() //Hotfix to stop mice from doing things with MouseDrop
|
||||
// return 1
|
||||
|
||||
/mob/living/simple_animal/mouse/start_pulling(var/atom/movable/AM)//Prevents mouse from pulling things
|
||||
to_chat(src, "<span class='warning'>You are too small to pull anything.</span>")
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/mouse/Crossed(AM as mob|obj)
|
||||
if( ishuman(AM) )
|
||||
if(ishuman(AM))
|
||||
if(!stat)
|
||||
var/mob/M = AM
|
||||
to_chat(M, "<span class='notice'>[bicon(src)] Squeek!</span>")
|
||||
M << 'sound/effects/mousesqueek.ogg'
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/mouse/death(gibbed)
|
||||
|
||||
@@ -538,6 +538,7 @@
|
||||
// note AM since can contain mobs or objs
|
||||
for(var/atom/movable/AM in D)
|
||||
AM.loc = src
|
||||
SEND_SIGNAL(AM, COMSIG_MOVABLE_DISPOSING, src, D)
|
||||
if(istype(AM, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(FAT in H.mutations) // is a human and fat?
|
||||
|
||||
Reference in New Issue
Block a user