Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

Pineapple pizza causes braindamage #206

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 69 additions & 87 deletions code/obj/item/food/snacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,91 +50,73 @@
I.dispose()
..()

/obj/item/reagent_containers/food/snacks/pizza
name = "pizza"
desc = "A plain cheese and tomato pizza."
icon = 'icons/obj/foodNdrink/food_meals.dmi'
icon_state = "pizza_p"
amount = 6
heal_amt = 3
var/topping_color = null
var/sliced = 0
var/topping = 0
custom_food = 0

New()
/obj/item/reagent_containers/food/snacks/ingredient/pizza3
name = "uncooked pizza"
desc = "A plain cheese and tomato pizza. You need to bake it..."
icon_state = "pizzabase3"
amount = 1
custom_food = 0
var/num = null
var/topping_color = null
var/list/toppings = list()
var/list/topping_colors = list()
var/toppingstext = null

attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/reagent_containers/food/snacks/))
var/obj/item/reagent_containers/food/snacks/F = W
if(!F.custom_food)
return
boutput(user, "<span style=\"color:blue\">You add [W] to [src].</span>")
food_effects += F.food_effects
if (F.real_name)
toppings += F.real_name
else
toppings += W.name
toppingstext = copytext(html_encode(english_list(toppings)), 1, 512)
name = "uncooked [toppingstext] pizza"
desc = "A pizza with [toppingstext] toppings. You need to bake it..."
if (istype(W,/obj/item/reagent_containers/food/snacks/ingredient/pineapple) || istype(W,/obj/item/reagent_containers/food/snacks/ingredient/pineappleslice))
boutput(user, "<span style=\"color:blue\">A shiver runs down your spine!</span>")
heal_amt += 4
else if(istype(W,/obj/item/reagent_containers/food/snacks/ingredient/))
heal_amt += 4
else
heal_amt += round((F.heal_amt * F.amount)/amount) + 1
topping_color = F.food_color
if(num < 3)
num ++
add_topping(src.num)
W.reagents.trans_to(src, W.reagents.total_volume)
user.u_equip(W)
qdel (W)
else
return

proc/add_topping(var/num)
var/icon/I
I = new /icon('icons/obj/foodNdrink/food_meals.dmi',"pizza_topping_[num]")
I.Blend(topping_color, ICON_ADD)
src.topping_colors += topping_color
src.overlays += I

attack(mob/M as mob, mob/user as mob, def_zone)
if (user == M)
boutput(user, "<span style=\"color:red\">You need to bake it, you greedy beast!</span>")
user.visible_message("<b>[user]</b> stares at [src] in a confused manner.")
return
else
user.visible_message("<span style=\"color:red\"><b>[user]</b> futilely attempts to shove [src] into [M]'s mouth!</span>")
return

//Punishment for gastronomical heresy - Erinexx
heal(var/mob/M)
if (toppings.Find("pineapple"))
if (usr == M)
boutput(usr, "<span style=\"color:red\">You feel like you've made a terrible mistake!</span>")
M.emote("drool")
M.deal_brain_damage(5);
..()
if (prob(1))
spawn( rand(300, 900) )
src.visible_message("<b>[src]</b> <i>says, \"I'm pizza.\"</i>")

attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/axe) || istype(W, /obj/item/circular_saw) || istype(W, /obj/item/kitchen/utensil/knife) || istype(W, /obj/item/scalpel) || istype(W, /obj/item/sword) || istype(W,/obj/item/saw) || istype(W,/obj/item/knife_butcher))
if (src.sliced == 1)
boutput(user, "<span style=\"color:red\">This has already been sliced.</span>")
return
boutput(user, "<span style=\"color:blue\">You cut the pizza into slices.</span>")
if (src.name == "cheese keyzza")
boutput(user, "<i>You feel as though something of value has been lost...</i>")
var/makeslices = src.amount
while (makeslices > 0)
var/obj/item/reagent_containers/food/snacks/pizza/P = new src.type(get_turf(src))
P.sliced = 1
P.amount = 1
P.icon_state = "pslice"
P.quality = src.quality
if(topping)
P.name = src.name
P.desc = src.desc
P.topping = 1
P.topping_color = src.topping_color
P.add_topping(1)
src.reagents.trans_to(P, src.reagents.total_volume/makeslices)
P.pixel_x = rand(-6, 6)
P.pixel_y = rand(-6, 6)
makeslices--
qdel (src)
else if (istype(W, /obj/item/reagent_containers/food/snacks/) && !(topping) && !(sliced))
var/obj/item/reagent_containers/food/snacks/F = W
if(!F.custom_food)
return
topping = 1
boutput(user, "<span style=\"color:blue\">You add [W] to [src].</span>")
if(F.real_name)
src.name = "[F.real_name] pizza"
else
src.name = "[W.name] pizza"
desc = "A pizza with [W.name] toppings"
if(istype(W,/obj/item/reagent_containers/food/snacks/ingredient/))
heal_amt = 4
else
heal_amt = round((F.heal_amt * F.amount)/amount) + 1
topping_color = F.food_color
add_topping(0)
W.reagents.trans_to(src, W.reagents.total_volume)
user.u_equip(W)
qdel (W)

attack(mob/M as mob, mob/user as mob, def_zone)
if (!src.sliced)
if (user == M)
boutput(user, "<span style=\"color:red\">You can't just cram that in your mouth, you greedy beast!</span>")
user.visible_message("<b>[user]</b> stares at [src] in a confused manner.")
return
else
user.visible_message("<span style=\"color:red\"><b>[user]</b> futilely attempts to shove [src] into [M]'s mouth!</span>")
return
else
..()

proc/add_topping(var/num)
var/icon/I
if(num == 0)
I = new /icon('icons/obj/foodNdrink/food_meals.dmi',"pizza_topping")
else
I = new /icon('icons/obj/foodNdrink/food_meals.dmi',"pizza_topping_s")
I.Blend(topping_color, ICON_ADD)
src.overlays += I

/obj/item/reagent_containers/food/snacks/cookie
name = "sugar cookie"
Expand Down Expand Up @@ -769,7 +751,7 @@
M.stunned+= 2
return
else
boutput(M, "<span style=\"color:red\">The stink of the surstr�mming combines with your inherent body funk to create a stench of BIBLICAL PROPORTIONS!</span>")
boutput(M, "<span style=\"color:red\">The stink of the surstr�mming combines with your inherent body funk to create a stench of BIBLICAL PROPORTIONS!</span>")
M.name_suffix("the Stinky")
M.UpdateName()
..()
Expand All @@ -779,9 +761,9 @@
..()
if (usr.bioHolder.HasEffect("accent_swedish"))
if (src.icon_state == "surs_closed")
boutput(usr, "Oooh, a can of surstr�mming! It's been a while since you've seen one of these. It looks like it's ready to eat.")
boutput(usr, "Oooh, a can of surstr�mming! It's been a while since you've seen one of these. It looks like it's ready to eat.")
else
boutput(usr, "Oooh, a can of surstr�mming! It's been a while since you've seen one of these. It smells heavenly!")
boutput(usr, "Oooh, a can of surstr�mming! It's been a while since you've seen one of these. It smells heavenly!")
return
else
if (src.icon_state == "surs_closed")
Expand Down