Skip to content

Commit

Permalink
add reagents, fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
polygoblyn committed Sep 25, 2023
1 parent 5663c0e commit 48f1862
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
32 changes: 20 additions & 12 deletions monkestation/code/modules/loafing/code/loaf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,6 @@
var/time_left = max(0, (loaf.death_time - world.time) / 10)
return round(time_left)








/obj/item/food/prison_loaf/rod
name = "rod loaf"
desc = "If you loaf something, set it free. If it comes back, it's yours."
Expand Down Expand Up @@ -152,37 +145,40 @@
if(!src.can_condense)
return
switch(src.loaf_density)

if(0 to 10)
src.name = initial(src.name)
src.desc = "A barely edible brick of nutrients, designed as a low-cost solution to malnourishment."
src.icon_state = initial(src.icon_state) + "0"
src.force = 0
src.throwforce = 0
src.reagents.add_reagent(/datum/reagent/consumable/salt, 1)
src.reagents.add_reagent(/datum/reagent/consumable/nutraslop, 1)
if(11 to 100)
src.name = "dense " + initial(src.name)
src.desc = initial(src.desc) + " This loaf is noticeably heavier than usual."
src.icon_state = initial(src.icon_state) + "0"
src.force = 3
src.throwforce = 3
src.reagents.add_reagent(/datum/reagent/consumable/salt, 3)
src.reagents.add_reagent(/datum/reagent/consumable/nutraslop, 3)
if(101 to 250)
src.name = "compacted " + initial(src.name)
src.desc = initial(src.desc) + " Hooh, this thing packs a punch. What are they putting into these?"
src.icon_state = initial(src.icon_state) + "0"
src.force = 5
src.throwforce = 5
src.throw_range = 6
src.reagents.add_reagent(/datum/reagent/consumable/salt, 8)
src.reagents.add_reagent(/datum/reagent/consumable/salt, 5)
src.reagents.add_reagent(/datum/reagent/consumable/nutraslop, 5)
if(251 to 500)
src.name = "super-compressed " + initial(src.name)
src.desc = initial(src.desc) + " Hard enough to scratch a diamond, yet still somehow edible, this loaf seems to be emitting decay heat. Dear god."
src.icon_state = initial(src.icon_state) + "1"
src.force = 10
src.throwforce = 10
src.throw_range = 6
src.reagents.add_reagent(/datum/reagent/consumable/salt, 10)
src.reagents.add_reagent(/datum/reagent/consumable/salt, 8)
src.reagents.add_reagent(/datum/reagent/consumable/nutraslop, 8)
if(501 to 2500)
src.name = "molecular " + initial(src.name)
src.desc = initial(src.desc) + " The loaf has become so dense that no food particulates are visible to the naked eye."
Expand All @@ -191,6 +187,8 @@
src.throwforce = 20
src.throw_range = 5
src.reagents.add_reagent(/datum/reagent/consumable/salt, 10)
src.reagents.add_reagent(/datum/reagent/consumable/nutraslop, 10)
src.reagents.add_reagent(/datum/reagent/consumable/corn_syrup, 5)
if(2501 to 10000)
src.name = "atomic " + initial(src.name)
src.desc = initial(src.desc) + " Forget food particulates, the loaf is now comprised of flavor atoms."
Expand All @@ -199,22 +197,28 @@
src.throwforce = 40
src.throw_range = 4
src.reagents.add_reagent(/datum/reagent/consumable/salt, 10)
src.reagents.add_reagent(/datum/reagent/consumable/nutraslop, 10)
src.reagents.add_reagent(/datum/reagent/growthserum, 5)
if(10001 to 25000)
src.name = "sub atomic " + initial(src.name)
src.desc = initial(src.desc) + " Oh good, the flavor atoms in this prison loaf have collapsed down to a a solid lump of neutrons."
src.desc = initial(src.desc) + " Oh good, the flavor atoms in this prison loaf have collapsed down to a a solid lump of neutrons. Eating this could prove dangerous."
src.icon_state = initial(src.icon_state) + "4"
src.force = 65
src.throwforce = 65
src.throw_range = 3
src.reagents.add_reagent(/datum/reagent/consumable/salt, 10)
src.reagents.add_reagent(/datum/reagent/consumable/nutraslop, 10)
src.reagents.add_reagent(/datum/reagent/consumable/vitfro, 5)
if(25001 to 50000)
src.name = "quark " + initial(src.name)
src.desc = initial(src.desc) + " This nutritional loaf is collapsing into subatomic flavor particles. It is unfathmomably heavy."
src.desc = initial(src.desc) + " This nutritional loaf is collapsing into subatomic flavor particles. Consuption could convert your DNA into synthetic sludge."
src.icon_state = initial(src.icon_state) + "5"
src.force = 80
src.throwforce = 80
src.throw_range = 2
src.reagents.add_reagent(/datum/reagent/consumable/salt, 10)
src.reagents.add_reagent(/datum/reagent/consumable/nutraslop, 10)
src.reagents.add_reagent(/datum/reagent/mulligan, 5)
if(50001 to 100000)
src.name = "strangelet " + initial(src.name)
src.desc = initial(src.desc) + " At this point you may be considering: has man gone too far? Are we meant to have food this powerful?"
Expand All @@ -223,6 +227,8 @@
src.throwforce = 125
src.throw_range = 1
src.reagents.add_reagent(/datum/reagent/consumable/salt, 10)
src.reagents.add_reagent(/datum/reagent/consumable/nutraslop, 10)
src.reagents.add_reagent(/datum/reagent/cyborg_mutation_nanomachines, 5)
if(100001 to 1000000)
src.name = "quantum " + initial(src.name)
src.desc = initial(src.desc) + " The mere existence of this nutritional masterpiece is causing reality to distort!"
Expand All @@ -231,4 +237,6 @@
src.throwforce = 250
src.throw_range = 0
src.reagents.add_reagent(/datum/reagent/consumable/salt, 10)
src.reagents.add_reagent(/datum/reagent/consumable/nutraslop, 10)
src.reagents.add_reagent(/datum/reagent/gravitum, 25)
critical()
19 changes: 7 additions & 12 deletions monkestation/code/modules/loafing/code/loafer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,15 @@
playsound(src, 'monkestation/code/modules/loafing/sound/loafer.ogg', 100, 1)

