diff --git a/_maps/RandomRuins/SpaceRuins/abandonedzoo.dmm b/_maps/RandomRuins/SpaceRuins/abandonedzoo.dmm index a86730e6431..fbd4ac2d331 100644 --- a/_maps/RandomRuins/SpaceRuins/abandonedzoo.dmm +++ b/_maps/RandomRuins/SpaceRuins/abandonedzoo.dmm @@ -31,16 +31,16 @@ /turf/open/floor/grass, /area/ruin/space/has_grav/abandonedzoo) "am" = ( -/mob/living/simple_animal/hostile/poison/bees, -/mob/living/simple_animal/hostile/poison/bees, -/mob/living/simple_animal/hostile/poison/bees, -/mob/living/simple_animal/hostile/poison/bees, -/mob/living/simple_animal/hostile/poison/bees, -/mob/living/simple_animal/hostile/poison/bees, +/mob/living/simple_animal/hostile/bee, +/mob/living/simple_animal/hostile/bee, +/mob/living/simple_animal/hostile/bee, +/mob/living/simple_animal/hostile/bee, +/mob/living/simple_animal/hostile/bee, +/mob/living/simple_animal/hostile/bee, /turf/open/floor/grass, /area/ruin/space/has_grav/abandonedzoo) "an" = ( -/mob/living/simple_animal/hostile/poison/bees, +/mob/living/simple_animal/hostile/bee, /turf/open/floor/grass, /area/ruin/space/has_grav/abandonedzoo) "ao" = ( @@ -70,7 +70,7 @@ /area/ruin/space/has_grav/abandonedzoo) "au" = ( /obj/structure/flora/ausbushes/leafybush, -/mob/living/simple_animal/hostile/poison/bees, +/mob/living/simple_animal/hostile/bee, /turf/open/floor/grass, /area/ruin/space/has_grav/abandonedzoo) "av" = ( @@ -123,7 +123,7 @@ /area/ruin/space/has_grav/abandonedzoo) "aB" = ( /obj/machinery/light, -/mob/living/simple_animal/hostile/poison/bees, +/mob/living/simple_animal/hostile/bee, /turf/open/floor/grass, /area/ruin/space/has_grav/abandonedzoo) "aC" = ( diff --git a/_maps/RandomZLevels/Academy.dmm b/_maps/RandomZLevels/Academy.dmm index 125c95fe68c..47f15da1fc0 100644 --- a/_maps/RandomZLevels/Academy.dmm +++ b/_maps/RandomZLevels/Academy.dmm @@ -2831,7 +2831,7 @@ /turf/open/floor/mineral/uranium, /area/awaymission/academy/academycellar) "lj" = ( -/mob/living/simple_animal/hostile/poison/giant_spider/hunter, +/mob/living/simple_animal/hostile/giant_spider/hunter, /turf/open/floor/engine/cult, /area/awaymission/academy/academycellar) "lk" = ( diff --git a/_maps/RandomZLevels/caves.dmm b/_maps/RandomZLevels/caves.dmm index 3a73f723437..e6f461a64b0 100644 --- a/_maps/RandomZLevels/caves.dmm +++ b/_maps/RandomZLevels/caves.dmm @@ -362,7 +362,7 @@ }, /area/awaymission/caves/bmp_asteroid/level_four) "bb" = ( -/mob/living/simple_animal/hostile/poison/giant_spider/hunter, +/mob/living/simple_animal/hostile/giant_spider/hunter, /turf/open/floor/plating/asteroid/basalt{ initial_gas_mix = "n2=23;o2=14;TEMP=2.7" }, @@ -386,7 +386,7 @@ }, /area/awaymission/caves/bmp_asteroid/level_four) "bg" = ( -/mob/living/simple_animal/hostile/poison/giant_spider/nurse, +/mob/living/simple_animal/hostile/giant_spider/nurse, /turf/open/floor/plating/asteroid/basalt{ initial_gas_mix = "n2=23;o2=14;TEMP=2.7" }, @@ -423,7 +423,7 @@ /area/awaymission/caves/bmp_asteroid/level_four) "bt" = ( /obj/structure/spider/stickyweb, -/mob/living/simple_animal/hostile/poison/giant_spider/hunter, +/mob/living/simple_animal/hostile/giant_spider/hunter, /turf/open/floor/plating/asteroid/basalt{ initial_gas_mix = "n2=23;o2=14;TEMP=2.7" }, @@ -455,7 +455,7 @@ /area/awaymission/caves/bmp_asteroid/level_three) "by" = ( /obj/item/mjollnir, -/mob/living/simple_animal/hostile/poison/giant_spider/nurse, +/mob/living/simple_animal/hostile/giant_spider/nurse, /turf/open/floor/plating/asteroid/basalt{ initial_gas_mix = "n2=23;o2=14;TEMP=2.7" }, @@ -1673,7 +1673,7 @@ dir = 1 }, /obj/structure/spider/stickyweb, -/mob/living/simple_animal/hostile/poison/giant_spider/hunter, +/mob/living/simple_animal/hostile/giant_spider/hunter, /turf/open/floor/iron, /area/awaymission/caves/bmp_asteroid) "fs" = ( @@ -1740,7 +1740,7 @@ /turf/open/floor/iron, /area/awaymission/caves/bmp_asteroid) "fC" = ( -/mob/living/simple_animal/hostile/poison/giant_spider/hunter, +/mob/living/simple_animal/hostile/giant_spider/hunter, /turf/open/floor/iron, /area/awaymission/caves/bmp_asteroid) "fD" = ( @@ -1748,7 +1748,7 @@ /obj/machinery/sleeper{ dir = 8 }, -/mob/living/simple_animal/hostile/poison/giant_spider/hunter, +/mob/living/simple_animal/hostile/giant_spider/hunter, /turf/open/floor/iron, /area/awaymission/caves/bmp_asteroid) "fE" = ( diff --git a/_maps/RandomZLevels/snowdin.dmm b/_maps/RandomZLevels/snowdin.dmm index 293b4ed19c0..b76879ff7a9 100644 --- a/_maps/RandomZLevels/snowdin.dmm +++ b/_maps/RandomZLevels/snowdin.dmm @@ -1044,7 +1044,7 @@ dir = 5 }, /obj/structure/spider/stickyweb, -/mob/living/simple_animal/hostile/poison/giant_spider/hunter/ice, +/mob/living/simple_animal/hostile/giant_spider/hunter/ice, /turf/open/floor/iron/freezer, /area/awaymission/snowdin/post/kitchen) "cH" = ( @@ -8387,7 +8387,7 @@ /turf/open/floor/plating/asteroid/snow/ice, /area/awaymission/snowdin/cave/cavern) "tL" = ( -/mob/living/simple_animal/hostile/poison/giant_spider/nurse/ice, +/mob/living/simple_animal/hostile/giant_spider/nurse/ice, /turf/open/floor/plating/asteroid/snow/ice, /area/awaymission/snowdin/cave/cavern) "tN" = ( @@ -8430,7 +8430,7 @@ /turf/open/floor/plating/ice/smooth, /area/awaymission/snowdin/outside) "tV" = ( -/mob/living/simple_animal/hostile/poison/giant_spider/ice, +/mob/living/simple_animal/hostile/giant_spider/ice, /turf/open/floor/plating/asteroid/snow/ice, /area/awaymission/snowdin/cave/cavern) "tW" = ( @@ -8543,7 +8543,7 @@ /turf/open/floor/plating/asteroid/snow, /area/awaymission/snowdin/outside) "uw" = ( -/mob/living/simple_animal/hostile/poison/giant_spider/hunter/ice, +/mob/living/simple_animal/hostile/giant_spider/hunter/ice, /turf/open/floor/plating/asteroid/snow/ice, /area/awaymission/snowdin/cave/cavern) "ux" = ( @@ -8668,7 +8668,7 @@ /area/awaymission/snowdin/post/cavern1) "uP" = ( /obj/structure/spider/stickyweb, -/mob/living/simple_animal/hostile/poison/giant_spider/hunter/ice, +/mob/living/simple_animal/hostile/giant_spider/hunter/ice, /turf/open/floor/plating/asteroid/snow/ice, /area/awaymission/snowdin/cave/cavern) "uQ" = ( diff --git a/_maps/map_files/KiloStation/KiloStation.dmm b/_maps/map_files/KiloStation/KiloStation.dmm index b44d1350178..ded5d9a4418 100644 --- a/_maps/map_files/KiloStation/KiloStation.dmm +++ b/_maps/map_files/KiloStation/KiloStation.dmm @@ -4443,7 +4443,7 @@ /obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, /obj/structure/cable, -/mob/living/simple_animal/hostile/poison/giant_spider/hunter/scrawny, +/mob/living/simple_animal/hostile/giant_spider/hunter/scrawny, /turf/open/floor/plating, /area/maintenance/department/electrical) "ajE" = ( @@ -29646,7 +29646,7 @@ /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/blood/old, /obj/machinery/atmospherics/components/unary/vent_pump/on/layer4, -/mob/living/simple_animal/hostile/poison/giant_spider/tarantula/scrawny, +/mob/living/simple_animal/hostile/giant_spider/tarantula/scrawny, /turf/open/floor/iron/dark, /area/maintenance/port) "bAd" = ( @@ -30566,7 +30566,7 @@ dir = 6 }, /obj/effect/decal/cleanable/blood/old, -/mob/living/simple_animal/hostile/poison/giant_spider/hunter/scrawny, +/mob/living/simple_animal/hostile/giant_spider/hunter/scrawny, /turf/open/floor/iron/dark, /area/maintenance/port) "bDV" = ( @@ -52263,7 +52263,7 @@ /area/maintenance/starboard) "cME" = ( /obj/effect/decal/cleanable/dirt, -/mob/living/simple_animal/hostile/poison/giant_spider/hunter/scrawny, +/mob/living/simple_animal/hostile/giant_spider/hunter/scrawny, /turf/open/floor/plating, /area/maintenance/department/electrical) "cMF" = ( diff --git a/_maps/shuttles/whiteship_delta.dmm b/_maps/shuttles/whiteship_delta.dmm index e00264aaaaa..bd17a93ea87 100644 --- a/_maps/shuttles/whiteship_delta.dmm +++ b/_maps/shuttles/whiteship_delta.dmm @@ -549,7 +549,7 @@ /obj/effect/turf_decal/tile/bar{ dir = 1 }, -/mob/living/simple_animal/hostile/poison/giant_spider/hunter/scrawny, +/mob/living/simple_animal/hostile/giant_spider/hunter/scrawny, /turf/open/floor/iron, /area/shuttle/abandoned/bar) "bd" = ( @@ -1155,7 +1155,7 @@ dir = 8 }, /obj/structure/cable, -/mob/living/simple_animal/hostile/poison/giant_spider/tarantula/scrawny, +/mob/living/simple_animal/hostile/giant_spider/tarantula/scrawny, /turf/open/floor/iron/dark, /area/shuttle/abandoned/bridge) "cg" = ( @@ -1915,7 +1915,7 @@ dir = 8 }, /obj/effect/decal/cleanable/dirt, -/mob/living/simple_animal/hostile/poison/giant_spider/nurse/scrawny, +/mob/living/simple_animal/hostile/giant_spider/nurse/scrawny, /turf/open/floor/iron, /area/shuttle/abandoned/cargo) "dv" = ( @@ -2045,7 +2045,7 @@ "dG" = ( /obj/effect/decal/cleanable/dirt/dust, /obj/structure/cable, -/mob/living/simple_animal/hostile/poison/giant_spider/hunter/scrawny, +/mob/living/simple_animal/hostile/giant_spider/hunter/scrawny, /turf/open/floor/iron, /area/shuttle/abandoned/medbay) "dH" = ( diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index a22d6d2e408..4757b6c03f9 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -552,7 +552,6 @@ ///From post-can inject check of syringe after attack (mob/user) #define COMSIG_LIVING_TRY_SYRINGE "living_try_syringe" - ///Sent when bloodcrawl ends in mob/living/phasein(): (phasein_decal) #define COMSIG_LIVING_AFTERPHASEIN "living_phasein" @@ -663,7 +662,10 @@ #define COMSIG_CARBON_LOSE_TRAUMA "carbon_lose_trauma" // /mob/living/simple_animal/hostile signals -#define COMSIG_HOSTILE_ATTACKINGTARGET "hostile_attackingtarget" +///before attackingtarget has happened, source is the attacker and target is the attacked +#define COMSIG_HOSTILE_PRE_ATTACKINGTARGET "hostile_pre_attackingtarget" +///after attackingtarget has happened, source is the attacker and target is the attacked, extra argument for if the attackingtarget was successful +#define COMSIG_HOSTILE_POST_ATTACKINGTARGET "hostile_post_attackingtarget" #define COMPONENT_HOSTILE_NO_ATTACK (1<<0) ///from base of mob/living/simple_animal/hostile/regalrat: (mob/living/simple_animal/hostile/regalrat/king) #define COMSIG_RAT_INTERACT "rat_interaction" diff --git a/code/controllers/subsystem/traumas.dm b/code/controllers/subsystem/traumas.dm index a476c0e7934..83061ea3f77 100644 --- a/code/controllers/subsystem/traumas.dm +++ b/code/controllers/subsystem/traumas.dm @@ -39,11 +39,11 @@ SUBSYSTEM_DEF(traumas) "guns" = construct_phobia_regex("guns"), ) - phobia_mobs = list("spiders" = typecacheof(list(/mob/living/simple_animal/hostile/poison/giant_spider)), + phobia_mobs = list("spiders" = typecacheof(list(/mob/living/simple_animal/hostile/giant_spider)), "security" = typecacheof(list(/mob/living/simple_animal/bot/secbot)), "lizards" = typecacheof(list(/mob/living/simple_animal/hostile/lizard)), "skeletons" = typecacheof(list(/mob/living/simple_animal/hostile/skeleton)), - "snakes" = typecacheof(list(/mob/living/simple_animal/hostile/retaliate/poison/snake)), + "snakes" = typecacheof(list(/mob/living/simple_animal/hostile/retaliate/snake)), "robots" = typecacheof(list(/mob/living/silicon/robot, /mob/living/silicon/ai, /mob/living/simple_animal/drone, /mob/living/simple_animal/bot, /mob/living/simple_animal/hostile/swarmer, )), @@ -60,7 +60,7 @@ SUBSYSTEM_DEF(traumas) /mob/living/simple_animal/pet/penguin, )), "anime" = typecacheof(list(/mob/living/simple_animal/hostile/guardian)), - "insects" = typecacheof(list(/mob/living/simple_animal/hostile/cockroach, /mob/living/simple_animal/hostile/poison/bees)) + "insects" = typecacheof(list(/mob/living/simple_animal/hostile/cockroach, /mob/living/simple_animal/hostile/bee)) ) phobia_objs = list("snakes" = typecacheof(list(/obj/item/rod_of_asclepius, /obj/item/toy/plush/snakeplushie)), diff --git a/code/datums/components/fantasy/prefixes.dm b/code/datums/components/fantasy/prefixes.dm index 63c1b801e06..0990381897e 100644 --- a/code/datums/components/fantasy/prefixes.dm +++ b/code/datums/components/fantasy/prefixes.dm @@ -66,6 +66,10 @@ alignment = AFFIX_GOOD weight = 5 +/datum/fantasy_affix/vampiric/validate(datum/component/fantasy/comp) + var/obj/item/attached = comp.parent + return attached.force //don't apply to things that just bap people + /datum/fantasy_affix/vampiric/apply(datum/component/fantasy/comp, newName) var/obj/item/master = comp.parent comp.appliedComponents += master.AddComponent(/datum/component/lifesteal, comp.quality) @@ -98,3 +102,42 @@ /datum/fantasy_affix/ugly/remove(datum/component/fantasy/comp) var/obj/item/master = comp.parent master.AddElement(/datum/element/beauty, min(comp.quality, -1) * 250) + +/datum/fantasy_affix/venomous + placement = AFFIX_PREFIX + alignment = AFFIX_GOOD + +/datum/fantasy_affix/venomous/validate(datum/component/fantasy/comp) + var/obj/item/attached = comp.parent + return attached.force //don't apply to things that just bap people + +/datum/fantasy_affix/venomous/apply(datum/component/fantasy/comp, newName) + var/obj/item/master = comp.parent + var/picked_poison = pick(list( + /datum/reagent/toxin/plantbgone, + /datum/reagent/toxin/mutetoxin, + /datum/reagent/toxin/amanitin, + /datum/reagent/toxin/lipolicide, + /datum/reagent/toxin/spewium, + /datum/reagent/toxin/heparin, + /datum/reagent/toxin/rotatium, + /datum/reagent/toxin/histamine + )) + var/list/names = list( + /datum/reagent/toxin/plantbgone = "plantbane", + /datum/reagent/toxin/mutetoxin = "mimemind", + /datum/reagent/toxin/amanitin = "dormant death", + /datum/reagent/toxin/lipolicide = "famineblood", + /datum/reagent/toxin/spewium = "gulchergut", + /datum/reagent/toxin/heparin = "jabberwound", + /datum/reagent/toxin/rotatium = "spindown", + /datum/reagent/toxin/histamine = "creeping malaise" + ) + var/poisonname = names[picked_poison] + master.AddElement(/datum/element/venomous, picked_poison, comp.quality+1) + //seriously don't @ me about the correct use of venom vs poison. shut up. + return "[poisonname]-[pick("poisoned", "envenomed", "laced")] [newName]" + +/datum/fantasy_affix/venomous/remove(datum/component/fantasy/comp) + var/obj/item/master = comp.parent + master.RemoveElement(/datum/element/venomous) diff --git a/code/datums/components/igniter.dm b/code/datums/components/igniter.dm index 152a325e92e..2d9d21022b1 100644 --- a/code/datums/components/igniter.dm +++ b/code/datums/components/igniter.dm @@ -13,10 +13,10 @@ else if(isitem(parent)) RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/item_afterattack) else if(ishostile(parent)) - RegisterSignal(parent, COMSIG_HOSTILE_ATTACKINGTARGET, .proc/hostile_attackingtarget) + RegisterSignal(parent, COMSIG_HOSTILE_POST_ATTACKINGTARGET, .proc/hostile_attackingtarget) /datum/component/igniter/UnregisterFromParent() - UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT)) + UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_POST_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT)) /datum/component/igniter/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters) SIGNAL_HANDLER @@ -25,9 +25,11 @@ return do_igniter(target) -/datum/component/igniter/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target) +/datum/component/igniter/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target, success) SIGNAL_HANDLER + if(!success) + return do_igniter(target) /datum/component/igniter/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle) diff --git a/code/datums/components/knockback.dm b/code/datums/components/knockback.dm index 30362ace7ec..42198800c90 100644 --- a/code/datums/components/knockback.dm +++ b/code/datums/components/knockback.dm @@ -20,10 +20,10 @@ else if(isitem(parent)) RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/item_afterattack) else if(ishostile(parent)) - RegisterSignal(parent, COMSIG_HOSTILE_ATTACKINGTARGET, .proc/hostile_attackingtarget) + RegisterSignal(parent, COMSIG_HOSTILE_POST_ATTACKINGTARGET, .proc/hostile_attackingtarget) /datum/component/knockback/UnregisterFromParent() - UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT)) + UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_POST_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT)) /// triggered after an item attacks something /datum/component/knockback/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters) @@ -34,9 +34,10 @@ do_knockback(target, user, get_dir(source, target)) /// triggered after a hostile simplemob attacks something -/datum/component/knockback/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target) +/datum/component/knockback/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target, success) SIGNAL_HANDLER - + if(!success) + return do_knockback(target, attacker, get_dir(attacker, target)) /// triggered after a projectile hits something diff --git a/code/datums/components/lifesteal.dm b/code/datums/components/lifesteal.dm index 6bbb1f4b7fb..ef33e63960e 100644 --- a/code/datums/components/lifesteal.dm +++ b/code/datums/components/lifesteal.dm @@ -14,10 +14,10 @@ else if(isitem(parent)) RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/item_afterattack) else if(ishostile(parent)) - RegisterSignal(parent, COMSIG_HOSTILE_ATTACKINGTARGET, .proc/hostile_attackingtarget) + RegisterSignal(parent, COMSIG_HOSTILE_POST_ATTACKINGTARGET, .proc/hostile_attackingtarget) /datum/component/lifesteal/UnregisterFromParent() - UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT)) + UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_POST_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT)) /datum/component/lifesteal/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters) SIGNAL_HANDLER @@ -26,9 +26,11 @@ return do_lifesteal(user, target) -/datum/component/lifesteal/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target) +/datum/component/lifesteal/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target, success) SIGNAL_HANDLER + if(!success) + return do_lifesteal(attacker, target) /datum/component/lifesteal/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle) diff --git a/code/datums/components/summoning.dm b/code/datums/components/summoning.dm index 482d88a54be..d160eea4c6e 100644 --- a/code/datums/components/summoning.dm +++ b/code/datums/components/summoning.dm @@ -28,10 +28,10 @@ else if(isitem(parent)) RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/item_afterattack) else if(ishostile(parent)) - RegisterSignal(parent, COMSIG_HOSTILE_ATTACKINGTARGET, .proc/hostile_attackingtarget) + RegisterSignal(parent, COMSIG_HOSTILE_POST_ATTACKINGTARGET, .proc/hostile_attackingtarget) /datum/component/summoning/UnregisterFromParent() - UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT)) + UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_POST_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT)) /datum/component/summoning/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters) SIGNAL_HANDLER @@ -40,9 +40,11 @@ return do_spawn_mob(get_turf(target), user) -/datum/component/summoning/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target) +/datum/component/summoning/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target, success) SIGNAL_HANDLER + if(!success) + return do_spawn_mob(get_turf(target), attacker) /datum/component/summoning/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle) diff --git a/code/datums/diseases/beesease.dm b/code/datums/diseases/beesease.dm index 4e39a0ce851..03aab1907e2 100644 --- a/code/datums/diseases/beesease.dm +++ b/code/datums/diseases/beesease.dm @@ -38,4 +38,4 @@ if(DT_PROB(0.5, delta_time)) affected_mob.visible_message("[affected_mob] coughs up a swarm of bees!", \ "You cough up a swarm of bees!") - new /mob/living/simple_animal/hostile/poison/bees(affected_mob.loc) + new /mob/living/simple_animal/hostile/bee(affected_mob.loc) diff --git a/code/datums/elements/venomous.dm b/code/datums/elements/venomous.dm new file mode 100644 index 00000000000..2901dbf97c3 --- /dev/null +++ b/code/datums/elements/venomous.dm @@ -0,0 +1,62 @@ +/** + * Venomous element; which makes the attacks of the simplemob attached poison the enemy. + * + * Used for spiders and bees! + */ +/datum/element/venomous + element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH + id_arg_index = 2 + ///Path of the reagent added + var/poison_type + ///How much of the reagent added. if it's a list, it'll pick a range with the range being list(lower_value, upper_value) + var/list/amount_added + +/datum/element/venomous/Attach(datum/target, poison_type, amount_added) + . = ..() + + if(isgun(target)) + RegisterSignal(target, COMSIG_PROJECTILE_ON_HIT, .proc/projectile_hit) + else if(isitem(target)) + RegisterSignal(target, COMSIG_ITEM_AFTERATTACK, .proc/item_afterattack) + else if(ishostile(target)) + RegisterSignal(target, COMSIG_HOSTILE_POST_ATTACKINGTARGET, .proc/hostile_attackingtarget) + else + return ELEMENT_INCOMPATIBLE + + src.poison_type = poison_type + src.amount_added = amount_added + +/datum/element/venomous/Detach(datum/target) + UnregisterSignal(target, list(COMSIG_PROJECTILE_ON_HIT, COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_POST_ATTACKINGTARGET)) + return ..() + +/datum/element/venomous/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle) + SIGNAL_HANDLER + + add_reagent(target) + +/datum/element/venomous/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters) + SIGNAL_HANDLER + + if(!proximity_flag) + return + add_reagent(target) + +/datum/element/venomous/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target, success) + SIGNAL_HANDLER + + if(!success) + return + add_reagent(target) + +/datum/element/venomous/proc/add_reagent(mob/living/target) + if(!istype(target)) + return + if(target.stat == DEAD) + return + var/final_amount_added + if(islist(amount_added)) + final_amount_added = rand(amount_added[1], amount_added[2]) + else + final_amount_added = amount_added + target.reagents?.add_reagent(poison_type, final_amount_added) diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index 87d23dacbd9..98ecaad6448 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -294,9 +294,8 @@ /datum/status_effect/hippocratic_oath/proc/consume_owner() owner.visible_message("[owner]'s soul is absorbed into the rod, relieving the previous snake of its duty.") - var/mob/living/simple_animal/hostile/retaliate/poison/snake/healSnake = new(owner.loc) var/list/chems = list(/datum/reagent/medicine/sal_acid, /datum/reagent/medicine/c2/convermol, /datum/reagent/medicine/oxandrolone) - healSnake.poison_type = pick(chems) + var/mob/living/simple_animal/hostile/retaliate/snake/healSnake = new(owner.loc, pick(chems)) healSnake.name = "Asclepius's Snake" healSnake.real_name = "Asclepius's Snake" healSnake.desc = "A mystical snake previously trapped upon the Rod of Asclepius, now freed of its burden. Unlike the average snake, its bites contain chemicals with minor healing properties." diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index b8cd311bb3a..8f8ead05c0a 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -43,10 +43,10 @@ . = ..() if(genetic) return - if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider)) + if(istype(mover, /mob/living/simple_animal/hostile/giant_spider)) return TRUE else if(isliving(mover)) - if(istype(mover.pulledby, /mob/living/simple_animal/hostile/poison/giant_spider)) + if(istype(mover.pulledby, /mob/living/simple_animal/hostile/giant_spider)) return TRUE if(prob(50)) to_chat(mover, "You get stuck in \the [src] for a moment.") @@ -88,9 +88,9 @@ ///Whether or not a ghost can use the cluster to become a spider. var/ghost_ready = FALSE ///The types of spiders the egg sac could produce. - var/list/mob/living/potentialspawns = list(/mob/living/simple_animal/hostile/poison/giant_spider, - /mob/living/simple_animal/hostile/poison/giant_spider/hunter, - /mob/living/simple_animal/hostile/poison/giant_spider/nurse) + var/list/mob/living/potentialspawns = list(/mob/living/simple_animal/hostile/giant_spider, + /mob/living/simple_animal/hostile/giant_spider/hunter, + /mob/living/simple_animal/hostile/giant_spider/nurse) /obj/structure/spider/eggcluster/Initialize() pixel_x = base_pixel_x + rand(3,-3) @@ -131,7 +131,7 @@ var/list/spider_list = list() var/list/display_spiders = list() for(var/choice in potentialspawns) - var/mob/living/simple_animal/hostile/poison/giant_spider/spider = choice + var/mob/living/simple_animal/hostile/giant_spider/spider = choice spider_list[initial(spider.name)] = choice var/datum/radial_menu_choice/option = new @@ -145,7 +145,7 @@ chosen_spider = spider_list[chosen_spider] if(QDELETED(src) || QDELETED(user) || !chosen_spider) return FALSE - var/mob/living/simple_animal/hostile/poison/giant_spider/new_spider = new chosen_spider(src.loc) + var/mob/living/simple_animal/hostile/giant_spider/new_spider = new chosen_spider(src.loc) new_spider.faction = faction.Copy() new_spider.directive = directive new_spider.key = user.key @@ -155,19 +155,19 @@ /obj/structure/spider/eggcluster/enriched name = "enriched egg cluster" color = rgb(148,0,211) - potentialspawns = list(/mob/living/simple_animal/hostile/poison/giant_spider/tarantula, - /mob/living/simple_animal/hostile/poison/giant_spider/viper, - /mob/living/simple_animal/hostile/poison/giant_spider/midwife) + potentialspawns = list(/mob/living/simple_animal/hostile/giant_spider/tarantula, + /mob/living/simple_animal/hostile/giant_spider/viper, + /mob/living/simple_animal/hostile/giant_spider/midwife) /obj/structure/spider/eggcluster/bloody name = "bloody egg cluster" color = rgb(255,0,0) directive = "You are the spawn of a visicious changeling. You have no ambitions except to wreak havoc and ensure your own survival. You are aggressive to all living beings outside of your species, including changelings." - potentialspawns = list(/mob/living/simple_animal/hostile/poison/giant_spider/hunter/flesh) + potentialspawns = list(/mob/living/simple_animal/hostile/giant_spider/hunter/flesh) /obj/structure/spider/eggcluster/midwife name = "midwife egg cluster" - potentialspawns = list(/mob/living/simple_animal/hostile/poison/giant_spider/midwife) + potentialspawns = list(/mob/living/simple_animal/hostile/giant_spider/midwife) directive = "Ensure the survival of the spider species and overtake whatever structure you find yourself in." /obj/structure/spider/spiderling @@ -196,19 +196,19 @@ AddComponent(/datum/component/swarming) /obj/structure/spider/spiderling/hunter - grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter + grow_as = /mob/living/simple_animal/hostile/giant_spider/hunter /obj/structure/spider/spiderling/nurse - grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/nurse + grow_as = /mob/living/simple_animal/hostile/giant_spider/nurse /obj/structure/spider/spiderling/midwife - grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/midwife + grow_as = /mob/living/simple_animal/hostile/giant_spider/midwife /obj/structure/spider/spiderling/viper - grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/viper + grow_as = /mob/living/simple_animal/hostile/giant_spider/viper /obj/structure/spider/spiderling/tarantula - grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/tarantula + grow_as = /mob/living/simple_animal/hostile/giant_spider/tarantula /obj/structure/spider/spiderling/Bump(atom/user) if(istype(user, /obj/structure/table)) @@ -288,10 +288,10 @@ if(amount_grown >= 100) if(!grow_as) if(prob(3)) - grow_as = pick(/mob/living/simple_animal/hostile/poison/giant_spider/tarantula, /mob/living/simple_animal/hostile/poison/giant_spider/viper, /mob/living/simple_animal/hostile/poison/giant_spider/midwife) + grow_as = pick(/mob/living/simple_animal/hostile/giant_spider/tarantula, /mob/living/simple_animal/hostile/giant_spider/viper, /mob/living/simple_animal/hostile/giant_spider/midwife) else - grow_as = pick(/mob/living/simple_animal/hostile/poison/giant_spider, /mob/living/simple_animal/hostile/poison/giant_spider/hunter, /mob/living/simple_animal/hostile/poison/giant_spider/nurse) - var/mob/living/simple_animal/hostile/poison/giant_spider/S = new grow_as(src.loc) + grow_as = pick(/mob/living/simple_animal/hostile/giant_spider, /mob/living/simple_animal/hostile/giant_spider/hunter, /mob/living/simple_animal/hostile/giant_spider/nurse) + var/mob/living/simple_animal/hostile/giant_spider/S = new grow_as(src.loc) S.faction = faction.Copy() S.directive = directive qdel(src) diff --git a/code/game/objects/items/food/meat.dm b/code/game/objects/items/food/meat.dm index 5056ab9d3d1..52d47cd8e79 100644 --- a/code/game/objects/items/food/meat.dm +++ b/code/game/objects/items/food/meat.dm @@ -416,7 +416,7 @@ bite_consumption = 20 food_reagents = list(/datum/reagent/consumable/honey = 10, /datum/reagent/toxin = 5, /datum/reagent/medicine/strange_reagent = 1) tastes = list("buzzing" = 1, "honey" = 1, "regret" = 1) - spawned_mob = /mob/living/simple_animal/hostile/poison/bees + spawned_mob = /mob/living/simple_animal/hostile/bee /obj/item/food/stewedsoymeat name = "stewed soy meat" diff --git a/code/game/objects/items/grenades/spawnergrenade.dm b/code/game/objects/items/grenades/spawnergrenade.dm index e8241f872ab..ed06b574952 100644 --- a/code/game/objects/items/grenades/spawnergrenade.dm +++ b/code/game/objects/items/grenades/spawnergrenade.dm @@ -44,7 +44,7 @@ name = "Buzzkill grenade" desc = "The label reads: \"WARNING: DEVICE WILL RELEASE LIVE SPECIMENS UPON ACTIVATION. SEAL SUIT BEFORE USE.\" It is warm to the touch and vibrates faintly." icon_state = "holy_grenade" - spawner_type = /mob/living/simple_animal/hostile/poison/bees/toxin + spawner_type = /mob/living/simple_animal/hostile/bee/toxin deliveryamt = 10 /obj/item/grenade/spawnergrenade/clown diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 33827bfd5ff..b9539deefff 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -731,7 +731,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 /obj/item/melee/flyswatter/Initialize() . = ..() strong_against = typecacheof(list( - /mob/living/simple_animal/hostile/poison/bees/, + /mob/living/simple_animal/hostile/bee/, /mob/living/simple_animal/butterfly, /mob/living/simple_animal/hostile/cockroach, /obj/item/queen_bee, diff --git a/code/modules/admin/verbs/secrets.dm b/code/modules/admin/verbs/secrets.dm index 5af6e9b70fa..849873d372f 100644 --- a/code/modules/admin/verbs/secrets.dm +++ b/code/modules/admin/verbs/secrets.dm @@ -368,7 +368,7 @@ var/list/settings = list( "mainsettings" = list( - "typepath" = list("desc" = "Path to spawn", "type" = "datum", "path" = "/mob/living", "subtypesonly" = TRUE, "value" = /mob/living/simple_animal/hostile/poison/bees), + "typepath" = list("desc" = "Path to spawn", "type" = "datum", "path" = "/mob/living", "subtypesonly" = TRUE, "value" = /mob/living/simple_animal/hostile/bee), "humanoutfit" = list("desc" = "Outfit if human", "type" = "datum", "path" = "/datum/outfit", "subtypesonly" = TRUE, "value" = /datum/outfit), "amount" = list("desc" = "Number per portal", "type" = "number", "value" = 1), "portalnum" = list("desc" = "Number of total portals", "type" = "number", "value" = 10), diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index a33d5a10bc5..31426988791 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -2112,9 +2112,9 @@ desc = "Tired of these MOTHER FUCKING snakes on this MOTHER FUCKING space station? Then this isn't the crate for you. Contains three poisonous snakes." cost = CARGO_CRATE_VALUE * 6 access_view = ACCESS_SECURITY - contains = list(/mob/living/simple_animal/hostile/retaliate/poison/snake, - /mob/living/simple_animal/hostile/retaliate/poison/snake, - /mob/living/simple_animal/hostile/retaliate/poison/snake) + contains = list(/mob/living/simple_animal/hostile/retaliate/snake, + /mob/living/simple_animal/hostile/retaliate/snake, + /mob/living/simple_animal/hostile/retaliate/snake) crate_name = "snake crate" ////////////////////////////////////////////////////////////////////////////// diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index f57ea3392cc..d34c1e0bed0 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -51,7 +51,7 @@ magician.visible_message("[magician] taps [src] with [hitby_wand], then reaches in and pulls out a bu- wait, those are bees!", "You tap [src] with your [hitby_wand.name] and pull out... BEES!") var/wait_how_many_bees_did_that_guy_pull_out_of_his_hat = rand(4, 8) for(var/b in 1 to wait_how_many_bees_did_that_guy_pull_out_of_his_hat) - var/mob/living/simple_animal/hostile/poison/bees/barry = new(get_turf(magician)) + var/mob/living/simple_animal/hostile/bee/barry = new(get_turf(magician)) barry.GiveTarget(magician) if(prob(20)) barry.say(pick("BUZZ BUZZ", "PULLING A RABBIT OUT OF A HAT IS A TIRED TROPE", "I DIDN'T ASK TO BEE HERE"), forced = "bee hat") diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 86f91b32eef..94f9f1b0312 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -447,7 +447,7 @@ /obj/item/clothing/shoes/cowboy/Initialize() . = ..() if(prob(2)) - var/mob/living/simple_animal/hostile/retaliate/poison/snake/bootsnake = new/mob/living/simple_animal/hostile/retaliate/poison/snake(src) + var/mob/living/simple_animal/hostile/retaliate/snake/bootsnake = new/mob/living/simple_animal/hostile/retaliate/snake(src) occupants += bootsnake @@ -460,7 +460,7 @@ user.visible_message("[user] recoils as something slithers out of [src].", "You feel a sudden stabbing pain in your [pick("foot", "toe", "ankle")]!") user.Knockdown(20) //Is one second paralyze better here? I feel you would fall on your ass in some fashion. user.apply_damage(5, BRUTE, pick(BODY_ZONE_R_LEG, BODY_ZONE_L_LEG)) - if(istype(occupant, /mob/living/simple_animal/hostile/retaliate/poison)) + if(istype(occupant, /mob/living/simple_animal/hostile/retaliate)) user.reagents.add_reagent(/datum/reagent/toxin, 7) occupants.Cut() @@ -483,7 +483,7 @@ if(occupants.len >= max_occupants) to_chat(user, "[src] are full!") return - if(istype(target, /mob/living/simple_animal/hostile/retaliate/poison/snake) || istype(target, /mob/living/simple_animal/hostile/headcrab) || istype(target, /mob/living/carbon/alien/larva)) + if(istype(target, /mob/living/simple_animal/hostile/retaliate/snake) || istype(target, /mob/living/simple_animal/hostile/headcrab) || istype(target, /mob/living/carbon/alien/larva)) occupants += target target.forceMove(src) to_chat(user, "[target] slithers into [src].") diff --git a/code/modules/events/sentience.dm b/code/modules/events/sentience.dm index 989b25c9833..556caf3056c 100644 --- a/code/modules/events/sentience.dm +++ b/code/modules/events/sentience.dm @@ -10,7 +10,7 @@ GLOBAL_LIST_INIT(high_priority_sentience, typecacheof(list( /mob/living/simple_animal/hostile/retaliate/bat, /mob/living/simple_animal/hostile/carp/cayenne, /mob/living/simple_animal/butterfly, - /mob/living/simple_animal/hostile/retaliate/poison/snake, + /mob/living/simple_animal/hostile/retaliate/snake, /mob/living/simple_animal/hostile/retaliate/goose/vomit, /mob/living/simple_animal/bot/mulebot, /mob/living/simple_animal/bot/secbot/beepsky diff --git a/code/modules/events/shuttle_loan.dm b/code/modules/events/shuttle_loan.dm index 7fff101c953..fd22f6c2cd6 100644 --- a/code/modules/events/shuttle_loan.dm +++ b/code/modules/events/shuttle_loan.dm @@ -146,11 +146,11 @@ var/datum/supply_pack/pack = SSshuttle.supply_packs[/datum/supply_pack/emergency/specialops] pack.generate(pick_n_take(empty_shuttle_turfs)) - shuttle_spawns.Add(/mob/living/simple_animal/hostile/poison/giant_spider) - shuttle_spawns.Add(/mob/living/simple_animal/hostile/poison/giant_spider) - shuttle_spawns.Add(/mob/living/simple_animal/hostile/poison/giant_spider/nurse) + shuttle_spawns.Add(/mob/living/simple_animal/hostile/giant_spider) + shuttle_spawns.Add(/mob/living/simple_animal/hostile/giant_spider) + shuttle_spawns.Add(/mob/living/simple_animal/hostile/giant_spider/nurse) if(prob(50)) - shuttle_spawns.Add(/mob/living/simple_animal/hostile/poison/giant_spider/hunter) + shuttle_spawns.Add(/mob/living/simple_animal/hostile/giant_spider/hunter) var/turf/T = pick_n_take(empty_shuttle_turfs) @@ -220,7 +220,7 @@ shuttle_spawns.Add(/obj/structure/closet/crate/hydroponics) for(var/i in 1 to 8) - shuttle_spawns.Add(/mob/living/simple_animal/hostile/poison/bees/toxin) + shuttle_spawns.Add(/mob/living/simple_animal/hostile/bee/toxin) for(var/i in 1 to 5) var/decal = pick(/obj/effect/decal/cleanable/blood, /obj/effect/decal/cleanable/insectguts) diff --git a/code/modules/experisci/experiment/experiments.dm b/code/modules/experisci/experiment/experiments.dm index 41fb1058dcf..8dd248eaaf5 100644 --- a/code/modules/experisci/experiment/experiments.dm +++ b/code/modules/experisci/experiment/experiments.dm @@ -62,7 +62,7 @@ description = "We need to see how the body functions from the earliest moments. Some cytology experiments will help us gain this understanding." total_requirement = 3 max_requirement_per_type = 2 - possible_types = list(/mob/living/simple_animal/hostile/carp, /mob/living/simple_animal/hostile/retaliate/poison/snake, /mob/living/simple_animal/pet/cat, /mob/living/simple_animal/pet/dog/corgi, /mob/living/simple_animal/cow, /mob/living/simple_animal/chicken) + possible_types = list(/mob/living/simple_animal/hostile/carp, /mob/living/simple_animal/hostile/retaliate/snake, /mob/living/simple_animal/pet/cat, /mob/living/simple_animal/pet/dog/corgi, /mob/living/simple_animal/cow, /mob/living/simple_animal/chicken) /datum/experiment/scanning/random/cytology/medium/one name = "Advanced Cytology Scanning Experiment One" diff --git a/code/modules/holodeck/holo_effect.dm b/code/modules/holodeck/holo_effect.dm index c5f8fd82085..835088cca08 100644 --- a/code/modules/holodeck/holo_effect.dm +++ b/code/modules/holodeck/holo_effect.dm @@ -104,7 +104,7 @@ mobtype += pick(/mob/living/simple_animal/pet/cat, /mob/living/simple_animal/pet/cat/kitten) /obj/effect/holodeck_effect/mobspawner/bee - mobtype = /mob/living/simple_animal/hostile/poison/bees/toxin + mobtype = /mob/living/simple_animal/hostile/bee/toxin /obj/effect/holodeck_effect/mobspawner/monkey mobtype = /mob/living/simple_animal/holodeck_monkey diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm index b53acf77ec3..cd1d16948e8 100644 --- a/code/modules/hydroponics/beekeeping/beebox.dm +++ b/code/modules/hydroponics/beekeeping/beebox.dm @@ -11,7 +11,7 @@ return 0 -/mob/living/simple_animal/hostile/poison/bees/bee_friendly() +/mob/living/simple_animal/hostile/bee/bee_friendly() return 1 @@ -33,7 +33,7 @@ icon_state = "beebox" anchored = TRUE density = TRUE - var/mob/living/simple_animal/hostile/poison/bees/queen/queen_bee = null + var/mob/living/simple_animal/hostile/bee/queen/queen_bee = null var/list/bees = list() //bees owned by the box, not those inside it var/list/honeycombs = list() var/list/honey_frames = list() @@ -77,7 +77,7 @@ honey_frames += HF for(var/i in 1 to get_max_bees()) - var/mob/living/simple_animal/hostile/poison/bees/B = new(src) + var/mob/living/simple_animal/hostile/bee/B = new(src) bees += B B.beehome = src B.assign_reagent(R) @@ -105,7 +105,7 @@ if((bee_resources >= BEE_RESOURCE_NEW_BEE_COST && prob(BEE_PROB_NEW_BEE)) || freebee) if(!freebee) bee_resources = max(bee_resources - BEE_RESOURCE_NEW_BEE_COST, 0) - var/mob/living/simple_animal/hostile/poison/bees/B = new(get_turf(src)) + var/mob/living/simple_animal/hostile/bee/B = new(get_turf(src)) B.beehome = src B.assign_reagent(queen_bee.beegent) bees += B @@ -177,7 +177,7 @@ visible_message("[user] sets [qb] down inside the apiary, making it their new home.") var/relocated = 0 for(var/b in bees) - var/mob/living/simple_animal/hostile/poison/bees/B = b + var/mob/living/simple_animal/hostile/bee/B = b if(B.reagent_incompatible(queen_bee)) bees -= B B.beehome = null @@ -201,7 +201,7 @@ //Time to get stung! var/bees = FALSE for(var/b in bees) //everyone who's ever lived here now instantly hates you, suck it assistant! - var/mob/living/simple_animal/hostile/poison/bees/B = b + var/mob/living/simple_animal/hostile/bee/B = b if(B.isqueen) continue if(B.loc == src) @@ -256,7 +256,7 @@ /obj/structure/beebox/deconstruct(disassembled = TRUE) new /obj/item/stack/sheet/mineral/wood (loc, 20) - for(var/mob/living/simple_animal/hostile/poison/bees/B in bees) + for(var/mob/living/simple_animal/hostile/bee/B in bees) if(B.loc == src) B.forceMove(drop_location()) for(var/obj/item/honey_frame/HF in honey_frames) diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm index a431f71cb0d..da826e93d87 100644 --- a/code/modules/mining/abandoned_crates.dm +++ b/code/modules/mining/abandoned_crates.dm @@ -227,7 +227,7 @@ new /obj/item/ammo_box/foambox(src) if(98) for(var/i in 1 to 3) - new /mob/living/simple_animal/hostile/poison/bees/toxin(src) + new /mob/living/simple_animal/hostile/bee/toxin(src) if(99) new /obj/item/implanter/sad_trombone(src) if(100) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 440da37f827..c45b1e4d8bf 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1,4 +1,4 @@ -/mob/living/Initialize() +/mob/living/Initialize(mapload) . = ..() register_init_signals() if(unique_name) diff --git a/code/modules/mob/living/simple_animal/friendly/snake.dm b/code/modules/mob/living/simple_animal/friendly/snake.dm index 64e0bf77d13..643bbf0b996 100644 --- a/code/modules/mob/living/simple_animal/friendly/snake.dm +++ b/code/modules/mob/living/simple_animal/friendly/snake.dm @@ -1,16 +1,5 @@ -/mob/living/simple_animal/hostile/retaliate/poison - var/poison_per_bite = 0 - var/poison_type = /datum/reagent/toxin -/mob/living/simple_animal/hostile/retaliate/poison/AttackingTarget() - . = ..() - if(. && isliving(target)) - var/mob/living/L = target - if(L.reagents && !poison_per_bite == 0) - L.reagents.add_reagent(poison_type, poison_per_bite) - return . - -/mob/living/simple_animal/hostile/retaliate/poison/snake +/mob/living/simple_animal/hostile/retaliate/snake name = "snake" desc = "A slithery snake. These legless reptiles are the bane of mice and adventurers alike." icon_state = "snake" @@ -40,15 +29,18 @@ obj_damage = 0 environment_smash = ENVIRONMENT_SMASH_NONE -/mob/living/simple_animal/hostile/retaliate/poison/snake/Initialize() +/mob/living/simple_animal/hostile/retaliate/snake/Initialize(mapload, special_reagent) . = ..() add_cell_sample() ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) + if(!special_reagent) + special_reagent = /datum/reagent/toxin + AddElement(/datum/element/venomous, special_reagent, 4) -/mob/living/simple_animal/hostile/retaliate/poison/snake/add_cell_sample() +/mob/living/simple_animal/hostile/retaliate/snake/add_cell_sample() AddElement(/datum/element/swabable, CELL_LINE_TABLE_SNAKE, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5) -/mob/living/simple_animal/hostile/retaliate/poison/snake/ListTargets(atom/the_target) +/mob/living/simple_animal/hostile/retaliate/snake/ListTargets(atom/the_target) . = oview(vision_range, targets_from) //get list of things in vision range var/list/living_mobs = list() var/list/mice = list() @@ -65,7 +57,7 @@ return living_mobs & enemies return mice -/mob/living/simple_animal/hostile/retaliate/poison/snake/AttackingTarget() +/mob/living/simple_animal/hostile/retaliate/snake/AttackingTarget() if(istype(target, /mob/living/simple_animal/mouse)) visible_message("[name] consumes [target] in a single gulp!", "You consume [target] in a single gulp!") QDEL_NULL(target) diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index 7fb1ae8b8bb..fce6bb7a92d 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -10,7 +10,7 @@ #define BEE_POLLINATE_PEST_CHANCE 33 #define BEE_POLLINATE_POTENCY_CHANCE 50 -/mob/living/simple_animal/hostile/poison/bees +/mob/living/simple_animal/hostile/bee name = "bee" desc = "Buzzy buzzy bee, stingy sti- Ouch!" icon_state = "" @@ -58,7 +58,7 @@ var/static/beehometypecache = typecacheof(/obj/structure/beebox) var/static/hydroponicstypecache = typecacheof(/obj/machinery/hydroponics) -/mob/living/simple_animal/hostile/poison/bees/Initialize() +/mob/living/simple_animal/hostile/bee/Initialize() . = ..() ADD_TRAIT(src, TRAIT_SPACEWALK, INNATE_TRAIT) ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) @@ -66,7 +66,7 @@ AddElement(/datum/element/simple_flying) AddComponent(/datum/component/swarming) -/mob/living/simple_animal/hostile/poison/bees/mob_pickup(mob/living/L) +/mob/living/simple_animal/hostile/bee/mob_pickup(mob/living/L) var/obj/item/clothing/head/mob_holder/destructible/holder = new(get_turf(src), src, held_state, head_icon, held_lh, held_rh, worn_slot_flags) var/list/reee = list(/datum/reagent/consumable/nutriment/vitamin = 5) if(beegent) @@ -75,7 +75,7 @@ L.visible_message("[L] scoops up [src]!") L.put_in_hands(holder) -/mob/living/simple_animal/hostile/poison/bees/Destroy() +/mob/living/simple_animal/hostile/bee/Destroy() if(beehome) beehome.bees -= src beehome = null @@ -83,7 +83,7 @@ return ..() -/mob/living/simple_animal/hostile/poison/bees/death(gibbed) +/mob/living/simple_animal/hostile/bee/death(gibbed) if(beehome) beehome.bees -= src beehome = null @@ -98,13 +98,13 @@ ..() -/mob/living/simple_animal/hostile/poison/bees/examine(mob/user) +/mob/living/simple_animal/hostile/bee/examine(mob/user) . = ..() if(!beehome) . += "This bee is homeless!" -/mob/living/simple_animal/hostile/poison/bees/ListTargets() // Bee processing is expessive, so we override them finding targets here. +/mob/living/simple_animal/hostile/bee/ListTargets() // Bee processing is expessive, so we override them finding targets here. if(!search_objects) //In case we want to have purely hostile bees return ..() else @@ -115,7 +115,7 @@ for(var/mob/A in searched_for) . += A -/mob/living/simple_animal/hostile/poison/bees/proc/generate_bee_visuals() +/mob/living/simple_animal/hostile/bee/proc/generate_bee_visuals() cut_overlays() var/col = BEE_DEFAULT_COLOUR @@ -135,7 +135,7 @@ //We don't attack beekeepers/people dressed as bees//Todo: bee costume -/mob/living/simple_animal/hostile/poison/bees/CanAttack(atom/the_target) +/mob/living/simple_animal/hostile/bee/CanAttack(atom/the_target) . = ..() if(!.) return FALSE @@ -144,7 +144,7 @@ return !H.bee_friendly() -/mob/living/simple_animal/hostile/poison/bees/Found(atom/A) +/mob/living/simple_animal/hostile/bee/Found(atom/A) if(isliving(A)) var/mob/living/H = A return !H.bee_friendly() @@ -156,7 +156,7 @@ return FALSE -/mob/living/simple_animal/hostile/poison/bees/AttackingTarget() +/mob/living/simple_animal/hostile/bee/AttackingTarget() //Pollinate if(istype(target, /obj/machinery/hydroponics)) var/obj/machinery/hydroponics/Hydro = target @@ -177,21 +177,17 @@ beegent.expose_mob(L, INJECT) L.reagents.add_reagent(beegent.type, rand(1,5)) -/mob/living/simple_animal/hostile/poison/bees/inject_poison(mob/living/L) - if(beegent && istype(L) && L.reagents) - beegent.expose_mob(L, INJECT) - L.reagents.add_reagent(beegent.type, rand(1,5)) - -/mob/living/simple_animal/hostile/poison/bees/proc/assign_reagent(datum/reagent/R) +/mob/living/simple_animal/hostile/bee/proc/assign_reagent(datum/reagent/R) if(istype(R)) beegent = R name = "[initial(name)] ([R.name])" real_name = name - poison_type = null + //clear the old since this one is going to have some new value + RemoveElement(/datum/element/venomous) + AddElement(/datum/element/venomous, beegent.type, list(1, 5)) generate_bee_visuals() - -/mob/living/simple_animal/hostile/poison/bees/proc/pollinate(obj/machinery/hydroponics/Hydro) +/mob/living/simple_animal/hostile/bee/proc/pollinate(obj/machinery/hydroponics/Hydro) if(!istype(Hydro) || !Hydro.myseed || Hydro.dead || Hydro.recent_bee_visit) LoseTarget() return @@ -216,7 +212,7 @@ beehome.bee_resources = min(beehome.bee_resources + growth, 100) -/mob/living/simple_animal/hostile/poison/bees/handle_automated_action() +/mob/living/simple_animal/hostile/bee/handle_automated_action() . = ..() if(!.) return @@ -241,15 +237,15 @@ beehome = BB break // End loop after the first compatible find. -/mob/living/simple_animal/hostile/poison/bees/will_escape_storage() +/mob/living/simple_animal/hostile/bee/will_escape_storage() return TRUE -/mob/living/simple_animal/hostile/poison/bees/toxin/Initialize() +/mob/living/simple_animal/hostile/bee/toxin/Initialize() . = ..() var/datum/reagent/R = pick(typesof(/datum/reagent/toxin)) assign_reagent(GLOB.chemical_reagents_list[R]) -/mob/living/simple_animal/hostile/poison/bees/queen +/mob/living/simple_animal/hostile/bee/queen name = "queen bee" desc = "She's the queen of bees, BZZ BZZ!" icon_base = "queen" @@ -257,12 +253,12 @@ //the Queen doesn't leave the box on her own, and she CERTAINLY doesn't pollinate by herself -/mob/living/simple_animal/hostile/poison/bees/queen/Found(atom/A) +/mob/living/simple_animal/hostile/bee/queen/Found(atom/A) return FALSE //leave pollination for the peasent bees -/mob/living/simple_animal/hostile/poison/bees/queen/AttackingTarget() +/mob/living/simple_animal/hostile/bee/queen/AttackingTarget() . = ..() if(. && beegent && isliving(target)) var/mob/living/L = target @@ -271,13 +267,13 @@ //PEASENT BEES -/mob/living/simple_animal/hostile/poison/bees/queen/pollinate() +/mob/living/simple_animal/hostile/bee/queen/pollinate() return -/mob/living/simple_animal/hostile/poison/bees/queen/will_escape_storage() +/mob/living/simple_animal/hostile/bee/queen/will_escape_storage() return FALSE -/mob/living/simple_animal/hostile/poison/bees/proc/reagent_incompatible(mob/living/simple_animal/hostile/poison/bees/B) +/mob/living/simple_animal/hostile/bee/proc/reagent_incompatible(mob/living/simple_animal/hostile/bee/B) if(!B) return FALSE if(B.beegent && beegent && B.beegent.type != beegent.type || B.beegent && !beegent || !B.beegent && beegent) @@ -291,7 +287,7 @@ icon_state = "queen_item" inhand_icon_state = "" icon = 'icons/mob/bees.dmi' - var/mob/living/simple_animal/hostile/poison/bees/queen/queen + var/mob/living/simple_animal/hostile/bee/queen/queen /obj/item/queen_bee/attackby(obj/item/I, mob/user, params) @@ -329,7 +325,7 @@ QDEL_NULL(queen) return ..() -/mob/living/simple_animal/hostile/poison/bees/consider_wakeup() +/mob/living/simple_animal/hostile/bee/consider_wakeup() if (beehome && loc == beehome) // If bees are chilling in their nest, they're not actively looking for targets idle = min(100, ++idle) if(idle >= BEE_IDLE_ROAMING && prob(BEE_PROB_GOROAM)) @@ -338,10 +334,10 @@ else ..() -/mob/living/simple_animal/hostile/poison/bees/short +/mob/living/simple_animal/hostile/bee/short desc = "These bees seem unstable and won't survive for long." -/mob/living/simple_animal/hostile/poison/bees/short/Initialize(mapload, timetolive=50 SECONDS) +/mob/living/simple_animal/hostile/bee/short/Initialize(mapload, timetolive=50 SECONDS) . = ..() addtimer(CALLBACK(src, .proc/death), timetolive) diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index ee7ce5e779b..cfff096fbb7 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -1,29 +1,3 @@ -/** - * # Poison Hostile Simplemob - * - * A subtype of the hostile simplemob which injects reagents into its target on attack, assuming the target accepts reagents. - */ -/mob/living/simple_animal/hostile/poison - ///How much of a reagent the mob injects on attack - var/poison_per_bite = 5 - ///What reagent the mob injects targets with - var/poison_type = /datum/reagent/toxin - -/mob/living/simple_animal/hostile/poison/AttackingTarget() - . = ..() - if(.) - inject_poison(target) - -/** - * Injects poison into a given target. - * - * Checks if a given target accepts reagents, and then injects a given reagent into them if so. - * Arguments: - * * living_target - The targeted mob - */ -/mob/living/simple_animal/hostile/poison/proc/inject_poison(mob/living/living_target) - if(poison_per_bite != 0 && living_target?.reagents) - living_target.reagents.add_reagent(poison_type, poison_per_bite) /** * # Giant Spider @@ -33,7 +7,7 @@ * A mob which can be created by botany or xenobiology. The basic type is the guard, which is slower but sturdy and outputs good damage. * All spiders can produce webbing. Currently does not inject toxin into its target. */ -/mob/living/simple_animal/hostile/poison/giant_spider +/mob/living/simple_animal/hostile/giant_spider name = "giant spider" desc = "Furry and black, it makes you shudder to look at it. This one has deep red eyes." icon_state = "guard" @@ -72,7 +46,10 @@ gold_core_spawnable = HOSTILE_SPAWN lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE footstep_type = FOOTSTEP_MOB_CLAW - poison_per_bite = 0 + ///How much of a reagent the mob injects on attack + var/poison_per_bite = 0 + ///What reagent the mob injects targets with + var/poison_type = /datum/reagent/toxin ///Whether or not the spider is in the middle of an action. var/is_busy = FALSE ///How quickly the spider can place down webbing. One is base speed, larger numbers are slower. @@ -84,12 +61,14 @@ /// Short description of what this mob is capable of, for radial menu uses var/menu_description = "Versatile spider variant for frontline combat. Jack of all trades, master of none. Does not inject toxin." -/mob/living/simple_animal/hostile/poison/giant_spider/Initialize() +/mob/living/simple_animal/hostile/giant_spider/Initialize() . = ..() lay_web = new lay_web.Grant(src) + if(poison_per_bite) + AddElement(/datum/element/venomous, poison_type, poison_per_bite) -/mob/living/simple_animal/hostile/poison/giant_spider/Login() +/mob/living/simple_animal/hostile/giant_spider/Login() . = ..() if(!. || !client) return FALSE @@ -100,11 +79,11 @@ mind.store_memory("[directive]") GLOB.spidermobs[src] = TRUE -/mob/living/simple_animal/hostile/poison/giant_spider/Destroy() +/mob/living/simple_animal/hostile/giant_spider/Destroy() GLOB.spidermobs -= src return ..() -/mob/living/simple_animal/hostile/poison/giant_spider/mob_negates_gravity() +/mob/living/simple_animal/hostile/giant_spider/mob_negates_gravity() return ..() || (locate(/obj/structure/spider/stickyweb) in loc) /** @@ -114,7 +93,7 @@ * * A subtype of the giant spider which is faster, has toxin injection, but less health. This spider is only slightly slower than a human. */ -/mob/living/simple_animal/hostile/poison/giant_spider/hunter +/mob/living/simple_animal/hostile/giant_spider/hunter name = "hunter spider" desc = "Furry and black, it makes you shudder to look at it. This one has sparkling purple eyes." icon_state = "hunter" @@ -137,7 +116,7 @@ * A subtype of the giant spider which specializes in support skills. Nurses can place down webbing in a quarter of the time * that other species can and can wrap other spiders' wounds, healing them. Note that it cannot heal itself. */ -/mob/living/simple_animal/hostile/poison/giant_spider/nurse +/mob/living/simple_animal/hostile/giant_spider/nurse name = "nurse spider" desc = "Furry and black, it makes you shudder to look at it. This one has brilliant green eyes." icon_state = "nurse" @@ -155,17 +134,17 @@ ///The health HUD applied to the mob. var/health_hud = DATA_HUD_MEDICAL_ADVANCED -/mob/living/simple_animal/hostile/poison/giant_spider/nurse/Initialize() +/mob/living/simple_animal/hostile/giant_spider/nurse/Initialize() . = ..() var/datum/atom_hud/datahud = GLOB.huds[health_hud] datahud.add_hud_to(src) -/mob/living/simple_animal/hostile/poison/giant_spider/nurse/AttackingTarget() +/mob/living/simple_animal/hostile/giant_spider/nurse/AttackingTarget() if(is_busy) return - if(!istype(target, /mob/living/simple_animal/hostile/poison/giant_spider)) + if(!istype(target, /mob/living/simple_animal/hostile/giant_spider)) return ..() - var/mob/living/simple_animal/hostile/poison/giant_spider/hurt_spider = target + var/mob/living/simple_animal/hostile/giant_spider/hurt_spider = target if(hurt_spider == src) to_chat(src, "You don't have the dexerity to wrap your own wounds.") return @@ -188,7 +167,7 @@ * A subtype of the giant spider which specializes in pure strength and staying power. Is slowed down greatly when not on webbing, but can lunge * to throw off attackers and possibly to stun them, allowing the tarantula to net an easy kill. */ -/mob/living/simple_animal/hostile/poison/giant_spider/tarantula +/mob/living/simple_animal/hostile/giant_spider/tarantula name = "tarantula" desc = "Furry and black, it makes you shudder to look at it. This one has abyssal red eyes." icon_state = "tarantula" @@ -214,12 +193,12 @@ ///The spider's charge ability var/obj/effect/proc_holder/tarantula_charge/charge -/mob/living/simple_animal/hostile/poison/giant_spider/tarantula/Initialize() +/mob/living/simple_animal/hostile/giant_spider/tarantula/Initialize() . = ..() charge = new AddAbility(charge) -/mob/living/simple_animal/hostile/poison/giant_spider/tarantula/Moved(atom/oldloc, dir) +/mob/living/simple_animal/hostile/giant_spider/tarantula/Moved(atom/oldloc, dir) . = ..() var/obj/structure/spider/stickyweb/web = locate() in loc if(web && !silk_walking) @@ -237,7 +216,7 @@ * A subtype of the giant spider which specializes in speed and poison. Injects a deadlier toxin than other spiders, moves extremely fast, * but like the hunter has a limited amount of health. */ -/mob/living/simple_animal/hostile/poison/giant_spider/viper +/mob/living/simple_animal/hostile/giant_spider/viper name = "viper spider" desc = "Furry and black, it makes you shudder to look at it. This one has effervescent purple eyes." icon_state = "viper" @@ -264,7 +243,7 @@ * However, this spider subtype has no offensive capability and can be quickly dispatched without assistance from other spiders. They are also capable * of sending messages to all living spiders, being a communication line for the rest of the horde. */ -/mob/living/simple_animal/hostile/poison/giant_spider/midwife +/mob/living/simple_animal/hostile/giant_spider/midwife name = "broodmother spider" desc = "Furry and black, it makes you shudder to look at it. This one has scintillating green eyes. Might also be hiding a real knife somewhere." gender = FEMALE @@ -295,7 +274,7 @@ ///The ability for the spider to send a message to all currently living spiders. var/datum/action/innate/spider/comm/letmetalkpls -/mob/living/simple_animal/hostile/poison/giant_spider/midwife/Initialize() +/mob/living/simple_animal/hostile/giant_spider/midwife/Initialize() . = ..() wrap = new AddAbility(wrap) @@ -314,13 +293,13 @@ * Attempts to coccon the spider's cocoon_target after a do_after. * If the target is a human who hasn't been drained before, ups the spider's fed counter so it can lay enriched eggs. */ -/mob/living/simple_animal/hostile/poison/giant_spider/midwife/proc/cocoon() +/mob/living/simple_animal/hostile/giant_spider/midwife/proc/cocoon() if(stat == DEAD || !cocoon_target || cocoon_target.anchored) return if(cocoon_target == src) to_chat(src, "You can't wrap yourself!") return - if(istype(cocoon_target, /mob/living/simple_animal/hostile/poison/giant_spider)) + if(istype(cocoon_target, /mob/living/simple_animal/hostile/giant_spider)) to_chat(src, "You can't wrap other spiders!") return if(!Adjacent(cocoon_target)) @@ -363,9 +342,9 @@ button_icon_state = "lay_web" /datum/action/innate/spider/lay_web/Activate() - if(!istype(owner, /mob/living/simple_animal/hostile/poison/giant_spider)) + if(!istype(owner, /mob/living/simple_animal/hostile/giant_spider)) return - var/mob/living/simple_animal/hostile/poison/giant_spider/spider = owner + var/mob/living/simple_animal/hostile/giant_spider/spider = owner if(!isturf(spider.loc)) return @@ -409,9 +388,9 @@ return ..() /obj/effect/proc_holder/wrap/Click() - if(!istype(usr, /mob/living/simple_animal/hostile/poison/giant_spider/midwife)) + if(!istype(usr, /mob/living/simple_animal/hostile/giant_spider/midwife)) return TRUE - var/mob/living/simple_animal/hostile/poison/giant_spider/midwife/user = usr + var/mob/living/simple_animal/hostile/giant_spider/midwife/user = usr activate(user) return TRUE @@ -428,18 +407,18 @@ /obj/effect/proc_holder/wrap/InterceptClickOn(mob/living/caller, params, atom/target) if(..()) return - if(ranged_ability_user.incapacitated() || !istype(ranged_ability_user, /mob/living/simple_animal/hostile/poison/giant_spider/midwife)) + if(ranged_ability_user.incapacitated() || !istype(ranged_ability_user, /mob/living/simple_animal/hostile/giant_spider/midwife)) remove_ranged_ability() return - var/mob/living/simple_animal/hostile/poison/giant_spider/midwife/user = ranged_ability_user + var/mob/living/simple_animal/hostile/giant_spider/midwife/user = ranged_ability_user if(user.Adjacent(target) && (ismob(target) || isobj(target))) var/atom/movable/target_atom = target if(target_atom.anchored) return user.cocoon_target = target_atom - INVOKE_ASYNC(user, /mob/living/simple_animal/hostile/poison/giant_spider/midwife/.proc/cocoon) + INVOKE_ASYNC(user, /mob/living/simple_animal/hostile/giant_spider/midwife/.proc/cocoon) remove_ranged_ability() return TRUE @@ -467,15 +446,15 @@ return ..() /obj/effect/proc_holder/tarantula_charge/Click() - if(!istype(usr, /mob/living/simple_animal/hostile/poison/giant_spider/tarantula)) + if(!istype(usr, /mob/living/simple_animal/hostile/giant_spider/tarantula)) return TRUE - var/mob/living/simple_animal/hostile/poison/giant_spider/tarantula/user = usr + var/mob/living/simple_animal/hostile/giant_spider/tarantula/user = usr activate(user) return TRUE /obj/effect/proc_holder/tarantula_charge/proc/activate(mob/living/user) var/message - var/mob/living/simple_animal/hostile/poison/giant_spider/tarantula/spider = user + var/mob/living/simple_animal/hostile/giant_spider/tarantula/spider = user if(active) message = "You stop preparing to charge." remove_ranged_ability(message) @@ -490,11 +469,11 @@ /obj/effect/proc_holder/tarantula_charge/InterceptClickOn(mob/living/caller, params, atom/target) if(..()) return - if(ranged_ability_user.incapacitated() || !istype(ranged_ability_user, /mob/living/simple_animal/hostile/poison/giant_spider/tarantula)) + if(ranged_ability_user.incapacitated() || !istype(ranged_ability_user, /mob/living/simple_animal/hostile/giant_spider/tarantula)) remove_ranged_ability() return - var/mob/living/simple_animal/hostile/poison/giant_spider/tarantula/user = ranged_ability_user + var/mob/living/simple_animal/hostile/giant_spider/tarantula/user = ranged_ability_user INVOKE_ASYNC(user, /mob/living/simple_animal/hostile/.proc/enter_charge, target) remove_ranged_ability() @@ -514,17 +493,17 @@ . = ..() if(!.) return - if(!istype(owner, /mob/living/simple_animal/hostile/poison/giant_spider/midwife)) + if(!istype(owner, /mob/living/simple_animal/hostile/giant_spider/midwife)) return FALSE - var/mob/living/simple_animal/hostile/poison/giant_spider/midwife/S = owner + var/mob/living/simple_animal/hostile/giant_spider/midwife/S = owner if(enriched && !S.fed) return FALSE return TRUE /datum/action/innate/spider/lay_eggs/Activate() - if(!istype(owner, /mob/living/simple_animal/hostile/poison/giant_spider/midwife)) + if(!istype(owner, /mob/living/simple_animal/hostile/giant_spider/midwife)) return - var/mob/living/simple_animal/hostile/poison/giant_spider/midwife/spider = owner + var/mob/living/simple_animal/hostile/giant_spider/midwife/spider = owner var/obj/structure/spider/eggcluster/eggs = locate() in get_turf(spider) if(eggs) @@ -563,14 +542,14 @@ /datum/action/innate/spider/set_directive/IsAvailable() if(..()) - if(!istype(owner, /mob/living/simple_animal/hostile/poison/giant_spider)) + if(!istype(owner, /mob/living/simple_animal/hostile/giant_spider)) return FALSE return TRUE /datum/action/innate/spider/set_directive/Activate() - if(!istype(owner, /mob/living/simple_animal/hostile/poison/giant_spider/midwife)) + if(!istype(owner, /mob/living/simple_animal/hostile/giant_spider/midwife)) return - var/mob/living/simple_animal/hostile/poison/giant_spider/midwife/spider = owner + var/mob/living/simple_animal/hostile/giant_spider/midwife/spider = owner spider.directive = stripped_input(spider, "Enter the new directive", "Create directive", "[spider.directive]") message_admins("[ADMIN_LOOKUPFLW(owner)] set its directive to: '[spider.directive]'.") log_game("[key_name(owner)] set its directive to: '[spider.directive]'.") @@ -581,7 +560,7 @@ button_icon_state = "command" /datum/action/innate/spider/comm/IsAvailable() - if(!istype(owner, /mob/living/simple_animal/hostile/poison/giant_spider/midwife)) + if(!istype(owner, /mob/living/simple_animal/hostile/giant_spider/midwife)) return FALSE return TRUE @@ -605,7 +584,7 @@ return var/my_message my_message = "Command from [user]: [message]" - for(var/mob/living/simple_animal/hostile/poison/giant_spider/spider in GLOB.spidermobs) + for(var/mob/living/simple_animal/hostile/giant_spider/spider in GLOB.spidermobs) to_chat(spider, my_message) for(var/ghost in GLOB.dead_mob_list) var/link = FOLLOW_LINK(ghost, user) @@ -620,7 +599,7 @@ * A subtype of the giant spider which is immune to temperature damage, unlike its normal counterpart. * Currently unused in the game unless spawned by admins. */ -/mob/living/simple_animal/hostile/poison/giant_spider/ice +/mob/living/simple_animal/hostile/giant_spider/ice name = "giant ice spider" 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 @@ -637,7 +616,7 @@ * * Same thing as the giant ice spider but mirrors the nurse subtype. Also unused. */ -/mob/living/simple_animal/hostile/poison/giant_spider/nurse/ice +/mob/living/simple_animal/hostile/giant_spider/nurse/ice name = "giant ice spider" 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 @@ -653,7 +632,7 @@ * * Same thing as the giant ice spider but mirrors the hunter subtype. Also unused. */ -/mob/living/simple_animal/hostile/poison/giant_spider/hunter/ice +/mob/living/simple_animal/hostile/giant_spider/hunter/ice name = "giant ice spider" 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 @@ -670,7 +649,7 @@ * * Mainly used as a minor threat in abandoned places, such as areas in maintenance or a ruin. */ -/mob/living/simple_animal/hostile/poison/giant_spider/hunter/scrawny +/mob/living/simple_animal/hostile/giant_spider/hunter/scrawny name = "scrawny spider" environment_smash = ENVIRONMENT_SMASH_NONE health = 60 @@ -687,7 +666,7 @@ * * Mainly used as a moderately strong but slow threat in abandoned places, such as areas in maintenance or a ruin. */ -/mob/living/simple_animal/hostile/poison/giant_spider/tarantula/scrawny +/mob/living/simple_animal/hostile/giant_spider/tarantula/scrawny name = "scrawny tarantula" environment_smash = ENVIRONMENT_SMASH_NONE health = 150 @@ -704,7 +683,7 @@ * * Mainly used as a weak threat in abandoned places, such as areas in maintenance or a ruin. */ -/mob/living/simple_animal/hostile/poison/giant_spider/nurse/scrawny +/mob/living/simple_animal/hostile/giant_spider/nurse/scrawny name = "scrawny nurse spider" environment_smash = ENVIRONMENT_SMASH_NONE health = 30 @@ -720,7 +699,7 @@ * A subtype of giant spider which only occurs from changelings. Has the base stats of a hunter, but they can heal themselves. * They also produce web in 70% of the time of the base spider. They also occasionally leave puddles of blood when they walk around. Flavorful! */ -/mob/living/simple_animal/hostile/poison/giant_spider/hunter/flesh +/mob/living/simple_animal/hostile/giant_spider/hunter/flesh desc = "A odd fleshy creature in the shape of a spider. Its eyes are pitch black and soulless." icon_state = "flesh_spider" icon_living = "flesh_spider" @@ -728,12 +707,12 @@ web_speed = 0.7 menu_description = "Self-sufficient spider variant capable of healing themselves and producing webbbing fast, but has less health. Toxin injection of 10u per bite." -/mob/living/simple_animal/hostile/poison/giant_spider/hunter/flesh/Moved(atom/oldloc, dir) +/mob/living/simple_animal/hostile/giant_spider/hunter/flesh/Moved(atom/oldloc, dir) . = ..() if(prob(5)) new /obj/effect/decal/cleanable/blood/bubblegum(loc) -/mob/living/simple_animal/hostile/poison/giant_spider/hunter/flesh/AttackingTarget() +/mob/living/simple_animal/hostile/giant_spider/hunter/flesh/AttackingTarget() if(is_busy) return if(src == target) @@ -757,11 +736,11 @@ * * A viper spider with buffed attributes. All I changed was its health value and gave it the ability to ventcrawl. The crux of the wizard meta. */ -/mob/living/simple_animal/hostile/poison/giant_spider/viper/wizard +/mob/living/simple_animal/hostile/giant_spider/viper/wizard maxHealth = 80 health = 80 menu_description = "Stronger assassin spider variant with an unmatched speed, high amount of health and very deadly poison, but deals very low amount of damage. It also has ability to ventcrawl. Venom injection of 6u per bite." -/mob/living/simple_animal/hostile/poison/giant_spider/viper/wizard/Initialize() +/mob/living/simple_animal/hostile/giant_spider/viper/wizard/Initialize() . = ..() ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 9d33e4ee283..af4fc18a68e 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -66,7 +66,7 @@ ///Declares a cooldown for potential charges right off the bat. COOLDOWN_DECLARE(charge_cooldown) -/mob/living/simple_animal/hostile/Initialize() +/mob/living/simple_animal/hostile/Initialize(mapload) . = ..() if(!targets_from) @@ -351,9 +351,11 @@ /mob/living/simple_animal/hostile/proc/AttackingTarget(atom/attacked_target) - SEND_SIGNAL(src, COMSIG_HOSTILE_ATTACKINGTARGET, target) in_melee = TRUE - return target.attack_animal(src) + SEND_SIGNAL(src, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, target) + var/result = target.attack_animal(src) + SEND_SIGNAL(src, COMSIG_HOSTILE_POST_ATTACKINGTARGET, target, result) + return result /mob/living/simple_animal/hostile/proc/Aggro() vision_range = aggro_vision_range diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm index 6fd4e45a883..d9bdd97388c 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm @@ -39,6 +39,11 @@ var/banana_type = /obj/item/grown/bananapeel var/attack_reagent +/mob/living/simple_animal/hostile/retaliate/clown/Initialize(mapload) + . = ..() + if(attack_reagent) + AddElement(/datum/element/venomous, attack_reagent, list(1, 5)) + /mob/living/simple_animal/hostile/retaliate/clown/attack_hand(mob/living/carbon/human/user, list/modifiers) ..() playsound(loc, 'sound/items/bikehorn.ogg', 50, TRUE) @@ -51,13 +56,6 @@ new banana_type(pick(adjacent)) banana_time = world.time + rand(30,60) -/mob/living/simple_animal/hostile/retaliate/clown/AttackingTarget() - . = ..() - if(attack_reagent && . && isliving(target)) - var/mob/living/L = target - if(L.reagents) - L.reagents.add_reagent(attack_reagent, rand(1,5)) - /mob/living/simple_animal/hostile/retaliate/clown/lube name = "Living Lube" desc = "A puddle of lube brought to life by the honkmother." diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index c3897e07b20..036c4f7d3d6 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -58,7 +58,7 @@ * * set a random nutrition level * * Intialize the movespeed of the mob */ -/mob/Initialize() +/mob/Initialize(mapload) SEND_GLOBAL_SIGNAL(COMSIG_GLOB_MOB_CREATED, src) add_to_mob_list() if(stat == DEAD) diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index cb9065c8aa7..31267ab3ec3 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -231,8 +231,8 @@ /mob/living/simple_animal/hostile/retaliate/bat, /mob/living/simple_animal/hostile/retaliate/goat, /mob/living/simple_animal/hostile/killertomato, - /mob/living/simple_animal/hostile/poison/giant_spider, - /mob/living/simple_animal/hostile/poison/giant_spider/hunter, + /mob/living/simple_animal/hostile/giant_spider, + /mob/living/simple_animal/hostile/giant_spider/hunter, /mob/living/simple_animal/hostile/blob/blobbernaut/independent, /mob/living/simple_animal/hostile/carp/ranged, /mob/living/simple_animal/hostile/carp/ranged/chaos, diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index d490a340fca..1f1deee0131 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -126,7 +126,7 @@ /datum/reagent/toxin/hot_ice name = "Hot Ice Slush" - description = "Frozen plasma, worth its weight in gold, to the right people" + description = "Frozen plasma, worth its weight in gold, to the right people." reagent_state = SOLID color = "#724cb8" // rgb: 114, 76, 184 taste_description = "thick and smokey" diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index f77c5abe7d3..55e8a5c87d2 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -192,7 +192,7 @@ beeagents += R var/bee_amount = round(created_volume * 0.2) for(var/i in 1 to bee_amount) - var/mob/living/simple_animal/hostile/poison/bees/short/new_bee = new(location) + var/mob/living/simple_animal/hostile/bee/short/new_bee = new(location) if(LAZYLEN(beeagents)) new_bee.assign_reagent(pick(beeagents)) diff --git a/code/modules/reagents/chemistry/recipes/slime_extracts.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm index 84d0c2d2cc1..43bea67dab0 100644 --- a/code/modules/reagents/chemistry/recipes/slime_extracts.dm +++ b/code/modules/reagents/chemistry/recipes/slime_extracts.dm @@ -126,7 +126,7 @@ /datum/chemical_reaction/slime/slimemobspawn/spider/summon_mobs(datum/reagents/holder, turf/T) T.visible_message("The slime extract begins to vibrate crikey-ingly!") - addtimer(CALLBACK(src, .proc/chemical_mob_spawn, holder, 3, "Traitor Spider Slime", /mob/living/simple_animal/hostile/poison/giant_spider/midwife, "neutral", FALSE), 50) + addtimer(CALLBACK(src, .proc/chemical_mob_spawn, holder, 3, "Traitor Spider Slime", /mob/living/simple_animal/hostile/giant_spider/midwife, "neutral", FALSE), 50) //Silver diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 230ff0bd5f0..d2e06ef9a96 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -621,7 +621,7 @@ visible_message(message) to_chat(user, message) - var/list/valid_animals = list(/mob/living/simple_animal/parrot, /mob/living/simple_animal/butterfly, /mob/living/simple_animal/pet/cat, /mob/living/simple_animal/pet/dog/corgi, /mob/living/simple_animal/crab, /mob/living/simple_animal/pet/fox, /mob/living/simple_animal/hostile/lizard, /mob/living/simple_animal/mouse, /mob/living/simple_animal/pet/dog/pug, /mob/living/simple_animal/hostile/bear, /mob/living/simple_animal/hostile/poison/bees, /mob/living/simple_animal/hostile/carp) + var/list/valid_animals = list(/mob/living/simple_animal/parrot, /mob/living/simple_animal/butterfly, /mob/living/simple_animal/pet/cat, /mob/living/simple_animal/pet/dog/corgi, /mob/living/simple_animal/crab, /mob/living/simple_animal/pet/fox, /mob/living/simple_animal/hostile/lizard, /mob/living/simple_animal/mouse, /mob/living/simple_animal/pet/dog/pug, /mob/living/simple_animal/hostile/bear, /mob/living/simple_animal/hostile/bee, /mob/living/simple_animal/hostile/carp) for(var/counter in 1 to rand(1, 25)) var/mobType = pick(valid_animals) new mobType(get_turf(src)) diff --git a/code/modules/research/xenobiology/vatgrowing/samples/cell_lines/common.dm b/code/modules/research/xenobiology/vatgrowing/samples/cell_lines/common.dm index 475b7b0f17b..483f288f7d8 100644 --- a/code/modules/research/xenobiology/vatgrowing/samples/cell_lines/common.dm +++ b/code/modules/research/xenobiology/vatgrowing/samples/cell_lines/common.dm @@ -197,7 +197,7 @@ /datum/reagent/consumable/corn_syrup = -6, /datum/reagent/sulfur = -3) //sulfur repels snakes according to professor google. - resulting_atoms = list(/mob/living/simple_animal/hostile/retaliate/poison/snake = 1) + resulting_atoms = list(/mob/living/simple_animal/hostile/retaliate/snake = 1) /////////////////////////////////////////// diff --git a/code/modules/spells/spell_types/shapeshift.dm b/code/modules/spells/spell_types/shapeshift.dm index 9a81ff8d36b..d2d04b53f09 100644 --- a/code/modules/spells/spell_types/shapeshift.dm +++ b/code/modules/spells/spell_types/shapeshift.dm @@ -22,7 +22,7 @@ /mob/living/simple_animal/pet/dog/corgi,\ /mob/living/simple_animal/hostile/carp/ranged/chaos,\ /mob/living/simple_animal/bot/secbot/ed209,\ - /mob/living/simple_animal/hostile/poison/giant_spider/viper/wizard,\ + /mob/living/simple_animal/hostile/giant_spider/viper/wizard,\ /mob/living/simple_animal/hostile/construct/juggernaut/mystic) /obj/effect/proc_holder/spell/targeted/shapeshift/cast(list/targets,mob/user = usr) diff --git a/code/modules/spells/spell_types/wizard.dm b/code/modules/spells/spell_types/wizard.dm index c2218bfe730..e8c50cc29d0 100644 --- a/code/modules/spells/spell_types/wizard.dm +++ b/code/modules/spells/spell_types/wizard.dm @@ -240,7 +240,7 @@ action_icon_state = "bee" cooldown_min = 20 SECONDS - summon_type = /mob/living/simple_animal/hostile/poison/bees/toxin + summon_type = /mob/living/simple_animal/hostile/bee/toxin cast_sound = 'sound/voice/moth/scream_moth.ogg' /obj/effect/proc_holder/spell/aoe_turf/repulse diff --git a/tgstation.dme b/tgstation.dme index f0827243c2c..957b82130bd 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -704,6 +704,7 @@ #include "code\datums\elements\undertile.dm" #include "code\datums\elements\update_icon_blocker.dm" #include "code\datums\elements\update_icon_updates_onmob.dm" +#include "code\datums\elements\venomous.dm" #include "code\datums\elements\waddling.dm" #include "code\datums\elements\decals\blood.dm" #include "code\datums\elements\food\dunkable.dm"