Huge commit! Standardizes var definitions in most places.

Signed-off-by: Mloc <colmohici@gmail.com>
This commit is contained in:
Mloc
2012-05-29 16:26:48 +01:00
parent 5f030b1117
commit fbb67b2e42
157 changed files with 1736 additions and 1634 deletions
+155 -156
View File
@@ -1,16 +1,17 @@
var/global
obj/datacore/data_core = null
obj/effect/overlay/plmaster = null
obj/effect/overlay/slmaster = null
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
var/global/obj/datacore/data_core = null
var/global/obj/effect/overlay/plmaster = null
var/global/obj/effect/overlay/slmaster = null
//obj/hud/main_hud1 = null
list/machines = list()
list/processing_objects = list()
list/active_diseases = list()
var/global/list/machines = list()
var/global/list/processing_objects = list()
var/global/list/active_diseases = list()
//items that ask to be called every cycle
defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
var/global/defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
//list/global_map = null //Borked, do not touch. DMTG
//list/global_map = list(list(1,5),list(4,3))//an array of map Z levels.
@@ -23,197 +24,196 @@ var/global
//3 - AI satellite
//5 - empty space
var
//////////////
BLINDBLOCK = 0
DEAFBLOCK = 0
HULKBLOCK = 0
TELEBLOCK = 0
FIREBLOCK = 0
XRAYBLOCK = 0
CLUMSYBLOCK = 0
FAKEBLOCK = 0
BLOCKADD = 0
DIFFMUT = 0
HEADACHEBLOCK = 0
COUGHBLOCK = 0
TWITCHBLOCK = 0
NERVOUSBLOCK = 0
NOBREATHBLOCK = 0
REMOTEVIEWBLOCK = 0
REGENERATEBLOCK = 0
INCREASERUNBLOCK = 0
REMOTETALKBLOCK = 0
MORPHBLOCK = 0
BLENDBLOCK = 0
HALLUCINATIONBLOCK = 0
NOPRINTSBLOCK = 0
SHOCKIMMUNITYBLOCK = 0
SMALLSIZEBLOCK = 0
GLASSESBLOCK = 0
MONKEYBLOCK = 27
var/BLINDBLOCK = 0
var/DEAFBLOCK = 0
var/HULKBLOCK = 0
var/TELEBLOCK = 0
var/FIREBLOCK = 0
var/XRAYBLOCK = 0
var/CLUMSYBLOCK = 0
var/FAKEBLOCK = 0
var/BLOCKADD = 0
var/DIFFMUT = 0
var/HEADACHEBLOCK = 0
var/COUGHBLOCK = 0
var/TWITCHBLOCK = 0
var/NERVOUSBLOCK = 0
var/NOBREATHBLOCK = 0
var/REMOTEVIEWBLOCK = 0
var/REGENERATEBLOCK = 0
var/INCREASERUNBLOCK = 0
var/REMOTETALKBLOCK = 0
var/MORPHBLOCK = 0
var/BLENDBLOCK = 0
var/HALLUCINATIONBLOCK = 0
var/NOPRINTSBLOCK = 0
var/SHOCKIMMUNITYBLOCK = 0
var/SMALLSIZEBLOCK = 0
var/GLASSESBLOCK = 0
var/MONKEYBLOCK = 27
skipupdate = 0
var/skipupdate = 0
///////////////
eventchance = 1 //% per 2 mins
EventsOn = 1
hadevent = 0
blobevent = 0
var/eventchance = 1 //% per 2 mins
var/EventsOn = 1
var/hadevent = 0
var/blobevent = 0
///////////////
diary = null
diaryofmeanpeople = null
station_name = null
game_version = "Baystation 12"
var/diary = null
var/diaryofmeanpeople = null
var/station_name = null
var/game_version = "Baystation 12"
datum/air_tunnel/air_tunnel1/SS13_airtunnel = null
going = 1.0
master_mode = "traitor"//"extended"
secret_force_mode = "secret" // if this is anything but "secret", the secret rotation will forceably choose this mode
var/datum/air_tunnel/air_tunnel1/SS13_airtunnel = null
var/going = 1.0
var/master_mode = "traitor"//"extended"
var/secret_force_mode = "secret" // if this is anything but "secret", the secret rotation will forceably choose this mode
datum/engine_eject/engine_eject_control = null
host = null
aliens_allowed = 1
ooc_allowed = 1
dooc_allowed = 1
traitor_scaling = 1
goonsay_allowed = 0
dna_ident = 1
abandon_allowed = 1
enter_allowed = 1
var/datum/engine_eject/engine_eject_control = null
var/host = null
var/aliens_allowed = 1
var/ooc_allowed = 1
var/dooc_allowed = 1
var/traitor_scaling = 1
var/goonsay_allowed = 0
var/dna_ident = 1
var/abandon_allowed = 1
var/enter_allowed = 1
// guests_allowed = 1
shuttle_frozen = 0
shuttle_left = 0
tinted_weldhelh = 1
var/shuttle_frozen = 0
var/shuttle_left = 0
var/tinted_weldhelh = 1
list/jobMax = list()
list/bombers = list( )
list/admin_log = list ( )
list/lastsignalers = list( ) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
list/lawchanges = list( ) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
list/admins = list( )
list/alien_whitelist = list( )
list/shuttles = list( )
list/reg_dna = list( )
var/list/jobMax = list()
var/list/bombers = list( )
var/list/admin_log = list ( )
var/list/lastsignalers = list( ) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
var/list/lawchanges = list( ) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
var/list/admins = list( )
var/list/alien_whitelist = list( )
var/list/shuttles = list( )
var/list/reg_dna = list( )
// list/traitobj = list( )
CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
shuttle_z = 2 //default
airtunnel_start = 68 // default
airtunnel_stop = 68 // default
airtunnel_bottom = 72 // default
list/monkeystart = list()
list/wizardstart = list()
list/newplayer_start = list()
list/latejoin = list()
list/prisonwarp = list() //prisoners go to these
list/holdingfacility = list() //captured people go here
list/xeno_spawn = list()//Aliens spawn at these.
var/shuttle_z = 2 //default
var/airtunnel_start = 68 // default
var/airtunnel_stop = 68 // default
var/airtunnel_bottom = 72 // default
var/list/monkeystart = list()
var/list/wizardstart = list()
var/list/newplayer_start = list()
var/list/latejoin = list()
var/list/prisonwarp = list() //prisoners go to these
var/list/holdingfacility = list() //captured people go here
var/list/xeno_spawn = list()//Aliens spawn at these.
// list/mazewarp = list()
list/tdome1 = list()
list/tdome2 = list()
list/tdomeobserve = list()
list/tdomeadmin = list()
list/prisonsecuritywarp = list() //prison security goes to these
list/prisonwarped = list() //list of players already warped
list/blobstart = list()
var/list/tdome1 = list()
var/list/tdome2 = list()
var/list/tdomeobserve = list()
var/list/tdomeadmin = list()
var/list/prisonsecuritywarp = list() //prison security goes to these
var/list/prisonwarped = list() //list of players already warped
var/list/blobstart = list()
// list/traitors = list() //traitor list
list/cardinal = list( NORTH, SOUTH, EAST, WEST )
list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
list/emclosets = list() //random emergency closets woo
var/list/cardinal = list( NORTH, SOUTH, EAST, WEST )
var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
var/list/emclosets = list() //random emergency closets woo
datum/station_state/start_state = null
datum/configuration/config = null
datum/vote/vote = null
datum/sun/sun = null
var/datum/station_state/start_state = null
var/datum/configuration/config = null
var/datum/vote/vote = null
var/datum/sun/sun = null
list/combatlog = list()
list/IClog = list()
list/OOClog = list()
list/adminlog = list()
var/list/combatlog = list()
var/list/IClog = list()
var/list/OOClog = list()
var/list/adminlog = list()
list/powernets = null
var/list/powernets = null
Debug = 0 // global debug switch
Debug2 = 0
var/Debug = 0 // global debug switch
var/Debug2 = 0
datum/debug/debugobj
var/datum/debug/debugobj
datum/moduletypes/mods = new()
var/datum/moduletypes/mods = new()
wavesecret = 0
var/wavesecret = 0
shuttlecoming = 0
var/shuttlecoming = 0
join_motd = null
rules = null
forceblob = 0
var/join_motd = null
var/rules = null
var/forceblob = 0
custom_event_msg = null
var/custom_event_msg = null
//airlockWireColorToIndex takes a number representing the wire color, e.g. the orange wire is always 1, the dark red wire is always 2, etc. It returns the index for whatever that wire does.
//airlockIndexToWireColor does the opposite thing - it takes the index for what the wire does, for example AIRLOCK_WIRE_IDSCAN is 1, AIRLOCK_WIRE_POWER1 is 2, etc. It returns the wire color number.
//airlockWireColorToFlag takes the wire color number and returns the flag for it (1, 2, 4, 8, 16, etc)
list/airlockWireColorToFlag = RandomAirlockWires()
list/airlockIndexToFlag
list/airlockIndexToWireColor
list/airlockWireColorToIndex
list/APCWireColorToFlag = RandomAPCWires()
list/APCIndexToFlag
list/APCIndexToWireColor
list/APCWireColorToIndex
list/BorgWireColorToFlag = RandomBorgWires()
list/BorgIndexToFlag
list/BorgIndexToWireColor
list/BorgWireColorToIndex
list/ScrambledFrequencies = list( ) //These are used for electrical storms, and anything else that jams radios.
list/UnscrambledFrequencies = list( )
list/AAlarmWireColorToFlag = RandomAAlarmWires() // Air Alarm hacking wires.
list/AAlarmIndexToFlag
list/AAlarmIndexToWireColor
list/AAlarmWireColorToIndex
var/list/airlockWireColorToFlag = RandomAirlockWires()
var/list/airlockIndexToFlag
var/list/airlockIndexToWireColor
var/list/airlockWireColorToIndex
var/list/APCWireColorToFlag = RandomAPCWires()
var/list/APCIndexToFlag
var/list/APCIndexToWireColor
var/list/APCWireColorToIndex
var/list/BorgWireColorToFlag = RandomBorgWires()
var/list/BorgIndexToFlag
var/list/BorgIndexToWireColor
var/list/BorgWireColorToIndex
var/list/ScrambledFrequencies = list( ) //These are used for electrical storms, and anything else that jams radios.
var/list/UnscrambledFrequencies = list( )
var/list/AAlarmWireColorToFlag = RandomAAlarmWires() // Air Alarm hacking wires.
var/list/AAlarmIndexToFlag
var/list/AAlarmIndexToWireColor
var/list/AAlarmWireColorToIndex
const/SPEED_OF_LIGHT = 3e8 //not exact but hey!
const/SPEED_OF_LIGHT_SQ = 9e+16
const/FIRE_DAMAGE_MODIFIER = 0.0215 //Higher values result in more external fire damage to the skin (default 0.0215)
const/AIR_DAMAGE_MODIFIER = 2.025 //More means less damage from hot air scalding lungs, less = more damage. (default 2.025)
const/INFINITY = 1e31 //closer then enough
var/const/SPEED_OF_LIGHT = 3e8 //not exact but hey!
var/const/SPEED_OF_LIGHT_SQ = 9e+16
var/const/FIRE_DAMAGE_MODIFIER = 0.0215 //Higher values result in more external fire damage to the skin (default 0.0215)
var/const/AIR_DAMAGE_MODIFIER = 2.025 //More means less damage from hot air scalding lungs, less = more damage. (default 2.025)
var/const/INFINITY = 1e31 //closer then enough
//Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam
const/MAX_MESSAGE_LEN = 1024
const/MAX_PAPER_MESSAGE_LEN = 3072
const/MAX_BOOK_MESSAGE_LEN = 9216
var/const/MAX_MESSAGE_LEN = 1024
var/const/MAX_PAPER_MESSAGE_LEN = 3072
var/const/MAX_BOOK_MESSAGE_LEN = 9216
const/MAX_NAME_LEN = 40
var/const/MAX_NAME_LEN = 40
list/paper_blacklist = list("script","frame","iframe","input","button","a","embed","object")
var/list/paper_blacklist = list("script","frame","iframe","input","button","a","embed","object")
const/shuttle_time_in_station = 1800 // 3 minutes in the station
const/shuttle_time_to_arrive = 6000 // 10 minutes to arrive
var/const/shuttle_time_in_station = 1800 // 3 minutes in the station
var/const/shuttle_time_to_arrive = 6000 // 10 minutes to arrive
// MySQL configuration. You can also use the config/dbconfig.txt file.
sqladdress = "localhost"
sqlport = "3306"
sqldb = "tgstation"
sqllogin = "root"
sqlpass = ""
var/sqladdress = "localhost"
var/sqlport = "3306"
var/sqldb = "tgstation"
var/sqllogin = "root"
var/sqlpass = ""
// Feedback gathering sql connection
sqlfdbkdb = "test"
sqlfdbklogin = "root"
sqlfdbkpass = ""
var/sqlfdbkdb = "test"
var/sqlfdbklogin = "root"
var/sqlfdbkpass = ""
sqllogging = 0 // Should we log deaths, population stats, etc?
var/sqllogging = 0 // Should we log deaths, population stats, etc?
@@ -231,7 +231,7 @@ var
// For FTP requests. (i.e. downloading runtime logs.)
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
fileaccess_timer = 1800 //Cannot access files by ftp until the game is finished setting up and stuff.
var/fileaccess_timer = 1800 //Cannot access files by ftp until the game is finished setting up and stuff.
// It turns out that /var/const can't handle lists, because lists use
// an initializer. Sigh. That's no reason that we shouldn't make
@@ -239,8 +239,7 @@ var
// separate location, though, so: below are all lists that should not
// ever be changed in code.
/var/global
AI_VERB_LIST = list(
/var/global/AI_VERB_LIST = list(
/mob/living/silicon/ai/proc/ai_call_shuttle,
/mob/living/silicon/ai/proc/show_laws_verb,
/mob/living/silicon/ai/proc/ai_camera_track,
@@ -250,4 +249,4 @@ var
/mob/living/silicon/ai/proc/ai_statuschange,
/mob/living/silicon/ai/proc/ai_hologram_change,
/mob/living/silicon/ai/proc/ai_roster,
)
)
+7 -7
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/obj
//var/datum/module/mod //not used
var/m_amt = 0 // metal
@@ -30,11 +32,10 @@
icon_state = "rollstart"
flags = FPRINT
w_class = 1.0
var
turf/start
turf/end
tape_type = /obj/item/tape
icon_base
var/turf/start
var/turf/end
var/tape_type = /obj/item/tape
var/icon_base
/obj/item/tape
name = "tape"
@@ -1100,8 +1101,7 @@
throw_range = 5
origin_tech = "biotech=3"
var
mob/living/carbon/brain/brainmob = null
var/mob/living/carbon/brain/brainmob = null
New()
..()
+20 -23
View File
@@ -1,22 +1,22 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/obj/machinery
name = "machinery"
icon = 'stationobjs.dmi'
var
stat = 0
emagged = 0
use_power = 0
var/stat = 0
var/emagged = 0
var/use_power = 0
//0 = dont run the auto
//1 = run auto, use idle
//2 = run auto, use active
idle_power_usage = 0
active_power_usage = 0
power_channel = EQUIP
var/idle_power_usage = 0
var/active_power_usage = 0
var/power_channel = EQUIP
//EQUIP,ENVIRON or LIGHT
list/component_parts = null //list of all the parts used to build it, if made from certain kinds of frames.
uid
manual = 0
global
gl_uid = 1
var/list/component_parts = null //list of all the parts used to build it, if made from certain kinds of frames.
var/uid
var/manual = 0
var/global/gl_uid = 1
/obj/machinery/autolathe
name = "\improper Autolathe"
@@ -384,16 +384,14 @@
use_power = 1
idle_power_usage = 5
active_power_usage = 100
var
obj/effect/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise.
var/obj/effect/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise.
/obj/machinery/hologram/holopad
name = "\improper AI holopad"
desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely."
icon_state = "holopad0"
var
mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time.
last_request = 0 //to prevent request spam. ~Carn
var/mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time.
var/last_request = 0 //to prevent request spam. ~Carn
/obj/machinery/hologram/projector
name = "hologram projector"
@@ -406,12 +404,11 @@
desc = "It's used by the AI for fooling around."
icon = 'stationobjs.dmi'
icon_state = "hologram0"
var
temp = null
lumens = 0.0
h_r = 245.0
h_g = 245.0
h_b = 245.0
var/temp = null
var/lumens = 0.0
var/h_r = 245.0
var/h_g = 245.0
var/h_b = 245.0
/obj/machinery/coatrack
name = "coat rack"
+4 -3
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/obj/item/weapon
name = "weapon"
icon = 'weapons.dmi'
@@ -326,9 +328,8 @@
m_amt = 30
g_amt = 20
origin_tech = "magnets=2;biotech=2"
var
details = 0
recent_fail = 0
var/details = 0
var/recent_fail = 0
/obj/item/device/mass_spectrometer/adv
name = "advanced mass-spectrometer"
+11 -12
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/*
A Star pathfinding algorithm
Returns a list of tiles forming a path from A to B, taking dense objects as well as walls, and the orientation of
@@ -36,9 +38,8 @@ length to avoid portals or something i guess?? Not that they're counted right no
PriorityQueue
var
L[]
cmp
var/L[]
var/cmp
New(compare)
L = new()
cmp = compare
@@ -92,13 +93,12 @@ PriorityQueue
if(ind)
Remove(ind)
PathNode
var
datum/source
PathNode/prevNode
f
g
h
nt // Nodes traversed
var/datum/source
var/PathNode/prevNode
var/f
var/g
var/h
var/nt // Nodes traversed
New(s,p,pg,ph,pnt)
source = s
prevNode = p
@@ -109,8 +109,7 @@ PathNode
nt = pnt
datum
var
bestF
var/bestF
proc
PathWeightCompare(PathNode/a, PathNode/b)
return a.f - b.f
+26 -28
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
//cursors
#define Default_Cursor 0
#define Client_Cursor 1
@@ -37,9 +39,8 @@
// Deprecated! See global.dm for new configuration vars
/*
var
DB_SERVER = "" // This is the location of your MySQL server (localhost is USUALLY fine)
DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is the default)
var/DB_SERVER = "" // This is the location of your MySQL server (localhost is USUALLY fine)
var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is the default)
*/
DBConnection
@@ -69,15 +70,14 @@ DBConnection
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[sqladdress]:[sqlport]"]",user,password)
NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
var
_db_con // This variable contains a reference to the actual database connection.
dbi // This variable is a string containing the DBI MySQL requires.
user // This variable contains the username data.
password // This variable contains the password data.
default_cursor // This contains the default database cursor data.
var/_db_con // This variable contains a reference to the actual database connection.
var/dbi // This variable is a string containing the DBI MySQL requires.
var/user // This variable contains the username data.
var/password // This variable contains the password data.
var/default_cursor // This contains the default database cursor data.
//
server = ""
port = 3306
var/server = ""
var/port = 3306
DBQuery
New(sql_query,DBConnection/connection_handler,cursor_handler)
@@ -134,25 +134,23 @@ DBQuery
else if(conversions.len < column) conversions.len = column
conversions[column] = conversion
var
sql // The sql query being executed.
default_cursor
list/columns //list of DB Columns populated by Columns()
list/conversions
list/item[0] //list of data values populated by NextRow()
var/sql // The sql query being executed.
var/default_cursor
var/list/columns //list of DB Columns populated by Columns()
var/list/conversions
var/list/item[0] //list of data values populated by NextRow()
DBConnection/db_connection
_db_query
var/DBConnection/db_connection
var/_db_query
DBColumn
var
name
table
position //1-based index into item data
sql_type
flags
length
max_length
var/name
var/table
var/position //1-based index into item data
var/sql_type
var/flags
var/length
var/max_length
New(name_handler,table_handler,position_handler,type_handler,flag_handler,length_handler,max_length_handler)
src.name = name_handler
@@ -179,4 +177,4 @@ DBColumn
if(TIMESTAMP) return "TIMESTAMP"
if(TIME) return "TIME"
if(STRING) return "STRING"
if(BLOB) return "BLOB"
if(BLOB) return "BLOB"
+7 -6
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/proc/dopage(src,target)
var/href_list
var/href
@@ -261,11 +263,10 @@ proc
return 0
Y1+=s
else
var
m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles
signX = SIGN(X2-X1)
signY = SIGN(Y2-Y1)
var/m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
var/b=(Y1+PY1/32-0.015625)-m*(X1+PX1/32-0.015625) //In tiles
var/signX = SIGN(X2-X1)
var/signY = SIGN(Y2-Y1)
if(X1<X2)
b+=m
while(X1!=X2 || Y1!=Y2)
@@ -318,4 +319,4 @@ proc/is_carrying(var/M as mob, var/O as obj)
if(O:loc == M)
return 1
O = O:loc
return 0
return 0
+20 -14
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/*
IconProcs
by Lummox JR
@@ -434,14 +436,13 @@ proc
if(!dir) dir = A.dir
// Loop through the underlays, then overlays, sorting them into the layers list
var
list/process = A.underlays // Current list being processed
pSet=0 // Which list is being processed: 0 = underlays, 1 = overlays
curIndex=1 // index of 'current' in list being processed
current // Current overlay being sorted
currentLayer // Calculated layer that overlay appears on (special case for FLOAT_LAYER)
compare // The overlay 'add' is being compared against
cmpIndex // The index in the layers list of 'compare'
var/list/process = A.underlays // Current list being processed
var/pSet=0 // Which list is being processed: 0 = underlays, 1 = overlays
var/curIndex=1 // index of 'current' in list being processed
var/current // Current overlay being sorted
var/currentLayer // Calculated layer that overlay appears on (special case for FLOAT_LAYER)
var/compare // The overlay 'add' is being compared against
var/cmpIndex // The index in the layers list of 'compare'
while(TRUE)
if(curIndex<=process.len)
current = process[curIndex]
@@ -487,15 +488,20 @@ proc
// Icon already exists, just return that one
return _flatIcons[h]
var
// We start with a blank canvas, otherwise some icon procs crash silently
icon/flat = icon('effects.dmi', "icon_state"="nothing") // Final flattened icon
icon/add // Icon of overlay being added
var/icon/flat = icon('effects.dmi', "icon_state"="nothing") // Final flattened icon
var/icon/add // Icon of overlay being added
// Current dimensions of flattened icon
flatX1=1;flatX2=flat.Width();flatY1=1;flatY2=flat.Height()
var/flatX1=1
var/flatX2=flat.Width()
var/flatY1=1
var/flatY2=flat.Height()
// Dimensions of overlay being added
addX1;addX2;addY1;addY2
var/addX1
var/addX2
var/addY1
var/addY2
for(var/I in layers)
@@ -581,4 +587,4 @@ proc
for(var/O in A.overlays)
var/image/I = O
composite.Blend(icon(I.icon, I.icon_state, I.dir, 1), ICON_OVERLAY)
return composite
return composite
+16 -16
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/* base 64 procs
These procs convert plain text to a hexidecimal string to 64 encoded text and vice versa.
@@ -33,12 +35,11 @@ proc
pad_code = the character or ASCII code used to pad the base64 text.
DEFAULT: 67 (= sign)
RETURNS: the hexidecimal text */
var
pos = 1
offset = 2
current = 0
padding = 0
hextext = ""
var/pos = 1
var/offset = 2
var/current = 0
var/padding = 0
var/hextext = ""
if(istext(pad_code)) pad_code = text2ascii(pad_code)
while(pos <= length(encode64))
var/val = text2ascii(encode64, pos++)
@@ -80,15 +81,14 @@ proc
pad_char = the character or ASCII code used to pad the base64 text.
DEFAULT: "=" (ASCII 67)
RETURNS: the base 64 encoded text */
var
key64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
encode64 = ""
pos = 1
offset = 2
current = 0
len = length(hextext)
end = len
padding = end%6
var/key64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
var/encode64 = ""
var/pos = 1
var/offset = 2
var/current = 0
var/len = length(hextext)
var/end = len
var/padding = end%6
if(padding)
padding = 6 - padding
end += padding
@@ -128,4 +128,4 @@ proc
var/hex = ""
for(var/loop = 1 to length(txt))
hex += sd_dec2base(text2ascii(txt,loop),,2)
return hex
return hex
+14 -14
View File
@@ -1,15 +1,16 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/* sd_color and procs
sd_color is a special datum that contains color data in various
formats. Sample colors are available in samplecolors.dm.
sd_color
var
name // the name of the color
red // red componant of the color
green // green componant of the color
blue // red componant of the color
html // html string for the color
icon/Icon // contains the icon produced by the rgb2icon() proc
var/name // the name of the color
var/red // red componant of the color
var/green // green componant of the color
var/blue // red componant of the color
var/html // html string for the color
var/icon/Icon // contains the icon produced by the rgb2icon() proc
PROCS
brightness()
@@ -30,13 +31,12 @@ sd_color
* Implimentation: No need to read further. *
*********************************************/
sd_color
var
name // the name of the color
red = 0 // red componant of the color
green = 0 // green componant of the color
blue = 0 // red componant of the color
html // html string for the color
icon/Icon // contains the icon produced by the rgb2icon() proc
var/name // the name of the color
var/red = 0 // red componant of the color
var/green = 0 // green componant of the color
var/blue = 0 // red componant of the color
var/html // html string for the color
var/icon/Icon // contains the icon produced by the rgb2icon() proc
proc
brightness()
+13 -14
View File
@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/* HSL procs
These procs convert between RGB (red, green, blu) and HSL (hue, saturation, light)
color spaces. The algorithms used for these procs were found at
@@ -80,20 +82,18 @@ proc
sat /= scale
lgh /= scale
var
red
grn
blu
var/red
var/grn
var/blu
if(!sat) // greyscale
red = lgh
grn = lgh
blu = lgh
else
var
temp1
temp2
temp3
var/temp1
var/temp2
var/temp3
if(lgh < 0.5) temp2 = lgh * (1 + sat)
else temp2 = lgh + sat - lgh * sat
temp1 = 2 * lgh - temp2
@@ -160,12 +160,11 @@ proc
red /= 255
grn /= 255
blu /= 255
var
lo = min(red, grn, blu)
hi = max(red, grn, blu)
hue = 0
sat = 0
lgh = (lo + hi)/2
var/lo = min(red, grn, blu)
var/hi = max(red, grn, blu)
var/hue = 0
var/sat = 0
var/lgh = (lo + hi)/2
if(lo != hi) // if equal, hue and sat may both stay 0
if(lgh < 0.5) sat = (hi - lo) / (hi + lo)
+12 -11
View File
@@ -1,26 +1,27 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
/turf
icon = 'floors.dmi'
var/intact = 1 //for floors, use is_plating(), is_plasteel_floor() and is_light_floor()
level = 1.0
var
//Properties for open tiles (/floor)
oxygen = 0
carbon_dioxide = 0
nitrogen = 0
toxins = 0
var/oxygen = 0
var/carbon_dioxide = 0
var/nitrogen = 0
var/toxins = 0
//Properties for airtight tiles (/wall)
thermal_conductivity = 0.05
heat_capacity = 1
var/thermal_conductivity = 0.05
var/heat_capacity = 1
//Properties for both
temperature = T20C
var/temperature = T20C
blocks_air = 0
icon_old = null
pathweight = 1
var/blocks_air = 0
var/icon_old = null
var/pathweight = 1
proc/is_plating()
return 0