mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
removes var/ inside all procs (#19450)
* removes var/ inside all procs * . * ugh
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
/datum/random_map/automata/cave_system/no_cracks
|
||||
make_cracked_turfs = FALSE
|
||||
|
||||
/datum/random_map/automata/cave_system/get_appropriate_path(var/value)
|
||||
/datum/random_map/automata/cave_system/get_appropriate_path(value)
|
||||
return
|
||||
|
||||
/datum/random_map/automata/cave_system/get_map_char(var/value)
|
||||
/datum/random_map/automata/cave_system/get_map_char(value)
|
||||
switch(value)
|
||||
if(DOOR_CHAR)
|
||||
return "x"
|
||||
@@ -55,7 +55,7 @@
|
||||
#endif
|
||||
return 1
|
||||
|
||||
/datum/random_map/automata/cave_system/apply_to_turf(var/x,var/y)
|
||||
/datum/random_map/automata/cave_system/apply_to_turf(x,y)
|
||||
var/current_cell = get_map_cell(x,y)
|
||||
if(!current_cell)
|
||||
return 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/turf/simulated/wall/diona/Initialize(mapload)
|
||||
. = ..(mapload, MAT_BIOMASS)
|
||||
|
||||
/turf/simulated/wall/diona/attack_generic(var/mob/user, var/damage, var/attack_message)
|
||||
/turf/simulated/wall/diona/attack_generic(mob/user, damage, attack_message)
|
||||
if(istype(user, /mob/living/carbon/alien/diona))
|
||||
if(can_open == WALL_OPENING)
|
||||
return
|
||||
@@ -65,7 +65,7 @@
|
||||
floor_type = /turf/simulated/floor/diona
|
||||
|
||||
// This is disgusting.
|
||||
/datum/random_map/automata/diona/proc/search_neighbors_for(var/search_val, var/x, var/y)
|
||||
/datum/random_map/automata/diona/proc/search_neighbors_for(search_val, x, y)
|
||||
var/current_cell = get_map_cell(x-1,y-1)
|
||||
if(current_cell && map[current_cell] == search_val) return 1
|
||||
current_cell = get_map_cell(x-1,y)
|
||||
@@ -142,14 +142,14 @@
|
||||
nymph_count--
|
||||
return
|
||||
|
||||
/datum/random_map/automata/diona/get_appropriate_path(var/value)
|
||||
/datum/random_map/automata/diona/get_appropriate_path(value)
|
||||
switch(value)
|
||||
if(EMPTY_CHAR, DOOR_CHAR, MONSTER_CHAR, ARTIFACT_CHAR)
|
||||
return floor_type
|
||||
if(WALL_CHAR)
|
||||
return wall_type
|
||||
|
||||
/datum/random_map/automata/diona/get_additional_spawns(var/value, var/turf/T)
|
||||
/datum/random_map/automata/diona/get_additional_spawns(value, turf/T)
|
||||
|
||||
if(value != FLOOR_CHAR)
|
||||
for(var/thing in T)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
else
|
||||
map[current_cell] = FLOOR_CHAR
|
||||
|
||||
/datum/random_map/building/handle_post_overlay_on(var/datum/random_map/target_map, var/tx, var/ty)
|
||||
/datum/random_map/building/handle_post_overlay_on(datum/random_map/target_map, tx, ty)
|
||||
var/list/possible_doors
|
||||
for(var/x = 1, x <= limit_x, x++)
|
||||
for(var/y = 1, y <= limit_y, y++)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
var/placement_explosion_light = 6
|
||||
var/placement_explosion_flash = 4
|
||||
|
||||
/datum/random_map/droppod/New(var/seed, var/tx, var/ty, var/tz, var/tlx, var/tly, var/do_not_apply, var/do_not_announce, var/supplied_drop, var/list/supplied_drops, var/automated)
|
||||
/datum/random_map/droppod/New(seed, tx, ty, tz, tlx, tly, do_not_apply, do_not_announce, supplied_drop, list/supplied_drops, automated)
|
||||
|
||||
if(supplied_drop)
|
||||
drop_type = supplied_drop
|
||||
@@ -87,7 +87,7 @@
|
||||
sleep(15) // Let the explosion finish proccing before we ChangeTurf(), otherwise it might destroy our spawned objects.
|
||||
return ..()
|
||||
|
||||
/datum/random_map/droppod/get_appropriate_path(var/value)
|
||||
/datum/random_map/droppod/get_appropriate_path(value)
|
||||
if(value == SD_FLOOR_TILE || value == SD_SUPPLY_TILE)
|
||||
return floor_type
|
||||
else if(value == SD_WALL_TILE)
|
||||
@@ -97,7 +97,7 @@
|
||||
return null
|
||||
|
||||
// Pods are circular. Get the direction this object is facing from the center of the pod.
|
||||
/datum/random_map/droppod/get_spawn_dir(var/x, var/y)
|
||||
/datum/random_map/droppod/get_spawn_dir(x, y)
|
||||
var/x_midpoint = n_ceil(limit_x / 2)
|
||||
var/y_midpoint = n_ceil(limit_y / 2)
|
||||
if(x == x_midpoint && y == y_midpoint)
|
||||
@@ -108,7 +108,7 @@
|
||||
return null
|
||||
return get_dir(middle, target)
|
||||
|
||||
/datum/random_map/droppod/get_additional_spawns(var/value, var/turf/T, var/spawn_dir)
|
||||
/datum/random_map/droppod/get_additional_spawns(value, turf/T, spawn_dir)
|
||||
|
||||
// Splatter anything under us that survived the explosion.
|
||||
if(value != SD_EMPTY_TILE && T.contents.len)
|
||||
@@ -124,7 +124,7 @@
|
||||
else if(value == SD_SUPPLY_TILE)
|
||||
get_spawned_drop(T)
|
||||
|
||||
/datum/random_map/droppod/proc/get_spawned_drop(var/turf/T)
|
||||
/datum/random_map/droppod/proc/get_spawned_drop(turf/T)
|
||||
var/obj/structure/bed/chair/C = new(T)
|
||||
C.set_light(3, l_color = "#CC0000")
|
||||
var/mob/living/drop
|
||||
|
||||
@@ -10,20 +10,20 @@
|
||||
var/deploying
|
||||
var/deployed
|
||||
|
||||
/obj/structure/droppod_door/Initialize(mapload, var/autoopen)
|
||||
/obj/structure/droppod_door/Initialize(mapload, autoopen)
|
||||
. = ..()
|
||||
if(autoopen)
|
||||
addtimer(CALLBACK(src, PROC_REF(deploy)), 10 SECONDS)
|
||||
|
||||
/obj/structure/droppod_door/attack_ai(var/mob/user)
|
||||
/obj/structure/droppod_door/attack_ai(mob/user)
|
||||
if(!user.Adjacent(src))
|
||||
return
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/droppod_door/attack_generic(var/mob/user)
|
||||
/obj/structure/droppod_door/attack_generic(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/droppod_door/attack_hand(var/mob/user)
|
||||
/obj/structure/droppod_door/attack_hand(mob/user)
|
||||
if(deploying) return
|
||||
deploying = TRUE
|
||||
to_chat(user, span_danger("You prime the explosive bolts. Better get clear!"))
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
// UNLIKE THE DROP POD, this map deals ENTIRELY with strings and types.
|
||||
// Drop type is a string representing a mode rather than an atom or path.
|
||||
// supplied_drop_types is a list of types to spawn in the pod.
|
||||
/datum/random_map/droppod/supply/get_spawned_drop(var/turf/T)
|
||||
/datum/random_map/droppod/supply/get_spawned_drop(turf/T)
|
||||
|
||||
if(!drop_type) drop_type = pick(GLOB.supply_drop)
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
openlist.Cut()
|
||||
closedlist.Cut()
|
||||
|
||||
/datum/random_map/maze/proc/add_to_openlist(var/tx, var/ty, var/nx, var/ny)
|
||||
/datum/random_map/maze/proc/add_to_openlist(tx, ty, nx, ny)
|
||||
if(tx < 1 || ty < 1 || tx > limit_x || ty > limit_y || !isnull(checked_coord_cache["[tx]-[ty]"]))
|
||||
return 0
|
||||
checked_coord_cache["[tx]-[ty]"] = 1
|
||||
|
||||
@@ -8,7 +8,7 @@ GLOBAL_VAR_INIT(maze_cell_count, 0)
|
||||
var/ox
|
||||
var/oy
|
||||
|
||||
/datum/maze_cell/New(var/nx,var/ny,var/nox,var/noy)
|
||||
/datum/maze_cell/New(nx,ny,nox,noy)
|
||||
GLOB.maze_cell_count++
|
||||
uid = GLOB.maze_cell_count
|
||||
name = "cell #[uid]"
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
descriptor = "desert (replacement)"
|
||||
target_turf_type = /turf/space
|
||||
|
||||
/datum/random_map/noise/desert/get_map_char(var/value)
|
||||
/datum/random_map/noise/desert/get_map_char(value)
|
||||
return "<font color='#[value][value][value][value][value][value]'>[pick(list(",",".","'","`"))]</font>"
|
||||
|
||||
/datum/random_map/noise/desert/get_appropriate_path(var/value)
|
||||
/datum/random_map/noise/desert/get_appropriate_path(value)
|
||||
var/val = min(9,max(0,round((value/cell_range)*10)))
|
||||
if(isnull(val)) val = 0
|
||||
switch(val)
|
||||
@@ -18,7 +18,7 @@
|
||||
else
|
||||
return /turf/simulated/floor/beach/sand/desert
|
||||
|
||||
/datum/random_map/noise/desert/get_additional_spawns(var/value, var/turf/T)
|
||||
/datum/random_map/noise/desert/get_additional_spawns(value, turf/T)
|
||||
var/val = min(9,max(0,round((value/cell_range)*10)))
|
||||
if(isnull(val)) val = 0
|
||||
switch(val)
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
if(!count)
|
||||
map[current_cell] = 177
|
||||
|
||||
/datum/random_map/noise/volcanism/get_appropriate_path(var/value)
|
||||
/datum/random_map/noise/volcanism/get_appropriate_path(value)
|
||||
return
|
||||
|
||||
/datum/random_map/noise/volcanism/get_additional_spawns(var/value, var/turf/T)
|
||||
/datum/random_map/noise/volcanism/get_additional_spawns(value, turf/T)
|
||||
if(value>=178)
|
||||
if(istype(T,/turf/simulated/floor/asteroid))
|
||||
T.ChangeTurf(/turf/simulated/floor/airless/lava)
|
||||
|
||||
@@ -48,12 +48,12 @@
|
||||
// Begin recursion.
|
||||
subdivide(1,1,1,(limit_y-1))
|
||||
|
||||
/datum/random_map/noise/get_map_char(var/value)
|
||||
/datum/random_map/noise/get_map_char(value)
|
||||
var/val = min(9,max(0,round((value/cell_range)*10)))
|
||||
if(isnull(val)) val = 0
|
||||
return "[val]"
|
||||
|
||||
/datum/random_map/noise/proc/subdivide(var/iteration,var/x,var/y,var/input_size)
|
||||
/datum/random_map/noise/proc/subdivide(iteration,x,y,input_size)
|
||||
|
||||
var/isize = input_size
|
||||
var/hsize = round(input_size/2)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
else
|
||||
return 1
|
||||
|
||||
/datum/random_map/noise/ore/apply_to_turf(var/x,var/y)
|
||||
/datum/random_map/noise/ore/apply_to_turf(x,y)
|
||||
|
||||
var/tx = ((origin_x-1)+x)*chunk_size
|
||||
var/ty = ((origin_y-1)+y)*chunk_size
|
||||
@@ -111,7 +111,7 @@
|
||||
T.resources[ORE_PAINITE] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
return
|
||||
|
||||
/datum/random_map/noise/ore/get_map_char(var/value)
|
||||
/datum/random_map/noise/ore/get_map_char(value)
|
||||
if(value < rare_val)
|
||||
return "S"
|
||||
else if(value < deep_val)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
descriptor = "tundra (replacement)"
|
||||
target_turf_type = /turf/space
|
||||
|
||||
/datum/random_map/noise/tundra/get_map_char(var/value)
|
||||
/datum/random_map/noise/tundra/get_map_char(value)
|
||||
var/val = min(9,max(0,round((value/cell_range)*10)))
|
||||
if(isnull(val)) val = 0
|
||||
switch(val)
|
||||
@@ -31,7 +31,7 @@
|
||||
if(9)
|
||||
return "<font color='#00FF00'>[pick(list("T","t"))]</font>"
|
||||
|
||||
/datum/random_map/noise/tundra/get_appropriate_path(var/value)
|
||||
/datum/random_map/noise/tundra/get_appropriate_path(value)
|
||||
var/val = min(9,max(0,round((value/cell_range)*10)))
|
||||
if(isnull(val)) val = 0
|
||||
switch(val)
|
||||
@@ -40,7 +40,7 @@
|
||||
else
|
||||
return /turf/simulated/floor/snow
|
||||
|
||||
/datum/random_map/noise/tundra/get_additional_spawns(var/value, var/turf/T)
|
||||
/datum/random_map/noise/tundra/get_additional_spawns(value, turf/T)
|
||||
var/val = min(9,max(0,round((value/cell_range)*10)))
|
||||
if(isnull(val)) val = 0
|
||||
switch(val)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
// Test to see if rand_seed() can be used reliably.
|
||||
var/priority_process
|
||||
|
||||
/datum/random_map/New(var/seed, var/tx, var/ty, var/tz, var/tlx, var/tly, var/do_not_apply, var/do_not_announce, var/admin_map)
|
||||
/datum/random_map/New(seed, tx, ty, tz, tlx, tly, do_not_apply, do_not_announce, admin_map)
|
||||
if(!isnum(tz))
|
||||
var/old_tz = tz
|
||||
tz = GLOB.map_templates_loaded[tz]
|
||||
@@ -78,14 +78,14 @@
|
||||
else
|
||||
admin_notice(span_danger("[capitalize(name)] failed to generate ([round(0.1*(world.timeofday-start_time),0.1)] seconds): could not produce sane map."), R_DEBUG)
|
||||
|
||||
/datum/random_map/proc/get_map_cell(var/x,var/y)
|
||||
/datum/random_map/proc/get_map_cell(x,y)
|
||||
if(!map)
|
||||
set_map_size()
|
||||
. = ((y-1)*limit_x)+x
|
||||
if((. < 1) || (. > map.len))
|
||||
return null
|
||||
|
||||
/datum/random_map/proc/get_map_char(var/value)
|
||||
/datum/random_map/proc/get_map_char(value)
|
||||
switch(value)
|
||||
if(WALL_CHAR)
|
||||
return "#"
|
||||
@@ -153,7 +153,7 @@
|
||||
/datum/random_map/proc/check_map_sanity()
|
||||
return 1
|
||||
|
||||
/datum/random_map/proc/set_origins(var/tx, var/ty, var/tz)
|
||||
/datum/random_map/proc/set_origins(tx, ty, tz)
|
||||
origin_x = tx ? tx : 1
|
||||
origin_y = ty ? ty : 1
|
||||
origin_z = tz ? tz : 1
|
||||
@@ -168,7 +168,7 @@
|
||||
if(!priority_process) sleep(-1)
|
||||
apply_to_turf(x,y)
|
||||
|
||||
/datum/random_map/proc/apply_to_turf(var/x,var/y)
|
||||
/datum/random_map/proc/apply_to_turf(x,y)
|
||||
var/current_cell = get_map_cell(x,y)
|
||||
if(!current_cell)
|
||||
return 0
|
||||
@@ -184,21 +184,21 @@
|
||||
/datum/random_map/proc/get_spawn_dir()
|
||||
return 0
|
||||
|
||||
/datum/random_map/proc/get_appropriate_path(var/value)
|
||||
/datum/random_map/proc/get_appropriate_path(value)
|
||||
switch(value)
|
||||
if(FLOOR_CHAR)
|
||||
return floor_type
|
||||
if(WALL_CHAR)
|
||||
return wall_type
|
||||
|
||||
/datum/random_map/proc/get_additional_spawns(var/value, var/turf/T)
|
||||
/datum/random_map/proc/get_additional_spawns(value, turf/T)
|
||||
if(value == DOOR_CHAR)
|
||||
new /obj/machinery/door/airlock(T)
|
||||
|
||||
/datum/random_map/proc/cleanup()
|
||||
return
|
||||
|
||||
/datum/random_map/proc/overlay_with(var/datum/random_map/target_map, var/tx, var/ty)
|
||||
/datum/random_map/proc/overlay_with(datum/random_map/target_map, tx, ty)
|
||||
if(!map.len || !istype(target_map))
|
||||
return
|
||||
tx-- // Update origin so that x/y index
|
||||
@@ -216,5 +216,5 @@
|
||||
handle_post_overlay_on(target_map,tx,ty)
|
||||
|
||||
|
||||
/datum/random_map/proc/handle_post_overlay_on(var/datum/random_map/target_map, var/tx, var/ty)
|
||||
/datum/random_map/proc/handle_post_overlay_on(datum/random_map/target_map, tx, ty)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user