From fb5d048dbd9aecf1d1f3873866cc97962e879ef6 Mon Sep 17 00:00:00 2001 From: DarkPyrolord Date: Wed, 14 Feb 2018 02:29:39 +1300 Subject: [PATCH 1/4] Bluespace B Gone --- code/modules/food_and_drinks/food/snacks.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 5643185bfb5..0432b455326 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -131,6 +131,10 @@ ) inaccurate = 1 else if(W.w_class <= WEIGHT_CLASS_SMALL && istype(src,/obj/item/weapon/reagent_containers/food/snacks/sliceable)) + if(contents.len) + // Nope, no bluespace slice food + to_chat(user, "Something is already in the [src]!") + return 1 if(!iscarbon(user)) return 1 to_chat(user, "You slip [W] inside [src].") From 0f8533ea18ce3ab763bea44bafe40098a395f2a0 Mon Sep 17 00:00:00 2001 From: DarkPyrolord Date: Tue, 20 Feb 2018 22:34:45 +1300 Subject: [PATCH 2/4] Tiger Fixes --- code/modules/food_and_drinks/food/snacks.dm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 0432b455326..50bddf4e5e6 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -1,3 +1,4 @@ +#define MAX_WEIGHT_CLASS WEIGHT_CLASS_SMALL * 2 //Food items that are eaten normally and don't leave anything behind. /obj/item/weapon/reagent_containers/food/snacks name = "snack" @@ -14,6 +15,7 @@ var/dry = 0 var/cooktype[0] var/cooked_type = null //for microwave cooking. path of the resulting item after microwaving + var/total_w_class = 0 //for the total weight an item of food can carry //Placeholder for effect that trigger on eating that aren't tied to reagents. @@ -130,10 +132,10 @@ istype(W, /obj/item/weapon/hatchet) \ ) inaccurate = 1 - else if(W.w_class <= WEIGHT_CLASS_SMALL && istype(src,/obj/item/weapon/reagent_containers/food/snacks/sliceable)) + if(total_w_class > MAX_WEIGHT_CLASS) if(contents.len) // Nope, no bluespace slice food - to_chat(user, "Something is already in the [src]!") + to_chat(user, "Something is already in [src]!") return 1 if(!iscarbon(user)) return 1 @@ -142,6 +144,7 @@ if((user.client && user.s_active != src)) user.client.screen -= W W.dropped(user) + total_w_class += W.w_class add_fingerprint(user) contents += W return @@ -2525,4 +2528,5 @@ icon_state = "onionrings" list_reagents = list("nutriment" = 3) filling_color = "#C0C9A0" - gender = PLURAL \ No newline at end of file + gender = PLURAL +#undef MAX_WEIGHT_CLASS \ No newline at end of file From ddf32096f0bfaaaaa06b386bd6107b74ae137225 Mon Sep 17 00:00:00 2001 From: DarkPyrolord Date: Wed, 21 Feb 2018 01:05:33 +1300 Subject: [PATCH 3/4] I should get more sleep --- code/modules/food_and_drinks/food/snacks.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 50bddf4e5e6..a3d0f1faa2f 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -132,7 +132,7 @@ istype(W, /obj/item/weapon/hatchet) \ ) inaccurate = 1 - if(total_w_class > MAX_WEIGHT_CLASS) + if(total_w_class > MAX_WEIGHT_CLASS && istype(src,/obj/item/weapon/reagent_containers/food/snacks/sliceable)) if(contents.len) // Nope, no bluespace slice food to_chat(user, "Something is already in [src]!") From 2b2bedee9b0cc59c3a7593c0cf103db19a51fbbc Mon Sep 17 00:00:00 2001 From: DarkPyrolord Date: Wed, 21 Feb 2018 13:11:27 +1300 Subject: [PATCH 4/4] Tired code is shitcode --- code/modules/food_and_drinks/food/snacks.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index a3d0f1faa2f..71a089683ce 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -132,8 +132,8 @@ istype(W, /obj/item/weapon/hatchet) \ ) inaccurate = 1 - if(total_w_class > MAX_WEIGHT_CLASS && istype(src,/obj/item/weapon/reagent_containers/food/snacks/sliceable)) - if(contents.len) + else if(W.w_class <= WEIGHT_CLASS_SMALL && istype(src,/obj/item/weapon/reagent_containers/food/snacks/sliceable)) + if(total_w_class > MAX_WEIGHT_CLASS) // Nope, no bluespace slice food to_chat(user, "Something is already in [src]!") return 1