Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fenny, Dan & Andy eat the code like vultures supping on roadkill #3271

Merged
merged 4 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 6 additions & 22 deletions _maps/map_files/Pahrump-Sunset/RedRiver.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -452,12 +452,6 @@
name = "the watering hole"
},
/area/f13/wasteland)
"aiX" = (
/mob/living/carbon/human/species,
/turf/open/indestructible/ground/outside/road{
icon_state = "horizontalbottombordertop0"
},
/area/f13/wasteland/city)
"aja" = (
/obj/effect/decal/marking{
icon_state = "doublehorizontal"
Expand Down Expand Up @@ -7637,7 +7631,6 @@
/area/f13/building/abandoned)
"dvA" = (
/mob/living/simple_animal/hostile/poison/giant_spider/nurse,
/mob/living/carbon/human/species,
/turf/open/floor/f13{
icon_state = "floorrusty"
},
Expand Down Expand Up @@ -24641,11 +24634,6 @@
icon_state = "horizontalbottomborderbottom0"
},
/area/f13/wasteland/city)
"kPi" = (
/obj/structure/spider/stickyweb,
/mob/living/carbon/human/species,
/turf/open/indestructible/ground/outside/sidewalk,
/area/f13/wasteland/city)
"kPp" = (
/obj/structure/flora/grass/jungle/b,
/turf/open/indestructible/ground/outside/dirt,
Expand Down Expand Up @@ -40234,7 +40222,9 @@
/area/f13/wasteland)
"rVZ" = (
/obj/effect/decal/cleanable/dirt/dust,
/obj/structure/simple_door/metal/fence,
/obj/structure/simple_door/metal/fence{
dir = 2
},
/turf/open/floor/plasteel{
icon_state = "asteroidfloor"
},
Expand Down Expand Up @@ -49607,12 +49597,6 @@
/obj/effect/decal/cleanable/dirt,
/turf/open/indestructible/ground/outside/dirt,
/area/f13/wasteland)
"wgw" = (
/mob/living/carbon/human/species,
/turf/open/floor/f13{
icon_state = "bluerustysolid"
},
/area/f13/building/abandoned)
"wgz" = (
/obj/structure/bed/old,
/obj/effect/spawner/lootdrop/bedsheet,
Expand Down Expand Up @@ -58784,7 +58768,7 @@ mvE
ipV
iPM
prM
wgw
eQM
pXJ
qyn
nUC
Expand Down Expand Up @@ -62377,7 +62361,7 @@ tpA
jif
xDc
fmm
aiX
kiu
mvE
cjz
dUR
Expand Down Expand Up @@ -63413,7 +63397,7 @@ dhm
dNe
dNe
wIw
kPi
wIw
wIw
kkA
ioX
Expand Down
7 changes: 7 additions & 0 deletions code/datums/components/mood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,19 @@
RegisterSignal(parent, COMSIG_LIVING_REVIVE, .proc/on_revive)
RegisterSignal(parent, COMSIG_MOB_HUD_CREATED, .proc/modify_hud)
RegisterSignal(parent, COMSIG_MOB_DEATH, .proc/stop_processing)
RegisterSignal(parent, COMSIG_PARENT_QDELETING, .proc/clean_up)

if(owner.hud_used)
modify_hud()
var/datum/hud/hud = owner.hud_used
hud.show_hud(hud.hud_version)

/datum/component/mood/proc/clean_up()
QDEL_LIST_ASSOC_VAL(mood_events)
QDEL_NULL(screen_obj)
QDEL_NULL(malus)
QDEL_NULL(bonus)

/datum/component/mood/Destroy()
STOP_PROCESSING(SSobj, src)
unmodify_hud()
Expand Down
2 changes: 2 additions & 0 deletions code/datums/components/spawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ GLOBAL_VAR_INIT(debug_spawner_turfs, FALSE)
stop_spawning()
if(!am_special)
GLOB.nest_spawn_points |= atom2coords(parent) // we'll be back, eventually
qdel(src)

// Stopping clientless simple mobs' from indiscriminately bashing their own spawners due DestroySurroundings() et similars.
/datum/component/spawner/proc/on_attack_generic(datum/source, mob/user, damage_amount, damage_type, damage_flag, sound_effect, armor_penetration)
Expand All @@ -245,6 +246,7 @@ GLOBAL_VAR_INIT(debug_spawner_turfs, FALSE)
if(has_mobs_left())
return FALSE
if(ismob(parent))
qdel(src)
return FALSE // no more self-destructing ant queens
return TRUE

Expand Down
1 change: 1 addition & 0 deletions code/datums/components/swarming.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/join_swarm)
RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, .proc/leave_swarm)
RegisterSignal(parent, COMSIG_MOB_DEATH, .proc/leave_swarm)

