diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 2211fced44..4418ceff30 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -805,18 +805,18 @@ About the new airlock wires panel:
else
spawn(0) close(1)
- else if(istype(C, /obj/item/weapon/twohanded/fireaxe) && !arePowerSystemsOn())
+ else if(istype(C, /obj/item/weapon/material/twohanded/fireaxe) && !arePowerSystemsOn())
if(locked)
user << "\blue The airlock's bolts prevent it from being forced."
else if( !welded && !operating )
if(density)
- var/obj/item/weapon/twohanded/fireaxe/F = C
+ var/obj/item/weapon/material/twohanded/fireaxe/F = C
if(F.wielded)
spawn(0) open(1)
else
user << "\red You need to be wielding \the [C] to do that."
else
- var/obj/item/weapon/twohanded/fireaxe/F = C
+ var/obj/item/weapon/material/twohanded/fireaxe/F = C
if(F.wielded)
spawn(0) close(1)
else
diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm
index 374f0426ad..5f6a16cc58 100644
--- a/code/game/machinery/doors/blast_door.dm
+++ b/code/game/machinery/doors/blast_door.dm
@@ -90,7 +90,7 @@
// This only works on broken doors or doors without power. Also allows repair with Plasteel.
/obj/machinery/door/blast/attackby(obj/item/weapon/C as obj, mob/user as mob)
src.add_fingerprint(user)
- if(istype(C, /obj/item/weapon/crowbar) || (istype(C, /obj/item/weapon/twohanded/fireaxe) && C:wielded == 1))
+ if(istype(C, /obj/item/weapon/crowbar) || (istype(C, /obj/item/weapon/material/twohanded/fireaxe) && C:wielded == 1))
if(((stat & NOPOWER) || (stat & BROKEN)) && !( src.operating ))
force_toggle()
else
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index a3fca76a44..0c0d23b52a 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -238,7 +238,7 @@
user << "\The [src] is welded shut!"
return
- if(istype(C, /obj/item/weapon/crowbar) || istype(C,/obj/item/weapon/twohanded/fireaxe))
+ if(istype(C, /obj/item/weapon/crowbar) || istype(C,/obj/item/weapon/material/twohanded/fireaxe))
if(operating)
return
@@ -248,8 +248,8 @@
"You hear someone struggle and metal straining.")
return
- if(istype(C,/obj/item/weapon/twohanded/fireaxe))
- var/obj/item/weapon/twohanded/fireaxe/F = C
+ if(istype(C,/obj/item/weapon/material/twohanded/fireaxe))
+ var/obj/item/weapon/material/twohanded/fireaxe/F = C
if(!F.wielded)
return
diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm
index 344a991935..61ab2f0ca4 100644
--- a/code/game/objects/items/stacks/sheets/leather.dm
+++ b/code/game/objects/items/stacks/sheets/leather.dm
@@ -93,7 +93,7 @@
/obj/item/stack/sheet/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob)
if( istype(W, /obj/item/weapon/material/knife) || \
istype(W, /obj/item/weapon/kitchen/utensil/knife) || \
- istype(W, /obj/item/weapon/twohanded/fireaxe) || \
+ istype(W, /obj/item/weapon/material/twohanded/fireaxe) || \
istype(W, /obj/item/weapon/hatchet) )
//visible message on mobs is defined as visible_message(var/message, var/self_message, var/blind_message)
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 4ba9ae9913..a1240042ba 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -33,7 +33,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
null, \
new/datum/stack_recipe("table frame", /obj/structure/table, 1, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("rack", /obj/structure/table/rack, 1, time = 5, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("metal baseball bat", /obj/item/weapon/twohanded/baseballbat/metal, 10, time = 20, one_per_turf = 0, on_floor = 1), \
+ new/datum/stack_recipe("metal baseball bat", /obj/item/weapon/material/twohanded/baseballbat/metal, 10, time = 20, one_per_turf = 0, on_floor = 1), \
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \
@@ -152,7 +152,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0), \
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("baseball bat", /obj/item/weapon/twohanded/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1) \
+ new/datum/stack_recipe("baseball bat", /obj/item/weapon/material/twohanded/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1) \
// new/datum/stack_recipe("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0)
)
diff --git a/code/game/objects/items/weapons/improvised_components.dm b/code/game/objects/items/weapons/improvised_components.dm
index 7222ae87b4..6296fa99fc 100644
--- a/code/game/objects/items/weapons/improvised_components.dm
+++ b/code/game/objects/items/weapons/improvised_components.dm
@@ -49,7 +49,7 @@
/obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob)
..()
if(istype(I, /obj/item/weapon/material/shard))
- var/obj/item/weapon/twohanded/spear/S = new /obj/item/weapon/twohanded/spear
+ var/obj/item/weapon/material/twohanded/spear/S = new /obj/item/weapon/material/twohanded/spear
user.put_in_hands(S)
user << "You fasten the glass shard to the top of the rod with the cable."
diff --git a/code/game/objects/items/weapons/material/bats.dm b/code/game/objects/items/weapons/material/bats.dm
index 563cc7d161..5de3ba46c3 100644
--- a/code/game/objects/items/weapons/material/bats.dm
+++ b/code/game/objects/items/weapons/material/bats.dm
@@ -1,5 +1,5 @@
-/obj/item/weapon/twohanded/baseballbat
- name = "wooden bat"
+/obj/item/weapon/material/twohanded/baseballbat
+ name = "bat"
desc = "HOME RUN!"
icon_state = "metalbat0"
base_icon = "metalbat"
@@ -15,66 +15,20 @@
hitsound = 'sound/weapons/genhit3.ogg'
force_wielded = 20
health = 10
- var/material/material
-
-/obj/item/weapon/twohanded/baseballbat/New(var/newloc, var/material_key)
- ..(newloc)
- if(!material_key)
- material_key = "wood"
- material = get_material_by_name(material_key)
- if(!material)
- qdel(src)
- else
- name = "[material.display_name] bat"
- base_name = name
- health = round(material.integrity/10)
- force = round(material.get_blunt_damage()/2)
- force_unwielded = force
- force_wielded = material.get_blunt_damage()
- color = material.icon_colour
- if(material.products_need_process())
- processing_objects |= src
-
-/obj/item/weapon/twohanded/baseballbat/Destroy()
- processing_objects -= src
- ..()
-
-/obj/item/weapon/twohanded/baseballbat/attack()
- if(!..())
- return
- if(!prob(material.hardness))
- health--
- if(health<=0)
- shatter()
-
-/obj/item/weapon/twohanded/baseballbat/proc/shatter()
- var/turf/T = get_turf(src)
- T.visible_message("\The [src] shatters!")
- if(istype(loc, /mob/living))
- var/mob/living/M = loc
- M.drop_from_inventory(src)
- playsound(src, "shatter", 70, 1)
- new material.shard_type(T)
- qdel(src)
-
-/obj/item/weapon/twohanded/baseballbat/process()
- if(!material.radioactivity)
- return
- for(var/mob/living/L in range(1,src))
- L.apply_effect(round(material.radioactivity/3),IRRADIATE,0)
+ default_material = "wood"
//Predefined materials go here.
-/obj/item/weapon/twohanded/baseballbat/metal/New(var/newloc)
+/obj/item/weapon/material/twohanded/baseballbat/metal/New(var/newloc)
..(newloc,"steel")
-/obj/item/weapon/twohanded/baseballbat/uranium/New(var/newloc)
+/obj/item/weapon/material/twohanded/baseballbat/uranium/New(var/newloc)
..(newloc,"uranium")
-/obj/item/weapon/twohanded/baseballbat/gold/New(var/newloc)
+/obj/item/weapon/material/twohanded/baseballbat/gold/New(var/newloc)
..(newloc,"gold")
-/obj/item/weapon/twohanded/baseballbat/platinum/New(var/newloc)
+/obj/item/weapon/material/twohanded/baseballbat/platinum/New(var/newloc)
..(newloc,"platinum")
-/obj/item/weapon/twohanded/baseballbat/diamond/New(var/newloc)
+/obj/item/weapon/material/twohanded/baseballbat/diamond/New(var/newloc)
..(newloc,"diamond")
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/material/knives.dm b/code/game/objects/items/weapons/material/knives.dm
index 0aab729ad2..2c37ec6c5a 100644
--- a/code/game/objects/items/weapons/material/knives.dm
+++ b/code/game/objects/items/weapons/material/knives.dm
@@ -13,6 +13,7 @@
throw_range = 4
throwforce = 7
attack_verb = list("patted", "tapped")
+ applies_material_colour = 1
/obj/item/weapon/material/butterfly/update_force()
if(active)
@@ -69,6 +70,7 @@
origin_tech = "materials=1"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
unbreakable = 1
+ applies_material_colour = 1
/obj/item/weapon/material/knife/suicide_act(mob/user)
viewers(user) << pick("\red [user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.", \
diff --git a/code/game/objects/items/weapons/material/material_weapons.dm b/code/game/objects/items/weapons/material/material_weapons.dm
index 9cc9455a9c..980f4fb02f 100644
--- a/code/game/objects/items/weapons/material/material_weapons.dm
+++ b/code/game/objects/items/weapons/material/material_weapons.dm
@@ -3,6 +3,7 @@
hitsound = 'sound/weapons/bladeslice.ogg'
gender = NEUTER
+ var/applies_material_colour
var/unbreakable
var/damage_divisor = 0.5
var/default_material = DEFAULT_WALL_MATERIAL
@@ -24,7 +25,8 @@
else
name = "[material.display_name] bat"
health = round(material.integrity/10)
- color = material.icon_colour
+ if(applies_material_colour)
+ color = material.icon_colour
if(material.products_need_process())
processing_objects |= src
update_force()
diff --git a/code/game/objects/items/weapons/material/misc.dm b/code/game/objects/items/weapons/material/misc.dm
index e09e01c0ea..697410626d 100644
--- a/code/game/objects/items/weapons/material/misc.dm
+++ b/code/game/objects/items/weapons/material/misc.dm
@@ -9,4 +9,3 @@
throwforce = 15
w_class = 3
attack_verb = list("jabbed","stabbed","ripped")
- default_material = "steel"
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/material/twohanded.dm b/code/game/objects/items/weapons/material/twohanded.dm
index e4a42d3f33..fdddd16425 100644
--- a/code/game/objects/items/weapons/material/twohanded.dm
+++ b/code/game/objects/items/weapons/material/twohanded.dm
@@ -16,7 +16,7 @@
/*
* Twohanded
*/
-/obj/item/weapon/twohanded
+/obj/item/weapon/material/twohanded
var/wielded = 0
var/force_wielded = 0
var/force_unwielded
@@ -25,25 +25,28 @@
var/base_icon
var/base_name
-/obj/item/weapon/twohanded/proc/unwield()
+/obj/item/weapon/material/twohanded/proc/unwield()
wielded = 0
force = force_unwielded
name = "[base_name]"
update_icon()
-/obj/item/weapon/twohanded/proc/wield()
+/obj/item/weapon/material/twohanded/proc/wield()
wielded = 1
force = force_wielded
name = "[base_name] (Wielded)"
update_icon()
-/obj/item/weapon/twohanded/New()
+/obj/item/weapon/material/twohanded/update_force()
+ base_name = name
+ force_unwielded = force
+ force_wielded = material.get_blunt_damage()
+
+/obj/item/weapon/material/twohanded/New()
..()
update_icon()
- force_unwielded = force
- base_name = name
-/obj/item/weapon/twohanded/mob_can_equip(M as mob, slot)
+/obj/item/weapon/material/twohanded/mob_can_equip(M as mob, slot)
//Cannot equip wielded items.
if(wielded)
M << "Unwield the [base_name] first!"
@@ -51,22 +54,22 @@
return ..()
-/obj/item/weapon/twohanded/dropped(mob/user as mob)
+/obj/item/weapon/material/twohanded/dropped(mob/user as mob)
//handles unwielding a twohanded weapon when dropped as well as clearing up the offhand
if(user)
- var/obj/item/weapon/twohanded/O = user.get_inactive_hand()
+ var/obj/item/weapon/material/twohanded/O = user.get_inactive_hand()
if(istype(O))
O.unwield()
return unwield()
-/obj/item/weapon/twohanded/update_icon()
+/obj/item/weapon/material/twohanded/update_icon()
icon_state = "[base_icon][wielded]"
item_state = icon_state
-/obj/item/weapon/twohanded/pickup(mob/user)
+/obj/item/weapon/material/twohanded/pickup(mob/user)
unwield()
-/obj/item/weapon/twohanded/attack_self(mob/user as mob)
+/obj/item/weapon/material/twohanded/attack_self(mob/user as mob)
..()
@@ -84,7 +87,7 @@
if (src.unwieldsound)
playsound(src.loc, unwieldsound, 50, 1)
- var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_hand()
+ var/obj/item/weapon/material/twohanded/offhand/O = user.get_inactive_hand()
if(O && istype(O))
O.unwield()
@@ -97,7 +100,7 @@
if (src.wieldsound)
playsound(src.loc, wieldsound, 50, 1)
- var/obj/item/weapon/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
+ var/obj/item/weapon/material/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
O.name = "[base_name] - offhand"
O.desc = "Your second grip on the [base_name]"
user.put_in_inactive_hand(O)
@@ -110,24 +113,25 @@
return
///////////OFFHAND///////////////
-/obj/item/weapon/twohanded/offhand
+/obj/item/weapon/material/twohanded/offhand
w_class = 5.0
icon_state = "offhand"
name = "offhand"
+ default_material = "placeholder"
-/obj/item/weapon/twohanded/offhand/unwield()
+/obj/item/weapon/material/twohanded/offhand/unwield()
qdel(src)
-/obj/item/weapon/twohanded/offhand/wield()
+/obj/item/weapon/material/twohanded/offhand/wield()
qdel(src)
-/obj/item/weapon/twohanded/offhand/update_icon()
+/obj/item/weapon/material/twohanded/offhand/update_icon()
return
/*
* Fireaxe
*/
-/obj/item/weapon/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
+/obj/item/weapon/material/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
icon_state = "fireaxe0"
base_icon = "fireaxe"
name = "fire axe"
@@ -140,7 +144,7 @@
force_wielded = 30
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
-/obj/item/weapon/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
+/obj/item/weapon/material/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
..()
if(A && wielded && (istype(A,/obj/structure/window) || istype(A,/obj/structure/grille))) //destroys windows and grilles in one hit
@@ -151,7 +155,7 @@
/*
* Double-Bladed Energy Swords - Cheridan
*/
-/obj/item/weapon/twohanded/dualsaber
+/obj/item/weapon/material/twohanded/dualsaber
icon_state = "dualsaber0"
base_icon = "dualsaber"
name = "double-bladed energy sword"
@@ -170,7 +174,7 @@
sharp = 1
edge = 1
-/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
+/obj/item/weapon/material/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
..()
if((CLUMSY in user.mutations) && (wielded) &&prob(40))
user << "\red You twirl around a bit before losing your balance and impaling yourself on the [src]."
@@ -182,14 +186,14 @@
user.set_dir(i)
sleep(1)
-/obj/item/weapon/twohanded/dualsaber/IsShield()
+/obj/item/weapon/material/twohanded/dualsaber/IsShield()
if(wielded)
return 1
else
return 0
//spears, bay edition
-/obj/item/weapon/twohanded/spear
+/obj/item/weapon/material/twohanded/spear
icon_state = "spearglass0"
base_icon = "spearglass"
name = "spear"
@@ -205,3 +209,4 @@
flags = NOSHIELD
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
+ default_material = "glass"
diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm
index 8dacfa4c40..481371b424 100644
--- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm
+++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm
@@ -2,7 +2,7 @@
/obj/structure/closet/fireaxecabinet
name = "fire axe cabinet"
desc = "There is small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
- var/obj/item/weapon/twohanded/fireaxe/fireaxe
+ var/obj/item/weapon/material/twohanded/fireaxe/fireaxe
icon_state = "fireaxe1000"
icon_closed = "fireaxe1000"
icon_opened = "fireaxe1100"
@@ -16,7 +16,7 @@
New()
..()
- fireaxe = new /obj/item/weapon/twohanded/fireaxe(src)
+ fireaxe = new /obj/item/weapon/material/twohanded/fireaxe(src)
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
//..() //That's very useful, Erro
@@ -55,7 +55,7 @@
src.localopened = 1
update_icon()
return
- if (istype(O, /obj/item/weapon/twohanded/fireaxe) && src.localopened)
+ if (istype(O, /obj/item/weapon/material/twohanded/fireaxe) && src.localopened)
if(!fireaxe)
if(O:wielded)
user << "\red Unwield the axe first."
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index c85fa2eac1..af350efec4 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -687,7 +687,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
- var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
+ var/obj/item/weapon/material/twohanded/fireaxe/fire_axe = new(M)
M.equip_to_slot_or_del(fire_axe, slot_r_hand)
if("masked killer")
@@ -702,7 +702,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/material/knife(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/scalpel(M), slot_r_store)
- var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
+ var/obj/item/weapon/material/twohanded/fireaxe/fire_axe = new(M)
M.equip_to_slot_or_del(fire_axe, slot_r_hand)
for(var/obj/item/carried_item in M.contents)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 56d0a1718f..eb559a0231 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -132,7 +132,7 @@
/mob/living/carbon/proc/swap_hand()
var/obj/item/item_in_hand = src.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/weapon/twohanded))
+ if(istype(item_in_hand,/obj/item/weapon/material/twohanded))
if(item_in_hand:wielded == 1)
usr << "Your other hand is too busy holding the [item_in_hand.name]"
return
@@ -452,17 +452,17 @@
Stun(stun_duration)
Weaken(Floor(stun_duration/2))
return 1
-
+
/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1)
if(effect in chem_effects)
chem_effects[effect] += magnitude
else
- chem_effects[effect] = magnitude
-
+ chem_effects[effect] = magnitude
+
/mob/living/carbon/get_default_language()
if(default_language)
return default_language
if(!species)
return null
- return species.default_language ? all_languages[species.default_language] : null
+ return species.default_language ? all_languages[species.default_language] : null