Merge pull request #2420 from Crazylemon64/monkey_multiplication

Monkey Multiplication
This commit is contained in:
Mark van Alphen
2015-10-28 02:44:28 +01:00
+12 -11
View File
@@ -53,11 +53,11 @@
var/mob/living/carbon/human/target = grabbed
if(issmall(target))
if(target.stat == 0)
user << "\red The monkey is struggling far too much to put it in the recycler."
user << "<span class='warning'>The monkey is struggling far too much to put it in the recycler.</span>"
else
user.drop_item()
qdel(target)
user << "\blue You stuff the monkey in the machine."
user << "<span class='notice'>You stuff the monkey in the machine.</span>"
playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1)
var/offset = prob(50) ? -2 : 2
animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking
@@ -65,22 +65,23 @@
src.grinded++
sleep(50)
pixel_x = initial(pixel_x)
user << "\blue The machine now has [grinded] monkeys worth of material stored."
user << "<span class='notice'>The machine now has [grinded] monkey\s worth of material stored.</span>"
else
user << "\red The machine only accepts monkeys!"
user << "<span class='warning'>The machine only accepts monkeys!</span>"
else
user << "\red The machine only accepts monkeys!"
user << "<span class='warning'>The machine only accepts monkeys!</span>"
return
/obj/machinery/monkey_recycler/attack_hand(var/mob/user as mob)
if (src.stat != 0) //NOPOWER etc
return
if(grinded >= required_grind)
user << "\blue The machine hisses loudly as it condenses the grinded monkey meat. After a moment, it dispenses a brand new monkey cube."
user << "<span class='notice'>The machine hisses loudly as it condenses the grinded monkey meat. After a moment, it dispenses a brand new monkey cube.</span>"
playsound(src.loc, 'sound/machines/hiss.ogg', 50, 1)
grinded -= required_grind
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src.loc)
user << "\blue The machine's display flashes that it has [grinded] monkeys worth of material left."
else
user << "\red The machine needs at least [required_grind] monkey\s worth of material to produce a monkey cube. It only has [grinded]."
return
for(var/i = 0, i < cube_production, i++) // Forgot to fix this bit the first time through
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src.loc)
user << "<span class='notice'>The machine's display flashes that it has [grinded] monkey\s worth of material left.</span>"
else // I'm not sure if the \s macro works with a word in between; I'll play it safe
user << "<span class='warning'>The machine needs at least [required_grind] monkey\s worth of material to compress [cube_production] monkey\s. It only has [grinded].</span>"
return