/datum/component/swarming/Destroy()
if(is_swarming)
Expand Down
132 changes: 67 additions & 65 deletions code/modules/mob/living/simple_animal/hostile/giant_spider.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@

/mob/living/simple_animal/hostile/poison/giant_spider/Initialize()
. = ..()
lay_web = new
lay_web.Grant(src)
// lay_web = new
// lay_web.Grant(src)

/mob/living/simple_animal/hostile/poison/giant_spider/Destroy()
QDEL_NULL(lay_web)
// QDEL_NULL(lay_web)
return ..()

/mob/living/simple_animal/hostile/poison/giant_spider/Topic(href, href_list)
Expand Down Expand Up @@ -122,17 +122,17 @@

/mob/living/simple_animal/hostile/poison/giant_spider/nurse/Initialize()
. = ..()
wrap = new
AddAbility(wrap)
lay_eggs = new
lay_eggs.Grant(src)
set_directive = new
set_directive.Grant(src)
// wrap = new
// AddAbility(wrap)
// lay_eggs = new
// lay_eggs.Grant(src)
// set_directive = new
// set_directive.Grant(src)

/mob/living/simple_animal/hostile/poison/giant_spider/nurse/Destroy()
RemoveAbility(wrap)
QDEL_NULL(lay_eggs)
QDEL_NULL(set_directive)
// RemoveAbility(wrap)
// QDEL_NULL(lay_eggs)
// QDEL_NULL(set_directive)
return ..()

//hunters have the most poison and move the fastest, so they can find prey
Expand Down Expand Up @@ -208,11 +208,11 @@

/mob/living/simple_animal/hostile/poison/giant_spider/nurse/midwife/Initialize()
. = ..()
letmetalkpls = new
letmetalkpls.Grant(src)
// letmetalkpls = new
// letmetalkpls.Grant(src)

/mob/living/simple_animal/hostile/poison/giant_spider/nurse/midwife/Destroy()
QDEL_NULL(letmetalkpls)
// QDEL_NULL(letmetalkpls)
return ..()

/mob/living/simple_animal/hostile/poison/giant_spider/ice //spiders dont usually like tempatures of 140 kelvin who knew
Expand Down Expand Up @@ -256,57 +256,59 @@
return 1

/mob/living/simple_animal/hostile/poison/giant_spider/nurse/proc/GiveUp(C)
spawn(100)
if(busy == MOVING_TO_TARGET)
if(cocoon_target == C && get_dist(src,cocoon_target) > 1)
cocoon_target = null
busy = FALSE
stop_automated_movement = 0
return
// spawn(100)
// if(busy == MOVING_TO_TARGET)
// if(cocoon_target == C && get_dist(src,cocoon_target) > 1)
// cocoon_target = null
// busy = FALSE
// stop_automated_movement = 0

