Merge Conflict

This commit is contained in:
FalseIncarnate
2016-04-05 19:26:30 -04:00
252 changed files with 1730 additions and 2379 deletions
+2
View File
@@ -16,3 +16,5 @@ data/
/_maps/map_files/**/*.dmm.backup
/nano/debug.html
*.db
stddef.dm
.atom-build.json
+2 -2
View File
@@ -7,8 +7,8 @@ git:
env:
global:
- BYOND_MAJOR="509"
- BYOND_MINOR="1315"
- BYOND_MAJOR="510"
- BYOND_MINOR="1336"
matrix:
- DM_MAPFILE="cyberiad"
- DM_MAPFILE="metastation"
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
-18
View File
@@ -1,18 +0,0 @@
// Comment this out if the external btime library is unavailable
#define PRECISE_TIMER_AVAILABLE
#ifdef PRECISE_TIMER_AVAILABLE
var/global/__btime__libName = "btime.[world.system_type==MS_WINDOWS?"dll":"so"]"
#define TimeOfHour (__extern__timeofhour)
#define __extern__timeofhour text2num(call(__btime__libName, "gettime")())
/hook/startup/proc/checkbtime()
try
// This will always return 1 unless the btime library cannot be accessed
if(TimeOfHour || 1) return 1
catch(var/exception/e)
log_to_dd("PRECISE_TIMER_AVAILABLE is defined in btime.dm, but calling the btime library failed: [e]")
log_to_dd("This is a fatal error. The world will now shut down.")
del(world)
#else
#define TimeOfHour (world.timeofday % 36000)
#endif
+5 -2
View File
@@ -36,5 +36,8 @@
#define ANTAG_HUD_OPS 9
#define ANTAG_HUD_WIZ 10
#define ANTAG_HUD_SHADOW 11
#define ANTAG_HUD_SOLO 12
#define ANTAG_HUD_TRAITOR 12
#define ANTAG_HUD_NINJA 13 //For Daves Rework
#define ANTAG_HUD_CHANGELING 14
#define ANTAG_HUD_VAMPIRE 15
#define ANTAG_HUD_ABDUCTOR 16 //For Fox
+4
View File
@@ -94,3 +94,7 @@
#define DEFAULT_ITEM_PUTON_DELAY 20 //time taken (in deciseconsd) to reverse-strip somebody
#define IGNORE_ACCESS -1
#define CHEM_MOB_SPAWN_INVALID 0
#define CHEM_MOB_SPAWN_HOSTILE 1
#define CHEM_MOB_SPAWN_FRIENDLY 2
+1 -1
View File
@@ -16,4 +16,4 @@
// SCHECK macros
// This references src directly to work around a weird bug with try/catch
#define SCHECK_EVERY(this_many_calls) if(++src.calls_since_last_scheck >= this_many_calls) sleepCheck()
#define SCHECK SCHECK_EVERY(50)
#define SCHECK sleepCheck()
+2 -2
View File
@@ -12,11 +12,11 @@ var/global/list/string_cache
var/list/stringsList = list()
fileList = file2list("strings/[filename]")
for(var/s in fileList)
stringsList = text2list(s, "@=")
stringsList = splittext(s, "@=")
if(stringsList.len != 2)
CRASH("Invalid string list in strings/[filename]")
if(findtext(stringsList[2], "@,"))
string_cache[filename][stringsList[1]] = text2list(stringsList[2], "@,")
string_cache[filename][stringsList[1]] = splittext(stringsList[2], "@,")
else
string_cache[filename][stringsList[1]] = stringsList[2] // Its a single string!
else
-144
View File
@@ -1,144 +0,0 @@
/*
This file is part of bygex.
bygex is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
bygex is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with bygex. If not, see <http://www.gnu.org/licenses/>
Based on code by Zac Stringham - Copyright 2009 (LGPL)
Written 6-Oct-2013 - carnie (elly1989@rocketmail.com), accreditation appreciated but not required.
Please do not remove this comment.
Full source code is available at https://code.google.com/p/byond-regex/
Please report any relevant issues on the tracker at the above address.
~Carn
*/
#ifdef USE_BYGEX
#ifndef LIBREGEX_LIBRARY
#define LIBREGEX_LIBRARY "bin/bygex"
#endif
/proc
regEx_compare(str, exp)
return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regEx_compare")(str, exp))
regex_compare(str, exp)
return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regex_compare")(str, exp))
regEx_find(str, exp)
return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regEx_find")(str, exp))
regex_find(str, exp)
return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regex_find")(str, exp))
regEx_replaceall(str, exp, fmt)
return call(LIBREGEX_LIBRARY, "regEx_replaceall")(str, exp, fmt)
regex_replaceall(str, exp, fmt)
return call(LIBREGEX_LIBRARY, "regex_replaceall")(str, exp, fmt)
replacetextEx(str, exp, fmt)
return call(LIBREGEX_LIBRARY, "regEx_replaceallliteral")(str, exp, fmt)
replacetext(str, exp, fmt)
return call(LIBREGEX_LIBRARY, "regex_replaceallliteral")(str, exp, fmt)
regEx_replace(str, exp, fmt)
return call(LIBREGEX_LIBRARY, "regEx_replace")(str, exp, fmt)
regex_replace(str, exp, fmt)
return call(LIBREGEX_LIBRARY, "regex_replace")(str, exp, fmt)
regEx_findall(str, exp)
return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regEx_findall")(str, exp))
regex_findall(str, exp)
return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regex_findall")(str, exp))
//upon calling a regex match or search, a /datum/regex object is created with str(haystack) and exp(needle) variables set
//it also contains a list(matches) of /datum/match objects, each of which holds the position and length of the match
//matched strings are not returned from the dll, in order to save on memory allocation for large numbers of strings
//instead, you can use regex.str(matchnum) to fetch this string as needed.
//likewise you can also use regex.pos(matchnum) and regex.len(matchnum) as shorthands
/datum/regex
var/str
var/exp
var/error
var/anchors = 0
var/list/matches = list()
New(str, exp, results)
src.str = str
src.exp = exp
if(findtext(results, "$Err$", 1, 6)) //error message
src.error = results
else
var/list/L = params2list(results)
var/list/M
var{i;j}
for(i in L)
M = L[i]
for(j=2, j<=M.len, j+=2)
matches += new /datum/match(text2num(M[j-1]),text2num(M[j]))
anchors = (j-2)/2
return matches
proc
str(i)
if(!i) return str
var/datum/match/M = matches[i]
if(i < 1 || i > matches.len)
throw EXCEPTION("str(): out of bounds")
return copytext(str, M.pos, M.pos+M.len)
pos(i)
if(!i) return 1
if(i < 1 || i > matches.len)
throw EXCEPTION("pos(): out of bounds")
var/datum/match/M = matches[i]
return M.pos
len(i)
if(!i) return length(str)
if(i < 1 || i > matches.len)
throw EXCEPTION("len(): out of bounds")
var/datum/match/M = matches[i]
return M.len
end(i)
if(!i) return length(str)
if(i < 1 || i > matches.len)
throw EXCEPTION("end() out of bounds")
var/datum/match/M = matches[i]
return M.pos + M.len
report() //debug tool
. = ":: RESULTS ::\n:: str :: [html_encode(str)]\n:: exp :: [html_encode(exp)]\n:: anchors :: [anchors]"
if(error)
. += "\n<font color='red'>[error]</font>"
return
for(var/i=1, i<=matches.len, ++i)
. += "\nMatch[i]\n\t[html_encode(str(i))]\n\tpos=[pos(i)] len=[len(i)]"
/datum/match
var/pos
var/len
New(pos, len)
src.pos = pos
src.len = len
#endif
-54
View File
@@ -1,54 +0,0 @@
/mob
var/expression = "\\S+"
var/format = "*"
var/datum/regex/results
verb
set_expression()
var/t = input(usr,"Input Expression","title",expression) as text|null
if(t != null)
expression = t
usr << "Expression set to:\t[html_encode(t)]"
set_format()
var/t = input(usr,"Input Formatter","title",format) as text|null
if(t != null)
format = t
usr << "Format set to:\t[html_encode(t)]"
compare_casesensitive(t as text)
results = regEx_compare(t, expression)
world << results.report()
compare(t as text)
results = regex_compare(t, expression)
world << results.report()
find_casesensitive(t as text)
results = regEx_find(t, expression)
world << results.report()
find(t as text)
results = regex_find(t, expression)
world << results.report()
replaceall_casesensitive(t as text)
usr << regEx_replaceall(t, expression, format)
replaceall(t as text)
usr << regex_replaceall(t, expression, format)
replace_casesensitive(t as text)
usr << html_encode(regEx_replace(t, expression, format))
replace(t as text)
usr << regex_replace(t, expression, format)
findall(t as text)
results = regex_findall(t, expression)
world << results.report()
findall_casesensitive(t as text)
results = regEx_findall(t, expression)
world << results.report()
-7
View File
@@ -203,13 +203,6 @@ proc/checkhtml(var/t)
* Text modification
*/
// See bygex.dm
#ifndef USE_BYGEX
/proc/replacetext(text, find, replacement)
return list2text(text2list(text, find), replacement)
/proc/replacetextEx(text, find, replacement)
return list2text(text2listEx(text, find), replacement)
#endif
/proc/replace_characters(var/t,var/list/repl_chars)
for(var/char in repl_chars)
t = replacetext(t, char, repl_chars[char])
+22 -4
View File
@@ -3,6 +3,25 @@
#define MINUTES *600
#define HOURS *36000
#define TimeOfGame (get_game_time())
#define TimeOfTick (world.tick_usage*0.01*world.tick_lag)
/proc/get_game_time()
var/global/time_offset = 0
var/global/last_time = 0
var/global/last_usage = 0
var/wtime = world.time
var/wusage = world.tick_usage * 0.01
if(last_time < wtime && last_usage > 1)
time_offset += last_usage - 1
last_time = wtime
last_usage = wusage
return wtime + (time_offset + wusage) * world.tick_lag
//Returns the world time in english
/proc/worldtime2text(time = world.time)
return "[round(time / 36000)+12]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
@@ -33,15 +52,14 @@ proc/isDay(var/month, var/day)
* Returns "watch handle" (really just a timestamp :V)
*/
/proc/start_watch()
return world.timeofday
return TimeOfGame
/**
* Returns number of seconds elapsed.
* @param wh number The "Watch Handle" from start_watch(). (timestamp)
*/
/proc/stop_watch(wh)
return round(0.1*(world.timeofday-wh),0.1)
return round(0.1 * (TimeOfGame - wh), 0.1)
/proc/month2number(month)
return month_names.Find(month)
return month_names.Find(month)
+4 -151
View File
@@ -2,7 +2,6 @@
* Holds procs designed to change one type of value, into another.
* Contains:
* hex2num & num2hex
* text2list & list2text
* file2list
* angle2dir
* angle2text
@@ -60,161 +59,15 @@
hex = "0[hex]"
return hex || "0"
// Concatenates a list of strings into a single string. A seperator may optionally be provided.
/proc/list2text(list/ls, sep)
if(ls.len <= 1) // Early-out code for empty or singleton lists.
return ls.len ? ls[1] : ""
var/l = ls.len // Made local for sanic speed.
var/i = 0 // Incremented every time a list index is accessed.
if(sep != null)
// Macros expand to long argument lists like so: sep, ls[++i], sep, ls[++i], sep, ls[++i], etc...
#define S1 sep, ls[++i]
#define S4 S1, S1, S1, S1
#define S16 S4, S4, S4, S4
#define S64 S16, S16, S16, S16
. = "[ls[++i]]" // Make sure the initial element is converted to text.
// Having the small concatenations come before the large ones boosted speed by an average of at least 5%.
if(l-1 & 0x01) // 'i' will always be 1 here.
. = text("[][][]", ., S1) // Append 1 element if the remaining elements are not a multiple of 2.
if(l-i & 0x02)
. = text("[][][][][]", ., S1, S1) // Append 2 elements if the remaining elements are not a multiple of 4.
if(l-i & 0x04)
. = text("[][][][][][][][][]", ., S4) // And so on....
if(l-i & 0x08)
. = text("[][][][][][][][][][][][][][][][][]", ., S4, S4)
if(l-i & 0x10)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16)
if(l-i & 0x20)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, S16)
if(l-i & 0x40)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
while(l > i) // Chomp through the rest of the list, 128 elements at a time.
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
#undef S64
#undef S16
#undef S4
#undef S1
else
// Macros expand to long argument lists like so: ls[++i], ls[++i], ls[++i], etc...
#define S1 ls[++i]
#define S4 S1, S1, S1, S1
#define S16 S4, S4, S4, S4
#define S64 S16, S16, S16, S16
. = "[ls[++i]]" // Make sure the initial element is converted to text.
if(l-1 & 0x01) // 'i' will always be 1 here.
. += S1 // Append 1 element if the remaining elements are not a multiple of 2.
if(l-i & 0x02)
. = text("[][][]", ., S1, S1) // Append 2 elements if the remaining elements are not a multiple of 4.
if(l-i & 0x04)
. = text("[][][][][]", ., S4) // And so on...
if(l-i & 0x08)
. = text("[][][][][][][][][]", ., S4, S4)
if(l-i & 0x10)
. = text("[][][][][][][][][][][][][][][][][]", ., S16)
if(l-i & 0x20)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, S16)
if(l-i & 0x40)
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
while(l > i) // Chomp through the rest of the list, 128 elements at a time.
. = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
#undef S64
#undef S16
#undef S4
#undef S1
//slower then list2text, but correctly processes associative lists.
proc/tg_list2text(list/list, glue=",", assocglue=";")
if(!istype(list) || !list.len)
return
var/output
for(var/i=1 to list.len)
if(!isnull(list["[list[i]]"]))
output += (i!=1? glue : null)+ "[list[i]]"+(i!=1? assocglue : null)+"[list["[list[i]]"]]"
else
output += (i!=1? glue : null)+ "[list[i]]"
return output
proc/tg_text2list(text, glue=",", assocglue=";")
var/length = length(glue)
if(length < 1) return list(text)
. = list()
var/lastglue_found = 1
var/foundglue
var/foundassocglue
var/searchtext
do
foundglue = findtext(text, glue, lastglue_found, 0)
searchtext = copytext(text, lastglue_found, foundglue)
foundassocglue = findtext(searchtext, assocglue, 1, 0)
if(foundassocglue)
var/sublist = copytext(searchtext, 1, foundassocglue)
sublist[1] = copytext(searchtext, foundassocglue, 0)
. += sublist
else
. += copytext(text, lastglue_found, foundglue)
lastglue_found = foundglue + length
while(foundglue)
//Converts a string into a list by splitting the string at each delimiter found. (discarding the seperator)
/proc/text2list(text, delimiter="\n")
var/delim_len = length(delimiter)
if(delim_len < 1) return list(text)
. = list()
var/last_found = 1
var/found
do
found = findtext(text, delimiter, last_found, 0)
. += copytext(text, last_found, found)
last_found = found + delim_len
while(found)
//Case Sensitive!
/proc/text2listEx(text, delimiter="\n")
var/delim_len = length(delimiter)
if(delim_len < 1) return list(text)
. = list()
var/last_found = 1
var/found
do
found = findtextEx(text, delimiter, last_found, 0)
. += copytext(text, last_found, found)
last_found = found + delim_len
while(found)
/proc/text2numlist(text, delimiter="\n")
var/list/num_list = list()
for(var/x in text2list(text, delimiter))
for(var/x in splittext(text, delimiter))
num_list += text2num(x)
return num_list
//Splits the text of a file at seperator and returns them in a list.
/proc/file2list(filename, seperator="\n")
return text2list(return_file_text(filename),seperator)
return splittext(return_file_text(filename),seperator)
//Turns a direction into text
@@ -428,7 +281,7 @@ proc/tg_text2list(text, glue=",", assocglue=";")
//Argument: Give this a space-separated string consisting of 6 numbers. Returns null if you don't
/proc/text2matrix(var/matrixtext)
var/list/matrixtext_list = text2list(matrixtext, " ")
var/list/matrixtext_list = splittext(matrixtext, " ")
var/list/matrix_list = list()
for(var/item in matrixtext_list)
var/entry = text2num(item)
@@ -443,4 +296,4 @@ proc/tg_text2list(text, glue=",", assocglue=";")
var/d = matrix_list[4]
var/e = matrix_list[5]
var/f = matrix_list[6]
return matrix(a, b, c, d, e, f)
return matrix(a, b, c, d, e, f)
+4 -4
View File
@@ -1601,11 +1601,11 @@ var/mob/dview/dview_mob = new
return 1
/proc/screen_loc2turf(scr_loc, turf/origin)
var/tX = text2list(scr_loc, ",")
var/tY = text2list(tX[2], ":")
var/tX = splittext(scr_loc, ",")
var/tY = splittext(tX[2], ":")
var/tZ = origin.z
tY = tY[1]
tX = text2list(tX[1], ":")
tX = splittext(tX[1], ":")
tX = tX[1]
tX = max(1, min(world.maxx, origin.x + (text2num(tX) - (world.view + 1))))
tY = max(1, min(world.maxy, origin.y + (text2num(tY) - (world.view + 1))))
@@ -1665,4 +1665,4 @@ var/global/list/g_fancy_list_of_types = null
var/value = L[key]
if(findtext("[key]", filter) || findtext("[value]", filter))
matches[key] = value
return matches
return matches
+1 -3
View File
@@ -13,12 +13,10 @@
#define MAX_NAME_LEN 26
// Version check, terminates compilation if someone is using a version of BYOND that's too old
#if DM_VERSION < 508
#if DM_VERSION < 510
#error OUTDATED VERSION ERROR - \
Due to BYOND features used in this codebase, you must update to version 508 or later to compile. \
This may require updating to a beta release.
#endif
var/global/list/processing_objects = list() //This has to be initialized BEFORE world
#define USE_BYGEX
-47
View File
@@ -24,53 +24,6 @@ var/global/list/dead_mob_list = list() //List of all dead mobs, including cli
var/global/list/respawnable_list = list() //List of all mobs, dead or in mindless creatures that still be respawned.
var/global/list/simple_animal_list = list() //List of all simple animals, including clientless
//global var of unsafe-to-spawn-on-reaction mobs
var/global/list/blocked_mobs = list(/mob/living/simple_animal,
/mob/living/simple_animal/hostile,
/mob/living/simple_animal/hostile/pirate,
/mob/living/simple_animal/hostile/pirate/ranged,
/mob/living/simple_animal/hostile/russian,
/mob/living/simple_animal/hostile/russian/ranged,
/mob/living/simple_animal/hostile/syndicate,
/mob/living/simple_animal/hostile/syndicate/melee,
/mob/living/simple_animal/hostile/syndicate/melee/space,
/mob/living/simple_animal/hostile/syndicate/ranged,
/mob/living/simple_animal/hostile/syndicate/ranged/space,
/mob/living/simple_animal/hostile/alien/queen/large,
/mob/living/simple_animal/hostile/retaliate,
/mob/living/simple_animal/hostile/retaliate/clown,
/mob/living/simple_animal/hostile/mushroom,
/mob/living/simple_animal/hostile/asteroid,
/mob/living/simple_animal/hostile/asteroid/basilisk,
/mob/living/simple_animal/hostile/asteroid/goldgrub,
/mob/living/simple_animal/hostile/asteroid/goliath,
/mob/living/simple_animal/hostile/asteroid/hivelord,
/mob/living/simple_animal/hostile/asteroid/hivelordbrood,
/mob/living/simple_animal/hostile/carp/holocarp,
/mob/living/simple_animal/hostile/mining_drone,
/mob/living/simple_animal/hostile/spaceWorm,
/mob/living/simple_animal/hostile/spaceWorm/wormHead,
/mob/living/simple_animal/ascendant_shadowling,
/mob/living/simple_animal/slaughter,
/mob/living/simple_animal/hostile/retaliate/araneus,
/mob/living/simple_animal/hostile/syndicate/ranged/orion,
/mob/living/simple_animal/hostile/statue,
/mob/living/simple_animal/hostile/guardian,
/mob/living/simple_animal/hostile/guardian/fire,
/mob/living/simple_animal/hostile/guardian/healer,
/mob/living/simple_animal/hostile/guardian/punch,
/mob/living/simple_animal/hostile/guardian/punch/sealpunch,
/mob/living/simple_animal/hostile/guardian/healer/sealhealer,
/mob/living/simple_animal/hostile/guardian/ranged,
/mob/living/simple_animal/hostile/guardian/bomb,
/mob/living/simple_animal/hostile/winter/santa,
/mob/living/simple_animal/hostile/winter/santa/stage_1,
/mob/living/simple_animal/hostile/winter/santa/stage_2,
/mob/living/simple_animal/hostile/winter/santa/stage_3,
/mob/living/simple_animal/hostile/winter/santa/stage_4,
/mob/living/simple_animal/hostile/alien/maid
)
var/global/list/med_hud_users = list()
var/global/list/sec_hud_users = list()
var/global/list/antag_hud_users = list()
+1
View File
@@ -0,0 +1 @@
#define CLICKCATCHER_PLANE -99
+2 -2
View File
@@ -405,9 +405,9 @@
buckled.handle_rotation()*/
/obj/screen/click_catcher
icon = 'icons/mob/screen1_full.dmi'
icon = 'icons/mob/screen_full.dmi'
icon_state = "passage0"
layer = 0
plane = CLICKCATCHER_PLANE
mouse_opacity = 2
screen_loc = "CENTER-7,CENTER-7"
+1 -16
View File
@@ -166,21 +166,6 @@
alien_plasma_display.name = "plasma stored"
alien_plasma_display.screen_loc = ui_alienplasmadisplay
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "CENTER-7,CENTER-7"
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "WEST,SOUTH to EAST,NORTH"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = 'icons/mob/screen1_alien.dmi'
mymob.zone_sel.overlays.Cut()
@@ -188,6 +173,6 @@
mymob.client.screen = list()
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, nightvisionicon, mymob.pullin, alien_plasma_display, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, nightvisionicon, mymob.pullin, alien_plasma_display, mymob.pullin) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other
mymob.client.screen += mymob.client.void
+1 -16
View File
@@ -61,21 +61,6 @@
mymob.pullin.update_icon(mymob)
mymob.pullin.screen_loc = ui_pull_resist
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "CENTER-7,CENTER-7"
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "WEST,SOUTH to EAST,NORTH"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = 'icons/mob/screen1_alien.dmi'
mymob.zone_sel.overlays.Cut()
@@ -83,6 +68,6 @@
mymob.client.screen = list()
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, nightvisionicon, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, nightvisionicon, mymob.pullin) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other
mymob.client.screen += mymob.client.void
+1 -16
View File
@@ -47,24 +47,9 @@
mymob.pullin.update_icon(mymob)
mymob.pullin.screen_loc = ui_bot_pull
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "CENTER-7,CENTER-7"
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = 'icons/mob/screen1_bot.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "WEST,SOUTH to EAST,NORTH"
mymob.flash.layer = 17
mymob.client.screen = list()
mymob.client.screen += list(mymob.oxygen, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash)
mymob.client.screen += list(mymob.oxygen, mymob.fire, mymob.healths, mymob.pullin)
mymob.client.screen += adding + other
mymob.client.screen += mymob.client.void
return
+112
View File
@@ -0,0 +1,112 @@
#define FULLSCREEN_LAYER 18
#define DAMAGE_LAYER FULLSCREEN_LAYER + 0.1
#define BLIND_LAYER DAMAGE_LAYER + 0.1
#define CRIT_LAYER BLIND_LAYER + 0.1
/mob
var/list/screens = list()
/mob/proc/overlay_fullscreen(category, type, severity)
var/obj/screen/fullscreen/screen
if(screens[category])
screen = screens[category]
if(screen.type != type)
clear_fullscreen(category, FALSE)
return .()
else if(!severity || severity == screen.severity)
return null
else
screen = new type
screen.icon_state = "[initial(screen.icon_state)][severity]"
screen.severity = severity
screens[category] = screen
if(client)
client.screen += screen
return screen
/mob/proc/clear_fullscreen(category, animated = 10)
var/obj/screen/fullscreen/screen = screens[category]
if(!screen)
return
screens -= category
if(animated)
spawn(0)
animate(screen, alpha = 0, time = animated)
sleep(animated)
if(client)
client.screen -= screen
qdel(screen)
else
if(client)
client.screen -= screen
qdel(screen)
/mob/proc/clear_fullscreens()
for(var/category in screens)
clear_fullscreen(category)
/datum/hud/proc/reload_fullscreen()
var/list/screens = mymob.screens
for(var/category in screens)
mymob.client.screen |= screens[category]
/obj/screen/fullscreen
icon = 'icons/mob/screen_full.dmi'
icon_state = "default"
screen_loc = "CENTER-7,CENTER-7"
layer = FULLSCREEN_LAYER
mouse_opacity = 0
var/severity = 0
/obj/screen/fullscreen/Destroy()
..()
severity = 0
return QDEL_HINT_HARDDEL_NOW
/obj/screen/fullscreen/brute
icon_state = "brutedamageoverlay"
layer = DAMAGE_LAYER
/obj/screen/fullscreen/oxy
icon_state = "oxydamageoverlay"
layer = DAMAGE_LAYER
/obj/screen/fullscreen/crit
icon_state = "passage"
layer = CRIT_LAYER
/obj/screen/fullscreen/blind
icon_state = "blackimageoverlay"
layer = BLIND_LAYER
/obj/screen/fullscreen/impaired
icon_state = "impairedoverlay"
/obj/screen/fullscreen/blurry
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "blurry"
/obj/screen/fullscreen/flash
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "flash"
/obj/screen/fullscreen/flash/noise
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "noise"
/obj/screen/fullscreen/high
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "druggy"
#undef FULLSCREEN_LAYER
#undef BLIND_LAYER
#undef DAMAGE_LAYER
#undef CRIT_LAYER
+4 -85
View File
@@ -1,84 +1,3 @@
/*
The global hud:
Uses the same visual objects for all players.
*/
var/datum/global_hud/global_hud = new()
/datum/hud/var/obj/screen/grab_intent
/datum/hud/var/obj/screen/hurt_intent
/datum/hud/var/obj/screen/disarm_intent
/datum/hud/var/obj/screen/help_intent
/datum/global_hud
var/obj/screen/druggy
var/obj/screen/blurry
var/list/vimpaired
var/list/darkMask
/datum/global_hud/New()
//420erryday psychedellic colours screen overlay for when you are high
druggy = new /obj/screen()
druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
druggy.icon_state = "druggy"
druggy.layer = 17
druggy.mouse_opacity = 0
//that white blurry effect you get when you eyes are damaged
blurry = new /obj/screen()
blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
blurry.icon_state = "blurry"
blurry.layer = 17
blurry.mouse_opacity = 0
var/obj/screen/O
var/i
//that nasty looking dither you get when you're short-sighted
vimpaired = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen)
O = vimpaired[1]
O.screen_loc = "WEST,SOUTH to CENTER-3,NORTH"
O = vimpaired[2]
O.screen_loc = "WEST,SOUTH to EAST,CENTER-3"
O = vimpaired[3]
O.screen_loc = "CENTER+3,SOUTH to EAST,NORTH"
O = vimpaired[4]
O.screen_loc = "WEST,CENTER+3 to EAST,NORTH"
//welding mask overlay black/dither
darkMask = newlist(/obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen)
O = darkMask[1]
O.screen_loc = "CENTER-5,CENTER-5 to CENTER-3,CENTER+5"
O = darkMask[2]
O.screen_loc = "CENTER-5,CENTER-5 to CENTER+5,CENTER-3"
O = darkMask[3]
O.screen_loc = "CENTER+3,CENTER-5 to CENTER+5,CENTER+5"
O = darkMask[4]
O.screen_loc = "CENTER-5,CENTER+3 to CENTER+5,CENTER+5"
O = darkMask[5]
O.screen_loc = "WEST,SOUTH to CENTER-5,NORTH"
O = darkMask[6]
O.screen_loc = "WEST,SOUTH to EAST,CENTER-5"
O = darkMask[7]
O.screen_loc = "CENTER+5,SOUTH to EAST,NORTH"
O = darkMask[8]
O.screen_loc = "WEST,CENTER+5 to EAST,NORTH"
for(i = 1, i <= 4, i++)
O = vimpaired[i]
O.icon_state = "dither50"
O.layer = 17
O.mouse_opacity = 0
O = darkMask[i]
O.icon_state = "dither50"
O.layer = 17
O.mouse_opacity = 0
for(i = 5, i <= 8, i++)
O = darkMask[i]
O.icon_state = "black"
O.layer = 17
O.mouse_opacity = 0
/*
The hud datum
Used to show and hide huds for all the different mob types,
@@ -182,8 +101,6 @@ datum/hud/New(mob/owner)
monkey_hud(ui_style, ui_color, ui_alpha)
else if(ishuman(mymob))
human_hud(ui_style, ui_color, ui_alpha) // Pass the player the UI style chosen in preferences
else if(isbrain(mymob))
brain_hud(ui_style)
else if( islarva(mymob) || isfacehugger(mymob) )
larva_hud()
else if (isembryo(mymob))
@@ -208,8 +125,8 @@ datum/hud/New(mob/owner)
guardian_hud()
else if(ispet(mymob))
corgi_hud()
else
reload_fullscreen()
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
/mob/verb/button_pressed_F12(var/full = 0 as null)
@@ -275,6 +192,8 @@ datum/hud/New(mob/owner)
hud_used.hidden_inventory_update()
hud_used.persistant_inventory_update()
update_action_buttons()
//hud_used.reorganize_alerts()
else
usr << "\red Inventory hiding is currently only supported for human mobs, sorry."
else
+2 -27
View File
@@ -424,31 +424,6 @@
lingstingdisplay = new /obj/screen/ling/sting()
lingstingdisplay.screen_loc = ui_lingstingdisplay
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = "blind"
mymob.blind.screen_loc = "CENTER-7,CENTER-7"
mymob.blind.mouse_opacity = 0
mymob.blind.layer = 0
mymob.damageoverlay = new /obj/screen()
mymob.damageoverlay.icon = 'icons/mob/screen1_full.dmi'
mymob.damageoverlay.icon_state = "oxydamageoverlay0"
mymob.damageoverlay.name = "dmg"
mymob.damageoverlay.screen_loc = "CENTER-7,CENTER-7"
mymob.damageoverlay.mouse_opacity = 0
mymob.damageoverlay.layer = 18.1 //The black screen overlay sets layer to 18 to display it, this one has to be just on top.
mymob.flash = new /obj/screen()
mymob.flash.icon = ui_style
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "WEST,SOUTH to EAST,NORTH"
mymob.flash.layer = 17
mymob.pain = new /obj/screen( null )
mymob.zone_sel = new /obj/screen/zone_sel( null )
mymob.zone_sel.icon = ui_style
mymob.zone_sel.color = ui_color
@@ -480,10 +455,10 @@
mymob.client.screen = list()
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.healthdoll, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, mymob.gun_setting_icon, lingchemdisplay, lingstingdisplay) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.healthdoll, mymob.nutrition_icon, mymob.pullin, mymob.gun_setting_icon, lingchemdisplay, lingstingdisplay) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += src.adding + src.hotkeybuttons
mymob.client.screen += mymob.client.void
inventory_shown = 0;
inventory_shown = 0
return
+2 -81
View File
@@ -19,59 +19,6 @@
src.adding += using
action_intent = using
//intent small hud objects
/* var/icon/ico
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
using.alpha = ui_alpha
using.layer = 21
src.adding += using
help_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
using.alpha = ui_alpha
using.layer = 21
src.adding += using
disarm_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
using.alpha = ui_alpha
using.layer = 21
src.adding += using
grab_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.icon = ico
using.screen_loc = ui_acti
using.alpha = ui_alpha
using.layer = 21
src.adding += using
hurt_intent = using
*/
//end intent small hud objects
using = new /obj/screen/mov_intent()
using.name = "mov_intent"
using.dir = SOUTHWEST
@@ -245,32 +192,6 @@
lingstingdisplay = new /obj/screen/ling/sting()
lingstingdisplay.screen_loc = ui_lingstingdisplay
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = "blind"
mymob.blind.screen_loc = "CENTER-7,CENTER-7"
mymob.blind.mouse_opacity = 0
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
mymob.damageoverlay = new /obj/screen()
mymob.damageoverlay.icon = 'icons/mob/screen1_full.dmi'
mymob.damageoverlay.icon_state = "oxydamageoverlay0"
mymob.damageoverlay.name = "dmg"
mymob.damageoverlay.screen_loc = "CENTER-7,CENTER-7"
mymob.damageoverlay.mouse_opacity = 0
mymob.damageoverlay.layer = 18.1 //The black screen overlay sets layer to 18 to display it, this one has to be just on top.
mymob.flash = new /obj/screen()
mymob.flash.icon = ui_style
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "WEST,SOUTH to EAST,NORTH"
mymob.flash.layer = 17
mymob.pain = new /obj/screen( null )
mymob.zone_sel = new /obj/screen/zone_sel( null )
mymob.zone_sel.icon = ui_style
mymob.zone_sel.color = ui_color
@@ -302,8 +223,8 @@
mymob.client.screen = list()
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.healthdoll, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, mymob.gun_setting_icon, lingchemdisplay, lingstingdisplay) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.healthdoll, mymob.nutrition_icon, mymob.pullin, mymob.gun_setting_icon, lingchemdisplay, lingstingdisplay) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += src.adding + src.hotkeybuttons
mymob.client.screen += mymob.client.void
return
return
+3 -3
View File
@@ -27,13 +27,13 @@
return
//Split screen-loc up into X+Pixel_X and Y+Pixel_Y
var/list/screen_loc_params = text2list(PM["screen-loc"], ",")
var/list/screen_loc_params = splittext(PM["screen-loc"], ",")
//Split X+Pixel_X up into list(X, Pixel_X)
var/list/screen_loc_X = text2list(screen_loc_params[1],":")
var/list/screen_loc_X = splittext(screen_loc_params[1],":")
//Split Y+Pixel_Y up into list(Y, Pixel_Y)
var/list/screen_loc_Y = text2list(screen_loc_params[2],":")
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
if(snap2grid) //Discard Pixel Values
screen_loc = "[screen_loc_X[1]],[screen_loc_Y[1]]"
+1 -10
View File
@@ -35,19 +35,10 @@
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.client.screen = null
mymob.client.screen = list()
mymob.client.screen += list(mymob.fire, mymob.healths, mymob.pullin, mymob.oxygen, mymob.toxin)
/datum/hud/proc/brain_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "CENTER-7,CENTER-7"
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
/datum/hud/proc/blob_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
+1 -34
View File
@@ -210,50 +210,17 @@
mymob.pullin.update_icon(mymob)
mymob.pullin.screen_loc = ui_borg_pull
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "CENTER-7,CENTER-7"
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = 'icons/mob/screen1_robot.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "WEST,SOUTH to EAST,NORTH"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = 'icons/mob/screen1_robot.dmi'
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
//Handle the gun settings buttons
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
mymob.item_use_icon = new /obj/screen/gun/item(null)
//if (mymob.client)
// if (mymob.client.gun_mode) // If in aim mode, correct the sprite
// mymob.gun_setting_icon.dir = 2
//for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
// if (G.target)
// mymob.item_use_icon = new /obj/screen/gun/item(null)
// if (mymob.client.target_can_click)
// mymob.item_use_icon.dir = 1
//src.adding += mymob.item_use_icon
/*mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
mymob.gun_move_icon.dir = 1
mymob.gun_run_icon = new /obj/screen/gun/run(null)
if (mymob.client.target_can_run)
mymob.gun_run_icon.dir = 1
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon*/
mymob.client.screen = list()
mymob.client.screen += list(mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon, mymob:lamp_button) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += list(mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.gun_setting_icon, mymob:lamp_button) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other
mymob.client.screen += mymob.client.void
return
@@ -1,27 +0,0 @@
/**
* _stubs.dm
*
* This file contains constructs that the process scheduler expects to exist
* in a standard ss13 fork.
*/
/*
/**
* message_admins
*
* sends a message to admins
*/
/proc/message_admins(msg)
world << msg
*/
/**
* logTheThing
*
* In goonstation, this proc writes a message to either the world log or diary.
*
* Blame Keelin.
*/
/proc/logTheThing(type, source, target, text, diaryType)
if(diaryType)
world << "Diary: \[[diaryType]:[type]] [text]"
else
world << "Log: \[[type]] [text]"
@@ -69,10 +69,10 @@
* recordkeeping vars
*/
// Records the time (1/10s timeofday) at which the process last finished sleeping
// Records the time (1/10s timeoftick) at which the process last finished sleeping
var/tmp/last_slept = 0
// Records the time (1/10s timeofday) at which the process last began running
// Records the time (1/10s timeofgame) at which the process last began running
var/tmp/run_start = 0
// Records the number of times this process has been killed and restarted
@@ -106,12 +106,8 @@
last_object = null
/datum/controller/process/proc/started()
var/timeofhour = TimeOfHour
// Initialize last_slept so we can know when to sleep
last_slept = timeofhour
// Initialize run_start so we can detect hung processes.
run_start = timeofhour
run_start = TimeOfGame
// Initialize defer count
cpu_defer_count = 0
@@ -163,18 +159,13 @@
setStatus(PROCESS_STATUS_HUNG)
/datum/controller/process/proc/handleHung()
var/timeofhour = TimeOfHour
var/datum/lastObj = last_object
var/lastObjType = "null"
if(istype(lastObj))
lastObjType = lastObj.type
// If timeofhour has rolled over, then we need to adjust.
if (timeofhour < run_start)
run_start -= 36000
var/msg = "[name] process hung at tick #[ticks]. Process was unresponsive for [(timeofhour - run_start) / 10] seconds and was restarted. Last task: [last_task]. Last Object Type: [lastObjType]"
logTheThing("debug", null, null, msg)
logTheThing("diary", null, null, msg, "debug")
var/msg = "[name] process hung at tick #[ticks]. Process was unresponsive for [(TimeOfGame - run_start) / 10] seconds and was restarted. Last task: [last_task]. Last Object Type: [lastObjType]"
log_debug(msg)
message_admins(msg)
main.restartProcess(src.name)
@@ -182,8 +173,8 @@
/datum/controller/process/proc/kill()
if (!killed)
var/msg = "[name] process was killed at tick #[ticks]."
logTheThing("debug", null, null, msg)
logTheThing("diary", null, null, msg, "debug")
log_debug(msg)
message_admins(msg)
//finished()
// Allow inheritors to clean up if needed
@@ -208,17 +199,12 @@
if (main.getCurrentTickElapsedTime() > main.timeAllowance)
sleep(world.tick_lag)
cpu_defer_count++
last_slept = TimeOfHour
last_slept = 0
else
var/timeofhour = TimeOfHour
// If timeofhour has rolled over, then we need to adjust.
if (timeofhour < last_slept)
last_slept -= 36000
if (timeofhour > last_slept + sleep_interval)
if (TimeOfTick > last_slept + sleep_interval)
// If we haven't slept in sleep_interval deciseconds, sleep to allow other work to proceed.
sleep(0)
last_slept = TimeOfHour
last_slept = TimeOfTick
/datum/controller/process/proc/update()
// Clear delta
@@ -239,10 +225,7 @@
/datum/controller/process/proc/getElapsedTime()
var/timeofhour = TimeOfHour
if (timeofhour < run_start)
return timeofhour - (run_start - 36000)
return timeofhour - run_start
return TimeOfGame - run_start
/datum/controller/process/proc/tickDetail()
return
@@ -43,8 +43,6 @@ var/global/datum/controller/processScheduler/processScheduler
var/tmp/currentTick = 0
var/tmp/currentTickStart = 0
var/tmp/timeAllowance = 0
var/tmp/cpuAverage = 0
@@ -247,7 +245,7 @@ var/global/datum/controller/processScheduler/processScheduler
/datum/controller/processScheduler/proc/recordStart(var/datum/controller/process/process, var/time = null)
if (isnull(time))
time = TimeOfHour
time = TimeOfGame
last_queued[process] = world.time
last_start[process] = time
else
@@ -256,11 +254,7 @@ var/global/datum/controller/processScheduler/processScheduler
/datum/controller/processScheduler/proc/recordEnd(var/datum/controller/process/process, var/time = null)
if (isnull(time))
time = TimeOfHour
// If world.timeofday has rolled over, then we need to adjust.
if (time < last_start[process])
last_start[process] -= 36000
time = TimeOfGame
var/lastRunTime = time - last_start[process]
@@ -349,13 +343,12 @@ var/global/datum/controller/processScheduler/processScheduler
updateCurrentTickData()
return 0
else
return TimeOfHour - currentTickStart
return TimeOfTick
/datum/controller/processScheduler/proc/updateCurrentTickData()
if (world.time > currentTick)
// New tick!
currentTick = world.time
currentTickStart = TimeOfHour
updateTimeAllowance()
cpuAverage = (world.cpu + cpuAverage + cpuAverage) / 3
-27
View File
@@ -1,27 +0,0 @@
/datum/controller/process/bot/setup()
name = "bot"
schedule_interval = 20 // every 2 seconds
/datum/controller/process/bot/started()
..()
if(!aibots)
aibots = list()
/datum/controller/process/bot/statProcess()
..()
stat(null, "[aibots && aibots.len] bots")
/datum/controller/process/bot/doWork()
for(last_object in aibots)
var/obj/machinery/bot/B = last_object
if(istype(B) && isnull(B.gcDestroyed))
// Some bots sleep when they process, but there's not many bots, so just spawn them off
spawn(-1)
try
B.bot_process()
catch(var/exception/e)
catchException(e, B)
SCHECK
else
catchBadType(B)
aibots -= B
+1 -1
View File
@@ -60,7 +60,7 @@ var/global/datum/controller/process/timer/timer_master
event.thingToCall = thingToCall
event.procToCall = procToCall
event.timeToRun = world.time + wait
event.hash = list2text(args)
event.hash = jointext(args, null)
if(args.len > 4)
event.argList = args.Copy(5)
+2 -7
View File
@@ -167,8 +167,6 @@
var/disable_away_missions = 0 // disable away missions
var/autoconvert_notes = 0 //if all connecting player's notes should attempt to be converted to the database
var/ooc_allowed = 1
var/looc_allowed = 1
var/dooc_allowed = 1
@@ -223,7 +221,7 @@
if(type == "config")
switch (name)
if ("resource_urls")
config.resource_urls = text2list(value, " ")
config.resource_urls = splittext(value, " ")
if ("admin_legacy_system")
config.admin_legacy_system = 1
@@ -458,7 +456,7 @@
config.comms_password = value
if("irc_bot_host")
config.irc_bot_host = text2list(value, ";")
config.irc_bot_host = splittext(value, ";")
if("main_irc")
config.main_irc = value
@@ -546,9 +544,6 @@
if("disable_away_missions")
config.disable_away_missions = 1
if("autoconvert_notes")
config.autoconvert_notes = 1
if("disable_lobby_music")
config.disable_lobby_music = 1
+1 -1
View File
@@ -557,7 +557,7 @@
return "[garbletext(copytext(Text,l/2,0))][pick("#","|","/","*",".","."," ","."," "," ")]"
proc/garble_keeptags(var/Text)
var/list/L = text2list(Text,">")
var/list/L = splittext(Text,">")
var/result = ""
for(var/string in L)
var/index = findtextEx(string,"<")
+3 -3
View File
@@ -182,7 +182,7 @@ var/list/advance_cures = list(
CRASH("We did not have any symptoms before generating properties.")
return
var/list/properties = list("resistance" = 1, "stealth" = 1, "stage_rate" = 1, "transmittable" = 1, "severity" = 0)
var/list/properties = list("resistance" = 1, "stealth" = 0, "stage_rate" = 1, "transmittable" = 1, "severity" = 0)
for(var/datum/symptom/S in symptoms)
@@ -199,7 +199,7 @@ var/list/advance_cures = list(
if(properties && properties.len)
switch(properties["stealth"])
if(2 to 3)
if(2)
visibility_flags = HIDDEN_SCANNER
if(3 to INFINITY)
visibility_flags = HIDDEN_SCANNER|HIDDEN_PANDEMIC
@@ -294,7 +294,7 @@ var/list/advance_cures = list(
for(var/datum/symptom/S in symptoms)
L += S.id
L = sortList(L) // Sort the list so it doesn't matter which order the symptoms are in.
var/result = list2text(L, ":")
var/result = jointext(L, ":")
id = result
return id
+6 -2
View File
@@ -13,7 +13,11 @@ var/datum/atom_hud/huds = list( \
ANTAG_HUD_OPS = new/datum/atom_hud/antag(), \
ANTAG_HUD_WIZ = new/datum/atom_hud/antag(), \
ANTAG_HUD_SHADOW = new/datum/atom_hud/antag(), \
ANTAG_HUD_SOLO = new/datum/atom_hud/antag(), \
ANTAG_HUD_TRAITOR = new/datum/atom_hud/antag/hidden(),\
ANTAG_HUD_NINJA = new/datum/atom_hud/antag/hidden(),\
ANTAG_HUD_CHANGELING = new/datum/atom_hud/antag/hidden(),\
ANTAG_HUD_VAMPIRE = new/datum/atom_hud/antag/hidden(),\
ANTAG_HUD_ABDUCTOR = new/datum/atom_hud/antag/hidden(),\
)
/datum/atom_hud
@@ -24,7 +28,7 @@ var/datum/atom_hud/huds = list( \
/datum/atom_hud/proc/remove_hud_from(mob/M)
if(!M)
return
if(src in M.permanent_huds)//I will deal with you later -Fethas
if(src in M.permanent_huds)
return
for(var/atom/A in hudatoms)
remove_from_single_hud(M, A)
+1 -1
View File
@@ -44,4 +44,4 @@
qdel(target.wear_mask)
target.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
flick("e_flash", target.flash)
target.flash_eyes()
+1
View File
@@ -1,5 +1,6 @@
/atom/movable
layer = 3
appearance_flags = TILE_BOUND
var/last_move = null
var/anchored = 0
// var/elevation = 2 - not used anywhere
+2 -2
View File
@@ -205,7 +205,7 @@
else
prefix=""
var/list/words = text2list(message," ")
var/list/words = splittext(message," ")
var/list/rearranged = list()
for(var/i=1;i<=words.len;i++)
var/cword = pick(words)
@@ -216,7 +216,7 @@
suffix = copytext(cword,length(cword)-1,length(cword) )
if(length(cword))
rearranged += cword
return "[prefix][uppertext(list2text(rearranged," "))]!!"
return "[prefix][uppertext(jointext(rearranged," "))]!!"
// WAS: /datum/bioEffect/toxic_farts
/datum/dna/gene/disability/toxic_farts
+7 -19
View File
@@ -1,5 +1,9 @@
/datum/atom_hud/antag
hud_icons = list(SPECIALROLE_HUD,NATIONS_HUD)
var/self_visible = 1
/datum/atom_hud/antag/hidden
self_visible = 0
/datum/atom_hud/antag/proc/join_hud(mob/M,var/slave)
if(!istype(M))
@@ -8,15 +12,8 @@
M.mind.antag_hud.leave_hud(M)
if(!ismask(M))//FUCK YOU MASK OF NARNAR!
add_to_hud(M)
add_hud_to(M)
M.mind.antag_hud = src
/datum/atom_hud/antag/proc/join_solo_hud(mob/M,var/slave)//for non team antags and for observer huds
if(!istype(M))
CRASH("join_hud(): [M] ([M.type]) is not a mob!")
if(M.mind.antag_hud && !slave) //note: please let this runtime if a mob has no mind, as mindless mobs shouldn't be getting antagged
M.mind.antag_hud.leave_hud(M)
add_to_hud(M)
if(self_visible)
add_hud_to(M)
M.mind.antag_hud = src
/datum/atom_hud/antag/proc/leave_hud(mob/M)
@@ -49,22 +46,13 @@
if(M.mind || new_icon_state) //in mindless mobs, only null is acceptable, otherwise we're antagging a mindless mob, meaning we should runtime
M.mind.antag_hud_icon_state = new_icon_state
/datum/atom_hud/antag/proc/is_solo_antag(mob/M)
if(M.mind.special_role == "traitor" || M.mind.special_role == "vampire" || M.mind.special_role == "Changeling")
return 1
return 0
//MIND PROCS
//these are called by mind.transfer_to()
/datum/mind/proc/transfer_antag_huds(var/datum/atom_hud/antag/newhud)
leave_all_huds()
ticker.mode.set_antag_hud(current, antag_hud_icon_state)
if(newhud)
if(newhud.is_solo_antag(current))
newhud.join_solo_hud(current)
else
newhud.join_hud(current)
newhud.join_hud(current)
/datum/mind/proc/leave_all_huds()
for(var/datum/atom_hud/antag/hud in huds)
@@ -136,8 +136,8 @@
newtraitor << "\red <B>ATTENTION:</B> \black It is time to pay your debt to the Syndicate..."
newtraitor << "<B>You are now a traitor.</B>"
newtraitor.mind.special_role = "traitor"
var/datum/atom_hud/antag/tatorhud = huds[SPECIALROLE_HUD]
tatorhud.join_solo_hud(newtraitor)
var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_TRAITOR]
tatorhud.join_hud(newtraitor)
set_antag_hud(src, "hudsyndicate")
var/obj_count = 1
@@ -40,6 +40,7 @@
var/obj/effect/blob/factory/factory = null
var/list/human_overlays = list()
var/is_zombie = 0
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/blob/blobspore/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
@@ -160,6 +161,7 @@
maxbodytemp = 360
force_threshold = 10
environment_smash = 3
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/blob/blobbernaut/blob_act()
+3 -3
View File
@@ -164,12 +164,12 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
update_change_icons_removed(changeling_mind)
/datum/game_mode/proc/update_change_icons_added(datum/mind/changeling)
var/datum/atom_hud/antag/linghud = huds[ANTAG_HUD_SOLO]
linghud.join_solo_hud(changeling.current)
var/datum/atom_hud/antag/linghud = huds[ANTAG_HUD_CHANGELING]
linghud.join_hud(changeling.current)
set_antag_hud(changeling.current, "hudchangeling")
/datum/game_mode/proc/update_change_icons_removed(datum/mind/changeling)
var/datum/atom_hud/antag/linghud = huds[ANTAG_HUD_SOLO]
var/datum/atom_hud/antag/linghud = huds[ANTAG_HUD_CHANGELING]
linghud.leave_hud(changeling.current)
set_antag_hud(changeling.current, null)
+2 -2
View File
@@ -986,7 +986,7 @@ var/list/sacrificed = list()
if(iscarbon(L))
var/mob/living/carbon/C = L
flick("e_flash", C.flash)
C.flash_eyes()
if(C.stuttering < 1 && (!(HULK in C.mutations)))
C.stuttering = 1
C.Weaken(1)
@@ -1013,7 +1013,7 @@ var/list/sacrificed = list()
else if(iscarbon(T))
var/mob/living/carbon/C = T
flick("e_flash", C.flash)
C.flash_eyes()
if (!(HULK in C.mutations))
C.silent += 15
C.Weaken(10)
+55
View File
@@ -10,6 +10,10 @@
/var/list/meteors_dust = list(/obj/effect/meteor/dust) //for space dust event
/var/list/meteors_gore = list(/obj/effect/meteor/gore) //Meaty Gore
/var/list/meteors_ops = list(/obj/effect/meteor/goreops) //Meaty Ops
///////////////////////////////
//Meteor spawning global procs
@@ -256,3 +260,54 @@
..()
if(prob(20))
explosion(src.loc,2,4,6,8)
//Gore
/obj/effect/meteor/gore
name = "Oraganic Debris"
icon = 'icons/mob/human.dmi'
icon_state = "body_m_s"
hits = 1
hitpwr = 0
meteorsound = 'sound/effects/blobattack.ogg'
meteordrop = /obj/item/weapon/reagent_containers/food/snacks/meat
var/meteorgibs = /obj/effect/gibspawner/generic
/obj/effect/meteor/gore/make_debris()
..()
new meteorgibs(get_turf(src))
/obj/effect/meteor/gore/ram_turf(turf/T)
if(!istype(T, /turf/space))
new /obj/effect/decal/cleanable/blood(T)
/obj/effect/meteor/gore/Bump(atom/A)
A.ex_act(hitpwr)
get_hit()
//Meteor Ops
/obj/effect/meteor/goreops
name = "MeteorOps"
icon = 'icons/mob/animal.dmi'
icon_state = "syndicaterangedpsace"
hits = 10
hitpwr = 1
meteorsound = 'sound/effects/blobattack.ogg'
meteordrop = /obj/item/weapon/reagent_containers/food/snacks/meat
var/meteorgibs = /obj/effect/gibspawner/generic
/obj/effect/meteor/goreops/make_debris()
..()
new meteorgibs(get_turf(src))
/obj/effect/meteor/goreops/ram_turf(turf/T)
if(!istype(T, /turf/space))
new /obj/effect/decal/cleanable/blood(T)
/obj/effect/meteor/goreops/Bump(atom/A)
A.ex_act(hitpwr)
get_hit()
@@ -32,7 +32,7 @@ datum/directive/bluespace_contagion/initialize()
infected_names+="[candidate.mind.assigned_role] [candidate.mind.name]"
special_orders = list(
"Quarantine these personnel: [list2text(infected_names, ", ")].",
"Quarantine these personnel: [jointext(infected_names, ", ")].",
"Allow one hour for a cure to be manufactured.",
"If no cure arrives after that time, execute and burn the infected.")
@@ -69,7 +69,7 @@ datum/directive/vox_heist/initialize()
sympathizer_names.Add("[candidate.mind.assigned_role] [candidate.mind.name]")
if(sympathizers.len)
special_orders.Add("Brig the following sympathizers: [list2text(sympathizer_names, ", ")]")
special_orders.Add("Brig the following sympathizers: [jointext(sympathizer_names, ", ")]")
datum/directive/vox_heist/meets_prerequisites()
var/list/candidates = get_vox_candidates()
+3 -3
View File
@@ -340,13 +340,13 @@
traitor_mob.mind.store_memory("<b>Potential Collaborator</b>: [M.real_name]")
/datum/game_mode/proc/update_traitor_icons_added(datum/mind/traitor_mind)
var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_SOLO]
var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_TRAITOR]
//var/ref = "\ref[traitor_mind]"
tatorhud.join_solo_hud(traitor_mind.current)
tatorhud.join_hud(traitor_mind.current)
set_antag_hud(traitor_mind.current, "hudsyndicate")
/datum/game_mode/proc/update_traitor_icons_removed(datum/mind/traitor_mind)
var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_SOLO]
var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_TRAITOR]
tatorhud.leave_hud(traitor_mind.current)
set_antag_hud(traitor_mind.current, null)
+3 -3
View File
@@ -328,12 +328,12 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
//prepare for copypaste
/datum/game_mode/proc/update_vampire_icons_added(datum/mind/vampire_mind)
var/datum/atom_hud/antag/vamp_hud = huds[ANTAG_HUD_SOLO]
vamp_hud.join_solo_hud(vampire_mind.current)
var/datum/atom_hud/antag/vamp_hud = huds[ANTAG_HUD_VAMPIRE]
vamp_hud.join_hud(vampire_mind.current)
set_antag_hud(vampire_mind.current, ((vampire_mind in vampires) ? "hudvampire" : "hudvampirethrall"))
/datum/game_mode/proc/update_vampire_icons_removed(datum/mind/vampire_mind)
var/datum/atom_hud/antag/vampire_hud = huds[ANTAG_HUD_SOLO]
var/datum/atom_hud/antag/vampire_hud = huds[ANTAG_HUD_VAMPIRE]
vampire_hud.leave_hud(vampire_mind.current)
set_antag_hud(vampire_mind.current, null)
+2 -2
View File
@@ -134,7 +134,7 @@
if(!req_access)
req_access = list()
if(req_access_txt)
var/list/req_access_str = text2list(req_access_txt, ";")
var/list/req_access_str = splittext(req_access_txt, ";")
for(var/x in req_access_str)
var/n = text2num(x)
if(n)
@@ -143,7 +143,7 @@
if(!req_one_access)
req_one_access = list()
if(req_one_access_txt)
var/list/req_one_access_str = text2list(req_one_access_txt,";")
var/list/req_one_access_str = splittext(req_one_access_txt,";")
for(var/x in req_one_access_str)
var/n = text2num(x)
if(n)
+3 -3
View File
@@ -34,7 +34,7 @@ var/list/whitelist = list()
while(query.NextRow())
var/joblist = query.item[1]
if(joblist!="*")
var/allowed_jobs = text2list(joblist,",")
var/allowed_jobs = splittext(joblist,",")
if(rank in allowed_jobs) return 1
else return 1
return 0
@@ -56,7 +56,7 @@ var/list/whitelist = list()
if (!text)
diary << "Failed to load config/alienwhitelist.txt\n"
else
alien_whitelist = text2list(text, "\n")
alien_whitelist = splittext(text, "\n")
//todo: admin aliens
/proc/is_alien_whitelisted(mob/M, var/species)
@@ -78,7 +78,7 @@ var/list/whitelist = list()
while(query.NextRow())
var/specieslist = query.item[1]
if(specieslist!="*")
var/allowed_species = text2list(specieslist,",")
var/allowed_species = splittext(specieslist,",")
if(species in allowed_species) return 1
else return 1
return 0
+3 -4
View File
@@ -375,7 +375,7 @@ update_flag
/obj/machinery/portable_atmospherics/canister/attack_alien(mob/living/carbon/alien/humanoid/user)
return
/obj/machinery/portable_atmospherics/canister/attack_ghost(var/mob/user as mob)
return src.ui_interact(user)
@@ -427,7 +427,7 @@ update_flag
/obj/machinery/portable_atmospherics/canister/Topic(href, href_list)
if(..())
return 1
if (href_list["choice"] == "menu")
menu = text2num(href_list["mode_target"])
@@ -625,13 +625,12 @@ update_flag
if(busy)
return 0
if(!WT.isOn())
if(!WT.remove_fuel(0, user))
return 0
// Do after stuff here
user << "<span class='notice'>You start to slice away at \the [src]...</span>"
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
WT.eyecheck(user)
busy = 1
if(do_after(user, 50, target = src))
busy = 0
+1 -1
View File
@@ -385,4 +385,4 @@
/obj/machinery/camera/portable/process() //Updates whenever the camera is moved.
if(cameranet && get_turf(src) != prev_turf)
cameranet.updatePortableCamera(src)
prev_turf = get_turf(src)
prev_turf = get_turf(src)
@@ -82,7 +82,7 @@
usr << "No input found please hang up and try your call again."
return
var/list/tempnetwork = text2list(input, ",")
var/list/tempnetwork = splittext(input, ",")
if(tempnetwork.len < 1)
usr << "No network found please hang up and try your call again."
return
@@ -153,16 +153,15 @@
if(!anchored)
..()
/obj/item/weapon/camera_assembly/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/user)
/obj/item/weapon/camera_assembly/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/living/user)
if(busy)
return 0
if(!WT.isOn())
if(!WT.remove_fuel(0, user))
return 0
user << "<span class='notice'>You start to weld the [src]..</span>"
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
WT.eyecheck(user)
busy = 1
if(do_after(user, 20, target = src))
busy = 0
+1 -1
View File
@@ -221,7 +221,7 @@ What a mess.*/
return
Perp = new/list()
t1 = lowertext(t1)
var/list/components = text2list(t1, " ")
var/list/components = splittext(t1, " ")
if(components.len > 5)
return //Lets not let them search too greedily.
for(var/datum/data/record/R in data_core.general)
@@ -2,21 +2,21 @@
//this is the master controller, that things will try to dock with.
/obj/machinery/embedded_controller/radio/docking_port_multi
name = "docking port controller"
var/child_tags_txt
var/child_names_txt
var/list/child_names = list()
var/datum/computer/file/embedded_program/docking/multi/docking_program
/obj/machinery/embedded_controller/radio/docking_port_multi/initialize()
..()
docking_program = new/datum/computer/file/embedded_program/docking/multi(src)
program = docking_program
var/list/names = text2list(child_names_txt, ";")
var/list/tags = text2list(child_tags_txt, ";")
var/list/names = splittext(child_names_txt, ";")
var/list/tags = splittext(child_tags_txt, ";")
if (names.len == tags.len)
for (var/i = 1; i <= tags.len; i++)
child_names[tags[i]] = names[i]
@@ -84,10 +84,10 @@
/obj/machinery/embedded_controller/radio/airlock/docking_port_multi/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
var/clean = 0
switch(href_list["command"]) //anti-HTML-hacking checks
if("cycle_ext")
@@ -17,7 +17,7 @@
if (istype(M,/obj/machinery/embedded_controller/radio/docking_port_multi)) //if our parent controller is the right type, then we can auto-init stuff at construction
var/obj/machinery/embedded_controller/radio/docking_port_multi/controller = M
//parse child_tags_txt and create child tags
children_tags = text2list(controller.child_tags_txt, ";")
children_tags = splittext(controller.child_tags_txt, ";")
children_ready = list()
children_override = list()
+7 -24
View File
@@ -66,32 +66,15 @@
src.last_flash = world.time
use_power(1000)
for (var/mob/O in viewers(src, null))
if (get_dist(src, O) > src.range)
for(var/mob/living/L in viewers(src, null))
if (get_dist(src, L) > src.range)
continue
if (istype(O, /mob/living/carbon/human))
var/mob/living/carbon/human/H = O
if(!H.eyecheck() <= 0)
continue
if (istype(O, /mob/living/carbon/alien))//So aliens don't get flashed (they have no external eyes)/N
continue
O.Weaken(strength)
if(O.weakeyes)
O.Weaken(strength * 1.5)
O.visible_message("<span class='disarm'><b>[O]</b> gasps and shields their eyes!</span>")
if (istype(O, /mob/living/carbon/human))
var/mob/living/carbon/human/H = O
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
if (E && (E.damage > E.min_bruised_damage && prob(E.damage + 50)))
flick("e_flash", O:flash)
E.damage += rand(1, 2)
else
if(!O.blinded)
flick("flash", O:flash)
if(L.flash_eyes(affect_silicon = 1))
L.Weaken(strength)
if(L.weakeyes)
L.Weaken(strength * 1.5)
L.visible_message("<span class='disarm'><b>[L]</b> gasps and shields their eyes!</span>")
/obj/machinery/flasher/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
+1 -1
View File
@@ -46,7 +46,7 @@
codes = new()
var/list/entries = text2list(codes_txt, ";") // entries are separated by semicolons
var/list/entries = splittext(codes_txt, ";") // entries are separated by semicolons
for(var/e in entries)
var/index = findtext(e, "=") // format is "key=value"
+1 -1
View File
@@ -556,7 +556,7 @@ var/list/turret_icons
if(!L)
return TURRET_NOT_TARGET
if(!emagged && issilicon(L)) // Don't target silica
if(!emagged && (issilicon(L) || isbot(L))) // Don't target silica
return TURRET_NOT_TARGET
if(L.stat && !emagged) //if the perp is dead/dying, no need to bother really
+6 -25
View File
@@ -88,25 +88,18 @@
remove_display()
return 1
if(STATUS_DISPLAY_TRANSFER_SHUTTLE_TIME) //emergency shuttle timer
var/use_warn = 0
if(shuttle_master.emergency.timer)
message2 = get_shuttle_timer()
switch(shuttle_master.emergency.mode)
if(SHUTTLE_RECALL, SHUTTLE_ESCAPE)
message1 = "-ETR-"
if(SHUTTLE_CALL)
message1 = "-ETA-"
if(SHUTTLE_DOCKED)
message1 = "-ETD-"
else
message1 = "-ERR-"
message2 = "??:??"
use_warn = 1
message1 = "-[shuttle_master.emergency.getModeStr()]-"
message2 = shuttle_master.emergency.getTimerStr()
if(length(message2) > CHARS_PER_LINE)
message2 = "Error!"
update_display(message1, message2, 1)
else
message1 = "TIME"
message2 = worldtime2text()
update_display(message1, message2)
update_display(message1, message2, use_warn)
return 1
if(STATUS_DISPLAY_MESSAGE) //custom messages
var/line1
@@ -168,18 +161,6 @@
if(maptext != new_text)
maptext = new_text
/obj/machinery/status_display/proc/get_shuttle_timer()
var/timeleft = shuttle_master.emergency.timeLeft()
if(timeleft > 0)
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
return "00:00"
/obj/machinery/status_display/proc/get_supply_shuttle_timer()
var/timeleft = shuttle_master.supply.timeLeft()
if(timeleft > 0)
return "[add_zero(num2text((timeleft / 60) % 60),2)]:[add_zero(num2text(timeleft % 60), 2)]"
return "00:00"
/obj/machinery/status_display/proc/remove_display()
if(overlays.len)
overlays.Cut()
+1 -1
View File
@@ -13,7 +13,7 @@
message2 = worldtime2text()
else
message1 = "CARGO"
message2 = get_supply_shuttle_timer()
shuttle_master.supply.getTimerStr()
if(lentext(message2) > CHARS_PER_LINE)
message2 = "Error"
+4 -1
View File
@@ -90,9 +90,12 @@
race = "Artificial Life"
else if(isslime(M)) // NT knows a lot about slimes, but not aliens. Can identify slimes
race = "slime"
race = "Slime"
language = race
else if(isbot(M))
race = "Bot"
else if(isanimal(M))
race = "Domestic Animal"
language = race
+3 -3
View File
@@ -102,7 +102,7 @@
wires = new(src)
spawn(50)
if(product_slogans)
slogan_list += text2list(product_slogans, ";")
slogan_list += splittext(product_slogans, ";")
// So not all machines speak at the exact same time.
// The first time this machine says something will be at slogantime + this random value,
@@ -110,7 +110,7 @@
last_slogan = world.time + rand(0, slogan_delay)
if(product_ads)
ads_list += text2list(product_ads, ";")
ads_list += splittext(product_ads, ";")
build_inventory()
power_change()
@@ -1250,7 +1250,7 @@
vend_delay = 15
icon_state = "artvend"
products = list(/obj/item/stack/cable_coil/random = 10,/obj/item/device/camera = 4,/obj/item/device/camera_film = 6,
/obj/item/weapon/storage/photo_album = 2,/obj/item/stack/wrapping_paper = 4,/obj/item/stack/packageWrap = 4,
/obj/item/weapon/storage/photo_album = 2,/obj/item/stack/wrapping_paper = 4,/obj/item/stack/tape_roll = 5,/obj/item/stack/packageWrap = 4,
/obj/item/weapon/storage/fancy/crayons = 4,/obj/item/weapon/hand_labeler = 4,/obj/item/weapon/paper = 10,
/obj/item/weapon/c_tube = 10,/obj/item/weapon/pen = 5,/obj/item/weapon/pen/blue = 5,
/obj/item/weapon/pen/red = 5)
+2 -3
View File
@@ -31,7 +31,7 @@
flame_range = min (MAX_EX_FLAME_RANGE, flame_range)
spawn(0)
var/start = TimeOfHour
var/watch = start_watch()
if(!epicenter) return
var/max_range = max(devastation_range, heavy_impact_range, light_impact_range, flame_range)
@@ -157,8 +157,7 @@
var/turf/throw_at = get_ranged_target_turf(I, throw_dir, throw_range)
I.throw_at(throw_at, throw_range, 2, no_spin = 1) //Throw it at 2 speed, this is purely visual anyway; don't spin the thrown items, it's very costly.
*/
var/timeofhour = TimeOfHour
var/took = round((start <= timeofhour) ? ((timeofhour-start)/10) : ((timeofhour-(start-36000))/10), 0.01)
var/took = stop_watch(watch)
//You need to press the DebugGame verb to see these now....they were getting annoying and we've collected a fair bit of data. Just -test- changes to explosion code using this please so we can compare
if(Debug2) log_to_dd("## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds.")
+1 -1
View File
@@ -238,7 +238,7 @@
if(C.client)
C.eye_blurry = max(C.eye_blurry, 3)
C.eye_blind = max(C.eye_blind, 1)
if(C.eyecheck() <= 0) // no eye protection? ARGH IT BURNS.
if(C.check_eye_prot() <= 0) // no eye protection? ARGH IT BURNS.
C.confused = max(C.confused, 3)
C.Weaken(3)
C.lip_style = "spray_face"
+20 -18
View File
@@ -75,26 +75,28 @@
return 1
/obj/item/device/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, convert = 1)
/obj/item/device/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, targeted = 1)
add_logs(M, user, "flashed", object="[src.name]")
if(M.weakeyes)
M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash
var/safety = M:eyecheck()
if(safety <= 0)
M.confused += power
flick("e_flash", M.flash)
if(user && convert)
if(user && targeted)
if(M.weakeyes)
M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash
if(M.flash_eyes(1, 1))
M.confused += power
terrible_conversion_proc(M, user)
M.Stun(1)
user.visible_message("<span class='disarm'>[user] blinds [M] with the [src.name]!</span>")
visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
user << "<span class='danger'>You blind [M] with the flash!</span>"
M << "<span class='userdanger'>[user] blinds you with the flash!</span>"
if(M.weakeyes)
M.Stun(2)
M.visible_message("<span class='disarm'><b>[M]</b> gasps and shields their eyes!</span>")
return 1
M.visible_message("<span class='disarm'>[M] gasps and shields their eyes!</span>", "<span class='userdanger'>You gasp and shields your eyes!</span>")
else
visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
user << "<span class='warning'>You fail to blind [M] with the flash!</span>"
M << "<span class='danger'>[user] fails to blind you with the flash!</span>"
else
if(user)
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the [src.name]!</span>")
return 0
if(M.flash_eyes())
M.confused += power
/obj/item/device/flash/attack(mob/living/M, mob/user)
if(!try_use_flash(user))
@@ -111,16 +113,16 @@
else if(issilicon(M))
if(isrobot(M))
var/mob/living/silicon/robot/R = M
if (R.module) // Perhaps they didn't choose a module yet
if(R.module) // Perhaps they didn't choose a module yet
for(var/obj/item/borg/combat/shield/S in R.module.modules)
if(R.activated(S))
add_logs(M, user, "flashed", object="[src.name]")
user.visible_message("<span class='disarm'>[user] tries to overloads [M]'s sensors with the [src.name], but if blocked by [M]'s shield!</span>", "<span class='danger'>You try to overload [M]'s sensors with the [src.name], but are blocked by his shield!</span>")
return 1
M.Weaken(rand(5,10))
add_logs(M, user, "flashed", object="[src.name]")
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with the [src.name]!</span>", "<span class='danger'>You overload [M]'s sensors with the [src.name]!</span>")
if(M.flash_eyes(affect_silicon = 1))
M.Weaken(rand(5,10))
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with the [src.name]!</span>", "<span class='danger'>You overload [M]'s sensors with the [src.name]!</span>")
return 1
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the [src.name]!</span>", "<span class='warning'>You fail to blind [M] with the [src.name]!</span>")
+12 -15
View File
@@ -55,28 +55,25 @@
return
if(M == user) //they're using it on themselves
if(!M.blinded)
flick("flash", M.flash)
if(M.flash_eyes(visual = 1))
M.visible_message("<span class='notice'>[M] directs [src] to \his eyes.</span>", \
"<span class='notice'>You wave the light in front of your eyes! Trippy!</span>")
else
M.visible_message("<span class='notice'>[M] directs [src] to \his eyes.</span>", \
"<span class='notice'>You wave the light in front of your eyes.</span>")
return
else
user.visible_message("<span class='notice'>[user] directs [src] to [M]'s eyes.</span>", \
"<span class='notice'>You direct [src] to [M]'s eyes.</span>")
user.visible_message("<span class='notice'>[user] directs [src] to [M]'s eyes.</span>", \
"<span class='notice'>You direct [src] to [M]'s eyes.</span>")
if(istype(M, /mob/living/carbon/human)) //robots and aliens are unaffected
if(M.stat == DEAD || M.sdisabilities & BLIND) //mob is dead or fully blind
user << "<span class='notice'>[M] pupils does not react to the light!</span>"
else if(XRAY in M.mutations) //mob has X-RAY vision
flick("flash", M.flash) //Yes, you can still get flashed wit X-Ray.
user << "<span class='notice'>[M] pupils give an eerie glow!</span>"
else //they're okay!
if(!M.blinded)
flick("flash", M.flash) //flash the affected mob
user << "<span class='notice'>[M]'s pupils narrow.</span>"
if(istype(M, /mob/living/carbon/human)) //robots and aliens are unaffected
if(M.stat == DEAD || M.sdisabilities & BLIND) //mob is dead or fully blind
user << "<span class='notice'>[M] pupils does not react to the light!</span>"
else if(XRAY in M.mutations) //mob has X-RAY vision
user << "<span class='notice'>[M] pupils give an eerie glow!</span>"
else //they're okay!
if(M.flash_eyes(visual = 1))
user << "<span class='notice'>[M]'s pupils narrow.</span>"
else
return ..()
+11 -47
View File
@@ -90,66 +90,30 @@
//human/alien mobs
if(iscarbon(target))
var/mob/living/carbon/C = target
if(user.zone_sel.selecting == "eyes")
var/mob/living/carbon/C = target
add_logs(C, user, "shone in the eyes", object="laser pointer")
var/severity = 1
if(prob(33))
severity = 2
else if(prob(50))
severity = 0
//20% chance to actually hit the eyes
if(prob(effectchance * diode.rating))
add_logs(C, user, "shone in the eyes", object="laser pointer")
//eye target check
if(prob(effectchance * diode.rating) && C.flash_eyes(severity))
outmsg = "<span class='notice'>You blind [C] by shining [src] in their eyes.</span>"
if(C.weakeyes)
C.Stun(1)
var/eye_prot = C.eyecheck()
if(C.blinded || eye_prot >= 2)
eye_prot = 4
var/severity = 3 - eye_prot
if(prob(33))
severity += 1
else if(prob(50))
severity -= 1
severity = min(max(severity, 0), 4)
var/mob/living/carbon/human/H = C
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
switch(severity)
if(0)
//no effect
C << "<span class='info'>A small, bright dot appears in your vision.</span>"
if(1)
//industrial grade eye protection
E.damage += rand(0, 2)
C << "<span class='notice'>Something bright flashes in the corner of your vision!</span>"
if(2)
//basic eye protection (sunglasses)
flick("flash", C.flash)
E.damage += rand(1, 6)
C << "<span class='danger'>Your eyes were blinded!</span>"
if(3)
//no eye protection
if(prob(2))
C.Weaken(1)
flick("e_flash", C.flash)
E.damage += rand(3, 7)
C << "<span class='danger'>Your eyes were blinded!</span>"
if(4)
//the effect has been worsened by something
if(prob(5))
C.Weaken(1)
flick("e_flash", C.flash)
E.damage += rand(5, 10)
C << "<span class='danger'>Your eyes were blinded!</span>"
else
outmsg = "<span class='notice'>You fail to blind [C] by shining [src] at their eyes.</span>"
outmsg = "<span class='warning'>You fail to blind [C] by shining [src] at their eyes!</span>"
//robots and AI
else if(issilicon(target))
var/mob/living/silicon/S = target
//20% chance to actually hit the sensors
if(prob(effectchance * diode.rating))
S.flash_eyes(affect_silicon = 1)
S.Weaken(rand(5,10))
S << "<span class='warning'>Your sensors were overloaded by a laser!</span>"
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"
+5 -2
View File
@@ -15,6 +15,9 @@
attack_verb = list("hit", "bludgeoned", "whacked")
hitsound = 'sound/weapons/grenadelaunch.ogg'
/obj/item/stack/rods/cyborg
materials = list()
/obj/item/stack/rods/New(var/loc, var/amount=null)
..()
@@ -41,11 +44,11 @@
if(new_item.get_amount() <= 0)
// stack was moved into another one on the pile
new_item = locate() in user.loc
user.visible_message("<span class='warning'>[user.name] shaped [src] into metal with the weldingtool.</span>", \
"<span class='notice'>You shaped [src] into metal with the weldingtool.</span>", \
"<span class='warning'>You hear welding.</span>")
var/replace = user.get_inactive_hand() == src
use(2)
if (get_amount() <= 0 && replace)
@@ -24,12 +24,7 @@
var/full_window = /obj/structure/window/full/basic
/obj/item/stack/sheet/glass/cyborg
name = "glass"
desc = "HOLY SHEET! That is a lot of glass."
singular_name = "glass sheet"
icon_state = "sheet-glass"
materials = list()
created_window = /obj/structure/window/basic
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
construct_window(user)
@@ -159,10 +154,6 @@
var/full_window = /obj/structure/window/full/reinforced
/obj/item/stack/sheet/rglass/cyborg
name = "reinforced glass"
desc = "Glass which seems to have rods or something stuck in them."
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
materials = list()
/obj/item/stack/sheet/rglass/attack_self(mob/user as mob)
@@ -97,13 +97,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
origin_tech = "materials=1"
/obj/item/stack/sheet/metal/cyborg
name = "metal"
desc = "Sheets made out of metal."
singular_name = "metal sheet"
icon_state = "sheet-metal"
materials = list()
throwforce = 10.0
flags = CONDUCT
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
recipes = metal_recipes
@@ -162,12 +156,6 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
icon_state = "sheet-wood"
origin_tech = "materials=1;biotech=1"
/obj/item/stack/sheet/wood/cyborg
name = "wooden plank"
desc = "One can only guess that this is a bunch of wood."
singular_name = "wood plank"
icon_state = "sheet-wood"
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
recipes = wood_recipes
return ..()
@@ -124,4 +124,4 @@
origin_tech = "materials=1"
turf_type = /turf/simulated/floor/silent
mineralType = "tranquillite"
materials = list(MAT_TRANQUILLITE=500)
materials = list(MAT_TRANQUILLITE=500)
@@ -16,9 +16,8 @@ var/turf/T
// Make a quick flash
var/turf/T = get_turf(src)
playsound(T, 'sound/items/bikehorn.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(T, null))
if(M:eyecheck() <= 0)
flick("e_flash", M.flash) // flash dose faggots
for(var/mob/living/carbon/C in viewers(T, null))
C.flash_eyes()
for(var/i=1, i<=deliveryamt, i++)
var/atom/movable/x = new spawner_type
x.loc = T
@@ -78,7 +78,6 @@
/////////////////////////////////
/obj/item/weapon/grenade/flashbang/cluster
icon_state = "flashbang_active"
banglet = 1
/obj/item/weapon/grenade/clusterbuster/emp
name = "Electromagnetic Storm"
@@ -3,7 +3,6 @@
icon_state = "flashbang"
item_state = "flashbang"
origin_tech = "materials=2;combat=1"
var/banglet = 0
/obj/item/weapon/grenade/flashbang/prime()
update_mob()
@@ -24,42 +23,26 @@
playsound(loc, 'sound/effects/bang.ogg', 25, 1)
//Checking for protections
var/eye_safety = 0
var/ear_safety = 0
var/ear_safety = M.check_ear_prot()
var/distance = max(1,get_dist(src,T))
if(iscarbon(M))
var/mob/living/carbon/C = M
eye_safety = C.eyecheck()
if(ishuman(C))
var/mob/living/carbon/human/H = C
if((H.r_ear && (H.r_ear.flags & EARBANGPROTECT)) || (H.l_ear && (H.l_ear.flags & EARBANGPROTECT)) || (H.head && (H.head.flags & HEADBANGPROTECT)))
ear_safety++
//Flash
var/eye_damage = rand(1,3)
if(M.weakeyes)
M.visible_message("<span class='disarm'><b>[M]</b> screams and collapses!</span>")
M << "<span class='userdanger'>AAAAGH! IT BURNS!</span>"
M << "<span class='userdanger'><font size=3>AAAAGH!</font></span>"
M.Weaken(15) //hella stunned
M.Stun(15)
eye_damage += 8
if(ishuman(M))
M.emote("scream")
var/mob/living/carbon/human/H = M
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
if(E)
E.damage += 8
if(!eye_safety && ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
flick("e_flash", M.flash)
if (E)
E.damage += eye_damage
if(M.flash_eyes(affect_silicon = 1))
M.Stun(max(10/distance, 3))
M.Weaken(max(10/distance, 3))
if (istype(E) && E.damage >= E.min_bruised_damage)
if(!(E.status & ORGAN_ROBOT))
M << "<span class='warning'>Your eyes start to burn badly!</span>"
else
M << "<span class='warning'>The flash blinds you!</span>"
if(!banglet)
if (E.damage >= E.min_broken_damage)
M << "<span class='warning'>You can't see anything!</span>"
//Bang
if((loc == M) || loc == M.loc)//Holding on person or being exactly where lies is significantly more dangerous and voids protection
@@ -72,10 +55,9 @@
M.ear_deaf = max(M.ear_deaf,15)
if (M.ear_damage >= 15)
M << "<span class='warning'>Your ears start to ring badly!</span>"
if(!banglet)
if(prob(M.ear_damage - 10 + 5))
M << "<span class='warning'>You can't hear anything!</span>"
M.disabilities |= DEAF
if(prob(M.ear_damage - 10 + 5))
M << "<span class='warning'>You can't hear anything!</span>"
M.disabilities |= DEAF
else
if (M.ear_damage >= 5)
M << "<span class='warning'>Your ears start to ring!</span>"
@@ -5,7 +5,6 @@
icon_state = "delivery"
item_state = "flashbang"
origin_tech = "materials=3;magnets=4"
var/banglet = 0
var/spawner_type = null // must be an object path
var/deliveryamt = 1 // amount of type to deliver
spawner_type = /mob/living/simple_animal/hostile/viscerator
@@ -16,9 +15,8 @@
// Make a quick flash
var/turf/T = get_turf(src)
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(T, null))
if(M:eyecheck() <= 0)
flick("e_flash", M.flash) // flash dose faggots
for(var/mob/living/carbon/C in viewers(T, null))
C.flash_eyes()
for(var/i=1, i<=deliveryamt, i++)
var/atom/movable/x = new spawner_type
@@ -215,9 +215,14 @@
use_to_pickup = 1
storage_slots = 14
display_contents_with_number = 1
var/base_name = ""
var/label_text = ""
/obj/item/weapon/storage/pill_bottle/New()
..()
base_name = name
/obj/item/weapon/storage/pill_bottle/MouseDrop(obj/over_object as obj) //Quick pillbottle fix. -Agouri
if (ishuman(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
var/mob/M = usr
if (!( istype(over_object, /obj/screen) ))
@@ -239,6 +244,24 @@
return
return
/obj/item/weapon/storage/pill_bottle/attackby(var/obj/item/I, mob/user as mob, params)
if(istype(I, /obj/item/weapon/pen) || istype(I, /obj/item/device/flashlight/pen))
var/tmp_label = sanitize(input(user, "Enter a label for [name]","Label",label_text))
if(length(tmp_label) > MAX_NAME_LEN)
user << "<span class='warning'>The label can be at most [MAX_NAME_LEN] characters long.</span>"
else
user << "<span class='notice'>You set the label to \"[tmp_label]\".</span>"
label_text = tmp_label
update_name_label()
else
..()
/obj/item/weapon/storage/pill_bottle/proc/update_name_label()
if(label_text == "")
name = base_name
else
name = "[base_name] ([label_text])"
/obj/item/weapon/storage/pill_bottle/charcoal
name = "Pill bottle (Charcoal)"
desc = "Contains pills used to counter toxins."
+3 -43
View File
@@ -291,15 +291,15 @@
/obj/item/weapon/weldingtool/proc/get_fuel()
return reagents.get_reagent_amount("fuel")
//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use()
/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null)
//Removes fuel from the welding tool. If a mob is passed, it will try to flash the mob's eyes. This should probably be renamed to use()
/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/living/M = null)
if(!welding || !check_fuel())
return 0
if(get_fuel() >= amount)
reagents.remove_reagent("fuel", amount)
check_fuel()
if(M)
eyecheck(M)
M.flash_eyes(light_intensity)
return 1
else
if(M)
@@ -351,46 +351,6 @@
hitsound = "swing_hit"
update_icon()
//Decides whether or not to damage a player's eyes based on what they're wearing as protection
//Note: This should probably be moved to mob
/obj/item/weapon/weldingtool/proc/eyecheck(mob/user as mob)
if(!iscarbon(user)) return 1
var/safety = user:eyecheck()
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
if(!istype(E)) // No eyes? No problem!
return
switch(safety)
if(1)
usr << "<span class='danger'>Your eyes sting a little.</span>"
E.damage += rand(1, 2)
if(E.damage > 12)
user.eye_blurry += rand(3,6)
if(0)
usr << "<span class='danger'>Your eyes burn.</span>"
E.damage += rand(2, 4)
if(E.damage > 10)
E.damage += rand(4,10)
if(-1)
usr << "<span class='danger'>Your thermals intensify the welder's glow. Your eyes itch and burn severely.</span>"
user.eye_blurry += rand(12,20)
E.damage += rand(12, 16)
if(safety<2)
if(E.damage > 10)
user << "<span class='danger'>Your eyes are really starting to hurt. This can't be good for you!</span>"
if (E.damage >= E.min_broken_damage)
user << "<span class='danger'>You go blind!</span>"
user.sdisabilities |= BLIND
else if (E.damage >= E.min_bruised_damage)
user << "<span class='danger'>You go blind!</span>"
user.eye_blind = 5
user.eye_blurry = 5
user.disabilities |= NEARSIGHTED
spawn(100)
user.disabilities &= ~NEARSIGHTED
return
/obj/item/weapon/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
if(welding)
user << "<span class='warning'>Turn it off first!</span>"
+4 -4
View File
@@ -80,10 +80,10 @@
for(var/line in lines)
//world << line
for(var/beat in text2list(lowertext(line), ","))
for(var/beat in splittext(lowertext(line), ","))
//world << "beat: [beat]"
var/list/notes = text2list(beat, "/")
for(var/note in text2list(notes[1], "-"))
var/list/notes = splittext(beat, "/")
for(var/note in splittext(notes[1], "-"))
//world << "note: [note]"
if(!playing || shouldStopPlaying(user))//If the instrument is playing, or special case
playing = 0
@@ -165,7 +165,7 @@
//split into lines
spawn()
lines = text2list(t, "\n")
lines = splittext(t, "\n")
if(copytext(lines[1],1,6) == "BPM: ")
tempo = sanitize_tempo(600 / text2num(copytext(lines[1],6)))
lines.Cut(1,2)
@@ -244,7 +244,7 @@ obj/structure/transit_tube/ex_act(severity)
if(text in direction_table)
return direction_table[text]
var/list/split_text = text2list(text, "-")
var/list/split_text = splittext(text, "-")
// If the first token is D, the icon_state represents
// a purely decorative tube, and doesn't actually
+2 -2
View File
@@ -58,9 +58,9 @@ var/global/nologevent = 0
body += "<b>Mob type:</b> [M.type]<br>"
if(M.client)
if(M.client.related_accounts_cid.len)
body += "<b>Related accounts by CID:</b> [list2text(M.client.related_accounts_cid, " - ")]<br>"
body += "<b>Related accounts by CID:</b> [jointext(M.client.related_accounts_cid, " - ")]<br>"
if(M.client.related_accounts_ip.len)
body += "<b>Related accounts by IP:</b> [list2text(M.client.related_accounts_ip, " - ")]<br><br>"
body += "<b>Related accounts by IP:</b> [jointext(M.client.related_accounts_ip, " - ")]<br><br>"
body += "<A href='?_src_=holder;boot2=\ref[M]'>Kick</A> | "
body += "<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> | "
+2 -2
View File
@@ -14,7 +14,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if(!length(line)) continue
if(copytext(line,1,2) == "#") continue
var/list/List = text2list(line,"+")
var/list/List = splittext(line,"+")
if(!List.len) continue
var/rank = ckeyEx(List[1])
@@ -78,7 +78,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if(copytext(line,1,2) == "#") continue
//Split the line at every "-"
var/list/List = text2list(line, "-")
var/list/List = splittext(line, "-")
if(!List.len) continue
//ckey is before the first "-"
+1 -1
View File
@@ -677,7 +677,7 @@ var/list/admin_verbs_proccall = list (
//load text from file
var/list/Lines = file2list("config/admins.txt")
for(var/line in Lines)
var/list/splitline = text2list(line, " - ")
var/list/splitline = splittext(line, " - ")
if(n_lower(splitline[1]) == ckey)
if(splitline.len >= 2)
rank = ckeyEx(splitline[2])
+1 -1
View File
@@ -2,7 +2,7 @@
/datum/admins/proc/create_mob(var/mob/user)
if (!create_mob_html)
var/mobjs = null
mobjs = list2text(typesof(/mob), ";")
mobjs = jointext(typesof(/mob), ";")
create_mob_html = file2text('html/create_object.html')
create_mob_html = replacetext(create_mob_html, "null /* object types */", "\"[mobjs]\"")
+2 -2
View File
@@ -4,7 +4,7 @@ var/list/create_object_forms = list(/obj, /obj/structure, /obj/machinery, /obj/e
/datum/admins/proc/create_object(var/mob/user)
if (!create_object_html)
var/objectjs = null
objectjs = list2text(typesof(/obj), ";")
objectjs = jointext(typesof(/obj), ";")
create_object_html = file2text('html/create_object.html')
create_object_html = replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
@@ -15,7 +15,7 @@ var/list/create_object_forms = list(/obj, /obj/structure, /obj/machinery, /obj/e
var/html_form = create_object_forms[path]
if (!html_form)
var/objectjs = list2text(typesof(path), ";")
var/objectjs = jointext(typesof(path), ";")
html_form = file2text('html/create_object.html')
html_form = replacetext(html_form, "null /* object types */", "\"[objectjs]\"")
create_object_forms[path] = html_form
+1 -1
View File
@@ -2,7 +2,7 @@
/datum/admins/proc/create_turf(var/mob/user)
if (!create_turf_html)
var/turfjs = null
turfjs = list2text(typesof(/turf), ";")
turfjs = jointext(typesof(/turf), ";")
create_turf_html = file2text('html/create_object.html')
create_turf_html = replacetext(create_turf_html, "null /* object types */", "\"[turfjs]\"")
-66
View File
@@ -177,73 +177,7 @@
output += "<center><a href='?_src_=holder;addnoteempty=1'>\[Add Note\]</a></center>"
output += ruler
usr << browse(output, "window=show_notes;size=900x500")
/proc/regex_note_sql_extract(str, exp)
return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regEx_find")(str, exp))
// If the AUTOCONVERT_NOTES is turned on, any time a player connects this will be run to try and add all their notes to the database
/proc/convert_notes_sql(ckey)
if(!ckey)
return 0
var/playerfile = "data/player_saves/[copytext(ckey, 1, 2)]/[ckey]/info.sav"
var/savefile/info = new(playerfile)
var/list/infos
info >> infos
if(!infos || !infos.len)
fdel(playerfile)
return 0
ckey = ckey
for(var/datum/player_info/I in infos)
var/notetext = I.content
var/adminckey = I.author
var/server
if (config && config.server_name)
server = config.server_name
var/timestamp = I.timestamp
var/regex = "\[A-Za-z\]+\\, (\[A-Za-z\]+) (\[0-9\]+)\[A-Za-z\]+ of (\[0-9\]+)"
var/datum/regex/results = regex_note_sql_extract(timestamp, regex)
var/month = month2number(results.str(2))
var/day = results.str(3)
var/year = results.str(4)
timestamp = "[year]-[month]-[day] 00:00:00"
add_note(ckey, notetext, timestamp, adminckey, 0, server, 0)
fdel(playerfile)
return 1
// Using this proc causes lag - you have been warned.
/proc/mass_convert_notes()
if(!check_rights(R_SERVER))
return 0
world << "Beginning mass note conversion."
var/player_notes_file = "data/player_notes.sav"
var/savefile/notesfile = new(player_notes_file)
var/list/note_keys
notesfile >> note_keys
if(!notesfile)
log_game("Error: Cannot access player_notes.sav file.")
return 0
if(!note_keys || !note_keys.len)
log_game("Error: player_notes.sav file is empty. Deleting it.")
fdel(player_notes_file)
return 0
note_keys = sortList(note_keys)
var/i = 1
for(i, i <= note_keys.len, i++)
var/ckey = note_keys[i]
convert_notes_sql(ckey)
world << "Finished mass note conversion ([i] notes converted). Remember to turn off AUTOCONVERT_NOTES."
world << "Deleting the player_notes.sav file."
fdel(player_notes_file)
return 1
/proc/show_player_info_irc(var/key as text)
var/target_sql_ckey = sanitizeSQL(key)
var/DBQuery/query_get_notes = dbcon.NewQuery("SELECT timestamp, notetext, adminckey, server FROM [format_table_name("notes")] WHERE ckey = '[target_sql_ckey]' ORDER BY timestamp")
+11 -12
View File
@@ -126,7 +126,7 @@
log_admin("[key_name(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]</span>")
spawn(10)
stickyban_show()
@@ -147,7 +147,7 @@
/datum/admins/proc/stickyban_show()
if(!check_rights(R_BAN))
return
var/list/bans = sortList(world.GetConfig("ban"))
var/banhtml = ""
for(var/key in bans)
@@ -181,23 +181,23 @@
if (!ban)
return null
. = params2list(ban)
.["keys"] = text2list(.["keys"], ",")
.["type"] = text2list(.["type"], ",")
.["IP"] = text2list(.["IP"], ",")
.["computer_id"] = text2list(.["computer_id"], ",")
.["keys"] = splittext(.["keys"], ",")
.["type"] = splittext(.["type"], ",")
.["IP"] = splittext(.["IP"], ",")
.["computer_id"] = splittext(.["computer_id"], ",")
/proc/list2stickyban(var/list/ban)
if (!ban || !islist(ban))
return null
. = ban.Copy()
if (.["keys"])
.["keys"] = list2text(.["keys"], ",")
.["keys"] = jointext(.["keys"], ",")
if (.["type"])
.["type"] = list2text(.["type"], ",")
.["type"] = jointext(.["type"], ",")
if (.["IP"])
.["IP"] = list2text(.["IP"], ",")
.["IP"] = jointext(.["IP"], ",")
if (.["computer_id"])
.["computer_id"] = list2text(.["computer_id"], ",")
.["computer_id"] = jointext(.["computer_id"], ",")
. = list2params(.)
/client/proc/stickybanpanel()
@@ -206,6 +206,5 @@
if(!check_rights(R_BAN))
return
holder.stickyban_show()
+2 -2
View File
@@ -1019,7 +1019,7 @@
message_admins("\blue [key_name_admin(usr)] removed [t]", 1)
jobban_remove(t)
href_list["ban"] = 1 // lets it fall through and refresh
var/t_split = text2list(t, " - ")
var/t_split = splittext(t, " - ")
var/key = t_split[1]
var/job = t_split[2]
DB_ban_unban(ckey(key), BANTYPE_JOB_PERMA, job)
@@ -2076,7 +2076,7 @@
alert("Select fewer object types, (max 5)")
return
var/list/offset = text2list(href_list["offset"],",")
var/list/offset = splittext(href_list["offset"],",")
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
var/X = offset.len > 0 ? text2num(offset[1]) : 0
var/Y = offset.len > 1 ? text2num(offset[2]) : 0
+2 -2
View File
@@ -32,7 +32,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
var/original_msg = msg
//explode the input msg into a list
var/list/msglist = text2list(msg, " ")
var/list/msglist = splittext(msg, " ")
//generate keywords lookup
var/list/surnames = list()
@@ -43,7 +43,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
if(M.mind) indexing += M.mind.name
for(var/string in indexing)
var/list/L = text2list(string, " ")
var/list/L = splittext(string, " ")
var/surname_found = 0
//surnames
for(var/i=L.len, i>=1, i--)
+2 -2
View File
@@ -11,10 +11,10 @@
dat += "<p>[C.ckey] (Player Age: <font color = 'red'>[C.player_age]</font>) - <b>[C.computer_id]</b> / <b>[C.address]</b><br>"
if(C.related_accounts_cid.len)
dat += "--Accounts associated with CID: "
dat += "<b>[list2text(C.related_accounts_cid, " - ")]</b><br>"
dat += "<b>[jointext(C.related_accounts_cid, " - ")]</b><br>"
if(C.related_accounts_ip.len)
dat += "--Accounts associated with IP: "
dat += "<b>[list2text(C.related_accounts_ip, " - ")]</b> "
dat += "<b>[jointext(C.related_accounts_ip, " - ")]</b> "
usr << browse(dat, "window=alt_panel;size=640x480")
return
+8 -8
View File
@@ -1166,21 +1166,21 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Silicons","Clients","Respawnable Mobs"))
if("Players")
usr << list2text(player_list,",")
usr << jointext(player_list,",")
if("Admins")
usr << list2text(admins,",")
usr << jointext(admins,",")
if("Mobs")
usr << list2text(mob_list,",")
usr << jointext(mob_list,",")
if("Living Mobs")
usr << list2text(living_mob_list,",")
usr << jointext(living_mob_list,",")
if("Dead Mobs")
usr << list2text(dead_mob_list,",")
usr << jointext(dead_mob_list,",")
if("Silicons")
usr << list2text(silicon_mob_list,",")
usr << jointext(silicon_mob_list,",")
if("Clients")
usr << list2text(clients,",")
usr << jointext(clients,",")
if("Respawnable Mobs")
usr << list2text(respawnable_list,",")
usr << jointext(respawnable_list,",")
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
@@ -143,7 +143,7 @@ var/global/dmm_suite/preloader/_preloader = null
var/variables_start = findtext(full_def,"{")
if(variables_start)//if there's any variable
full_def = copytext(full_def,variables_start+1,length(full_def))//removing the last '}'
fields = text2list(full_def,";")
fields = dmm_splittext(full_def,";")
//then fill the members_attributes list with the corresponding variables
members_attributes.len++
@@ -245,7 +245,7 @@ var/global/dmm_suite/preloader/_preloader = null
//build a list from variables in text form (e.g {var1="derp"; var2; var3=7} => list(var1="derp", var2, var3=7))
//return the filled list
/dmm_suite/proc/text2list(var/text as text,var/delimiter=",")
/dmm_suite/proc/dmm_splittext(var/text as text,var/delimiter=",")
var/list/to_return = list()
@@ -279,7 +279,7 @@ var/global/dmm_suite/preloader/_preloader = null
//Check for list
else if(copytext(trim_right,1,5) == "list")
trim_right = text2list(copytext(trim_right,6,length(trim_right)))
trim_right = dmm_splittext(copytext(trim_right,6,length(trim_right)))
//Check for file
else if(copytext(trim_right,1,2) == "'")
+1 -4
View File
@@ -304,9 +304,6 @@
src << message
clientmessages.Remove(ckey)
if (config && config.autoconvert_notes)
convert_notes_sql(ckey)
send_resources()
@@ -368,7 +365,7 @@
//Log all the alts
if(related_accounts_cid.len)
log_access("Alts: [key_name(src)]:[list2text(related_accounts_cid, " - ")]")
log_access("Alts: [key_name(src)]:[jointext(related_accounts_cid, " - ")]")
var/watchreason = check_watchlist(sql_ckey)
if(watchreason)
-6
View File
@@ -309,9 +309,6 @@
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/welding/proc/getMask()
return global_hud.darkMask
/obj/item/clothing/glasses/welding/attack_self()
toggle()
@@ -354,9 +351,6 @@
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/welding/superior/getMask()
return null
/obj/item/clothing/glasses/sunglasses/blindfold
name = "blindfold"
desc = "Covers the eyes, preventing sight."
+1 -1
View File
@@ -305,7 +305,7 @@ What a mess.*/
return
Perp = new/list()
t1 = lowertext(t1)
var/list/components = text2list(t1, " ")
var/list/components = splittext(t1, " ")
if(components.len > 5)
return //Lets not let them search too greedily.
for(var/datum/data/record/R in data_core.general)
+4 -4
View File
@@ -12,7 +12,7 @@
var/jobmask = query.item[3]
var/ok = 0
if(jobmask != "*")
var/list/allowed_jobs = text2list(jobmask,",")
var/list/allowed_jobs = splittext(jobmask,",")
for(var/i = 1, i <= allowed_jobs.len, i++)
if(istext(allowed_jobs[i]))
allowed_jobs[i] = trim(allowed_jobs[i])
@@ -66,13 +66,13 @@
// This is hacky, but since it's difficult as fuck to make a proper parser in BYOND without killing the server, here it is. - N3X
/proc/HackProperties(var/mob/living/carbon/human/M,var/obj/item/I,var/script)
var/list/statements = text2list(script,";")
var/list/statements = splittext(script,";")
if(statements.len == 0)
return
for(var/statement in statements)
var/list/assignmentChunks = text2list(statement,"=")
var/list/assignmentChunks = splittext(statement,"=")
var/varname = assignmentChunks[1]
var/list/typeChunks=text2list(script,":")
var/list/typeChunks=splittext(script,":")
var/desiredType=typeChunks[1]
switch(desiredType)
if("string")

Some files were not shown because too many files have changed in this diff Show More