Adds Wheely-Heels and Kindle Kicks [Merge Ready] (#36309)

* Adds Wheely-Heels, a pair of shoes with inbuilt roller-wheels. Can be rarely received as reward from arcade machines.

* Fixed issues with Wheely-heels, added Kindle Kicks

* Cleaned up code

* Fixed Destroy()

* Thoust shall return the parent, like Oedipus

* Final Fix XIV
This commit is contained in:
TheDreamweaver
2018-03-13 01:57:48 -07:00
committed by duncathan salt
parent 8aca9d6541
commit 68cafe6fd1
7 changed files with 121 additions and 2 deletions

View File

@@ -647,6 +647,17 @@
var/datum/language_holder/H = M.get_language_holder()
H.open_language_menu(usr)
/datum/action/item_action/wheelys
name = "Toggle Wheely-Heel's Wheels"
desc = "Pops out or in your wheely-heel's wheels."
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "wheelys"
/datum/action/item_action/kindleKicks
name = "Activate Kindle Kicks"
desc = "Kick you feet together, activating the lights in your Kindle Kicks."
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "kindleKicks"
//Small sprites
/datum/action/small_sprite
@@ -677,4 +688,4 @@
small = TRUE
else
owner.remove_alt_appearance("smallsprite")
small = FALSE
small = FALSE

View File

@@ -49,7 +49,9 @@
/obj/item/toy/toy_dagger = 2,
/obj/item/extendohand/acme = 1,
/obj/item/hot_potato/harmless/toy = 1,
/obj/item/card/emagfake = 1)
/obj/item/card/emagfake = 1,
/obj/item/clothing/shoes/wheelys = 2,
/obj/item/clothing/shoes/kindleKicks = 2)
light_color = LIGHT_COLOR_GREEN

View File

@@ -253,3 +253,68 @@
/obj/item/clothing/shoes/bronze/Initialize()
. = ..()
AddComponent(/datum/component/squeak, list('sound/machines/clockcult/integration_cog_install.ogg' = 1, 'sound/magic/clockwork/fellowship_armory.ogg' = 1), 50)
/obj/item/clothing/shoes/wheelys
name = "Wheely-Heels"
desc = "Uses patented retractable wheel technology. Never sacrifice speed for style - not that this provides much of either." //Thanks Fel
icon_state = "wheelys"
item_state = "wheelys"
actions_types = list(/datum/action/item_action/wheelys)
var/wheelToggle = FALSE //False means wheels are not popped out
var/obj/vehicle/ridden/scooter/wheelys/W
/obj/item/clothing/shoes/wheelys/Initialize()
. = ..()
W = new /obj/vehicle/ridden/scooter/wheelys(null)
/obj/item/clothing/shoes/wheelys/ui_action_click(mob/user, action)
if(!isliving(user))
return
if(!istype(user.get_item_by_slot(slot_shoes), /obj/item/clothing/shoes/wheelys))
to_chat(user, "<span class='warning'>You must be wearing the wheely-heels to use them!</span>")
return
if(!(W.is_occupant(user)))
wheelToggle = FALSE
if(wheelToggle)
W.unbuckle_mob(user)
wheelToggle = FALSE
return
W.forceMove(get_turf(user))
W.buckle_mob(user)
wheelToggle = TRUE
/obj/item/clothing/shoes/wheelys/dropped(mob/user)
if(wheelToggle)
W.unbuckle_mob(user)
wheelToggle = FALSE
..()
/obj/item/clothing/shoes/wheelys/Destroy()
QDEL_NULL(W)
. = ..()
/obj/item/clothing/shoes/kindleKicks
name = "Kindle Kicks"
desc = "They'll sure kindle something in you, and it's not childhood nostalgia..."
icon_state = "kindleKicks"
item_state = "kindleKicks"
actions_types = list(/datum/action/item_action/kindleKicks)
var/lightCycle = 0
var/active = FALSE
/obj/item/clothing/shoes/kindleKicks/ui_action_click(mob/user, action)
if(active)
return
active = TRUE
set_light(2, 3, rgb(rand(0,255),rand(0,255),rand(0,255)))
addtimer(CALLBACK(src, .proc/lightUp), 5)
/obj/item/clothing/shoes/kindleKicks/proc/lightUp(mob/user)
if(lightCycle < 15)
set_light(2, 3, rgb(rand(0,255),rand(0,255),rand(0,255)))
lightCycle += 1
addtimer(CALLBACK(src, .proc/lightUp), 5)
else
set_light(0)
lightCycle = 0
active = FALSE

View File

@@ -146,3 +146,44 @@
qdel(src)
return TRUE
//Wheelys
/obj/vehicle/ridden/scooter/wheelys
name = "Wheely-Heels"
desc = "Uses patented retractable wheel technology. Never sacrifice speed for style - not that this provides much of either."
icon = null
density = FALSE
/obj/vehicle/ridden/scooter/wheelys/Initialize()
. = ..()
var/datum/component/riding/D = LoadComponent(/datum/component/riding)
D.vehicle_move_delay = 0
D.set_vehicle_dir_layer(SOUTH, ABOVE_MOB_LAYER)
D.set_vehicle_dir_layer(NORTH, OBJ_LAYER)
D.set_vehicle_dir_layer(EAST, OBJ_LAYER)
D.set_vehicle_dir_layer(WEST, OBJ_LAYER)
/obj/vehicle/ridden/scooter/wheelys/post_unbuckle_mob(mob/living/M)
if(!has_buckled_mobs())
to_chat(M, "<span class='notice'>You pop the Wheely-Heel's wheels back into place.</span>")
moveToNullspace()
return ..()
/obj/vehicle/ridden/scooter/wheelys/post_buckle_mob(mob/living/M)
to_chat(M, "<span class='notice'>You pop out the Wheely-Heel's wheels.</span>")
return ..()
/obj/vehicle/ridden/scooter/wheelys/Collide(atom/A)
. = ..()
if(A.density && has_buckled_mobs())
var/mob/living/H = buckled_mobs[1]
var/atom/throw_target = get_edge_target_turf(H, pick(GLOB.cardinals))
unbuckle_mob(H)
H.throw_at(throw_target, 4, 3)
H.Knockdown(30)
H.adjustStaminaLoss(10)
var/head_slot = H.get_item_by_slot(slot_head)
if(!head_slot || !(istype(head_slot,/obj/item/clothing/head/helmet) || istype(head_slot,/obj/item/clothing/head/hardhat)))
H.adjustBrainLoss(1)
H.updatehealth()
visible_message("<span class='danger'>[src] crashes into [A], sending [H] flying!</span>")
playsound(src, 'sound/effects/bang.ogg', 50, 1)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB