Slime update

This commit is contained in:
Kelenius
2014-07-13 17:37:30 +04:00
parent 0e5b7dea5b
commit aad89409de
31 changed files with 903 additions and 1083 deletions

View File

@@ -981,6 +981,7 @@
#include "code\modules\mob\living\carbon\metroid\login.dm" #include "code\modules\mob\living\carbon\metroid\login.dm"
#include "code\modules\mob\living\carbon\metroid\metroid.dm" #include "code\modules\mob\living\carbon\metroid\metroid.dm"
#include "code\modules\mob\living\carbon\metroid\powers.dm" #include "code\modules\mob\living\carbon\metroid\powers.dm"
#include "code\modules\mob\living\carbon\metroid\say.dm"
#include "code\modules\mob\living\carbon\metroid\subtypes.dm" #include "code\modules\mob\living\carbon\metroid\subtypes.dm"
#include "code\modules\mob\living\carbon\metroid\update_icons.dm" #include "code\modules\mob\living\carbon\metroid\update_icons.dm"
#include "code\modules\mob\living\carbon\monkey\death.dm" #include "code\modules\mob\living\carbon\monkey\death.dm"

View File

@@ -63,7 +63,7 @@
slime.Discipline = 0 slime.Discipline = 0
if(power >= 3) if(power >= 3)
if(istype(slime, /mob/living/carbon/slime/adult)) if(slime.is_adult)
if(prob(5 + round(power/2))) if(prob(5 + round(power/2)))
if(slime.Victim) if(slime.Victim)

View File

@@ -173,7 +173,7 @@
return src.attack_hand(user) return src.attack_hand(user)
/obj/machinery/door/window/attack_paw(mob/user as mob) /obj/machinery/door/window/attack_paw(mob/user as mob)
if(istype(user, /mob/living/carbon/alien/humanoid) || istype(user, /mob/living/carbon/slime/adult)) if(istype(user, /mob/living/carbon/alien/humanoid))
if(src.operating) if(src.operating)
return return
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
@@ -346,4 +346,4 @@
/obj/machinery/door/window/brigdoor/southright /obj/machinery/door/window/brigdoor/southright
dir = SOUTH dir = SOUTH
icon_state = "rightsecure" icon_state = "rightsecure"
base_state = "rightsecure" base_state = "rightsecure"

View File

@@ -425,4 +425,47 @@ REAGENT SCANNER
name = "advanced reagent scanner" name = "advanced reagent scanner"
icon_state = "adv_spectrometer" icon_state = "adv_spectrometer"
details = 1 details = 1
origin_tech = "magnets=4;biotech=2" origin_tech = "magnets=4;biotech=2"
/obj/item/device/slime_scanner
name = "slime scanner"
icon_state = "adv_spectrometer"
item_state = "analyzer"
origin_tech = "biotech=1"
w_class = 2.0
flags = CONDUCT
throwforce = 0
throw_speed = 3
throw_range = 7
matter = list("metal" = 30,"glass" = 20)
/obj/item/device/slime_scanner/attack(mob/living/M as mob, mob/living/user as mob)
if (!isslime(M))
user << "<B>This device can only scan slimes!</B>"
return
var/mob/living/carbon/slime/T = M
user.show_message("Slime scan results:")
user.show_message(text("[T.colour] [] slime", T.is_adult ? "adult" : "baby"))
user.show_message(text("Nutrition: [T.nutrition]/[]", T.get_max_nutrition()))
if (T.nutrition < T.get_starve_nutrition())
user.show_message("<span class='alert'>Warning: slime is starving!</span>")
else if (T.nutrition < T.get_hunger_nutrition())
user.show_message("<span class='warning'>Warning: slime is hungry</span>")
user.show_message("Electric change strength: [T.powerlevel]")
user.show_message("Health: [T.health]")
if (T.slime_mutation[4] == T.colour)
user.show_message("This slime does not evolve any further")
else
if (T.slime_mutation[3] == T.slime_mutation[4])
if (T.slime_mutation[2] == T.slime_mutation[1])
user.show_message(text("Possible mutation: []", T.slime_mutation[3]))
user.show_message("Genetic destability: [T.mutation_chance/2]% chance of mutation on splitting")
else
user.show_message(text("Possible mutations: [], [], [] (x2)", T.slime_mutation[1], T.slime_mutation[2], T.slime_mutation[3]))
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting")
else
user.show_message(text("Possible mutations: [], [], [], []", T.slime_mutation[1], T.slime_mutation[2], T.slime_mutation[3], T.slime_mutation[4]))
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting")
if (T.cores > 1)
user.show_message("Anomalious slime core amount detected")
user.show_message("Growth progress: [T.amount_grown]/10")

View File

@@ -58,7 +58,9 @@
return return
/obj/structure/grille/attack_slime(mob/user as mob) /obj/structure/grille/attack_slime(mob/user as mob)
if(!istype(user, /mob/living/carbon/slime/adult)) return var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1) playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] smashes against [src].</span>", \ user.visible_message("<span class='warning'>[user] smashes against [src].</span>", \

View File

@@ -103,7 +103,9 @@
attack_slime(mob/user as mob) attack_slime(mob/user as mob)
if(!isslimeadult(user)) return var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
attack_generic(user, rand(10, 15)) attack_generic(user, rand(10, 15))

View File

@@ -105,7 +105,9 @@
/obj/structure/mirror/attack_slime(mob/user as mob) /obj/structure/mirror/attack_slime(mob/user as mob)
if(!isslimeadult(user)) return var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
if(shattered) if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return return

View File

@@ -155,7 +155,9 @@
/obj/structure/window/attack_slime(mob/user as mob) /obj/structure/window/attack_slime(mob/user as mob)
if(!isslimeadult(user)) return var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
attack_generic(user, rand(10, 15)) attack_generic(user, rand(10, 15))

View File

@@ -228,7 +228,7 @@
emergency_shuttle.call_evac() emergency_shuttle.call_evac()
log_admin("[key_name(usr)] called the Emergency Shuttle") log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1) message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
else if (emergency_shuttle.can_recall()) else if (emergency_shuttle.can_recall())
emergency_shuttle.recall() emergency_shuttle.recall()
log_admin("[key_name(usr)] sent the Emergency Shuttle back") log_admin("[key_name(usr)] sent the Emergency Shuttle back")
@@ -247,7 +247,7 @@
log_admin("[key_name(usr)] edited the Emergency Shuttle's launch time to [new_time_left]") log_admin("[key_name(usr)] edited the Emergency Shuttle's launch time to [new_time_left]")
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's launch time to [new_time_left*10]", 1) message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's launch time to [new_time_left*10]", 1)
else if (emergency_shuttle.shuttle.has_arrive_time()) else if (emergency_shuttle.shuttle.has_arrive_time())
var/new_time_left = input("Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) as num var/new_time_left = input("Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) as num
emergency_shuttle.shuttle.arrive_time = world.time + new_time_left*10 emergency_shuttle.shuttle.arrive_time = world.time + new_time_left*10
@@ -255,7 +255,7 @@
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's arrival time to [new_time_left*10]", 1) message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's arrival time to [new_time_left*10]", 1)
else else
alert("The shuttle is neither counting down to launch nor is it in transit. Please try again when it is.") alert("The shuttle is neither counting down to launch nor is it in transit. Please try again when it is.")
href_list["secretsadmin"] = "check_antagonist" href_list["secretsadmin"] = "check_antagonist"
else if(href_list["delay_round_end"]) else if(href_list["delay_round_end"])
@@ -291,7 +291,6 @@
if("larva") M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob ) if("larva") M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob )
if("human") M.change_mob_type( /mob/living/carbon/human , null, null, delmob ) if("human") M.change_mob_type( /mob/living/carbon/human , null, null, delmob )
if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob ) if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob )
if("adultslime") M.change_mob_type( /mob/living/carbon/slime/adult , null, null, delmob )
if("monkey") M.change_mob_type( /mob/living/carbon/monkey , null, null, delmob ) if("monkey") M.change_mob_type( /mob/living/carbon/monkey , null, null, delmob )
if("robot") M.change_mob_type( /mob/living/silicon/robot , null, null, delmob ) if("robot") M.change_mob_type( /mob/living/silicon/robot , null, null, delmob )
if("cat") M.change_mob_type( /mob/living/simple_animal/cat , null, null, delmob ) if("cat") M.change_mob_type( /mob/living/simple_animal/cat , null, null, delmob )
@@ -1935,20 +1934,20 @@
if("launchshuttle") if("launchshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created. if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShL") feedback_add_details("admin_secrets_fun_used","ShL")
var/list/valid_shuttles = list() var/list/valid_shuttles = list()
for (var/shuttle_tag in shuttle_controller.shuttles) for (var/shuttle_tag in shuttle_controller.shuttles)
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry)) if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
valid_shuttles += shuttle_tag valid_shuttles += shuttle_tag
var/shuttle_tag = input("Which shuttle do you want to launch?") as null|anything in valid_shuttles var/shuttle_tag = input("Which shuttle do you want to launch?") as null|anything in valid_shuttles
if (!shuttle_tag) if (!shuttle_tag)
return return
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag] var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
if (S.can_launch()) if (S.can_launch())
S.launch(usr) S.launch(usr)
@@ -1956,23 +1955,23 @@
log_admin("[key_name(usr)] launched the [shuttle_tag] shuttle") log_admin("[key_name(usr)] launched the [shuttle_tag] shuttle")
else else
alert("The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.") alert("The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.")
if("forcelaunchshuttle") if("forcelaunchshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created. if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShFL") feedback_add_details("admin_secrets_fun_used","ShFL")
var/list/valid_shuttles = list() var/list/valid_shuttles = list()
for (var/shuttle_tag in shuttle_controller.shuttles) for (var/shuttle_tag in shuttle_controller.shuttles)
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry)) if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
valid_shuttles += shuttle_tag valid_shuttles += shuttle_tag
var/shuttle_tag = input("Which shuttle's launch do you want to force?") as null|anything in valid_shuttles var/shuttle_tag = input("Which shuttle's launch do you want to force?") as null|anything in valid_shuttles
if (!shuttle_tag) if (!shuttle_tag)
return return
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag] var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
if (S.can_force()) if (S.can_force())
S.force_launch(usr) S.force_launch(usr)
@@ -1980,31 +1979,31 @@
log_admin("[key_name(usr)] has forced the [shuttle_tag] shuttle launch") log_admin("[key_name(usr)] has forced the [shuttle_tag] shuttle launch")
else else
alert("The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.") alert("The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.")
if("jumpshuttle") if("jumpshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created. if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShJ") feedback_add_details("admin_secrets_fun_used","ShJ")
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
if (!shuttle_tag) return if (!shuttle_tag) return
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag] var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!origin_area) return if (!origin_area) return
var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!destination_area) return if (!destination_area) return
var/long_jump = alert("Is there a transition area for this jump?","", "Yes", "No") var/long_jump = alert("Is there a transition area for this jump?","", "Yes", "No")
if (long_jump == "Yes") if (long_jump == "Yes")
var/transition_area = input("Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world var/transition_area = input("Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!transition_area) return if (!transition_area) return
var/move_duration = input("How many seconds will this jump take?") as num var/move_duration = input("How many seconds will this jump take?") as num
S.long_jump(origin_area, destination_area, transition_area, move_duration) S.long_jump(origin_area, destination_area, transition_area, move_duration)
message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle", 1) message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle", 1)
log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle") log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle")
@@ -2012,29 +2011,29 @@
S.short_jump(origin_area, destination_area) S.short_jump(origin_area, destination_area)
message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle", 1) message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle", 1)
log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle") log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle")
if("moveshuttle") if("moveshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created. if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShM") feedback_add_details("admin_secrets_fun_used","ShM")
var/confirm = alert("This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", "Ok", "Cancel") var/confirm = alert("This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", "Ok", "Cancel")
if (confirm == "Cancel") if (confirm == "Cancel")
return return
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
if (!shuttle_tag) return if (!shuttle_tag) return
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag] var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!origin_area) return if (!origin_area) return
var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!destination_area) return if (!destination_area) return
S.move(origin_area, destination_area) S.move(origin_area, destination_area)
message_admins("\blue [key_name_admin(usr)] moved the [shuttle_tag] shuttle", 1) message_admins("\blue [key_name_admin(usr)] moved the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] moved the [shuttle_tag] shuttle") log_admin("[key_name(usr)] moved the [shuttle_tag] shuttle")

View File

@@ -177,7 +177,7 @@
var/damage = rand(1, 3) var/damage = rand(1, 3)
if(istype(M, /mob/living/carbon/slime/adult)) if(M.is_adult)
damage = rand(10, 40) damage = rand(10, 40)
else else
damage = rand(5, 35) damage = rand(5, 35)

View File

@@ -198,7 +198,7 @@
var/damage = rand(1, 3) var/damage = rand(1, 3)
if(istype(src, /mob/living/carbon/slime/adult)) if(M.is_adult)
damage = rand(20, 40) damage = rand(20, 40)
else else
damage = rand(5, 35) damage = rand(5, 35)

View File

@@ -336,7 +336,7 @@
var/damage = rand(1, 3) var/damage = rand(1, 3)
if(istype(M, /mob/living/carbon/slime/adult)) if(M.is_adult)
damage = rand(10, 35) damage = rand(10, 35)
else else
damage = rand(5, 25) damage = rand(5, 25)

View File

