mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
Additional mining tweaks on zone handling
Keep 2 zones clean instead of 1 Give 10 points for free, for progressing zones Always score zones unless already scored, if asked to Space geese are SPACE geese
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
/mob/living/simple_animal/hostile/goose
|
||||
//Space geese aren't affected by atmos.
|
||||
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
|
||||
@@ -147,7 +147,7 @@ var/datum/controller/rogue/rm_controller = new()
|
||||
ZM_target = pick(clean_zones)
|
||||
|
||||
if(ZM_target)
|
||||
world.log << "RM(stats): SCORING [ready_zones.len] zones." //DEBUG code for playtest stats gathering.
|
||||
world.log << "RM(stats): SCORING [ready_zones.len] zones (if unscored)." //DEBUG code for playtest stats gathering.
|
||||
for(var/datum/rogue/zonemaster/ZM_toscore in ready_zones) //Score all the zones first.
|
||||
if(ZM_toscore.scored) continue
|
||||
ZM_toscore.score_zone()
|
||||
@@ -155,7 +155,7 @@ var/datum/controller/rogue/rm_controller = new()
|
||||
else
|
||||
rm_controller.dbg("RMC(pnz): I was asked for a new zone but there's no space.")
|
||||
|
||||
if(clean_zones.len <= 0) //Need to clean the oldest one, too.
|
||||
if(clean_zones.len <= 1) //Need to clean the oldest one, too.
|
||||
rm_controller.dbg("RMC(pnz): Cleaning up oldest zone.")
|
||||
spawn(0) //Detatch it so we can return the new zone for now.
|
||||
var/datum/rogue/zonemaster/ZM_oldest = get_oldest_zone()
|
||||
|
||||
@@ -329,11 +329,9 @@
|
||||
///////////////////////////////
|
||||
///// Zone Cleaning ///////////
|
||||
///////////////////////////////
|
||||
/datum/rogue/zonemaster/proc/score_zone(var/bonus = 0)
|
||||
if(clean || !ready)
|
||||
return
|
||||
|
||||
/datum/rogue/zonemaster/proc/score_zone(var/bonus = 10)
|
||||
rm_controller.dbg("ZM(sz): Scoring zone with area [myarea].")
|
||||
scored = 1
|
||||
var/tally = bonus
|
||||
|
||||
//Ore-bearing rocks that were mined
|
||||
@@ -369,8 +367,14 @@
|
||||
//Overall 'destroy' proc (marks as unready)
|
||||
/datum/rogue/zonemaster/proc/clean_zone(var/delay = 1)
|
||||
rm_controller.dbg("ZM(cz): Cleaning zone with area [myarea].")
|
||||
world.log << "RM(stats): CLEAN start [myarea] at [world.time] prepared at [prepared_at]." //DEBUG code for playtest stats gathering.
|
||||
rm_controller.unmark_ready(src)
|
||||
|
||||
//Cut these lists so qdel can dereference the things properly
|
||||
mineral_rocks.Cut()
|
||||
spawned_mobs.Cut()
|
||||
rockspawns.Cut()
|
||||
mobspawns.Cut()
|
||||
|
||||
var/ignored = list(
|
||||
/obj/asteroid_spawner,
|
||||
@@ -380,8 +384,6 @@
|
||||
/obj/effect/step_trigger/teleporter/random/rogue/fourbyfour/ontop,
|
||||
/obj/effect/step_trigger/teleporter/random/rogue/fourbyfour/onbottom)
|
||||
|
||||
var/deleted = 0
|
||||
|
||||
for(var/atom/I in myarea.contents)
|
||||
if(I.type == /turf/space)
|
||||
I.overlays.Cut()
|
||||
@@ -389,33 +391,23 @@
|
||||
else if(I.type in ignored)
|
||||
continue
|
||||
qdel(I)
|
||||
deleted++
|
||||
if(delay)
|
||||
sleep(delay)
|
||||
sleep(delay)
|
||||
|
||||
//A deletion so nice that I give it twice
|
||||
for(var/atom/I in myarea.contents)
|
||||
if(I.type in ignored)
|
||||
continue
|
||||
qdel(I)
|
||||
deleted++
|
||||
if(delay)
|
||||
sleep(delay)
|
||||
|
||||
rm_controller.dbg("ZM(cz): Deleted [deleted] atoms in [myarea].")
|
||||
|
||||
mineral_rocks.Cut()
|
||||
spawned_mobs.Cut()
|
||||
rockspawns.Cut()
|
||||
mobspawns.Cut()
|
||||
rm_controller.dbg("ZM(cz): Cleaned up lists.")
|
||||
|
||||
world.log << "RM(stats): CLEAN [myarea] at [world.time] prepared at [prepared_at]." //DEBUG code for playtest stats gathering.
|
||||
sleep(delay)
|
||||
|
||||
//Clean up vars
|
||||
scored = 0
|
||||
original_mobs = 0
|
||||
prepared_at = 0
|
||||
rm_controller.dbg("ZM(cz): Finished cleaning up zone.")
|
||||
|
||||
world.log << "RM(stats): CLEAN done [myarea] at [world.time]." //DEBUG code for playtest stats gathering.
|
||||
|
||||
rm_controller.dbg("ZM(cz): Finished cleaning up zone area [myarea].")
|
||||
rm_controller.mark_clean(src)
|
||||
return myarea
|
||||
|
||||
|
||||
@@ -1791,6 +1791,7 @@
|
||||
#include "code\modules\mob\living\simple_animal\hostile\faithless.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\giant_spider.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\goose.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\goose_vr.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\hivebot.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\hostile.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\pirate.dm"
|
||||
|
||||
Reference in New Issue
Block a user