mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 21:10:30 +01:00
5277251959
For a robust crafting system, I need a new materials framework. For a new materials framework, I need to clean up reagents. To clean up reagents, I need to pare down foods from reagent holders. To pare down foods from reagent holders, I need to port edibility components. To port edibility components, I need to port processing components. To port processing components, I need to port tool behaviors. This is all back-end code, no new features or functionality from this.
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
/obj/item/psychic_power/tinker
|
|
name = "psychokinetic crowbar"
|
|
icon_state = "crowbar"
|
|
force = 11
|
|
tool_behaviour = TOOL_CROWBAR
|
|
var/list/tools = list("crowbar", "wrench", "screwdriver", "cutters")
|
|
|
|
/obj/item/psychic_power/tinker/Initialize(mapload, ...)
|
|
. = ..()
|
|
var/list/new_tools = list()
|
|
for(var/tool_name in tools)
|
|
var/image/radial_image = image('icons/obj/psychic_powers.dmi', tool_name)
|
|
new_tools[capitalize_first_letters(tool_name)] = radial_image
|
|
tools = new_tools
|
|
|
|
/obj/item/psychic_power/tinker/attack_self(mob/user)
|
|
if(!owner || loc != owner)
|
|
return
|
|
|
|
var/choice = show_radial_menu(user, user, tools, radius = 42, tooltips = TRUE)
|
|
if(!choice)
|
|
playsound(get_turf(src), 'sound/effects/psi/power_fail.ogg', 40, TRUE)
|
|
owner.drop_from_inventory(src)
|
|
return
|
|
|
|
if(!owner || loc != owner)
|
|
return
|
|
|
|
tool_behaviour = lowertext(choice)
|
|
name = "psychokinetic [tool_behaviour]"
|
|
icon_state = tool_behaviour
|
|
to_chat(owner, SPAN_NOTICE("You begin emulating \a [tool_behaviour]."))
|
|
playsound(get_turf(src), 'sound/effects/psi/power_fabrication.ogg', 40, TRUE)
|