@@ -1,23 +1,28 @@
/mob/living/carbon/slime/death(gibbed) /mob/living/carbon/slime/death(gibbed)
if(!gibbed)
if(is_adult)
var/mob/living/carbon/slime/M = new /mob/living/carbon/slime(loc)
M.colour = colour
M.rabid = 1
is_adult = 0
maxHealth = 150
revive()
regenerate_icons()
number = rand(1, 1000)
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
return
if(stat == DEAD) return if(stat == DEAD) return
stat = DEAD stat = DEAD
icon_state = "[colour] baby slime dead" icon_state = "[colour] baby slime dead"
overlays.len = 0
if(!gibbed) for(var/mob/O in viewers(src, null))
if(istype(src, /mob/living/carbon/slime/adult)) O.show_message("<b>The [name]</b> seizes up and falls limp...", 1) //ded -- Urist
ghostize()
var/mob/living/carbon/slime/M1 = new primarytype(loc)
M1.rabid = 1
var/mob/living/carbon/slime/M2 = new primarytype(loc)
M2.rabid = 1
if(src) del(src)
else
for(var/mob/O in viewers(src, null))
O.show_message("<b>The [name]</b> seizes up and falls limp...", 1) //ded -- Urist
update_canmove() update_canmove()
if(blind) blind.layer = 0 if(blind) blind.layer = 0
ticker.mode.check_win() if(ticker && ticker.mode)
ticker.mode.check_win()
return ..(gibbed) return ..(gibbed)

View File

@@ -1,4 +1,4 @@
/mob/living/carbon/slime/emote(var/act,var/m_type=1,var/message = null) /mob/living/carbon/slime/emote(var/act, var/m_type=1, var/message = null)
if (findtext(act, "-", 1, null)) if (findtext(act, "-", 1, null))
@@ -9,7 +9,7 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_' if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act)) act = copytext(act,1,length(act))
switch(act) switch(act) //Alphabetical please
if ("me") if ("me")
if(silent) if(silent)
return return
@@ -19,40 +19,51 @@
return return
if (src.client.handle_spam_prevention(message,MUTE_IC)) if (src.client.handle_spam_prevention(message,MUTE_IC))
return return
if (stat) if (stat)
return return
if(!(message)) if(!(message))
return return
return custom_emote(m_type, message) return custom_emote(m_type, message)
if ("custom")
return custom_emote(m_type, message)
if("moan")
message = "<B>The [src.name]</B> moans."
m_type = 2
if("shiver")
message = "<B>The [src.name]</B> shivers."
m_type = 2
if("sway")
message = "<B>The [src.name]</B> sways around dizzily."
m_type = 1
if("twitch")
message = "<B>The [src.name]</B> twitches."
m_type = 1
if("vibrate")
message = "<B>The [src.name]</B> vibrates!"
m_type = 1
if("light")
message = "<B>The [src.name]</B> lights up for a bit, then stops."
m_type = 1
if("jiggle")
message = "<B>The [src.name]</B> jiggles!"
m_type = 1
if("bounce") if("bounce")
message = "<B>The [src.name]</B> bounces in place." message = "<B>The [src.name]</B> bounces in place."
m_type = 1 m_type = 1
if ("custom")
return custom_emote(m_type, message)
if("jiggle")
message = "<B>The [src.name]</B> jiggles!"
m_type = 1
if("light")
message = "<B>The [src.name]</B> lights up for a bit, then stops."
m_type = 1
if("moan")
message = "<B>The [src.name]</B> moans."
m_type = 2
if("shiver")
message = "<B>The [src.name]</B> shivers."
m_type = 2
if("sway")
message = "<B>The [src.name]</B> sways around dizzily."
m_type = 1
if("twitch")
message = "<B>The [src.name]</B> twitches."
m_type = 1
if("vibrate")
message = "<B>The [src.name]</B> vibrates!"
m_type = 1
if ("help") //This is an exception
src << "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate"
else else
src << text("Invalid Emote: []", act) src << "\blue Unusable emote '[act]'. Say *help for a list."
if ((message && src.stat == 0)) if ((message && src.stat == 0))
if (m_type & 1) if (m_type & 1)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))

View File

@@ -1,4 +1,2 @@
/mob/living/carbon/slime/proc/regular_hud_updates() /mob/living/carbon/slime/proc/regular_hud_updates()
return return

View File

@@ -1,3 +1,10 @@
/mob/living/carbon/slime
var/AIproc = 0 // determines if the AI loop is activated
var/Atkcool = 0 // attack cooldown
var/Tempstun = 0 // temporary temperature stuns
var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
var/SStun = 0 // stun variable
/mob/living/carbon/slime/Life() /mob/living/carbon/slime/Life()
set invisibility = 0 set invisibility = 0
set background = 1 set background = 1
@@ -15,114 +22,80 @@
handle_targets() handle_targets()
if (!ckey)
handle_speech_and_mood()
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE var/datum/gas_mixture/environment
if(src.loc) if(src.loc)
environment = loc.return_air() environment = loc.return_air()
//Apparently, the person who wrote this code designed it so that //Apparently, the person who wrote this code designed it so that
//blinded get reset each cycle and then get activated later in the //blinded get reset each cycle and then get activated later in the
//code. Very ugly. I dont care. Moving this stuff here so its easy //code. Very ugly. I dont care. Moving this stuff here so its easy
//to find it. //to find it.
src.blinded = null src.blinded = null
// Basically just deletes any screen objects :< regular_hud_updates() // Basically just deletes any screen objects :<
regular_hud_updates()
//Handle temperature/pressure differences between body and environment
if(environment) if(environment)
handle_environment(environment) handle_environment(environment) // Handle temperature/pressure differences between body and environment
//Status updates, death etc. handle_regular_status_updates() // Status updates, death etc.
handle_regular_status_updates()
/mob/living/carbon/slime
var/AIproc = 0 // determines if the AI loop is activated
var/Atkcool = 0 // attack cooldown
var/Tempstun = 0 // temporary temperature stuns
var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
var/SStun = 0 // stun variable
/mob/living/carbon/slime/proc/AIprocess() // the master AI process /mob/living/carbon/slime/proc/AIprocess() // the master AI process
//world << "AI proc started."
if(AIproc || stat == DEAD || client) return if(AIproc || stat == DEAD || client) return
var/hungry = 0 var/hungry = 0
var/starving = 0 if (nutrition < get_starve_nutrition())
if(istype(src, /mob/living/carbon/slime/adult)) hungry = 2
switch(nutrition) else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
if(400 to 1100) hungry = 1 hungry = 1
if(0 to 399)
starving = 1
else
switch(nutrition)
if(150 to 900) hungry = 1
if(0 to 149) starving = 1
AIproc = 1 AIproc = 1
//world << "AIproc [AIproc] && stat != 2 [stat] && (attacked > 0 [attacked] || starving [starving] || hungry [hungry] || rabid [rabid] || Victim [Victim] || Target [Target]"
while(AIproc && stat != 2 && (attacked > 0 || starving || hungry || rabid || Victim)) while(AIproc && stat != 2 && (attacked || hungry || rabid || Victim))
if(Victim) // can't eat AND have this little process at the same time if(Victim) // can't eat AND have this little process at the same time
//world << "break 1"
break break
if(!Target || client) if(!Target || client)
//world << "break 2"
break break
if(Target.health <= -70 || Target.stat == 2) if(Target.health <= -70 || Target.stat == 2)
Target = null Target = null
AIproc = 0 AIproc = 0
//world << "break 3"
break break
if(Target) if(Target)
//world << "[Target] Target Found"
for(var/mob/living/carbon/slime/M in view(1,Target)) for(var/mob/living/carbon/slime/M in view(1,Target))
if(M.Victim == Target) if(M.Victim == Target)
Target = null Target = null
AIproc = 0 AIproc = 0
//world << "break 4"
break break
if(!AIproc) if(!AIproc)
//world << "break 5"
break break
if(Target in view(1,src)) if(Target in view(1,src))
if(istype(Target, /mob/living/silicon)) if(istype(Target, /mob/living/silicon))
if(!Atkcool) if(!Atkcool)
spawn() Atkcool = 1
Atkcool = 1 spawn(45)
sleep(15)
Atkcool = 0 Atkcool = 0
if(Target.Adjacent(src)) if(Target.Adjacent(src))
Target.attack_slime(src) Target.attack_slime(src)
//world << "retrun 1"
return return
if(!Target.lying && prob(80)) if(!Target.lying && prob(80))
if(Target.client && Target.health >= 20) if(Target.client && Target.health >= 20)
if(!Atkcool) if(!Atkcool)
spawn() Atkcool = 1
Atkcool = 1 spawn(45)
sleep(25)
Atkcool = 0 Atkcool = 0
if(Target.Adjacent(src)) if(Target.Adjacent(src))
Target.attack_slime(src) Target.attack_slime(src)
if(prob(30))
step_to(src, Target)
else else
if(!Atkcool && Target.Adjacent(src)) if(!Atkcool && Target.Adjacent(src))
Feedon(Target) Feedon(Target)
@@ -133,13 +106,13 @@
else else
if(Target in view(7, src)) if(Target in view(7, src))
if(Target.Adjacent(src)) if(!Target.Adjacent(src)) // Bug of the month candidate: slimes were attempting to move to target only if it was directly next to them, which caused them to target things, but not approach them
step_to(src, Target) step_to(src, Target)
sleep(5)
else else
Target = null Target = null
AIproc = 0 AIproc = 0
//world << "break 6"
break break
var/sleeptime = movement_delay() var/sleeptime = movement_delay()
@@ -148,7 +121,6 @@
sleep(sleeptime + 2) // this is about as fast as a player slime can go sleep(sleeptime + 2) // this is about as fast as a player slime can go
AIproc = 0 AIproc = 0
//world << "AI proc ended."
/mob/living/carbon/slime/proc/handle_environment(datum/gas_mixture/environment) /mob/living/carbon/slime/proc/handle_environment(datum/gas_mixture/environment)
if(!environment) if(!environment)
@@ -166,28 +138,11 @@
else else
loc_temp = environment.temperature loc_temp = environment.temperature
/*
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
var/transfer_coefficient
transfer_coefficient = 1
if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature))
transfer_coefficient *= wear_mask.heat_transfer_coefficient
// handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
*/
if(loc_temp < 310.15) // a cold place if(loc_temp < 310.15) // a cold place
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1) bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
else // a hot place else // a hot place
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1) bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
/*
if(stat==2)
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
*/
//Account for massive pressure differences //Account for massive pressure differences
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
@@ -207,7 +162,6 @@
return //TODO: DEFERRED return //TODO: DEFERRED
/mob/living/carbon/slime/proc/adjust_body_temperature(current, loc_temp, boost) /mob/living/carbon/slime/proc/adjust_body_temperature(current, loc_temp, boost)
var/temperature = current var/temperature = current
var/difference = abs(current-loc_temp) //get difference var/difference = abs(current-loc_temp) //get difference
@@ -229,33 +183,28 @@
if(reagents) reagents.metabolize(src) if(reagents) reagents.metabolize(src)
src.updatehealth() src.updatehealth()
return //TODO: DEFERRED return //TODO: DEFERRED
/mob/living/carbon/slime/proc/handle_regular_status_updates() /mob/living/carbon/slime/proc/handle_regular_status_updates()
if(istype(src, /mob/living/carbon/slime/adult)) if(is_adult)
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss()) health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
else else
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss()) health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(health < config.health_threshold_dead && stat != 2) if(health < config.health_threshold_dead && stat != 2)
death() death()
return return
else if(src.health < config.health_threshold_crit) else if(src.health < config.health_threshold_crit)
// if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
//if(!src.rejuv) src.oxyloss++ if(!src.reagents.has_reagent("inaprovaline"))
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(10) src.adjustOxyLoss(10)
if(src.stat != DEAD) src.stat = UNCONSCIOUS if(src.stat != DEAD)
src.stat = UNCONSCIOUS
if(prob(30)) if(prob(30))
adjustOxyLoss(-1) adjustOxyLoss(-1)
@@ -264,12 +213,9 @@
adjustCloneLoss(-1) adjustCloneLoss(-1)
adjustBruteLoss(-1) adjustBruteLoss(-1)
if (src.stat == DEAD) if (src.stat == DEAD)
src.lying = 1 src.lying = 1
src.blinded = 1 src.blinded = 1
else else
if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc. if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
if (src.stunned > 0) if (src.stunned > 0)
@@ -314,89 +260,25 @@
return 1 return 1
/mob/living/carbon/slime/proc/handle_nutrition() /mob/living/carbon/slime/proc/handle_nutrition()
if(prob(20)) if (prob(15))
if(istype(src, /mob/living/carbon/slime/adult)) nutrition-=rand(4,6) nutrition -= 1 + is_adult
else nutrition-=rand(2,3)
if(nutrition <= 0) if(nutrition <= 0)
nutrition = 0 nutrition = 0
if(prob(75)) if(prob(75))
adjustToxLoss(rand(0,5)) adjustToxLoss(rand(0,5))
else else if (nutrition >= get_grow_nutrition() && amount_grown < 10)
if(istype(src, /mob/living/carbon/slime/adult)) nutrition -= 20
if(nutrition >= 1000) amount_grown++
if(prob(40)) amount_grown++
if(amount_grown >= 10 && !Victim && !Target && !ckey)
if(is_adult)
Reproduce()
else else
if(nutrition >= 800) Evolve()
if(prob(40)) amount_grown++
if(amount_grown >= 10 && !Victim && !Target)
if(istype(src, /mob/living/carbon/slime/adult))
if(!client)
for(var/i=1,i<=4,i++)
if(prob(70))
var/mob/living/carbon/slime/M = new primarytype(loc)
M.powerlevel = round(powerlevel/4)
M.Friends = Friends
M.tame = tame
M.rabid = rabid
M.Discipline = Discipline
if(i != 1) step_away(M,src)
else
var/mutations = pick("one","two","three","four")
switch(mutations)
if("one")
var/mob/living/carbon/slime/M = new mutationone(loc)
M.powerlevel = round(powerlevel/4)
M.Friends = Friends
M.tame = tame
M.rabid = rabid
M.Discipline = Discipline
if(i != 1) step_away(M,src)
if("two")
var/mob/living/carbon/slime/M = new mutationtwo(loc)
M.powerlevel = round(powerlevel/4)
M.Friends = Friends
M.tame = tame
M.rabid = rabid
M.Discipline = Discipline
if(i != 1) step_away(M,src)
if("three")
var/mob/living/carbon/slime/M = new mutationthree(loc)
M.powerlevel = round(powerlevel/4)
M.Friends = Friends
M.tame = tame
M.rabid = rabid
M.Discipline = Discipline
if(i != 1) step_away(M,src)
if("four")
var/mob/living/carbon/slime/M = new mutationfour(loc)
M.powerlevel = round(powerlevel/4)
M.Friends = Friends
M.tame = tame
M.rabid = rabid
M.Discipline = Discipline
if(i != 1) step_away(M,src)
del(src)
else
if(!client)
var/mob/living/carbon/slime/adult/A = new adulttype(src.loc)
A.nutrition = nutrition
// A.nutrition += 100
A.powerlevel = max(0, powerlevel-1)
A.Friends = Friends
A.tame = tame
A.rabid = rabid
del(src)
/mob/living/carbon/slime/proc/handle_targets() /mob/living/carbon/slime/proc/handle_targets()
if(Tempstun) if(Tempstun)
@@ -408,8 +290,7 @@
if(attacked > 50) attacked = 50 if(attacked > 50) attacked = 50
if(attacked > 0) if(attacked > 0)
if(prob(85)) attacked--
attacked--
if(Discipline > 0) if(Discipline > 0)
@@ -419,136 +300,278 @@
if(prob(10)) if(prob(10))
Discipline-- Discipline--
if(!client) if(!client)
if(!canmove) return if(!canmove) return
// DO AI STUFF HERE
if(Target)
if(attacked <= 0)
Target = null
if(Victim) return // if it's eating someone already, continue eating! if(Victim) return // if it's eating someone already, continue eating!
if(Target)
if(prob(1)) --target_patience
emote(pick("bounce","sway","light","vibrate","jiggle")) if (target_patience <= 0 || SStun || Discipline || attacked) // Tired of chasing or something draws out attention
target_patience = 0
Target = null
if(AIproc && SStun) return if(AIproc && SStun) return
var/hungry = 0 // determines if the slime is hungry var/hungry = 0 // determines if the slime is hungry
var/starving = 0 // determines if the slime is starving-hungry
if(istype(src, /mob/living/carbon/slime/adult)) // 1200 max nutrition
switch(nutrition)
if(601 to 900)
if(prob(25)) hungry = 1//Ensures they continue eating, but aren't as aggressive at the same time
if(301 to 600) hungry = 1
if(0 to 300)
starving = 1
else if (nutrition < get_starve_nutrition())
switch(nutrition) // 1000 max nutrition hungry = 2
if(501 to 700) else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
if(prob(25)) hungry = 1 hungry = 1
if(201 to 500) hungry = 1
if(0 to 200) starving = 1
if(hungry == 2 && !client) // if a slime is starving, it starts losing its friends
if(starving && !client) // if a slime is starving, it starts losing its friends
if(Friends.len > 0 && prob(1)) if(Friends.len > 0 && prob(1))
var/mob/nofriend = pick(Friends) var/mob/nofriend = pick(Friends)
Friends -= nofriend --Friends[nofriend]
if(!Target) if(!Target)
var/list/targets = list() if(will_hunt() && hungry || attacked || rabid) // Only add to the list if we need to
var/list/targets = list()
if(hungry || starving) //Only add to the list if we need to
for(var/mob/living/L in view(7,src)) for(var/mob/living/L in view(7,src))
//Ignore other slimes, dead mobs and simple_animals if(isslime(L) || L.stat == DEAD) // Ignore other slimes and dead mobs
if(isslime(L) || L.stat != CONSCIOUS || isanimal(L))
continue continue
if(issilicon(L)) if(L in Friends) // No eating friends!
if(!istype(src, /mob/living/carbon/slime/adult)) //Non-starving diciplined adult slimes wont eat things continue
if(!starving && Discipline > 0)
if(issilicon(L) && (rabid || attacked)) // They can't eat silicons, but they can glomp them in defence
targets += L // Possible target found!
if(istype(L, /mob/living/carbon/human) && dna) //Ignore slime(wo)men
var/mob/living/carbon/human/H = L
if(H.dna)
if(H.dna.mutantrace == "slime")
continue continue
if(tame) //Tame slimes ignore electronic life if(!L.canmove) // Only one slime can latch on at a time.
var/notarget = 0
for(var/mob/living/carbon/slime/M in view(1,L))
if(M.Victim == L)
notarget = 1
if(notarget)
continue continue
targets += L //Possible target found! targets += L // Possible target found!
else if(iscarbon(L)) if(targets.len > 0)
if(attacked || rabid || hungry == 2)
if(istype(L, /mob/living/carbon/human)) //Ignore slime(wo)men Target = targets[1] // I am attacked and am fighting back or so hungry I don't even care
var/mob/living/carbon/human/H = L else
if(H.dna)
if(H.dna.mutantrace == "slime")
continue
if(!istype(src, /mob/living/carbon/slime/adult)) //Non-starving diciplined adult slimes wont eat things
if(!starving && Discipline > 0)
continue
if(L in Friends) //No eating friends!
continue
if(tame && ishuman(L)) //Tame slimes dont eat people.
continue
if(!L.canmove) //Only one slime can latch on at a time.
var/notarget = 0
for(var/mob/living/carbon/slime/M in view(1,L))
if(M.Victim == L)
notarget = 1
if(notarget)
continue
targets += L //Possible target found!
if((hungry || starving) && targets.len > 0)
if(!istype(src, /mob/living/carbon/slime/adult))
if(!starving)
for(var/mob/living/carbon/C in targets) for(var/mob/living/carbon/C in targets)
if(!Discipline && prob(5)) if(!Discipline && prob(5))
if(ishuman(C)) if(ishuman(C) || isalienadult(C))
Target = C
break
if(isalienadult(C))
Target = C Target = C
break break
if(islarva(C)) if(islarva(C) || ismonkey(C))
Target = C Target = C
break break
if(ismonkey(C))
Target = C
break
else
Target = targets[1]
else
Target = targets[1] // closest target
if(targets.len > 0) if (Target)
if(attacked > 0 || rabid) target_patience = rand(5,7)
Target = targets[1] //closest mob probably attacked it, so override Target and attack the nearest! if (is_adult)
target_patience += 3
if(!Target) // If we have no target, we are wandering or following orders
if (Leader)
if (holding_still)
holding_still = max(holding_still - 1, 0)
else if(canmove && isturf(loc))
step_to(src, Leader)
if(!Target) else if(hungry)
if(hungry || starving) if (holding_still)
if(canmove && isturf(loc) && prob(50)) holding_still = max(holding_still - hungry, 0)
else if(canmove && isturf(loc) && prob(50))
step(src, pick(cardinal)) step(src, pick(cardinal))
else else
if(canmove && isturf(loc) && prob(33)) if (holding_still)
holding_still = max(holding_still - 1, 0)
else if(canmove && isturf(loc) && prob(33))
step(src, pick(cardinal)) step(src, pick(cardinal))
else else if(!AIproc)
if(!AIproc) spawn()
spawn() AIprocess() AIprocess()
/mob/living/carbon/slime/proc/handle_speech_and_mood()
//Mood starts here
var/newmood = ""
if (rabid || attacked) newmood = "angry"
else if (Target) newmood = "mischevous"
if (!newmood)
if (Discipline && prob(25))
newmood = "pout"
else if (prob(1))
newmood = pick("sad", ":3", "pout")
if ((mood == "sad" || mood == ":3" || mood == "pout") && !newmood)
if (prob(75)) newmood = mood
if (newmood != mood) // This is so we don't redraw them every time
mood = newmood
regenerate_icons()
//Speech understanding starts here
var/to_say
if (speech_buffer.len > 0)
var/who = speech_buffer[1] // Who said it?
var/phrase = speech_buffer[2] // What did they say?
if ((findtext(phrase, num2text(number)) || findtext(phrase, "slimes"))) // Talking to us
if (findtext(phrase, "hello") || findtext(phrase, "hi"))
to_say = pick("Hello...", "Hi...")
else if (findtext(phrase, "follow"))
if (Leader)
if (Leader == who) // Already following him
to_say = pick("Yes...", "Lead...", "Following...")
else if (Friends[who] > Friends[Leader]) // VIVA
Leader = who
to_say = "Yes... I follow [who]..."
else
to_say = "No... I follow [Leader]..."
else
if (Friends[who] > 2)
Leader = who
to_say = "I follow..."
else // Not friendly enough
to_say = pick("No...", "I won't follow...")
else if (findtext(phrase, "stop"))
if (Victim) // We are asked to stop feeding
if (Friends[who] > 4)
Victim = null
Target = null
if (Friends[who] < 7)
--Friends[who]
to_say = "Grrr..." // I'm angry but I do it
else
to_say = "Fine..."
else if (Target) // We are asked to stop chasing
if (Friends[who] > 3)
Target = null
if (Friends[who] < 6)
--Friends[who]
to_say = "Grrr..." // I'm angry but I do it
else
to_say = "Fine..."
else if (Leader) // We are asked to stop following
if (Leader == who)
to_say = "Yes... I'll stay..."
Leader = null
else
if (Friends[who] > Friends[Leader])
Leader = null
to_say = "Yes... I'll stop..."
else
to_say = "No... I'll keep following..."
else if (findtext(phrase, "stay"))
if (Leader)
if (Leader == who)
holding_still = Friends[who] * 10
to_say = "Yes... Staying..."
else if (Friends[who] > Friends[Leader])
holding_still = (Friends[who] - Friends[Leader]) * 10
to_say = "Yes... Staying..."
else
to_say = "No... I'll keep following..."
else
if (Friends[who] > 2)
holding_still = Friends[who] * 10
to_say = "Yes... Staying..."
else
to_say = "No... I won't stay..."
speech_buffer = list()
//Speech starts here
if (to_say)
say (to_say)
else if(prob(1))
emote(pick("bounce","sway","light","vibrate","jiggle"))
else
var/t = 10
var/slimes_near = -1 // Don't count myself
var/dead_slimes = 0
var/friends_near = list()
for (var/mob/living/carbon/M in view(7,src))
if (isslime(M))
++slimes_near
if (M.stat == DEAD)
++dead_slimes
if (M in Friends)
t += 20
friends_near += M
if (nutrition < get_hunger_nutrition()) t += 10
if (nutrition < get_starve_nutrition()) t += 10
if (prob(2) && prob(t))
var/phrases = list()
if (Target) phrases += "[Target]... looks tasty..."
if (nutrition < get_starve_nutrition())
phrases += "So... hungry..."
phrases += "Very... hungry..."
phrases += "Need... food..."
phrases += "Must... eat..."
else if (nutrition < get_hunger_nutrition())
phrases += "Hungry..."
phrases += "Where is the food?"
phrases += "I want to eat..."
phrases += "Rawr..."
phrases += "Blop..."
phrases += "Blorble..."
if (rabid || attacked)
phrases += "Hrr..."
phrases += "Nhuu..."
phrases += "Unn..."
if (mood == ":3")
phrases += "Purr..."
if (attacked)
phrases += "Grrr..."
if (getToxLoss() > 30)
phrases += "Cold..."
if (getToxLoss() > 60)
phrases += "So... cold..."
phrases += "Very... cold..."
if (getToxLoss() > 90)
phrases += "..."
phrases += "C... c..."
if (Victim)
phrases += "Nom..."
phrases += "Tasty..."
if (powerlevel > 3) phrases += "Bzzz..."
if (powerlevel > 5) phrases += "Zap..."
if (powerlevel > 8) phrases += "Zap... Bzz..."
if (mood == "sad") phrases += "Bored..."
if (slimes_near) phrases += "Brother..."
if (slimes_near > 1) phrases += "Brothers..."
if (dead_slimes) phrases += "What happened?"
if (!slimes_near)
phrases += "Lonely..."
for (var/M in friends_near)
phrases += "[M]... friend..."
if (nutrition < get_hunger_nutrition())
phrases += "[M]... feed me..."
say (pick(phrases))
/mob/living/carbon/slime/proc/get_max_nutrition() // Can't go above it
if (is_adult) return 1200
else return 1000
/mob/living/carbon/slime/proc/get_grow_nutrition() // Above it we grow, below it we can eat
if (is_adult) return 1000
else return 800
/mob/living/carbon/slime/proc/get_hunger_nutrition() // Below it we will always eat
if (is_adult) return 600
else return 500
/mob/living/carbon/slime/proc/get_starve_nutrition() // Below it we will eat before everything else
if (is_adult) return 300
else return 200
/mob/living/carbon/slime/proc/will_hunt(var/hunger = -1) // Check for being stopped from feeding and chasing
if (hunger == 2 || rabid || attacked) return 1
if (Leader) return 0
if (holding_still) return 0
return 1

View File

