Too many things to list

This commit is contained in:
Anuken
2022-04-10 21:02:51 -04:00
parent 89af2c8033
commit 2145e31bac
18 changed files with 318 additions and 24 deletions

View File

@@ -79,6 +79,8 @@ public class Rules{
public boolean placeRangeCheck = false;
/** If true, dead teams in PvP automatically have their blocks & units converted to derelict upon death. */
public boolean cleanupDeadTeams = true;
/** If true, items can only be deposited in the core. */
public boolean onlyDepositCore = false;
/** Radius around enemy wave drop zones.*/
public float dropZoneRadius = 300f;
/** Time between waves in ticks. */

View File

@@ -305,6 +305,20 @@ public class Teams{
}
}
/** Make all buildings within this range explode. */
public void timeDestroy(float x, float y, float range){
var builds = new Seq<Building>();
if(buildings != null){
buildings.intersect(x - range, y - range, range * 2f, range * 2f, builds);
}
for(var build : builds){
if(build.within(x, y, range)){
Time.run(Mathf.random(0f, 60f * 6f), build::kill);
}
}
}
private void scheduleDerelict(Building build){
//TODO this may cause a lot of packet spam, optimize?
Call.setTeam(build, Team.derelict);