diff --git a/code/__DEFINES/bots.dm b/code/__DEFINES/bots.dm index 339d272b57e..1fad6d6cd4b 100644 --- a/code/__DEFINES/bots.dm +++ b/code/__DEFINES/bots.dm @@ -36,4 +36,5 @@ #define SENTIENCE_ORGANIC 1 #define SENTIENCE_ARTIFICIAL 2 #define SENTIENCE_OTHER 3 -#define SENTIENCE_MINEBOT 4 \ No newline at end of file +#define SENTIENCE_MINEBOT 4 +#define SENTIENCE_BOSS 5 \ No newline at end of file diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index d60748f8dae..76cdf0f4546 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -36,6 +36,7 @@ melee_damage_upper = 4 attacktext = "hits" attack_sound = 'sound/weapons/genhit1.ogg' + del_on_death = 1 speak_emote = list("pulses") var/obj/effect/blob/factory/factory = null var/list/human_overlays = list() @@ -90,9 +91,7 @@ H.loc = src loc.visible_message("The corpse of [H.name] suddenly rises!") -/mob/living/simple_animal/hostile/blob/blobspore/death() - ..() - +/mob/living/simple_animal/hostile/blob/blobspore/death(gibbed) // On death, create a small smoke of harmful gas (s-Acid) var/datum/effect/system/chem_smoke_spread/S = new var/turf/location = get_turf(src) @@ -109,8 +108,7 @@ S.attach(location) S.set_up(reagents, 1, 1, location, 15, 1) // only 1-2 smoke cloud S.start() - - qdel(src) + ..() /mob/living/simple_animal/hostile/blob/blobspore/Destroy() if(factory) @@ -169,6 +167,6 @@ /mob/living/simple_animal/hostile/blob/blobbernaut/blob_act() return -/mob/living/simple_animal/hostile/blob/blobbernaut/death() +/mob/living/simple_animal/hostile/blob/blobbernaut/death(gibbed) ..() flick("blobbernaut_death", src) diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index 5cfe1324849..d5541f70e0d 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm @@ -69,6 +69,7 @@ AIStatus = AI_OFF var/resources = 0 //Resource points, generated by consuming metal/glass loot = list(/obj/effect/decal/cleanable/blood/gibs/robot, /obj/item/weapon/ore/bluespace_crystal/artificial) + del_on_death = 1 /mob/living/simple_animal/hostile/swarmer/Login() ..() @@ -90,11 +91,6 @@ if(statpanel("Status")) stat("Resources:",resources) -/mob/living/simple_animal/hostile/swarmer/death() - ..() - ghostize() - qdel(src) - /mob/living/simple_animal/hostile/swarmer/emp_act() if(health > 1) adjustHealth(health-1) diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index 0db9c5309ad..6de3308f75e 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -70,7 +70,7 @@ visible_message("The [src] jumps back to its user.") Recall() -/mob/living/simple_animal/hostile/guardian/death() +/mob/living/simple_animal/hostile/guardian/death(gibbed) ..() to_chat(summoner, "Your [name] died somehow!") summoner.death() diff --git a/code/game/gamemodes/miniantags/slaughter/slaughter.dm b/code/game/gamemodes/miniantags/slaughter/slaughter.dm index 2f293b86825..6269d2e65d6 100644 --- a/code/game/gamemodes/miniantags/slaughter/slaughter.dm +++ b/code/game/gamemodes/miniantags/slaughter/slaughter.dm @@ -19,7 +19,7 @@ status_flags = CANPUSH attack_sound = 'sound/misc/demon_attack1.ogg' var/feast_sound = 'sound/misc/Demon_consume.ogg' - var/death_sound = 'sound/misc/demon_dies.ogg' + death_sound = 'sound/misc/demon_dies.ogg' 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) minbodytemp = 0 maxbodytemp = INFINITY @@ -49,7 +49,8 @@ You may Ctrl+Click on blood pools to travel through them, appearing and dissaapearing from the station at will. \ Pulling a dead or critical mob while you enter a pool will pull them in with you, allowing you to feast. \ You move quickly upon leaving a pool of blood, but the material world will soon sap your strength and leave you sluggish. " - var/deathmessage = "screams in anger as it collapses into a puddle of viscera!" + del_on_death = 1 + deathmessage = "screams in anger as it collapses into a puddle of viscera!" /mob/living/simple_animal/slaughter/New() @@ -89,15 +90,10 @@ name = "pile of viscera" desc = "A repulsive pile of guts and gore." -/mob/living/simple_animal/slaughter/death() - ..() - playsound(get_turf(src), death_sound, 200, 1) - visible_message("[src] [deathmessage].") +/mob/living/simple_animal/slaughter/death(gibbed) for(var/mob/living/M in consumed_mobs) M.forceMove(get_turf(src)) - ghostize() - qdel(src) - + ..() /mob/living/simple_animal/slaughter/phasein() @@ -205,7 +201,7 @@ deathmessage = "fades out, as all of its friends are released from its prison of hugs." loot = list(/mob/living/simple_animal/pet/cat/kitten{name = "Laughter"}) -/mob/living/simple_animal/slaughter/laughter/death() +/mob/living/simple_animal/slaughter/laughter/death(gibbed) for(var/mob/living/M in consumed_mobs) if(M.revive()) M.grab_ghost(force = TRUE) diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 4bcd234b9c0..1d5b4da0e83 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -21,6 +21,8 @@ universal_speak = 1 var/list/construct_spells = list() loot = list(/obj/item/weapon/reagent_containers/food/snacks/ectoplasm) + del_on_death = 1 + deathmessage = "collapses in a shattered heap." /mob/living/simple_animal/construct/New() ..() @@ -30,15 +32,6 @@ AddSpell(new spell(null)) updateglow() -/mob/living/simple_animal/construct/death() - ..() - for(var/mob/M in viewers(src, null)) - if((M.client && !( M.blinded ))) - M.show_message("\red [src] collapses in a shattered heap. ") - ghostize() - qdel(src) - return - /mob/living/simple_animal/construct/examine(mob/user) to_chat(user, "*---------*") ..(user) diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index e0196fbcec2..5f078682947 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -38,7 +38,7 @@ . = ..() regenerate_icons() -/mob/living/simple_animal/pet/corgi/death() +/mob/living/simple_animal/pet/corgi/death(gibbed) ..() regenerate_icons() @@ -612,6 +612,8 @@ 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) minbodytemp = 0 loot = list(/obj/effect/decal/cleanable/blood/gibs/robot) + del_on_death = 1 + deathmessage = "blows apart!" /mob/living/simple_animal/pet/corgi/Ian/borgi/emag_act(user as mob) if(!emagged) @@ -656,12 +658,8 @@ s.set_up(3, 1, src) s.start() -/mob/living/simple_animal/pet/corgi/Ian/borgi/death() - ..() - visible_message("[src] blows apart!") +/mob/living/simple_animal/pet/corgi/Ian/borgi/death(gibbed) var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread s.set_up(3, 1, src) s.start() - respawnable_list += src - qdel(src) - return + ..() diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index 06fb36b5787..7dd9a50c828 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -241,7 +241,7 @@ var/global/chicken_count = 0 pixel_y = rand(0, 10) chicken_count += 1 -/mob/living/simple_animal/chicken/death() +/mob/living/simple_animal/chicken/death(gibbed) ..() chicken_count -= 1 diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index dee6489b9cb..4d499e9f54f 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -116,7 +116,7 @@ M << 'sound/effects/mousesqueek.ogg' ..() -/mob/living/simple_animal/mouse/death() +/mob/living/simple_animal/mouse/death(gibbed) layer = MOB_LAYER if(client) client.time_died_as_mouse = world.time diff --git a/code/modules/mob/living/simple_animal/friendly/pet.dm b/code/modules/mob/living/simple_animal/friendly/pet.dm index eba412580db..30f55a2220f 100644 --- a/code/modules/mob/living/simple_animal/friendly/pet.dm +++ b/code/modules/mob/living/simple_animal/friendly/pet.dm @@ -17,7 +17,7 @@ ..() regenerate_icons() -/mob/living/simple_animal/pet/death() +/mob/living/simple_animal/pet/death(gibbed) ..() regenerate_icons() diff --git a/code/modules/mob/living/simple_animal/friendly/slime.dm b/code/modules/mob/living/simple_animal/friendly/slime.dm index 6bbadd7e8d5..a76fe47cdba 100644 --- a/code/modules/mob/living/simple_animal/friendly/slime.dm +++ b/code/modules/mob/living/simple_animal/friendly/slime.dm @@ -64,21 +64,18 @@ response_harm = "stomps on" emote_see = list("jiggles", "bounces in place") var/colour = "grey" + del_on_death = 1 /mob/living/simple_animal/adultslime/New() ..() overlays += "aslime-:33" -/mob/living/simple_animal/slime/adult/death() - var/mob/living/simple_animal/slime/S1 = new /mob/living/simple_animal/slime (src.loc) - S1.icon_state = "[src.colour] baby slime" - S1.icon_living = "[src.colour] baby slime" - S1.icon_dead = "[src.colour] baby slime dead" - S1.colour = "[src.colour]" - var/mob/living/simple_animal/slime/S2 = new /mob/living/simple_animal/slime (src.loc) - S2.icon_state = "[src.colour] baby slime" - S2.icon_living = "[src.colour] baby slime" - S2.icon_dead = "[src.colour] baby slime dead" - S2.colour = "[src.colour]" - qdel(src) \ No newline at end of file +/mob/living/simple_animal/slime/adult/death(gibbed) + for(var/i in 1 to 2) + var/mob/living/simple_animal/slime/S = new /mob/living/simple_animal/slime (src.loc) + S.icon_state = "[colour] baby slime" + S.icon_living = "[colour] baby slime" + S.icon_dead = "[colour] baby slime dead" + S.colour = "[colour]" + ..() \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index 4ddfa827dc3..b453cfa5ea2 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -40,6 +40,8 @@ speak_emote = list("beeps","clicks","chirps") can_hide = 1 ventcrawler = 2 + loot = list(/obj/effect/decal/cleanable/blood/gibs/robot) + del_on_death = 1 /mob/living/simple_animal/spiderbot/attackby(var/obj/item/O as obj, var/mob/user as mob, params) @@ -205,20 +207,14 @@ ..() -/mob/living/simple_animal/spiderbot/death() - - living_mob_list -= src - dead_mob_list += src - +/mob/living/simple_animal/spiderbot/death(gibbed) if(camera) camera.status = 0 if(held_item) held_item.forceMove(src.loc) held_item = null - - robogibs(src.loc, viruses) - qdel(src) + ..() //Cannibalized from the parrot mob. ~Zuhayr diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 56f63ee99be..6cd1d147211 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -21,15 +21,16 @@ a_intent = I_HARM attack_sound = 'sound/weapons/bladeslice.ogg' 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) - var/dead = 0 unsuitable_atmos_damage = 15 + heat_damage_per_tick = 20 faction = list("alien") status_flags = CANPUSH minbodytemp = 0 see_in_dark = 8 see_invisible = SEE_INVISIBLE_MINIMUM - heat_damage_per_tick = 20 gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE + death_sound = 'sound/voice/hiss6.ogg' + deathmessage = "lets out a waning guttural screech, green blood bubbling from its maw..." /mob/living/simple_animal/hostile/alien/drone @@ -47,7 +48,6 @@ /mob/living/simple_animal/hostile/alien/drone/handle_automated_action() if(!..()) //AIStatus is off return - plant_cooldown-- if(AIStatus == AI_IDLE) if(!plants_off && prob(10) && plant_cooldown<=0) @@ -136,14 +136,6 @@ damage = 30 icon_state = "toxin" -/mob/living/simple_animal/hostile/alien/death() - ..() - if(dead == 0) - dead = 1 - visible_message("[src] lets out a waning guttural screech, green blood bubbling from its maw...") - playsound(src, 'sound/voice/hiss6.ogg', 100, 1) - - /mob/living/simple_animal/hostile/alien/maid name = "lusty xenomorph maid" melee_damage_lower = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index c24b0b6a844..4899eef3aaf 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -39,6 +39,7 @@ //Spaceborn beings don't get hurt by space 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) minbodytemp = 0 + del_on_death = 1 var/datum/reagent/beegent = null //hehe, beegent var/obj/structure/beebox/beehome = null @@ -61,8 +62,6 @@ /mob/living/simple_animal/hostile/poison/bees/death(gibbed) beegent = null ..() - ghostize() - qdel(src) /mob/living/simple_animal/hostile/poison/bees/examine(mob/user) ..() diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index ddd302c3e8c..b7fbbec41fb 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -55,12 +55,8 @@ icon_living = "holocarp" maxbodytemp = INFINITY gold_core_spawnable = CHEM_MOB_SPAWN_INVALID + del_on_death = 1 -/mob/living/simple_animal/hostile/carp/holocarp/death() - ..() - ghostize() - qdel(src) - return /mob/living/simple_animal/hostile/carp/megacarp icon = 'icons/mob/alienqueen.dmi' diff --git a/code/modules/mob/living/simple_animal/hostile/hivebot.dm b/code/modules/mob/living/simple_animal/hostile/hivebot.dm index 94cf8dae65c..b3ea7f442fa 100644 --- a/code/modules/mob/living/simple_animal/hostile/hivebot.dm +++ b/code/modules/mob/living/simple_animal/hostile/hivebot.dm @@ -24,6 +24,8 @@ speak_emote = list("states") gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE loot = list(/obj/effect/decal/cleanable/blood/gibs/robot) + deathmessage = "blows apart!" + del_on_death = 1 /mob/living/simple_animal/hostile/hivebot/range name = "Hivebot" @@ -45,15 +47,11 @@ maxHealth = 80 ranged = 1 -/mob/living/simple_animal/hostile/hivebot/death() - ..() - visible_message("[src] blows apart!") +/mob/living/simple_animal/hostile/hivebot/death(gibbed) var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread s.set_up(3, 1, src) s.start() - ghostize() - qdel(src) - return + ..() /mob/living/simple_animal/hostile/hivebot/tele//this still needs work name = "Beacon" diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index faf0cc0f9a3..a3739dfe088 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -219,7 +219,7 @@ //////////////END HOSTILE MOB TARGETTING AND AGGRESSION//////////// -/mob/living/simple_animal/hostile/death() +/mob/living/simple_animal/hostile/death(gibbed) LoseAggro() mouse_opacity = 1 ..() diff --git a/code/modules/mob/living/simple_animal/hostile/illusion.dm b/code/modules/mob/living/simple_animal/hostile/illusion.dm index c4a71cca618..a770f6b1c32 100644 --- a/code/modules/mob/living/simple_animal/hostile/illusion.dm +++ b/code/modules/mob/living/simple_animal/hostile/illusion.dm @@ -16,6 +16,8 @@ var/life_span = INFINITY //how long until they despawn var/mob/living/parent_mob var/multiply_chance = 0 //if we multiply on hit + deathmessage = "vanishes into thin air! It was a fake!" + del_on_death = 1 /mob/living/simple_animal/hostile/illusion/Life() @@ -23,12 +25,6 @@ if(world.time > life_span) death() -/mob/living/simple_animal/hostile/illusion/death(gibbed) - ..() - visible_message("\The [src] vanishes into thin air! It was a fake!") - ghostize() - qdel(src) - /mob/living/simple_animal/hostile/illusion/proc/Copy_Parent(mob/living/original, life = 50, health = 100, damage = 0, replicate = 0 ) appearance = original.appearance parent_mob = original diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index f14d1bf649a..c0616bc5eea 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -27,18 +27,13 @@ var/is_electronic = 0 gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE + del_on_death = 1 /mob/living/simple_animal/hostile/mimic/FindTarget() . = ..() if(.) custom_emote(1, "growls at [.]") -/mob/living/simple_animal/hostile/mimic/death() - ..() - visible_message("[src] stops moving!") - ghostize() - qdel(src) - /mob/living/simple_animal/hostile/mimic/emp_act(severity) if(is_electronic) switch(severity) @@ -100,7 +95,7 @@ ..() icon_state = initial(icon_state) -/mob/living/simple_animal/hostile/mimic/crate/death() +/mob/living/simple_animal/hostile/mimic/crate/death(gibbed) var/obj/structure/closet/crate/C = new(get_turf(src)) // Put loot in crate for(var/obj/O in src) @@ -135,7 +130,7 @@ 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() +/mob/living/simple_animal/hostile/mimic/copy/death(gibbed) for(var/atom/movable/M in src) M.loc = get_turf(src) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index 83e8b78164f..9433f4923af 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -194,7 +194,7 @@ visible_message("The [P.name] was repelled by [src.name]'s girth!") return -/mob/living/simple_animal/hostile/asteroid/goldgrub/death() +/mob/living/simple_animal/hostile/asteroid/goldgrub/death(gibbed) alerted = 0 Reward() ..() @@ -321,14 +321,12 @@ throw_message = "falls right through the strange body of the" environment_smash = 0 pass_flags = PASSTABLE + del_on_death = 1 /mob/living/simple_animal/hostile/asteroid/hivelordbrood/New() ..() spawn(100) - qdel(src) - -/mob/living/simple_animal/hostile/asteroid/hivelordbrood/death() - qdel(src) + death() /mob/living/simple_animal/hostile/asteroid/goliath name = "goliath" diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index e6dda5e301c..99e6f61431c 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -26,6 +26,7 @@ ventcrawler = 2 robust_searching = 1 speak_emote = list("squeaks") + deathmessage = "fainted" var/powerlevel = 0 //Tracks our general strength level gained from eating other shrooms var/bruised = 0 //If someone tries to cheat the system by attacking a shroom to lower its health, punish them so that it wont award levels to shrooms that eat it var/recovery_cooldown = 0 //So you can't repeatedly revive it during a fight @@ -88,8 +89,7 @@ icon_state = "mushroom_color" UpdateMushroomCap() -/mob/living/simple_animal/hostile/mushroom/death() - visible_message("[src] fainted.") +/mob/living/simple_animal/hostile/mushroom/death(gibbed) ..() UpdateMushroomCap() diff --git a/code/modules/mob/living/simple_animal/hostile/pirate.dm b/code/modules/mob/living/simple_animal/hostile/pirate.dm index 89835092ffd..d3fec4bf8d8 100644 --- a/code/modules/mob/living/simple_animal/hostile/pirate.dm +++ b/code/modules/mob/living/simple_animal/hostile/pirate.dm @@ -24,6 +24,7 @@ speak_emote = list("yarrs") loot = list(/obj/effect/landmark/mobcorpse/pirate, /obj/item/weapon/melee/energy/sword/pirate) + del_on_death = 1 faction = list("pirate") /mob/living/simple_animal/hostile/pirate/ranged @@ -38,11 +39,4 @@ minimum_distance = 5 projectiletype = /obj/item/projectile/beam loot = list(/obj/effect/landmark/mobcorpse/pirate/ranged, - /obj/item/weapon/gun/energy/laser) - - -/mob/living/simple_animal/hostile/pirate/death() - ..() - ghostize() - qdel(src) - return \ No newline at end of file + /obj/item/weapon/gun/energy/laser) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm index 9a64b5c4d3e..9f98b205fc9 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm @@ -40,6 +40,8 @@ var/has_loot = 1 faction = list("malf_drone") + deathmessage = "suddenly breaks apart." + del_on_death = 1 /mob/living/simple_animal/hostile/retaliate/malf_drone/New() ..() @@ -149,11 +151,6 @@ hostile_drone = 0 walk(src,0) -/mob/living/simple_animal/hostile/retaliate/malf_drone/death() - ..() - visible_message("\blue [bicon(src)] [src] suddenly breaks apart.") - qdel(src) - /mob/living/simple_animal/hostile/retaliate/malf_drone/Destroy() //Seriously, what the actual hell. //some random debris left behind if(has_loot) diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm index 210ff43ebda..66972b06d2e 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm @@ -46,6 +46,7 @@ faction = list("undead") // did I mention ghost loot = list(/obj/item/weapon/reagent_containers/food/snacks/ectoplasm) + del_on_death = 1 /mob/living/simple_animal/hostile/retaliate/ghost/Process_Spacemove(var/check_drift = 0) return 1 @@ -61,10 +62,6 @@ else invisibility = pick(0,60,60,invisibility) ..() -/mob/living/simple_animal/hostile/retaliate/ghost/death() - ..() - qdel(src) - return /mob/living/simple_animal/hostile/retaliate/skeleton name = "skeleton" @@ -92,11 +89,7 @@ faction = list("undead") loot = list(/obj/effect/decal/remains/human) - -/mob/living/simple_animal/hostile/retaliate/skeleton/death() - ..() - qdel(src) - return + del_on_death = 1 /mob/living/simple_animal/hostile/retaliate/zombie name = "zombie" @@ -124,8 +117,4 @@ faction = list("undead") loot = list(/obj/effect/decal/cleanable/blood/gibs) - -/mob/living/simple_animal/hostile/retaliate/zombie/death() - ..() - qdel(src) - return \ No newline at end of file + del_on_death = 1 \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/russian.dm b/code/modules/mob/living/simple_animal/hostile/russian.dm index 0126dd5c704..30bdb8c95e2 100644 --- a/code/modules/mob/living/simple_animal/hostile/russian.dm +++ b/code/modules/mob/living/simple_animal/hostile/russian.dm @@ -24,6 +24,7 @@ status_flags = CANPUSH loot = list(/obj/effect/landmark/mobcorpse/russian, /obj/item/weapon/kitchen/knife) + del_on_death = 1 /mob/living/simple_animal/hostile/russian/ranged @@ -39,8 +40,3 @@ loot = list(/obj/effect/landmark/mobcorpse/russian/ranged, /obj/item/weapon/gun/projectile/shotgun/boltaction) casingtype = /obj/item/ammo_casing/a762 - -/mob/living/simple_animal/hostile/russian/death() - ..() - qdel(src) - return diff --git a/code/modules/mob/living/simple_animal/hostile/spaceworms.dm b/code/modules/mob/living/simple_animal/hostile/spaceworms.dm index a186bbe3d09..c59cdf0570a 100644 --- a/code/modules/mob/living/simple_animal/hostile/spaceworms.dm +++ b/code/modules/mob/living/simple_animal/hostile/spaceworms.dm @@ -184,7 +184,7 @@ //Harder to kill the head, but it can kill off the whole worm -/mob/living/simple_animal/hostile/spaceWorm/wormHead/death() +/mob/living/simple_animal/hostile/spaceWorm/wormHead/death(gibbed) ..() if(prob(catastrophicDeathProb)) for(var/mob/living/simple_animal/hostile/spaceWorm/SW in totalWormSegments) @@ -294,7 +294,7 @@ qdel(src) -/mob/living/simple_animal/hostile/spaceWorm/death() +/mob/living/simple_animal/hostile/spaceWorm/death(gibbed) ..() if(myHead) myHead.totalWormSegments -= src diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index 72388af0037..d3f63450fe6 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -24,11 +24,7 @@ check_friendly_fire = 1 status_flags = CANPUSH loot = list(/obj/effect/landmark/mobcorpse/syndicatesoldier) - -/mob/living/simple_animal/hostile/syndicate/death() - ..() - qdel(src) - return + del_on_death = 1 ///////////////Sword and shield//////////// @@ -124,9 +120,5 @@ minbodytemp = 0 flying = 1 gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE - -/mob/living/simple_animal/hostile/viscerator/death() - ..() - visible_message("\red [src] is smashed into pieces!") - qdel(src) - return + del_on_death = 1 + deathmessage = "is smashed into pieces!" \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm index b47312b15df..9d22827a292 100644 --- a/code/modules/mob/living/simple_animal/hostile/tree.dm +++ b/code/modules/mob/living/simple_animal/hostile/tree.dm @@ -30,6 +30,8 @@ faction = list("hostile", "winter") loot = list(/obj/item/stack/sheet/wood) gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE + deathmessage = "is hacked into pieces!" + del_on_death = 1 /mob/living/simple_animal/hostile/tree/FindTarget() . = ..() @@ -42,9 +44,4 @@ if(istype(L)) if(prob(15)) L.Weaken(3) - L.visible_message("\the [src] knocks down \the [L]!") - -/mob/living/simple_animal/hostile/tree/death() - ..() - visible_message("\red [src] is hacked into pieces!") - qdel(src) \ No newline at end of file + L.visible_message("\the [src] knocks down \the [L]!") \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/winter_mobs.dm b/code/modules/mob/living/simple_animal/hostile/winter_mobs.dm index 12ede5955ea..6552999aef8 100644 --- a/code/modules/mob/living/simple_animal/hostile/winter_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/winter_mobs.dm @@ -33,14 +33,14 @@ gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE -/mob/living/simple_animal/hostile/winter/snowman/death() +/mob/living/simple_animal/hostile/winter/snowman/death(gibbed) if(prob(50)) //50% chance to drop weapon on death, if it has one to drop loot = list(/obj/item/weapon/melee/candy_sword) if(prob(20)) //chance to become a stationary snowman structure instead of a corpse loot.Add(/obj/structure/snowman) - visible_message("The [src.name] shimmers as its animating magic fades away!") + deathmessage = "shimmers as its animating magic fades away!" + del_on_death = 1 ..() //this is just to make sure it gets properly killed before we qdel it - qdel(src) else ..() @@ -73,7 +73,7 @@ icon_living = "santa" icon_dead = "santa-dead" -/mob/living/simple_animal/hostile/winter/santa/death() +/mob/living/simple_animal/hostile/winter/santa/death(gibbed) ..() if(death_message) visible_message(death_message) @@ -121,7 +121,7 @@ melee_damage_lower = 15 melee_damage_upper = 25 //that's gonna leave a mark, for sure -/mob/living/simple_animal/hostile/winter/santa/stage_4/death() +/mob/living/simple_animal/hostile/winter/santa/stage_4/death(gibbed) to_chat(world, "
") to_chat(world, "THE FAT MAN HAS FALLEN!") to_chat(world, "SANTA CLAUS HAS BEEN DEFEATED!") diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 983faec63d6..1266b31f746 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -112,7 +112,7 @@ hear_radio_list -= src return ..() -/mob/living/simple_animal/parrot/death() +/mob/living/simple_animal/parrot/death(gibbed) if(held_item) held_item.loc = src.loc held_item = null diff --git a/code/modules/mob/living/simple_animal/shade.dm b/code/modules/mob/living/simple_animal/shade.dm index 736b6c9b599..99a65c0052d 100644 --- a/code/modules/mob/living/simple_animal/shade.dm +++ b/code/modules/mob/living/simple_animal/shade.dm @@ -25,16 +25,10 @@ faction = list("cult") status_flags = CANPUSH loot = list(/obj/item/weapon/reagent_containers/food/snacks/ectoplasm) + del_on_death = 1 + deathmessage = "lets out a contented sigh as their form unwinds." - death() - ..() - for(var/mob/M in viewers(src, null)) - if((M.client && !( M.blinded ))) - M.show_message("\red [src] lets out a contented sigh as their form unwinds. ") - ghostize() - qdel(src) - attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri if(istype(O, /obj/item/device/soulstone)) O.transfer_soul("SHADE", src, user) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 3cb577bc614..d2dbd5f14f2 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -71,8 +71,14 @@ var/gold_core_spawnable = CHEM_MOB_SPAWN_INVALID //if CHEM_MOB_SPAWN_HOSTILE can be spawned by plasma with gold core, CHEM_MOB_SPAWN_FRIENDLY are 'friendlies' spawned with blood var/master_commander = null //holding var for determining who own/controls a sentient simple animal (for sentience potions). + + var/mob/living/simple_animal/hostile/spawner/nest + var/sentience_type = SENTIENCE_ORGANIC // Sentience type, for slime potions var/list/loot = list() //list of things spawned at mob's loc when it dies + var/del_on_death = 0 //causes mob to be deleted on death, useful for mobs that spawn lootable corpses + var/deathmessage = "" + var/death_sound = null //The sound played on death /mob/living/simple_animal/New() @@ -469,15 +475,28 @@ stat(null, "Health: [round((health / maxHealth) * 100)]%") /mob/living/simple_animal/death(gibbed) + if(nest) + nest.spawned_mobs -= src + nest = null if(loot.len) for(var/i in loot) new i(loc) - health = 0 - icon_state = icon_dead - stat = DEAD - density = 0 if(!gibbed) - visible_message("\The [src] stops moving...") + if(death_sound) + playsound(get_turf(src),death_sound, 200, 1) + if(deathmessage) + visible_message("\The [src] [deathmessage]") + else if(!del_on_death) + visible_message("\The [src] stops moving...") + if(del_on_death) + ghostize() + qdel(src) + else + health = 0 + icon_state = icon_dead + stat = DEAD + density = 0 + lying = 1 ..() /mob/living/simple_animal/ex_act(severity) diff --git a/code/modules/mob/living/simple_animal/spawner.dm b/code/modules/mob/living/simple_animal/spawner.dm new file mode 100644 index 00000000000..0cbf24cf6e2 --- /dev/null +++ b/code/modules/mob/living/simple_animal/spawner.dm @@ -0,0 +1,83 @@ +/mob/living/simple_animal/hostile/spawner + name = "monster nest" + icon = 'icons/mob/animal.dmi' + health = 100 + maxHealth = 100 + var/list/spawned_mobs = list() + var/max_mobs = 5 + var/spawn_delay = 0 + var/spawn_time = 300 //30 seconds default + var/mob_type = /mob/living/simple_animal/hostile/carp + var/spawn_text = "emerges from" + status_flags = 0 + anchored = 1 + AIStatus = AI_OFF + a_intent = "harm" + stop_automated_movement = 1 + wander = 0 + atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) + minbodytemp = 0 + maxbodytemp = 350 + layer = MOB_LAYER-0.1 + sentience_type = SENTIENCE_BOSS + + +/mob/living/simple_animal/hostile/spawner/Destroy() + for(var/mob/living/simple_animal/L in spawned_mobs) + if(L.nest == src) + L.nest = null + spawned_mobs = null + return ..() + +/mob/living/simple_animal/hostile/spawner/process_ai() + ..() + spawn_mob() + +/mob/living/simple_animal/hostile/spawner/proc/spawn_mob() + if(spawned_mobs.len >= max_mobs) + return 0 + if(spawn_delay > world.time) + return 0 + spawn_delay = world.time + spawn_time + var/mob/living/simple_animal/L = new mob_type(src.loc) + spawned_mobs += L + L.nest = src + L.faction = src.faction + visible_message("[L] [spawn_text] [src].") + +/mob/living/simple_animal/hostile/spawner/syndicate + name = "warp beacon" + icon = 'icons/obj/device.dmi' + icon_state = "syndbeacon" + spawn_text = "warps in from" + mob_type = /mob/living/simple_animal/hostile/syndicate/ranged + faction = list("syndicate") + +/mob/living/simple_animal/hostile/spawner/mining + name = "monster den" + desc = "A hole dug into the ground, harboring all kinds of monsters found within most caves or mining asteroids." + icon_state = "hole" + icon_living = "hole" + health = 200 + maxHealth = 200 + max_mobs = 3 + icon = 'icons/mob/nest.dmi' + spawn_text = "crawls out of" + mob_type = /mob/living/simple_animal/hostile/asteroid/goldgrub + 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) + faction = list("mining") + +/mob/living/simple_animal/hostile/spawner/mining/goliath + name = "goliath den" + desc = "A den housing a nest of goliaths, oh god why?" + mob_type = /mob/living/simple_animal/hostile/asteroid/goliath + +/mob/living/simple_animal/hostile/spawner/mining/hivelord + name = "hivelord den" + desc = "A den housing a nest of hivelords." + mob_type = /mob/living/simple_animal/hostile/asteroid/hivelord + +/mob/living/simple_animal/hostile/spawner/mining/basilisk + name = "basilisk den" + desc = "A den housing a nest of basilisks, bring a coat." + mob_type = /mob/living/simple_animal/hostile/asteroid/basilisk \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/tribbles.dm b/code/modules/mob/living/simple_animal/tribbles.dm index a6eb14fb25d..b21c3110b1d 100644 --- a/code/modules/mob/living/simple_animal/tribbles.dm +++ b/code/modules/mob/living/simple_animal/tribbles.dm @@ -79,7 +79,7 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles, src.procreate() -/mob/living/simple_animal/tribble/death() // Gotta make sure to remove tribbles from the list on death +/mob/living/simple_animal/tribble/death(gibbed) // Gotta make sure to remove tribbles from the list on death ..() totaltribbles -= 1 diff --git a/code/modules/mob/living/simple_animal/vox.dm b/code/modules/mob/living/simple_animal/vox.dm deleted file mode 100644 index ba68a18a12b..00000000000 --- a/code/modules/mob/living/simple_animal/vox.dm +++ /dev/null @@ -1,169 +0,0 @@ -/mob/living/simple_animal/vox/armalis/ - - name = "serpentine alien" - real_name = "serpentine alien" - desc = "A one-eyed, serpentine creature, half-machine, easily nine feet from tail to beak!" - icon = 'icons/mob/vox.dmi' - icon_state = "armalis" - icon_living = "armalis" - maxHealth = 500 - health = 500 - response_harm = "slashes at the" - harm_intent_damage = 0 - melee_damage_lower = 30 - melee_damage_upper = 40 - attacktext = "slammed its enormous claws into" - speed = -1 - attack_sound = 'sound/weapons/bladeslice.ogg' - status_flags = 0 - universal_speak = 1 - - var/armour = null - var/amp = null - var/quills = 3 - -/mob/living/simple_animal/vox/armalis/death(gibbed) - if(!gibbed) - stat = DEAD - visible_message("[src] shudders violently and explodes!","\red You feel your body rupture!") - explosion(get_turf(loc), -1, -1, 3, 5) - gib() - return - return ..() - -/mob/living/simple_animal/vox/armalis/attackby(var/obj/item/O as obj, var/mob/user as mob, params) - if(O.force) - if(O.force >= 25) - var/damage = O.force - if(O.damtype == STAMINA) - damage = 0 - health -= damage - for(var/mob/M in viewers(src, null)) - if((M.client && !( M.blinded ))) - M.show_message("\red \b [src] has been attacked with the [O] by [user]. ") - else - for(var/mob/M in viewers(src, null)) - if((M.client && !( M.blinded ))) - M.show_message("\red \b The [O] bounces harmlessly off of [src]. ") - else - to_chat(usr, "\red This weapon is ineffective, it does no damage.") - for(var/mob/M in viewers(src, null)) - if((M.client && !( M.blinded ))) - M.show_message("\red [user] gently taps [src] with the [O]. ") - -/mob/living/simple_animal/vox/armalis/verb/fire_quill(mob/target as mob in oview()) - - set name = "Fire quill" - set desc = "Fires a viciously pointed quill at a high speed." - set category = "Alien" - - if(quills<=0) - return - - to_chat(src, "\red You launch a razor-sharp quill at [target]!") - for(var/mob/O in oviewers()) - if((O.client && !( O.blinded ))) - to_chat(O, "\red [src] launches a razor-sharp quill at [target]!") - - var/obj/item/weapon/quill/Q = new(loc) - Q.fingerprintslast = src.ckey - Q.throw_at(target,10,30) - - quills-- - - spawn(100) - to_chat(src, "\red You feel a fresh quill slide into place.") - quills++ - -/obj/item/weapon/quill - name = "vox quill" - desc = "A wickedly barbed quill from some bizarre animal." - icon_state = "quill" - item_state = "quill" - throwforce = 5 - w_class = 3 - sharp = 1 - edge = 0 - -/mob/living/simple_animal/vox/armalis/verb/message_mob() - set category = "Alien" - set name = "Commune with creature" - set desc = "Send a telepathic message to an unlucky recipient." - - var/list/targets = list() - var/target = null - var/text = null - - targets += getmobs() //Fill list, prompt user with list - target = input("Select a creature!", "Speak to creature", null, null) as null|anything in targets - text = input("What would you like to say?", "Speak to creature", null, null) - - if(!target || !text) - return - - var/mob/M = targets[target] - - if(istype(M, /mob/dead/observer) || M.stat == DEAD) - to_chat(src, "Not even the armalis can speak to the dead.") - return - - to_chat(M, "\blue Like lead slabs crashing into the ocean, alien thoughts drop into your mind: [text]") - if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(H.species.name == "Vox") - return - to_chat(H, "\red Your nose begins to bleed...") - H.drip(1) - -/mob/living/simple_animal/vox/armalis/verb/shriek() - set category = "Alien" - set name = "Shriek" - set desc = "Give voice to a psychic shriek." - -/mob/living/simple_animal/vox/armalis/attackby(var/obj/item/O as obj, var/mob/user as mob, params) - if(istype(O,/obj/item/vox/armalis_armour)) - user.drop_item() - armour = O - speed = 1 - maxHealth += 200 - health += 200 - O.loc = src - visible_message("\blue [src] is quickly outfitted in [O] by [user].","\blue You quickly outfit [src] in [O].") - regenerate_icons() - return - if(istype(O,/obj/item/vox/armalis_amp)) - user.drop_item() - amp = O - O.loc = src - visible_message("\blue [src] is quickly outfitted in [O] by [user].","\blue You quickly outfit [src] in [O].") - regenerate_icons() - return - return ..() - -/mob/living/simple_animal/vox/armalis/regenerate_icons() - - overlays = list() - if(armour) - var/icon/armour = image('icons/mob/vox.dmi',"armour") - speed = 1 - overlays += armour - if(amp) - var/icon/amp = image('icons/mob/vox.dmi',"amplifier") - overlays += amp - return - -/obj/item/vox/armalis_armour - - name = "strange armour" - desc = "Hulking reinforced armour for something huge." - icon = 'icons/obj/clothing/suits.dmi' - icon_state = "armour-armalis" - item_state = "armour-armalis" - -/obj/item/vox/armalis_amp - - name = "strange lenses" - desc = "A series of metallic lenses and chains." - icon = 'icons/obj/clothing/hats.dmi' - icon_state = "amp" - item_state = "amp" diff --git a/icons/mob/nest.dmi b/icons/mob/nest.dmi new file mode 100644 index 00000000000..7dab335929e Binary files /dev/null and b/icons/mob/nest.dmi differ diff --git a/paradise.dme b/paradise.dme index 674cf8a6b15..482bfa9f419 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1601,8 +1601,8 @@ #include "code\modules\mob\living\simple_animal\powers.dm" #include "code\modules\mob\living\simple_animal\shade.dm" #include "code\modules\mob\living\simple_animal\simple_animal.dm" +#include "code\modules\mob\living\simple_animal\spawner.dm" #include "code\modules\mob\living\simple_animal\tribbles.dm" -#include "code\modules\mob\living\simple_animal\vox.dm" #include "code\modules\mob\living\simple_animal\bot\bot.dm" #include "code\modules\mob\living\simple_animal\bot\cleanbot.dm" #include "code\modules\mob\living\simple_animal\bot\construction.dm"