@@ -3,7 +3,8 @@
icon = 'icons/mob/slimes.dmi' icon = 'icons/mob/slimes.dmi'
icon_state = "grey baby slime" icon_state = "grey baby slime"
pass_flags = PASSTABLE pass_flags = PASSTABLE
speak_emote = list("hums") var/is_adult = 0
speak_emote = list("telepathically chirps")
layer = 5 layer = 5
@@ -12,7 +13,7 @@
gender = NEUTER gender = NEUTER
update_icon = 0 update_icon = 0
nutrition = 700 // 1000 = max nutrition = 700
see_in_dark = 8 see_in_dark = 8
update_slimes = 0 update_slimes = 0
@@ -22,67 +23,58 @@
status_flags = CANPARALYSE|CANPUSH status_flags = CANPARALYSE|CANPUSH
var/cores = 1 // the number of /obj/item/slime_extract's the slime has left inside var/cores = 1 // the number of /obj/item/slime_extract's the slime has left inside
var/mutation_chance = 30 // Chance of mutating, should be between 25 and 35
var/powerlevel = 0 // 1-10 controls how much electricity they are generating var/powerlevel = 0 // 1-10 controls how much electricity they are generating
var/amount_grown = 0 // controls how long the slime has been overfed, if 10, grows into an adult var/amount_grown = 0 // controls how long the slime has been overfed, if 10, grows or reproduces
// if adult: if 10: reproduces
var/number = 0 // Used to understand when someone is talking to it
var/mob/living/Victim = null // the person the slime is currently feeding on var/mob/living/Victim = null // the person the slime is currently feeding on
var/mob/living/Target = null // AI variable - tells the slime to hunt this down var/mob/living/Target = null // AI variable - tells the slime to hunt this down
var/mob/living/Leader = null // AI variable - tells the slime to follow this person
var/attacked = 0 // determines if it's been attacked recently. Can be any number, is a cooloff-ish variable var/attacked = 0 // Determines if it's been attacked recently. Can be any number, is a cooloff-ish variable
var/tame = 0 // if set to 1, the slime will not eat humans ever, or attack them var/rabid = 0 // If set to 1, the slime will attack and eat anything it comes in contact with
var/rabid = 0 // if set to 1, the slime will attack and eat anything it comes in contact with var/holding_still = 0 // AI variable, cooloff-ish for how long it's going to stay in one place
var/target_patience = 0 // AI variable, cooloff-ish for how long it's going to follow its target
var/list/Friends = list() // A list of potential friends var/list/Friends = list() // A list of friends; they are not considered targets for feeding; passed down after splitting
var/list/FriendsWeight = list() // A list containing values respective to Friends. This determines how many times a slime "likes" something. If the slime likes it more than 2 times, it becomes a friend
// slimes pass on genetic data, so all their offspring have the same "Friends", var/list/speech_buffer = list() // Last phrase said near it and person who said it
var/mood = "" // To show its face
///////////TIME FOR SUBSPECIES ///////////TIME FOR SUBSPECIES
var/colour = "grey" var/colour = "grey"
var/primarytype = /mob/living/carbon/slime
var/mutationone = /mob/living/carbon/slime/orange
var/mutationtwo = /mob/living/carbon/slime/metal
var/mutationthree = /mob/living/carbon/slime/blue
var/mutationfour = /mob/living/carbon/slime/purple
var/adulttype = /mob/living/carbon/slime/adult
var/coretype = /obj/item/slime_extract/grey var/coretype = /obj/item/slime_extract/grey
var/list/slime_mutation[4]
/mob/living/carbon/slime/adult
name = "adult slime"
icon = 'icons/mob/slimes.dmi'
icon_state = "grey adult slime"
speak_emote = list("telepathically chirps")
health = 200
gender = NEUTER
update_icon = 0
nutrition = 800 // 1200 = max
/mob/living/carbon/slime/New() /mob/living/carbon/slime/New()
var/datum/reagents/R = new/datum/reagents(100) create_reagents(100)
reagents = R spawn (0)
R.my_atom = src number = rand(1, 1000)
if(name == "baby slime") name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
name = text("[colour] baby slime ([rand(1, 1000)])") icon_state = "[colour] [is_adult ? "adult" : "baby"] slime"
else real_name = name
name = text("[colour] adult slime ([rand(1,1000)])") slime_mutation = mutation_table(colour)
real_name = name mutation_chance = rand(25, 35)
spawn (1) var/sanitizedcolour = replacetext(colour, " ", "")
regenerate_icons() coretype = text2path("/obj/item/slime_extract/[sanitizedcolour]")
src << "\blue Your icons have been generated!"
..() ..()
/mob/living/carbon/slime/adult/New() /mob/living/carbon/slime/regenerate_icons()
//verbs.Remove(/mob/living/carbon/slime/verb/ventcrawl) icon_state = "[colour] [is_adult ? "adult" : "baby"] slime"
overlays.len = 0
if (mood)
overlays += image('icons/mob/slimes.dmi', icon_state = "aslime-[mood]")
..() ..()
/mob/living/carbon/slime/movement_delay() /mob/living/carbon/slime/movement_delay()
if (bodytemperature >= 330.23) // 135 F
return -1 // slimes become supercharged at high temperatures
var/tally = 0 var/tally = 0
var/health_deficiency = (100 - health) var/health_deficiency = (100 - health)
@@ -92,115 +84,93 @@
tally += (283.222 - bodytemperature) / 10 * 1.75 tally += (283.222 - bodytemperature) / 10 * 1.75
if(reagents) if(reagents)
if(reagents.has_reagent("hyperzine")) // hyperzine slows slimes down if(reagents.has_reagent("hyperzine")) // Hyperzine slows slimes down
tally *= 2 // moves twice as slow tally *= 2
if(reagents.has_reagent("frostoil")) // frostoil also makes them move VEEERRYYYYY slow if(reagents.has_reagent("frostoil")) // Frostoil also makes them move VEEERRYYYYY slow
tally *= 5 tally *= 5
if(health <= 0) // if damaged, the slime moves twice as slow if(health <= 0) // if damaged, the slime moves twice as slow
tally *= 2 tally *= 2
if (bodytemperature >= 330.23) // 135 F return tally + config.slime_delay
return -1 // slimes become supercharged at high temperatures
return tally+config.slime_delay
/mob/living/carbon/slime/Bump(atom/movable/AM as mob|obj, yes) /mob/living/carbon/slime/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 ) if ((!(yes) || now_pushing))
if ((!( yes ) || now_pushing)) return
return now_pushing = 1
now_pushing = 1
if(isobj(AM)) if(isobj(AM))
if(!client && powerlevel > 0) if(!client && powerlevel > 0)
var/probab = 10 var/probab = 10
switch(powerlevel) switch(powerlevel)
if(1 to 2) probab = 20 if(1 to 2) probab = 20
if(3 to 4) probab = 30 if(3 to 4) probab = 30
if(5 to 6) probab = 40 if(5 to 6) probab = 40
if(7 to 8) probab = 60 if(7 to 8) probab = 60
if(9) probab = 70 if(9) probab = 70
if(10) probab = 95 if(10) probab = 95
if(prob(probab)) if(prob(probab))
if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille))
if(nutrition <= get_hunger_nutrition() && !Atkcool)
if (is_adult || prob(5))
AM.attack_slime(src)
spawn()
Atkcool = 1
sleep(45)
Atkcool = 0
if(ismob(AM))
var/mob/tmob = AM
if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille)) if(is_adult)
if(istype(src, /mob/living/carbon/slime/adult)) if(istype(tmob, /mob/living/carbon/human))
if(nutrition <= 600 && !Atkcool) if(prob(90))
AM.attack_slime(src)
spawn()
Atkcool = 1
sleep(15)
Atkcool = 0
else
if(nutrition <= 500 && !Atkcool)
if(prob(5))
AM.attack_slime(src)
spawn()
Atkcool = 1
sleep(15)
Atkcool = 0
if(ismob(AM))
var/mob/tmob = AM
if(istype(src, /mob/living/carbon/slime/adult))
if(istype(tmob, /mob/living/carbon/human))
if(prob(90))
now_pushing = 0
return
else
if(istype(tmob, /mob/living/carbon/human))
now_pushing = 0 now_pushing = 0
return return
else
if(istype(tmob, /mob/living/carbon/human))
now_pushing = 0
return
now_pushing = 0 now_pushing = 0
..() ..()
if (!( istype(AM, /atom/movable) )) if (!istype(AM, /atom/movable))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
return return
return if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
/mob/living/carbon/slime/Process_Spacemove() /mob/living/carbon/slime/Process_Spacemove()
return 2 return 2
/mob/living/carbon/slime/Stat() /mob/living/carbon/slime/Stat()
..() ..()
statpanel("Status") statpanel("Status")
if(istype(src, /mob/living/carbon/slime/adult)) if(is_adult)
stat(null, "Health: [round((health / 200) * 100)]%") stat(null, "Health: [round((health / 200) * 100)]%")
else else
stat(null, "Health: [round((health / 150) * 100)]%") stat(null, "Health: [round((health / 150) * 100)]%")
if (client.statpanel == "Status") if (client.statpanel == "Status")
if(istype(src,/mob/living/carbon/slime/adult)) stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]")
stat(null, "Nutrition: [nutrition]/1200") if(amount_grown >= 10)
if(amount_grown >= 10) if(is_adult)
stat(null, "You can reproduce!") stat(null, "You can reproduce!")
else else
stat(null, "Nutrition: [nutrition]/1000")
if(amount_grown >= 10)
stat(null, "You can evolve!") stat(null, "You can evolve!")
stat(null,"Power Level: [powerlevel]") stat(null,"Power Level: [powerlevel]")
/mob/living/carbon/slime/adjustFireLoss(amount) /mob/living/carbon/slime/adjustFireLoss(amount)
..(-abs(amount)) // Heals them ..(-abs(amount)) // Heals them
return return
@@ -210,25 +180,18 @@
..(Proj) ..(Proj)
return 0 return 0
/mob/living/carbon/slime/emp_act(severity) /mob/living/carbon/slime/emp_act(severity)
powerlevel = 0 // oh no, the power! powerlevel = 0 // oh no, the power!
..() ..()
/mob/living/carbon/slime/ex_act(severity) /mob/living/carbon/slime/ex_act(severity)
..()
if (stat == 2 && client)
return
else if (stat == 2 && !client)
del(src)
return
var/b_loss = null var/b_loss = null
var/f_loss = null var/f_loss = null
switch (severity) switch (severity)
if (1.0) if (1.0)
b_loss += 500 del(src)
return return
if (2.0) if (2.0)
@@ -260,7 +223,7 @@
//paralysis += 1 //paralysis += 1
show_message("\red The blob attacks you!") show_message("<span class='userdanger'> The blob attacks you!</span>")
adjustFireLoss(damage) adjustFireLoss(damage)
@@ -271,7 +234,6 @@
/mob/living/carbon/slime/u_equip(obj/item/W as obj) /mob/living/carbon/slime/u_equip(obj/item/W as obj)
return return
/mob/living/carbon/slime/attack_ui(slot) /mob/living/carbon/slime/attack_ui(slot)
return return
@@ -286,52 +248,48 @@
updatehealth() updatehealth()
return return
/mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M as mob) /mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker) if (!ticker)
M << "You cannot attack people before the game has started." M << "You cannot attack people before the game has started."
return return
if(Victim) return // can't attack while eating! if (Victim) return // can't attack while eating!
if (health > -100) if (health > -100)
for(var/mob/O in viewers(src, null)) visible_message("<span class='danger'> The [M.name] has glomped [src]!</span>", \
if ((O.client && !( O.blinded ))) "<span class='userdanger'> The [M.name] has glomped [src]!</span>")
O.show_message(text("\red <B>The [M.name] has glomped []!</B>", src), 1)
var/damage = rand(1, 3) var/damage = rand(1, 3)
attacked += 5 attacked += 5
if(istype(src, /mob/living/carbon/slime/adult)) if(M.is_adult)
damage = rand(1, 6) damage = rand(1, 6)
else else
damage = rand(1, 3) damage = rand(1, 3)
adjustBruteLoss(damage) adjustBruteLoss(damage)
updatehealth() updatehealth()
return return
/mob/living/carbon/slime/attack_animal(mob/living/simple_animal/M as mob) /mob/living/carbon/slime/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0) if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]") M.emote("[M.friendly] [src]")
else else
if(M.attack_sound) if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1) playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null)) visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1) "<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>") M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>") src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
attacked += 10
adjustBruteLoss(damage) adjustBruteLoss(damage)
updatehealth() updatehealth()
/mob/living/carbon/slime/attack_paw(mob/living/carbon/monkey/M as mob) /mob/living/carbon/slime/attack_paw(mob/living/carbon/monkey/M as mob)
if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens. if(!(istype(M, /mob/living/carbon/monkey)))
return // Fix for aliens receiving double messages when attacking other aliens.
if (!ticker) if (!ticker)
M << "You cannot attack people before the game has started." M << "You cannot attack people before the game has started."
@@ -340,6 +298,7 @@
if (istype(loc, /turf) && istype(loc.loc, /area/start)) if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass." M << "No attacking people at spawn, you jackass."
return return
..() ..()
switch(M.a_intent) switch(M.a_intent)
@@ -352,9 +311,8 @@
if (health > 0) if (health > 0)
attacked += 10 attacked += 10
//playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1) //playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null)) visible_message("<span class='danger'>[M.name] has attacked [src]!</span>", \
if ((O.client && !( O.blinded ))) "<span class='userdanger'>[M.name] has attacked [src]!</span>")
O.show_message(text("\red <B>[M.name] has attacked [src]!</B>"), 1)
adjustBruteLoss(rand(1, 3)) adjustBruteLoss(rand(1, 3))
updatehealth() updatehealth()
return return
@@ -374,15 +332,11 @@
if(Victim) if(Victim)
if(Victim == M) if(Victim == M)
if(prob(60)) if(prob(60))
for(var/mob/O in viewers(src, null)) visible_message("<span class='warning'>[M] attempts to wrestle \the [name] off!</span>")
if ((O.client && !( O.blinded )))
O.show_message("\red [M] attempts to wrestle \the [name] off!", 1)
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
else else
for(var/mob/O in viewers(src, null)) visible_message("<span class='warning'> [M] manages to wrestle \the [name] off!</span>")
if ((O.client && !( O.blinded )))
O.show_message("\red [M] manages to wrestle \the [name] off!", 1)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(prob(90) && !client) if(prob(90) && !client)
@@ -402,21 +356,17 @@
else else
if(prob(30)) if(prob(30))
for(var/mob/O in viewers(src, null)) visible_message("<span class='warning'>[M] attempts to wrestle \the [name] off of [Victim]!</span>")
if ((O.client && !( O.blinded )))
O.show_message("\red [M] attempts to wrestle \the [name] off of [Victim]!", 1)
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
else else
for(var/mob/O in viewers(src, null)) visible_message("<span class='warning'> [M] manages to wrestle \the [name] off of [Victim]!</span>")
if ((O.client && !( O.blinded )))
O.show_message("\red [M] manages to wrestle \the [name] off of [Victim]!", 1)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(prob(80) && !client) if(prob(80) && !client)
Discipline++ Discipline++
if(!istype(src, /mob/living/carbon/slime/adult)) if(!is_adult)
if(Discipline == 1) if(Discipline == 1)
attacked = 0 attacked = 0
@@ -432,18 +382,13 @@
return return
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves var/obj/item/clothing/gloves/G = M.gloves
if(G.cell) if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500) if(G.cell.charge >= 2500)
G.cell.use(2500) G.cell.use(2500)
for(var/mob/O in viewers(src, null)) visible_message("<span class='warning'>[src] has been touched with the stun gloves by [M]!</span>")
if ((O.client && !( O.blinded )))
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
return return
else else
M << "\red Not enough charge! " M << "\red Not enough charge! "
@@ -455,21 +400,18 @@
help_shake_act(M) help_shake_act(M)
if ("grab") if ("grab")
if (M == src) if (M == src || anchored)
return return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src ) var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
M.put_in_active_hand(G) M.put_in_active_hand(G)
grabbed_by += G
G.synch() G.synch()
LAssailant = M LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null)) visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
else else
@@ -479,8 +421,9 @@
if (prob(90)) if (prob(90))
if (HULK in M.mutations) if (HULK in M.mutations)
damage += 5 damage += 5
if(Victim) if(Victim || Target)
Victim = null Victim = null
Target = null
anchored = 0 anchored = 0
if(prob(80) && !client) if(prob(80) && !client)
Discipline++ Discipline++
@@ -492,17 +435,14 @@
playsound(loc, "punch", 25, 1, -1) playsound(loc, "punch", 25, 1, -1)
for(var/mob/O in viewers(src, null)) visible_message("<span class='danger'>[M] has punched [src]!</span>", \
if ((O.client && !( O.blinded ))) "<span class='userdanger'>[M] has punched [src]!</span>")
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
adjustBruteLoss(damage) adjustBruteLoss(damage)
updatehealth() updatehealth()
else else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null)) visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
return return
@@ -518,48 +458,41 @@
switch(M.a_intent) switch(M.a_intent)
if ("help") if ("help")
for(var/mob/O in viewers(src, null)) visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if ("hurt") if ("hurt")
if ((prob(95) && health > 0)) if (prob(95))
attacked += 10 attacked += 10
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
var/damage = rand(15, 30) var/damage = rand(15, 30)
if (damage >= 25) if (damage >= 25)
damage = rand(20, 40) damage = rand(20, 40)
for(var/mob/O in viewers(src, null)) visible_message("<span class='danger'>[M] has attacked [name]!</span>", \
if ((O.client && !( O.blinded ))) "<span class='userdanger'>[M] has attacked [name]!</span>")
O.show_message(text("\red <B>[] has attacked [name]!</B>", M), 1)
else else
for(var/mob/O in viewers(src, null)) visible_message("<span class='danger'>[M] has wounded [name]!</span>", \
if ((O.client && !( O.blinded ))) "<span class='userdanger'>)[M] has wounded [name]!</span>")
O.show_message(text("\red <B>[] has wounded [name]!</B>", M), 1)
adjustBruteLoss(damage) adjustBruteLoss(damage)
updatehealth() updatehealth()
else else
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null)) visible_message("<span class='danger'>[M] has attempted to lunge at [name]!</span>", \
if ((O.client && !( O.blinded ))) "<span class='userdanger'>[M] has attempted to lunge at [name]!</span>")
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
if ("grab") if ("grab")
if (M == src) if (M == src || anchored)
return return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src ) var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
M.put_in_active_hand(G) M.put_in_active_hand(G)
grabbed_by += G
G.synch() G.synch()
LAssailant = M LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null)) visible_message("<span class='warning'> [M] has grabbed [name] passively!</span>")
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
if ("disarm") if ("disarm")
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1) playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
@@ -567,12 +500,12 @@
attacked += 10 attacked += 10
if(prob(95)) if(prob(95))
for(var/mob/O in viewers(src, null)) visible_message("<span class='danger'>[M] has tackled [name]!</span>", \
if ((O.client && !( O.blinded ))) "<span class='userdanger'>[M] has tackled [name]!</span>")
O.show_message(text("\red <B>[] has tackled [name]!</B>", M), 1)
if(Victim) if(Victim || Target)
Victim = null Victim = null
Target = null
anchored = 0 anchored = 0
if(prob(80) && !client) if(prob(80) && !client)
Discipline++ Discipline++
@@ -593,68 +526,123 @@
else else
drop_item() drop_item()
for(var/mob/O in viewers(src, null)) visible_message("<span class='danger'>[M] has disarmed [name]!</span>",
if ((O.client && !( O.blinded ))) "<span class='userdanger'>[M] has disarmed [name]!</span>")
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
adjustBruteLoss(damage) adjustBruteLoss(damage)
updatehealth() updatehealth()
return return
/mob/living/carbon/slime/attackby(obj/item/W, mob/user)
if(W.force > 0)
attacked += 10
if(prob(25))
user << "<span class='danger'>[W] passes right through [src]!</span>"
return
if(Discipline && prob(50)) // wow, buddy, why am I getting attacked??
Discipline = 0
if(W.force >= 3)
if(is_adult)
if(prob(5 + round(W.force/2)))
if(Victim || Target)
if(prob(80) && !client)
Discipline++
Victim = null
Target = null
anchored = 0
spawn()
SStun = 1
sleep(rand(5,20))
SStun = 0
spawn(0)
if(user)
canmove = 0
step_away(src, user)
if(prob(25 + W.force))
sleep(2)
if(user)
step_away(src, user)
canmove = 1
else
if(prob(10 + W.force*2))
if(Victim || Target)
if(prob(80) && !client)
Discipline++
if(Discipline == 1)
attacked = 0
spawn()
SStun = 1
sleep(rand(5,20))
SStun = 0
Victim = null
Target = null
anchored = 0
spawn(0)
if(user)
canmove = 0
step_away(src, user)
if(prob(25 + W.force*4))
sleep(2)
if(user)
step_away(src, user)
canmove = 1
..()
/mob/living/carbon/slime/restrained() /mob/living/carbon/slime/restrained()
return 0 return 0
mob/living/carbon/slime/var/co2overloadtime = null mob/living/carbon/slime/var/co2overloadtime = null
mob/living/carbon/slime/var/temperature_resistance = T0C+75 mob/living/carbon/slime/var/temperature_resistance = T0C+75
/mob/living/carbon/slime/show_inv(mob/user)
/mob/living/carbon/slime/show_inv(mob/user as mob)
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR><BR>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[name];size=340x480"))
onclose(user, "mob[name]")
return return
/mob/living/carbon/slime/updatehealth() /mob/living/carbon/slime/toggle_throw_mode()
if(status_flags & GODMODE) return
if(istype(src, /mob/living/carbon/slime/adult))
health = 200
else
health = 150
stat = CONSCIOUS
else
// slimes can't suffocate unless they suicide. They are also not harmed by fire
if(istype(src, /mob/living/carbon/slime/adult))
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
else
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
/mob/living/carbon/slime/proc/apply_water()
adjustToxLoss(rand(15,20))
if (!client)
if (Target) // Like cats
Target = null
++Discipline
return
/obj/item/slime_extract /obj/item/slime_extract
name = "slime extract" name = "slime extract"
desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"." desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
icon = 'icons/mob/slimes.dmi' icon = 'icons/mob/slimes.dmi'
icon_state = "grey slime extract" icon_state = "grey slime extract"
flags = TABLEPASS
force = 1.0 force = 1.0
w_class = 1.0 w_class = 1.0
throwforce = 1.0 throwforce = 0
throw_speed = 3 throw_speed = 3
throw_range = 6 throw_range = 6
origin_tech = "biotech=4" origin_tech = "biotech=4"
var/Uses = 1 // uses before it goes inert var/Uses = 1 // uses before it goes inert
var/enhanced = 0 //has it been enhanced before?
attackby(obj/item/O as obj, mob/user as mob)
if(istype(O, /obj/item/weapon/slimesteroid2))
if(enhanced == 1)
user << "<span class='warning'> This extract has already been enhanced!</span>"
return ..()
if(Uses == 0)
user << "<span class='warning'> You can't enhance a used extract!</span>"
return ..()
user <<"You apply the enhancer. It now has triple the amount of uses."
Uses = 3
enhanced = 1
del(O)
/obj/item/slime_extract/New() /obj/item/slime_extract/New()
..() ..()
var/datum/reagents/R = new/datum/reagents(100) create_reagents(100)
reagents = R
R.my_atom = src
/obj/item/slime_extract/grey /obj/item/slime_extract/grey
name = "grey slime extract" name = "grey slime extract"
@@ -724,6 +712,26 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
name = "adamantine slime extract" name = "adamantine slime extract"
icon_state = "adamantine slime extract" icon_state = "adamantine slime extract"
/obj/item/slime_extract/bluespace
name = "bluespace slime extract"
icon_state = "bluespace slime extract"
/obj/item/slime_extract/pyrite
name = "pyrite slime extract"
icon_state = "pyrite slime extract"
/obj/item/slime_extract/cerulean
name = "cerulean slime extract"
icon_state = "cerulean slime extract"
/obj/item/slime_extract/sepia
name = "sepia slime extract"
icon_state = "sepia slime extract"
/obj/item/slime_extract/rainbow
name = "rainbow slime extract"
icon_state = "rainbow slime extract"
////Pet Slime Creation/// ////Pet Slime Creation///
/obj/item/weapon/slimepotion /obj/item/weapon/slimepotion
@@ -734,28 +742,31 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
attack(mob/living/carbon/slime/M as mob, mob/user as mob) attack(mob/living/carbon/slime/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime))//If target is not a slime. if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
user << "\red The potion only works on baby slimes!" user << "<span class='warning'> The potion only works on baby slimes!</span>"
return ..() return ..()
if(istype(M, /mob/living/carbon/slime/adult)) //Can't tame adults if(M.is_adult) //Can't tame adults
user << "\red Only baby slimes can be tamed!" user << "<span class='warning'> Only baby slimes can be tamed!</span>"
return..() return..()
if(M.stat) if(M.stat)
user << "\red The slime is dead!" user << "<span class='warning'> The slime is dead!</span>"
return..() return..()
if(M.mind)
user << "<span class='warning'> The slime resists!</span>"
return ..()
var/mob/living/simple_animal/slime/pet = new /mob/living/simple_animal/slime(M.loc) var/mob/living/simple_animal/slime/pet = new /mob/living/simple_animal/slime(M.loc)
pet.icon_state = "[M.colour] baby slime" pet.icon_state = "[M.colour] baby slime"
pet.icon_living = "[M.colour] baby slime" pet.icon_living = "[M.colour] baby slime"
pet.icon_dead = "[M.colour] baby slime dead" pet.icon_dead = "[M.colour] baby slime dead"
pet.colour = "[M.colour]" pet.colour = "[M.colour]"
user <<"You feed the slime the potion, removing it's powers and calming it." user <<"You feed the slime the potion, removing it's powers and calming it."
del (M) del(M)
var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN) var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN)
if (!newname) if (!newname)
newname = "pet slime" newname = "pet slime"
pet.name = newname pet.name = newname
pet.real_name = newname pet.real_name = newname
del (src) del(src)
/obj/item/weapon/slimepotion2 /obj/item/weapon/slimepotion2
name = "advanced docility potion" name = "advanced docility potion"
@@ -763,27 +774,30 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
icon = 'icons/obj/chemical.dmi' icon = 'icons/obj/chemical.dmi'
icon_state = "bottle19" icon_state = "bottle19"
attack(mob/living/carbon/slime/adult/M as mob, mob/user as mob) attack(mob/living/carbon/slime/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime/adult))//If target is not a slime. if(!istype(M, /mob/living/carbon/slime/))//If target is not a slime.
user << "\red The potion only works on adult slimes!" user << "<span class='warning'> The potion only works on slimes!</span>"
return ..() return ..()
if(M.stat) if(M.stat)
user << "\red The slime is dead!" user << "<span class='warning'> The slime is dead!</span>"
return..() return..()
if(M.mind)
user << "<span class='warning'> The slime resists!</span>"
return ..()
var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc) var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc)
pet.icon_state = "[M.colour] adult slime" pet.icon_state = "[M.colour] adult slime"
pet.icon_living = "[M.colour] adult slime" pet.icon_living = "[M.colour] adult slime"
pet.icon_dead = "[M.colour] baby slime dead" pet.icon_dead = "[M.colour] baby slime dead"
pet.colour = "[M.colour]" pet.colour = "[M.colour]"
user <<"You feed the slime the potion, removing it's powers and calming it." user <<"You feed the slime the potion, removing it's powers and calming it."
del (M) del(M)
var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN) var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN)
if (!newname) if (!newname)
newname = "pet slime" newname = "pet slime"
pet.name = newname pet.name = newname
pet.real_name = newname pet.real_name = newname
del (src) del(src)
/obj/item/weapon/slimesteroid /obj/item/weapon/slimesteroid
@@ -794,25 +808,45 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
attack(mob/living/carbon/slime/M as mob, mob/user as mob) attack(mob/living/carbon/slime/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime))//If target is not a slime. if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
user << "\red The steroid only works on baby slimes!" user << "<span class='warning'> The steroid only works on baby slimes!</span>"
return ..() return ..()
if(istype(M, /mob/living/carbon/slime/adult)) //Can't tame adults if(M.is_adult) //Can't tame adults
user << "\red Only baby slimes can use the steroid!" user << "<span class='warning'> Only baby slimes can use the steroid!</span>"
return..() return..()
if(M.stat) if(M.stat)
user << "\red The slime is dead!" user << "<span class='warning'> The slime is dead!</span>"
return..() return..()
if(M.cores == 3) if(M.cores == 3)
user <<"\red The slime already has the maximum amount of extract!" user <<"<span class='warning'> The slime already has the maximum amount of extract!</span>"
return..() return..()
user <<"You feed the slime the steroid. It now has triple the amount of extract." user <<"You feed the slime the steroid. It now has triple the amount of extract."
M.cores = 3 M.cores = 3
del (src) del(src)
/obj/item/weapon/slimesteroid2
name = "extract enhancer"
desc = "A potent chemical mix that will give a slime extract three uses."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle17"
/*afterattack(obj/target, mob/user , flag)
if(istype(target, /obj/item/slime_extract))
if(target.enhanced == 1)
user << "<span class='warning'> This extract has already been enhanced!</span>"
return ..()
if(target.Uses == 0)
user << "<span class='warning'> You can't enhance a used extract!</span>"
return ..()
user <<"You apply the enhancer. It now has triple the amount of uses."
target.Uses = 3
target.enahnced = 1
del(src)*/
////////Adamantine Golem stuff I dunno where else to put it ////////Adamantine Golem stuff I dunno where else to put it
// This will eventually be removed.
/obj/item/clothing/under/golem /obj/item/clothing/under/golem
name = "adamantine skin" name = "adamantine skin"
desc = "a golem's skin" desc = "a golem's skin"
@@ -949,6 +983,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
var/area/A = get_area(src) var/area/A = get_area(src)
if(A) if(A)
G << "Golem rune created in [A.name]." G << "Golem rune created in [A.name]."
//////////////////////////////Old shit from metroids/RoRos, and the old cores, would not take much work to re-add them//////////////////////// //////////////////////////////Old shit from metroids/RoRos, and the old cores, would not take much work to re-add them////////////////////////
/* /*
@@ -958,11 +993,10 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"." desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
icon = 'icons/mob/slimes.dmi' icon = 'icons/mob/slimes.dmi'
icon_state = "slime extract" icon_state = "slime extract"
flags = TABLEPASS
force = 1.0 force = 1.0
w_class = 1.0 w_class = 1.0
throwforce = 1.0 throwforce = 1.0
throw_speed = 3 throw_speed = 2
throw_range = 6 throw_range = 6
origin_tech = "biotech=4" origin_tech = "biotech=4"
var/POWERFLAG = 0 // sshhhhhhh var/POWERFLAG = 0 // sshhhhhhh
@@ -971,9 +1005,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
/obj/item/slime_core/New() /obj/item/slime_core/New()
..() ..()
var/datum/reagents/R = new/datum/reagents(100) create_reagents(100)
reagents = R
R.my_atom = src
POWERFLAG = rand(1,10) POWERFLAG = rand(1,10)
Uses = rand(7, 25) Uses = rand(7, 25)
//flags |= NOREACT //flags |= NOREACT
@@ -1017,9 +1049,9 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Hatch() /obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Hatch()
processing_objects.Remove(src) processing_objects.Remove(src)
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
src.visible_message("\blue The [name] pulsates and quivers!") src.visible_message("<span class='warning'> The [name] pulsates and quivers!</span>")
spawn(rand(50,100)) spawn(rand(50,100))
src.visible_message("\blue The [name] bursts open!") src.visible_message("<span class='warning'> The [name] bursts open!</span>")
new/mob/living/carbon/slime(T) new/mob/living/carbon/slime(T)
del(src) del(src)
@@ -1035,4 +1067,4 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
return return
else else
..() ..()
*/ */

