mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
[MIRROR] Logs Player-Based Area Creation [MDB IGNORE] (#16429)
* Logs Player-Based Area Creation (#70096) When a player renames (creates) an area from an existing area to a new one, it now logs to game.log (global and individual). * Logs Player-Based Area Creation Co-authored-by: san7890 <the@san7890.com>
This commit is contained in:
@@ -48,7 +48,7 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/station/en
|
||||
* range - the max range to check
|
||||
*
|
||||
* Returns a list of turfs, which is an area of isolated atmos
|
||||
*/
|
||||
*/
|
||||
/proc/create_atmos_zone(turf/source, range = INFINITY)
|
||||
var/counter = 1 // a counter which increment each loop
|
||||
var/loops = 0
|
||||
@@ -69,14 +69,14 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/station/en
|
||||
loops += 1
|
||||
continue
|
||||
if(length(connected_turfs) >= range)
|
||||
return
|
||||
return
|
||||
if(TURFS_CAN_SHARE(reference_turf, valid_turf))
|
||||
loops = 0
|
||||
connected_turfs |= valid_turf//add that to the original list
|
||||
loops = 0
|
||||
connected_turfs |= valid_turf//add that to the original list
|
||||
if(loops >= 7)//if the loop has gone 7 consecutive times with no new turfs added, return the result. Number is arbitrary, subject to change
|
||||
return
|
||||
counter += 1 //increment by one so the next loop will start at the next position in the list
|
||||
|
||||
|
||||
/proc/create_area(mob/creator)
|
||||
// Passed into the above proc as list/break_if_found
|
||||
var/static/list/area_or_turf_fail_types = typecacheof(list(
|
||||
@@ -138,6 +138,7 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/station/en
|
||||
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_AREA_CREATED, newA, oldA, creator)
|
||||
to_chat(creator, span_notice("You have created a new area, named [newA.name]. It is now weather proof, and constructing an APC will allow it to be powered."))
|
||||
creator.log_message("created a new area: [AREACOORD(creator)] (previously \"[oldA.name]\")", LOG_GAME)
|
||||
return TRUE
|
||||
|
||||
#undef BP_MAX_ROOM_SIZE
|
||||
|
||||
Reference in New Issue
Block a user