diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm
index 6e21fbe06a..da5981ff8a 100644
--- a/code/__DEFINES/citadel_defines.dm
+++ b/code/__DEFINES/citadel_defines.dm
@@ -123,7 +123,6 @@
#define STAMINA_CRIT 140 //crit for stamina damage. forces a rest, and stops movement until stamina goes back to stamina softcrit
#define STAMINA_SOFTCRIT_TRADITIONAL 0 //same as STAMINA_SOFTCRIT except for the more traditional health calculations
#define STAMINA_CRIT_TRADITIONAL -40 //ditto, but for STAMINA_CRIT
-#define MIN_MELEE_STAMCOST 1.25 //Minimum cost for swinging items around. Will be extra useful when stats and skills are introduced.
#define CRAWLUNDER_DELAY 30 //Delay for crawling under a standing mob
diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm
index 7cab82149d..e31d2a278e 100644
--- a/code/__DEFINES/combat.dm
+++ b/code/__DEFINES/combat.dm
@@ -183,4 +183,16 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
#define BODY_ZONE_PRECISE_R_FOOT "r_foot"
//We will round to this value in damage calculations.
-#define DAMAGE_PRECISION 0.1
\ No newline at end of file
+#define DAMAGE_PRECISION 0.1
+
+//items total mass, used to calculate their attacks' stamina costs. If not defined, the cost will be (w_class * 1.25)
+#define TOTAL_MASS_TINY_ITEM 1.25
+#define TOTAL_MASS_SMALL_ITEM 2.5
+#define TOTAL_MASS_NORMAL_ITEM 3.75
+#define TOTAL_MASS_BULKY_ITEM 5
+#define TOTAL_MASS_HUGE_ITEM 6.25
+#define TOTAL_MASS_GIGANTIC_ITEM 7.5
+
+#define TOTAL_MASS_HAND_REPLACEMENT 5 //standard punching stamina cost. most hand replacements are huge items anyway.
+#define TOTAL_MASS_MEDIEVAL_WEAPON 3.6 //very, very generic average sword/warpick/etc. weight in pounds.
+#define TOTAL_MASS_TOY_SWORD 1.5
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index 3896c3eac3..6455b4ccb6 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -171,3 +171,7 @@
if(prob(2))
playsound(src, 'sound/weapons/dink.ogg', 30, 1)
return 1
+
+/obj/item/proc/getweight()
+ return total_mass || w_class * 1.25
+
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index e38445f606..4bce450359 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -45,8 +45,8 @@
/obj/item/gun/ballistic/automatic/toy/pistol/unrestricted = ARCADE_WEIGHT_TRICK,
/obj/item/hot_potato/harmless/toy = ARCADE_WEIGHT_RARE,
/obj/item/twohanded/dualsaber/toy = ARCADE_WEIGHT_RARE,
- /obj/item/twohanded/hypereutactic/toy = ARCADE_WEIGHT_RARE,
- /obj/item/twohanded/hypereutactic/toy/rainbow = ARCADE_WEIGHT_RARE,
+ /obj/item/twohanded/dualsaber/hypereutactic/toy = ARCADE_WEIGHT_RARE,
+ /obj/item/twohanded/dualsaber/hypereutactic/toy/rainbow = ARCADE_WEIGHT_RARE,
/obj/item/storage/box/snappops = ARCADE_WEIGHT_TRICK,
/obj/item/clothing/under/syndicate/tacticool = ARCADE_WEIGHT_TRICK,
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index e17fe20977..566a64577d 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -33,6 +33,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/usesound = null
var/throwhitsound = null
var/w_class = WEIGHT_CLASS_NORMAL
+ var/total_mass //Total mass in arbitrary pound-like values. If there's no balance reasons for an item to have otherwise, this var should be the item's weight in pounds.
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
pass_flags = PASSTABLE
pressure_resistance = 4
diff --git a/code/game/objects/items/his_grace.dm b/code/game/objects/items/his_grace.dm
index 65a4bd542b..c6f246ab97 100644
--- a/code/game/objects/items/his_grace.dm
+++ b/code/game/objects/items/his_grace.dm
@@ -14,6 +14,7 @@
icon = 'icons/obj/items_and_weapons.dmi'
w_class = WEIGHT_CLASS_GIGANTIC
force = 12
+ total_mass = TOTAL_MASS_NORMAL_ITEM // average toolbox
attack_verb = list("robusted")
hitsound = 'sound/weapons/smash.ogg'
var/awakened = FALSE
diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm
index 0e8a9fef9e..ad4384f9f5 100644
--- a/code/game/objects/items/holy_weapons.dm
+++ b/code/game/objects/items/holy_weapons.dm
@@ -285,14 +285,12 @@
hitsound = 'sound/weapons/sear.ogg'
damtype = BURN
attack_verb = list("punched", "cross countered", "pummeled")
-
+ total_mass = TOTAL_MASS_HAND_REPLACEMENT
/obj/item/nullrod/godhand/Initialize()
. = ..()
ADD_TRAIT(src, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT)
-
-
/obj/item/nullrod/staff
icon_state = "godstaff-red"
item_state = "godstaff-red"
@@ -330,6 +328,7 @@
sharpness = IS_SHARP
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
+ total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
/obj/item/nullrod/claymore/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(attack_type == PROJECTILE_ATTACK)
@@ -523,6 +522,7 @@
slot_flags = ITEM_SLOT_BELT
w_class = WEIGHT_CLASS_HUGE
attack_verb = list("smashed", "bashed", "hammered", "crunched")
+ total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
/obj/item/nullrod/chainsaw
name = "chainsaw hand"
@@ -536,6 +536,7 @@
sharpness = IS_SHARP
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = 'sound/weapons/chainsawhit.ogg'
+ total_mass = TOTAL_MASS_HAND_REPLACEMENT
/obj/item/nullrod/chainsaw/Initialize()
. = ..()
@@ -612,6 +613,7 @@
item_flags = ABSTRACT
w_class = WEIGHT_CLASS_HUGE
sharpness = IS_SHARP
+ total_mass = TOTAL_MASS_HAND_REPLACEMENT
/obj/item/nullrod/armblade/Initialize()
. = ..()
@@ -672,6 +674,7 @@
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
item_flags = SLOWS_WHILE_IN_HAND
+ total_mass = TOTAL_MASS_NORMAL_ITEM
/obj/item/nullrod/tribal_knife/Initialize(mapload)
. = ..()
diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm
index 935d2a007e..d854ab9f5a 100644
--- a/code/game/objects/items/melee/energy.dm
+++ b/code/game/objects/items/melee/energy.dm
@@ -5,9 +5,12 @@
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
resistance_flags = FIRE_PROOF
var/brightness_on = 3
+ total_mass = 0.4 //Survival flashlights typically weigh around 5 ounces.
+
/obj/item/melee/transforming/energy/Initialize()
. = ..()
+ total_mass_on = (total_mass_on ? total_mass_on : (w_class_on * 0.75))
if(active)
set_light(brightness_on)
START_PROCESSING(SSobj, src)
@@ -79,6 +82,7 @@
attack_verb_off = list("attacked", "chopped", "cleaved", "torn", "cut")
attack_verb_on = list()
light_color = "#40ceff"
+ total_mass = null
/obj/item/melee/transforming/energy/axe/suicide_act(mob/user)
user.visible_message("[user] swings [src] towards [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!")
diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm
index daeceb7f87..cdb9c146e2 100644
--- a/code/game/objects/items/melee/misc.dm
+++ b/code/game/objects/items/melee/misc.dm
@@ -44,6 +44,7 @@
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "impaled", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharpness = IS_SHARP
+ total_mass = TOTAL_MASS_HAND_REPLACEMENT
/obj/item/melee/synthetic_arm_blade/Initialize()
. = ..()
@@ -67,6 +68,7 @@
attack_verb = list("slashed", "cut")
hitsound = 'sound/weapons/rapierhit.ogg'
materials = list(MAT_METAL = 1000)
+ total_mass = 3.4
/obj/item/melee/sabre/Initialize()
. = ..()
@@ -155,6 +157,7 @@
w_class = WEIGHT_CLASS_BULKY
sharpness = IS_SHARP_ACCURATE //It cant be sharpend cook -_-
attack_verb = list("slashed", "cut", "pierces", "pokes")
+ total_mass = 3.4
/obj/item/melee/rapier/Initialize()
. = ..()
@@ -242,6 +245,7 @@
item_flags = NONE
force = 0
on = FALSE
+ total_mass = TOTAL_MASS_SMALL_ITEM
/obj/item/melee/classic_baton/telescopic/suicide_act(mob/user)
var/mob/living/carbon/human/H = user
@@ -402,6 +406,7 @@
var/static/list/ovens
var/on = FALSE
var/datum/beam/beam
+ total_mass = 2.5
/obj/item/melee/roastingstick/Initialize()
. = ..()
diff --git a/code/game/objects/items/melee/transforming.dm b/code/game/objects/items/melee/transforming.dm
index 0d39e6c847..aabb930bb2 100644
--- a/code/game/objects/items/melee/transforming.dm
+++ b/code/game/objects/items/melee/transforming.dm
@@ -13,6 +13,7 @@
var/list/nemesis_factions //Any mob with a faction that exists in this list will take bonus damage/effects
var/w_class_on = WEIGHT_CLASS_BULKY
var/clumsy_check = TRUE
+ var/total_mass_on //Total mass in ounces when transformed. Primarily for balance purposes. Don't think about it too hard.
/obj/item/melee/transforming/Initialize()
. = ..()
@@ -46,6 +47,7 @@
active = !active
if(active)
force = force_on
+ total_mass = total_mass_on
throwforce = throwforce_on
hitsound = hitsound_on
throw_speed = 4
@@ -62,6 +64,7 @@
attack_verb = attack_verb_off
icon_state = initial(icon_state)
w_class = initial(w_class)
+ total_mass = initial(total_mass)
if(is_sharp())
var/datum/component/butchering/BT = LoadComponent(/datum/component/butchering)
BT.butchering_enabled = TRUE
@@ -84,4 +87,4 @@
/obj/item/melee/transforming/proc/clumsy_transform_effect(mob/living/user)
if(clumsy_check && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
to_chat(user, "You accidentally cut yourself with [src], like a doofus!")
- user.take_bodypart_damage(5,5)
+ user.take_bodypart_damage(5,5)
\ No newline at end of file
diff --git a/code/game/objects/items/singularityhammer.dm b/code/game/objects/items/singularityhammer.dm
index 1fe57d151f..b6559c9091 100644
--- a/code/game/objects/items/singularityhammer.dm
+++ b/code/game/objects/items/singularityhammer.dm
@@ -16,6 +16,7 @@
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
resistance_flags = FIRE_PROOF | ACID_PROOF
force_string = "LORD SINGULOTH HIMSELF"
+ total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
/obj/item/twohanded/singularityhammer/New()
..()
@@ -84,6 +85,7 @@
throwforce = 30
throw_range = 7
w_class = WEIGHT_CLASS_HUGE
+ total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
/obj/item/twohanded/mjollnir/proc/shock(mob/living/target)
target.Stun(60)
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 9ac5261e5f..46fabea8b0 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -30,6 +30,7 @@
throw_speed = 3
throw_range = 7
force = 0
+ total_mass = TOTAL_MASS_TINY_ITEM
/*
@@ -112,10 +113,6 @@
/obj/item/toy/syndicateballoon
name = "syndicate balloon"
desc = "There is a tag on the back that reads \"FUK NT!11!\"."
- throwforce = 0
- throw_speed = 3
- throw_range = 7
- force = 0
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "syndballoon"
item_state = "syndballoon"
@@ -225,6 +222,8 @@
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("attacked", "struck", "hit")
var/hacked = FALSE
+ total_mass = 0.4
+ var/total_mass_on = TOTAL_MASS_TOY_SWORD
/obj/item/toy/sword/attack_self(mob/user)
active = !( active )
@@ -274,6 +273,9 @@
else
return ..()
+/obj/item/toy/sword/getweight()
+ return (active ? total_mass_on : total_mass) || w_class *1.25
+
/*
* Foam armblade
*/
@@ -327,12 +329,13 @@
force_unwielded = 0
force_wielded = 0
attack_verb = list("attacked", "struck", "hit")
+ total_mass_on = TOTAL_MASS_TOY_SWORD
/obj/item/twohanded/dualsaber/toy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
- return 0
+ return FALSE
/obj/item/twohanded/dualsaber/toy/IsReflect()//Stops Toy Dualsabers from reflecting energy projectiles
- return 0
+ return FALSE
/obj/item/toy/katana
name = "replica katana"
@@ -346,6 +349,7 @@
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK
force = 5
throwforce = 5
+ total_mass = null
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("attacked", "slashed", "stabbed", "sliced")
hitsound = 'sound/weapons/bladeslice.ogg'
diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm
index bf63a96f05..781a82513e 100644
--- a/code/game/objects/items/twohanded.dm
+++ b/code/game/objects/items/twohanded.dm
@@ -28,6 +28,8 @@
var/force_wielded = 0
var/wieldsound = null
var/unwieldsound = null
+ var/slowdown_wielded = 0
+ item_flags = SLOWS_WHILE_IN_HAND
/obj/item/twohanded/proc/unwield(mob/living/carbon/user, show_message = TRUE)
if(!wielded || !user)
@@ -55,7 +57,7 @@
var/obj/item/twohanded/offhand/O = user.get_inactive_held_item()
if(O && istype(O))
O.unwield()
- return
+ slowdown -= slowdown_wielded
/obj/item/twohanded/proc/wield(mob/living/carbon/user)
if(wielded)
@@ -85,7 +87,7 @@
O.desc = "Your second grip on [src]."
O.wielded = TRUE
user.put_in_inactive_hand(O)
- return
+ slowdown += slowdown_wielded
/obj/item/twohanded/dropped(mob/user)
. = ..()
@@ -279,6 +281,7 @@
wieldsound = 'sound/weapons/saberon.ogg'
unwieldsound = 'sound/weapons/saberoff.ogg'
hitsound = "swing_hit"
+ var/hitsound_on = 'sound/weapons/blade1.ogg'
armour_penetration = 35
item_color = "green"
light_color = "#00ff00"//green
@@ -290,8 +293,10 @@
var/hacked = FALSE
var/brightness_on = 6 //TWICE AS BRIGHT AS A REGULAR ESWORD
var/list/possible_colors = list("red", "blue", "green", "purple")
- total_mass = 0.375 //Survival flashlights typically weigh around 5 ounces.
- var/total_mass_on = 3.4 //The typical medieval sword, on the other hand, weighs roughly 3 pounds. //Values copied from the regular e-sword
+ var/list/rainbow_colors = list(LIGHT_COLOR_RED, LIGHT_COLOR_GREEN, LIGHT_COLOR_LIGHT_CYAN, LIGHT_COLOR_LAVENDER)
+ var/spinnable = TRUE
+ total_mass = 0.4 //Survival flashlights typically weigh around 5 ounces.
+ var/total_mass_on = 3.4
/obj/item/twohanded/dualsaber/suicide_act(mob/living/carbon/user)
if(wielded)
@@ -353,7 +358,7 @@
if(HAS_TRAIT(user, TRAIT_CLUMSY) && (wielded) && prob(40))
impale(user)
return
- if((wielded) && prob(50))
+ if(spinnable && (wielded) && prob(50))
INVOKE_ASYNC(src, .proc/jedi_spin, user)
/obj/item/twohanded/dualsaber/proc/jedi_spin(mob/living/user)
@@ -406,11 +411,14 @@
/obj/item/twohanded/dualsaber/process()
if(wielded)
if(hacked)
- light_color = pick(LIGHT_COLOR_RED, LIGHT_COLOR_GREEN, LIGHT_COLOR_LIGHT_CYAN, LIGHT_COLOR_LAVENDER)
+ rainbow_process()
open_flame()
else
STOP_PROCESSING(SSobj, src)
+/obj/item/twohanded/dualsaber/proc/rainbow_process()
+ light_color = pick(rainbow_colors)
+
/obj/item/twohanded/dualsaber/IsReflect()
if(wielded)
return 1
@@ -428,7 +436,8 @@
playsound(loc, hitsound, get_clamped_volume(), 1, -1)
add_fingerprint(user)
// Light your candles while spinning around the room
- INVOKE_ASYNC(src, .proc/jedi_spin, user)
+ if(spinnable)
+ INVOKE_ASYNC(src, .proc/jedi_spin, user)
/obj/item/twohanded/dualsaber/green
possible_colors = list("green")
diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm
index 48681c3d6d..560731edfd 100644
--- a/code/game/objects/items/weaponry.dm
+++ b/code/game/objects/items/weaponry.dm
@@ -69,6 +69,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
resistance_flags = FIRE_PROOF
+ total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
/obj/item/claymore/Initialize()
. = ..()
@@ -223,6 +224,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
resistance_flags = FIRE_PROOF
+ total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
/obj/item/katana/cursed
slot_flags = null
@@ -431,6 +433,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
sharpness = IS_SHARP
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = 'sound/weapons/chainsawhit.ogg'
+ total_mass = TOTAL_MASS_HAND_REPLACEMENT
/obj/item/mounted_chainsaw/Initialize()
. = ..()
diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm
index 893ee16d6b..c428c56d45 100644
--- a/code/modules/antagonists/changeling/powers/mutations.dm
+++ b/code/modules/antagonists/changeling/powers/mutations.dm
@@ -167,6 +167,7 @@
sharpness = IS_SHARP
var/can_drop = FALSE
var/fake = FALSE
+ total_mass = TOTAL_MASS_HAND_REPLACEMENT
/obj/item/melee/arm_blade/Initialize(mapload,silent,synthetic)
. = ..()
diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm
index dc2c29eb6d..25e3663c0b 100644
--- a/code/modules/antagonists/cult/cult_items.dm
+++ b/code/modules/antagonists/cult/cult_items.dm
@@ -105,7 +105,6 @@
inhand_x_dimension = 64
inhand_y_dimension = 64
actions_types = list()
- item_flags = SLOWS_WHILE_IN_HAND
var/datum/action/innate/dash/cult/jaunt
var/datum/action/innate/cult/spin2win/linked_action
var/spinning = FALSE
diff --git a/code/modules/awaymissions/capture_the_flag.dm b/code/modules/awaymissions/capture_the_flag.dm
index fcfdd7c455..84f08197b4 100644
--- a/code/modules/awaymissions/capture_the_flag.dm
+++ b/code/modules/awaymissions/capture_the_flag.dm
@@ -24,7 +24,6 @@
armour_penetration = 1000
resistance_flags = INDESTRUCTIBLE
anchored = TRUE
- item_flags = SLOWS_WHILE_IN_HAND
var/team = WHITE_TEAM
var/reset_cooldown = 0
var/anyonecanpickup = TRUE
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index abcb6d5911..7add723a06 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -641,6 +641,8 @@
nemesis_factions = list("mining", "boss")
var/transform_cooldown
var/swiping = FALSE
+ total_mass = 2.75
+ total_mass_on = 5
/obj/item/melee/transforming/cleaving_saw/examine(mob/user)
..()
diff --git a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
index 11a25cea6c..754c48c3bd 100644
--- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
@@ -174,6 +174,7 @@
item_flags = ABSTRACT | DROPDEL
w_class = WEIGHT_CLASS_HUGE
sharpness = IS_SHARP
+ total_mass = TOTAL_MASS_HAND_REPLACEMENT
/obj/item/light_eater/Initialize()
. = ..()
diff --git a/code/modules/research/xenobiology/crossbreeding/_weapons.dm b/code/modules/research/xenobiology/crossbreeding/_weapons.dm
index 53857b214c..4753abff97 100644
--- a/code/modules/research/xenobiology/crossbreeding/_weapons.dm
+++ b/code/modules/research/xenobiology/crossbreeding/_weapons.dm
@@ -15,6 +15,7 @@
recharge_rate = 1
ammo_type = /obj/item/ammo_casing/magic/bloodchill
fire_sound = 'sound/effects/attackblob.ogg'
+ total_mass = TOTAL_MASS_HAND_REPLACEMENT
/obj/item/gun/magic/bloodchill/Initialize()
. = ..()
diff --git a/code/modules/zombie/items.dm b/code/modules/zombie/items.dm
index 9a2455f56d..ae53f29a55 100644
--- a/code/modules/zombie/items.dm
+++ b/code/modules/zombie/items.dm
@@ -13,6 +13,7 @@
hitsound = 'sound/hallucinations/growl1.ogg'
force = 21 // Just enough to break airlocks with melee attacks
damtype = "brute"
+ total_mass = TOTAL_MASS_HAND_REPLACEMENT
/obj/item/zombie_hand/Initialize()
. = ..()
diff --git a/modular_citadel/code/_onclick/item_attack.dm b/modular_citadel/code/_onclick/item_attack.dm
index dcc9f567e2..80281ee084 100644
--- a/modular_citadel/code/_onclick/item_attack.dm
+++ b/modular_citadel/code/_onclick/item_attack.dm
@@ -17,9 +17,3 @@
/obj/item/proc/altafterattack(atom/target, mob/user, proximity_flag, click_parameters)
return FALSE
-
-/obj/item/proc/getweight()
- if(total_mass)
- return max(total_mass,MIN_MELEE_STAMCOST)
- else
- return w_class*1.25
diff --git a/modular_citadel/code/game/machinery/wishgranter.dm b/modular_citadel/code/game/machinery/wishgranter.dm
index f7c2c57d08..f24062a126 100644
--- a/modular_citadel/code/game/machinery/wishgranter.dm
+++ b/modular_citadel/code/game/machinery/wishgranter.dm
@@ -95,7 +95,7 @@
killwish.grasp_range = 6
killwish.melee_damage_upper = 30
killwish.grasp_chance = 50
- killwish.loot = list(/obj/item/twohanded/hypereutactic)
+ killwish.loot = list(/obj/item/twohanded/dualsaber/hypereutactic)
charges--
insisting = FALSE
if(!charges)
diff --git a/modular_citadel/code/game/objects/items.dm b/modular_citadel/code/game/objects/items.dm
index 337db986b0..c94923f9de 100644
--- a/modular_citadel/code/game/objects/items.dm
+++ b/modular_citadel/code/game/objects/items.dm
@@ -1,6 +1,4 @@
/obj/item
- var/total_mass //Total mass in arbitrary pound-like values. If there's no balance reasons for an item to have otherwise, this var should be the item's weight in pounds.
-
var/list/alternate_screams = list() //REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
// lazy for screaming.
diff --git a/modular_citadel/code/game/objects/items/melee/energy.dm b/modular_citadel/code/game/objects/items/melee/energy.dm
deleted file mode 100644
index c37f88eacf..0000000000
--- a/modular_citadel/code/game/objects/items/melee/energy.dm
+++ /dev/null
@@ -1,3 +0,0 @@
-/obj/item/melee/transforming/energy/sword
- total_mass = 0.375 //Survival flashlights typically weigh around 5 ounces.
- total_mass_on = 3.4 //The typical medieval sword, on the other hand, weighs roughly 3 pounds.
diff --git a/modular_citadel/code/game/objects/items/melee/eutactic_blades.dm b/modular_citadel/code/game/objects/items/melee/eutactic_blades.dm
index 6e28a3115f..68ab229f0a 100644
--- a/modular_citadel/code/game/objects/items/melee/eutactic_blades.dm
+++ b/modular_citadel/code/game/objects/items/melee/eutactic_blades.dm
@@ -124,7 +124,7 @@
return
else
to_chat(user, "You combine the two light swords, making a single supermassive blade! You're cool.")
- new /obj/item/twohanded/hypereutactic(user.drop_location())
+ new /obj/item/twohanded/dualsaber/hypereutactic(user.drop_location())
qdel(W)
qdel(src)
else
@@ -233,7 +233,7 @@
return
else
to_chat(user, "You combine the two plastic swords, making a single supermassive toy! You're fake-cool.")
- new /obj/item/twohanded/hypereutactic/toy(user.loc)
+ new /obj/item/twohanded/dualsaber/hypereutactic/toy(user.loc)
qdel(W)
qdel(src)
else
@@ -247,7 +247,7 @@
// HYPEREUTACTIC Blades /////////////////////////
/////////////////////////////////////////////////////
-/obj/item/twohanded/hypereutactic
+/obj/item/twohanded/dualsaber/hypereutactic
icon = 'modular_citadel/icons/eutactic/item/hypereutactic.dmi'
icon_state = "hypereutactic"
lefthand_file = 'modular_citadel/icons/eutactic/mob/hypereutactic_left.dmi'
@@ -258,58 +258,29 @@
name = "hypereutactic blade"
desc = "A supermassive weapon envisioned to cleave the very fabric of space and time itself in twain, the hypereutactic blade dynamically flash-forges a hypereutactic crystaline nanostructure capable of passing through most known forms of matter like a hot knife through butter."
force = 7
- throwforce = 5
- throw_speed = 3
- throw_range = 5
- w_class = WEIGHT_CLASS_SMALL
- var/w_class_on = WEIGHT_CLASS_BULKY
force_unwielded = 7
force_wielded = 40
wieldsound = 'sound/weapons/nebon.ogg'
unwieldsound = 'sound/weapons/neboff.ogg'
- hitsound = "swing_hit"
+ hitsound_on = 'sound/weapons/nebhit.ogg'
+ slowdown_wielded = 1
armour_penetration = 60
light_color = "#37FFF7"
+ rainbow_colors = list("#FF0000", "#FFFF00", "#00FF00", "#00FFFF", "#0000FF","#FF00FF", "#3399ff", "#ff9900", "#fb008b", "#9800ff", "#00ffa3", "#ccff00")
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "destroyed", "ripped", "devastated", "shredded")
- block_chance = 75
- max_integrity = 200
- armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 70)
- resistance_flags = FIRE_PROOF
- var/brightness_on = 6 //TWICE AS BRIGHT AS A REGULAR ESWORD
- item_flags = SLOWS_WHILE_IN_HAND
+ spinnable = FALSE
+ total_mass_on = 4
-/obj/item/twohanded/hypereutactic/pre_altattackby(atom/A, mob/living/user, params) //checks if it can do right click memes
+/obj/item/twohanded/dualsaber/hypereutactic/pre_altattackby(atom/A, mob/living/user, params) //checks if it can do right click memes
altafterattack(A, user, TRUE, params)
return TRUE
-/obj/item/twohanded/hypereutactic/altafterattack(atom/target, mob/living/carbon/user, proximity_flag, click_parameters) //does right click memes
+/obj/item/twohanded/dualsaber/hypereutactic/altafterattack(atom/target, mob/living/user, proximity_flag, click_parameters) //does right click memes
if(istype(user))
user.visible_message("[user] points the tip of [src] at [target].", "You point the tip of [src] at [target].")
return TRUE
-/obj/item/twohanded/hypereutactic/wield(mob/living/carbon/M) //Specific wield () hulk checks due to reflection chance for balance issues and switches hitsounds.
- if(M.has_dna())
- if(M.dna.check_mutation(HULK))
- to_chat(M, "You lack the grace to wield this!")
- return
- ..()
- if(wielded)
- sharpness = IS_SHARP
- w_class = w_class_on
- hitsound = 'sound/weapons/nebhit.ogg'
- START_PROCESSING(SSobj, src)
- set_light(brightness_on)
-
-/obj/item/twohanded/hypereutactic/unwield() //Specific unwield () to switch hitsounds.
- sharpness = initial(sharpness)
- w_class = initial(w_class)
- ..()
- hitsound = "swing_hit"
- STOP_PROCESSING(SSobj, src)
- set_light(0)
- slowdown = initial(slowdown)
-
-/obj/item/twohanded/hypereutactic/update_icon()
+/obj/item/twohanded/dualsaber/hypereutactic/update_icon()
var/mutable_appearance/blade_overlay = mutable_appearance('modular_citadel/icons/eutactic/item/hypereutactic.dmi', "hypereutactic_blade")
var/mutable_appearance/gem_overlay = mutable_appearance('modular_citadel/icons/eutactic/item/hypereutactic.dmi', "hypereutactic_gem")
@@ -329,21 +300,21 @@
SEND_SIGNAL(src, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)//blood overlays get weird otherwise, because the sprite changes. (retained from original desword because I have no idea what this is)
-/obj/item/twohanded/hypereutactic/AltClick(mob/living/user)
- if(!in_range(src, user)) //Basic checks to prevent abuse
+/obj/item/twohanded/dualsaber/hypereutactic/AltClick(mob/living/user)
+ if(!user.canUseTopic(src, BE_CLOSE, FALSE) || hacked)
return
if(user.incapacitated() || !istype(user))
to_chat(user, "You can't do that right now!")
return
-
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null
- if(energy_color_input)
- light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
+ if(!energy_color_input || !user.canUseTopic(src, BE_CLOSE, FALSE) || hacked)
+ return
+ light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
update_icon()
update_light()
-/obj/item/twohanded/hypereutactic/worn_overlays(isinhands, icon_file)
+/obj/item/twohanded/dualsaber/hypereutactic/worn_overlays(isinhands, icon_file)
. = ..()
if(isinhands)
var/mutable_appearance/gem_inhand = mutable_appearance(icon_file, "hypereutactic_gem")
@@ -354,70 +325,19 @@
blade_inhand.color = light_color
. += blade_inhand
-/obj/item/twohanded/hypereutactic/examine(mob/user)
+/obj/item/twohanded/dualsaber/hypereutactic/examine(mob/user)
..()
- to_chat(user, "Alt-click to recolor it.")
+ if(!hacked)
+ to_chat(user, "Alt-click to recolor it.")
-////////// stuff beneath this is all taken from the desword //////////// wow very professional such OOP wow
-
-/obj/item/twohanded/hypereutactic/attack(mob/target, mob/living/carbon/human/user)
- if(user.has_dna())
- if(user.dna.check_mutation(HULK))
- to_chat(user, "You grip the blade too hard and accidentally close it!")
- unwield()
- return
- ..()
- if(HAS_TRAIT(user, TRAIT_CLUMSY) && (wielded) && prob(40))
- impale(user)
- return
-
-/obj/item/twohanded/hypereutactic/Destroy()
- STOP_PROCESSING(SSobj, src)
+/obj/item/twohanded/dualsaber/hypereutactic/rainbow_process()
. = ..()
-
-/obj/item/twohanded/hypereutactic/proc/impale(mob/living/user)
- to_chat(user, "You spin around a bit before losing your balance and impaling yourself on [src].")
- if (force_wielded)
- user.take_bodypart_damage(20,25)
- else
- user.adjustStaminaLoss(25)
-
-/obj/item/twohanded/hypereutactic/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)
- return ..()
- return FALSE
-
-/obj/item/twohanded/hypereutactic/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) //In case thats just so happens that it is still activated on the groud, prevents hulk from picking it up
- if(wielded)
- to_chat(user, "You can't pick up such dangerous item with your meaty hands without losing fingers, better not to!")
- return TRUE
-
-/obj/item/twohanded/hypereutactic/process()
- if(wielded)
- open_flame()
- else
- STOP_PROCESSING(SSobj, src)
-
-/obj/item/twohanded/hypereutactic/IsReflect()
- if(wielded)
- return TRUE
-
-/obj/item/twohanded/hypereutactic/ignition_effect(atom/A, mob/user)
- // same as /obj/item/melee/transforming/energy, mostly
- if(!wielded)
- return ""
- var/in_mouth = ""
- if(iscarbon(user))
- var/mob/living/carbon/C = user
- if(C.wear_mask == src)
- in_mouth = ", barely missing their nose"
- . = "[user] swings [user.p_their()] [src][in_mouth]. [user.p_they()] light[user.p_s()] [A] in the process."
- playsound(loc, hitsound, get_clamped_volume(), 1, -1)
- add_fingerprint(user)
+ update_icon()
+ update_light()
////////////////// TOY VERSION /////////////////////////////
-/obj/item/twohanded/hypereutactic/toy
+/obj/item/twohanded/dualsaber/hypereutactic/toy
name = "\improper DX Hyper-Euplastic LightSword"
desc = "A supermassive toy envisioned to cleave the very fabric of space and time itself in twain. Realistic visuals and sounds! Ages 8 and up."
force = 0
@@ -427,11 +347,13 @@
force_unwielded = 0
force_wielded = 0
attack_verb = list("attacked", "struck", "hit")
+ total_mass_on = TOTAL_MASS_TOY_SWORD
+ slowdown_wielded = 0
-/obj/item/twohanded/hypereutactic/toy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
+/obj/item/twohanded/dualsaber/hypereutactic/toy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
return FALSE
-/obj/item/twohanded/hypereutactic/toy/IsReflect()//Stops it from reflecting energy projectiles
+/obj/item/twohanded/dualsaber/hypereutactic/toy/IsReflect()//Stops it from reflecting energy projectiles
return FALSE
//////// Tatortot NEB /////////////// (same stats as regular esword)
@@ -455,17 +377,7 @@
//RAINBOW MEMES
-/obj/item/twohanded/hypereutactic/toy/rainbow
+/obj/item/twohanded/dualsaber/hypereutactic/toy/rainbow
name = "\improper Hyper-Euclidean Reciprocating Trigonometric Zweihander"
desc = "A custom-built toy with fancy rainbow lights built-in."
- var/list/rainbow_colors = list("#FF0000", "#FFFF00", "#00FF00", "#00FFFF", "#0000FF","#FF00FF", "#3399ff", "#ff9900", "#fb008b", "#9800ff", "#00ffa3", "#ccff00")
-
-/obj/item/twohanded/hypereutactic/toy/rainbow/process()
- . = ..()
- var/set_color = pick(rainbow_colors)
- light_color = set_color
- update_light()
- update_icon()
-
-/obj/item/twohanded/hypereutactic/toy/rainbow/AltClick(mob/living/user)
- return
+ hacked = TRUE
\ No newline at end of file
diff --git a/modular_citadel/code/game/objects/items/melee/transforming.dm b/modular_citadel/code/game/objects/items/melee/transforming.dm
deleted file mode 100644
index 46610f4e54..0000000000
--- a/modular_citadel/code/game/objects/items/melee/transforming.dm
+++ /dev/null
@@ -1,15 +0,0 @@
-/obj/item/melee/transforming
- var/total_mass_on //Total mass in ounces when transformed. Primarily for balance purposes. Don't think about it too hard.
-
-/obj/item/melee/transforming/getweight()
- if(total_mass && total_mass_on)
- if(active)
- return max(total_mass_on,MIN_MELEE_STAMCOST)
- else
- return max(total_mass,MIN_MELEE_STAMCOST)
- else
- return initial(w_class)*1.25
-
-/obj/item/melee/transforming/cleaving_saw
- total_mass = 2.75
- total_mass_on = 5
diff --git a/modular_citadel/code/modules/awaymissions/citadel_ghostrole_spawners.dm b/modular_citadel/code/modules/awaymissions/citadel_ghostrole_spawners.dm
index f6991f1d9f..ccbf9a42fe 100644
--- a/modular_citadel/code/modules/awaymissions/citadel_ghostrole_spawners.dm
+++ b/modular_citadel/code/modules/awaymissions/citadel_ghostrole_spawners.dm
@@ -49,7 +49,7 @@
/datum/outfit/lavaknight/captain
name ="Cydonian Knight Captain"
- l_pocket = /obj/item/twohanded/hypereutactic
+ l_pocket = /obj/item/twohanded/dualsaber/hypereutactic
/datum/outfit/lavaknight/captain/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
if(visualsOnly)
diff --git a/modular_citadel/code/modules/client/loadout/__donator.dm b/modular_citadel/code/modules/client/loadout/__donator.dm
index e3dbbbd490..cc156adc4b 100644
--- a/modular_citadel/code/modules/client/loadout/__donator.dm
+++ b/modular_citadel/code/modules/client/loadout/__donator.dm
@@ -220,7 +220,7 @@
/datum/gear/torisword
name = "Rainbow Zweihander"
category = SLOT_IN_BACKPACK
- path = /obj/item/twohanded/hypereutactic/toy/rainbow
+ path = /obj/item/twohanded/dualsaber/hypereutactic/toy/rainbow
ckeywhitelist = list("annoymous35")
/datum/gear/darksabre
diff --git a/tgstation.dme b/tgstation.dme
index e2c4ff105a..dc4e981a4f 100755
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -2901,10 +2901,8 @@
#include "modular_citadel\code\game\objects\items\devices\radio\encryptionkey.dm"
#include "modular_citadel\code\game\objects\items\devices\radio\headset.dm"
#include "modular_citadel\code\game\objects\items\devices\radio\shockcollar.dm"
-#include "modular_citadel\code\game\objects\items\melee\energy.dm"
#include "modular_citadel\code\game\objects\items\melee\eutactic_blades.dm"
#include "modular_citadel\code\game\objects\items\melee\misc.dm"
-#include "modular_citadel\code\game\objects\items\melee\transforming.dm"
#include "modular_citadel\code\game\objects\items\robot\robot_upgrades.dm"
#include "modular_citadel\code\game\objects\items\storage\firstaid.dm"
#include "modular_citadel\code\game\objects\structures\tables_racks.dm"