View File

@@ -11,12 +11,12 @@
var/list/choices = list() var/list/choices = list()
for(var/mob/living/C in view(1,src)) for(var/mob/living/C in view(1,src))
if(C!=src && !istype(C,/mob/living/carbon/slime)) if(C!=src && !istype(C,/mob/living/carbon/slime) && Adjacent(C))
choices += C choices += C
var/mob/living/carbon/M = input(src,"Who do you wish to feed on?") in null|choices var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices
if(!M) return if(!M) return
if(M in view(1, src)) if(Adjacent(M))
if(!istype(src, /mob/living/carbon/brain)) if(!istype(src, /mob/living/carbon/brain))
if(!istype(M, /mob/living/carbon/slime)) if(!istype(M, /mob/living/carbon/slime))
@@ -42,76 +42,72 @@
/mob/living/carbon/slime/proc/Feedon(var/mob/living/carbon/M) /mob/living/carbon/slime/proc/Feedon(var/mob/living/M)
Victim = M Victim = M
src.loc = M.loc src.loc = M.loc
canmove = 0 canmove = 0
anchored = 1 anchored = 1
var/lastnut = nutrition var/lastnut = nutrition
//if(M.client) M << "\red You legs become paralyzed!" var/fed_succesfully = 0
if(istype(src, /mob/living/carbon/slime/adult)) if(is_adult)
icon_state = "[colour] adult slime eat" icon_state = "[colour] adult slime eat"
else else
icon_state = "[colour] baby slime eat" icon_state = "[colour] baby slime eat"
while(Victim && M.health > -70 && stat != 2) while(Victim && M.health > -70 && stat != 2)
// M.canmove = 0
canmove = 0 canmove = 0
if(M in view(1, src)) if(Adjacent(M))
loc = M.loc loc = M.loc
if(prob(15) && M.client && istype(M, /mob/living/carbon)) if(prob(15) && M.client && istype(M, /mob/living/carbon))
M << "\red [pick("You can feel your body becoming weak!", \ M << "<span class='danger'>[pick("You can feel your body becoming weak!", \
"You feel like you're about to die!", \ "You feel like you're about to die!", \
"You feel every part of your body screaming in agony!", \ "You feel every part of your body screaming in agony!", \
"A low, rolling pain passes through your body!", \ "A low, rolling pain passes through your body!", \
"Your body feels as if it's falling apart!", \ "Your body feels as if it's falling apart!", \
"You feel extremely weak!", \ "You feel extremely weak!", \
"A sharp, deep pain bathes every inch of your body!")]" "A sharp, deep pain bathes every inch of your body!")]</span>"
if(istype(M, /mob/living/carbon)) if(istype(M, /mob/living/carbon))
Victim.adjustCloneLoss(rand(1,10)) Victim.adjustCloneLoss(rand(5,6))
Victim.adjustToxLoss(rand(1,2)) Victim.adjustToxLoss(rand(1,2))
if(Victim.health <= 0) if(Victim.health <= 0)
Victim.adjustToxLoss(rand(2,4)) Victim.adjustToxLoss(rand(2,4))
// Heal yourself fed_succesfully = 1
adjustToxLoss(-10)
adjustOxyLoss(-10)
adjustBruteLoss(-10)
adjustFireLoss(-10)
adjustCloneLoss(-10)
if(Victim) else if(istype(M, /mob/living/simple_animal))
for(var/mob/living/carbon/slime/slime in view(1,M)) Victim.adjustBruteLoss(is_adult ? rand(7, 15) : rand(4, 12))
if(slime.Victim == M && slime != src) fed_succesfully = 1
slime.Feedstop()
nutrition += rand(10,25) else
if(prob(25))
src << "<span class='warning'>[pick("This subject is incompatable", \
"This subject does not have a life energy", "This subject is empty", \
"I am not satisified", "I can not feed from this subject", \
"I do not feel nourished", "This subject is not food")]...</span>"
if(fed_succesfully)
//I have no idea why this is not in handle_nutrition()
nutrition += rand(15,30)
if(nutrition >= lastnut + 50) if(nutrition >= lastnut + 50)
if(prob(80)) if(prob(80))
lastnut = nutrition lastnut = nutrition
powerlevel++ powerlevel++
if(powerlevel > 10) if(powerlevel > 10)
powerlevel = 10 powerlevel = 10
adjustToxLoss(-10)
if(istype(src, /mob/living/carbon/slime/adult)) //Heal yourself.
if(nutrition > 1200) adjustOxyLoss(-10)
nutrition = 1200 adjustBruteLoss(-10)
else adjustFireLoss(-10)
if(nutrition > 1000) adjustCloneLoss(-10)
nutrition = 1000
Victim.updatehealth()
updatehealth() updatehealth()
if(Victim)
else Victim.updatehealth()
if(prob(25))
src << "\red <i>[pick("This subject is incompatable", \
"This subject does not have a life energy", "This subject is empty", \
"I am not satisified", "I can not feed from this subject", \
"I do not feel nourished", "This subject is not food")]...</i>"
sleep(rand(15,45)) sleep(rand(15,45))
@@ -119,11 +115,11 @@
break break
if(stat == 2) if(stat == 2)
if(!istype(src, /mob/living/carbon/slime/adult)) if(!is_adult)
icon_state = "[colour] baby slime dead" icon_state = "[colour] baby slime dead"
else else
if(istype(src, /mob/living/carbon/slime/adult)) if(is_adult)
icon_state = "[colour] adult slime" icon_state = "[colour] adult slime"
else else
icon_state = "[colour] baby slime" icon_state = "[colour] baby slime"
@@ -139,7 +135,11 @@
if(Victim.LAssailant && Victim.LAssailant != Victim) if(Victim.LAssailant && Victim.LAssailant != Victim)
if(prob(50)) if(prob(50))
if(!(Victim.LAssailant in Friends)) if(!(Victim.LAssailant in Friends))
Friends.Add(Victim.LAssailant) // no idea why i was using the |= operator Friends[Victim.LAssailant] = 1
//Friends.Add(Victim.LAssailant) // no idea why i was using the |= operator
else
++Friends[Victim.LAssailant]
if(M.client && istype(src, /mob/living/carbon/human)) if(M.client && istype(src, /mob/living/carbon/human))
if(prob(85)) if(prob(85))
@@ -173,16 +173,13 @@
if(stat) if(stat)
src << "<i>I must be conscious to do this...</i>" src << "<i>I must be conscious to do this...</i>"
return return
if(!istype(src, /mob/living/carbon/slime/adult)) if(!is_adult)
if(amount_grown >= 10) if(amount_grown >= 10)
var/mob/living/carbon/slime/adult/new_slime = new adulttype(loc) is_adult = 1
new_slime.nutrition = nutrition maxHealth = 200
new_slime.powerlevel = max(0, powerlevel-1) amount_grown = 0
new_slime.a_intent = "hurt" regenerate_icons()
new_slime.key = key name = text("[colour] [is_adult ? "adult" : "baby"] slime ([number])")
new_slime.universal_speak = universal_speak
new_slime << "<B>You are now an adult slime.</B>"
del(src)
else else
src << "<i>I am not ready to evolve yet...</i>" src << "<i>I am not ready to evolve yet...</i>"
else else
@@ -190,15 +187,14 @@
/mob/living/carbon/slime/verb/Reproduce() /mob/living/carbon/slime/verb/Reproduce()
set category = "Slime" set category = "Slime"
set desc = "This will make you split into four Slimes. NOTE: this will KILL you, but you will be transferred into one of the babies." set desc = "This will make you split into four Slimes."
if(stat) if(stat)
src << "<i>I must be conscious to do this...</i>" src << "<i>I must be conscious to do this...</i>"
return return
if(istype(src, /mob/living/carbon/slime/adult)) if(is_adult)
if(amount_grown >= 10) if(amount_grown >= 10)
//if(input("Are you absolutely sure you want to reproduce? Your current body will cease to be, but your consciousness will be transferred into a produced slime.") in list("Yes","No")=="Yes")
if(stat) if(stat)
src << "<i>I must be conscious to do this...</i>" src << "<i>I must be conscious to do this...</i>"
return return
@@ -207,54 +203,30 @@
var/new_nutrition = round(nutrition * 0.9) var/new_nutrition = round(nutrition * 0.9)
var/new_powerlevel = round(powerlevel / 4) var/new_powerlevel = round(powerlevel / 4)
for(var/i=1,i<=4,i++) for(var/i=1,i<=4,i++)
if(prob(80)) var/mob/living/carbon/slime/M = new /mob/living/carbon/slime/(loc)
var/mob/living/carbon/slime/M = new primarytype(loc) if(prob(mutation_chance))
M.nutrition = new_nutrition M.colour = slime_mutation[rand(1,4)]
M.powerlevel = new_powerlevel
if(i != 1) step_away(M,src)
babies += M
else else
var/mutations = pick("one","two","three","four") M.colour = colour
switch(mutations) if(ckey) M.nutrition = new_nutrition //Player slimes are more robust at spliting. Once an oversight of poor copypasta, now a feature!
if("one") M.powerlevel = new_powerlevel
var/mob/living/carbon/slime/M = new mutationone(loc) if(i != 1) step_away(M,src)
M.nutrition = new_nutrition M.Friends = Friends.Copy()
M.powerlevel = new_powerlevel babies += M
if(i != 1) step_away(M,src) feedback_add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]")
babies += M
if("two")
var/mob/living/carbon/slime/M = new mutationtwo(loc)
M.nutrition = new_nutrition
M.powerlevel = new_powerlevel
if(i != 1) step_away(M,src)
babies += M
if("three")
var/mob/living/carbon/slime/M = new mutationthree(loc)
M.nutrition = new_nutrition
M.powerlevel = new_powerlevel
if(i != 1) step_away(M,src)
babies += M
if("four")
var/mob/living/carbon/slime/M = new mutationfour(loc)
M.nutrition = new_nutrition
M.powerlevel = new_powerlevel
if(i != 1) step_away(M,src)
babies += M
var/mob/living/carbon/slime/new_slime = pick(babies) var/mob/living/carbon/slime/new_slime = pick(babies)
new_slime.a_intent = "hurt"
new_slime.universal_speak = universal_speak new_slime.universal_speak = universal_speak
new_slime.key = key if(src.mind)
src.mind.transfer_to(new_slime)
new_slime << "<B>You are now a slime!</B>" else
new_slime.key = src.key
del(src) del(src)
else else
src << "<i>I am not ready to reproduce yet...</i>" src << "<i>I am not ready to reproduce yet...</i>"
else else
src << "<i>I am not old enough to reproduce yet...</i>" src << "<i>I am not old enough to reproduce yet...</i>"
/mob/living/carbon/slime/verb/ventcrawl() /mob/living/carbon/slime/verb/ventcrawl()
set name = "Crawl through Vent" set name = "Crawl through Vent"
set desc = "Enter an air vent and crawl through the pipe system." set desc = "Enter an air vent and crawl through the pipe system."

