mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 03:59:59 +01:00
Adds admin_spawned atom var that is set when something is spawned by admin means or is var edited.
This can be bypassed by using debug-game if needed. Stats will not be tracked for admin spawned atoms
This commit is contained in:
@@ -633,7 +633,8 @@ var/global/BSACooldown = 0
|
||||
var/turf/T = get_turf(usr.loc)
|
||||
T.ChangeTurf(chosen)
|
||||
else
|
||||
new chosen(usr.loc)
|
||||
var/atom/A = new chosen(usr.loc)
|
||||
A.admin_spawned = TRUE
|
||||
|
||||
log_admin("[key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])")
|
||||
feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -1953,6 +1953,7 @@
|
||||
else
|
||||
var/atom/O = new path(target)
|
||||
if(O)
|
||||
O.admin_spawned = TRUE
|
||||
O.setDir(obj_dir)
|
||||
if(obj_name)
|
||||
O.name = obj_name
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
if(be_drone == "No" || qdeleted(src))
|
||||
return
|
||||
var/mob/living/simple_animal/drone/D = new drone_type(get_turf(loc))
|
||||
D.admin_spawned = admin_spawned
|
||||
D.key = user.key
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -25,9 +25,10 @@
|
||||
if(health > 0)
|
||||
return
|
||||
else
|
||||
feedback_set_details("megafauna_kills","[initial(name)]")
|
||||
if(!elimination) //used so the achievment only occurs for the last legion to die.
|
||||
grant_achievement(medal_type,score_type)
|
||||
if(!admin_spawned)
|
||||
feedback_set_details("megafauna_kills","[initial(name)]")
|
||||
if(!elimination) //used so the achievment only occurs for the last legion to die.
|
||||
grant_achievement(medal_type,score_type)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/gib()
|
||||
@@ -79,6 +80,9 @@
|
||||
if(medal_type == "Boss") //Don't award medals if the medal type isn't set
|
||||
return
|
||||
|
||||
if(admin_spawned)
|
||||
return
|
||||
|
||||
if(global.medal_hub && global.medal_pass && global.medals_enabled)
|
||||
for(var/mob/living/L in view(7,src))
|
||||
if(L.stat)
|
||||
|
||||
@@ -219,6 +219,7 @@
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelord/OpenFire(the_target)
|
||||
if(world.time >= ranged_cooldown)
|
||||
var/mob/living/simple_animal/hostile/asteroid/hivelordbrood/A = new brood_type(src.loc)
|
||||
A.admin_spawned = admin_spawned
|
||||
A.GiveTarget(target)
|
||||
A.friends = friends
|
||||
A.faction = faction
|
||||
@@ -1018,7 +1019,7 @@
|
||||
if(other != src)
|
||||
last_tendril = FALSE
|
||||
break
|
||||
if(last_tendril)
|
||||
if(last_tendril && !admin_spawned)
|
||||
if(global.medal_hub && global.medal_pass && global.medals_enabled)
|
||||
for(var/mob/living/L in view(7,src))
|
||||
if(L.stat)
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
return 0
|
||||
spawn_delay = world.time + spawn_time
|
||||
var/mob/living/simple_animal/L = new mob_type(src.loc)
|
||||
L.admin_spawned = admin_spawned //If we were admin spawned, lets have our children count as that as well.
|
||||
spawned_mobs += L
|
||||
L.nest = src
|
||||
L.faction = src.faction
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
for(var/varName in newVars)
|
||||
if(varName in summoned_object.vars)
|
||||
summoned_object.vars[varName] = newVars[varName]
|
||||
|
||||
summoned_object.admin_spawned = TRUE
|
||||
if(summon_lifespan)
|
||||
QDEL_IN(summoned_object, summon_lifespan)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user