This commit is contained in:
Furlucis
2014-01-17 03:05:04 -05:00
57 changed files with 2296 additions and 1262 deletions

View File

@@ -1,4 +1,4 @@
/proc/GetColors(hex)
/proc/GetColors(hex) //Actually converts hex to rgb
hex = uppertext(hex)
var/hi1 = text2ascii(hex, 2)
var/lo1 = text2ascii(hex, 3)
@@ -15,7 +15,7 @@
var/list/rgbcolor = list(0,0,0)
var/finalcolor = 0
for(var/datum/reagent/re in reagent_list) // natural color mixing bullshit/algorithm
for(var/datum/reagent/re in reagent_list) //TODO: weigh final colour by amount of reagents; make this algorithm use hex
if(!finalcolor)
rgbcolor = GetColors(re.color)
finalcolor = re.color

View File

@@ -146,7 +146,7 @@
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 370, 605)
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 380, 650)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window

View File

@@ -134,7 +134,7 @@ About Reagents:
object melting in here ... or something. i dunno.
reaction_turf(var/turf/T)
This is called by the holder's reation proc.
This is called by the holder's reaction proc.
This version is called when the reagents reacts
with a turf. You'll want to put stuff like extra
slippery floors for lube or something in here.
@@ -144,7 +144,7 @@ About Reagents:
This is the place where you put damage for toxins ,
drowsyness for sleep toxins etc etc.
You'll want to call the parents proc by using ..() .
If you dont, the chemical will stay in the mob forever -
If you don't, the chemical will stay in the mob forever -
unless you write your own piece of code to slowly remove it.
(Should be pretty easy, 1 line of code)

View File

@@ -23,7 +23,7 @@ datum
var/list/data = null
var/volume = 0
var/nutriment_factor = 0
var/custom_metabolism = REAGENTS_METABOLISM //Default 0.2
var/custom_metabolism = REAGENTS_METABOLISM
var/overdose = 0
var/overdose_dam = 1
//var/list/viruses = list()

View File

@@ -4,6 +4,7 @@
/obj/item/weapon/reagent_containers/food
possible_transfer_amounts = null
volume = 50 //Sets the default container amount for all food items.
var/filling_color = "#FFFFFF" //Used by sandwiches.
/obj/item/weapon/reagent_containers/food/New()
..()

View File

@@ -0,0 +1,101 @@
/obj/item/weapon/reagent_containers/food/snacks/breadslice/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/shard) || istype(W,/obj/item/weapon/reagent_containers/food/snacks))
var/obj/item/weapon/reagent_containers/food/snacks/csandwich/S = new(get_turf(src))
S.attackby(W,user)
del(src)
..()
/obj/item/weapon/reagent_containers/food/snacks/csandwich
name = "sandwich"
desc = "The best thing since sliced bread."
icon_state = "breadslice"
trash = /obj/item/trash/plate
bitesize = 2
var/list/ingredients = list()
/obj/item/weapon/reagent_containers/food/snacks/csandwich/attackby(obj/item/W as obj, mob/user as mob)
var/sandwich_limit = 4
for(var/obj/item/O in ingredients)
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/breadslice))
sandwich_limit += 4
if(src.contents.len > sandwich_limit)
user << "\red If you put anything else on \the [src] it's going to collapse."
return
else if(istype(W,/obj/item/weapon/shard))
user << "\blue You hide [W] in \the [src]."
user.drop_item()
W.loc = src
update()
return
else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks))
user << "\blue You layer [W] over \the [src]."
var/obj/item/weapon/reagent_containers/F = W
F.reagents.trans_to(src, F.reagents.total_volume)
user.drop_item()
W.loc = src
ingredients += W
update()
return
..()
/obj/item/weapon/reagent_containers/food/snacks/csandwich/proc/update()
var/fullname = "" //We need to build this from the contents of the var.
var/i = 0
overlays.Cut()
for(var/obj/item/weapon/reagent_containers/food/snacks/O in ingredients)
i++
if(i == 1)
fullname += "[O.name]"
else if(i == ingredients.len)
fullname += " and [O.name]"
else
fullname += ", [O.name]"
var/image/I = new(src.icon, "sandwich_filling")
I.color = O.filling_color
I.pixel_x = pick(list(-1,0,1))
I.pixel_y = (i*2)+1
overlays += I
var/image/T = new(src.icon, "sandwich_top")
T.pixel_x = pick(list(-1,0,1))
T.pixel_y = (ingredients.len * 2)+1
overlays += T
name = lowertext("[fullname] sandwich")
if(length(name) > 80) name = "[pick(list("absurd","colossal","enormous","ridiculous"))] sandwich"
w_class = n_ceil(Clamp((ingredients.len/2),1,3))
/obj/item/weapon/reagent_containers/food/snacks/csandwich/Del()
for(var/obj/item/O in ingredients)
del(O)
..()
/obj/item/weapon/reagent_containers/food/snacks/csandwich/examine()
..()
var/obj/item/O = pick(contents)
usr << "\blue You think you can see [O.name] in there."
/obj/item/weapon/reagent_containers/food/snacks/csandwich/attack(mob/M as mob, mob/user as mob, def_zone)
var/obj/item/shard
for(var/obj/item/O in contents)
if(istype(O,/obj/item/weapon/shard))
shard = O
break
var/mob/living/H
if(istype(M,/mob/living))
H = M
if(H && shard && M == user) //This needs a check for feeding the food to other people, but that could be abusable.
H << "\red You lacerate your mouth on a [shard.name] in the sandwich!"
H.adjustBruteLoss(5) //TODO: Target head if human.
..()

