mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Adding a changelog.
Some work on death() procs of many animals. Replacing most istype(XYZ, mob/living/simple_animal/slime) by isslime(XYZ). Some work on slime feeding procs. Made simple animal aliens see in the dark like regular aliens (in case somone wants to control one).
This commit is contained in:
@@ -87,6 +87,7 @@
|
||||
loc.visible_message("<span class='warning'> The corpse of [H.name] suddenly rises!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/death(gibbed)
|
||||
..(1)
|
||||
// On death, create a small smoke of harmful gas (s-Acid)
|
||||
var/datum/effect/effect/system/chem_smoke_spread/S = new
|
||||
var/turf/location = get_turf(src)
|
||||
@@ -104,6 +105,7 @@
|
||||
S.set_up(reagents, 1, 1, location, 15, 1) // only 1-2 smoke cloud
|
||||
S.start()
|
||||
|
||||
ghostize()
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/Destroy()
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
else if(istype(A, /mob/living)) // You Shall Not Pass!
|
||||
var/mob/living/M = A
|
||||
if(!M.lying && !istype(M, /mob/living/carbon/monkey) && !istype(M, /mob/living/simple_animal/slime)) //If your not laying down, or a small creature, no pass.
|
||||
if(!M.lying && !ismonkey(M) && !isslime(M)) //If your not laying down, or a small creature, no pass.
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if(!can_buckle || !istype(M) || (M.loc != loc) || M.buckled || (buckle_requires_restraints && !M.restrained()))
|
||||
return 0
|
||||
|
||||
if (istype(M, /mob/living/simple_animal/slime) || istype(M, /mob/living/simple_animal/slime))
|
||||
if (isslime(M))
|
||||
return 0
|
||||
|
||||
M.buckled = src
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
user << "<span class='danger'>You're going to need to remove that mask/helmet/glasses first.</span>"
|
||||
return
|
||||
|
||||
if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/simple_animal/slime))//Aliens don't have eyes./N slimes also don't have eyes!
|
||||
if(isalien(M))//Aliens don't have eyes./N slimes also don't have eyes!
|
||||
user << "<span class='danger'>You cannot locate any eyes on this creature!</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
M.unEquip(src) //so icons update :[
|
||||
qdel(src)
|
||||
return 0
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(iscarbon(M))
|
||||
if(!canconsume(M, user))
|
||||
return 0
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
M << "<span class='notice'>You cannot force any more of \the [src] to go down your throat.</span>"
|
||||
return 0
|
||||
else
|
||||
if(! (isslime(M) || isbrain(M)) ) //If you're feeding it to someone else.
|
||||
if(!isbrain(M)) //If you're feeding it to someone else.
|
||||
if(wrapped)
|
||||
return 0
|
||||
if(fullness <= (600 * (1 + M.overeatduration / 1000)))
|
||||
|
||||
@@ -442,10 +442,10 @@ Sorry Giacom. Please don't be mad :(
|
||||
C.reagents.clear_reagents()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
if(stat == 2)
|
||||
if(stat == DEAD)
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
if(!isanimal(src)) stat = CONSCIOUS
|
||||
stat = CONSCIOUS
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/human_mob = src
|
||||
human_mob.restore_blood()
|
||||
@@ -453,8 +453,7 @@ Sorry Giacom. Please don't be mad :(
|
||||
|
||||
update_fire()
|
||||
regenerate_icons()
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/proc/update_damage_overlays()
|
||||
return
|
||||
@@ -906,4 +905,4 @@ Sorry Giacom. Please don't be mad :(
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
|
||||
return loc_temp
|
||||
return loc_temp
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
response_help = "thinks better of touching"
|
||||
response_disarm = "flails at"
|
||||
response_harm = "punches"
|
||||
icon_dead = "shade_dead"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
speed = 0
|
||||
a_intent = "harm"
|
||||
@@ -28,7 +27,7 @@
|
||||
mob_spell_list += new spell(src)
|
||||
|
||||
/mob/living/simple_animal/construct/death()
|
||||
..()
|
||||
..(1)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
visible_message("<span class='danger'>[src] collapses in a shattered heap.</span>")
|
||||
ghostize()
|
||||
@@ -50,7 +49,7 @@
|
||||
|
||||
/mob/living/simple_animal/construct/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(istype(M, /mob/living/simple_animal/construct/builder))
|
||||
health += 5
|
||||
adjustBruteLoss(-5)
|
||||
M.emote("me", 1, "mends some of \the <EM>[src]'s</EM> wounds.")
|
||||
else if(src != M)
|
||||
..()
|
||||
|
||||
@@ -94,7 +94,8 @@
|
||||
if(health < health_repair_max)
|
||||
user << "<span class='notice'>You start to tighten loose screws on [src].</span>"
|
||||
if(do_after(user,80))
|
||||
health = health_repair_max
|
||||
var/repair = health_repair_max - health
|
||||
adjustBruteLoss(-repair)
|
||||
visible_message("<span class='notice'>[user] tightens [src == user ? "their" : "[src]'s"] loose screws!</span>")
|
||||
else
|
||||
user << "<span class='notice'>You need to remain still to tighten [src]'s screws.</span>"
|
||||
|
||||
@@ -39,11 +39,13 @@
|
||||
death()
|
||||
|
||||
/mob/living/simple_animal/mouse/death(gibbed)
|
||||
..(gibbed)
|
||||
if(!ckey)
|
||||
..(1)
|
||||
var/obj/item/trash/deadmouse/M = new(src.loc)
|
||||
M.icon_state = src.icon_dead
|
||||
M.icon_state = icon_dead
|
||||
qdel(src)
|
||||
else
|
||||
..(gibbed)
|
||||
|
||||
/mob/living/simple_animal/mouse/Crossed(AM as mob|obj)
|
||||
if( ishuman(AM) )
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
faction = list("alien")
|
||||
status_flags = CANPUSH
|
||||
minbodytemp = 0
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
/mob/living/simple_animal/hostile/alien/drone
|
||||
name = "alien drone"
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = ""
|
||||
icon_state = "bee_1"
|
||||
icon_living = "bee"
|
||||
icon_dead = ""
|
||||
speak_emote = list("buzzes")
|
||||
emote_hear = list("buzzes")
|
||||
turns_per_move = 0
|
||||
@@ -34,7 +33,8 @@
|
||||
update_bees()
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/bees/death(gibbed)
|
||||
..(gibbed)
|
||||
..(1)
|
||||
ghostize()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
maxbodytemp = INFINITY
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/holocarp/death()
|
||||
..(1)
|
||||
ghostize()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
desc = "An odd looking creature, it won't stop staring..."
|
||||
icon_state = "eyeball"
|
||||
icon_living = "eyeball"
|
||||
icon_dead = ""
|
||||
icon_gib = ""
|
||||
meat_type = null
|
||||
meat_amount = 0
|
||||
@@ -30,5 +29,6 @@
|
||||
emote("me", 1, "glares at [.]")
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/eyeball/death()
|
||||
..(1)
|
||||
ghostize()
|
||||
qdel(src)
|
||||
return
|
||||
@@ -40,12 +40,13 @@
|
||||
ranged = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/hivebot/death(gibbed)
|
||||
..(gibbed)
|
||||
visible_message("<b>[src]</b> blows apart!")
|
||||
..(1)
|
||||
visible_message("<span class='warning'>[src] blows apart!</span>")
|
||||
new /obj/effect/decal/cleanable/robot_debris(src.loc)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
ghostize()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -65,38 +66,35 @@
|
||||
var/spawn_delay = 600
|
||||
var/turn_on = 0
|
||||
var/auto_spawn = 1
|
||||
proc
|
||||
warpbots()
|
||||
|
||||
/mob/living/simple_animal/hostile/hivebot/tele/New()
|
||||
..()
|
||||
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
|
||||
smoke.set_up(5, 0, src.loc)
|
||||
smoke.start()
|
||||
visible_message("<span class='boldannounce'>The [src] warps in!</span>")
|
||||
playsound(src.loc, 'sound/effects/EMPulse.ogg', 25, 1)
|
||||
|
||||
/mob/living/simple_animal/hostile/hivebot/tele/proc/warpbots()
|
||||
icon_state = "def_radar"
|
||||
visible_message("<span class='danger'>The [src] turns on!</span>")
|
||||
while(bot_amt > 0)
|
||||
bot_amt--
|
||||
switch(bot_type)
|
||||
if("norm")
|
||||
new /mob/living/simple_animal/hostile/hivebot(get_turf(src))
|
||||
if("range")
|
||||
new /mob/living/simple_animal/hostile/hivebot/range(get_turf(src))
|
||||
if("rapid")
|
||||
new /mob/living/simple_animal/hostile/hivebot/rapid(get_turf(src))
|
||||
spawn(100)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
|
||||
smoke.set_up(5, 0, src.loc)
|
||||
smoke.start()
|
||||
visible_message("<span class='boldannounce'>The [src] warps in!</span>")
|
||||
playsound(src.loc, 'sound/effects/EMPulse.ogg', 25, 1)
|
||||
|
||||
warpbots()
|
||||
icon_state = "def_radar"
|
||||
visible_message("<span class='danger'>The [src] turns on!</span>")
|
||||
while(bot_amt > 0)
|
||||
bot_amt--
|
||||
switch(bot_type)
|
||||
if("norm")
|
||||
new /mob/living/simple_animal/hostile/hivebot(get_turf(src))
|
||||
if("range")
|
||||
new /mob/living/simple_animal/hostile/hivebot/range(get_turf(src))
|
||||
if("rapid")
|
||||
new /mob/living/simple_animal/hostile/hivebot/rapid(get_turf(src))
|
||||
spawn(100)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
Life()
|
||||
..()
|
||||
if(stat == 0)
|
||||
if(prob(2))//Might be a bit low, will mess with it likely
|
||||
warpbots()
|
||||
/mob/living/simple_animal/hostile/hivebot/tele/Life()
|
||||
..()
|
||||
if(stat == 0)
|
||||
if(prob(2))//Might be a bit low, will mess with it likely
|
||||
warpbots()
|
||||
|
||||
|
||||
@@ -34,9 +34,10 @@
|
||||
if(.)
|
||||
emote("me", 1, "[Attackemote] [.].")
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/death(gibbed)
|
||||
..(gibbed)
|
||||
visible_message("<span class='danger'><b>[src]</b> stops moving!</span>")
|
||||
/mob/living/simple_animal/hostile/mimic/death()
|
||||
..(1)
|
||||
visible_message("<span class='danger'>[src] stops moving!</span>")
|
||||
ghostize()
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -100,13 +101,13 @@
|
||||
..()
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/death(gibbed)
|
||||
/mob/living/simple_animal/hostile/mimic/crate/death()
|
||||
|
||||
var/obj/structure/closet/crate/C = new(get_turf(src))
|
||||
// Put loot in crate
|
||||
for(var/obj/O in src)
|
||||
O.loc = C
|
||||
..(gibbed)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/AttackingTarget()
|
||||
. =..()
|
||||
@@ -139,11 +140,11 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
|
||||
for(var/mob/living/M in contents) //a fix for animated statues from the flesh to stone spell
|
||||
death()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/death(gibbed)
|
||||
/mob/living/simple_animal/hostile/mimic/copy/death()
|
||||
|
||||
for(var/atom/movable/M in src)
|
||||
M.loc = get_turf(src)
|
||||
..(gibbed)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/ListTargets()
|
||||
// Return a list of targets that isn't the creator
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
/mob/living/simple_animal/hostile/mushroom/Life()
|
||||
..()
|
||||
if(!stat)//Mushrooms slowly regenerate if conscious, for people who want to save them from being eaten
|
||||
health = min(health+2, maxHealth)
|
||||
adjustBruteLoss(-2)
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/New()//Makes every shroom a little unique
|
||||
melee_damage_lower += rand(3, 5)
|
||||
@@ -78,7 +78,7 @@
|
||||
if(level_gain < 1)//So we still gain a level if two mushrooms were the same level
|
||||
level_gain = 1
|
||||
M.LevelUp(level_gain)
|
||||
M.health = M.maxHealth
|
||||
M.adjustBruteLoss(-M.maxHealth)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
@@ -88,7 +88,8 @@
|
||||
UpdateMushroomCap()
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/death(gibbed)
|
||||
visible_message("<span class='notice'>[src] fainted.</span>")
|
||||
if(!gibbed)
|
||||
visible_message("<span class='notice'>[src] fainted.</span>")
|
||||
..(gibbed)
|
||||
UpdateMushroomCap()
|
||||
|
||||
@@ -101,9 +102,8 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/proc/Recover()
|
||||
visible_message("<span class='notice'>[src] slowly begins to recover.</span>")
|
||||
health = 5
|
||||
faint_ticker = 0
|
||||
icon_state = icon_living
|
||||
revive()
|
||||
UpdateMushroomCap()
|
||||
recovery_cooldown = 1
|
||||
spawn(300)
|
||||
@@ -117,7 +117,7 @@
|
||||
else
|
||||
melee_damage_upper += (level_gain * rand(1,5))
|
||||
maxHealth += (level_gain * rand(1,5))
|
||||
health = maxHealth //They'll always heal, even if they don't gain a level, in case you want to keep this shroom around instead of harvesting it
|
||||
adjustBruteLoss(-maxHealth) //They'll always heal, even if they don't gain a level, in case you want to keep this shroom around instead of harvesting it
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/proc/Bruise()
|
||||
if(!bruised && !stat)
|
||||
|
||||
@@ -42,11 +42,13 @@
|
||||
weapon1 = /obj/item/weapon/gun/energy/laser
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/pirate/death(gibbed)
|
||||
..(gibbed)
|
||||
/mob/living/simple_animal/hostile/pirate/death()
|
||||
..(1)
|
||||
visible_message("<span class='notice'>[src] stops moving.</span>")
|
||||
if(corpse)
|
||||
new corpse (src.loc)
|
||||
if(weapon1)
|
||||
new weapon1 (src.loc)
|
||||
ghostize()
|
||||
qdel(src)
|
||||
return
|
||||
@@ -45,10 +45,12 @@
|
||||
casingtype = /obj/item/ammo_casing/a762
|
||||
|
||||
/mob/living/simple_animal/hostile/russian/death(gibbed)
|
||||
..(gibbed)
|
||||
..(1)
|
||||
visible_message("<span class='notice'>[src] stops moving.</span>")
|
||||
if(corpse)
|
||||
new corpse (src.loc)
|
||||
if(weapon1)
|
||||
new weapon1 (src.loc)
|
||||
ghostize()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
minbodytemp = 0
|
||||
|
||||
faction = list("hostile")
|
||||
var/drop_type = /obj/item/stack/sheet/mineral/wood
|
||||
|
||||
/mob/living/simple_animal/hostile/tree/FindTarget()
|
||||
. = ..()
|
||||
@@ -44,9 +45,10 @@
|
||||
L.visible_message("<span class='danger'>\The [src] knocks down \the [L]!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/tree/death(gibbed)
|
||||
..(gibbed)
|
||||
visible_message("<span class='danger'><b>[src]</b> is hacked into pieces!</span>")
|
||||
new /obj/item/stack/sheet/mineral/wood(loc)
|
||||
..(1)
|
||||
visible_message("<span class='danger'>[src] is hacked into pieces!</span>")
|
||||
new drop_type(loc)
|
||||
ghostize()
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/tree/festivus
|
||||
@@ -56,9 +58,5 @@
|
||||
icon_living = "festivus_pole"
|
||||
icon_dead = "festivus_pole"
|
||||
icon_gib = "festivus_pole"
|
||||
drop_type = /obj/item/stack/rods
|
||||
|
||||
/mob/living/simple_animal/hostile/tree/festivus/death(gibbed)
|
||||
..(gibbed)
|
||||
visible_message("<span class='danger'><b>[src]</b> is hacked into pieces!</span>")
|
||||
new /obj/item/stack/rods(loc)
|
||||
qdel(src)
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "shade"
|
||||
icon_living = "shade"
|
||||
icon_dead = "shade_dead"
|
||||
maxHealth = 50
|
||||
health = 50
|
||||
speak_emote = list("hisses")
|
||||
@@ -27,6 +26,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/shade/death()
|
||||
..(1)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
visible_message("<span class='warning'>[src] lets out a contented sigh as their form unwinds.</span>")
|
||||
ghostize()
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
var/maxbodytemp = 350
|
||||
|
||||
//Atmos effect - Yes, you can make creatures that require plasma or co2 to survive. N2O is a trace gas and handled separately, hence why it isn't here. It'd be hard to add it. Hard and me don't mix (Yes, yes make all the dick jokes you want with that.) - Errorage
|
||||
var/list/atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) //Leaving something at 0 means it's off - has no maximum
|
||||
var/list/atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) //Leaving something at 0 means it's off - has no maximum
|
||||
var/unsuitable_atmos_damage = 2 //This damage is taken when atmos doesn't fit all the requirements above
|
||||
|
||||
//LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly
|
||||
@@ -71,10 +71,7 @@
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/updatehealth()
|
||||
if(health > maxHealth)
|
||||
health = maxHealth
|
||||
..()
|
||||
return
|
||||
health = max(maxHealth - getBruteLoss(), 0)
|
||||
|
||||
/mob/living/simple_animal/Life()
|
||||
if(..())
|
||||
@@ -85,7 +82,7 @@
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/handle_regular_status_updates()
|
||||
if(..())
|
||||
if(..()) //alive
|
||||
if(health < 1)
|
||||
death()
|
||||
|
||||
@@ -269,7 +266,7 @@
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[M] [response_harm] [src]!</span>")
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
adjustBruteLoss(harm_intent_damage)
|
||||
attack_threshold_check(harm_intent_damage)
|
||||
add_logs(M, src, "attacked", admin=0)
|
||||
updatehealth()
|
||||
return 1
|
||||
@@ -313,9 +310,9 @@
|
||||
|
||||
/mob/living/simple_animal/attack_slime(mob/living/simple_animal/slime/M as mob)
|
||||
if(..()) //successful slime attack
|
||||
var/damage = rand(5, 30)
|
||||
var/damage = rand(15, 25)
|
||||
if(M.is_adult)
|
||||
damage = rand(10, 40)
|
||||
damage = rand(20, 35)
|
||||
attack_threshold_check(damage)
|
||||
return 1
|
||||
|
||||
@@ -381,6 +378,7 @@
|
||||
health = 0
|
||||
icon_state = icon_dead
|
||||
stat = DEAD
|
||||
density = 0
|
||||
lying = 1
|
||||
if(!gibbed)
|
||||
visible_message("<span class='danger'>\the [src] stops moving...</span>")
|
||||
@@ -425,6 +423,10 @@
|
||||
|
||||
/mob/living/simple_animal/revive()
|
||||
health = maxHealth
|
||||
icon_state = icon_living
|
||||
lying = 0
|
||||
density = 1
|
||||
update_canmove()
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/proc/make_babies() // <3 <3 <3
|
||||
|
||||
@@ -101,7 +101,6 @@
|
||||
|
||||
/mob/living/simple_animal/slime/handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
adjustToxLoss(rand(10,20))
|
||||
return
|
||||
|
||||
//var/environment_heat_capacity = environment.heat_capacity()
|
||||
@@ -120,9 +119,9 @@
|
||||
|
||||
if(bodytemperature <= (T0C - 50)) // hurt temperature
|
||||
if(bodytemperature <= 50) // sqrting negative numbers is bad
|
||||
adjustToxLoss(200)
|
||||
adjustBruteLoss(200)
|
||||
else
|
||||
adjustToxLoss(round(sqrt(bodytemperature)) * 2)
|
||||
adjustBruteLoss(round(sqrt(bodytemperature)) * 2)
|
||||
|
||||
else
|
||||
Tempstun = 0
|
||||
@@ -165,10 +164,6 @@
|
||||
|
||||
if(..())
|
||||
if(prob(30))
|
||||
adjustOxyLoss(-1)
|
||||
adjustToxLoss(-1)
|
||||
adjustFireLoss(-1)
|
||||
adjustCloneLoss(-1)
|
||||
adjustBruteLoss(-1)
|
||||
|
||||
/mob/living/simple_animal/slime/proc/handle_nutrition()
|
||||
@@ -183,7 +178,7 @@
|
||||
if(nutrition <= 0)
|
||||
nutrition = 0
|
||||
if(prob(75))
|
||||
adjustToxLoss(rand(0,5))
|
||||
adjustBruteLoss(rand(0,5))
|
||||
|
||||
else if (nutrition >= get_grow_nutrition() && amount_grown < 10)
|
||||
nutrition -= 20
|
||||
@@ -203,7 +198,7 @@
|
||||
powerlevel++
|
||||
if(powerlevel > 10)
|
||||
powerlevel = 10
|
||||
adjustToxLoss(-10)
|
||||
adjustBruteLoss(-10)
|
||||
|
||||
|
||||
|
||||
@@ -327,13 +322,12 @@
|
||||
AIprocess()
|
||||
|
||||
/mob/living/simple_animal/slime/handle_automated_movement()
|
||||
return //slime random movement is currently handled in handle_target()
|
||||
return //slime random movement is currently handled in handle_targets()
|
||||
|
||||
/mob/living/simple_animal/slime/handle_automated_speech()
|
||||
return //slime random speech is currently handled in handle_speech()
|
||||
|
||||
/mob/living/simple_animal/slime/proc/handle_mood()
|
||||
//Mood starts here
|
||||
var/newmood = ""
|
||||
if (rabid || attacked)
|
||||
newmood = "angry"
|
||||
@@ -349,7 +343,8 @@
|
||||
newmood = pick("sad", ":3", "pout")
|
||||
|
||||
if ((mood == "sad" || mood == ":3" || mood == "pout") && !newmood)
|
||||
if (prob(75)) newmood = mood
|
||||
if(prob(75))
|
||||
newmood = mood
|
||||
|
||||
if (newmood != mood) // This is so we don't redraw them every time
|
||||
mood = newmood
|
||||
@@ -432,17 +427,17 @@
|
||||
emote(pick("bounce","sway","light","vibrate","jiggle"))
|
||||
else
|
||||
var/t = 10
|
||||
var/slimes_near = -1 // Don't count myself
|
||||
var/slimes_near = 0
|
||||
var/dead_slimes = 0
|
||||
var/friends_near = list()
|
||||
for (var/mob/living/carbon/M in view(7,src))
|
||||
if (isslime(M))
|
||||
for (var/mob/living/L in view(7,src))
|
||||
if(isslime(L) && L != src)
|
||||
++slimes_near
|
||||
if (M.stat == DEAD)
|
||||
if (L.stat == DEAD)
|
||||
++dead_slimes
|
||||
if (M in Friends)
|
||||
if (L in Friends)
|
||||
t += 20
|
||||
friends_near += M
|
||||
friends_near += L
|
||||
if (nutrition < get_hunger_nutrition()) t += 10
|
||||
if (nutrition < get_starve_nutrition()) t += 10
|
||||
if (prob(2) && prob(t))
|
||||
@@ -468,12 +463,12 @@
|
||||
phrases += "Purr..."
|
||||
if (attacked)
|
||||
phrases += "Grrr..."
|
||||
if (getToxLoss() > 30)
|
||||
if (bodytemperature < T0C)
|
||||
phrases += "Cold..."
|
||||
if (getToxLoss() > 60)
|
||||
if (bodytemperature < T0C - 30)
|
||||
phrases += "So... cold..."
|
||||
phrases += "Very... cold..."
|
||||
if (getToxLoss() > 90)
|
||||
if (bodytemperature < T0C - 50)
|
||||
phrases += "..."
|
||||
phrases += "C... c..."
|
||||
if (Victim)
|
||||
|
||||
@@ -1,6 +1,25 @@
|
||||
/mob/living/simple_animal/slime/verb/Feed()
|
||||
set category = "Slime"
|
||||
set desc = "This will let you feed on any valid creature in the surrounding area. This should also be used to halt the feeding process."
|
||||
|
||||
if(stat)
|
||||
return 0
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/C in view(1,src))
|
||||
if(C!=src && !isslime(C) && Adjacent(C))
|
||||
choices += C
|
||||
|
||||
var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices
|
||||
if(!M) return 0
|
||||
if(CanFeedon(M))
|
||||
Feedon(M)
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/slime/proc/CanFeedon(var/mob/living/M)
|
||||
if(!Adjacent(M))
|
||||
return 0
|
||||
|
||||
if(Victim)
|
||||
Feedstop()
|
||||
return 0
|
||||
@@ -13,64 +32,35 @@
|
||||
src << "<i>I must be conscious to do this...</i>"
|
||||
return 0
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/C in view(1,src))
|
||||
if(C!=src && !istype(C,/mob/living/simple_animal/slime) && Adjacent(C))
|
||||
choices += C
|
||||
if(M.stat == DEAD)
|
||||
src << "<i>This subject does not have a strong enough life energy...</i>"
|
||||
return 0
|
||||
|
||||
var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices
|
||||
if(!M) return 0
|
||||
if(Adjacent(M))
|
||||
|
||||
if(istype(M, /mob/living/carbon/brain))
|
||||
src << "<i>This subject does not have an edible life energy...</i>"
|
||||
for(var/mob/living/simple_animal/slime/met in view())
|
||||
if(met.Victim == M && met != src)
|
||||
src << "<i>The [met.name] is already feeding on this subject...</i>"
|
||||
return 0
|
||||
|
||||
if(istype(M, /mob/living/carbon) && (M.health < -70))
|
||||
src << "<i>This subject does not have a strong enough life energy...</i>"
|
||||
return 0
|
||||
|
||||
if(istype(M, /mob/living/simple_animal) && (M.health < 1))//animals don't go into crit, stupid; fixes infinite energy exploit
|
||||
src << "<i>This subject does not have a strong enough life energy...</i>"
|
||||
return 0
|
||||
|
||||
for(var/mob/living/simple_animal/slime/met in view())
|
||||
if(met.Victim == M && met != src)
|
||||
src << "<i>The [met.name] is already feeding on this subject...</i>"
|
||||
return 0
|
||||
|
||||
src << "<span class='notice'><i>I have latched onto the subject and begun feeding...</i></span>"
|
||||
M << "<span class='userdanger'>The [src.name] has latched onto your head!</span>"
|
||||
|
||||
Feedon(M)
|
||||
return 1
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/slime/proc/Feedon(var/mob/living/M)
|
||||
|
||||
src << "<span class='notice'><i>I have latched onto the subject and begun feeding...</i></span>"
|
||||
M << "<span class='userdanger'>The [name] has latched onto [M.name]!</span>"
|
||||
|
||||
Victim = M
|
||||
src.loc = M.loc
|
||||
canmove = 0
|
||||
anchored = 1
|
||||
var/lastnut = nutrition
|
||||
var/fed_succesfully = 0
|
||||
var/health_minimum = -70
|
||||
|
||||
if(is_adult)
|
||||
icon_state = "[colour] adult slime eat"
|
||||
else
|
||||
icon_state = "[colour] baby slime eat"
|
||||
|
||||
|
||||
if(istype(Victim, /mob/living/simple_animal))
|
||||
health_minimum = 0
|
||||
|
||||
while(Victim && Victim.health > health_minimum && stat != 2)
|
||||
while(Victim && Victim == M && Victim.stat != DEAD && stat != DEAD)
|
||||
canmove = 0
|
||||
|
||||
if(Adjacent(Victim))
|
||||
loc = M.loc
|
||||
|
||||
if(istype(Victim, /mob/living/carbon))
|
||||
if(iscarbon(Victim))
|
||||
Victim.adjustCloneLoss(rand(5,6))
|
||||
Victim.adjustToxLoss(rand(1,2))
|
||||
if(Victim.health <= 0)
|
||||
@@ -87,12 +77,12 @@
|
||||
|
||||
fed_succesfully = 1
|
||||
|
||||
else if(health_minimum == 0) //we already know it's a simple_animal from above
|
||||
else if(isanimal(Victim)) //we already know it's a simple_animal from above
|
||||
Victim.adjustBruteLoss(is_adult ? rand(7, 15) : rand(4, 12))
|
||||
fed_succesfully = 1
|
||||
|
||||
else
|
||||
src << "<span class='warning'>[pick("This subject is incompatable", \
|
||||
src << "<span class='warning'>[pick("This subject is incompatible", \
|
||||
"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>"
|
||||
@@ -101,10 +91,7 @@
|
||||
add_nutrition(rand(15,30), lastnut)
|
||||
|
||||
//Heal yourself.
|
||||
adjustOxyLoss(-10)
|
||||
adjustBruteLoss(-10)
|
||||
adjustFireLoss(-10)
|
||||
adjustCloneLoss(-10)
|
||||
|
||||
updatehealth()
|
||||
if(Victim)
|
||||
@@ -115,53 +102,36 @@
|
||||
else
|
||||
break
|
||||
|
||||
if(stat == 2) //why the fuck are you doing icon updating here
|
||||
if(!is_adult)
|
||||
icon_state = "[colour] baby slime dead"
|
||||
|
||||
else
|
||||
if(is_adult)
|
||||
icon_state = "[colour] adult slime"
|
||||
else
|
||||
icon_state = "[colour] baby slime"
|
||||
|
||||
canmove = 1
|
||||
anchored = 0
|
||||
|
||||
if(M)
|
||||
if(M.health < health_minimum)
|
||||
M.canmove = 0
|
||||
if(!client)
|
||||
if(Victim && !rabid && !attacked)
|
||||
if(Victim.LAssailant && Victim.LAssailant != Victim)
|
||||
if(prob(50))
|
||||
if(!(Victim.LAssailant in Friends))
|
||||
Friends[Victim.LAssailant] = 1
|
||||
//Friends.Add(Victim.LAssailant) // no idea why i was using the |= operator
|
||||
else
|
||||
++Friends[Victim.LAssailant]
|
||||
|
||||
if(M && M.stat == DEAD)
|
||||
if(!client)
|
||||
if(Victim && !rabid && !attacked)
|
||||
if(Victim.LAssailant && Victim.LAssailant != Victim)
|
||||
if(prob(50))
|
||||
if(!(Victim.LAssailant in Friends))
|
||||
Friends[Victim.LAssailant] = 1
|
||||
else
|
||||
++Friends[Victim.LAssailant]
|
||||
|
||||
if(M.client && istype(src, /mob/living/carbon/human))
|
||||
if(prob(85))
|
||||
rabid = 1 // UUUNNBGHHHH GONNA EAT JUUUUUU
|
||||
if(M.client && ishuman(M))
|
||||
if(prob(85))
|
||||
rabid = 1 // UUUNNBGHHHH GONNA EAT JUUUUUU
|
||||
|
||||
if(client)
|
||||
src << "<i>This subject does not have a strong enough life energy anymore...</i>"
|
||||
else
|
||||
M.canmove = 1
|
||||
|
||||
if(client)
|
||||
src << "<i>I have stopped feeding...</i>"
|
||||
else
|
||||
if(client)
|
||||
src << "<i>I have stopped feeding...</i>"
|
||||
src << "<i>This subject does not have a strong enough life energy anymore...</i>"
|
||||
|
||||
else if(client)
|
||||
src << "<i>I have stopped feeding...</i>"
|
||||
|
||||
Victim = null
|
||||
|
||||
/mob/living/simple_animal/slime/proc/Feedstop()
|
||||
if(Victim)
|
||||
if(Victim.client) Victim << "[src] has let go of your head!"
|
||||
if(Victim.client)
|
||||
Victim << "[src] has let go of your head!"
|
||||
Victim = null
|
||||
|
||||
/mob/living/simple_animal/slime/proc/UpdateFeed(var/mob/M)
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
layer = 5
|
||||
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
|
||||
maxHealth = 150
|
||||
health = 150
|
||||
gender = NEUTER
|
||||
@@ -84,11 +86,15 @@
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/slime/regenerate_icons()
|
||||
icon_state = "[colour] [is_adult ? "adult" : "baby"] slime"
|
||||
icon_dead = "[icon_state] dead"
|
||||
overlays.len = 0
|
||||
if(mood)
|
||||
overlays += image('icons/mob/slimes.dmi', icon_state = "aslime-[mood]")
|
||||
var/icon_text = "[colour] [is_adult ? "adult" : "baby"] slime"
|
||||
icon_dead = "[icon_text] dead"
|
||||
if(stat != DEAD)
|
||||
icon_state = icon_text
|
||||
if(mood)
|
||||
overlays += image('icons/mob/slimes.dmi', icon_state = "aslime-[mood]")
|
||||
else
|
||||
icon_state = icon_dead
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/slime/movement_delay()
|
||||
@@ -158,29 +164,25 @@
|
||||
|
||||
stat(null,"Power Level: [powerlevel]")
|
||||
|
||||
/mob/living/simple_animal/slime/adjustFireLoss(amount)
|
||||
..(-abs(amount)) // Heals them
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/slime/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj)
|
||||
return
|
||||
attacked += 10
|
||||
..(Proj)
|
||||
if((Proj.damage_type == BURN))
|
||||
adjustBruteLoss(-abs(Proj.damage)) //fire projectiles heals slimes.
|
||||
Proj.on_hit(src, 0)
|
||||
else
|
||||
..(Proj)
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/slime/emp_act(severity)
|
||||
powerlevel = 0 // oh no, the power!
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/slime/ex_act(severity, target)
|
||||
if (severity == 2.0)
|
||||
adjustFireLoss(60)
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/slime/MouseDrop(var/atom/movable/A as mob|obj)
|
||||
if(isliving(A) && A != src && usr == src)
|
||||
if(isliving(A) && A != src)
|
||||
var/mob/living/Food = A
|
||||
if(Food.Adjacent(src) && !stat && Food.stat != DEAD) //messy
|
||||
if(CanFeedon(Food))
|
||||
Feedon(Food)
|
||||
..()
|
||||
|
||||
@@ -195,16 +197,18 @@
|
||||
|
||||
/mob/living/simple_animal/slime/attack_slime(mob/living/simple_animal/slime/M as mob)
|
||||
if(..()) //successful slime attack
|
||||
if(M == src)
|
||||
return
|
||||
if(Victim)
|
||||
Victim = null
|
||||
visible_message("<span class='danger'>[M] pulls [src] off!</span>")
|
||||
return
|
||||
attacked += 5
|
||||
if(nutrition >= 100) //steal some nutrition. negval handled in life()
|
||||
nutrition -= (50 + (5 * M.amount_grown))
|
||||
M.add_nutrition(50 + (5 * M.amount_grown))
|
||||
nutrition -= (50 + (40 * M.is_adult))
|
||||
M.add_nutrition(50 + (40 * M.is_adult))
|
||||
if(health > 0)
|
||||
M.adjustBruteLoss(-4 + (-2 * M.amount_grown))
|
||||
M.adjustBruteLoss(-10 + (-10 * M.is_adult))
|
||||
M.updatehealth()
|
||||
|
||||
/mob/living/simple_animal/slime/attack_animal(mob/living/simple_animal/M as mob)
|
||||
@@ -222,7 +226,7 @@
|
||||
|
||||
/mob/living/simple_animal/slime/attack_hulk(mob/living/carbon/human/user)
|
||||
if(user.a_intent == "harm")
|
||||
adjustBruteLoss(5)
|
||||
adjustBruteLoss(10)
|
||||
discipline_slime(user)
|
||||
|
||||
|
||||
@@ -301,7 +305,7 @@
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/slime/proc/apply_water()
|
||||
adjustToxLoss(rand(15,20))
|
||||
adjustBruteLoss(rand(15,20))
|
||||
if(!client)
|
||||
if(Target) // Like cats
|
||||
Target = null
|
||||
@@ -376,4 +380,3 @@
|
||||
|
||||
/mob/living/simple_animal/slime/pet
|
||||
docile = 1
|
||||
|
||||
|
||||
@@ -100,15 +100,15 @@ datum/reagent/consumable/capsaicin/on_mob_life(var/mob/living/M as mob)
|
||||
M.bodytemperature += 5 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(holder.has_reagent("cryostylane"))
|
||||
holder.remove_reagent("cryostylane", 5)
|
||||
if(istype(M, /mob/living/simple_animal/slime))
|
||||
if(isslime(M))
|
||||
M.bodytemperature += rand(5,20)
|
||||
if(15 to 25)
|
||||
M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(istype(M, /mob/living/simple_animal/slime))
|
||||
if(isslime(M))
|
||||
M.bodytemperature += rand(10,20)
|
||||
if(25 to INFINITY)
|
||||
M.bodytemperature += 15 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(istype(M, /mob/living/simple_animal/slime))
|
||||
if(isslime(M))
|
||||
M.bodytemperature += rand(15,20)
|
||||
..()
|
||||
return
|
||||
@@ -125,17 +125,17 @@ datum/reagent/consumable/frostoil/on_mob_life(var/mob/living/M as mob)
|
||||
M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(holder.has_reagent("capsaicin"))
|
||||
holder.remove_reagent("capsaicin", 5)
|
||||
if(istype(M, /mob/living/simple_animal/slime))
|
||||
if(isslime(M))
|
||||
M.bodytemperature -= rand(5,20)
|
||||
if(15 to 25)
|
||||
M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(istype(M, /mob/living/simple_animal/slime))
|
||||
if(isslime(M))
|
||||
M.bodytemperature -= rand(10,20)
|
||||
if(25 to INFINITY)
|
||||
M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(prob(1))
|
||||
M.emote("shiver")
|
||||
if(istype(M, /mob/living/simple_animal/slime))
|
||||
if(isslime(M))
|
||||
M.bodytemperature -= rand(15,20)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
icon_state = "bottle16"
|
||||
|
||||
/obj/item/weapon/slimesteroid/attack(mob/living/simple_animal/slime/M as mob, mob/user as mob)
|
||||
if(!istype(M, /mob/living/simple_animal/slime))//If target is not a slime.
|
||||
if(!isslime(M))//If target is not a slime.
|
||||
user << "<span class='warning'> The steroid only works on baby slimes!</span>"
|
||||
return ..()
|
||||
if(M.is_adult) //Can't tame adults
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
author: phil235
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- tweak: "All slimes are now simple animals instead of carbon life forms."
|
||||
- rscdel: "Remove crit status from brain and slimes."
|
||||
- rscadd: "Simple animal aliens can now see in the dark like regular aliens."
|
||||
Reference in New Issue
Block a user