View File

@@ -0,0 +1,23 @@
/mob/living/carbon/slime/say(var/message)
var/verb = say_quote(message)
if(copytext(message,1,2) == "*")
return emote(copytext(message,2))
return ..(message, null, verb)
/mob/living/carbon/slime/say_quote(var/text)
var/ending = copytext(text, length(text))
if (ending == "?")
return "telepathically asks";
else if (ending == "!")
return "telepathically cries";
return "telepathically chirps";
/mob/living/carbon/slime/say_understands(var/other)
if (istype(other, /mob/living/carbon/slime))
return 1
return ..()

View File

@@ -1,372 +1,79 @@
proc/mutation_table(var/colour)
////////////////Tier 2 var/list/slime_mutation[4]
switch(colour)
/mob/living/carbon/slime/purple //Tier 1
colour = "purple" if("grey")
icon_state = "purple baby slime" slime_mutation[1] = "orange"
primarytype = /mob/living/carbon/slime/purple slime_mutation[2] = "metal"
mutationone = /mob/living/carbon/slime/darkpurple slime_mutation[3] = "blue"
mutationtwo = /mob/living/carbon/slime/darkblue slime_mutation[4] = "purple"
mutationthree = /mob/living/carbon/slime/green //Tier 2
mutationfour = /mob/living/carbon/slime/green if("purple")
adulttype = /mob/living/carbon/slime/adult/purple slime_mutation[1] = "dark purple"
coretype = /obj/item/slime_extract/purple slime_mutation[2] = "dark blue"
slime_mutation[3] = "green"
/mob/living/carbon/slime/adult/purple slime_mutation[4] = "green"
icon_state = "purple adult slime" if("metal")
colour = "purple" slime_mutation[1] = "silver"
primarytype = /mob/living/carbon/slime/purple slime_mutation[2] = "yellow"
mutationone = /mob/living/carbon/slime/darkpurple slime_mutation[3] = "gold"
mutationtwo = /mob/living/carbon/slime/darkblue slime_mutation[4] = "gold"
mutationthree = /mob/living/carbon/slime/green if("orange")
mutationfour = /mob/living/carbon/slime/green slime_mutation[1] = "dark purple"
adulttype = /mob/living/carbon/slime/adult/purple slime_mutation[2] = "yellow"
coretype = /obj/item/slime_extract/purple slime_mutation[3] = "red"
slime_mutation[4] = "red"
/mob/living/carbon/slime/metal if("blue")
colour = "metal" slime_mutation[1] = "dark blue"
icon_state = "metal baby slime" slime_mutation[2] = "silver"
primarytype = /mob/living/carbon/slime/metal slime_mutation[3] = "pink"
mutationone = /mob/living/carbon/slime/silver slime_mutation[4] = "pink"
mutationtwo = /mob/living/carbon/slime/yellow //Tier 3
mutationthree = /mob/living/carbon/slime/gold if("dark blue")
mutationfour = /mob/living/carbon/slime/gold slime_mutation[1] = "purple"
adulttype = /mob/living/carbon/slime/adult/metal slime_mutation[2] = "blue"
coretype = /obj/item/slime_extract/metal slime_mutation[3] = "cerulean"
slime_mutation[4] = "cerulean"
/mob/living/carbon/slime/adult/metal if("dark purple")
icon_state = "metal adult slime" slime_mutation[1] = "purple"
colour = "metal" slime_mutation[2] = "orange"
primarytype = /mob/living/carbon/slime/metal slime_mutation[3] = "sepia"
mutationone = /mob/living/carbon/slime/silver slime_mutation[4] = "sepia"
mutationtwo = /mob/living/carbon/slime/yellow if("yellow")
mutationthree = /mob/living/carbon/slime/gold slime_mutation[1] = "metal"
mutationfour = /mob/living/carbon/slime/gold slime_mutation[2] = "orange"
adulttype = /mob/living/carbon/slime/adult/metal slime_mutation[3] = "bluespace"
coretype = /obj/item/slime_extract/metal slime_mutation[4] = "bluespace"
if("silver")
/mob/living/carbon/slime/orange slime_mutation[1] = "metal"
colour = "orange" slime_mutation[2] = "blue"
icon_state = "orange baby slime" slime_mutation[3] = "pyrite"
primarytype = /mob/living/carbon/slime/orange slime_mutation[4] = "pyrite"
mutationone = /mob/living/carbon/slime/red //Tier 4
mutationtwo = /mob/living/carbon/slime/red if("pink")
mutationthree = /mob/living/carbon/slime/darkpurple slime_mutation[1] = "pink"
mutationfour = /mob/living/carbon/slime/yellow slime_mutation[2] = "pink"
adulttype = /mob/living/carbon/slime/adult/orange slime_mutation[3] = "light pink"
coretype = /obj/item/slime_extract/orange slime_mutation[4] = "light pink"
if("red")
/mob/living/carbon/slime/adult/orange slime_mutation[1] = "red"
colour = "orange" slime_mutation[2] = "red"
icon_state = "orange adult slime" slime_mutation[3] = "oil"
primarytype = /mob/living/carbon/slime/orange slime_mutation[4] = "oil"
mutationone = /mob/living/carbon/slime/red if("gold")
mutationtwo = /mob/living/carbon/slime/red slime_mutation[1] = "gold"
mutationthree = /mob/living/carbon/slime/darkpurple slime_mutation[2] = "gold"
mutationfour = /mob/living/carbon/slime/yellow slime_mutation[3] = "adamantine"
adulttype = /mob/living/carbon/slime/adult/orange slime_mutation[4] = "adamantine"
coretype = /obj/item/slime_extract/orange if("green")
slime_mutation[1] = "green"
/mob/living/carbon/slime/blue slime_mutation[2] = "green"
colour = "blue" slime_mutation[3] = "black"
icon_state = "blue baby slime" slime_mutation[4] = "black"
primarytype = /mob/living/carbon/slime/blue // Tier 5
mutationone = /mob/living/carbon/slime/darkblue else
mutationtwo = /mob/living/carbon/slime/pink slime_mutation[1] = colour
mutationthree = /mob/living/carbon/slime/pink slime_mutation[2] = colour
mutationfour = /mob/living/carbon/slime/silver slime_mutation[3] = colour
adulttype = /mob/living/carbon/slime/adult/blue slime_mutation[4] = colour
coretype = /obj/item/slime_extract/blue return(slime_mutation)
/mob/living/carbon/slime/adult/blue
icon_state = "blue adult slime"
colour = "blue"
primarytype = /mob/living/carbon/slime/blue
mutationone = /mob/living/carbon/slime/darkblue
mutationtwo = /mob/living/carbon/slime/pink
mutationthree = /mob/living/carbon/slime/silver
mutationfour = /mob/living/carbon/slime/pink
adulttype = /mob/living/carbon/slime/adult/blue
coretype = /obj/item/slime_extract/blue
//Tier 3
/mob/living/carbon/slime/darkblue
colour = "dark blue"
icon_state = "dark blue baby slime"
primarytype = /mob/living/carbon/slime/darkblue
mutationone = /mob/living/carbon/slime/purple
mutationtwo = /mob/living/carbon/slime/purple
mutationthree = /mob/living/carbon/slime/blue
mutationfour = /mob/living/carbon/slime/blue
adulttype = /mob/living/carbon/slime/adult/darkblue
coretype = /obj/item/slime_extract/darkblue
/mob/living/carbon/slime/adult/darkblue
icon_state = "dark blue adult slime"
colour = "dark blue"
primarytype = /mob/living/carbon/slime/darkblue
mutationone = /mob/living/carbon/slime/purple
mutationtwo = /mob/living/carbon/slime/purple
mutationthree = /mob/living/carbon/slime/blue
mutationfour = /mob/living/carbon/slime/blue
adulttype = /mob/living/carbon/slime/adult/darkblue
coretype = /obj/item/slime_extract/darkblue
/mob/living/carbon/slime/darkpurple
colour = "dark purple"
icon_state = "dark purple baby slime"
primarytype = /mob/living/carbon/slime/darkpurple
mutationone = /mob/living/carbon/slime/purple
mutationtwo = /mob/living/carbon/slime/purple
mutationthree = /mob/living/carbon/slime/orange
mutationfour = /mob/living/carbon/slime/orange
adulttype = /mob/living/carbon/slime/adult/darkpurple
coretype = /obj/item/slime_extract/darkpurple
/mob/living/carbon/slime/adult/darkpurple
icon_state = "dark purple adult slime"
colour = "dark purple"
primarytype = /mob/living/carbon/slime/darkpurple
mutationone = /mob/living/carbon/slime/purple
mutationtwo = /mob/living/carbon/slime/purple
mutationthree = /mob/living/carbon/slime/orange
mutationfour = /mob/living/carbon/slime/orange
adulttype = /mob/living/carbon/slime/adult/darkpurple
coretype = /obj/item/slime_extract/darkpurple
/mob/living/carbon/slime/yellow
icon_state = "yellow baby slime"
colour = "yellow"
primarytype = /mob/living/carbon/slime/yellow
mutationone = /mob/living/carbon/slime/metal
mutationtwo = /mob/living/carbon/slime/metal
mutationthree = /mob/living/carbon/slime/orange
mutationfour = /mob/living/carbon/slime/orange
adulttype = /mob/living/carbon/slime/adult/yellow
coretype = /obj/item/slime_extract/yellow
/mob/living/carbon/slime/adult/yellow
icon_state = "yellow adult slime"
colour = "yellow"
primarytype = /mob/living/carbon/slime/yellow
mutationone = /mob/living/carbon/slime/metal
mutationtwo = /mob/living/carbon/slime/metal
mutationthree = /mob/living/carbon/slime/orange
mutationfour = /mob/living/carbon/slime/orange
adulttype = /mob/living/carbon/slime/adult/yellow
coretype = /obj/item/slime_extract/yellow
/mob/living/carbon/slime/silver
colour = "silver"
icon_state = "silver baby slime"
primarytype = /mob/living/carbon/slime/silver
mutationone = /mob/living/carbon/slime/metal
mutationtwo = /mob/living/carbon/slime/metal
mutationthree = /mob/living/carbon/slime/blue
mutationfour = /mob/living/carbon/slime/blue
adulttype = /mob/living/carbon/slime/adult/silver
coretype = /obj/item/slime_extract/silver
/mob/living/carbon/slime/adult/silver
icon_state = "silver adult slime"
colour = "silver"
primarytype = /mob/living/carbon/slime/silver
mutationone = /mob/living/carbon/slime/metal
mutationtwo = /mob/living/carbon/slime/metal
mutationthree = /mob/living/carbon/slime/blue
mutationfour = /mob/living/carbon/slime/blue
adulttype = /mob/living/carbon/slime/adult/silver
coretype = /obj/item/slime_extract/silver
/////////////Tier 4
/mob/living/carbon/slime/pink
colour = "pink"
icon_state = "pink baby slime"
primarytype = /mob/living/carbon/slime/pink
mutationone = /mob/living/carbon/slime/pink
mutationtwo = /mob/living/carbon/slime/pink
mutationthree = /mob/living/carbon/slime/lightpink
mutationfour = /mob/living/carbon/slime/lightpink
adulttype = /mob/living/carbon/slime/adult/pink
coretype = /obj/item/slime_extract/pink
/mob/living/carbon/slime/adult/pink
icon_state = "pink adult slime"
colour = "pink"
primarytype = /mob/living/carbon/slime/pink
mutationone = /mob/living/carbon/slime/pink
mutationtwo = /mob/living/carbon/slime/pink
mutationthree = /mob/living/carbon/slime/lightpink
mutationfour = /mob/living/carbon/slime/lightpink
adulttype = /mob/living/carbon/slime/adult/pink
coretype = /obj/item/slime_extract/pink
/mob/living/carbon/slime/red
colour = "red"
icon_state = "red baby slime"
primarytype = /mob/living/carbon/slime/red
mutationone = /mob/living/carbon/slime/red
mutationtwo = /mob/living/carbon/slime/red
mutationthree = /mob/living/carbon/slime/oil
mutationfour = /mob/living/carbon/slime/oil
adulttype = /mob/living/carbon/slime/adult/red
coretype = /obj/item/slime_extract/red
/mob/living/carbon/slime/adult/red
icon_state = "red adult slime"
colour = "red"
primarytype = /mob/living/carbon/slime/red
mutationone = /mob/living/carbon/slime/red
mutationtwo = /mob/living/carbon/slime/red
mutationthree = /mob/living/carbon/slime/oil
mutationfour = /mob/living/carbon/slime/oil
adulttype = /mob/living/carbon/slime/adult/red
coretype = /obj/item/slime_extract/red
/mob/living/carbon/slime/gold
colour = "gold"
icon_state = "gold baby slime"
primarytype = /mob/living/carbon/slime/gold
mutationone = /mob/living/carbon/slime/gold
mutationtwo = /mob/living/carbon/slime/gold
mutationthree = /mob/living/carbon/slime/adamantine
mutationfour = /mob/living/carbon/slime/adamantine
adulttype = /mob/living/carbon/slime/adult/gold
coretype = /obj/item/slime_extract/gold
/mob/living/carbon/slime/adult/gold
icon_state = "gold adult slime"
colour = "gold"
primarytype = /mob/living/carbon/slime/gold
mutationone = /mob/living/carbon/slime/gold
mutationtwo = /mob/living/carbon/slime/gold
mutationthree = /mob/living/carbon/slime/adamantine
mutationfour = /mob/living/carbon/slime/adamantine
adulttype = /mob/living/carbon/slime/adult/gold
coretype = /obj/item/slime_extract/gold
/mob/living/carbon/slime/green
colour = "green"
icon_state = "green baby slime"
primarytype = /mob/living/carbon/slime/green
mutationone = /mob/living/carbon/slime/green
mutationtwo = /mob/living/carbon/slime/green
mutationthree = /mob/living/carbon/slime/black
mutationfour = /mob/living/carbon/slime/black
adulttype = /mob/living/carbon/slime/adult/green
coretype = /obj/item/slime_extract/green
/mob/living/carbon/slime/adult/green
icon_state = "green adult slime"
colour = "green"
primarytype = /mob/living/carbon/slime/green
mutationone = /mob/living/carbon/slime/green
mutationtwo = /mob/living/carbon/slime/green
mutationthree = /mob/living/carbon/slime/black
mutationfour = /mob/living/carbon/slime/black
adulttype = /mob/living/carbon/slime/adult/green
coretype = /obj/item/slime_extract/green
// Tier 5
/mob/living/carbon/slime/lightpink
colour = "light pink"
icon_state = "light pink baby slime"
primarytype = /mob/living/carbon/slime/lightpink
mutationone = /mob/living/carbon/slime/lightpink
mutationtwo = /mob/living/carbon/slime/lightpink
mutationthree = /mob/living/carbon/slime/lightpink
mutationfour = /mob/living/carbon/slime/lightpink
adulttype = /mob/living/carbon/slime/adult/lightpink
coretype = /obj/item/slime_extract/lightpink
/mob/living/carbon/slime/adult/lightpink
icon_state = "light pink adult slime"
colour = "light pink"
primarytype = /mob/living/carbon/slime/lightpink
mutationone = /mob/living/carbon/slime/lightpink
mutationtwo = /mob/living/carbon/slime/lightpink
mutationthree = /mob/living/carbon/slime/lightpink
mutationfour = /mob/living/carbon/slime/lightpink
adulttype = /mob/living/carbon/slime/adult/lightpink
coretype = /obj/item/slime_extract/lightpink
/mob/living/carbon/slime/oil
icon_state = "oil baby slime"
colour = "oil"
primarytype = /mob/living/carbon/slime/oil
mutationone = /mob/living/carbon/slime/oil
mutationtwo = /mob/living/carbon/slime/oil
mutationthree = /mob/living/carbon/slime/oil
mutationfour = /mob/living/carbon/slime/oil
adulttype = /mob/living/carbon/slime/adult/oil
coretype = /obj/item/slime_extract/oil
/mob/living/carbon/slime/adult/oil
icon_state = "oil adult slime"
colour = "oil"
primarytype = /mob/living/carbon/slime/oil
mutationone = /mob/living/carbon/slime/oil
mutationtwo = /mob/living/carbon/slime/oil
mutationthree = /mob/living/carbon/slime/oil
mutationfour = /mob/living/carbon/slime/oil
adulttype = /mob/living/carbon/slime/adult/oil
coretype = /obj/item/slime_extract/oil
/mob/living/carbon/slime/black
icon_state = "black baby slime"
colour = "black"
primarytype = /mob/living/carbon/slime/black
mutationone = /mob/living/carbon/slime/black
mutationtwo = /mob/living/carbon/slime/black
mutationthree = /mob/living/carbon/slime/black
mutationfour = /mob/living/carbon/slime/black
adulttype = /mob/living/carbon/slime/adult/black
coretype = /obj/item/slime_extract/black
/mob/living/carbon/slime/adult/black
icon_state = "black adult slime"
colour = "black"
primarytype = /mob/living/carbon/slime/black
mutationone = /mob/living/carbon/slime/black
mutationtwo = /mob/living/carbon/slime/black
mutationthree = /mob/living/carbon/slime/black
mutationfour = /mob/living/carbon/slime/black
adulttype = /mob/living/carbon/slime/adult/black
coretype = /obj/item/slime_extract/black
/mob/living/carbon/slime/adamantine
icon_state = "adamantine baby slime"
colour = "adamantine"
primarytype = /mob/living/carbon/slime/adamantine
mutationone = /mob/living/carbon/slime/adamantine
mutationtwo = /mob/living/carbon/slime/adamantine
mutationthree = /mob/living/carbon/slime/adamantine
mutationfour = /mob/living/carbon/slime/adamantine
adulttype = /mob/living/carbon/slime/adult/adamantine
coretype = /obj/item/slime_extract/adamantine
/mob/living/carbon/slime/adult/adamantine
icon_state = "adamantine adult slime"
colour = "adamantine"
primarytype = /mob/living/carbon/slime/adamantine
mutationone = /mob/living/carbon/slime/adamantine
mutationtwo = /mob/living/carbon/slime/adamantine
mutationthree = /mob/living/carbon/slime/adamantine
mutationfour = /mob/living/carbon/slime/adamantine
adulttype = /mob/living/carbon/slime/adult/adamantine
coretype = /obj/item/slime_extract/adamantine

