mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-05 23:21:53 +00:00
Merge pull request #11942 from Couls/clown-buff
Waddling component, clowns can now choose to waddle while they walk, penguins automatically waddle
This commit is contained in:
15
code/datums/components/waddling.dm
Normal file
15
code/datums/components/waddling.dm
Normal 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)
|
||||
@@ -71,6 +71,30 @@ obj/item/clothing/shoes/magboots/syndie/advance //For the Syndicate Strike Team
|
||||
silence_steps = 1
|
||||
shoe_sound = "clownstep"
|
||||
origin_tech = "magnets=4;syndicate=2"
|
||||
var/enabled_waddle = TRUE
|
||||
var/datum/component/waddle
|
||||
|
||||
/obj/item/clothing/shoes/magboots/clown/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if(slot == slot_shoes && enabled_waddle)
|
||||
waddle = user.AddComponent(/datum/component/waddling)
|
||||
|
||||
/obj/item/clothing/shoes/magboots/clown/dropped(mob/user)
|
||||
. = ..()
|
||||
QDEL_NULL(waddle)
|
||||
|
||||
/obj/item/clothing/shoes/magboots/clown/CtrlClick(mob/living/user)
|
||||
if(!isliving(user))
|
||||
return
|
||||
if(user.get_active_hand() != src)
|
||||
to_chat(user, "You must hold [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/magboots/wizard //bundled with the wiz hardsuit
|
||||
name = "boots of gripping"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
t_loc.MakeDry(TURF_WET_WATER)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes
|
||||
desc = "The prankster's standard-issue clowning shoes. Damn they're huge!"
|
||||
desc = "The prankster's standard-issue clowning shoes. Damn they're huge! Ctrl-click to toggle the waddle dampeners!"
|
||||
name = "clown shoes"
|
||||
icon_state = "clown"
|
||||
item_state = "clown_shoes"
|
||||
@@ -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)
|
||||
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 [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"
|
||||
|
||||
@@ -457,6 +457,7 @@
|
||||
C.AdjustDizzy(volume)
|
||||
C.AddComponent(/datum/component/jestosterone, mind_type)
|
||||
C.AddComponent(/datum/component/squeak, null, null, null, null, null, TRUE)
|
||||
C.AddComponent(/datum/component/waddling)
|
||||
|
||||
/datum/reagent/jestosterone/on_mob_life(mob/living/carbon/M)
|
||||
if(!istype(M))
|
||||
@@ -493,8 +494,10 @@
|
||||
..()
|
||||
GET_COMPONENT_FROM(remove_fun, /datum/component/jestosterone, M)
|
||||
GET_COMPONENT_FROM(squeaking, /datum/component/squeak, M)
|
||||
GET_COMPONENT_FROM(waddling, /datum/component/waddling, M)
|
||||
remove_fun.Destroy()
|
||||
squeaking.Destroy()
|
||||
waddling.Destroy()
|
||||
|
||||
/datum/reagent/royal_bee_jelly
|
||||
name = "royal bee jelly"
|
||||
|
||||
Reference in New Issue
Block a user