Merge branch 'master' of https://github.com/PolarisSS13/Polaris into 3/14/2017_makeshift_armor

This commit is contained in:
Neerti
2017-04-14 03:54:23 -04:00
534 changed files with 17904 additions and 11078 deletions
@@ -9,6 +9,7 @@
default_material = "wood"
force_divisor = 1.1 // 22 when wielded with weight 20 (steel)
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
//Predefined materials go here.
@@ -94,7 +94,6 @@
icon_state = "tacknife"
item_state = "knife"
applies_material_colour = 0
unbreakable = 1
/obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
@@ -117,6 +116,7 @@
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
default_material = "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
/obj/item/weapon/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
@@ -33,7 +33,13 @@
name = "switchblade"
desc = "A classic switchblade with gold engraving. Just holding it makes you feel like a gangster."
icon_state = "switchblade"
unbreakable = 1
/obj/item/weapon/material/butterfly/boxcutter
name = "box cutter"
desc = "A thin, inexpensive razor-blade knife designed to open cardboard boxes."
icon_state = "boxcutter"
force_divisor = 0.1 // 6 when wielded with hardness 60 (steel)
thrown_force_divisor = 0.2 // 4 when thrown with weight 20 (steel)
/obj/item/weapon/material/butterfly/attack_self(mob/user)
active = !active
@@ -60,7 +66,6 @@
matter = list(DEFAULT_WALL_MATERIAL = 12000)
origin_tech = "materials=1"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
unbreakable = 1
/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>", \
@@ -16,9 +16,12 @@
)
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/thrown_force_divisor = 0.5
var/dulled_divisor = 0.5 //Just drops the damage by half
var/default_material = DEFAULT_WALL_MATERIAL
var/material/material
var/drops_debris = 1
@@ -47,6 +50,8 @@
else
force = material.get_blunt_damage()
force = round(force*force_divisor)
if(dulled)
force = round(force*dulled_divisor)
throwforce = round(material.get_blunt_damage()*thrown_force_divisor)
//spawn(1)
// world << "[src] has force [force] and throwforce [throwforce] when made from default material [material.name]"
@@ -77,9 +82,18 @@
health--
check_health()
/obj/item/weapon/material/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/weapon/whetstone))
var/obj/item/weapon/whetstone/whet = W
repair(whet.repair_amount, whet.repair_time, user)
..()
/obj/item/weapon/material/proc/check_health(var/consumed)
if(health<=0)
shatter(consumed)
if(fragile)
shatter(consumed)
else if(!dulled)
dull()
/obj/item/weapon/material/proc/shatter(var/consumed)
var/turf/T = get_turf(src)
@@ -90,6 +104,34 @@
playsound(src, "shatter", 70, 1)
if(!consumed && drops_debris) material.place_shard(T)
qdel(src)
/obj/item/weapon/material/proc/dull()
var/turf/T = get_turf(src)
T.visible_message("<span class='danger'>\The [src] goes dull!</span>")
playsound(src, "shatter", 70, 1)
dulled = 1
if(is_sharp() || has_edge())
sharp = 0
edge = 0
/obj/item/weapon/material/proc/repair(var/repair_amount, var/repair_time, mob/living/user)
if(!fragile)
if(health < initial(health))
user.visible_message("[user] begins repairing \the [src].", "You begin repairing \the [src].")
if(do_after(user, repair_time))
user.visible_message("[user] has finished repairing \the [src]", "You finish repairing \the [src].")
health = min(health + repair_amount, initial(health))
dulled = 0
sharp = initial(sharp)
edge = initial(edge)
else
to_chat(user, "<span class='notice'>[src] doesn't need repairs.</span>")
else
to_chat(user, "<span class='warning'>You can't repair \the [src].</span>")
return
/*
Commenting this out pending rebalancing of radiation based on small objects.
/obj/item/weapon/material/process()
@@ -15,6 +15,7 @@
gender = PLURAL
w_class = ITEMSIZE_SMALL
force_divisor = 0.63
dulled_divisor = 0.75 //It's a heavy bit of metal
attack_verb = list("punched", "beaten", "struck")
applies_material_colour = 0
@@ -82,6 +83,7 @@
icon_state = "hoe"
force_divisor = 0.25 // 5 with weight 20 (steel)
thrown_force_divisor = 0.25 // as above
dulled_divisor = 0.75 //Still metal on a long pole
w_class = ITEMSIZE_SMALL
attack_verb = list("slashed", "sliced", "cut", "clawed")
@@ -90,7 +90,7 @@
if(affecting.take_damage(force, 0))
H.UpdateDamageIcon()
H.updatehealth()
if(affecting.can_feel_pain())
if(affecting.organ_can_feel_pain())
H.Weaken(3)
return
check -= picked
@@ -85,6 +85,7 @@
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
unwielded_force_divisor = 0.25
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
edge = 1
w_class = ITEMSIZE_LARGE
@@ -140,4 +141,5 @@
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
default_material = "glass"
applies_material_colour = 0
applies_material_colour = 0
fragile = 1 //It's a haphazard thing of glass, wire, and steel
@@ -0,0 +1,11 @@
//This is in the material folder because it's used by them...
//Actual name may need to change
//All of the important code is in material_weapons.dm
/obj/item/weapon/whetstone
name = "whetstone"
desc = "A simple, fine grit stone, useful for sharpening dull edges and polishing out dents."
icon_state = "whetstone"
force = 3
w_class = ITEMSIZE_SMALL
var/repair_amount = 5
var/repair_time = 40