diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index 3bb7333a02..e8286e40f9 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -154,6 +154,7 @@ #define MAT_TITANIUM "titanium" #define MAT_PHORON "phoron" #define MAT_DIAMOND "diamond" +#define MAT_SNOW "snow" #define SHARD_SHARD "shard" #define SHARD_SHRAPNEL "shrapnel" diff --git a/code/game/objects/items/weapons/material/material_weapons.dm b/code/game/objects/items/weapons/material/material_weapons.dm index c778ec07a9..06444f6a37 100644 --- a/code/game/objects/items/weapons/material/material_weapons.dm +++ b/code/game/objects/items/weapons/material/material_weapons.dm @@ -19,6 +19,7 @@ var/unbreakable = 0 //Doesn't lose health var/fragile = 0 //Shatters when it dies var/dulled = 0 //Has gone dull + var/can_dull = 1 //Can it go dull? var/force_divisor = 0.5 var/thrown_force_divisor = 0.5 var/dulled_divisor = 0.5 //Just drops the damage by half @@ -92,7 +93,7 @@ if(health<=0) if(fragile) shatter(consumed) - else if(!dulled) + else if(!dulled && can_dull) dull() /obj/item/weapon/material/proc/shatter(var/consumed) diff --git a/code/game/objects/items/weapons/material/misc.dm b/code/game/objects/items/weapons/material/misc.dm index 9d8792dab4..6afacb30cb 100644 --- a/code/game/objects/items/weapons/material/misc.dm +++ b/code/game/objects/items/weapons/material/misc.dm @@ -85,4 +85,37 @@ 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") \ No newline at end of file + attack_verb = list("slashed", "sliced", "cut", "clawed") + +/obj/item/weapon/material/snow/snowball + name = "loose packed snowball" + desc = "A fun snowball. Throw it at your friends!" + icon = 'icons/obj/weapons.dmi' + icon_state = "snowball" + default_material = MAT_SNOW + health = 1 + fragile = 1 + force_divisor = 0.01 + thrown_force_divisor = 0.10 + w_class = ITEMSIZE_SMALL + attack_verb = list("mushed", "splatted", "splooshed", "splushed") // Words that totally exist. + +/obj/item/weapon/material/snow/snowball/attack_self(mob/user as mob) + if(user.a_intent == I_HURT) + visible_message("[user] has smashed the snowball in their hand!", "You smash the snowball in your hand.") + var/atom/S = new /obj/item/stack/material/snow(user.loc) + del(src) + user.put_in_hands(S) + else + visible_message("[user] starts compacting the snowball.", "You start compacting the snowball.") + if(do_after(user, 2000)) + var/atom/S = new /obj/item/weapon/material/snow/snowball/reinforced(user.loc) + del(src) + user.put_in_hands(S) + +/obj/item/weapon/material/snow/snowball/reinforced + name = "snowball" + desc = "A well-formed and fun snowball. It looks kind of dangerous." + icon_state = "snowball-reinf" + force_divisor = 0.20 + thrown_force_divisor = 0.25 \ No newline at end of file diff --git a/code/game/turfs/simulated/outdoors/snow.dm b/code/game/turfs/simulated/outdoors/snow.dm index 22f9085a8c..398fa0dc47 100644 --- a/code/game/turfs/simulated/outdoors/snow.dm +++ b/code/game/turfs/simulated/outdoors/snow.dm @@ -33,3 +33,11 @@ to_chat(user, "You decide to not finish removing \the [src].") else ..() + +/turf/simulated/floor/outdoors/snow/attack_hand(mob/user as mob) + visible_message("[user] starts scooping up some snow.", "You start scooping up some snow.") + if(do_after(user, 1 SECOND)) + var/obj/S = new /obj/item/stack/material/snow(user.loc) + user.put_in_hands(S) + visible_message("[user] scoops up a pile of snow.", "You scoop up a pile of snow.") + return \ No newline at end of file diff --git a/code/modules/materials/material_recipes.dm b/code/modules/materials/material_recipes.dm index 7408b692a7..ecc0f61d83 100644 --- a/code/modules/materials/material_recipes.dm +++ b/code/modules/materials/material_recipes.dm @@ -162,4 +162,5 @@ )) /material/snow/generate_recipes() - return // Snowmen and snowballs may come here later. \ No newline at end of file + recipes = list() + recipes += new/datum/stack_recipe("snowball", /obj/item/weapon/material/snow/snowball, 1, time = 10) \ No newline at end of file diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 1ce1eca2d8..ebb6fc56f3 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -735,7 +735,7 @@ var/list/name_to_material destruction_desc = "crumples" /material/snow - name = "snow" + name = MAT_SNOW stack_type = /obj/item/stack/material/snow flags = MATERIAL_BRITTLE icon_base = "solid" @@ -749,7 +749,7 @@ var/list/name_to_material melting_point = T0C+1 destruction_desc = "crumples" sheet_singular_name = "pile" - sheet_plural_name = "piles" + sheet_plural_name = "pile" //Just a bigger pile /material/cloth //todo name = "cloth" diff --git a/icons/obj/stacks.dmi b/icons/obj/stacks.dmi index 5cdff4a1f3..5146598051 100644 Binary files a/icons/obj/stacks.dmi and b/icons/obj/stacks.dmi differ diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi index cf755227ec..1153c2439f 100644 Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