Skip to content

Commit

Permalink
fuck
Browse files Browse the repository at this point in the history
  • Loading branch information
polygoblyn committed Sep 22, 2023
1 parent 8a7fd10 commit 7eff71a
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 30 deletions.
66 changes: 63 additions & 3 deletions monkestation/code/modules/loafing/code/loaf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,82 @@
desc = "A barely edible brick of nutrients, designed as a low-cost solution to malnourishment."
icon = 'monkestation/code/modules/loafing/icon/obj.dmi'
icon_state = "loaf0"
var/loaf_density = 0
var/loaf_density = 1 //base loaf density
var/can_condense = TRUE //for special loaves, make false


/obj/item/food/prison_loaf/proc/condense()
if(!src.can_condense)
return
switch(src.loaf_density)

if(0 to 100)
if(0 to 10)
src.name = "prison loaf"
src.desc = "A barely edible brick of nutrients, designed as a low-cost solution to malnourishment."
src.icon_state = "loaf0"
src.force = 0
src.throwforce = 0
if(101 to 250)
if(11 to 100)
src.name = "dense prison loaf"
src.desc = "This loaf is noticeably heavier than usual."
src.icon_state = "loaf0"
src.force = 3
src.throwforce = 3
if(101 to 250)
src.name = "thicc ass prison loaf"
src.desc = "This loaf is caked UP"
src.icon_state = "loaf0"
src.force = 5
src.throwforce = 5
src.throw_range = 6
if(251 to 500)
src.name = "thicc ass prison loaf"
src.desc = "This loaf is caked UP"
src.icon_state = "loaf1"
src.force = 10
src.throwforce = 10
src.throw_range = 6
if(501 to 2500)
src.name = "thicc ass prison loaf"
src.desc = "This loaf is caked UP"
src.icon_state = "loaf1"
src.force = 20
src.throwforce = 20
src.throw_range = 5
if(2501 to 50000)
src.name = "thicc ass prison loaf"
src.desc = "This loaf is caked UP"
src.icon_state = "loaf1"
src.force = 40
src.throwforce = 40
src.throw_range = 4
if(50001 to 250000)
src.name = "thicc ass prison loaf"
src.desc = "This loaf is caked UP"
src.icon_state = "loaf1"
src.force = 65
src.throwforce = 65
src.throw_range = 3
if(250001 to 1000000)
src.name = "thicc ass prison loaf"
src.desc = "This loaf is caked UP"
src.icon_state = "loaf1"
src.force = 80
src.throwforce = 80
src.throw_range = 2
if(250001 to 1000000)
src.name = "thicc ass prison loaf"
src.desc = "This loaf is caked UP"
src.icon_state = "loaf1"
src.force = 125
src.throwforce = 125
src.throw_range = 1
if(250001 to 1000000)
src.name = "quantum loaf"
src.desc = "This loaf is caked UP"
src.icon_state = "loaf1"
src.force = 250
src.throwforce = 250
src.throw_range = 0


55 changes: 28 additions & 27 deletions monkestation/code/modules/loafing/code/loafer.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

/obj/structure/disposalpipe/loafer
name = "loafing device"
desc = "A prisoner feeding device that condenses matter into an Ultra Delicious(tm) nutrition bar!"
Expand All @@ -6,16 +7,14 @@


/obj/structure/disposalpipe/loafer/transfer(obj/structure/disposalholder/debris)

var/nextdir = nextdir(debris.dir)
//check if there's anything in there
if (debris.contents.len)
//start playing sound
playsound(src.loc, "sound", 50, 1)
src.icon_state = "loafer-on"

//create new loaf
playsound(src, 'monkestation/code/modules/loafing/sound/loafer.ogg', 50, 1)
//create the loaf
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/foodstuff in debris)
if(foodstuff.reagents)//the object has reagents
Expand All @@ -28,11 +27,11 @@
var/mob/living/victim = foodstuff
//different mobs add different reagents
if(issilicon(victim))
loaf.reagents.add_reagent("oil", 10)
loaf.reagents.add_reagent("iron", 10)
loaf.reagents.add_reagent(/datum/reagent/fuel, 10)
loaf.reagents.add_reagent(/datum/reagent/iron, 10)
else
loaf.reagents.add_reagent("blood", 10)
loaf.reagents.add_reagent("urine", 10)
loaf.reagents.add_reagent(/datum/reagent/blood, 10)
loaf.reagents.add_reagent(/datum/reagent/ammonia/urine, 10)
//then we give the loaf more power
if(ishuman(victim))
loaf.loaf_density += 50
Expand All @@ -50,28 +49,30 @@
debris.contents -= foodstuff
qdel(foodstuff)

//condense the loaf
loaf.condense()
loaf.loc = debris.loc
src.icon_state = "loafer"
playsound(src, 'sound/machines/microwave/microwave-end.ogg', 50, 1)
debris.contents += loaf

addtimer(CALLBACK(src, PROC_REF(output_debris), debris, nextdir), 10 SECONDS)

return transfer_to_dir(debris, nextdir(debris))
/obj/structure/disposalpipe/loafer/proc/output_debris(obj/structure/disposalholder/debris, nextdir)
debris.setDir(nextdir)
var/turf/nextturf = debris.nextloc()
var/obj/structure/disposalpipe/nextpipe = debris.findpipe(nextturf)

/obj/structure/disposalpipe/loafer/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(disassembled)
if(stored)
stored.forceMove(loc)
transfer_fingerprints_to(stored)
stored.setDir(dir)
stored = null
else
var/turf/T = get_turf(src)
for(var/D in GLOB.cardinals)
if(D & dpdir)
var/obj/structure/disposalpipe/broken/P = new(T)
P.setDir(D)
spew_forth()
qdel(src)
if(!nextpipe) // if there wasn't a pipe, then they'll be expelled.
return
// find other holder in next loc, if inactive merge it with current
var/obj/structure/disposalholder/nextholder = locate() in nextpipe
if(nextholder && !nextholder.active)
if(nextholder.hasmob) //If it's stopped and there's a mob, add to the pile
nextholder.merge(debris)
return
debris.merge(nextholder)//Otherwise, we push it along through.
debris.forceMove(nextpipe)
return nextpipe

/obj/structure/disposalconstruct/loafer
name = "disposal pipe segment"
Expand Down
Binary file not shown.

0 comments on commit 7eff71a

Please sign in to comment.