//create new loaf
var/obj/item/food/prison_loaf/loaf = locate(/obj/item/food/prison_loaf) in holder.contents
if(!loaf)
loaf = new /obj/item/food/prison_loaf(src)
var/obj/item/food/prison_loaf/loaf = new /obj/item/food/prison_loaf(src)

//add all the garbage to the loaf's contents
for (var/atom/movable/debris in holder)
if(debris.reagents)//the object has reagents
debris.reagents.trans_to(loaf, 1000)
if(istype(debris, /obj/machinery/power/supermatter_crystal/))
var/obj/machinery/power/supermatter_crystal/loaf/superloaf = new /obj/machinery/power/supermatter_crystal/loaf
loaf = null
holder.contents += superloaf
break
if(istype(debris, /obj/item/food/prison_loaf))//the object is a loaf, compress somehow
var/obj/item/food/prison_loaf/loaf_to_grind = debris
loaf.loaf_density += loaf_to_grind.loaf_density
loaf.loaf_density += loaf_to_grind.loaf_density * 1.05
loaf_to_grind = null
else if(isliving(debris))
var/mob/living/victim = debris
Expand All @@ -41,8 +34,10 @@
loaf.reagents.add_reagent(/datum/reagent/fuel, 10)
loaf.reagents.add_reagent(/datum/reagent/iron, 10)
else
loaf.reagents.add_reagent(/datum/reagent/blood, 10)
loaf.reagents.add_reagent(/datum/reagent/ammonia/urine, 10)
loaf.reagents.add_reagent(/datum/reagent/bone_dust, 3)
loaf.reagents.add_reagent(/datum/reagent/ammonia/urine, 2)
loaf.reagents.add_reagent(/datum/reagent/consumable/liquidgibs, 2)
loaf.reagents.add_reagent(/datum/reagent/consumable/nutriment/organ_tissue, 2)
//then we give the loaf more power
if(ishuman(victim))
loaf.loaf_density += 50
Expand All @@ -56,7 +51,7 @@
else if (istype(debris, /obj/item))//everything else
var/obj/item/kitchen_sink = debris
var/weight = kitchen_sink.w_class
loaf.loaf_density += weight
loaf.loaf_density += weight * 3
holder.contents -= debris
qdel(debris)

Expand Down

0 comments on commit 48f1862

Please sign in to comment.