Files
VOREStation/code/game/objects/items/weapons/melee/misc.dm
T
Cameron Lennox d5849910e5 Begin clickcode attack_self fix (#18797)
* 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
2025-12-29 13:21:10 -05:00

102 lines
3.3 KiB
Plaintext

/obj/item/melee/chainofcommand
name = "chain of command"
desc = "A tool used by great men to placate the frothing masses."
icon_state = "chain"
slot_flags = SLOT_BELT
force = 10
throwforce = 7
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_COMBAT = 4)
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
hitsound = 'sound/weapons/whip.ogg'
reach = 2
/obj/item/melee/chainofcommand/curator_whip
name = "leather whip"
desc = "A fine weapon for some treasure hunting."
icon_state = "curator_whip"
force = 5
throwforce = 5
origin_tech = list(TECH_COMBAT = 2)
/obj/item/melee/chainofcommand/curator_whip/toy
name = "toy whip"
desc = "A fake whip. Perfect for fake treasure hunting"
force = 2
throwforce = 2
/obj/item/melee/umbrella
name = "umbrella"
desc = "To keep the rain off you. Use with caution on windy days."
icon = 'icons/obj/items.dmi'
icon_state = "umbrella_closed"
addblends = "umbrella_closed_a"
slot_flags = SLOT_BELT
force = 5
throwforce = 5
w_class = ITEMSIZE_NORMAL
var/open = FALSE
/obj/item/melee/umbrella/Initialize(mapload)
. = ..()
update_icon()
/obj/item/melee/umbrella/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
toggle_umbrella()
/obj/item/melee/umbrella/proc/toggle_umbrella()
open = !open
icon_state = "umbrella_[open ? "open" : "closed"]"
addblends = icon_state + "_a"
item_state = icon_state
update_icon()
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
H.update_inv_l_hand(0)
H.update_inv_r_hand()
// Randomizes color
/obj/item/melee/umbrella/random/Initialize(mapload)
. = ..()
color = get_random_colour()
/obj/item/melee/cursedblade
name = "crystal blade"
desc = "The red crystal blade's polished surface glints in the light, giving off a faint glow."
icon_state = "soulblade"
slot_flags = SLOT_BELT | SLOT_BACK
force = 30
throwforce = 10
w_class = ITEMSIZE_NORMAL
sharp = TRUE
edge = TRUE
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
can_speak = 1
var/list/voice_mobs = list() //The curse of the sword is that it has someone trapped inside.
/obj/item/melee/cursedblade/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(default_parry_check(user, attacker, damage_source) && prob(50))
user.visible_message(span_danger("\The [user] parries [attack_text] with \the [src]!"))
playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
return 1
return 0
/obj/item/melee/cursedblade/proc/ghost_inhabit(var/mob/candidate)
if(!isobserver(candidate))
return
//Handle moving the ghost into the new shell.
announce_ghost_joinleave(candidate, 0, "They are occupying a cursed sword now.")
var/mob/living/voice/new_voice = new /mob/living/voice(src) //Make the voice mob the ghost is going to be.
new_voice.transfer_identity(candidate) //Now make the voice mob load from the ghost's active character in preferences.
new_voice.mind = candidate.mind //Transfer the mind, if any.
new_voice.ckey = candidate.ckey //Finally, bring the client over.
new_voice.name = "cursed sword" //Cursed swords shouldn't be known characters.
new_voice.real_name = "cursed sword"
voice_mobs.Add(new_voice)
GLOB.listening_objects |= src