Converts two-handedness/wielding to a component (#21619)

* initial checkin

* Add everything but maps

* update paths

* Patches some minor bugs across twohanded things

* remove a stowaway

* Update code/__DEFINES/dcs/signals.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* Contra review

* Fix kc

* hopefully fix file perms

* Fix file perms

* revert line-endings

* uh?

* Trying once again to fix file formats

* henri review 1

* henri review 2

* update from master

* Removes override that breaks modsuits

* re-add reference

---------

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
Luc
2023-09-01 22:06:59 +01:00
committed by GitHub
co-authored by Contrabang
parent b678937acc
commit 327add6348
94 changed files with 1615 additions and 1286 deletions
@@ -509,7 +509,7 @@
// snowflake checks my beloved
// this will become tooltype checks I swear
if(!istype(I, /obj/item/circular_saw) && !istype(I, /obj/item/twohanded/required/chainsaw) && !istype(I, /obj/item/twohanded/chainsaw))
if(!istype(I, /obj/item/circular_saw) && !istype(I, /obj/item/chainsaw) && !istype(I, /obj/item/butcher_chainsaw))
return
user.visible_message(
@@ -13,7 +13,7 @@
user.drop_r_hand()
else
to_chat(user, "<span class='notice'>Large blades of blood spring from your fingers!</span>")
var/obj/item/twohanded/required/vamp_claws/claws = new /obj/item/twohanded/required/vamp_claws(user.loc, src)
var/obj/item/vamp_claws/claws = new /obj/item/vamp_claws(user.loc, src)
RegisterSignal(user, COMSIG_MOB_WILLINGLY_DROP, PROC_REF(dispel))
user.put_in_hands(claws)
@@ -23,9 +23,9 @@
if(user.mind.has_antag_datum(/datum/antagonist/vampire))
return
var/current
if(istype(user.l_hand, /obj/item/twohanded/required/vamp_claws))
if(istype(user.l_hand, /obj/item/vamp_claws))
current = user.l_hand
if(istype(user.r_hand, /obj/item/twohanded/required/vamp_claws))
if(istype(user.r_hand, /obj/item/vamp_claws))
current = user.r_hand
if(current)
qdel(current)
@@ -36,7 +36,7 @@
if(L.canUnEquip(L.l_hand) && L.canUnEquip(L.r_hand))
return ..()
/obj/item/twohanded/required/vamp_claws
/obj/item/vamp_claws
name = "vampiric claws"
desc = "A pair of eldritch claws made of living blood, they seem to flow yet they are solid"
icon = 'icons/effects/vampire_effects.dmi'
@@ -44,7 +44,6 @@
w_class = WEIGHT_CLASS_BULKY
flags = ABSTRACT | NODROP | DROPDEL
force = 10
force_wielded = 10
armour_penetration_flat = 20
sharp = TRUE
attack_effect_override = ATTACK_EFFECT_CLAW
@@ -56,17 +55,18 @@
var/blood_absorbed_amount = 5
var/obj/effect/proc_holder/spell/vampire/self/vamp_claws/parent_spell
/obj/item/twohanded/required/vamp_claws/Initialize(mapload, new_parent_spell)
/obj/item/vamp_claws/Initialize(mapload, new_parent_spell)
. = ..()
AddComponent(/datum/component/two_handed, require_twohands = TRUE)
parent_spell = new_parent_spell
/obj/item/twohanded/required/vamp_claws/Destroy()
/obj/item/vamp_claws/Destroy()
if(parent_spell)
parent_spell.UnregisterSignal(parent_spell.action.owner, COMSIG_MOB_WILLINGLY_DROP)
parent_spell = null
return ..()
/obj/item/twohanded/required/vamp_claws/afterattack(atom/target, mob/user, proximity)
/obj/item/vamp_claws/afterattack(atom/target, mob/user, proximity)
if(!proximity)
return
@@ -91,12 +91,12 @@
qdel(src)
to_chat(user, "<span class='warning'>Your claws shatter!</span>")
/obj/item/twohanded/required/vamp_claws/melee_attack_chain(mob/user, atom/target, params)
/obj/item/vamp_claws/melee_attack_chain(mob/user, atom/target, params)
..()
if(wielded)
if(HAS_TRAIT(src, TRAIT_WIELDED))
user.changeNext_move(CLICK_CD_MELEE * 0.5)
/obj/item/twohanded/required/vamp_claws/attack_self(mob/user)
/obj/item/vamp_claws/attack_self(mob/user)
qdel(src)
to_chat(user, "<span class='notice'>You dispel your claws!</span>")
+1 -1
View File
@@ -386,7 +386,7 @@ GLOBAL_DATUM_INIT(global_prizes, /datum/prizes, new())
/datum/prize_item/chainsaw
name = "Toy Chainsaw"
desc = "A full-scale model chainsaw, based on that massacre in Space Texas."
typepath = /obj/item/twohanded/toy/chainsaw
typepath = /obj/item/toy/chainsaw
cost = 200
/datum/prize_item/bike
+2 -2
View File
@@ -774,7 +774,7 @@
icon_state = "dragon"
item_state = "dragon"
desc = "A suit of armour fashioned from the remains of an ash drake."
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe, /obj/item/twohanded/spear)
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe, /obj/item/spear)
armor = list(MELEE = 115, BULLET = 25, LASER = 25, ENERGY = 25, BOMB = 150, RAD = 25, FIRE = INFINITY, ACID = INFINITY)
hoodtype = /obj/item/clothing/head/hooded/drake
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
@@ -799,7 +799,7 @@
icon_state = "goliath_cloak"
item_state = "goliath_cloak"
desc = "A staunch, practical cape made out of numerous monster materials, it is coveted amongst exiles & hermits."
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/pickaxe, /obj/item/twohanded/spear, /obj/item/organ/internal/regenerative_core/legion, /obj/item/kitchen/knife/combat/survival)
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/pickaxe, /obj/item/spear, /obj/item/organ/internal/regenerative_core/legion, /obj/item/kitchen/knife/combat/survival)
armor = list(MELEE = 25, BULLET = 5, LASER = 15, ENERGY = 5, BOMB = 15, RAD = 0, FIRE = 75, ACID = 75) //a fair alternative to bone armor, requiring alternative materials and gaining a suit slot
hoodtype = /obj/item/clothing/head/hooded/goliath
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
+6 -6
View File
@@ -448,7 +448,7 @@
/datum/crafting_recipe/chainsaw
name = "Chainsaw"
result = list(/obj/item/twohanded/required/chainsaw)
result = list(/obj/item/chainsaw)
reqs = list(/obj/item/circular_saw = 1,
/obj/item/stack/cable_coil = 1,
/obj/item/stack/sheet/plasteel = 1)
@@ -460,7 +460,7 @@
/datum/crafting_recipe/spear
name = "Spear"
result = list(/obj/item/twohanded/spear)
result = list(/obj/item/spear)
reqs = list(/obj/item/restraints/handcuffs/cable = 1,
/obj/item/shard = 1,
/obj/item/stack/rods = 1)
@@ -519,7 +519,7 @@
/datum/crafting_recipe/garrote
name = "Makeshift Garrote"
result = list(/obj/item/twohanded/garrote/improvised)
result = list(/obj/item/garrote/improvised)
time = 15
reqs = list(/obj/item/stack/sheet/wood = 1,
/obj/item/stack/cable_coil = 5)
@@ -671,7 +671,7 @@
result = list(/obj/item/bombcore/chemical)
reqs = list(
/obj/item/stock_parts/matter_bin = 1,
/obj/item/twohanded/required/gibtonite = 1,
/obj/item/gibtonite = 1,
/obj/item/grenade/chem_grenade = 2
)
parts = list(/obj/item/stock_parts/matter_bin = 1, /obj/item/grenade/chem_grenade = 2)
@@ -771,7 +771,7 @@
/datum/crafting_recipe/bonespear
name = "Bone Spear"
result = list(/obj/item/twohanded/spear/bonespear)
result = list(/obj/item/spear/bonespear)
time = 30
reqs = list(/obj/item/stack/sheet/bone = 4,
/obj/item/stack/sheet/sinew = 1)
@@ -795,7 +795,7 @@
/datum/crafting_recipe/boneaxe
name = "Bone Axe"
result = list(/obj/item/twohanded/fireaxe/boneaxe)
result = list(/obj/item/fireaxe/boneaxe)
time = 50
reqs = list(/obj/item/stack/sheet/bone = 6,
/obj/item/stack/sheet/sinew = 3)
+10 -10
View File
@@ -370,27 +370,27 @@
new /obj/effect/decal/cleanable/ash(get_turf(src))
qdel(src)
/obj/item/twohanded/bostaff
/obj/item/bostaff
name = "bo staff"
desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts. Can be wielded to both kill and incapacitate."
force = 10
w_class = WEIGHT_CLASS_BULKY
slot_flags = SLOT_BACK
force_unwielded = 10
force_wielded = 24
throwforce = 20
throw_speed = 2
attack_verb = list("smashed", "slammed", "whacked", "thwacked")
icon_state = "bostaff0"
base_icon_state = "bostaff"
/obj/item/twohanded/bostaff/Initialize(mapload)
/obj/item/bostaff/Initialize(mapload)
. = ..()
AddComponent(/datum/component/parry, _stamina_constant = 2, _stamina_coefficient = 0.5, _parryable_attack_types = ALL_ATTACK_TYPES)
AddComponent(/datum/component/two_handed, force_wielded = 24, force_unwielded = force, icon_wielded = "[base_icon_state]1")
/obj/item/twohanded/bostaff/update_icon_state()
icon_state = "bostaff[wielded]"
/obj/item/bostaff/update_icon_state()
icon_state = "[base_icon_state]0"
/obj/item/twohanded/bostaff/attack(mob/target, mob/living/user)
/obj/item/bostaff/attack(mob/target, mob/living/user)
add_fingerprint(user)
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
@@ -414,7 +414,7 @@
return
switch(user.a_intent)
if(INTENT_DISARM)
if(!wielded)
if(!HAS_TRAIT(src, TRAIT_WIELDED))
return ..()
if(!ishuman(target))
return ..()
@@ -445,8 +445,8 @@
else
return ..()
/obj/item/twohanded/bostaff/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(wielded)
/obj/item/bostaff/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(HAS_TRAIT(src, TRAIT_WIELDED))
return ..()
return 0
@@ -1,16 +1,15 @@
/*********************Mining Hammer****************/
/obj/item/twohanded/kinetic_crusher
icon = 'icons/obj/mining.dmi'
icon_state = "crusher"
item_state = "crusher0"
/obj/item/kinetic_crusher
name = "proto-kinetic crusher"
desc = "An early design of the proto-kinetic accelerator, it is little more than a combination of various mining tools cobbled together, forming a high-tech club. \
While it is an effective mining tool, it did little to aid any but the most skilled and/or suicidal miners against local fauna."
icon = 'icons/obj/mining.dmi'
base_icon_state = "crusher"
icon_state = "crusher"
item_state = "crusher0"
force = 0 //You can't hit stuff unless wielded
w_class = WEIGHT_CLASS_BULKY
slot_flags = SLOT_BACK
force_unwielded = 0
force_wielded = 20
throwforce = 5
throw_speed = 4
armour_penetration_flat = 10
@@ -27,16 +26,22 @@
var/light_on = FALSE
var/brightness_on = 5
var/adaptive_damage_bonus = 0
/// Amount of force typically assigned when wielded
var/base_force_wielded = 20
/// Tracker for the current amount of force used when the item is wielded.
/// Note that this isn't wired to anything, and must be updated with AddComponent to have value.
var/force_wielded = 20
/obj/item/twohanded/kinetic_crusher/Initialize(mapload)
/obj/item/kinetic_crusher/Initialize(mapload)
. = ..()
AddComponent(/datum/component/parry, _stamina_constant = 2, _stamina_coefficient = 0.7, _parryable_attack_types = MELEE_ATTACK, _parry_cooldown = (7 / 3) SECONDS ) // 2.3333 seconds of cooldown for 30% uptime
AddComponent(/datum/component/two_handed, force_wielded = force_wielded, force_unwielded = force)
/obj/item/twohanded/kinetic_crusher/Destroy()
/obj/item/kinetic_crusher/Destroy()
QDEL_LIST_CONTENTS(trophies)
return ..()
/obj/item/twohanded/kinetic_crusher/examine(mob/living/user)
/obj/item/kinetic_crusher/examine(mob/living/user)
. = ..()
. += "<span class='notice'>Mark a large creature with the destabilizing force, then hit them in melee to do <b>[force + detonation_damage]</b> damage.</span>"
. += "<span class='notice'>Does <b>[force + detonation_damage + backstab_bonus]</b> damage if the target is backstabbed, instead of <b>[force + detonation_damage]</b>.</span>"
@@ -44,14 +49,14 @@
var/obj/item/crusher_trophy/T = t
. += "<span class='notice'>It has \a [T] attached, which causes [T.effect_desc()].</span>"
/obj/item/twohanded/kinetic_crusher/attackby(obj/item/I, mob/living/user)
/obj/item/kinetic_crusher/attackby(obj/item/I, mob/living/user)
if(istype(I, /obj/item/crusher_trophy))
var/obj/item/crusher_trophy/T = I
T.add_to(src, user)
else
return ..()
/obj/item/twohanded/kinetic_crusher/crowbar_act(mob/user, obj/item/I)
/obj/item/kinetic_crusher/crowbar_act(mob/user, obj/item/I)
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
@@ -63,9 +68,9 @@
else
to_chat(user, "<span class='warning'>There are no trophies on [src].</span>")
/obj/item/twohanded/kinetic_crusher/attack(mob/living/target, mob/living/carbon/user)
if(!wielded)
to_chat(user, "<span class='warning'>[src] is too heavy to use with one hand. You fumble and drop everything.")
/obj/item/kinetic_crusher/attack(mob/living/target, mob/living/carbon/user)
if(!HAS_TRAIT(src, TRAIT_WIELDED))
to_chat(user, "<span class='warning'>[src] is too heavy to use with one hand. You fumble and drop everything.</span>")
user.drop_r_hand()
user.drop_l_hand()
return
@@ -90,9 +95,9 @@
if(!QDELETED(C) && !QDELETED(target))
C.total_damage += target_health - target.health //we did some damage, but let's not assume how much we did
/obj/item/twohanded/kinetic_crusher/afterattack(atom/target, mob/living/user, proximity_flag, clickparams)
/obj/item/kinetic_crusher/afterattack(atom/target, mob/living/user, proximity_flag, clickparams)
. = ..()
if(!wielded)
if(!HAS_TRAIT(src, TRAIT_WIELDED))
return
if(user.has_status_effect(STATUS_EFFECT_DASH) && user.a_intent == INTENT_HELP)
if(user.throw_at(target, range = 3, speed = 3, spin = FALSE, diagonals_first = TRUE))
@@ -148,28 +153,28 @@
C.total_damage += detonation_damage
L.apply_damage(detonation_damage, BRUTE, blocked = def_check)
/obj/item/twohanded/kinetic_crusher/proc/Recharge()
/obj/item/kinetic_crusher/proc/Recharge()
if(!charged)
charged = TRUE
update_icon()
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
/obj/item/twohanded/kinetic_crusher/ui_action_click(mob/user, actiontype)
/obj/item/kinetic_crusher/ui_action_click(mob/user, actiontype)
light_on = !light_on
playsound(user, 'sound/weapons/empty.ogg', 100, TRUE)
update_brightness(user)
update_icon()
/obj/item/twohanded/kinetic_crusher/proc/update_brightness(mob/user = null)
/obj/item/kinetic_crusher/proc/update_brightness(mob/user = null)
if(light_on)
set_light(brightness_on)
else
set_light(0)
/obj/item/twohanded/kinetic_crusher/update_icon_state()
item_state = "crusher[wielded]"
/obj/item/kinetic_crusher/update_icon_state()
item_state = "crusher[HAS_TRAIT(src, TRAIT_WIELDED)]"
/obj/item/twohanded/kinetic_crusher/update_overlays()
/obj/item/kinetic_crusher/update_overlays()
. = ..()
if(!charged)
. += "[icon_state]_uncharged"
@@ -190,7 +195,7 @@
flag = BOMB
range = 6
log_override = TRUE
var/obj/item/twohanded/kinetic_crusher/hammer_synced
var/obj/item/kinetic_crusher/hammer_synced
/obj/item/projectile/destabilizer/Destroy()
hammer_synced = null
@@ -232,12 +237,12 @@
return "errors"
/obj/item/crusher_trophy/attackby(obj/item/A, mob/living/user)
if(istype(A, /obj/item/twohanded/kinetic_crusher))
if(istype(A, /obj/item/kinetic_crusher))
add_to(A, user)
else
..()
/obj/item/crusher_trophy/proc/add_to(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
/obj/item/crusher_trophy/proc/add_to(obj/item/kinetic_crusher/H, mob/living/user)
for(var/t in H.trophies)
var/obj/item/crusher_trophy/T = t
if(istype(T, denied_type) || istype(src, T.denied_type))
@@ -250,14 +255,14 @@
to_chat(user, "<span class='notice'>You attach [src] to [H].</span>")
return TRUE
/obj/item/crusher_trophy/proc/remove_from(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
/obj/item/crusher_trophy/proc/remove_from(obj/item/kinetic_crusher/H, mob/living/user)
forceMove(get_turf(H))
H.trophies -= src
return TRUE
/obj/item/crusher_trophy/Destroy()
if(istype(loc, /obj/item/twohanded/kinetic_crusher))
var/obj/item/twohanded/kinetic_crusher/crusher = loc
if(istype(loc, /obj/item/kinetic_crusher))
var/obj/item/kinetic_crusher/crusher = loc
crusher.trophies -= src
return ..()
@@ -353,12 +358,12 @@
/obj/item/crusher_trophy/legion_skull/effect_desc()
return "a kinetic crusher to recharge <b>[bonus_value*0.1]</b> second\s faster"
/obj/item/crusher_trophy/legion_skull/add_to(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
/obj/item/crusher_trophy/legion_skull/add_to(obj/item/kinetic_crusher/H, mob/living/user)
. = ..()
if(.)
H.charge_time -= bonus_value
/obj/item/crusher_trophy/legion_skull/remove_from(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
/obj/item/crusher_trophy/legion_skull/remove_from(obj/item/kinetic_crusher/H, mob/living/user)
. = ..()
if(.)
H.charge_time += bonus_value
@@ -425,20 +430,21 @@
/obj/item/crusher_trophy/demon_claws/effect_desc()
return "melee hits to do <b>[bonus_value * 0.2]</b> more damage and heal you for <b>[bonus_value * 0.1]</b>, with <b>5X</b> effect on mark detonation"
/obj/item/crusher_trophy/demon_claws/add_to(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
/obj/item/crusher_trophy/demon_claws/add_to(obj/item/kinetic_crusher/H, mob/living/user)
. = ..()
if(.)
H.force += bonus_value * 0.2
H.force_unwielded += bonus_value * 0.2
H.force_wielded += bonus_value * 0.2
// don't update force since KCs have 0 force by default
H.AddComponent(/datum/component/two_handed, force_wielded = H.force_wielded, force_unwielded = H.force)
H.detonation_damage += bonus_value * 0.8
/obj/item/crusher_trophy/demon_claws/remove_from(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
/obj/item/crusher_trophy/demon_claws/remove_from(obj/item/kinetic_crusher/H, mob/living/user)
. = ..()
if(.)
H.force -= bonus_value * 0.2
H.force_unwielded -= bonus_value * 0.2
H.force_wielded -= bonus_value * 0.2
H.AddComponent(/datum/component/two_handed, force_wielded = H.force_wielded, force_unwielded = H.force)
H.detonation_damage -= bonus_value * 0.8
/obj/item/crusher_trophy/demon_claws/on_melee_hit(mob/living/target, mob/living/user)
@@ -504,12 +510,12 @@
/obj/item/crusher_trophy/adaptive_intelligence_core/effect_desc()
return "melee hits deal <b>[bonus_value]</b> more damage per hit after hitting a target, up to <b>[bonus_value * 10]</b> extra damage to that target"
/obj/item/crusher_trophy/adaptive_intelligence_core/add_to(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
/obj/item/crusher_trophy/adaptive_intelligence_core/add_to(obj/item/kinetic_crusher/H, mob/living/user)
. = ..()
if(.)
H.adaptive_damage_bonus += bonus_value
/obj/item/crusher_trophy/adaptive_intelligence_core/remove_from(obj/item/twohanded/kinetic_crusher/H, mob/living/user)
/obj/item/crusher_trophy/adaptive_intelligence_core/remove_from(obj/item/kinetic_crusher/H, mob/living/user)
. = ..()
if(.)
H.adaptive_damage_bonus -= bonus_value
@@ -151,7 +151,7 @@
name = "champion's hardsuit"
desc = "Voices echo from the hardsuit, driving the user insane. Is not space-proof."
icon_state = "hardsuit-berserker"
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe, /obj/item/twohanded/spear)
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe, /obj/item/spear)
armor = list(MELEE = 30, BULLET = 15, LASER = 10, ENERGY = 10, BOMB = 150, RAD = 0, FIRE = INFINITY, ACID = INFINITY)
hoodtype = /obj/item/clothing/head/hooded/berserker
flags_inv = HIDEGLOVES | HIDESHOES | HIDEJUMPSUIT | HIDETAIL
+2 -2
View File
@@ -69,7 +69,7 @@
prize_list["Digging Tools"] = list(
EQUIPMENT("Diamond Pickaxe", /obj/item/pickaxe/diamond, 2000),
EQUIPMENT("Kinetic Accelerator", /obj/item/gun/energy/kinetic_accelerator, 750),
EQUIPMENT("Kinetic Crusher", /obj/item/twohanded/kinetic_crusher, 750),
EQUIPMENT("Kinetic Crusher", /obj/item/kinetic_crusher, 750),
EQUIPMENT("Resonator", /obj/item/resonator, 800),
EQUIPMENT("Silver Pickaxe", /obj/item/pickaxe/silver, 1000),
EQUIPMENT("Super Resonator", /obj/item/resonator/upgraded, 2500),
@@ -261,7 +261,7 @@
new /obj/item/stack/marker_beacon/thirty(drop_location)
if("Crusher Kit")
new /obj/item/extinguisher/mini(drop_location)
new /obj/item/twohanded/kinetic_crusher(drop_location)
new /obj/item/kinetic_crusher(drop_location)
if("Mining Conscription Kit")
new /obj/item/storage/backpack/duffel/mining_conscript(drop_location)
+12 -8
View File
@@ -221,7 +221,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
icon_state = "slag"
singular_name = "slag chunk"
/obj/item/twohanded/required/gibtonite
/obj/item/gibtonite
name = "gibtonite ore"
desc = "Extremely explosive if struck with mining equipment, Gibtonite is often used by miners to speed up their work by using it as a mining charge. This material is illegal to possess by unauthorized personnel under space law."
icon = 'icons/obj/mining.dmi'
@@ -236,13 +236,17 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
var/attacher = "UNKNOWN"
var/datum/wires/explosive/gibtonite/wires
/obj/item/twohanded/required/gibtonite/Destroy()
/obj/item/gibtonite/Initialize(mapload)
. = ..()
AddComponent(/datum/component/two_handed, require_twohands = TRUE)
/obj/item/gibtonite/Destroy()
if(wires)
SStgui.close_uis(wires)
QDEL_NULL(wires)
return ..()
/obj/item/twohanded/required/gibtonite/attackby(obj/item/I, mob/user, params)
/obj/item/gibtonite/attackby(obj/item/I, mob/user, params)
if(!wires && istype(I, /obj/item/assembly/igniter))
user.visible_message("[user] attaches [I] to [src].", "<span class='notice'>You attach [I] to [src].</span>")
wires = new(src)
@@ -268,24 +272,24 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
return
..()
/obj/item/twohanded/required/gibtonite/attack_ghost(mob/user)
/obj/item/gibtonite/attack_ghost(mob/user)
if(wires)
wires.Interact(user)
/obj/item/twohanded/required/gibtonite/attack_self(mob/user)
/obj/item/gibtonite/attack_self(mob/user)
if(wires)
wires.Interact(user)
else
..()
/obj/item/twohanded/required/gibtonite/bullet_act(obj/item/projectile/P)
/obj/item/gibtonite/bullet_act(obj/item/projectile/P)
GibtoniteReaction(P.firer)
..()
/obj/item/twohanded/required/gibtonite/ex_act()
/obj/item/gibtonite/ex_act()
GibtoniteReaction(null, 1)
/obj/item/twohanded/required/gibtonite/proc/GibtoniteReaction(mob/user, triggered_by = 0)
/obj/item/gibtonite/proc/GibtoniteReaction(mob/user, triggered_by = 0)
if(!primed)
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,1)
primed = 1
+4
View File
@@ -28,6 +28,10 @@
return item_to_test && item_to_test.is_equivalent(I)
/// Check if an item is in one of our hands
/mob/proc/is_holding(obj/item/I)
return istype(I) && (I == r_hand || I == l_hand)
//Returns the thing in our inactive hand
/mob/proc/get_inactive_hand()
+5 -14
View File
@@ -192,12 +192,8 @@
KnockDown(6 SECONDS)
/mob/living/carbon/swap_hand()
var/obj/item/item_in_hand = get_active_hand()
if(item_in_hand) //this segment checks if the item in your hand is twohanded.
if(istype(item_in_hand,/obj/item/twohanded))
if(item_in_hand:wielded == 1)
to_chat(usr, "<span class='warning'>Your other hand is too busy holding the [item_in_hand.name]</span>")
return
if(SEND_SIGNAL(src, COMSIG_MOB_SWAPPING_HANDS, get_active_hand()) == COMPONENT_BLOCK_SWAP)
return
hand = !hand
update_hands_hud()
SEND_SIGNAL(src, COMSIG_CARBON_SWAP_HANDS)
@@ -627,8 +623,8 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
hit_atom.hit_by_thrown_carbon(src, throwingdatum, damage, FALSE, FALSE)
/mob/living/carbon/hit_by_thrown_carbon(mob/living/carbon/human/C, datum/thrownthing/throwingdatum, damage, mob_hurt, self_hurt)
for(var/obj/item/twohanded/dualsaber/D in contents)
if(D.wielded && D.force)
for(var/obj/item/dualsaber/D in contents)
if(HAS_TRAIT(src, TRAIT_WIELDED) && D.force)
visible_message("<span class='danger'>[src] impales [C] with [D], before dropping them on the ground!</span>")
C.apply_damage(100, BRUTE, "chest", sharp = TRUE, used_weapon = "Impaled on [D].")
C.Stun(2 SECONDS) //Punishment. This could also be used by a traitor to throw someone into a dsword to kill them, but hey, teamwork!
@@ -1029,13 +1025,8 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
//called when we get cuffed/uncuffed
/mob/living/carbon/proc/update_handcuffed()
SEND_SIGNAL(src, COMSIG_CARBON_UPDATE_HANDCUFFED, handcuffed)
if(handcuffed)
//we don't want problems with nodrop shit if there ever is more than one nodrop twohanded
var/obj/item/I = get_active_hand()
if(istype(I, /obj/item/twohanded))
var/obj/item/twohanded/TH = I //FML
if(TH.wielded)
TH.unwield()
drop_r_hand()
drop_l_hand()
stop_pulling()
@@ -5,7 +5,7 @@
return FALSE
if(get_active_hand())
return FALSE
if(istype(AM, /obj/item/twohanded))
if(AM.GetComponent(/datum/component/two_handed))
if(get_inactive_hand())
return FALSE
put_in_active_hand(AM)
@@ -370,7 +370,7 @@
suit = /obj/item/clothing/suit/armor/bone
gloves = /obj/item/clothing/gloves/bracer
if(prob(5))
back = pickweight(list(/obj/item/twohanded/spear/bonespear = 3, /obj/item/twohanded/fireaxe/boneaxe = 2))
back = pickweight(list(/obj/item/spear/bonespear = 3, /obj/item/fireaxe/boneaxe = 2))
if(prob(10))
belt = /obj/item/storage/belt/mining/primitive
if(prob(30))
@@ -45,6 +45,6 @@
melee_damage_upper = 20
deathmessage = "collapses into a pile of bones, its gear falling to the floor!"
loot = list(/obj/effect/decal/remains/human,
/obj/item/twohanded/spear,
/obj/item/spear,
/obj/item/clothing/shoes/winterboots,
/obj/item/clothing/suit/hooded/wintercoat)
+4 -4
View File
@@ -129,7 +129,7 @@
slowdown_active = 0.75
allowed_suit_storage = list(
/obj/item/rcd,
/obj/item/twohanded/fireaxe,
/obj/item/fireaxe,
)
skins = list(
"engineering" = list(
@@ -181,7 +181,7 @@
slowdown_active = 0.75
allowed_suit_storage = list(
/obj/item/rcd,
/obj/item/twohanded/fireaxe/,
/obj/item/fireaxe/,
/obj/item/rpd,
/obj/item/t_scanner,
/obj/item/analyzer
@@ -239,7 +239,7 @@
allowed_suit_storage = list(
/obj/item/analyzer,
/obj/item/rcd,
/obj/item/twohanded/fireaxe,
/obj/item/fireaxe,
/obj/item/melee/classic_baton/telescopic,
/obj/item/rpd,
/obj/item/t_scanner,
@@ -309,7 +309,7 @@
/obj/item/mining_scanner,
/obj/item/t_scanner/adv_mining_scanner,
/obj/item/pickaxe,
/obj/item/twohanded/kinetic_crusher,
/obj/item/kinetic_crusher,
/obj/item/stack/ore/plasma,
/obj/item/storage/bag/ore,
/obj/item/gun/energy/kinetic_accelerator,
+2 -2
View File
@@ -96,8 +96,8 @@ By design, d1 is the smallest direction and d2 is the highest
return
coil.cable_join(src, user)
else if(istype(W, /obj/item/twohanded/rcl))
var/obj/item/twohanded/rcl/R = W
else if(istype(W, /obj/item/rcl))
var/obj/item/rcl/R = W
if(R.loaded)
R.loaded.cable_join(src, user)
R.is_empty(user)
+4 -1
View File
@@ -148,7 +148,7 @@
amount = 25
max_amount = 25
resistance_flags = FLAMMABLE
var/static/list/no_wrap = list(/obj/item/smallDelivery, /obj/structure/bigDelivery, /obj/item/evidencebag, /obj/structure/closet/body_bag, /obj/item/twohanded/required)
var/static/list/no_wrap = list(/obj/item/smallDelivery, /obj/structure/bigDelivery, /obj/item/evidencebag, /obj/structure/closet/body_bag)
/obj/item/stack/packageWrap/pre_attack(atom/A, mob/living/user, params)
. = ..()
@@ -198,6 +198,9 @@
return FALSE
D.init_welded = C.welded
C.welded = TRUE
else if (target.GetComponent(/datum/component/two_handed))
to_chat(user, "<span class='notice'>[target] is too unwieldy to wrap effectively.</span>")
return FALSE
else
to_chat(user, "<span class='notice'>The object you are trying to wrap is unsuitable for the sorting machinery.</span>")
return FALSE
@@ -692,7 +692,7 @@
id = "rcl"
build_type = AUTOLATHE
materials = list(MAT_METAL = 5000)
build_path = /obj/item/twohanded/rcl
build_path = /obj/item/rcl
category = list("initial", "Construction")
//hacked autolathe recipes
+1 -1
View File
@@ -497,7 +497,7 @@
/obj/item/grenade/chem_grenade/antiweed = 2,
/obj/item/lightreplacer = 1,
/obj/item/storage/bag/trash = 1,
/obj/item/twohanded/push_broom,
/obj/item/push_broom,
/obj/item/storage/box/lights/mixed = 1,
/obj/item/melee/flyswatter = 1)
+5 -1
View File
@@ -1,4 +1,4 @@
/obj/item/twohanded/required/golden_record
/obj/item/golden_record
name = "Golden Record"
desc = "A relic of the past, you don't know what lies inside, but you remember someone talking about it arriving in 250356 years"
icon = 'icons/obj/space/voyager.dmi'
@@ -12,6 +12,10 @@
resistance_flags = FIRE_PROOF | ACID_PROOF
origin_tech = "programming=6;biotech=6"
/obj/item/golden_record/Initialize(mapload)
. = ..()
AddComponent(/datum/component/two_handed, require_twohands = TRUE)
/turf/simulated/satellite
name = "satellite components storage"
desc = "There is plate covering inside storage, its wide and it have engraved 'Voyager' on it."
+1 -1
View File
@@ -102,7 +102,7 @@
/obj/item/gun/projectile/shotgun/toy/crossbow = 1,
/obj/item/gun/projectile/shotgun/toy/tommygun = 1,
/obj/item/gun/projectile/automatic/sniper_rifle/toy = 1,
/obj/item/twohanded/dualsaber/toy = 5,
/obj/item/dualsaber/toy = 5,
/obj/machinery/snow_machine = 10,
/obj/item/clothing/head/kitty = 5,
/obj/item/coin/antagtoken = 5,
@@ -151,7 +151,7 @@
/obj/item/reagent_containers/glass/bucket,
/obj/item/reagent_containers/glass/bucket,
/obj/item/mop,
/obj/item/twohanded/push_broom,
/obj/item/push_broom,
/obj/item/caution,
/obj/item/caution,
/obj/item/caution,
@@ -225,7 +225,7 @@
/datum/supply_packs/misc/costume
name = "Costume Crate"
contains = list(/obj/item/twohanded/staff,
contains = list(/obj/item/staff,
/obj/item/clothing/suit/wizrobe/fake,
/obj/item/clothing/shoes/sandal,
/obj/item/clothing/head/wizard/fake,
@@ -441,12 +441,12 @@
/datum/supply_packs/misc/polo //For space polo! Or horsehead Quiditch
name = "Polo Supply Crate"
// 6 brooms, 6 horse masks for the brooms, and 1 beach ball
contains = list(/obj/item/twohanded/staff/broom,
/obj/item/twohanded/staff/broom,
/obj/item/twohanded/staff/broom,
/obj/item/twohanded/staff/broom,
/obj/item/twohanded/staff/broom,
/obj/item/twohanded/staff/broom,
contains = list(/obj/item/staff/broom,
/obj/item/staff/broom,
/obj/item/staff/broom,
/obj/item/staff/broom,
/obj/item/staff/broom,
/obj/item/staff/broom,
/obj/item/clothing/mask/horsehead,
/obj/item/clothing/mask/horsehead,
/obj/item/clothing/mask/horsehead,
+1 -1
View File
@@ -14,7 +14,7 @@
/obj/item/kitchen/knife = 90,
/obj/item/shard = 60,
/obj/item/scissors = 12,
/obj/item/twohanded/chainsaw = 1,
/obj/item/butcher_chainsaw = 1,
/obj/item/claymore = 6,
/obj/item/melee/energy = 6,
/obj/item/pen/edagger = 6,
+1 -1
View File
@@ -117,7 +117,7 @@
var/obj/item/arm_item = owner.get_item_by_slot(arm_slot)
if(arm_item)
if(istype(arm_item, /obj/item/twohanded/offhand))
if(istype(arm_item, /obj/item/offhand))
var/obj/item/offhand_arm_item = owner.get_active_hand()
to_chat(owner, "<span class='warning'>Your hands are too encumbered wielding [offhand_arm_item] to deploy [src]!</span>")
return
+1 -1
View File
@@ -714,7 +714,7 @@
/obj/item/kitchen/knife = 90,
/obj/item/shard = 60,
/obj/item/scissors = 12,
/obj/item/twohanded/chainsaw = 1,
/obj/item/butcher_chainsaw = 1,
/obj/item/claymore = 6,
/obj/item/melee/energy = 6,
/obj/item/pen/edagger = 6