mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-22 16:12:36 +00:00
Material weapon rework
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
default_material = "wood"
|
default_material = "wood"
|
||||||
force_divisor = 1.1 // 22 when wielded with weight 20 (steel)
|
force_divisor = 1.1 // 22 when wielded with weight 20 (steel)
|
||||||
unwielded_force_divisor = 0.7 // 15 when unwielded based on above.
|
unwielded_force_divisor = 0.7 // 15 when unwielded based on above.
|
||||||
|
dulled_divisor = 0.75 // A "dull" bat is still gonna hurt
|
||||||
slot_flags = SLOT_BACK
|
slot_flags = SLOT_BACK
|
||||||
|
|
||||||
//Predefined materials go here.
|
//Predefined materials go here.
|
||||||
|
|||||||
@@ -94,7 +94,6 @@
|
|||||||
icon_state = "tacknife"
|
icon_state = "tacknife"
|
||||||
item_state = "knife"
|
item_state = "knife"
|
||||||
applies_material_colour = 0
|
applies_material_colour = 0
|
||||||
unbreakable = 1
|
|
||||||
|
|
||||||
/obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
|
/obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
|
||||||
if ((CLUMSY in user.mutations) && prob(50))
|
if ((CLUMSY in user.mutations) && prob(50))
|
||||||
@@ -117,6 +116,7 @@
|
|||||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||||
default_material = "wood"
|
default_material = "wood"
|
||||||
force_divisor = 0.7 // 10 when wielded with weight 15 (wood)
|
force_divisor = 0.7 // 10 when wielded with weight 15 (wood)
|
||||||
|
dulled_divisor = 0.75 // Still a club
|
||||||
thrown_force_divisor = 1 // as above
|
thrown_force_divisor = 1 // as above
|
||||||
|
|
||||||
/obj/item/weapon/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
|
/obj/item/weapon/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
name = "switchblade"
|
name = "switchblade"
|
||||||
desc = "A classic switchblade with gold engraving. Just holding it makes you feel like a gangster."
|
desc = "A classic switchblade with gold engraving. Just holding it makes you feel like a gangster."
|
||||||
icon_state = "switchblade"
|
icon_state = "switchblade"
|
||||||
unbreakable = 1
|
|
||||||
|
|
||||||
/obj/item/weapon/material/butterfly/attack_self(mob/user)
|
/obj/item/weapon/material/butterfly/attack_self(mob/user)
|
||||||
active = !active
|
active = !active
|
||||||
@@ -60,7 +59,6 @@
|
|||||||
matter = list(DEFAULT_WALL_MATERIAL = 12000)
|
matter = list(DEFAULT_WALL_MATERIAL = 12000)
|
||||||
origin_tech = "materials=1"
|
origin_tech = "materials=1"
|
||||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||||
unbreakable = 1
|
|
||||||
|
|
||||||
/obj/item/weapon/material/knife/suicide_act(mob/user)
|
/obj/item/weapon/material/knife/suicide_act(mob/user)
|
||||||
viewers(user) << pick("<span class='danger'>\The [user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.</span>", \
|
viewers(user) << pick("<span class='danger'>\The [user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.</span>", \
|
||||||
|
|||||||
@@ -16,9 +16,12 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
var/applies_material_colour = 1
|
var/applies_material_colour = 1
|
||||||
var/unbreakable
|
var/unbreakable = 0 //Doesn't lose health
|
||||||
|
var/fragile = 0 //Shatters when it dies
|
||||||
|
var/dulled = 0 //Has gone dull
|
||||||
var/force_divisor = 0.5
|
var/force_divisor = 0.5
|
||||||
var/thrown_force_divisor = 0.5
|
var/thrown_force_divisor = 0.5
|
||||||
|
var/dulled_divisor = 0.5 //Just drops the damage by half
|
||||||
var/default_material = DEFAULT_WALL_MATERIAL
|
var/default_material = DEFAULT_WALL_MATERIAL
|
||||||
var/material/material
|
var/material/material
|
||||||
var/drops_debris = 1
|
var/drops_debris = 1
|
||||||
@@ -47,6 +50,8 @@
|
|||||||
else
|
else
|
||||||
force = material.get_blunt_damage()
|
force = material.get_blunt_damage()
|
||||||
force = round(force*force_divisor)
|
force = round(force*force_divisor)
|
||||||
|
if(dulled)
|
||||||
|
force = round(force*dulled_divisor)
|
||||||
throwforce = round(material.get_blunt_damage()*thrown_force_divisor)
|
throwforce = round(material.get_blunt_damage()*thrown_force_divisor)
|
||||||
//spawn(1)
|
//spawn(1)
|
||||||
// world << "[src] has force [force] and throwforce [throwforce] when made from default material [material.name]"
|
// world << "[src] has force [force] and throwforce [throwforce] when made from default material [material.name]"
|
||||||
@@ -79,7 +84,10 @@
|
|||||||
|
|
||||||
/obj/item/weapon/material/proc/check_health(var/consumed)
|
/obj/item/weapon/material/proc/check_health(var/consumed)
|
||||||
if(health<=0)
|
if(health<=0)
|
||||||
shatter(consumed)
|
if(fragile)
|
||||||
|
shatter(consumed)
|
||||||
|
else
|
||||||
|
dull()
|
||||||
|
|
||||||
/obj/item/weapon/material/proc/shatter(var/consumed)
|
/obj/item/weapon/material/proc/shatter(var/consumed)
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
@@ -90,6 +98,27 @@
|
|||||||
playsound(src, "shatter", 70, 1)
|
playsound(src, "shatter", 70, 1)
|
||||||
if(!consumed && drops_debris) material.place_shard(T)
|
if(!consumed && drops_debris) material.place_shard(T)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
|
/obj/item/weapon/material/proc/dull()
|
||||||
|
var/turf/T = get_turf(src)
|
||||||
|
T.visible_message("<span class='danger'>\The [src] [material.destruction_desc]!</span>")
|
||||||
|
playsound(src, "shatter", 70, 1)
|
||||||
|
dulled = 1
|
||||||
|
if(is_sharp() || has_edge())
|
||||||
|
sharp = 0
|
||||||
|
edge = 0
|
||||||
|
|
||||||
|
/obj/item/weapon/material/proc/sharpen(var/sharpen_amount, mob/living/user)
|
||||||
|
if(!fragile)
|
||||||
|
if(health < initial(health))
|
||||||
|
user.visible_message("[user] begins sharpening [src].", "You begin sharpening the [src].")
|
||||||
|
if(do_after(user, 40))
|
||||||
|
user.visible_message("[user] has finished sharpening [src]", "You finish sharpening the [src].")
|
||||||
|
health = min(health + sharpen_amount, initial(health))
|
||||||
|
else
|
||||||
|
to_chat(user, "<span class='warning'>You can't sharpen the [src].</span>")
|
||||||
|
return
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Commenting this out pending rebalancing of radiation based on small objects.
|
Commenting this out pending rebalancing of radiation based on small objects.
|
||||||
/obj/item/weapon/material/process()
|
/obj/item/weapon/material/process()
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
gender = PLURAL
|
gender = PLURAL
|
||||||
w_class = ITEMSIZE_SMALL
|
w_class = ITEMSIZE_SMALL
|
||||||
force_divisor = 0.63
|
force_divisor = 0.63
|
||||||
|
dulled_divisor = 0.75 //It's a heavy bit of metal
|
||||||
attack_verb = list("punched", "beaten", "struck")
|
attack_verb = list("punched", "beaten", "struck")
|
||||||
applies_material_colour = 0
|
applies_material_colour = 0
|
||||||
|
|
||||||
@@ -82,6 +83,7 @@
|
|||||||
icon_state = "hoe"
|
icon_state = "hoe"
|
||||||
force_divisor = 0.25 // 5 with weight 20 (steel)
|
force_divisor = 0.25 // 5 with weight 20 (steel)
|
||||||
thrown_force_divisor = 0.25 // as above
|
thrown_force_divisor = 0.25 // as above
|
||||||
|
dulled_divisor = 0.75 //Still metal on a long pole
|
||||||
w_class = ITEMSIZE_SMALL
|
w_class = ITEMSIZE_SMALL
|
||||||
attack_verb = list("slashed", "sliced", "cut", "clawed")
|
attack_verb = list("slashed", "sliced", "cut", "clawed")
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,7 @@
|
|||||||
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
|
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
|
||||||
unwielded_force_divisor = 0.25
|
unwielded_force_divisor = 0.25
|
||||||
force_divisor = 0.7 // 10/42 with hardness 60 (steel) and 0.25 unwielded divisor
|
force_divisor = 0.7 // 10/42 with hardness 60 (steel) and 0.25 unwielded divisor
|
||||||
|
dulled_divisor = 0.75 //Still metal on a stick
|
||||||
sharp = 1
|
sharp = 1
|
||||||
edge = 1
|
edge = 1
|
||||||
w_class = ITEMSIZE_LARGE
|
w_class = ITEMSIZE_LARGE
|
||||||
@@ -140,4 +141,5 @@
|
|||||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||||
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
|
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
|
||||||
default_material = "glass"
|
default_material = "glass"
|
||||||
applies_material_colour = 0
|
applies_material_colour = 0
|
||||||
|
fragile = 1 //It's a haphazard thing of glass, wire, and steel
|
||||||
Reference in New Issue
Block a user