View File

@@ -403,7 +403,7 @@
var/damage = rand(1, 3) var/damage = rand(1, 3)
if(istype(src, /mob/living/carbon/slime/adult)) if(M.is_adult)
damage = rand(20, 40) damage = rand(20, 40)
else else
damage = rand(5, 35) damage = rand(5, 35)

View File

@@ -133,10 +133,17 @@ var/list/department_radio_keys = list(
hearturfs += M.locs[1] hearturfs += M.locs[1]
for(var/obj/O in M.contents) for(var/obj/O in M.contents)
listening_obj |= O listening_obj |= O
if (isslime(I))
var/mob/living/carbon/slime/S = I
if (src in S.Friends)
S.speech_buffer = list()
S.speech_buffer.Add(src)
S.speech_buffer.Add(lowertext(html_decode(message)))
else if(istype(I, /obj/)) else if(istype(I, /obj/))
var/obj/O = I var/obj/O = I
hearturfs += O.locs[1] hearturfs += O.locs[1]
listening_obj |= O listening_obj |= O
for(var/mob/M in player_list) for(var/mob/M in player_list)
if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS)) if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS))

View File

@@ -897,7 +897,7 @@
var/damage = rand(1, 3) var/damage = rand(1, 3)
if(istype(src, /mob/living/carbon/slime/adult)) if(M.is_adult)
damage = rand(20, 40) damage = rand(20, 40)
else else
damage = rand(5, 35) damage = rand(5, 35)

