Waddling!

This commit is contained in:
Couls
2019-07-29 03:16:18 -04:00
parent d0fa1a9366
commit 07dbf66a18
4 changed files with 44 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
/datum/component/waddling
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
/datum/component/waddling/Initialize()
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), .proc/Waddle)
/datum/component/waddling/proc/Waddle()
var/mob/living/L = parent
if(L.incapacitated() || L.lying)
return
animate(L, pixel_z = 4, time = 0)
animate(pixel_z = 0, transform = turn(matrix(), pick(-12, 0, 12)), time=2)
animate(pixel_z = 0, transform = matrix(), time = 0)
@@ -63,6 +63,30 @@
item_color = "clown"
var/footstep = 1 //used for squeeks whilst walking
shoe_sound = "clownstep"
var/enabled_waddle = TRUE
var/datum/component/waddle
/obj/item/clothing/shoes/clown_shoes/equipped(mob/user, slot)
. = ..()
if(slot == slot_shoes && enabled_waddle)
user.AddComponent(/datum/component/waddling)
/obj/item/clothing/shoes/clown_shoes/dropped(mob/user)
. = ..()
QDEL_NULL(waddle)
/obj/item/clothing/shoes/clown_shoes/CtrlClick(mob/living/user)
if(!isliving(user))
return
if(user.get_active_hand() != src)
to_chat(user, "You must hold the [src] in your hand to do this.")
return
if(!enabled_waddle)
to_chat(user, "<span class='notice'>You switch off the waddle dampeners!</span>")
enabled_waddle = TRUE
else
to_chat(user, "<span class='notice'>You switch on the waddle dampeners!</span>")
enabled_waddle = FALSE
/obj/item/clothing/shoes/clown_shoes/magical
name = "magical clown shoes"
@@ -16,6 +16,10 @@
turns_per_move = 10
icon = 'icons/mob/penguins.dmi'
/mob/living/simple_animal/pet/penguin/Initialize(mapload)
. = ..()
AddComponent(/datum/component/waddling)
/mob/living/simple_animal/pet/penguin/emperor
name = "Emperor penguin"
real_name = "penguin"
+1
View File
@@ -278,6 +278,7 @@
#include "code\datums\components\jestosterone.dm"
#include "code\datums\components\material_container.dm"
#include "code\datums\components\squeak.dm"
#include "code\datums\components\waddling.dm"
#include "code\datums\diseases\_disease.dm"
#include "code\datums\diseases\_MobProcs.dm"
#include "code\datums\diseases\anxiety.dm"