Revert "Fixes Beaker Breaking (#7676)" (#7703)

This reverts commit a45d218610.
This commit is contained in:
Erki
2019-12-17 00:11:06 +02:00
committed by GitHub
parent 9b1df54feb
commit a4845ede9a
3 changed files with 11 additions and 22 deletions

View File

@@ -15,7 +15,7 @@
accuracy = 0.1
w_class = 2
flags = OPENCONTAINER
var/hardness = 1
var/fragile = 1 // most glassware is super fragile
var/no_shatter = FALSE //does this container shatter?
unacidable = 1 //glass doesn't dissolve in acid
drop_sound = 'sound/items/drop/bottle.ogg'
@@ -54,20 +54,13 @@
/obj/item/reagent_containers/glass/throw_impact(atom/hit_atom, var/speed)
. = ..()
if(no_shatter)
return
if(speed >= hardness)
if(speed > fragile && !no_shatter)
shatter()
return
if(speed < hardness)
if(prob(25 * (speed)))
shatter()
/obj/item/reagent_containers/glass/proc/shatter(var/mob/user)
if(reagents.total_volume)
reagents.splash(src.loc, reagents.total_volume) // splashes the mob holding it or the turf it's on
audible_message("\The [src] shatters with a resounding crash!", "\The [src] breaks.")
playsound(src, "shatter", 40, 1)
new /obj/item/material/shard(loc, "glass")
qdel(src)
@@ -85,7 +78,7 @@
update_name_label()
return
. = ..() // in the case of nitroglycerin, explode BEFORE it shatters
if(!(W.flags & NOBLUDGEON) && hardness && (W.force < hardness))
if(!(W.flags & NOBLUDGEON) && fragile && (W.force > fragile))
shatter()
return
@@ -104,7 +97,7 @@
center_of_mass = list("x" = 15,"y" = 11)
matter = list("glass" = 500)
drop_sound = 'sound/items/drop/glass.ogg'
hardness = 3
fragile = 4
/obj/item/reagent_containers/glass/beaker/Initialize()
. = ..()
@@ -160,7 +153,7 @@
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,60,120)
flags = OPENCONTAINER
hardness = 4
fragile = 6 // a bit sturdier
/obj/item/reagent_containers/glass/beaker/bowl
name = "mixing bowl"
@@ -185,8 +178,7 @@
volume = 60
amount_per_transfer_from_this = 10
flags = OPENCONTAINER | NOREACT
hardness = 0
no_shatter = TRUE
fragile = 0
/obj/item/reagent_containers/glass/beaker/bluespace
name = "bluespace beaker"
@@ -198,8 +190,7 @@
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,60,120,300)
flags = OPENCONTAINER
hardness = 0
no_shatter = TRUE
fragile = 0
/obj/item/reagent_containers/glass/beaker/vial
name = "vial"
@@ -211,7 +202,7 @@
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25)
flags = OPENCONTAINER
hardness = 2
fragile = 1
/obj/item/reagent_containers/glass/beaker/cryoxadone
/obj/item/reagent_containers/glass/beaker/cryoxadone/Initialize()
@@ -244,7 +235,7 @@
var/carving_weapon = /obj/item/wirecutters
var/helmet_type = /obj/item/clothing/head/helmet/bucket
no_shatter = TRUE
hardness = 0
fragile = 0
/obj/item/reagent_containers/glass/bucket/attackby(var/obj/D, mob/user as mob)
if(isprox(D))
@@ -290,7 +281,6 @@ obj/item/reagent_containers/glass/bucket/wood
icon_state = "woodbucket"
item_state = "woodbucket"
center_of_mass = list("x" = 16,"y" = 8)
no_shatter = TRUE
matter = list("wood" = 50)
drop_sound = 'sound/items/drop/wooden.ogg'
carving_weapon = /obj/item/material/hatchet

View File

@@ -11,7 +11,7 @@
possible_transfer_amounts = list(5,10,15,25,30,60)
flags = 0
volume = 60
hardness = 3
fragile = 4
var/list/reagents_to_add
/obj/item/reagent_containers/glass/bottle/on_reagent_change()

View File

@@ -4,8 +4,7 @@
possible_transfer_amounts = list(5,10,15,25,30,50,100)
flags = OPENCONTAINER
volume = 60
hardness = 0
no_shatter = TRUE
fragile = 0 // do NOT shatter
var/reagent = ""