View File

@@ -341,7 +341,7 @@
var/damage = rand(1, 3) var/damage = rand(1, 3)
if(istype(src, /mob/living/carbon/slime/adult)) if(M.is_adult)
damage = rand(20, 40) damage = rand(20, 40)
else else
damage = rand(5, 35) damage = rand(5, 35)

View File

@@ -35,11 +35,6 @@
return 1 return 1
return 0 return 0
/proc/isslimeadult(A)
if(istype(A, /mob/living/carbon/slime/adult))
return 1
return 0
/proc/isrobot(A) /proc/isrobot(A)
if(istype(A, /mob/living/silicon/robot)) if(istype(A, /mob/living/silicon/robot))
return 1 return 1

View File

@@ -245,11 +245,10 @@
babies += M babies += M
new_slime = pick(babies) new_slime = pick(babies)
else else
new_slime = new /mob/living/carbon/slime(loc)
if(adult) if(adult)
new_slime = new /mob/living/carbon/slime/adult(loc) new_slime.is_adult = 1
else else
new_slime = new /mob/living/carbon/slime(loc)
new_slime.a_intent = "hurt"
new_slime.key = key new_slime.key = key
new_slime << "<B>You are now a slime. Skreee!</B>" new_slime << "<B>You are now a slime. Skreee!</B>"

View File

@@ -49,8 +49,7 @@
Robot.mmi = new /obj/item/device/mmi(new_mob) Robot.mmi = new /obj/item/device/mmi(new_mob)
Robot.mmi.transfer_identity(M) //Does not transfer key/client. Robot.mmi.transfer_identity(M) //Does not transfer key/client.
if("slime") if("slime")
if(prob(50)) new_mob = new /mob/living/carbon/slime/adult(M.loc) new_mob = new /mob/living/carbon/slime(M.loc)
else new_mob = new /mob/living/carbon/slime(M.loc)
new_mob.universal_speak = 1 new_mob.universal_speak = 1
if("xeno") if("xeno")
var/alien_caste = pick("Hunter","Sentinel","Drone","Larva") var/alien_caste = pick("Hunter","Sentinel","Drone","Larva")

View File

@@ -234,7 +234,7 @@ datum
T.wet_overlay = null T.wet_overlay = null
for(var/mob/living/carbon/slime/M in T) for(var/mob/living/carbon/slime/M in T)
M.adjustToxLoss(rand(15,20)) M.apply_water()
var/hotspot = (locate(/obj/fire) in T) var/hotspot = (locate(/obj/fire) in T)
if(hotspot && !istype(T, /turf/space)) if(hotspot && !istype(T, /turf/space))

View File

@@ -1230,7 +1230,7 @@ datum
O.show_message(text("\red The contents of the slime core harden and begin to emit a warm, bright light."), 1) O.show_message(text("\red The contents of the slime core harden and begin to emit a warm, bright light."), 1)
var/obj/item/device/flashlight/slime/F = new /obj/item/device/flashlight/slime var/obj/item/device/flashlight/slime/F = new /obj/item/device/flashlight/slime
F.loc = get_turf(holder.my_atom) F.loc = get_turf(holder.my_atom)
//Purple //Purple
slimepsteroid slimepsteroid
@@ -1292,7 +1292,6 @@ datum
required_other = 1 required_other = 1
on_reaction(var/datum/reagents/holder) on_reaction(var/datum/reagents/holder)
for(var/mob/living/carbon/slime/slime in viewers(get_turf(holder.my_atom), null)) for(var/mob/living/carbon/slime/slime in viewers(get_turf(holder.my_atom), null))
slime.tame = 0
slime.rabid = 1 slime.rabid = 1
for(var/mob/O in viewers(get_turf(holder.my_atom), null)) for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red The [slime] is driven into a frenzy!."), 1) O.show_message(text("\red The [slime] is driven into a frenzy!."), 1)

View File

@@ -267,8 +267,7 @@
if(target.cores >= 0) if(target.cores >= 0)
new target.coretype(target.loc) new target.coretype(target.loc)
if(target.cores <= 0) if(target.cores <= 0)
var/origstate = initial(target.icon_state) target.icon_state = "[target.colour] baby slime dead-nocore"
target.icon_state = "[origstate] dead-nocore"
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool) fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)

View File

@@ -6153,7 +6153,7 @@
"coq" = (/obj/machinery/optable{name = "Xenobiology Operating Table"},/obj/machinery/status_display{density = 0; layer = 4; pixel_x = 0; pixel_y = 32},/obj/machinery/light{dir = 1},/turf/simulated/floor{icon_state = "whitehall"; dir = 2},/area/rnd/xenobiology) "coq" = (/obj/machinery/optable{name = "Xenobiology Operating Table"},/obj/machinery/status_display{density = 0; layer = 4; pixel_x = 0; pixel_y = 32},/obj/machinery/light{dir = 1},/turf/simulated/floor{icon_state = "whitehall"; dir = 2},/area/rnd/xenobiology)
"cor" = (/obj/structure/stool/bed/chair{dir = 4},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) "cor" = (/obj/structure/stool/bed/chair{dir = 4},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology)
"cos" = (/obj/structure/table,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/reagentgrinder,/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) "cos" = (/obj/structure/table,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/reagentgrinder,/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology)
"cot" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped,/obj/item/weapon/reagent_containers/spray/cleaner,/obj/item/clothing/gloves/latex,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 8},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) "cot" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped,/obj/item/weapon/reagent_containers/spray/cleaner,/obj/item/clothing/gloves/latex,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 8},/obj/item/device/slime_scanner,/obj/item/device/slime_scanner,/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology)
"cou" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) "cou" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology)
"cov" = (/obj/structure/stool/bed/chair{dir = 8},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/structure/disposalpipe/segment,/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology) "cov" = (/obj/structure/stool/bed/chair{dir = 8},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/structure/disposalpipe/segment,/turf/simulated/floor{icon_state = "white"},/area/rnd/xenobiology)
"cow" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 8; on = 1},/obj/machinery/smartfridge/secure/extract,/turf/simulated/floor{dir = 2; icon_state = "whitecorner"},/area/rnd/xenobiology) "cow" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 8; on = 1},/obj/machinery/smartfridge/secure/extract,/turf/simulated/floor{dir = 2; icon_state = "whitecorner"},/area/rnd/xenobiology)