mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-04-03 02:21:00 +01:00
* Begin clickcode attack_self fix Begins the work to make everything call back to parent for attack_self so that signals are sacred. * Makes MORE things call the attack_self() parent Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'. * Finishes making the rest of attack_self call parent. As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items. * begone foul demon * some more cleanup * These * GOD this was annoying * yeh * Fix this * fLARES * Thesee too * toys! * Even more! * More fixes * Even more * rest of em * these too * Update syndie.dm * hardref clear * Update code/game/gamemodes/nuclear/pinpointer.dm * Update code/game/objects/effects/mines.dm * Update code/game/objects/items/blueprints_vr.dm * Update code/game/objects/items/blueprints_vr.dm * Update code/game/objects/items/contraband_vr.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/gunbox.dm * Update code/game/objects/items/gunbox.dm * Update code/game/objects/items/gunbox_vr.dm * Update code/game/objects/items/gunbox_vr.dm * Update code/game/objects/items/weapons/gift_wrappaper.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/gunbox.dm * these too * Update maintpanel_stack.dm * angry warning * Fixes packaged snacks. Fixes improper var default. * Special handling for these * proper poly types * Fixes magclaws Makes the 'features' it had just part of base magboots that can be adjusted via varswap. * Fixes jackets Fixes https://github.com/VOREStation/VOREStation/issues/18941 * Small bugfix Makes p_Theyre properly capitialize Makes examine show proper wording * Update gift_wrappaper.dm
68 lines
1.8 KiB
Plaintext
68 lines
1.8 KiB
Plaintext
// File is unticked because this is entirely untested old code
|
|
|
|
|
|
/*
|
|
* Combitool
|
|
*/
|
|
/obj/item/combitool
|
|
name = "combi-tool"
|
|
desc = "It even has one of those nubbins for doing the thingy."
|
|
icon = 'icons/obj/items.dmi'
|
|
icon_state = "combitool"
|
|
w_class = ITEMSIZE_SMALL
|
|
drop_sound = 'sound/items/drop/multitool.ogg'
|
|
pickup_sound = 'sound/items/pickup/multitool.ogg'
|
|
|
|
var/list/spawn_tools = list(
|
|
/obj/item/tool/screwdriver,
|
|
/obj/item/tool/wrench,
|
|
/obj/item/tool/wirecutters,
|
|
/obj/item/material/knife,
|
|
/obj/item/material/kitchen/utensil/fork,
|
|
/obj/item/material/knife/machete/hatchet
|
|
)
|
|
var/list/tools = list()
|
|
var/current_tool = 1
|
|
|
|
/obj/item/combitool/examine(mob/user)
|
|
. = ..()
|
|
if(loc == user && tools.len)
|
|
. += "It has the following fittings:"
|
|
for(var/obj/item/tool in tools)
|
|
. += "[icon2html(tool,)] - [tool.name][tools[current_tool]==tool?" (selected)":""]")
|
|
|
|
/obj/item/combitool/Initialize(mapload)
|
|
. = ..()
|
|
for(var/type in spawn_tools)
|
|
tools |= new type(src)
|
|
|
|
/obj/item/combitool/attack_self(mob/user)
|
|
. = ..(user)
|
|
if(.)
|
|
return TRUE
|
|
if(++current_tool > tools.len) current_tool = 1
|
|
var/obj/item/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.name] fitting.")
|
|
|
|
/obj/item/combitool/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
|
if(!M.Adjacent(user))
|
|
return 0
|
|
var/obj/item/tool = tools[current_tool]
|
|
if(!tool) return 0
|
|
return (tool ? tool.attack(M,user) : 0)
|
|
|
|
/obj/item/combitool/afterattack(var/atom/target, var/mob/living/user, proximity, params)
|
|
if(!proximity)
|
|
return 0
|
|
var/obj/item/tool = tools[current_tool]
|
|
if(!tool) return 0
|
|
tool.loc = user
|
|
var/resolved = target.attackby(tool,user)
|
|
if(!resolved && tool && target)
|
|
tool.afterattack(target,user,1)
|
|
if(tool)
|
|
tool.loc = src
|