Revert "[MIRROR] Port material containers to datum components" (#2597)
* Revert "sprite fix on kitsune tails" This reverts commit44d5b21a43. * Revert "Update vg_clothing_packs.dm (#2591)" This reverts commit7f46280d6b. * Revert "Automatic changelog generation for PR #2590 [ci skip]" This reverts commit201e07033f. * Revert "[MIRROR] Gives the detective a mass spectrometer (#2590)" This reverts commit5c98b9a13b. * Revert "Quick sync (#2587)" This reverts commit92e055be97. * Revert "Automatic changelog generation for PR #2557 [ci skip]" This reverts commit241a10d88d. * Revert "Decreases hacked ai module cost (#2557)" This reverts commitd959b7538a. * Revert "[MIRROR] Port material containers to datum components (#2562)" This reverts commit32300086d5.
This commit is contained in:
@@ -5,11 +5,12 @@
|
||||
desc = "Lost prototype of advanced clown tech. Powered by bananium, these shoes leave a trail of chaos in their wake."
|
||||
icon_state = "clown_prototype_off"
|
||||
var/on = FALSE
|
||||
var/datum/material_container/bananium
|
||||
actions_types = list(/datum/action/item_action/toggle)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/material_container, list(MAT_BANANIUM), 200000, TRUE)
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/New()
|
||||
..()
|
||||
bananium = new/datum/material_container(src,list(MAT_BANANIUM),200000)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/step_action()
|
||||
if(on)
|
||||
@@ -20,7 +21,6 @@
|
||||
footstep++
|
||||
|
||||
new/obj/item/grown/bananapeel/specialpeel(get_step(src,turn(usr.dir, 180))) //honk
|
||||
GET_COMPONENT(bananium, /datum/component/material_container)
|
||||
bananium.use_amount_type(100, MAT_BANANIUM)
|
||||
if(bananium.amount(MAT_BANANIUM) < 100)
|
||||
on = !on
|
||||
@@ -31,19 +31,33 @@
|
||||
..()
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/attack_self(mob/user)
|
||||
GET_COMPONENT(bananium, /datum/component/material_container)
|
||||
var/sheet_amount = bananium.retrieve_all()
|
||||
if(sheet_amount)
|
||||
to_chat(user, "<span class='notice'>You retrieve [sheet_amount] sheets of bananium from the prototype shoes.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You cannot retrieve any bananium from the prototype shoes.</span>")
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/attackby(obj/item/O, mob/user, params)
|
||||
if(!bananium.get_item_material_amount(O))
|
||||
to_chat(user, "<span class='notice'>This item has no bananium!</span>")
|
||||
return
|
||||
if(!user.dropItemToGround(O))
|
||||
to_chat(user, "<span class='notice'>You can't drop [O]!</span>")
|
||||
return
|
||||
|
||||
var/bananium_amount = bananium.insert_item(O)
|
||||
if(bananium_amount)
|
||||
to_chat(user, "<span class='notice'>You insert [O] into the prototype shoes.</span>")
|
||||
qdel(O)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You are unable to insert more bananium!</span>")
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>The shoes are [on ? "enabled" : "disabled"]</span>")
|
||||
var/ban_amt = bananium.amount(MAT_BANANIUM)
|
||||
to_chat(user, "<span class='notice'>The shoes are [on ? "enabled" : "disabled"]. There is [ban_amt ? ban_amt : "no"] bananium left.</span>")
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/ui_action_click(mob/user)
|
||||
GET_COMPONENT(bananium, /datum/component/material_container)
|
||||
if(bananium.amount(MAT_BANANIUM))
|
||||
on = !on
|
||||
update_icon()
|
||||
@@ -63,4 +77,4 @@
|
||||
usr.update_inv_shoes()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
Reference in New Issue
Block a user