mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 05:51:56 +01:00
Cooking and combitool radials. (#9063)
This commit is contained in:
@@ -681,8 +681,6 @@
|
||||
. = ..()
|
||||
color = color_rotation(rand(-11, 12) * 15)
|
||||
|
||||
//combitool
|
||||
|
||||
/obj/item/combitool
|
||||
name = "combi-tool"
|
||||
desc = "It even has one of those nubbins for doing the thingy."
|
||||
@@ -708,43 +706,42 @@
|
||||
var/current_tool = 1
|
||||
|
||||
/obj/item/combitool/Initialize()
|
||||
desc = "[initial(desc)] ([tools.len]. [tools.len] possibilit[tools.len == 1 ? "y" : "ies"])"
|
||||
desc = "[initial(desc)] It has [tools.len] possibilit[tools.len == 1 ? "y" : "ies"]."
|
||||
for(var/tool in tools)
|
||||
tools[tool] = image('icons/obj/tools.dmi', icon_state = "[icon_state]-[tool]")
|
||||
. = ..()
|
||||
|
||||
/obj/item/combitool/examine(var/mob/user)
|
||||
. = ..()
|
||||
if(. && tools.len)
|
||||
to_chat(user, "It has the following fittings:")
|
||||
for(var/tool in tools)
|
||||
to_chat(user, "- [tool][tools[current_tool] == tool ? " (selected)" : ""]")
|
||||
to_chat(user, "It has the following fittings: <b>[english_list(tools)]</b>.")
|
||||
|
||||
/obj/item/combitool/iswrench()
|
||||
return tools[current_tool] == "wrench"
|
||||
return current_tool == "wrench"
|
||||
|
||||
/obj/item/combitool/isscrewdriver()
|
||||
return tools[current_tool] == "screwdriver"
|
||||
return current_tool == "screwdriver"
|
||||
|
||||
/obj/item/combitool/iswirecutter()
|
||||
return tools[current_tool] == "wirecutters"
|
||||
return current_tool == "wirecutters"
|
||||
|
||||
/obj/item/combitool/iscrowbar()
|
||||
return tools[current_tool] == "crowbar"
|
||||
return current_tool == "crowbar"
|
||||
|
||||
/obj/item/combitool/ismultitool()
|
||||
return tools[current_tool] == "multitool"
|
||||
return current_tool == "multitool"
|
||||
|
||||
/obj/item/combitool/proc/update_tool()
|
||||
icon_state = "[initial(icon_state)]-[tools[current_tool]]"
|
||||
icon_state = "[initial(icon_state)]-[current_tool]"
|
||||
|
||||
/obj/item/combitool/attack_self(var/mob/user)
|
||||
if(++current_tool > tools.len)
|
||||
current_tool = 1
|
||||
var/tool = tools[current_tool]
|
||||
if(!tool)
|
||||
to_chat(user, "You can't seem to find any fittings in \the [src].")
|
||||
else
|
||||
to_chat(user, "You switch \the [src] to the [tool] fitting.")
|
||||
update_tool()
|
||||
var/tool = RADIAL_INPUT(user, tools)
|
||||
if(tool)
|
||||
playsound(user, 'sound/items/penclick.ogg', 25)
|
||||
current_tool = tool
|
||||
update_tool()
|
||||
return 1
|
||||
|
||||
/obj/item/powerdrill
|
||||
|
||||
Reference in New Issue
Block a user