mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Most content fixed, except for blob act.
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/play_squeak_crossed)
|
||||
if(isitem(parent))
|
||||
RegisterSignal(parent, list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ, COMSIG_ITEM_HIT_REACT, COMSIG_ITEM_ATTACK_SELF), .proc/play_squeak)
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/on_drop)
|
||||
if(istype(parent, /obj/item/clothing/shoes))
|
||||
RegisterSignal(parent, COMSIG_SHOES_STEP_ACTION, .proc/step_squeak)
|
||||
|
||||
@@ -54,6 +56,12 @@
|
||||
else
|
||||
steps++
|
||||
|
||||
/datum/component/squeak/proc/on_equip(datum/source, mob/equipper, slot)
|
||||
RegisterSignal(equipper, COMSIG_MOVABLE_DISPOSING, .proc/disposing_react, TRUE)
|
||||
|
||||
/datum/component/squeak/proc/on_drop(datum/source, mob/user)
|
||||
UnregisterSignal(user, COMSIG_MOVABLE_DISPOSING)
|
||||
|
||||
/datum/component/squeak/proc/play_squeak_crossed(atom/movable/AM)
|
||||
if(isitem(AM))
|
||||
var/obj/item/I = AM
|
||||
@@ -65,4 +73,13 @@
|
||||
return
|
||||
var/atom/current_parent = parent
|
||||
if(isturf(current_parent.loc))
|
||||
play_squeak()
|
||||
|
||||
/datum/component/squeak/proc/disposing_react(datum/source, obj/structure/disposalholder/holder, obj/machinery/disposal/source)
|
||||
//We don't need to worry about unregistering this signal as it will happen for us automaticaly when the holder is qdeleted
|
||||
RegisterSignal(holder, COMSIG_ATOM_DIR_CHANGE, .proc/holder_dir_change)
|
||||
|
||||
/datum/component/squeak/proc/holder_dir_change(datum/source, old_dir, new_dir)
|
||||
//If the dir changes it means we're going through a bend in the pipes, let's pretend we bumped the wall
|
||||
if(old_dir != new_dir)
|
||||
play_squeak()
|
||||
@@ -150,6 +150,7 @@
|
||||
|
||||
//Hook for running code when a dir change occurs
|
||||
/atom/proc/setDir(newdir)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_DIR_CHANGE, dir, newdir)
|
||||
dir = newdir
|
||||
|
||||
/atom/proc/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
|
||||
|
||||
@@ -27,9 +27,6 @@
|
||||
. = ..()
|
||||
AddComponent(/datum/component/squeak, honk_sounds, 50)
|
||||
|
||||
/obj/item/bikehorn/Crossed()
|
||||
. = ..()
|
||||
|
||||
/obj/item/bikehorn/airhorn
|
||||
name = "air horn"
|
||||
desc = "Damn son, where'd you find this?"
|
||||
|
||||
@@ -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