Badda Boomba

This commit is contained in:
Jazz23
2019-02-13 12:58:21 -08:00
parent 288275e51e
commit 45a1920cd4
3 changed files with 48 additions and 1 deletions
@@ -26,10 +26,12 @@
var/datum/action/innate/slime_pick_up/slime_up_action = new
var/datum/action/innate/feed_slime/feed_slime_action = new
var/datum/action/innate/monkey_recycle/monkey_recycle_action = new
var/datum/action/innate/mutate_slime/mutate_slime_action = new
var/list/stored_slimes = list()
var/max_slimes = 5
var/monkeys = 0
var/mutators = 0
icon_screen = "slime_comp"
icon_keyboard = "rd_key"
@@ -62,6 +64,11 @@
monkey_recycle_action.target = src
monkey_recycle_action.Grant(user)
actions += monkey_recycle_action
if(mutate_slime_action)
mutate_slime_action.target = src
mutate_slime_action.Grant(user)
actions += mutate_slime_action
/obj/machinery/computer/camera_advanced/xenobio/attack_hand(mob/user)
@@ -76,6 +83,12 @@
user.drop_item()
qdel(O)
return
else if (istype(O, /obj/item/slimepotion/mutator))
mutators++
to_chat(user, "<span class='notice'>You feed [O] to [src]. It now has [mutators] slime mutation potions stored.</span>")
user.drop_item()
qdel(O)
return
else if(istype(O, /obj/item/storage/bag))
var/obj/item/storage/P = O
var/loaded = 0
@@ -86,6 +99,15 @@
qdel(MC)
if(loaded)
to_chat(user, "<span class='notice'>You fill [src] with the monkey cubes stored in [O]. [src] now has [monkeys] monkey cubes stored.</span>")
loaded = 0
for(var/obj/item/slimepotion/mutator/M in P.contents)
loaded = 1
mutators++
P.remove_from_storage(M)
qdel(M)
if(loaded)
to_chat(user, "<span class='notice'>You fill [src] with the slime mutation potions stored in [O]. [src] now has [mutators] slime mutation potions stored.</span>")
return
..()
@@ -170,5 +192,30 @@
M.visible_message("[M] vanishes as [M.p_theyre()] reclaimed for recycling!")
X.monkeys = round(X.monkeys + 0.2,0.1)
qdel(M)
else
to_chat(owner, "<span class='notice'>Target is not near a camera. Cannot proceed.</span>")
/datum/action/innate/mutate_slime
name = "Mutate Slimes"
button_icon_state = "mutate_slimes"
/datum/action/innate/mutate_slime/Activate()
if(!target || !ishuman(owner))
return
var/mob/living/carbon/human/C = owner
var/mob/camera/aiEye/remote/xenobio/remote_eye = C.remote_control
var/obj/machinery/computer/camera_advanced/xenobio/X = target
if(cameranet.checkTurfVis(remote_eye.loc))
for(var/mob/living/carbon/slime/S in remote_eye.loc)
if(X.mutators)
var/obj/item/slimepotion/mutator/M = new /obj/item/slimepotion/mutator
if(!M.attack(S, owner))
X.mutators--
to_chat(owner, "[X] now has [X.mutators] slime mutation potions left.")
else
qdel(M)
else
//to_chat(ownder, "<span class='notice'>The console contains 0 slime mutators!</span>") Leaving this out because the monkey feeder thing doesn't have one of these if you don't have any monkeys left.
else
to_chat(owner, "<span class='notice'>Target is not near a camera. Cannot proceed.</span>")