/mob/living/simple_animal/hostile/poison/giant_spider/nurse/handle_automated_action()
if(..())
var/list/can_see = view(src, 10)
if(!busy && prob(30)) //30% chance to stop wandering and do something
//first, check for potential food nearby to cocoon
for(var/mob/living/C in can_see)
if(C.stat && !istype(C, /mob/living/simple_animal/hostile/poison/giant_spider) && !C.anchored)
cocoon_target = C
busy = MOVING_TO_TARGET
Goto(C, move_to_delay)
//give up if we can't reach them after 10 seconds
GiveUp(C)
return

//second, spin a sticky spiderweb on this tile
var/obj/structure/spider/stickyweb/W = locate() in get_turf(src)
if(!W)
lay_web.Activate()
else
//third, lay an egg cluster there
if(fed)
lay_eggs.Activate()
else
//fourthly, cocoon any nearby items so those pesky pinkskins can't use them
for(var/obj/O in can_see)

if(O.anchored)
continue

if(isitem(O) || isstructure(O) || ismachinery(O))
cocoon_target = O
busy = MOVING_TO_TARGET
stop_automated_movement = 1
Goto(O, move_to_delay)
//give up if we can't reach them after 10 seconds
GiveUp(O)

else if(busy == MOVING_TO_TARGET && cocoon_target)
if(get_dist(src, cocoon_target) <= 1)
cocoon()

else
busy = SPIDER_IDLE
stop_automated_movement = FALSE
return ..()
// if(..())
// var/list/can_see = view(src, 10)
// if(!busy && prob(30)) //30% chance to stop wandering and do something
// //first, check for potential food nearby to cocoon
// for(var/mob/living/C in can_see)
// if(C.stat && !istype(C, /mob/living/simple_animal/hostile/poison/giant_spider) && !C.anchored)
// cocoon_target = C
// busy = MOVING_TO_TARGET
// Goto(C, move_to_delay)
// //give up if we can't reach them after 10 seconds
// GiveUp(C)
// return

// //second, spin a sticky spiderweb on this tile
// var/obj/structure/spider/stickyweb/W = locate() in get_turf(src)
// if(!W)
// lay_web.Activate()
// else
// //third, lay an egg cluster there
// if(fed)
// lay_eggs.Activate()
// else
// //fourthly, cocoon any nearby items so those pesky pinkskins can't use them
// for(var/obj/O in can_see)

// if(O.anchored)
// continue

// if(isitem(O) || isstructure(O) || ismachinery(O))
// cocoon_target = O
// busy = MOVING_TO_TARGET
// stop_automated_movement = 1
// Goto(O, move_to_delay)
// //give up if we can't reach them after 10 seconds
// GiveUp(O)

// else if(busy == MOVING_TO_TARGET && cocoon_target)
// if(get_dist(src, cocoon_target) <= 1)
// cocoon()

// else
// busy = SPIDER_IDLE
// stop_automated_movement = FALSE

/mob/living/simple_animal/hostile/poison/giant_spider/nurse/proc/cocoon()
if(stat != DEAD && cocoon_target && !cocoon_target.anchored)
Expand All @@ -332,7 +334,7 @@
if(isliving(cocoon_target))
var/mob/living/L = cocoon_target
if(L.blood_volume && (L.stat != DEAD || !consumed_mobs[L.tag])) //if they're not dead, you can consume them anyway
consumed_mobs[L.tag] = TRUE
// consumed_mobs[L.tag] = TRUE
fed++
lay_eggs.UpdateButtonIcon(TRUE)
visible_message(span_danger("[src] sticks a proboscis into [L] and sucks a viscous substance out."),span_notice("You suck the nutriment out of [L], feeding you enough to lay a cluster of eggs."))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/simple_animal/hostile/regalrat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@

/mob/living/simple_animal/hostile/rat/Initialize()
. = ..()
SSmobs.cheeserats += src
// SSmobs.cheeserats += src
AddComponent(/datum/component/swarming)
AddElement(/datum/element/mob_holder, "mouse_gray")
if(!is_smol)
Expand Down
Loading