mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Adds snowballs. (#4414)
This commit is contained in:
@@ -154,6 +154,7 @@
|
|||||||
#define MAT_TITANIUM "titanium"
|
#define MAT_TITANIUM "titanium"
|
||||||
#define MAT_PHORON "phoron"
|
#define MAT_PHORON "phoron"
|
||||||
#define MAT_DIAMOND "diamond"
|
#define MAT_DIAMOND "diamond"
|
||||||
|
#define MAT_SNOW "snow"
|
||||||
|
|
||||||
#define SHARD_SHARD "shard"
|
#define SHARD_SHARD "shard"
|
||||||
#define SHARD_SHRAPNEL "shrapnel"
|
#define SHARD_SHRAPNEL "shrapnel"
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
var/unbreakable = 0 //Doesn't lose health
|
var/unbreakable = 0 //Doesn't lose health
|
||||||
var/fragile = 0 //Shatters when it dies
|
var/fragile = 0 //Shatters when it dies
|
||||||
var/dulled = 0 //Has gone dull
|
var/dulled = 0 //Has gone dull
|
||||||
|
var/can_dull = 1 //Can it go 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/dulled_divisor = 0.5 //Just drops the damage by half
|
||||||
@@ -92,7 +93,7 @@
|
|||||||
if(health<=0)
|
if(health<=0)
|
||||||
if(fragile)
|
if(fragile)
|
||||||
shatter(consumed)
|
shatter(consumed)
|
||||||
else if(!dulled)
|
else if(!dulled && can_dull)
|
||||||
dull()
|
dull()
|
||||||
|
|
||||||
/obj/item/weapon/material/proc/shatter(var/consumed)
|
/obj/item/weapon/material/proc/shatter(var/consumed)
|
||||||
|
|||||||
@@ -85,4 +85,37 @@
|
|||||||
thrown_force_divisor = 0.25 // as above
|
thrown_force_divisor = 0.25 // as above
|
||||||
dulled_divisor = 0.75 //Still metal on a long pole
|
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")
|
||||||
|
|
||||||
|
/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
|
||||||
@@ -33,3 +33,11 @@
|
|||||||
to_chat(user, "<span class='notice'>You decide to not finish removing \the [src].</span>")
|
to_chat(user, "<span class='notice'>You decide to not finish removing \the [src].</span>")
|
||||||
else
|
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
|
||||||
@@ -162,4 +162,5 @@
|
|||||||
))
|
))
|
||||||
|
|
||||||
/material/snow/generate_recipes()
|
/material/snow/generate_recipes()
|
||||||
return // Snowmen and snowballs may come here later.
|
recipes = list()
|
||||||
|
recipes += new/datum/stack_recipe("snowball", /obj/item/weapon/material/snow/snowball, 1, time = 10)
|
||||||
@@ -735,7 +735,7 @@ var/list/name_to_material
|
|||||||
destruction_desc = "crumples"
|
destruction_desc = "crumples"
|
||||||
|
|
||||||
/material/snow
|
/material/snow
|
||||||
name = "snow"
|
name = MAT_SNOW
|
||||||
stack_type = /obj/item/stack/material/snow
|
stack_type = /obj/item/stack/material/snow
|
||||||
flags = MATERIAL_BRITTLE
|
flags = MATERIAL_BRITTLE
|
||||||
icon_base = "solid"
|
icon_base = "solid"
|
||||||
@@ -749,7 +749,7 @@ var/list/name_to_material
|
|||||||
melting_point = T0C+1
|
melting_point = T0C+1
|
||||||
destruction_desc = "crumples"
|
destruction_desc = "crumples"
|
||||||
sheet_singular_name = "pile"
|
sheet_singular_name = "pile"
|
||||||
sheet_plural_name = "piles"
|
sheet_plural_name = "pile" //Just a bigger pile
|
||||||
|
|
||||||
/material/cloth //todo
|
/material/cloth //todo
|
||||||
name = "cloth"
|
name = "cloth"
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 43 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Reference in New Issue
Block a user