File diff suppressed because it is too large Load Diff

View File

@@ -113,6 +113,7 @@
desc = "Needs some butter!"
icon_state = "corn"
potency = 40
filling_color = "#FFEE00"
trash = /obj/item/weapon/corncob
New()
@@ -126,6 +127,7 @@
name = "cherries"
desc = "Great for toppings!"
icon_state = "cherry"
filling_color = "#FF0000"
gender = PLURAL
New()
..()
@@ -140,6 +142,7 @@
desc = "Long-used as a symbol of rest, peace, and death."
icon_state = "poppy"
potency = 30
filling_color = "#CC6464"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -153,6 +156,7 @@
desc = "\"I'll sweeten thy sad grave: thou shalt not lack the flower that's like thy face, pale primrose, nor the azured hare-bell, like thy veins; no, nor the leaf of eglantine, whom not to slander, out-sweeten<65>d not thy breath.\""
icon_state = "harebell"
potency = 1
filling_color = "#D4B2C9"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -165,6 +169,7 @@
desc = "Boil 'em! Mash 'em! Stick 'em in a stew!"
icon_state = "potato"
potency = 25
filling_color = "#E6E8DA"
New()
..()
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
@@ -189,6 +194,7 @@
name = "bunch of grapes"
desc = "Nutritious!"
icon_state = "grapes"
filling_color = "#A332AD"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -202,6 +208,7 @@
desc = "Nutritious!"
icon_state = "greengrapes"
potency = 25
filling_color = "#A6FFA3"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -215,6 +222,7 @@
desc = "Ewwwwwwwwww. Cabbage."
icon_state = "cabbage"
potency = 25
filling_color = "#A2B5A1"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -226,6 +234,7 @@
name = "bunch of berries"
desc = "Nutritious!"
icon_state = "berrypile"
filling_color = "#C2C9FF"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -237,6 +246,7 @@
name = "clump of plastellium"
desc = "Hmm, needs some processing"
icon_state = "plastellium"
filling_color = "#C4C4C4"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -247,8 +257,9 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/shand
seed = "/obj/item/seeds/shandseed"
name = "S'rendarr's Hand leaf"
desc = "A leaf sample from a lowland thicket shrub, often hid in by prey and predator to staunch their wounds and conceal their scent, allowing the plant to spread far on it's native Ahdomai. Smells strongly like wax."
desc = "A leaf sample from a lowland thicket shrub, often hid in by prey and predator to staunch their wounds and conceal their scent, allowing the plant to spread far on its native Ahdomai. Smells strongly like wax."
icon_state = "shand"
filling_color = "#70C470"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -260,6 +271,7 @@
name = "sprig of Messa's Tear"
desc = "A mountain climate herb with a soft, cold blue flower, known to contain an abundance of chemicals in it's flower useful to treating burns- Bad for the allergic to pollen."
icon_state = "mtear"
filling_color = "#70C470"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -293,6 +305,7 @@
desc = "Nutritious!"
var/light_on = 1
var/brightness_on = 2 //luminosity when on
filling_color = "#D3FF9E"
icon_state = "glowberrypile"
New()
..()
@@ -320,6 +333,7 @@
desc = "Fattening... Mmmmm... chucklate."
icon_state = "cocoapod"
potency = 50
filling_color = "#9C8E54"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -333,6 +347,7 @@
desc = "Sickly sweet."
icon_state = "sugarcane"
potency = 50
filling_color = "#C0C9AD"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -345,6 +360,7 @@
icon_state = "poisonberrypile"
gender = PLURAL
potency = 15
filling_color = "#B422C7"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -359,6 +375,7 @@
icon_state = "deathberrypile"
gender = PLURAL
potency = 50
filling_color = "#4E0957"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -373,6 +390,7 @@
desc = "This is a plant containing various healing chemicals."
icon_state = "ambrosiavulgaris"
potency = 10
filling_color = "#125709"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -389,6 +407,7 @@
desc = "Eating this makes you feel immortal!"
icon_state = "ambrosiadeus"
potency = 10
filling_color = "#229E11"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -405,6 +424,7 @@
desc = "It's a little piece of Eden."
icon_state = "apple"
potency = 15
filling_color = "#DFE88B"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -418,6 +438,7 @@
desc = "It's a little piece of Eden."
icon_state = "apple"
potency = 15
filling_color = "#B3BD5E"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -431,6 +452,7 @@
desc = "Emblazoned upon the apple is the word 'Kallisti'."
icon_state = "goldapple"
potency = 15
filling_color = "#F5CB42"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -450,6 +472,7 @@
desc = "It's full of watery goodness."
icon_state = "watermelon"
potency = 10
filling_color = "#FA2863"
slice_path = /obj/item/weapon/reagent_containers/food/snacks/watermelonslice
slices_num = 5
New()
@@ -464,6 +487,7 @@
desc = "It's large and scary."
icon_state = "pumpkin"
potency = 10
filling_color = "#FAB728"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -485,6 +509,7 @@
desc = "It's so sour, your face will twist."
icon_state = "lime"
potency = 20
filling_color = "#28FA59"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -497,6 +522,7 @@
desc = "When life gives you lemons, be grateful they aren't limes."
icon_state = "lemon"
potency = 20
filling_color = "#FAF328"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -509,6 +535,7 @@
desc = "It's an tangy fruit."
icon_state = "orange"
potency = 20
filling_color = "#FAAD28"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -521,6 +548,7 @@
desc = "You can't beat white-beet."
icon_state = "whitebeet"
potency = 15
filling_color = "#FFFCCC"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -535,6 +563,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "banana"
item_state = "banana"
filling_color = "#FCF695"
trash = /obj/item/weapon/bananapeel
New()
@@ -550,6 +579,7 @@
name = "chili"
desc = "It's spicy! Wait... IT'S BURNING ME!!"
icon_state = "chilipepper"
filling_color = "#FF0000"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -567,6 +597,7 @@
name = "eggplant"
desc = "Maybe there's a chicken inside?"
icon_state = "eggplant"
filling_color = "#550F5C"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -578,6 +609,7 @@
name = "soybeans"
desc = "It's pretty bland, but oh the possibilities..."
gender = PLURAL
filling_color = "#E6E8B7"
icon_state = "soybeans"
New()
..()
@@ -590,6 +622,7 @@
name = "tomato"
desc = "I say to-mah-to, you say tom-mae-to."
icon_state = "tomato"
filling_color = "#FF0000"
potency = 10
New()
..()
@@ -610,6 +643,7 @@
desc = "I say to-mah-to, you say tom-mae-to... OH GOD IT'S EATING MY LEGS!!"
icon_state = "killertomato"
potency = 10
filling_color = "#FF0000"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -639,6 +673,7 @@
desc = "So bloody...so...very...bloody....AHHHH!!!!"
icon_state = "bloodtomato"
potency = 10
filling_color = "#FF0000"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -662,6 +697,7 @@
desc = "I say blue-mah-to, you say blue-mae-to."
icon_state = "bluetomato"
potency = 10
filling_color = "#586CFC"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -697,6 +733,7 @@
desc = "Sigh... wheat... a-grain?"
gender = PLURAL
icon_state = "wheat"
filling_color = "#F7E186"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -709,6 +746,7 @@
desc = "Rice to see you."
gender = PLURAL
icon_state = "rice"
filling_color = "#FFF8DB"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -720,6 +758,7 @@
name = "kudzu pod"
desc = "<I>Pueraria Virallis</I>: An invasive species with vines that rapidly creep and wrap around whatever they contact."
icon_state = "kudzupod"
filling_color = "#59691B"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -733,6 +772,7 @@
desc = "It's a mutant strain of chili"
icon_state = "icepepper"
potency = 20
filling_color = "#66CEED"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -751,6 +791,7 @@
desc = "It's good for the eyes!"
icon_state = "carrot"
potency = 10
filling_color = "#FFC400"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -764,6 +805,7 @@
desc = "<I>Ganoderma lucidum</I>: A special fungus believed to help relieve stress."
icon_state = "reishi"
potency = 10
filling_color = "#FF4800"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -784,6 +826,7 @@
desc = "<I>Amanita Muscaria</I>: Learn poisonous mushrooms by heart. Only pick mushrooms you know."
icon_state = "amanita"
potency = 10
filling_color = "#FF0000"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -804,6 +847,7 @@
desc = "<I>Amanita Virosa</I>: Deadly poisonous basidiomycete fungus filled with alpha amatoxins."
icon_state = "angel"
potency = 35
filling_color = "#FFDEDE"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -824,6 +868,7 @@
desc = "<I>Psilocybe Semilanceata</I>: Liberate yourself!"
icon_state = "libertycap"
potency = 15
filling_color = "#F714BE"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -841,6 +886,7 @@
name = "plump-helmet"
desc = "<I>Plumus Hellmus</I>: Plump, soft and s-so inviting~"
icon_state = "plumphelmet"
filling_color = "#F714BE"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -852,6 +898,7 @@
name = "walking mushroom"
desc = "<I>Plumus Locomotus</I>: The beginning of the great walk."
icon_state = "walkingmushroom"
filling_color = "#FFBFEF"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -880,6 +927,7 @@
name = "chanterelle cluster"
desc = "<I>Cantharellus Cibarius</I>: These jolly yellow little shrooms sure look tasty!"
icon_state = "chanterelle"
filling_color = "#FFE991"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -891,6 +939,7 @@
name = "glowshroom cluster"
desc = "<I>Mycena Bregprox</I>: This species of mushroom glows in the dark. Or does it?"
icon_state = "glowshroom"
filling_color = "#DAFF91"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -988,6 +1037,7 @@
icon_state = "bluespacetomato"
potency = 20
origin_tech = "bluespace=3"
filling_color = "#91F8FF"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops

View File

@@ -3,6 +3,7 @@
desc = "A slab of meat"
icon_state = "meat"
health = 180
filling_color = "#FF1C1C"
New()
..()
reagents.add_reagent("nutriment", 3)

View File

@@ -47,11 +47,11 @@
set src in view()
..()
if (!(usr in view(2)) && usr!=src.loc) return
usr << "\blue It contains:"
usr << "\blue It contains "
if(reagents && reagents.reagent_list.len)
usr << "\blue [src.reagents.total_volume] units of liquid."
else
usr << "\blue Nothing."
usr << "\blue nothing."
if (!is_open_container())
usr << "\blue Airtight lid seals it completely."
@@ -216,7 +216,7 @@
/obj/item/weapon/reagent_containers/glass/beaker/bluespace
name = "bluespace beaker"
desc = "A bluespace beaker, powered by experimental bluespace technology and Element Cuban combined with the Compound Pete. Can hold up to 300 units."
desc = "A bluespace beaker, powered by experimental bluespace technology. Can hold up to 300 units."
icon_state = "beakerbluespace"
g_amt = 5000
volume = 300