/tg/ 4/14 (#367)
* outside code stuff * defines, helpers, etc * everything not module * modules * compiled fixes + missing sounds
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#define GLOBAL_PROTECT(X)
|
||||
#endif
|
||||
|
||||
#define GLOBAL_REAL_VAR(X) var/global/##X
|
||||
#define GLOBAL_REAL(X, Typepath) var/global##Typepath/##X
|
||||
|
||||
#define GLOBAL_RAW(X) /datum/controller/global_vars/var/global##X
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
#define BODYPART_ORGANIC 1
|
||||
#define BODYPART_ROBOTIC 2
|
||||
|
||||
#define DEFAULT_BODYPART_ICON_ORGANIC 'icons/mob/human_parts_greyscale.dmi'
|
||||
#define DEFAULT_BODYPART_ICON_ROBOTIC 'icons/mob/augments.dmi'
|
||||
|
||||
#define MONKEY_BODYPART "monkey"
|
||||
#define ALIEN_BODYPART "alien"
|
||||
#define LARVA_BODYPART "larva"
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
#define CHANNEL_LOBBYMUSIC 1024
|
||||
#define CHANNEL_ADMIN 1023
|
||||
#define CHANNEL_VOX 1022
|
||||
#define CHANNEL_JUKEBOX 1021
|
||||
|
||||
//THIS SHOULD ALWAYS BE THE LOWEST ONE!
|
||||
//KEEP IT UPDATED
|
||||
#define CHANNEL_HIGHEST_AVAILABLE 1021
|
||||
|
||||
#define CHANNEL_HIGHEST_AVAILABLE 1020
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
return copytext(sqltext, 2, lentext(sqltext));//Quote() adds quotes around input, we already do that
|
||||
|
||||
/proc/format_table_name(table as text)
|
||||
return GLOB.sqlfdbktableprefix + table
|
||||
return global.sqlfdbktableprefix + table
|
||||
|
||||
/*
|
||||
* Text sanitization
|
||||
|
||||
@@ -1279,6 +1279,9 @@ proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
|
||||
|
||||
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE)
|
||||
#define QDEL_NULL(item) qdel(item); item = null
|
||||
#define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); }
|
||||
#define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } L.Cut(); }
|
||||
#define QDEL_LIST_ASSOC_VAL(L) if(L) { for(var/I in L) qel(L[I]); L.Cut(); }
|
||||
|
||||
/proc/random_nukecode()
|
||||
var/val = rand(0, 99999)
|
||||
|
||||
@@ -23,20 +23,6 @@ GLOBAL_VAR_INIT(tinted_weldhelh, TRUE)
|
||||
GLOBAL_VAR_INIT(Debug, FALSE) // global debug switch
|
||||
GLOBAL_VAR_INIT(Debug2, FALSE)
|
||||
|
||||
//Server API key
|
||||
GLOBAL_VAR_INIT(comms_key, "default_pwd")
|
||||
GLOBAL_PROTECT(comms_key)
|
||||
GLOBAL_VAR_INIT(comms_allowed, FALSE) //By default, the server does not allow messages to be sent to it, unless the key is strong enough (this is to prevent misconfigured servers from becoming vulnerable)
|
||||
GLOBAL_PROTECT(comms_allowed)
|
||||
|
||||
GLOBAL_VAR(medal_hub)
|
||||
GLOBAL_PROTECT(medal_hub)
|
||||
GLOBAL_VAR_INIT(medal_pass, " ")
|
||||
GLOBAL_PROTECT(medal_pass)
|
||||
GLOBAL_VAR_INIT(medals_enabled, TRUE) //will be auto set to false if the game fails contacting the medal hub to prevent unneeded calls.
|
||||
GLOBAL_PROTECT(medals_enabled)
|
||||
|
||||
|
||||
//This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage
|
||||
GLOBAL_VAR_INIT(MAX_EX_DEVESTATION_RANGE, 3)
|
||||
GLOBAL_VAR_INIT(MAX_EX_HEAVY_RANGE, 7)
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
// MySQL configuration
|
||||
|
||||
GLOBAL_VAR_INIT(sqladdress, "localhost")
|
||||
GLOBAL_PROTECT(sqladdress)
|
||||
GLOBAL_VAR_INIT(sqlport, "3306")
|
||||
GLOBAL_PROTECT(sqlport)
|
||||
GLOBAL_VAR_INIT(sqlfdbkdb, "test")
|
||||
GLOBAL_PROTECT(sqlfdbkdb)
|
||||
GLOBAL_VAR_INIT(sqlfdbklogin, "root")
|
||||
GLOBAL_PROTECT(sqlfdbklogin)
|
||||
GLOBAL_VAR_INIT(sqlfdbkpass, "")
|
||||
GLOBAL_PROTECT(sqlfdbkpass)
|
||||
GLOBAL_VAR_INIT(sqlfdbktableprefix, "erro_") //backwords compatibility with downstream server hosts
|
||||
GLOBAL_PROTECT(sqlfdbktableprefix)
|
||||
|
||||
//Database connections
|
||||
//A connection is established on world creation. Ideally, the connection dies when the server restarts (After feedback logging.).
|
||||
GLOBAL_DATUM_INIT(dbcon, /DBConnection, new) //Feedback database (New database)
|
||||
GLOBAL_PROTECT(dbcon)
|
||||
@@ -6,4 +6,16 @@ GLOBAL_VAR_INIT(timezoneOffset, 0) // The difference betwen midnight (of the hos
|
||||
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
|
||||
GLOBAL_VAR_INIT(fileaccess_timer, 0)
|
||||
|
||||
GLOBAL_VAR_INIT(TAB, " ")
|
||||
GLOBAL_VAR_INIT(TAB, " ")
|
||||
|
||||
GLOBAL_DATUM(data_core, /datum/datacore)
|
||||
|
||||
GLOBAL_VAR_INIT(CELLRATE, 0.002) // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
|
||||
GLOBAL_VAR_INIT(CHARGELEVEL, 0.001) // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
|
||||
|
||||
GLOBAL_LIST_EMPTY(powernets)
|
||||
|
||||
//Database connections
|
||||
//A connection is established on world creation. Ideally, the connection dies when the server restarts (After feedback logging.).
|
||||
GLOBAL_DATUM_INIT(dbcon, /DBConnection, new) //Feedback database (New database)
|
||||
GLOBAL_PROTECT(dbcon)
|
||||
@@ -0,0 +1,16 @@
|
||||
//Server API key
|
||||
GLOBAL_REAL_VAR(comms_key) = "default_pwd"
|
||||
GLOBAL_REAL_VAR(comms_allowed) = FALSE //By default, the server does not allow messages to be sent to it, unless the key is strong enough (this is to prevent misconfigured servers from becoming vulnerable)
|
||||
|
||||
GLOBAL_REAL_VAR(medal_hub)
|
||||
GLOBAL_REAL_VAR(medal_pass) = " "
|
||||
GLOBAL_REAL_VAR(medals_enabled) = TRUE //will be auto set to false if the game fails contacting the medal hub to prevent unneeded calls.
|
||||
|
||||
// MySQL configuration
|
||||
|
||||
GLOBAL_REAL_VAR(sqladdress) = "localhost"
|
||||
GLOBAL_REAL_VAR(sqlport) = "3306"
|
||||
GLOBAL_REAL_VAR(sqlfdbkdb) = "test"
|
||||
GLOBAL_REAL_VAR(sqlfdbklogin) = "root"
|
||||
GLOBAL_REAL_VAR(sqlfdbkpass) = ""
|
||||
GLOBAL_REAL_VAR(sqlfdbktableprefix) = "erro_"
|
||||
@@ -1,6 +0,0 @@
|
||||
GLOBAL_DATUM(data_core, /datum/datacore)
|
||||
|
||||
GLOBAL_VAR_INIT(CELLRATE, 0.002) // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
|
||||
GLOBAL_VAR_INIT(CHARGELEVEL, 0.001) // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
|
||||
|
||||
GLOBAL_LIST_EMPTY(powernets)
|
||||
@@ -22,6 +22,9 @@
|
||||
if(modifiers["shift"] && modifiers["ctrl"])
|
||||
CtrlShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["shift"] && modifiers["middle"])
|
||||
ShiftMiddleClickOn(A)
|
||||
return
|
||||
if(modifiers["middle"])
|
||||
MiddleClickOn(A)
|
||||
return
|
||||
|
||||
@@ -266,8 +266,8 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
icon_state = "no-servants-caches"
|
||||
var/static/list/scripture_states = list(SCRIPTURE_DRIVER = TRUE, SCRIPTURE_SCRIPT = FALSE, SCRIPTURE_APPLICATION = FALSE, SCRIPTURE_REVENANT = FALSE, SCRIPTURE_JUDGEMENT = FALSE)
|
||||
|
||||
/obj/screen/alert/clockwork/scripture_reqs/New()
|
||||
..()
|
||||
/obj/screen/alert/clockwork/scripture_reqs/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
process()
|
||||
|
||||
|
||||
+189
-177
@@ -276,6 +276,18 @@
|
||||
qdel(M)
|
||||
votable_modes += "secret"
|
||||
|
||||
Reload()
|
||||
|
||||
/datum/configuration/proc/Reload()
|
||||
load("config/config.txt")
|
||||
load("config/game_options.txt","game_options")
|
||||
loadsql("config/dbconfig.txt")
|
||||
if (maprotation)
|
||||
loadmaplist("config/maps.txt")
|
||||
|
||||
// apply some settings from config..
|
||||
GLOB.abandon_allowed = respawn
|
||||
|
||||
/datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist
|
||||
var/list/Lines = file2list(filename)
|
||||
|
||||
@@ -305,109 +317,109 @@
|
||||
if(type == "config")
|
||||
switch(name)
|
||||
if("hub")
|
||||
config.hub = 1
|
||||
hub = 1
|
||||
if("admin_legacy_system")
|
||||
config.admin_legacy_system = 1
|
||||
admin_legacy_system = 1
|
||||
if("ban_legacy_system")
|
||||
config.ban_legacy_system = 1
|
||||
ban_legacy_system = 1
|
||||
if("use_age_restriction_for_jobs")
|
||||
config.use_age_restriction_for_jobs = 1
|
||||
use_age_restriction_for_jobs = 1
|
||||
if("use_account_age_for_jobs")
|
||||
config.use_account_age_for_jobs = 1
|
||||
use_account_age_for_jobs = 1
|
||||
if("lobby_countdown")
|
||||
config.lobby_countdown = text2num(value)
|
||||
lobby_countdown = text2num(value)
|
||||
if("round_end_countdown")
|
||||
config.round_end_countdown = text2num(value)
|
||||
round_end_countdown = text2num(value)
|
||||
if("log_ooc")
|
||||
config.log_ooc = 1
|
||||
log_ooc = 1
|
||||
if("log_access")
|
||||
config.log_access = 1
|
||||
log_access = 1
|
||||
if("log_say")
|
||||
config.log_say = 1
|
||||
log_say = 1
|
||||
if("log_admin")
|
||||
config.log_admin = 1
|
||||
log_admin = 1
|
||||
if("log_prayer")
|
||||
config.log_prayer = 1
|
||||
log_prayer = 1
|
||||
if("log_law")
|
||||
config.log_law = 1
|
||||
log_law = 1
|
||||
if("log_game")
|
||||
config.log_game = 1
|
||||
log_game = 1
|
||||
if("log_vote")
|
||||
config.log_vote = 1
|
||||
log_vote = 1
|
||||
if("log_whisper")
|
||||
config.log_whisper = 1
|
||||
log_whisper = 1
|
||||
if("log_attack")
|
||||
config.log_attack = 1
|
||||
log_attack = 1
|
||||
if("log_emote")
|
||||
config.log_emote = 1
|
||||
log_emote = 1
|
||||
if("log_adminchat")
|
||||
config.log_adminchat = 1
|
||||
log_adminchat = 1
|
||||
if("log_pda")
|
||||
config.log_pda = 1
|
||||
log_pda = 1
|
||||
if("log_hrefs")
|
||||
config.log_hrefs = 1
|
||||
log_hrefs = 1
|
||||
if("log_twitter")
|
||||
config.log_twitter = 1
|
||||
log_twitter = 1
|
||||
if("log_world_topic")
|
||||
config.log_world_topic = 1
|
||||
log_world_topic = 1
|
||||
if("allow_admin_ooccolor")
|
||||
config.allow_admin_ooccolor = 1
|
||||
allow_admin_ooccolor = 1
|
||||
if("allow_vote_restart")
|
||||
config.allow_vote_restart = 1
|
||||
allow_vote_restart = 1
|
||||
if("allow_vote_mode")
|
||||
config.allow_vote_mode = 1
|
||||
allow_vote_mode = 1
|
||||
if("no_dead_vote")
|
||||
config.vote_no_dead = 1
|
||||
vote_no_dead = 1
|
||||
if("default_no_vote")
|
||||
config.vote_no_default = 1
|
||||
vote_no_default = 1
|
||||
if("vote_delay")
|
||||
config.vote_delay = text2num(value)
|
||||
vote_delay = text2num(value)
|
||||
if("vote_period")
|
||||
config.vote_period = text2num(value)
|
||||
vote_period = text2num(value)
|
||||
if("norespawn")
|
||||
config.respawn = 0
|
||||
respawn = 0
|
||||
if("servername")
|
||||
config.server_name = value
|
||||
server_name = value
|
||||
if("serversqlname")
|
||||
config.server_sql_name = value
|
||||
server_sql_name = value
|
||||
if("stationname")
|
||||
config.station_name = value
|
||||
station_name = value
|
||||
if("hostedby")
|
||||
config.hostedby = value
|
||||
hostedby = value
|
||||
if("server")
|
||||
config.server = value
|
||||
server = value
|
||||
if("banappeals")
|
||||
config.banappeals = value
|
||||
banappeals = value
|
||||
if("wikiurl")
|
||||
config.wikiurl = value
|
||||
wikiurl = value
|
||||
if("forumurl")
|
||||
config.forumurl = value
|
||||
forumurl = value
|
||||
if("rulesurl")
|
||||
config.rulesurl = value
|
||||
rulesurl = value
|
||||
if("githuburl")
|
||||
config.githuburl = value
|
||||
githuburl = value
|
||||
if("githubrepoid")
|
||||
config.githubrepoid = value
|
||||
githubrepoid = value
|
||||
if("guest_jobban")
|
||||
config.guest_jobban = 1
|
||||
guest_jobban = 1
|
||||
if("guest_ban")
|
||||
GLOB.guests_allowed = 0
|
||||
if("usewhitelist")
|
||||
config.usewhitelist = TRUE
|
||||
usewhitelist = TRUE
|
||||
if("allow_metadata")
|
||||
config.allow_Metadata = 1
|
||||
allow_Metadata = 1
|
||||
if("kick_inactive")
|
||||
if(value < 1)
|
||||
value = INACTIVITY_KICK
|
||||
config.kick_inactive = value
|
||||
kick_inactive = value
|
||||
if("load_jobs_from_txt")
|
||||
load_jobs_from_txt = 1
|
||||
if("forbid_singulo_possession")
|
||||
forbid_singulo_possession = 1
|
||||
if("popup_admin_pm")
|
||||
config.popup_admin_pm = 1
|
||||
popup_admin_pm = 1
|
||||
if("allow_holidays")
|
||||
config.allow_holidays = 1
|
||||
allow_holidays = 1
|
||||
if("useircbot")
|
||||
useircbot = 1
|
||||
if("ticklag")
|
||||
@@ -421,9 +433,9 @@
|
||||
if("automute_on")
|
||||
automute_on = 1
|
||||
if("comms_key")
|
||||
GLOB.comms_key = value
|
||||
global.comms_key = value
|
||||
if(value != "default_pwd" && length(value) > 6) //It's the default value or less than 6 characters long, warn badmins
|
||||
GLOB.comms_allowed = 1
|
||||
global.comms_allowed = 1
|
||||
if("cross_server_address")
|
||||
cross_address = value
|
||||
if(value != "byond:\\address:port")
|
||||
@@ -437,46 +449,46 @@
|
||||
if(value != "byond:\\address:port")
|
||||
allow_panic_bunker_bounce = 1
|
||||
if("medal_hub_address")
|
||||
GLOB.medal_hub = value
|
||||
global.medal_hub = value
|
||||
if("medal_hub_password")
|
||||
GLOB.medal_pass = value
|
||||
global.medal_pass = value
|
||||
if("show_irc_name")
|
||||
config.showircname = 1
|
||||
showircname = 1
|
||||
if("see_own_notes")
|
||||
config.see_own_notes = 1
|
||||
see_own_notes = 1
|
||||
if("soft_popcap")
|
||||
config.soft_popcap = text2num(value)
|
||||
soft_popcap = text2num(value)
|
||||
if("hard_popcap")
|
||||
config.hard_popcap = text2num(value)
|
||||
hard_popcap = text2num(value)
|
||||
if("extreme_popcap")
|
||||
config.extreme_popcap = text2num(value)
|
||||
extreme_popcap = text2num(value)
|
||||
if("soft_popcap_message")
|
||||
config.soft_popcap_message = value
|
||||
soft_popcap_message = value
|
||||
if("hard_popcap_message")
|
||||
config.hard_popcap_message = value
|
||||
hard_popcap_message = value
|
||||
if("extreme_popcap_message")
|
||||
config.extreme_popcap_message = value
|
||||
extreme_popcap_message = value
|
||||
if("panic_bunker")
|
||||
config.panic_bunker = 1
|
||||
panic_bunker = 1
|
||||
if("notify_new_player_age")
|
||||
config.notify_new_player_age = text2num(value)
|
||||
notify_new_player_age = text2num(value)
|
||||
if("irc_first_connection_alert")
|
||||
config.irc_first_connection_alert = 1
|
||||
irc_first_connection_alert = 1
|
||||
if("check_randomizer")
|
||||
config.check_randomizer = 1
|
||||
check_randomizer = 1
|
||||
if("ipintel_email")
|
||||
if (value != "ch@nge.me")
|
||||
config.ipintel_email = value
|
||||
ipintel_email = value
|
||||
if("ipintel_rating_bad")
|
||||
config.ipintel_rating_bad = text2num(value)
|
||||
ipintel_rating_bad = text2num(value)
|
||||
if("ipintel_domain")
|
||||
config.ipintel_domain = value
|
||||
ipintel_domain = value
|
||||
if("ipintel_save_good")
|
||||
config.ipintel_save_good = text2num(value)
|
||||
ipintel_save_good = text2num(value)
|
||||
if("ipintel_save_bad")
|
||||
config.ipintel_save_bad = text2num(value)
|
||||
ipintel_save_bad = text2num(value)
|
||||
if("aggressive_changelog")
|
||||
config.aggressive_changelog = 1
|
||||
aggressive_changelog = 1
|
||||
if("log_runtimes")
|
||||
log_runtimes = TRUE
|
||||
var/newlog = file("data/logs/runtimes/runtime-[time2text(world.realtime, "YYYY-MM-DD")].log")
|
||||
@@ -484,39 +496,39 @@
|
||||
world.log << "Now logging runtimes to data/logs/runtimes/runtime-[time2text(world.realtime, "YYYY-MM-DD")].log"
|
||||
GLOB.runtime_diary = newlog
|
||||
if("autoconvert_notes")
|
||||
config.autoconvert_notes = 1
|
||||
autoconvert_notes = 1
|
||||
if("allow_webclient")
|
||||
config.allowwebclient = 1
|
||||
allowwebclient = 1
|
||||
if("webclient_only_byond_members")
|
||||
config.webclientmembersonly = 1
|
||||
webclientmembersonly = 1
|
||||
if("announce_admin_logout")
|
||||
config.announce_admin_logout = 1
|
||||
announce_admin_logout = 1
|
||||
if("announce_admin_login")
|
||||
config.announce_admin_login = 1
|
||||
announce_admin_login = 1
|
||||
if("maprotation")
|
||||
config.maprotation = 1
|
||||
maprotation = 1
|
||||
if("allow_map_voting")
|
||||
config.allow_map_voting = text2num(value)
|
||||
allow_map_voting = text2num(value)
|
||||
if("maprotationchancedelta")
|
||||
config.maprotatechancedelta = text2num(value)
|
||||
maprotatechancedelta = text2num(value)
|
||||
if("autoadmin")
|
||||
config.autoadmin = 1
|
||||
autoadmin = 1
|
||||
if(value)
|
||||
config.autoadmin_rank = ckeyEx(value)
|
||||
autoadmin_rank = ckeyEx(value)
|
||||
if("generate_minimaps")
|
||||
config.generate_minimaps = 1
|
||||
generate_minimaps = 1
|
||||
if("client_warn_version")
|
||||
config.client_warn_version = text2num(value)
|
||||
client_warn_version = text2num(value)
|
||||
if("client_warn_message")
|
||||
config.client_warn_message = value
|
||||
client_warn_message = value
|
||||
if("client_error_version")
|
||||
config.client_error_version = text2num(value)
|
||||
client_error_version = text2num(value)
|
||||
if("client_error_message")
|
||||
config.client_error_message = value
|
||||
client_error_message = value
|
||||
if("minute_topic_limit")
|
||||
config.minutetopiclimit = text2num(value)
|
||||
minutetopiclimit = text2num(value)
|
||||
if("second_topic_limit")
|
||||
config.secondtopiclimit = text2num(value)
|
||||
secondtopiclimit = text2num(value)
|
||||
if("error_cooldown")
|
||||
error_cooldown = text2num(value)
|
||||
if("error_limit")
|
||||
@@ -531,75 +543,75 @@
|
||||
else if(type == "game_options")
|
||||
switch(name)
|
||||
if("damage_multiplier")
|
||||
config.damage_multiplier = text2num(value)
|
||||
damage_multiplier = text2num(value)
|
||||
if("revival_pod_plants")
|
||||
config.revival_pod_plants = text2num(value)
|
||||
revival_pod_plants = text2num(value)
|
||||
if("revival_cloning")
|
||||
config.revival_cloning = text2num(value)
|
||||
revival_cloning = text2num(value)
|
||||
if("revival_brain_life")
|
||||
config.revival_brain_life = text2num(value)
|
||||
revival_brain_life = text2num(value)
|
||||
if("rename_cyborg")
|
||||
config.rename_cyborg = 1
|
||||
rename_cyborg = 1
|
||||
if("ooc_during_round")
|
||||
config.ooc_during_round = 1
|
||||
ooc_during_round = 1
|
||||
if("emojis")
|
||||
config.emojis = 1
|
||||
emojis = 1
|
||||
if("run_delay")
|
||||
config.run_speed = text2num(value)
|
||||
run_speed = text2num(value)
|
||||
if("walk_delay")
|
||||
config.walk_speed = text2num(value)
|
||||
walk_speed = text2num(value)
|
||||
if("human_delay")
|
||||
config.human_delay = text2num(value)
|
||||
human_delay = text2num(value)
|
||||
if("robot_delay")
|
||||
config.robot_delay = text2num(value)
|
||||
robot_delay = text2num(value)
|
||||
if("monkey_delay")
|
||||
config.monkey_delay = text2num(value)
|
||||
monkey_delay = text2num(value)
|
||||
if("alien_delay")
|
||||
config.alien_delay = text2num(value)
|
||||
alien_delay = text2num(value)
|
||||
if("slime_delay")
|
||||
config.slime_delay = text2num(value)
|
||||
slime_delay = text2num(value)
|
||||
if("animal_delay")
|
||||
config.animal_delay = text2num(value)
|
||||
animal_delay = text2num(value)
|
||||
if("alert_red_upto")
|
||||
config.alert_desc_red_upto = value
|
||||
alert_desc_red_upto = value
|
||||
if("alert_red_downto")
|
||||
config.alert_desc_red_downto = value
|
||||
alert_desc_red_downto = value
|
||||
if("alert_blue_downto")
|
||||
config.alert_desc_blue_downto = value
|
||||
alert_desc_blue_downto = value
|
||||
if("alert_blue_upto")
|
||||
config.alert_desc_blue_upto = value
|
||||
alert_desc_blue_upto = value
|
||||
if("alert_green")
|
||||
config.alert_desc_green = value
|
||||
alert_desc_green = value
|
||||
if("alert_delta")
|
||||
config.alert_desc_delta = value
|
||||
alert_desc_delta = value
|
||||
if("no_intercept_report")
|
||||
config.intercept = 0
|
||||
intercept = 0
|
||||
if("assistants_have_maint_access")
|
||||
config.jobs_have_maint_access |= ASSISTANTS_HAVE_MAINT_ACCESS
|
||||
jobs_have_maint_access |= ASSISTANTS_HAVE_MAINT_ACCESS
|
||||
if("security_has_maint_access")
|
||||
config.jobs_have_maint_access |= SECURITY_HAS_MAINT_ACCESS
|
||||
jobs_have_maint_access |= SECURITY_HAS_MAINT_ACCESS
|
||||
if("everyone_has_maint_access")
|
||||
config.jobs_have_maint_access |= EVERYONE_HAS_MAINT_ACCESS
|
||||
jobs_have_maint_access |= EVERYONE_HAS_MAINT_ACCESS
|
||||
if("sec_start_brig")
|
||||
config.sec_start_brig = 1
|
||||
sec_start_brig = 1
|
||||
if("gateway_delay")
|
||||
config.gateway_delay = text2num(value)
|
||||
gateway_delay = text2num(value)
|
||||
if("continuous")
|
||||
var/mode_name = lowertext(value)
|
||||
if(mode_name in config.modes)
|
||||
config.continuous[mode_name] = 1
|
||||
if(mode_name in modes)
|
||||
continuous[mode_name] = 1
|
||||
else
|
||||
GLOB.diary << "Unknown continuous configuration definition: [mode_name]."
|
||||
if("midround_antag")
|
||||
var/mode_name = lowertext(value)
|
||||
if(mode_name in config.modes)
|
||||
config.midround_antag[mode_name] = 1
|
||||
if(mode_name in modes)
|
||||
midround_antag[mode_name] = 1
|
||||
else
|
||||
GLOB.diary << "Unknown midround antagonist configuration definition: [mode_name]."
|
||||
if("midround_antag_time_check")
|
||||
config.midround_antag_time_check = text2num(value)
|
||||
midround_antag_time_check = text2num(value)
|
||||
if("midround_antag_life_check")
|
||||
config.midround_antag_life_check = text2num(value)
|
||||
midround_antag_life_check = text2num(value)
|
||||
if("min_pop")
|
||||
var/pop_pos = findtext(value, " ")
|
||||
var/mode_name = null
|
||||
@@ -608,8 +620,8 @@
|
||||
if(pop_pos)
|
||||
mode_name = lowertext(copytext(value, 1, pop_pos))
|
||||
mode_value = copytext(value, pop_pos + 1)
|
||||
if(mode_name in config.modes)
|
||||
config.min_pop[mode_name] = text2num(mode_value)
|
||||
if(mode_name in modes)
|
||||
min_pop[mode_name] = text2num(mode_value)
|
||||
else
|
||||
GLOB.diary << "Unknown minimum population configuration definition: [mode_name]."
|
||||
else
|
||||
@@ -622,28 +634,28 @@
|
||||
if(pop_pos)
|
||||
mode_name = lowertext(copytext(value, 1, pop_pos))
|
||||
mode_value = copytext(value, pop_pos + 1)
|
||||
if(mode_name in config.modes)
|
||||
config.max_pop[mode_name] = text2num(mode_value)
|
||||
if(mode_name in modes)
|
||||
max_pop[mode_name] = text2num(mode_value)
|
||||
else
|
||||
GLOB.diary << "Unknown maximum population configuration definition: [mode_name]."
|
||||
else
|
||||
GLOB.diary << "Incorrect maximum population configuration definition: [mode_name] [mode_value]."
|
||||
if("shuttle_refuel_delay")
|
||||
config.shuttle_refuel_delay = text2num(value)
|
||||
shuttle_refuel_delay = text2num(value)
|
||||
if("show_game_type_odds")
|
||||
config.show_game_type_odds = 1
|
||||
show_game_type_odds = 1
|
||||
if("ghost_interaction")
|
||||
config.ghost_interaction = 1
|
||||
ghost_interaction = 1
|
||||
if("traitor_scaling_coeff")
|
||||
config.traitor_scaling_coeff = text2num(value)
|
||||
traitor_scaling_coeff = text2num(value)
|
||||
if("changeling_scaling_coeff")
|
||||
config.changeling_scaling_coeff = text2num(value)
|
||||
changeling_scaling_coeff = text2num(value)
|
||||
if("security_scaling_coeff")
|
||||
config.security_scaling_coeff = text2num(value)
|
||||
security_scaling_coeff = text2num(value)
|
||||
if("abductor_scaling_coeff")
|
||||
config.abductor_scaling_coeff = text2num(value)
|
||||
abductor_scaling_coeff = text2num(value)
|
||||
if("traitor_objectives_amount")
|
||||
config.traitor_objectives_amount = text2num(value)
|
||||
traitor_objectives_amount = text2num(value)
|
||||
if("probability")
|
||||
var/prob_pos = findtext(value, " ")
|
||||
var/prob_name = null
|
||||
@@ -652,51 +664,51 @@
|
||||
if(prob_pos)
|
||||
prob_name = lowertext(copytext(value, 1, prob_pos))
|
||||
prob_value = copytext(value, prob_pos + 1)
|
||||
if(prob_name in config.modes)
|
||||
config.probabilities[prob_name] = text2num(prob_value)
|
||||
if(prob_name in modes)
|
||||
probabilities[prob_name] = text2num(prob_value)
|
||||
else
|
||||
GLOB.diary << "Unknown game mode probability configuration definition: [prob_name]."
|
||||
else
|
||||
GLOB.diary << "Incorrect probability configuration definition: [prob_name] [prob_value]."
|
||||
|
||||
if("protect_roles_from_antagonist")
|
||||
config.protect_roles_from_antagonist = 1
|
||||
protect_roles_from_antagonist = 1
|
||||
if("protect_assistant_from_antagonist")
|
||||
config.protect_assistant_from_antagonist = 1
|
||||
protect_assistant_from_antagonist = 1
|
||||
if("enforce_human_authority")
|
||||
config.enforce_human_authority = 1
|
||||
enforce_human_authority = 1
|
||||
if("allow_latejoin_antagonists")
|
||||
config.allow_latejoin_antagonists = 1
|
||||
allow_latejoin_antagonists = 1
|
||||
if("allow_random_events")
|
||||
config.allow_random_events = 1
|
||||
allow_random_events = 1
|
||||
|
||||
if("events_min_time_mul")
|
||||
config.events_min_time_mul = text2num(value)
|
||||
events_min_time_mul = text2num(value)
|
||||
if("events_min_players_mul")
|
||||
config.events_min_players_mul = text2num(value)
|
||||
events_min_players_mul = text2num(value)
|
||||
|
||||
if("minimal_access_threshold")
|
||||
config.minimal_access_threshold = text2num(value)
|
||||
minimal_access_threshold = text2num(value)
|
||||
if("jobs_have_minimal_access")
|
||||
config.jobs_have_minimal_access = 1
|
||||
jobs_have_minimal_access = 1
|
||||
if("humans_need_surnames")
|
||||
humans_need_surnames = 1
|
||||
if("force_random_names")
|
||||
config.force_random_names = 1
|
||||
force_random_names = 1
|
||||
if("allow_ai")
|
||||
config.allow_ai = 1
|
||||
allow_ai = 1
|
||||
if("disable_secborg")
|
||||
config.forbid_secborg = 1
|
||||
forbid_secborg = 1
|
||||
if("disable_peaceborg")
|
||||
config.forbid_peaceborg = 1
|
||||
forbid_peaceborg = 1
|
||||
if("silent_ai")
|
||||
config.silent_ai = 1
|
||||
silent_ai = 1
|
||||
if("silent_borg")
|
||||
config.silent_borg = 1
|
||||
silent_borg = 1
|
||||
if("sandbox_autoclose")
|
||||
config.sandbox_autoclose = 1
|
||||
sandbox_autoclose = 1
|
||||
if("default_laws")
|
||||
config.default_laws = text2num(value)
|
||||
default_laws = text2num(value)
|
||||
if("random_laws")
|
||||
var/law_id = lowertext(value)
|
||||
lawids += law_id
|
||||
@@ -711,9 +723,9 @@
|
||||
law_weights[lawid] = weight
|
||||
|
||||
if("silicon_max_law_amount")
|
||||
config.silicon_max_law_amount = text2num(value)
|
||||
silicon_max_law_amount = text2num(value)
|
||||
if("join_with_mutant_race")
|
||||
config.mutant_races = 1
|
||||
mutant_races = 1
|
||||
if("roundstart_races")
|
||||
var/race_id = lowertext(value)
|
||||
for(var/species_id in GLOB.species_list)
|
||||
@@ -721,25 +733,25 @@
|
||||
roundstart_races += GLOB.species_list[species_id]
|
||||
GLOB.roundstart_species[species_id] = GLOB.species_list[species_id]
|
||||
if("join_with_mutant_humans")
|
||||
config.mutant_humans = 1
|
||||
mutant_humans = 1
|
||||
if("assistant_cap")
|
||||
config.assistant_cap = text2num(value)
|
||||
assistant_cap = text2num(value)
|
||||
if("starlight")
|
||||
config.starlight = 1
|
||||
starlight = 1
|
||||
if("grey_assistants")
|
||||
config.grey_assistants = 1
|
||||
grey_assistants = 1
|
||||
if("lavaland_budget")
|
||||
config.lavaland_budget = text2num(value)
|
||||
lavaland_budget = text2num(value)
|
||||
if("space_budget")
|
||||
config.space_budget = text2num(value)
|
||||
space_budget = text2num(value)
|
||||
if("no_summon_guns")
|
||||
config.no_summon_guns = 1
|
||||
no_summon_guns = 1
|
||||
if("no_summon_magic")
|
||||
config.no_summon_magic = 1
|
||||
no_summon_magic = 1
|
||||
if("no_summon_events")
|
||||
config.no_summon_events = 1
|
||||
no_summon_events = 1
|
||||
if("reactionary_explosions")
|
||||
config.reactionary_explosions = 1
|
||||
reactionary_explosions = 1
|
||||
if("bombcap")
|
||||
var/BombCap = text2num(value)
|
||||
if (!BombCap)
|
||||
@@ -753,13 +765,13 @@
|
||||
GLOB.MAX_EX_FLASH_RANGE = BombCap
|
||||
GLOB.MAX_EX_FLAME_RANGE = BombCap
|
||||
if("arrivals_shuttle_dock_window")
|
||||
config.arrivals_shuttle_dock_window = max(PARALLAX_LOOP_TIME, text2num(value))
|
||||
arrivals_shuttle_dock_window = max(PARALLAX_LOOP_TIME, text2num(value))
|
||||
if("arrivals_shuttle_require_safe_latejoin")
|
||||
config.arrivals_shuttle_require_safe_latejoin = text2num(value)
|
||||
arrivals_shuttle_require_safe_latejoin = text2num(value)
|
||||
if ("mentor_mobname_only")
|
||||
config.mentors_mobname_only = 1
|
||||
mentors_mobname_only = 1
|
||||
if ("mentor_legacy_system")
|
||||
config.mentor_legacy_system = 1
|
||||
mentor_legacy_system = 1
|
||||
else
|
||||
GLOB.diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
@@ -810,9 +822,9 @@
|
||||
if ("weight","voteweight")
|
||||
currentmap.voteweight = text2num(data)
|
||||
if ("default","defaultmap")
|
||||
config.defaultmap = currentmap
|
||||
defaultmap = currentmap
|
||||
if ("endmap")
|
||||
config.maplist[currentmap.map_name] = currentmap
|
||||
maplist[currentmap.map_name] = currentmap
|
||||
currentmap = null
|
||||
else
|
||||
GLOB.diary << "Unknown command in map vote config: '[command]'"
|
||||
@@ -845,19 +857,19 @@
|
||||
|
||||
switch(name)
|
||||
if("sql_enabled")
|
||||
config.sql_enabled = 1
|
||||
sql_enabled = 1
|
||||
if("address")
|
||||
GLOB.sqladdress = value
|
||||
global.sqladdress = value
|
||||
if("port")
|
||||
GLOB.sqlport = value
|
||||
global.sqlport = value
|
||||
if("feedback_database")
|
||||
GLOB.sqlfdbkdb = value
|
||||
global.sqlfdbkdb = value
|
||||
if("feedback_login")
|
||||
GLOB.sqlfdbklogin = value
|
||||
global.sqlfdbklogin = value
|
||||
if("feedback_password")
|
||||
GLOB.sqlfdbkpass = value
|
||||
global.sqlfdbkpass = value
|
||||
if("feedback_tableprefix")
|
||||
GLOB.sqlfdbktableprefix = value
|
||||
global.sqlfdbktableprefix = value
|
||||
else
|
||||
GLOB.diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
@@ -915,4 +927,4 @@
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Edit", src)
|
||||
|
||||
stat("[name]:", statclick)
|
||||
stat("[name]:", statclick)
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
//This is the ABSOLUTE ONLY THING that should init globally like this
|
||||
GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
|
||||
//THIS IS THE INIT ORDER
|
||||
//Master -> SSPreInit -> GLOB -> world -> config -> SSInit -> Failsafe
|
||||
//GOT IT MEMORIZED?
|
||||
|
||||
GLOBAL_VAR_INIT(MC_restart_clear, 0)
|
||||
GLOBAL_VAR_INIT(MC_restart_timeout, 0)
|
||||
GLOBAL_VAR_INIT(MC_restart_count, 0)
|
||||
@@ -65,7 +69,7 @@ GLOBAL_VAR_INIT(CURRENT_TICKLIMIT, TICK_LIMIT_RUNNING)
|
||||
else
|
||||
init_subtypes(/datum/controller/subsystem, subsystems)
|
||||
Master = src
|
||||
|
||||
|
||||
if(!GLOB)
|
||||
new /datum/controller/global_vars
|
||||
|
||||
|
||||
@@ -47,6 +47,21 @@ SUBSYSTEM_DEF(garbage)
|
||||
msg += "TGR:[round((totalgcs/(totaldels+totalgcs))*100, 0.01)]%"
|
||||
..(msg)
|
||||
|
||||
/datum/controller/subsystem/garbage/Shutdown()
|
||||
//Adds the del() log to world.log in a format condensable by the runtime condenser found in tools
|
||||
if(didntgc.len || sleptDestroy.len)
|
||||
var/list/dellog = list()
|
||||
for(var/path in didntgc)
|
||||
dellog += "Path : [path] \n"
|
||||
dellog += "Failures : [didntgc[path]] \n"
|
||||
if(path in sleptDestroy)
|
||||
dellog += "Sleeps : [sleptDestroy[path]] \n"
|
||||
sleptDestroy -= path
|
||||
for(var/path in sleptDestroy)
|
||||
dellog += "Path : [path] \n"
|
||||
dellog += "Sleeps : [sleptDestroy[path]] \n"
|
||||
log_world(dellog.Join())
|
||||
|
||||
/datum/controller/subsystem/garbage/fire()
|
||||
HandleToBeQueued()
|
||||
if(state == SS_RUNNING)
|
||||
|
||||
@@ -198,6 +198,9 @@
|
||||
if(target == C.internal)
|
||||
button.icon_state = "template_active"
|
||||
|
||||
/datum/action/item_action/pick_color
|
||||
name = "Choose A Color"
|
||||
|
||||
/datum/action/item_action/toggle_mister
|
||||
name = "Toggle Mister"
|
||||
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
target="_parent._top"
|
||||
onmouseclick="this.focus()"
|
||||
style="background-color:#ffffff">
|
||||
<option value>Select option</option>
|
||||
<option value selected>Select option</option>
|
||||
[dropdownoptions_html.Join()]
|
||||
</select>
|
||||
</form>
|
||||
@@ -1084,7 +1084,7 @@
|
||||
if("augment")
|
||||
if(ishuman(C))
|
||||
if(BP)
|
||||
BP.change_bodypart_status(BODYPART_ROBOTIC, 1)
|
||||
BP.change_bodypart_status(BODYPART_ROBOTIC, TRUE, TRUE)
|
||||
else
|
||||
to_chat(usr, "[C] doesn't have such bodypart.")
|
||||
else
|
||||
|
||||
@@ -247,13 +247,10 @@
|
||||
dna.struc_enzymes = se
|
||||
domutcheck()
|
||||
|
||||
give_genitals(1)
|
||||
|
||||
if(mrace || newfeatures || ui)
|
||||
update_body()
|
||||
update_hair()
|
||||
update_body_parts()
|
||||
update_genitals()
|
||||
update_mutations_overlay()
|
||||
|
||||
|
||||
|
||||
@@ -12,9 +12,13 @@
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't use Krav Maga while you're incapacitated.</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] assumes the Neck Chop stance!</span>", "<b><i>Your next attack will be a Neck Chop.</i></b>")
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.martial_art.streak = "neck_chop"
|
||||
if (H.martial_art.streak == "neck_chop")
|
||||
owner.visible_message("<span class='danger'>[owner] assumes a neutral stance.</span>", "<b><i>Your next attack is cleared.</i></b>")
|
||||
H.martial_art.streak = ""
|
||||
else
|
||||
owner.visible_message("<span class='danger'>[owner] assumes the Neck Chop stance!</span>", "<b><i>Your next attack will be a Neck Chop.</i></b>")
|
||||
H.martial_art.streak = "neck_chop"
|
||||
|
||||
/datum/action/leg_sweep
|
||||
name = "Leg Sweep - Trips the victim, knocking them down for a brief moment."
|
||||
@@ -24,9 +28,13 @@
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't use Krav Maga while you're incapacitated.</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] assumes the Leg Sweep stance!</span>", "<b><i>Your next attack will be a Leg Sweep.</i></b>")
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.martial_art.streak = "leg_sweep"
|
||||
if (H.martial_art.streak == "leg_sweep")
|
||||
owner.visible_message("<span class='danger'>[owner] assumes a neutral stance.</span>", "<b><i>Your next attack is cleared.</i></b>")
|
||||
H.martial_art.streak = ""
|
||||
else
|
||||
owner.visible_message("<span class='danger'>[owner] assumes the Leg Sweep stance!</span>", "<b><i>Your next attack will be a Leg Sweep.</i></b>")
|
||||
H.martial_art.streak = "leg_sweep"
|
||||
|
||||
/datum/action/lung_punch//referred to internally as 'quick choke'
|
||||
name = "Lung Punch - Delivers a strong punch just above the victim's abdomen, constraining the lungs. The victim will be unable to breathe for a short time."
|
||||
@@ -36,9 +44,13 @@
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't use Krav Maga while you're incapacitated.</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] assumes the Lung Punch stance!</span>", "<b><i>Your next attack will be a Lung Punch.</i></b>")
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.martial_art.streak = "quick_choke"//internal name for lung punch
|
||||
if (H.martial_art.streak == "quick_choke")
|
||||
owner.visible_message("<span class='danger'>[owner] assumes a neutral stance.</span>", "<b><i>Your next attack is cleared.</i></b>")
|
||||
H.martial_art.streak = ""
|
||||
else
|
||||
owner.visible_message("<span class='danger'>[owner] assumes the Lung Punch stance!</span>", "<b><i>Your next attack will be a Lung Punch.</i></b>")
|
||||
H.martial_art.streak = "quick_choke"//internal name for lung punch
|
||||
|
||||
/datum/martial_art/krav_maga/teach(var/mob/living/carbon/human/H,var/make_temporary=0)
|
||||
..()
|
||||
|
||||
@@ -335,11 +335,11 @@
|
||||
/datum/riding/human/ride_check(mob/living/M)
|
||||
var/mob/living/carbon/human/H = ridden //IF this runtimes I'm blaming the admins.
|
||||
if(M.incapacitated(FALSE, TRUE) || H.incapacitated(FALSE, TRUE))
|
||||
M.visible_message("<span class='boldwarning'>[M] falls off of [ridden]!</span>")
|
||||
M.visible_message("<span class='warning'>[M] falls off [ridden]!</span>")
|
||||
Unbuckle(M)
|
||||
return FALSE
|
||||
if(M.restrained(TRUE))
|
||||
M.visible_message("<span class='boldwarning'>[M] can't hang onto [ridden] with their hands cuffed!</span>") //Honestly this should put the ridden mob in a chokehold.
|
||||
M.visible_message("<span class='warning'>[M] can't hang onto [ridden] with their hands cuffed!</span>") //Honestly this should put the ridden mob in a chokehold.
|
||||
Unbuckle(M)
|
||||
return FALSE
|
||||
if(H.pulling == M)
|
||||
@@ -375,7 +375,7 @@
|
||||
ridden.unbuckle_mob(user)
|
||||
user.Weaken(3)
|
||||
user.Stun(3)
|
||||
user.visible_message("<span class='boldwarning'>[ridden] pushes [user] off of them!</span>")
|
||||
user.visible_message("<span class='warning'>[ridden] pushes [user] off of them!</span>")
|
||||
|
||||
/datum/riding/cyborg
|
||||
keytype = null
|
||||
@@ -436,7 +436,7 @@
|
||||
var/turf/target = get_edge_target_turf(ridden, ridden.dir)
|
||||
var/turf/targetm = get_step(get_turf(ridden), ridden.dir)
|
||||
M.Move(targetm)
|
||||
M.visible_message("<span class='boldwarning'>[M] is thrown clear of [ridden]!</span>")
|
||||
M.visible_message("<span class='warning'>[M] is thrown clear of [ridden]!</span>")
|
||||
M.throw_at(target, 14, 5, ridden)
|
||||
M.Weaken(3)
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
name = "Asteroid - Artifact"
|
||||
icon_state = "cave"
|
||||
|
||||
/area/asteroid/artifactroom/New()
|
||||
..()
|
||||
/area/asteroid/artifactroom/Initialize()
|
||||
. = ..()
|
||||
set_dynamic_lighting()
|
||||
|
||||
/area/planet/clown
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
var/lightswitch = 1
|
||||
|
||||
var/requires_power = 1
|
||||
var/always_unpowered = 0 // This gets overriden to 1 for space in area/New().
|
||||
var/always_unpowered = 0 // This gets overriden to 1 for space in area/Initialize().
|
||||
|
||||
var/outdoors = 0 //For space, the asteroid, lavaland, etc. Used with blueprints to determine if we are adding a new area (vs editing a station room)
|
||||
|
||||
|
||||
+2
-2
@@ -445,10 +445,10 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
|
||||
/atom/proc/ratvar_act()
|
||||
return
|
||||
|
||||
/atom/proc/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
||||
/atom/proc/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||
return FALSE
|
||||
|
||||
/atom/proc/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
||||
/atom/proc/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||
return FALSE
|
||||
|
||||
/atom/proc/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
|
||||
|
||||
@@ -162,9 +162,7 @@
|
||||
used = 1
|
||||
var/mob/dead/observer/theghost = pick(nuke_candidates)
|
||||
spawn_antag(theghost.client, get_turf(src), "syndieborg")
|
||||
var/datum/effect_system/spark_spread/S = new /datum/effect_system/spark_spread
|
||||
S.set_up(4, 1, src)
|
||||
S.start()
|
||||
do_sparks(4, TRUE, src)
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Unable to connect to Syndicate command. Please wait and try again later or use the teleporter on your uplink to get your points refunded.</span>")
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var/point_rate = 2
|
||||
|
||||
|
||||
/obj/structure/blob/core/New(loc, client/new_overmind = null, new_rate = 2, placed = 0)
|
||||
/obj/structure/blob/core/Initialize(mapload, client/new_overmind = null, new_rate = 2, placed = 0)
|
||||
GLOB.blob_cores += src
|
||||
START_PROCESSING(SSobj, src)
|
||||
GLOB.poi_list |= src
|
||||
@@ -25,7 +25,7 @@
|
||||
if(overmind)
|
||||
update_icon()
|
||||
point_rate = new_rate
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/structure/blob/core/scannerreport()
|
||||
return "Directs the blob's expansion, gradually expands, and sustains nearby blob spores and blobbernauts."
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
point_return = 25
|
||||
|
||||
|
||||
/obj/structure/blob/node/New(loc)
|
||||
/obj/structure/blob/node/Initialize()
|
||||
GLOB.blob_nodes += src
|
||||
START_PROCESSING(SSobj, src)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/structure/blob/node/scannerreport()
|
||||
return "Gradually expands and sustains nearby blob spores and blobbernauts."
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
var/mob/camera/blob/overmind
|
||||
|
||||
|
||||
/obj/structure/blob/New(loc)
|
||||
/obj/structure/blob/Initialize()
|
||||
var/area/Ablob = get_area(loc)
|
||||
if(Ablob.blob_allowed) //Is this area allowed for winning as blob?
|
||||
GLOB.blobs_legit += src
|
||||
GLOB.blobs += src //Keep track of the blob in the normal list either way
|
||||
setDir(pick(GLOB.cardinal))
|
||||
update_icon()
|
||||
..()
|
||||
.= ..()
|
||||
ConsumeTile()
|
||||
if(atmosblock)
|
||||
CanAtmosPass = ATMOS_PASS_NO
|
||||
@@ -99,7 +99,7 @@
|
||||
var/list/blobs_to_affect = list()
|
||||
for(var/obj/structure/blob/B in urange(claim_range, src, 1))
|
||||
blobs_to_affect += B
|
||||
shuffle(blobs_to_affect)
|
||||
shuffle_inplace(blobs_to_affect)
|
||||
for(var/L in blobs_to_affect)
|
||||
var/obj/structure/blob/B = L
|
||||
if(!B.overmind && !istype(B, /obj/structure/blob/core) && prob(30))
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
// divided by healing_ticks to get heal/tick
|
||||
var/total_healing = 100
|
||||
|
||||
/obj/effect/proc_holder/changeling/fleshmend/New()
|
||||
..()
|
||||
/obj/effect/proc_holder/changeling/fleshmend/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/effect/proc_holder/changeling/fleshmend/Destroy()
|
||||
|
||||
@@ -162,8 +162,8 @@
|
||||
sharpness = IS_SHARP
|
||||
var/can_drop = FALSE
|
||||
|
||||
/obj/item/weapon/melee/arm_blade/New(location,silent,synthetic)
|
||||
..()
|
||||
/obj/item/weapon/melee/arm_blade/Initialize(mapload,silent,synthetic)
|
||||
. = ..()
|
||||
if(ismob(loc) && !silent)
|
||||
loc.visible_message("<span class='warning'>A grotesque blade forms around [loc.name]\'s arm!</span>", "<span class='warning'>Our arm twists and mutates, transforming it into a deadly blade.</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||
if(synthetic)
|
||||
@@ -240,8 +240,8 @@
|
||||
throw_range = 0
|
||||
throw_speed = 0
|
||||
|
||||
/obj/item/weapon/gun/magic/tentacle/New(location,silent)
|
||||
..()
|
||||
/obj/item/weapon/gun/magic/tentacle/Initialize(mapload, silent)
|
||||
. = ..()
|
||||
if(ismob(loc))
|
||||
if(!silent)
|
||||
loc.visible_message("<span class='warning'>[loc.name]\'s arm starts stretching inhumanly!</span>", "<span class='warning'>Our arm twists and mutates, transforming it into a tentacle.</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||
@@ -266,9 +266,9 @@
|
||||
firing_effect_type = null
|
||||
var/obj/item/weapon/gun/magic/tentacle/gun //the item that shot it
|
||||
|
||||
/obj/item/ammo_casing/magic/tentacle/New(obj/item/weapon/gun/magic/tentacle/tentacle_gun)
|
||||
gun = tentacle_gun
|
||||
..()
|
||||
/obj/item/ammo_casing/magic/tentacle/Initialize()
|
||||
gun = loc
|
||||
. = ..()
|
||||
|
||||
/obj/item/ammo_casing/magic/tentacle/Destroy()
|
||||
gun = null
|
||||
@@ -285,9 +285,9 @@
|
||||
var/chain
|
||||
var/obj/item/ammo_casing/magic/tentacle/source //the item that shot it
|
||||
|
||||
/obj/item/projectile/tentacle/New(obj/item/ammo_casing/magic/tentacle/tentacle_casing)
|
||||
source = tentacle_casing
|
||||
..()
|
||||
/obj/item/projectile/tentacle/Initialize()
|
||||
source = loc
|
||||
. = ..()
|
||||
|
||||
/obj/item/projectile/tentacle/fire(setAngle)
|
||||
if(firer)
|
||||
@@ -407,8 +407,8 @@
|
||||
|
||||
var/remaining_uses //Set by the changeling ability.
|
||||
|
||||
/obj/item/weapon/shield/changeling/New()
|
||||
..()
|
||||
/obj/item/weapon/shield/changeling/Initialize()
|
||||
. = ..()
|
||||
if(ismob(loc))
|
||||
loc.visible_message("<span class='warning'>The end of [loc.name]\'s hand inflates rapidly, forming a huge shield-like mass!</span>", "<span class='warning'>We inflate our hand into a strong shield.</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||
|
||||
@@ -452,8 +452,8 @@
|
||||
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank/internals/emergency_oxygen, /obj/item/weapon/tank/internals/oxygen)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0, fire = 90, acid = 90) //No armor at all.
|
||||
|
||||
/obj/item/clothing/suit/space/changeling/New()
|
||||
..()
|
||||
/obj/item/clothing/suit/space/changeling/Initialize()
|
||||
. = ..()
|
||||
if(ismob(loc))
|
||||
loc.visible_message("<span class='warning'>[loc.name]\'s flesh rapidly inflates, forming a bloated mass around their body!</span>", "<span class='warning'>We inflate our flesh, creating a spaceproof suit!</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||
START_PROCESSING(SSobj, src)
|
||||
@@ -501,8 +501,8 @@
|
||||
cold_protection = 0
|
||||
heat_protection = 0
|
||||
|
||||
/obj/item/clothing/suit/armor/changeling/New()
|
||||
..()
|
||||
/obj/item/clothing/suit/armor/changeling/Initialize()
|
||||
. = ..()
|
||||
if(ismob(loc))
|
||||
loc.visible_message("<span class='warning'>[loc.name]\'s flesh turns black, quickly transforming into a hard, chitinous mass!</span>", "<span class='warning'>We harden our flesh, creating a suit of armor!</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||
|
||||
|
||||
@@ -21,10 +21,8 @@
|
||||
if(!charge && !panel_open)
|
||||
panel_open = TRUE
|
||||
icon_state = "[initial(icon_state)]-o"
|
||||
var/datum/effect_system/spark_spread/spks = new(get_turf(src))
|
||||
spks.set_up(10, 0, get_turf(src))
|
||||
spks.start()
|
||||
visible_message("<span class='warning'>[src]'s panel flies open with a flurry of spark</span>")
|
||||
do_sparks(10, FALSE, src)
|
||||
visible_message("<span class='warning'>[src]'s panel flies open with a flurry of sparks!</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/power_drain(clockcult_user)
|
||||
|
||||
@@ -124,7 +124,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
if(allow_excess_invokers)
|
||||
chanters += invokers
|
||||
else
|
||||
shuffle(invokers)
|
||||
shuffle_inplace(invokers)
|
||||
for(var/i in 1 to req_cultists)
|
||||
var/L = pick_n_take(invokers)
|
||||
if(L)
|
||||
|
||||
@@ -50,12 +50,16 @@
|
||||
|
||||
/datum/game_mode/devil/post_setup()
|
||||
for(var/datum/mind/devil in devils)
|
||||
spawn(rand(10,100))
|
||||
finalize_devil(devil, TRUE)
|
||||
spawn(100)
|
||||
add_devil_objectives(devil, objective_count) //This has to be in a separate loop, as we need devil names to be generated before we give objectives in devil agent.
|
||||
devil.announceDevilLaws()
|
||||
devil.announce_objectives()
|
||||
post_setup_finalize(devil)
|
||||
modePlayer += devils
|
||||
..()
|
||||
return 1
|
||||
|
||||
/datum/game_mode/devil/proc/post_setup_finalize(datum/mind/devil)
|
||||
set waitfor = FALSE
|
||||
sleep(rand(10,100))
|
||||
finalize_devil(devil, TRUE)
|
||||
sleep(100)
|
||||
add_devil_objectives(devil, objective_count) //This has to be in a separate loop, as we need devil names to be generated before we give objectives in devil agent.
|
||||
devil.announceDevilLaws()
|
||||
devil.announce_objectives()
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
/datum/game_mode/proc/finalize_devil(datum/mind/devil_mind, ascendable = FALSE)
|
||||
|
||||
set waitfor = FALSE
|
||||
var/trueName= randomDevilName()
|
||||
|
||||
devil_mind.devilinfo = devilInfo(trueName, 1)
|
||||
@@ -39,14 +39,14 @@
|
||||
devil_mind.store_memory("Your devilic true name is [devil_mind.devilinfo.truename]<br>[GLOB.lawlorify[LAW][devil_mind.devilinfo.ban]]<br>You may not use violence to coerce someone into selling their soul.<br>You may not directly and knowingly physically harm a devil, other than yourself.<br>[GLOB.lawlorify[LAW][devil_mind.devilinfo.bane]]<br>[GLOB.lawlorify[LAW][devil_mind.devilinfo.obligation]]<br>[GLOB.lawlorify[LAW][devil_mind.devilinfo.banish]]<br>")
|
||||
devil_mind.devilinfo.owner = devil_mind
|
||||
devil_mind.devilinfo.give_base_spells(1)
|
||||
spawn(10)
|
||||
devil_mind.devilinfo.update_hud()
|
||||
if(devil_mind.assigned_role == "Clown" && ishuman(devil_mind.current))
|
||||
var/mob/living/carbon/human/S = devil_mind.current
|
||||
to_chat(S, "<span class='notice'>Your infernal nature has allowed you to overcome your clownishness.</span>")
|
||||
S.dna.remove_mutation(CLOWNMUT)
|
||||
if(issilicon(devil_mind.current))
|
||||
add_law_sixsixsix(devil_mind.current)
|
||||
sleep(10)
|
||||
devil_mind.devilinfo.update_hud()
|
||||
if(devil_mind.assigned_role == "Clown" && ishuman(devil_mind.current))
|
||||
var/mob/living/carbon/human/S = devil_mind.current
|
||||
to_chat(S, "<span class='notice'>Your infernal nature has allowed you to overcome your clownishness.</span>")
|
||||
S.dna.remove_mutation(CLOWNMUT)
|
||||
|
||||
/datum/game_mode/proc/add_devil_objectives(datum/mind/devil_mind, quantity)
|
||||
var/list/validtypes = list(/datum/objective/devil/soulquantity, /datum/objective/devil/soulquality, /datum/objective/devil/sintouch, /datum/objective/devil/buy_target)
|
||||
|
||||
@@ -60,8 +60,7 @@
|
||||
stat = DEAD
|
||||
..(gibbed)
|
||||
drop_all_held_items()
|
||||
spawn (0)
|
||||
mind.devilinfo.beginResurrectionCheck(src)
|
||||
INVOKE_ASYNC(mind.devilinfo, /datum/devilinfo/proc/beginResurrectionCheck, src)
|
||||
|
||||
|
||||
/mob/living/carbon/true_devil/examine(mob/user)
|
||||
|
||||
@@ -75,11 +75,10 @@
|
||||
|
||||
|
||||
///Everyone should now be on the station and have their normal gear. This is the place to give the special roles extra things
|
||||
/datum/game_mode/proc/post_setup(report=0) //Gamemodes can override the intercept report. Passing a 1 as the argument will force a report.
|
||||
/datum/game_mode/proc/post_setup(report) //Gamemodes can override the intercept report. Passing TRUE as the argument will force a report.
|
||||
if(!report)
|
||||
report = config.intercept
|
||||
spawn (ROUNDSTART_LOGOUT_REPORT_TIME)
|
||||
display_roundstart_logout_report()
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/display_roundstart_logout_report), ROUNDSTART_LOGOUT_REPORT_TIME)
|
||||
|
||||
feedback_set_details("round_start","[time2text(world.realtime)]")
|
||||
if(SSticker && SSticker.mode)
|
||||
@@ -88,8 +87,7 @@
|
||||
feedback_set_details("revision","[GLOB.revdata.commit]")
|
||||
feedback_set_details("server_ip","[world.internet_address]:[world.port]")
|
||||
if(report)
|
||||
spawn (rand(waittime_l, waittime_h))
|
||||
send_intercept(0)
|
||||
addtimer(CALLBACK(src, .proc/send_intercept, 0), rand(waittime_l, waittime_h))
|
||||
generate_station_goals()
|
||||
GLOB.start_state = new /datum/station_state()
|
||||
GLOB.start_state.count(1)
|
||||
@@ -105,6 +103,7 @@
|
||||
|
||||
///Allows rounds to basically be "rerolled" should the initial premise fall through. Also known as mulligan antags.
|
||||
/datum/game_mode/proc/convert_roundtype()
|
||||
set waitfor = FALSE
|
||||
var/list/living_crew = list()
|
||||
|
||||
for(var/mob/Player in GLOB.mob_list)
|
||||
@@ -158,15 +157,16 @@
|
||||
|
||||
message_admins("The roundtype will be converted. If you have other plans for the station or feel the station is too messed up to inhabit <A HREF='?_src_=holder;toggle_midround_antag=\ref[usr]'>stop the creation of antags</A> or <A HREF='?_src_=holder;end_round=\ref[usr]'>end the round now</A>.")
|
||||
|
||||
spawn(rand(600,1800)) //somewhere between 1 and 3 minutes from now
|
||||
if(!config.midround_antag[SSticker.mode.config_tag])
|
||||
round_converted = 0
|
||||
return 1
|
||||
for(var/mob/living/carbon/human/H in antag_candidates)
|
||||
replacementmode.make_antag_chance(H)
|
||||
round_converted = 2
|
||||
message_admins("-- IMPORTANT: The roundtype has been converted to [replacementmode.name], antagonists may have been created! --")
|
||||
return 1
|
||||
. = 1
|
||||
sleep(rand(600,1800))
|
||||
//somewhere between 1 and 3 minutes from now
|
||||
if(!config.midround_antag[SSticker.mode.config_tag])
|
||||
round_converted = 0
|
||||
return 1
|
||||
for(var/mob/living/carbon/human/H in antag_candidates)
|
||||
replacementmode.make_antag_chance(H)
|
||||
round_converted = 2
|
||||
message_admins("-- IMPORTANT: The roundtype has been converted to [replacementmode.name], antagonists may have been created! --")
|
||||
|
||||
|
||||
///Called by the gameSSticker
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
set_light(2)
|
||||
GLOB.poi_list |= src
|
||||
spark_system = new
|
||||
spark_system.set_up(5, 1, src)
|
||||
spark_system.set_up(5, TRUE, src)
|
||||
countdown = new(src)
|
||||
|
||||
/obj/machinery/dominator/examine(mob/user)
|
||||
@@ -129,9 +129,8 @@
|
||||
set_broken()
|
||||
GLOB.poi_list.Remove(src)
|
||||
gang = null
|
||||
qdel(spark_system)
|
||||
qdel(countdown)
|
||||
countdown = null
|
||||
QDEL_NULL(spark_system)
|
||||
QDEL_NULL(countdown)
|
||||
STOP_PROCESSING(SSmachines, src)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -73,15 +73,16 @@ GLOBAL_LIST_INIT(gang_colors_pool, list("red","orange","yellow","green","blue","
|
||||
|
||||
|
||||
/datum/game_mode/gang/post_setup()
|
||||
spawn(rand(10,100))
|
||||
for(var/datum/gang/G in gangs)
|
||||
for(var/datum/mind/boss_mind in G.bosses)
|
||||
G.add_gang_hud(boss_mind)
|
||||
forge_gang_objectives(boss_mind)
|
||||
greet_gang(boss_mind)
|
||||
equip_gang(boss_mind.current,G)
|
||||
modePlayer += boss_mind
|
||||
set waitfor = FALSE
|
||||
..()
|
||||
sleep(rand(10,100))
|
||||
for(var/datum/gang/G in gangs)
|
||||
for(var/datum/mind/boss_mind in G.bosses)
|
||||
G.add_gang_hud(boss_mind)
|
||||
forge_gang_objectives(boss_mind)
|
||||
greet_gang(boss_mind)
|
||||
equip_gang(boss_mind.current,G)
|
||||
modePlayer += boss_mind
|
||||
|
||||
|
||||
/datum/game_mode/proc/forge_gang_objectives(datum/mind/boss_mind)
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/pen/gang/proc/cooldown(datum/gang/gang)
|
||||
set waitfor = FALSE
|
||||
var/cooldown_time = 600+(600*gang.bosses.len) // 1recruiter=2mins, 2recruiters=3mins, 3recruiters=4mins
|
||||
|
||||
cooldown = 1
|
||||
@@ -52,8 +53,8 @@
|
||||
|
||||
if(charges)
|
||||
cooldown_time = 50
|
||||
spawn(cooldown_time)
|
||||
cooldown = 0
|
||||
icon_state = "pen"
|
||||
var/mob/M = get(src, /mob)
|
||||
to_chat(M, "<span class='notice'>\icon[src] [src][(src.loc == M)?(""):(" in your [src.loc]")] vibrates softly. It is ready to be used again.</span>")
|
||||
sleep(cooldown_time)
|
||||
cooldown = 0
|
||||
icon_state = "pen"
|
||||
var/mob/M = get(src, /mob)
|
||||
to_chat(M, "<span class='notice'>\icon[src] [src][(src.loc == M)?(""):(" in your [src.loc]")] vibrates softly. It is ready to be used again.</span>")
|
||||
|
||||
@@ -192,19 +192,20 @@
|
||||
set category = "Malfunction"
|
||||
set name = "Destroy RCDs"
|
||||
set desc = "Detonate all RCDs on the station, while sparing onboard cyborg RCDs."
|
||||
set waitfor = FALSE
|
||||
|
||||
if(!canUseTopic() || malf_cooldown)
|
||||
return
|
||||
|
||||
for(var/I in GLOB.rcd_list)
|
||||
if(!istype(I, /obj/item/weapon/rcd/borg)) //Ensures that cyborg RCDs are spared.
|
||||
var/obj/item/weapon/rcd/RCD = I
|
||||
if(!istype(I, /obj/item/weapon/construction/rcd/borg)) //Ensures that cyborg RCDs are spared.
|
||||
var/obj/item/weapon/construction/rcd/RCD = I
|
||||
RCD.detonate_pulse()
|
||||
|
||||
to_chat(src, "<span class='warning'>RCD detonation pulse emitted.</span>")
|
||||
malf_cooldown = 1
|
||||
spawn(100)
|
||||
malf_cooldown = 0
|
||||
malf_cooldown = TRUE
|
||||
sleep(100)
|
||||
malf_cooldown = FALSE
|
||||
|
||||
/datum/AI_Module/large/mecha_domination
|
||||
module_name = "Viral Mech Domination"
|
||||
|
||||
@@ -1072,4 +1072,4 @@ GLOBAL_VAR_INIT(total_borer_hosts_needed, 10)
|
||||
|
||||
/datum/action/innate/borer/jumpstart_host/Activate()
|
||||
var/mob/living/simple_animal/borer/B = owner
|
||||
B.jumpstart()
|
||||
B.jumpstart()
|
||||
@@ -218,7 +218,7 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
||||
if("hsbrcd")
|
||||
if(!GLOB.hsboxspawn) return
|
||||
|
||||
new/obj/item/weapon/rcd/combat(usr.loc)
|
||||
new/obj/item/weapon/construction/rcd/combat(usr.loc)
|
||||
|
||||
//
|
||||
// New sandbox airlock maker
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
// As soon as we get 3 or 4 extra latejoin traitors, make them traitors and kill each other.
|
||||
if(late_joining_list.len >= rand(3, 4))
|
||||
// True randomness
|
||||
shuffle(late_joining_list)
|
||||
shuffle_inplace(late_joining_list)
|
||||
// Reset the target_list, it'll be used again in force_traitor_objectives
|
||||
target_list = list()
|
||||
|
||||
|
||||
@@ -329,7 +329,7 @@
|
||||
if("cyborg")
|
||||
for(var/X in M.bodyparts)
|
||||
var/obj/item/bodypart/affecting = X
|
||||
affecting.change_bodypart_status(BODYPART_ROBOTIC)
|
||||
affecting.change_bodypart_status(BODYPART_ROBOTIC, FALSE, TRUE)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
|
||||
M.put_in_hands_or_del(sword)
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
mages_made--
|
||||
return
|
||||
else
|
||||
shuffle(candidates)
|
||||
shuffle_inplace(candidates)
|
||||
for(var/mob/i in candidates)
|
||||
if(!i || !i.client) continue //Dont bother removing them from the list since we only grab one wizard
|
||||
|
||||
|
||||
@@ -126,6 +126,15 @@
|
||||
if (is_operational() && (!isnull(occupant)) && (occupant.stat != DEAD))
|
||||
to_chat(user, "Current clone cycle is [round(get_completion())]% complete.")
|
||||
|
||||
/obj/machinery/clonepod/return_air()
|
||||
// We want to simulate the clone not being in contact with
|
||||
// the atmosphere, so we'll put them in a constant pressure
|
||||
// nitrogen. They'll breathe through the chemicals we pump into them.
|
||||
var/static/datum/gas_mixture/immutable/cloner/GM //global so that there's only one instance made for all cloning pods
|
||||
if(!GM)
|
||||
GM = new
|
||||
return GM
|
||||
|
||||
/obj/machinery/clonepod/proc/get_completion()
|
||||
. = (100 * ((occupant.health + 100) / (heal_level + 100)))
|
||||
|
||||
|
||||
@@ -92,6 +92,12 @@ obj/machinery/computer/camera_advanced/attack_ai(mob/user)
|
||||
var/eye_initialized = 0
|
||||
var/visible_icon = 0
|
||||
var/image/user_image = null
|
||||
|
||||
/mob/camera/aiEye/remote/update_remote_sight(mob/living/user)
|
||||
user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras
|
||||
user.sight = 0
|
||||
user.see_in_dark = 2
|
||||
return 1
|
||||
|
||||
/mob/camera/aiEye/remote/Destroy()
|
||||
eye_user = null
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
power_change()
|
||||
|
||||
/obj/machinery/computer/process()
|
||||
|
||||
@@ -0,0 +1,514 @@
|
||||
// DISCO DANCE MACHINE - For engineering power optimization incentive nurturing test system (POINTS)
|
||||
|
||||
/obj/machinery/disco
|
||||
name = "radiant dance machine mark IV"
|
||||
desc = "The first three prototypes were discontinued after mass casualty incidents."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "disco0"
|
||||
anchored = FALSE
|
||||
verb_say = "states"
|
||||
density = TRUE
|
||||
req_access = list(GLOB.access_engine)
|
||||
var/active = FALSE
|
||||
var/list/rangers = list()
|
||||
var/list/listeners = list()
|
||||
var/charge = 35
|
||||
var/stop = 0
|
||||
var/list/available = list()
|
||||
var/list/select_name = list()
|
||||
var/list/spotlights = list()
|
||||
var/list/sparkles = list()
|
||||
var/static/list/songs = list(
|
||||
new /datum/track("Engineering's Basic Beat", 'sound/misc/disco.ogg', 600, 5),
|
||||
new /datum/track("Engineering's Domination Dance", 'sound/misc/e1m1.ogg', 950, 6),
|
||||
new /datum/track("Engineering's Superiority Shimmy", 'sound/misc/Paradox.ogg', 2400, 4),
|
||||
new /datum/track("Engineering's Ultimate High-Energy Hustle", 'sound/misc/boogie2.ogg', 1770, 5),
|
||||
)
|
||||
var/datum/track/selection = null
|
||||
|
||||
/datum/track
|
||||
var/song_name = "generic"
|
||||
var/song_path = null
|
||||
var/song_length = 0
|
||||
var/song_beat = 0
|
||||
|
||||
/datum/track/New(name, path, length, beat)
|
||||
song_name = name
|
||||
song_path = path
|
||||
song_length = length
|
||||
song_beat = beat
|
||||
|
||||
/obj/machinery/disco/Initialize()
|
||||
..()
|
||||
selection = songs[1]
|
||||
|
||||
|
||||
/obj/machinery/disco/Destroy()
|
||||
dance_over()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/disco/attackby(obj/item/O, mob/user, params)
|
||||
if(!active)
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
if(!anchored && !isinspace())
|
||||
to_chat(user,"<span class='notice'>You secure the [src] to the floor.</span>")
|
||||
anchored = TRUE
|
||||
else if(anchored)
|
||||
to_chat(user,"<span class='notice'>You unsecure and disconnect the [src].</span>")
|
||||
anchored = FALSE
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/disco/update_icon()
|
||||
if(active)
|
||||
icon_state = "disco1"
|
||||
else
|
||||
icon_state = "disco0"
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/disco/interact(mob/user)
|
||||
if (!anchored)
|
||||
to_chat(user,"<span class='warning'>This device must be anchored by a wrench!</span>")
|
||||
return
|
||||
if(!allowed(user))
|
||||
to_chat(user,"<span class='warning'>Error: Access Denied - Message: Only the engineering department can be trusted with this kind of power.</span>")
|
||||
playsound(src, 'sound/misc/compiler-failure.ogg', 50, 1)
|
||||
return
|
||||
if(!Adjacent(user) && !isAI(user))
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/list/dat = list()
|
||||
dat +="<div class='statusDisplay' style='text-align:center'>"
|
||||
dat += "<b><A href='?src=\ref[src];action=toggle'>[!active ? "BREAK IT DOWN" : "SHUT IT DOWN"]<b></A><br>"
|
||||
dat += "</div><br>"
|
||||
dat += "<A href='?src=\ref[src];action=select'> Select Track</A><br>"
|
||||
dat += "Track Selected: [selection.song_name]<br>"
|
||||
dat += "Track Length: [selection.song_length/10] seconds<br><br>"
|
||||
dat += "<br>DJ's Soundboard:<b><br>"
|
||||
dat +="<div class='statusDisplay'><div style='text-align:center'>"
|
||||
dat += "<A href='?src=\ref[src];action=horn'>Air Horn</A> "
|
||||
dat += "<A href='?src=\ref[src];action=alert'>Station Alert</A> "
|
||||
dat += "<A href='?src=\ref[src];action=siren'>Warning Siren</A> "
|
||||
dat += "<A href='?src=\ref[src];action=honk'>Honk</A><br>"
|
||||
dat += "<A href='?src=\ref[src];action=pump'>Shotgun Pump</A>"
|
||||
dat += "<A href='?src=\ref[src];action=pop'>Gunshot</A>"
|
||||
dat += "<A href='?src=\ref[src];action=saber'>Esword</A>"
|
||||
dat += "<A href='?src=\ref[src];action=harm'>Harm Alarm</A>"
|
||||
var/datum/browser/popup = new(user, "vending", "Radiance Dance Machine - Mark IV", 400, 350)
|
||||
popup.set_content(dat.Join())
|
||||
popup.open()
|
||||
|
||||
|
||||
/obj/machinery/disco/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
add_fingerprint(usr)
|
||||
switch(href_list["action"])
|
||||
if("toggle")
|
||||
if (QDELETED(src))
|
||||
return
|
||||
if(!active)
|
||||
if(stop > world.time)
|
||||
to_chat(usr, "<span class='warning'>Error: The device is still resetting from the last activation, it will be ready again in [round((stop-world.time)/10)] seconds.</span>")
|
||||
playsound(src, 'sound/misc/compiler-failure.ogg', 50, 1)
|
||||
return
|
||||
active = TRUE
|
||||
update_icon()
|
||||
dance_setup()
|
||||
START_PROCESSING(SSobj, src)
|
||||
lights_spin()
|
||||
updateUsrDialog()
|
||||
else if(active)
|
||||
active = FALSE
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
dance_over()
|
||||
stop = world.time + 300
|
||||
updateUsrDialog()
|
||||
if("select")
|
||||
if(active)
|
||||
to_chat(usr, "<span class='warning'>Error: You cannot change the song until the current one is over.</span>")
|
||||
return
|
||||
check_GBP()
|
||||
select_name = input(usr, "Choose your song", "Track:") as null|anything in available
|
||||
if (QDELETED(src))
|
||||
return
|
||||
for(var/datum/track/S in songs)
|
||||
if(select_name == S.song_name)
|
||||
selection = S
|
||||
break
|
||||
updateUsrDialog()
|
||||
if("horn")
|
||||
deejay('sound/items/AirHorn2.ogg')
|
||||
if("alert")
|
||||
deejay('sound/misc/notice1.ogg')
|
||||
if("siren")
|
||||
deejay('sound/machines/engine_alert1.ogg')
|
||||
if("honk")
|
||||
deejay('sound/items/bikehorn.ogg')
|
||||
if("pump")
|
||||
deejay('sound/weapons/shotgunpump.ogg')
|
||||
if("pop")
|
||||
deejay('sound/weapons/Gunshot3.ogg')
|
||||
if("saber")
|
||||
deejay('sound/weapons/saberon.ogg')
|
||||
if("harm")
|
||||
deejay('sound/AI/harmalarm.ogg')
|
||||
|
||||
/obj/machinery/disco/proc/deejay(var/S)
|
||||
if (QDELETED(src) || !active || charge < 5)
|
||||
to_chat(usr, "<span class='warning'>The device is not able to play more DJ sounds at this time.</span>")
|
||||
return
|
||||
charge -= 5
|
||||
playsound(src, S,300,1)
|
||||
|
||||
/obj/machinery/disco/proc/check_GBP()
|
||||
available |= "Engineering's Basic Beat"
|
||||
available |= "Engineering's Domination Dance"
|
||||
available |= "Engineering's Superiority Shimmy"
|
||||
available |= "Engineering's Ultimate High-Energy Hustle"
|
||||
|
||||
|
||||
/obj/machinery/disco/proc/dance_setup()
|
||||
stop = world.time + selection.song_length
|
||||
var/turf/cen = get_turf(src)
|
||||
FOR_DVIEW(var/turf/t, 3, get_turf(src),INVISIBILITY_LIGHTING)
|
||||
if(t.x == cen.x && t.y > cen.y)
|
||||
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
|
||||
L.light_color = "red"
|
||||
L.light_power = 30-(get_dist(src,L)*8)
|
||||
L.range = 1+get_dist(src, L)
|
||||
spotlights+=L
|
||||
continue
|
||||
if(t.x == cen.x && t.y < cen.y)
|
||||
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
|
||||
L.light_color = "purple"
|
||||
L.light_power = 30-(get_dist(src,L)*8)
|
||||
L.range = 1+get_dist(src, L)
|
||||
spotlights+=L
|
||||
continue
|
||||
if(t.x > cen.x && t.y == cen.y)
|
||||
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
|
||||
L.light_color = "#ffff00"
|
||||
L.light_power = 30-(get_dist(src,L)*8)
|
||||
L.range = 1+get_dist(src, L)
|
||||
spotlights+=L
|
||||
continue
|
||||
if(t.x < cen.x && t.y == cen.y)
|
||||
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
|
||||
L.light_color = "green"
|
||||
L.light_power = 30-(get_dist(src,L)*8)
|
||||
L.range = 1+get_dist(src, L)
|
||||
spotlights+=L
|
||||
continue
|
||||
if((t.x+1 == cen.x && t.y+1 == cen.y) || (t.x+2==cen.x && t.y+2 == cen.y))
|
||||
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
|
||||
L.light_color = "sw"
|
||||
L.light_power = 30-(get_dist(src,L)*8)
|
||||
L.range = 1.4+get_dist(src, L)
|
||||
spotlights+=L
|
||||
continue
|
||||
if((t.x-1 == cen.x && t.y-1 == cen.y) || (t.x-2==cen.x && t.y-2 == cen.y))
|
||||
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
|
||||
L.light_color = "ne"
|
||||
L.light_power = 30-(get_dist(src,L)*8)
|
||||
L.range = 1.4+get_dist(src, L)
|
||||
spotlights+=L
|
||||
continue
|
||||
if((t.x-1 == cen.x && t.y+1 == cen.y) || (t.x-2==cen.x && t.y+2 == cen.y))
|
||||
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
|
||||
L.light_color = "se"
|
||||
L.light_power = 30-(get_dist(src,L)*8)
|
||||
L.range = 1.4+get_dist(src, L)
|
||||
spotlights+=L
|
||||
continue
|
||||
if((t.x+1 == cen.x && t.y-1 == cen.y) || (t.x+2==cen.x && t.y-2 == cen.y))
|
||||
var/obj/item/device/flashlight/spotlight/L = new /obj/item/device/flashlight/spotlight(t)
|
||||
L.light_color = "nw"
|
||||
L.light_power = 30-(get_dist(src,L)*8)
|
||||
L.range = 1.4+get_dist(src, L)
|
||||
spotlights+=L
|
||||
continue
|
||||
continue
|
||||
|
||||
/obj/machinery/disco/proc/hierofunk()
|
||||
for(var/i in 1 to 10)
|
||||
spawn_atom_to_turf(/obj/effect/overlay/temp/hierophant/telegraph/edge, src, 1, FALSE)
|
||||
sleep(5)
|
||||
|
||||
/obj/machinery/disco/proc/lights_spin()
|
||||
for(var/i in 1 to 25)
|
||||
if(QDELETED(src) || !active)
|
||||
return
|
||||
var/obj/effect/overlay/sparkles/S = new /obj/effect/overlay/sparkles(src)
|
||||
S.alpha = 0
|
||||
sparkles += S
|
||||
switch(i)
|
||||
if(1 to 8)
|
||||
S.orbit(src, 30, TRUE, 60, 36, TRUE, FALSE)
|
||||
if(9 to 16)
|
||||
S.orbit(src, 62, TRUE, 60, 36, TRUE, FALSE)
|
||||
if(17 to 24)
|
||||
S.orbit(src, 95, TRUE, 60, 36, TRUE, FALSE)
|
||||
if(25)
|
||||
S.pixel_y = 7
|
||||
S.forceMove(get_turf(src))
|
||||
sleep(7)
|
||||
if(selection.song_name == "Engineering's Ultimate High-Energy Hustle")
|
||||
sleep(280)
|
||||
for(var/obj/reveal in sparkles)
|
||||
reveal.alpha = 255
|
||||
while(active)
|
||||
for(var/obj/item/device/flashlight/spotlight/glow in spotlights) // The multiples reflects custom adjustments to each colors after dozens of tests
|
||||
if(QDELETED(src) || !active || QDELETED(glow))
|
||||
return
|
||||
if(glow.light_color == "red")
|
||||
glow.light_color = "nw"
|
||||
glow.light_power = glow.light_power * 1.48
|
||||
glow.light_range = 0
|
||||
glow.update_light()
|
||||
continue
|
||||
if(glow.light_color == "nw")
|
||||
glow.light_color = "green"
|
||||
glow.light_range = glow.range * 1.1
|
||||
glow.light_power = glow.light_power * 2 // Any changes to power must come in pairs to neutralize it for other colors
|
||||
glow.update_light()
|
||||
continue
|
||||
if(glow.light_color == "green")
|
||||
glow.light_color = "sw"
|
||||
glow.light_power = glow.light_power * 0.5
|
||||
glow.light_range = 0
|
||||
glow.update_light()
|
||||
continue
|
||||
if(glow.light_color == "sw")
|
||||
glow.light_color = "purple"
|
||||
glow.light_power = glow.light_power * 2.27
|
||||
glow.light_range = glow.range * 1.15
|
||||
glow.update_light()
|
||||
continue
|
||||
if(glow.light_color == "purple")
|
||||
glow.light_color = "se"
|
||||
glow.light_power = glow.light_power * 0.44
|
||||
glow.light_range = 0
|
||||
glow.update_light()
|
||||
continue
|
||||
if(glow.light_color == "se")
|
||||
glow.light_color = "#ffff00"
|
||||
glow.light_range = glow.range * 0.9
|
||||
glow.update_light()
|
||||
continue
|
||||
if(glow.light_color == "#ffff00")
|
||||
glow.light_color = "ne"
|
||||
glow.light_range = 0
|
||||
glow.update_light()
|
||||
continue
|
||||
if(glow.light_color == "ne")
|
||||
glow.light_color = "red"
|
||||
glow.light_power = glow.light_power * 0.68
|
||||
glow.light_range = glow.range * 0.85
|
||||
glow.update_light()
|
||||
continue
|
||||
if(prob(2)) // Unique effects for the dance floor that show up randomly to mix things up
|
||||
INVOKE_ASYNC(src, .proc/hierofunk)
|
||||
sleep(selection.song_beat)
|
||||
|
||||
|
||||
/obj/machinery/disco/proc/dance(var/mob/living/carbon/M) //Show your moves
|
||||
|
||||
switch(rand(0,9))
|
||||
if(0 to 1)
|
||||
dance2(M)
|
||||
if(2 to 3)
|
||||
dance3(M)
|
||||
if(4 to 6)
|
||||
dance4(M)
|
||||
if(7 to 9)
|
||||
dance5(M)
|
||||
|
||||
/obj/machinery/disco/proc/dance2(var/mob/living/carbon/M)
|
||||
set waitfor = 0
|
||||
for(var/i = 1, i < 10, i++)
|
||||
M.SpinAnimation(15,1)
|
||||
M.setDir(pick(GLOB.cardinal))
|
||||
sleep(8)
|
||||
|
||||
/obj/machinery/disco/proc/dance3(var/mob/living/carbon/M)
|
||||
var/matrix/initial_matrix = matrix(M.transform)
|
||||
for(var/i in 1 to 6)
|
||||
if (!M)
|
||||
return
|
||||
M.SpinAnimation(7,1)
|
||||
M.setDir(pick(GLOB.cardinal))
|
||||
for (var/x in 1 to 12)
|
||||
sleep(1)
|
||||
if (!M)
|
||||
return
|
||||
if (i<5)
|
||||
initial_matrix = matrix(M.transform)
|
||||
initial_matrix.Translate(0,1)
|
||||
animate(M, transform = initial_matrix, time = 1, loop = 0)
|
||||
if (i>4)
|
||||
initial_matrix = matrix(M.transform)
|
||||
initial_matrix.Translate(0,-2)
|
||||
animate(M, transform = initial_matrix, time = 1, loop = 0)
|
||||
M.setDir(turn(M.dir, 90))
|
||||
switch (M.dir)
|
||||
if (NORTH)
|
||||
initial_matrix = matrix(M.transform)
|
||||
initial_matrix.Translate(0,3)
|
||||
animate(M, transform = initial_matrix, time = 1, loop = 0)
|
||||
if (SOUTH)
|
||||
initial_matrix = matrix(M.transform)
|
||||
initial_matrix.Translate(0,-3)
|
||||
animate(M, transform = initial_matrix, time = 1, loop = 0)
|
||||
if (EAST)
|
||||
initial_matrix = matrix(M.transform)
|
||||
initial_matrix.Translate(3,0)
|
||||
animate(M, transform = initial_matrix, time = 1, loop = 0)
|
||||
if (WEST)
|
||||
initial_matrix = matrix(M.transform)
|
||||
initial_matrix.Translate(-3,0)
|
||||
animate(M, transform = initial_matrix, time = 1, loop = 0)
|
||||
sleep(10)
|
||||
animate(M, transform = null, time = 1, loop = 0)
|
||||
|
||||
|
||||
/obj/machinery/disco/proc/dance4(var/mob/living/carbon/M)
|
||||
var/speed = rand(1,3)
|
||||
set waitfor = 0
|
||||
var/time = 30
|
||||
while(time)
|
||||
sleep(speed)
|
||||
for(var/i in 1 to speed)
|
||||
M.setDir(pick(GLOB.cardinal))
|
||||
M.lay_down(TRUE)
|
||||
time--
|
||||
|
||||
/obj/machinery/disco/proc/dance5(var/mob/living/carbon/M)
|
||||
INVOKE_ASYNC(M, .proc/dance5helper)
|
||||
var/matrix/initial_matrix = matrix(M.transform)
|
||||
for (var/i in 1 to 60)
|
||||
if (!M)
|
||||
return
|
||||
if (i<31)
|
||||
initial_matrix = matrix(M.transform)
|
||||
initial_matrix.Translate(0,1)
|
||||
animate(M, transform = initial_matrix, time = 1, loop = 0)
|
||||
if (i>30)
|
||||
initial_matrix = matrix(M.transform)
|
||||
initial_matrix.Translate(0,-1)
|
||||
animate(M, transform = initial_matrix, time = 1, loop = 0)
|
||||
M.setDir(turn(M.dir, 90))
|
||||
switch (M.dir)
|
||||
if (NORTH)
|
||||
initial_matrix = matrix(M.transform)
|
||||
initial_matrix.Translate(0,3)
|
||||
animate(M, transform = initial_matrix, time = 1, loop = 0)
|
||||
if (SOUTH)
|
||||
initial_matrix = matrix(M.transform)
|
||||
initial_matrix.Translate(0,-3)
|
||||
animate(M, transform = initial_matrix, time = 1, loop = 0)
|
||||
if (EAST)
|
||||
initial_matrix = matrix(M.transform)
|
||||
initial_matrix.Translate(3,0)
|
||||
animate(M, transform = initial_matrix, time = 1, loop = 0)
|
||||
if (WEST)
|
||||
initial_matrix = matrix(M.transform)
|
||||
initial_matrix.Translate(-3,0)
|
||||
animate(M, transform = initial_matrix, time = 1, loop = 0)
|
||||
sleep (1)
|
||||
animate(M, transform = null, time = 1, loop = 0)
|
||||
|
||||
/obj/machinery/disco/proc/dance5helper(var/mob/living/carbon/M)
|
||||
if (M)
|
||||
animate(M, transform = matrix(180, MATRIX_ROTATE), time = 1, loop = 0)
|
||||
sleep (70)
|
||||
if (M)
|
||||
animate(M, transform = null, time = 1, loop = 0)
|
||||
|
||||
/mob/living/carbon/proc/dancey() // Dance5 except independent of the machine if admins want to meme it up
|
||||
INVOKE_ASYNC(src, .proc/danceyhelper)
|
||||
var/matrix/initial_matrix = matrix(transform)
|
||||
for (var/i in 1 to 60)
|
||||
if (!src)
|
||||
return
|
||||
if (i<31)
|
||||
initial_matrix = matrix(transform)
|
||||
initial_matrix.Translate(0,1)
|
||||
transform = initial_matrix
|
||||
animate(src, transform, time = 1, loop = 0)
|
||||
if (i>30)
|
||||
initial_matrix = matrix(transform)
|
||||
initial_matrix.Translate(0,-1)
|
||||
transform = initial_matrix
|
||||
animate(src, transform, time = 1, loop = 0)
|
||||
setDir(turn(src.dir, 90))
|
||||
switch (dir)
|
||||
if (NORTH)
|
||||
initial_matrix = matrix(transform)
|
||||
initial_matrix.Translate(0,3)
|
||||
animate(src, transform, time = 1, loop = 0)
|
||||
if (SOUTH)
|
||||
initial_matrix = matrix(transform)
|
||||
initial_matrix.Translate(0,-3)
|
||||
animate(src, transform, time = 1, loop = 0)
|
||||
if (EAST)
|
||||
initial_matrix = matrix(transform)
|
||||
initial_matrix.Translate(3,0)
|
||||
animate(src, transform, time = 1, loop = 0)
|
||||
if (WEST)
|
||||
initial_matrix = matrix(transform)
|
||||
initial_matrix.Translate(-3,0)
|
||||
animate(src, transform, time = 1, loop = 0)
|
||||
sleep (1)
|
||||
animate(src, transform = null, time = 1, loop = 0)
|
||||
|
||||
/mob/living/carbon/proc/danceyhelper()
|
||||
if (src)
|
||||
animate(src, transform = matrix(180, MATRIX_ROTATE), time = 1, loop = 0)
|
||||
sleep (70)
|
||||
if (src)
|
||||
animate(src, transform = null, time = 1, loop = 0)
|
||||
|
||||
|
||||
/obj/machinery/disco/proc/dance_over()
|
||||
for(var/obj/item/device/flashlight/spotlight/SL in spotlights)
|
||||
qdel(SL)
|
||||
spotlights.Cut()
|
||||
for(var/obj/effect/overlay/sparkles/SP in sparkles)
|
||||
qdel(SP)
|
||||
sparkles.Cut()
|
||||
rangers.Cut()
|
||||
for(var/mob/living/L in listeners)
|
||||
if(!L || !L.client)
|
||||
continue
|
||||
L.stop_sound_channel(CHANNEL_JUKEBOX)
|
||||
listeners.Cut()
|
||||
|
||||
|
||||
/obj/machinery/disco/process()
|
||||
if(charge<35)
|
||||
charge += 1
|
||||
if(world.time < stop && active)
|
||||
rangers = list()
|
||||
for(var/mob/living/M in range(9,src))
|
||||
rangers += M
|
||||
if(!(listeners[M]))
|
||||
M.playsound_local(get_turf(M), selection.song_path, 100, channel = CHANNEL_JUKEBOX)
|
||||
listeners[M] = TRUE
|
||||
if(prob(5+(allowed(M)*4)))
|
||||
dance(M)
|
||||
for(var/mob/living/L in listeners)
|
||||
if(!(L in rangers))
|
||||
listeners -= L
|
||||
if(!L || !L.client)
|
||||
continue
|
||||
L.stop_sound_channel(CHANNEL_JUKEBOX)
|
||||
else if(active)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
dance_over()
|
||||
playsound(src,'sound/machines/terminal_off.ogg',50,1)
|
||||
active = FALSE
|
||||
icon_state = "disco0"
|
||||
@@ -339,9 +339,7 @@
|
||||
return FALSE //Already shocked someone recently?
|
||||
if(!prob(prb))
|
||||
return FALSE //you lucked out, no shock for you
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start() //sparks always.
|
||||
do_sparks(5, TRUE, src)
|
||||
var/tmp/check_range = TRUE
|
||||
if(electrocute_mob(user, get_area(src), src, 1, check_range))
|
||||
hasShocked = TRUE
|
||||
@@ -1542,13 +1540,13 @@
|
||||
ae.loc = src.loc
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/door/airlock/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
||||
/obj/machinery/door/airlock/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||
switch(the_rcd.mode)
|
||||
if(RCD_DECONSTRUCT)
|
||||
return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 32)
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/door/airlock/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
||||
/obj/machinery/door/airlock/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||
switch(passed_mode)
|
||||
if(RCD_DECONSTRUCT)
|
||||
to_chat(user, "<span class='notice'>You deconstruct the airlock.</span>")
|
||||
|
||||
@@ -212,6 +212,11 @@
|
||||
if(..())
|
||||
return
|
||||
. = TRUE
|
||||
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
return FALSE
|
||||
|
||||
switch(action)
|
||||
if("time")
|
||||
var/value = text2num(params["adjust"])
|
||||
|
||||
@@ -97,7 +97,7 @@ Possible to do for anyone motivated enough:
|
||||
/obj/machinery/holopad/interact(mob/living/carbon/human/user) //Carn: Hologram requests.
|
||||
if(!istype(user))
|
||||
return
|
||||
if(user.stat || stat & (NOPOWER|BROKEN))
|
||||
if(user.stat || !is_operational())
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
@@ -112,7 +112,7 @@ Possible to do for anyone motivated enough:
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/holopad/Topic(href, href_list)
|
||||
if(..())
|
||||
if(..() || !is_operational())
|
||||
return
|
||||
if (href_list["AIrequest"])
|
||||
if(last_request + 200 < world.time)
|
||||
|
||||
@@ -127,7 +127,7 @@ Class Procs:
|
||||
/obj/machinery/Initialize()
|
||||
if (!armor)
|
||||
armor = list(melee = 25, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 70)
|
||||
..()
|
||||
. = ..()
|
||||
GLOB.machines += src
|
||||
if(!speed_process)
|
||||
START_PROCESSING(SSmachines, src)
|
||||
|
||||
@@ -528,7 +528,7 @@
|
||||
if(icon_vend) //Show the vending animation if needed
|
||||
flick(icon_vend,src)
|
||||
new R.product_path(get_turf(src))
|
||||
feedback_add_details("vending_machine_usage","[R.product_path]|[src.type]")
|
||||
feedback_add_details("vending_machine_usage","[src.type]|[R.product_path]")
|
||||
vend_ready = 1
|
||||
return
|
||||
|
||||
@@ -1052,7 +1052,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
|
||||
icon_state = "engivend"
|
||||
icon_deny = "engivend-deny"
|
||||
req_access_txt = "11" //Engineering Equipment access
|
||||
products = list(/obj/item/clothing/glasses/meson/engine = 2,/obj/item/device/multitool = 4,/obj/item/weapon/electronics/airlock = 10,/obj/item/weapon/electronics/apc = 10,/obj/item/weapon/electronics/airalarm = 10,/obj/item/weapon/stock_parts/cell/high = 10, /obj/item/weapon/rcd/loaded = 3, /obj/item/device/geiger_counter = 5)
|
||||
products = list(/obj/item/clothing/glasses/meson/engine = 2,/obj/item/device/multitool = 4,/obj/item/weapon/electronics/airlock = 10,/obj/item/weapon/electronics/apc = 10,/obj/item/weapon/electronics/airalarm = 10,/obj/item/weapon/stock_parts/cell/high = 10, /obj/item/weapon/construction/rcd/loaded = 3, /obj/item/device/geiger_counter = 5)
|
||||
contraband = list(/obj/item/weapon/stock_parts/cell/potato = 3)
|
||||
premium = list(/obj/item/weapon/storage/belt/utility = 3)
|
||||
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50)
|
||||
|
||||
@@ -50,4 +50,4 @@
|
||||
|
||||
to_chat(user, "You have a very bad feeling about this.")
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
@@ -119,8 +119,8 @@
|
||||
hud_possible = list (DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_TRACK_HUD)
|
||||
|
||||
|
||||
/obj/mecha/New()
|
||||
..()
|
||||
/obj/mecha/Initialize()
|
||||
. = ..()
|
||||
events = new
|
||||
icon_state += "-open"
|
||||
add_radio()
|
||||
|
||||
@@ -23,7 +23,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
|
||||
/datum/effect_system
|
||||
var/number = 3
|
||||
var/cardinals = 0
|
||||
var/cardinals = FALSE
|
||||
var/turf/location
|
||||
var/atom/holder
|
||||
var/effect_type
|
||||
@@ -34,7 +34,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
location = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/proc/set_up(n = 3, c = 0, loca)
|
||||
/datum/effect_system/proc/set_up(n = 3, c = FALSE, loca)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
|
||||
@@ -5,6 +5,17 @@
|
||||
// will always spawn at the items location.
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/proc/do_sparks(n, c, source)
|
||||
// n - number of sparks
|
||||
// c - cardinals, bool, do the sparks only move in cardinal directions?
|
||||
// source - source of the sparks.
|
||||
|
||||
var/datum/effect_system/spark_spread/sparks = new
|
||||
sparks.set_up(n, c, source)
|
||||
sparks.start()
|
||||
qdel(sparks)
|
||||
|
||||
|
||||
/obj/effect/particle_effect/sparks
|
||||
name = "sparks"
|
||||
icon_state = "sparks"
|
||||
|
||||
@@ -210,6 +210,11 @@
|
||||
icon_state = "smoke"
|
||||
duration = 50
|
||||
|
||||
/obj/effect/overlay/temp/fire
|
||||
icon = 'icons/effects/fire.dmi'
|
||||
icon_state = "3"
|
||||
duration = 20
|
||||
|
||||
/obj/effect/overlay/temp/cult
|
||||
randomdir = 0
|
||||
duration = 10
|
||||
@@ -608,3 +613,8 @@
|
||||
name = "Coconuts"
|
||||
icon = 'icons/misc/beach.dmi'
|
||||
icon_state = "coconuts"
|
||||
|
||||
/obj/effect/overlay/sparkles
|
||||
name = "sparkles"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "shieldsparkles"
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/effects/fire.dmi', "icon_state" = "fire"))
|
||||
|
||||
GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
// if true, everyone item when created will have its name changed to be
|
||||
// more... RPG-like.
|
||||
|
||||
/obj/item
|
||||
name = "item"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
@@ -99,14 +103,19 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/effects/fire.dmi',
|
||||
// non-clothing items
|
||||
var/datum/dog_fashion/dog_fashion = null
|
||||
|
||||
var/datum/rpg_loot/rpg_loot = null
|
||||
|
||||
/obj/item/Initialize()
|
||||
if (!materials)
|
||||
materials = list()
|
||||
..()
|
||||
. = ..()
|
||||
for(var/path in actions_types)
|
||||
new path(src)
|
||||
actions_types = null
|
||||
|
||||
if(GLOB.rpg_loot_items)
|
||||
rpg_loot = new(src)
|
||||
|
||||
/obj/item/Destroy()
|
||||
flags &= ~DROPDEL //prevent reqdels
|
||||
if(ismob(loc))
|
||||
@@ -114,6 +123,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/effects/fire.dmi',
|
||||
m.temporarilyRemoveItemFromInventory(src, TRUE)
|
||||
for(var/X in actions)
|
||||
qdel(X)
|
||||
QDEL_NULL(rpg_loot)
|
||||
return ..()
|
||||
|
||||
/obj/item/device
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
name = "station charter for [station_name()]"
|
||||
desc = "An official document entrusting the governance of \
|
||||
[station_name()] and surrounding space to Captain [uname]."
|
||||
|
||||
feedback_set_details("station_renames","[station_name()]")
|
||||
if(!unlimited_uses)
|
||||
used = TRUE
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
// Glowsticks, in the uncomfortable range of similar to flares,
|
||||
// but not similar enough to make it worth a refactor
|
||||
/obj/item/device/flashlight/glowstick
|
||||
name = "green glowstick"
|
||||
name = "glowstick"
|
||||
desc = "A military-grade glowstick."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
brightness_on = 4
|
||||
@@ -363,6 +363,11 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
user.visible_message("<span class='notice'>[user] cracks and shakes [src].</span>", "<span class='notice'>You crack and shake [src], turning it on!</span>")
|
||||
activate()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/proc/activate()
|
||||
if(!on)
|
||||
on = TRUE
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/flashlight/glowstick/red
|
||||
@@ -402,6 +407,20 @@
|
||||
color = initial(glowtype.color)
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/flashlight/spotlight //invisible lighting source
|
||||
name = "disco lighting"
|
||||
icon_state = null
|
||||
light_color = null
|
||||
brightness_on = 0
|
||||
light_range = 0
|
||||
light_power = 10
|
||||
alpha = 0
|
||||
layer = 0
|
||||
on = TRUE
|
||||
anchored = TRUE
|
||||
var/range = null
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
/obj/item/device/flashlight/flashdark
|
||||
name = "flashdark"
|
||||
desc = "A strange device manufactured with mysterious elements that somehow emits darkness. Or maybe it just sucks in light? Nobody knows for sure."
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
|
||||
#define GLOW_MODE 3
|
||||
#define LIGHT_MODE 2
|
||||
#define REMOVE_MODE 1
|
||||
|
||||
/*
|
||||
CONTAINS:
|
||||
RCD
|
||||
ARCD
|
||||
*/
|
||||
/obj/item/weapon/rcd
|
||||
name = "rapid-construction-device (RCD)"
|
||||
desc = "A device used to rapidly build and deconstruct walls and floors."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "rcd"
|
||||
|
||||
obj/item/weapon/construction
|
||||
opacity = 0
|
||||
density = 0
|
||||
anchored = 0
|
||||
@@ -25,30 +25,114 @@ RCD
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/matter = 0
|
||||
var/max_matter = 160
|
||||
var/working = 0
|
||||
var/max_matter = 100
|
||||
var/sheetmultiplier = 4 //Controls the amount of matter added for each glass/metal sheet, triple for plasteel
|
||||
var/plasteelmultiplier = 3 //Plasteel is worth 3 times more than glass or metal
|
||||
var/no_ammo_message = "<span class='warning'>The \'Low Ammo\' light on the device blinks yellow.</span>"
|
||||
|
||||
/obj/item/weapon/construction/Initialize()
|
||||
..()
|
||||
desc = "A [src]. It currently holds [matter]/[max_matter] matter-units."
|
||||
spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
|
||||
/obj/item/weapon/construction/Destroy()
|
||||
QDEL_NULL(spark_system)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/construction/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(iscyborg(user))
|
||||
return
|
||||
var/loaded = 0
|
||||
if(istype(W, /obj/item/weapon/rcd_ammo))
|
||||
var/obj/item/weapon/rcd_ammo/R = W
|
||||
if((matter + R.ammoamt) > max_matter)
|
||||
to_chat(user, "<span class='warning'>The [src] can't hold any more matter-units!</span>")
|
||||
return
|
||||
qdel(W)
|
||||
matter += R.ammoamt
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
loaded = 1
|
||||
else if(istype(W, /obj/item/stack/sheet/metal) || istype(W, /obj/item/stack/sheet/glass))
|
||||
loaded = loadwithsheets(W, sheetmultiplier, user)
|
||||
else if(istype(W, /obj/item/stack/sheet/plasteel))
|
||||
loaded = loadwithsheets(W, plasteelmultiplier*sheetmultiplier, user) //Plasteel is worth 3 times more than glass or metal
|
||||
if(loaded)
|
||||
to_chat(user, "<span class='notice'>The [src] now holds [matter]/[max_matter] matter-units.</span>")
|
||||
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/construction/proc/loadwithsheets(obj/item/stack/sheet/S, value, mob/user)
|
||||
var/maxsheets = round((max_matter-matter)/value) //calculate the max number of sheets that will fit in RCD
|
||||
if(maxsheets > 0)
|
||||
var/amount_to_use = min(S.amount, maxsheets)
|
||||
S.use(amount_to_use)
|
||||
matter += value*amount_to_use
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into the [src]. </span>")
|
||||
return 1
|
||||
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the [src]!")
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/construction/proc/activate()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
|
||||
/obj/item/weapon/construction/attack_self(mob/user)
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
if(prob(20))
|
||||
spark_system.start()
|
||||
|
||||
/obj/item/weapon/construction/proc/useResource(amount, mob/user)
|
||||
if(matter < amount)
|
||||
if(user)
|
||||
to_chat(user, no_ammo_message)
|
||||
return 0
|
||||
matter -= amount
|
||||
desc = "A [src]. It currently holds [matter]/[max_matter] matter-units."
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/construction/proc/checkResource(amount, mob/user)
|
||||
. = matter >= amount
|
||||
if(!. && user)
|
||||
to_chat(user, no_ammo_message)
|
||||
return .
|
||||
|
||||
/obj/item/weapon/construction/proc/range_check(atom/A, mob/user)
|
||||
if(!(A in view(7, get_turf(user))))
|
||||
to_chat(user, "<span class='warning'>The \'Out of Range\' light on the [src] blinks red.</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/construction/proc/prox_check(proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/construction/rcd
|
||||
name = "rapid-construction-device (RCD)"
|
||||
desc = "A device used to rapidly build and deconstruct walls and floors."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "rcd"
|
||||
max_matter = 160
|
||||
var/mode = 1
|
||||
var/canRturf = 0
|
||||
var/ranged = FALSE
|
||||
var/airlock_type = /obj/machinery/door/airlock
|
||||
var/window_type = /obj/structure/window/fulltile
|
||||
|
||||
var/advanced_airlock_setting = 1 //Set to 1 if you want more paintjobs available
|
||||
var/sheetmultiplier = 4 //Controls the amount of matter added for each glass/metal sheet, triple for plasteel
|
||||
var/plasteelmultiplier = 3 //Plasteel is worth 3 times more than glass or metal
|
||||
|
||||
var/list/conf_access = null
|
||||
var/use_one_access = 0 //If the airlock should require ALL or only ONE of the listed accesses.
|
||||
|
||||
var/delay_mod = 1
|
||||
|
||||
var/no_ammo_message = "<span class='warning'>The \'Low Ammo\' light on \
|
||||
the RCD blinks yellow.</span>"
|
||||
|
||||
/obj/item/weapon/rcd/suicide_act(mob/user)
|
||||
/obj/item/weapon/construction/rcd/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] sets the RCD to 'Wall' and points it down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide..</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/rcd/verb/toggle_window_type()
|
||||
/obj/item/weapon/construction/rcd/verb/toggle_window_type()
|
||||
set name = "Toggle Window Type"
|
||||
set category = "Object"
|
||||
set src in usr // What does this do?
|
||||
@@ -64,7 +148,7 @@ RCD
|
||||
|
||||
to_chat(usr, "<span class='notice'>You change \the [src]'s window mode to [window_type_name].</span>")
|
||||
|
||||
/obj/item/weapon/rcd/verb/change_airlock_access()
|
||||
/obj/item/weapon/construction/rcd/verb/change_airlock_access()
|
||||
set name = "Change Airlock Access"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
@@ -79,7 +163,6 @@ RCD
|
||||
var/t1 = text("")
|
||||
|
||||
|
||||
|
||||
if(use_one_access)
|
||||
t1 += "Restriction Type: <a href='?src=\ref[src];access=one'>At least one access required</a><br>"
|
||||
else
|
||||
@@ -114,7 +197,7 @@ RCD
|
||||
popup.open()
|
||||
onclose(usr, "airlock")
|
||||
|
||||
/obj/item/weapon/rcd/Topic(href, href_list)
|
||||
/obj/item/weapon/construction/rcd/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
@@ -127,7 +210,7 @@ RCD
|
||||
|
||||
change_airlock_access()
|
||||
|
||||
/obj/item/weapon/rcd/proc/toggle_access(acc)
|
||||
/obj/item/weapon/construction/rcd/proc/toggle_access(acc)
|
||||
if (acc == "all")
|
||||
conf_access = null
|
||||
else if(acc == "one")
|
||||
@@ -145,7 +228,7 @@ RCD
|
||||
if (!conf_access.len)
|
||||
conf_access = null
|
||||
|
||||
/obj/item/weapon/rcd/verb/change_airlock_setting()
|
||||
/obj/item/weapon/construction/rcd/verb/change_airlock_setting()
|
||||
set name = "Change Airlock Setting"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
@@ -207,59 +290,16 @@ RCD
|
||||
airlock_type = /obj/machinery/door/airlock
|
||||
|
||||
|
||||
/obj/item/weapon/rcd/New()
|
||||
/obj/item/weapon/construction/rcd/New()
|
||||
..()
|
||||
desc = "An RCD. It currently holds [matter]/[max_matter] matter-units."
|
||||
src.spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
GLOB.rcd_list += src
|
||||
|
||||
|
||||
/obj/item/weapon/rcd/Destroy()
|
||||
qdel(spark_system)
|
||||
spark_system = null
|
||||
/obj/item/weapon/construction/rcd/Destroy()
|
||||
GLOB.rcd_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(iscyborg(user)) //Make sure cyborgs can't load their RCDs
|
||||
return
|
||||
var/loaded = 0
|
||||
if(istype(W, /obj/item/weapon/rcd_ammo))
|
||||
var/obj/item/weapon/rcd_ammo/R = W
|
||||
if((matter + R.ammoamt) > max_matter)
|
||||
to_chat(user, "<span class='warning'>The RCD can't hold any more matter-units!</span>")
|
||||
return
|
||||
qdel(W)
|
||||
matter += R.ammoamt
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
loaded = 1
|
||||
else if(istype(W, /obj/item/stack/sheet/metal) || istype(W, /obj/item/stack/sheet/glass))
|
||||
loaded = loadwithsheets(W, sheetmultiplier, user)
|
||||
else if(istype(W, /obj/item/stack/sheet/plasteel))
|
||||
loaded = loadwithsheets(W, plasteelmultiplier*sheetmultiplier, user) //Plasteel is worth 3 times more than glass or metal
|
||||
if(loaded)
|
||||
to_chat(user, "<span class='notice'>The RCD now holds [matter]/[max_matter] matter-units.</span>")
|
||||
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/rcd/proc/loadwithsheets(obj/item/stack/sheet/S, value, mob/user)
|
||||
var/maxsheets = round((max_matter-matter)/value) //calculate the max number of sheets that will fit in RCD
|
||||
if(maxsheets > 0)
|
||||
var/amount_to_use = min(S.amount, maxsheets)
|
||||
S.use(amount_to_use)
|
||||
matter += value*amount_to_use
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into the RCD. </span>")
|
||||
return 1
|
||||
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the RCD!")
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rcd/attack_self(mob/user)
|
||||
//Change the mode
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
/obj/item/weapon/construction/rcd/attack_self(mob/user)
|
||||
..()
|
||||
switch(mode)
|
||||
if(1)
|
||||
mode = 2
|
||||
@@ -274,16 +314,14 @@ RCD
|
||||
mode = 1
|
||||
to_chat(user, "<span class='notice'>You change RCD's mode to 'Floor & Walls'.</span>")
|
||||
|
||||
if(prob(20))
|
||||
src.spark_system.start()
|
||||
|
||||
/obj/item/weapon/rcd/proc/activate()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/rcd/afterattack(atom/A, mob/user, proximity)
|
||||
if(!proximity)
|
||||
/obj/item/weapon/construction/rcd/proc/target_check(atom/A, mob/user) // only returns true for stuff the device can actually work with
|
||||
if((isturf(A) && A.density && mode==RCD_DECONSTRUCT) || (isturf(A) && !A.density) || (istype(A, /obj/machinery/door/airlock) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/grille) || (istype(A, /obj/structure/window) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/girder))
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/construction/rcd/afterattack(atom/A, mob/user, proximity)
|
||||
prox_check()
|
||||
var/list/rcd_results = A.rcd_vals(user, src)
|
||||
if(!rcd_results)
|
||||
return FALSE
|
||||
@@ -295,40 +333,26 @@ RCD
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/rcd/proc/useResource(amount, mob/user)
|
||||
if(matter < amount)
|
||||
if(user)
|
||||
to_chat(user, no_ammo_message)
|
||||
return 0
|
||||
matter -= amount
|
||||
desc = "An RCD. It currently holds [matter]/[max_matter] matter-units."
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/rcd/proc/checkResource(amount, mob/user)
|
||||
. = matter >= amount
|
||||
if(!. && user)
|
||||
to_chat(user, no_ammo_message)
|
||||
return .
|
||||
|
||||
/obj/item/weapon/rcd/proc/detonate_pulse()
|
||||
/obj/item/weapon/construction/rcd/proc/detonate_pulse()
|
||||
audible_message("<span class='danger'><b>[src] begins to vibrate and \
|
||||
buzz loudly!</b></span>","<span class='danger'><b>[src] begins \
|
||||
vibrating violently!</b></span>")
|
||||
// 5 seconds to get rid of it
|
||||
addtimer(CALLBACK(src, .proc/detonate_pulse_explode), 50)
|
||||
|
||||
/obj/item/weapon/rcd/proc/detonate_pulse_explode()
|
||||
/obj/item/weapon/construction/rcd/proc/detonate_pulse_explode()
|
||||
explosion(src, 0, 0, 3, 1, flame_range = 1)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/weapon/rcd/borg/New()
|
||||
/obj/item/weapon/construction/rcd/borg/New()
|
||||
..()
|
||||
no_ammo_message = "<span class='warning'>Insufficient charge.</span>"
|
||||
desc = "A device used to rapidly build walls and floors."
|
||||
canRturf = 1
|
||||
|
||||
/obj/item/weapon/rcd/borg/useResource(amount, mob/user)
|
||||
/obj/item/weapon/construction/rcd/borg/useResource(amount, mob/user)
|
||||
if(!iscyborg(user))
|
||||
return 0
|
||||
var/mob/living/silicon/robot/borgy = user
|
||||
@@ -341,7 +365,7 @@ RCD
|
||||
to_chat(user, no_ammo_message)
|
||||
return .
|
||||
|
||||
/obj/item/weapon/rcd/borg/checkResource(amount, mob/user)
|
||||
/obj/item/weapon/construction/rcd/borg/checkResource(amount, mob/user)
|
||||
if(!iscyborg(user))
|
||||
return 0
|
||||
var/mob/living/silicon/robot/borgy = user
|
||||
@@ -354,10 +378,10 @@ RCD
|
||||
to_chat(user, no_ammo_message)
|
||||
return .
|
||||
|
||||
/obj/item/weapon/rcd/loaded
|
||||
/obj/item/weapon/construction/rcd/loaded
|
||||
matter = 160
|
||||
|
||||
/obj/item/weapon/rcd/combat
|
||||
/obj/item/weapon/construction/rcd/combat
|
||||
name = "industrial RCD"
|
||||
max_matter = 500
|
||||
matter = 500
|
||||
@@ -378,7 +402,188 @@ RCD
|
||||
ammoamt = 160
|
||||
|
||||
|
||||
/obj/item/weapon/rcd/admin
|
||||
/obj/item/weapon/construction/rcd/admin
|
||||
name = "admin RCD"
|
||||
max_matter = INFINITY
|
||||
matter = INFINITY
|
||||
|
||||
|
||||
// Ranged RCD
|
||||
|
||||
|
||||
/obj/item/weapon/construction/rcd/arcd
|
||||
name = "advanced rapid-construction-device (ARCD)"
|
||||
desc = "A prototype RCD with ranged capability and extended capacity"
|
||||
max_matter = 300
|
||||
matter = 300
|
||||
delay_mod = 0.6
|
||||
ranged = TRUE
|
||||
icon_state = "arcd"
|
||||
|
||||
/obj/item/weapon/construction/rcd/arcd/afterattack(atom/A, mob/user)
|
||||
range_check(A,user)
|
||||
if(target_check(A,user))
|
||||
user.Beam(A,icon_state="rped_upgrade",time=30)
|
||||
..()
|
||||
|
||||
|
||||
|
||||
// RAPID LIGHTING DEVICE
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/construction/rld
|
||||
name = "rapid-light-device (RLD)"
|
||||
desc = "A device used to rapidly provide lighting sources to an area."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "rld-5"
|
||||
matter = 200
|
||||
max_matter = 200
|
||||
var/mode = LIGHT_MODE
|
||||
actions_types = list(/datum/action/item_action/pick_color)
|
||||
|
||||
var/wallcost = 10
|
||||
var/floorcost = 15
|
||||
var/launchcost = 5
|
||||
var/deconcost = 10
|
||||
|
||||
var/walldelay = 10
|
||||
var/floordelay = 10
|
||||
var/decondelay = 15
|
||||
|
||||
var/color_choice = null
|
||||
|
||||
|
||||
/obj/item/weapon/construction/rld/ui_action_click(mob/user, var/datum/action/A)
|
||||
if(istype(A, /datum/action/item_action/pick_color))
|
||||
color_choice = input(user,"Choose Color") as color
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/construction/rld/update_icon()
|
||||
icon_state = "rld-[round(matter/35)]"
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/construction/rld/attack_self(mob/user)
|
||||
..()
|
||||
switch(mode)
|
||||
if(REMOVE_MODE)
|
||||
mode = LIGHT_MODE
|
||||
to_chat(user, "<span class='notice'>You change RLD's mode to 'Permanent Light Construction'.</span>")
|
||||
if(LIGHT_MODE)
|
||||
mode = GLOW_MODE
|
||||
to_chat(user, "<span class='notice'>You change RLD's mode to 'Light Launcher'.</span>")
|
||||
if(GLOW_MODE)
|
||||
mode = REMOVE_MODE
|
||||
to_chat(user, "<span class='notice'>You change RLD's mode to 'Deconstruct'.</span>")
|
||||
|
||||
|
||||
/obj/item/weapon/construction/rld/proc/checkdupes(var/target)
|
||||
. = list()
|
||||
var/turf/checking = get_turf(target)
|
||||
for(var/obj/machinery/light/dupe in checking)
|
||||
if(istype(dupe, /obj/machinery/light))
|
||||
. |= dupe
|
||||
|
||||
|
||||
/obj/item/weapon/construction/rld/afterattack(atom/A, mob/user)
|
||||
range_check(A,user)
|
||||
var/turf/start = get_turf(src)
|
||||
switch(mode)
|
||||
if(REMOVE_MODE)
|
||||
if(istype(A, /obj/machinery/light/))
|
||||
if(checkResource(deconcost, user))
|
||||
to_chat(user, "<span class='notice'>You start deconstructing [A]...</span>")
|
||||
user.Beam(A,icon_state="nzcrentrs_power",time=15)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, decondelay, target = A))
|
||||
if(!useResource(deconcost, user))
|
||||
return 0
|
||||
activate()
|
||||
qdel(A)
|
||||
return TRUE
|
||||
return FALSE
|
||||
if(LIGHT_MODE)
|
||||
if(iswallturf(A))
|
||||
var/turf/closed/wall/W = A
|
||||
if(checkResource(floorcost, user))
|
||||
to_chat(user, "<span class='notice'>You start building a wall light...</span>")
|
||||
user.Beam(A,icon_state="nzcrentrs_power",time=15)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/effects/light_flicker.ogg', 50, 0)
|
||||
if(do_after(user, floordelay, target = A))
|
||||
if(!istype(W))
|
||||
return FALSE
|
||||
var/list/candidates = list()
|
||||
var/turf/open/winner = null
|
||||
var/winning_dist = null
|
||||
for(var/direction in GLOB.cardinal)
|
||||
var/turf/C = get_step(W, direction)
|
||||
var/list/dupes = checkdupes(C)
|
||||
if(start.CanAtmosPass(C) && !dupes.len)
|
||||
candidates += C
|
||||
if(!candidates.len)
|
||||
to_chat(user, "<span class='warning'>Valid target not found...</span>")
|
||||
playsound(src.loc, 'sound/misc/compiler-failure.ogg', 30, 1)
|
||||
return FALSE
|
||||
for(var/turf/open/O in candidates)
|
||||
if(istype(O))
|
||||
var/x0 = O.x
|
||||
var/y0 = O.y
|
||||
var/contender = cheap_hypotenuse(start.x, start.y, x0, y0)
|
||||
if(!winner)
|
||||
winner = O
|
||||
winning_dist = contender
|
||||
else
|
||||
if(contender < winning_dist) // lower is better
|
||||
winner = O
|
||||
winning_dist = contender
|
||||
activate()
|
||||
if(!useResource(wallcost, user))
|
||||
return FALSE
|
||||
var/light = get_turf(winner)
|
||||
var/align = get_dir(winner, A)
|
||||
var/obj/machinery/light/L = new /obj/machinery/light(light)
|
||||
L.dir = align
|
||||
L.color = color_choice
|
||||
L.light_color = L.color
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
if(isfloorturf(A))
|
||||
var/turf/open/floor/F = A
|
||||
if(checkResource(floorcost, user))
|
||||
to_chat(user, "<span class='notice'>You start building a floor light...</span>")
|
||||
user.Beam(A,icon_state="nzcrentrs_power",time=15)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/effects/light_flicker.ogg', 50, 1)
|
||||
if(do_after(user, floordelay, target = A))
|
||||
if(!istype(F))
|
||||
return 0
|
||||
if(!useResource(floorcost, user))
|
||||
return 0
|
||||
activate()
|
||||
var/destination = get_turf(A)
|
||||
var/obj/machinery/light/floor/FL = new /obj/machinery/light/floor(destination)
|
||||
FL.color = color_choice
|
||||
FL.light_color = FL.color
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
if(GLOW_MODE)
|
||||
if(useResource(launchcost, user))
|
||||
activate()
|
||||
to_chat(user, "<span class='notice'>You fire a glowstick!</span>")
|
||||
var/obj/item/device/flashlight/glowstick/G = new /obj/item/device/flashlight/glowstick(start)
|
||||
G.color = color_choice
|
||||
G.light_color = G.color
|
||||
G.throw_at(A, 9, 3, user)
|
||||
G.on = TRUE
|
||||
G.update_brightness()
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
#undef GLOW_MODE
|
||||
#undef LIGHT_MODE
|
||||
#undef REMOVE_MODE
|
||||
|
||||
@@ -94,6 +94,9 @@
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag)
|
||||
// Make it so the extinguisher doesn't spray yourself when you click your inventory items
|
||||
if (target.loc == user)
|
||||
return
|
||||
//TODO; Add support for reagents in water.
|
||||
if(refilling)
|
||||
refilling = FALSE
|
||||
|
||||
@@ -45,10 +45,7 @@
|
||||
if(do_mob(user, C, 30) && (C.get_num_arms() >= 2 || C.get_arm_ignore()))
|
||||
apply_cuffs(C,user)
|
||||
to_chat(user, "<span class='notice'>You handcuff [C].</span>")
|
||||
if(istype(src, /obj/item/weapon/restraints/handcuffs/cable))
|
||||
feedback_add_details("handcuffs","C")
|
||||
else
|
||||
feedback_add_details("handcuffs","H")
|
||||
feedback_add_details("handcuffs","[type]")
|
||||
|
||||
add_logs(user, C, "handcuffed")
|
||||
else
|
||||
@@ -247,7 +244,7 @@
|
||||
var/armed = 0
|
||||
var/trap_damage = 20
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/New()
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/Initialize()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)][armed]"
|
||||
|
||||
@@ -278,7 +275,7 @@
|
||||
C.legcuffed = src
|
||||
src.loc = C
|
||||
C.update_inv_legcuffed()
|
||||
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
|
||||
feedback_add_details("handcuffs","[type]")
|
||||
else if(isanimal(L))
|
||||
var/mob/living/simple_animal/SA = L
|
||||
if(SA.mob_size > MOB_SIZE_TINY)
|
||||
@@ -307,9 +304,7 @@
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/energy/proc/dissipate()
|
||||
if(!istype(loc, /mob))
|
||||
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
||||
sparks.set_up(1, 1, src)
|
||||
sparks.start()
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/energy/attack_hand(mob/user)
|
||||
@@ -341,7 +336,7 @@
|
||||
C.legcuffed = src
|
||||
src.loc = C
|
||||
C.update_inv_legcuffed()
|
||||
feedback_add_details("handcuffs","B")
|
||||
feedback_add_details("handcuffs","[type]")
|
||||
to_chat(C, "<span class='userdanger'>\The [src] ensnares you!</span>")
|
||||
C.Weaken(weaken)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
/obj/item/weapon/implant/explosive/activate(cause)
|
||||
if(!cause || !imp_in || active)
|
||||
return 0
|
||||
if(cause == "action_button" || !popup)
|
||||
if(cause == "action_button" && !popup)
|
||||
popup = TRUE
|
||||
var/response = alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", "Yes", "No")
|
||||
popup = FALSE
|
||||
|
||||
@@ -106,6 +106,8 @@
|
||||
|
||||
/obj/item/weapon/twohanded/equip_to_best_slot(mob/M)
|
||||
if(..())
|
||||
if(istype(src, /obj/item/weapon/twohanded/required))
|
||||
return // unwield forces twohanded-required items to be dropped.
|
||||
unwield(M)
|
||||
return
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/obj/structure/Initialize()
|
||||
if (!armor)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
|
||||
..()
|
||||
. = ..()
|
||||
if(smooth)
|
||||
queue_smooth(src)
|
||||
queue_smooth_neighbors(src)
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
..()
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/weapon/rcd_ammo(src)
|
||||
new /obj/item/weapon/rcd(src)
|
||||
new /obj/item/weapon/construction/rcd(src)
|
||||
|
||||
/obj/structure/closet/crate/science
|
||||
name = "science crate"
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
/obj/structure/displaycase/captain
|
||||
alert = 1
|
||||
start_showpiece_type = /obj/item/weapon/gun/energy/laser/captain
|
||||
req_access = list(GLOB.access_captain)
|
||||
req_access = list(GLOB.access_cent_specops)
|
||||
|
||||
/obj/structure/displaycase/labcage
|
||||
name = "lab cage"
|
||||
|
||||
@@ -396,7 +396,7 @@
|
||||
new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
||||
/obj/structure/girder/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||
switch(the_rcd.mode)
|
||||
if(RCD_FLOORWALL)
|
||||
return list("mode" = RCD_FLOORWALL, "delay" = 20, "cost" = 8)
|
||||
@@ -404,7 +404,7 @@
|
||||
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 13)
|
||||
return FALSE
|
||||
|
||||
/obj/structure/girder/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
||||
/obj/structure/girder/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||
var/turf/T = get_turf(src)
|
||||
switch(passed_mode)
|
||||
if(RCD_FLOORWALL)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/grille_type = null
|
||||
var/broken_type = /obj/structure/grille/broken
|
||||
|
||||
/obj/structure/grille/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
||||
/obj/structure/grille/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||
switch(the_rcd.mode)
|
||||
if(RCD_DECONSTRUCT)
|
||||
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 5)
|
||||
@@ -26,7 +26,7 @@
|
||||
return list("mode" = RCD_WINDOWGRILLE, "delay" = 40, "cost" = 10)
|
||||
return FALSE
|
||||
|
||||
/obj/structure/grille/rcd_act(mob/user, var/obj/item/weapon/rcd/the_rcd, passed_mode)
|
||||
/obj/structure/grille/rcd_act(mob/user, var/obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||
switch(passed_mode)
|
||||
if(RCD_DECONSTRUCT)
|
||||
to_chat(user, "<span class='notice'>You deconstruct the grille.</span>")
|
||||
|
||||
@@ -188,8 +188,10 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
/obj/structure/bodycontainer/crematorium/proc/cremate(mob/user)
|
||||
if(locked)
|
||||
return //don't let you cremate something twice or w/e
|
||||
// Make sure we don't delete the actual morgue and its tray
|
||||
var/list/conts = GetAllContents() - src - connected
|
||||
|
||||
if(contents.len <= 1)
|
||||
if(conts.len <= 1)
|
||||
audible_message("<span class='italics'>You hear a hollow crackle.</span>")
|
||||
return
|
||||
|
||||
@@ -199,7 +201,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
locked = 1
|
||||
update_icon()
|
||||
|
||||
for(var/mob/living/M in contents)
|
||||
for(var/mob/living/M in conts)
|
||||
if (M.stat != DEAD)
|
||||
M.emote("scream")
|
||||
if(user)
|
||||
@@ -212,7 +214,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
M.ghostize()
|
||||
qdel(M)
|
||||
|
||||
for(var/obj/O in contents) //obj instead of obj/item so that bodybags and ashes get destroyed. We dont want tons and tons of ash piling up
|
||||
for(var/obj/O in conts) //obj instead of obj/item so that bodybags and ashes get destroyed. We dont want tons and tons of ash piling up
|
||||
if(O != connected) //Creamtorium does not burn hot enough to destroy the tray
|
||||
qdel(O)
|
||||
|
||||
|
||||
@@ -57,13 +57,13 @@
|
||||
if(rods)
|
||||
debris += new /obj/item/stack/rods(src, rods)
|
||||
|
||||
/obj/structure/window/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
||||
/obj/structure/window/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||
switch(the_rcd.mode)
|
||||
if(RCD_DECONSTRUCT)
|
||||
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 5)
|
||||
return FALSE
|
||||
|
||||
/obj/structure/window/rcd_act(mob/user, var/obj/item/weapon/rcd/the_rcd)
|
||||
/obj/structure/window/rcd_act(mob/user, var/obj/item/weapon/construction/rcd/the_rcd)
|
||||
switch(the_rcd.mode)
|
||||
if(RCD_DECONSTRUCT)
|
||||
to_chat(user, "<span class='notice'>You deconstruct the window.</span>")
|
||||
|
||||
@@ -134,18 +134,6 @@
|
||||
soundin = pick('sound/machines/terminal_button01.ogg', 'sound/machines/terminal_button02.ogg', 'sound/machines/terminal_button03.ogg', \
|
||||
'sound/machines/terminal_button04.ogg', 'sound/machines/terminal_button05.ogg', 'sound/machines/terminal_button06.ogg', \
|
||||
'sound/machines/terminal_button07.ogg', 'sound/machines/terminal_button08.ogg')
|
||||
//Vore sounds
|
||||
if ("digestion_sounds")
|
||||
soundin = pick('sound/vore/digest1.ogg', 'sound/vore/digest2.ogg', 'sound/vore/digest3.ogg', \
|
||||
'sound/vore/digest4.ogg', 'sound/vore/digest5.ogg', 'sound/vore/digest6.ogg', \
|
||||
'sound/vore/digest7.ogg', 'sound/vore/digest8.ogg', 'sound/vore/digest9.ogg', \
|
||||
'sound/vore/digest10.ogg','sound/vore/digest11.ogg', 'sound/vore/digest12.ogg')
|
||||
if ("death_gurgles")
|
||||
soundin = pick('sound/vore/death1.ogg', 'sound/vore/death2.ogg', 'sound/vore/death3.ogg', \
|
||||
'sound/vore/death4.ogg', 'sound/vore/death5.ogg', 'sound/vore/death6.ogg', \
|
||||
'sound/vore/death7.ogg', 'sound/vore/death8.ogg', 'sound/vore/death9.ogg', 'sound/vore/death10.ogg')
|
||||
if ("struggle_sounds")
|
||||
soundin = pick('sound/vore/squish1.ogg', 'sound/vore/squish2.ogg', 'sound/vore/squish3.ogg', 'sound/vore/squish4.ogg')
|
||||
return soundin
|
||||
|
||||
/proc/playsound_global(file, repeat=0, wait, channel, volume)
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
/turf/open/floor/acid_melt()
|
||||
ChangeTurf(baseturf)
|
||||
|
||||
/turf/open/floor/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
||||
/turf/open/floor/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||
switch(the_rcd.mode)
|
||||
if(RCD_FLOORWALL)
|
||||
return list("mode" = RCD_FLOORWALL, "delay" = 20, "cost" = 16)
|
||||
@@ -212,7 +212,7 @@
|
||||
return list("mode" = RCD_WINDOWGRILLE, "delay" = 40, "cost" = 4)
|
||||
return FALSE
|
||||
|
||||
/turf/open/floor/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
||||
/turf/open/floor/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||
switch(passed_mode)
|
||||
if(RCD_FLOORWALL)
|
||||
to_chat(user, "<span class='notice'>You build a wall.</span>")
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
|
||||
|
||||
/turf/closed/mineral/attackby(obj/item/weapon/pickaxe/P, mob/user, params)
|
||||
|
||||
if (!user.IsAdvancedToolUser())
|
||||
to_chat(usr, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
@@ -67,18 +66,16 @@
|
||||
feedback_add_details("pick_used_mining","[P.type]")
|
||||
else
|
||||
return attack_hand(user)
|
||||
return
|
||||
|
||||
/turf/closed/mineral/proc/gets_drilled()
|
||||
if (mineralType && (src.mineralAmt > 0) && (src.mineralAmt < 11))
|
||||
var/i
|
||||
for (i=0;i<mineralAmt;i++)
|
||||
for(i in 1 to mineralAmt)
|
||||
new mineralType(src)
|
||||
feedback_add_details("ore_mined","[mineralType]|[mineralAmt]")
|
||||
feedback_add_details("ore_mined",mineralType)
|
||||
ChangeTurf(turf_type, defer_change)
|
||||
addtimer(CALLBACK(src, .proc/AfterChange), 1, TIMER_UNIQUE)
|
||||
playsound(src, 'sound/effects/break_stone.ogg', 50, 1) //beautiful destruction
|
||||
return
|
||||
|
||||
/turf/closed/mineral/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash >= 2)
|
||||
|
||||
@@ -251,12 +251,12 @@
|
||||
if(prob(30))
|
||||
dismantle_wall()
|
||||
|
||||
/turf/closed/wall/r_wall/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
||||
/turf/closed/wall/r_wall/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||
if(!the_rcd.canRturf)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/turf/closed/wall/r_wall/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
||||
/turf/closed/wall/r_wall/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||
if(!the_rcd.canRturf)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -258,13 +258,13 @@
|
||||
/turf/closed/wall/acid_melt()
|
||||
dismantle_wall(1)
|
||||
|
||||
/turf/closed/wall/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
||||
/turf/closed/wall/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||
switch(the_rcd.mode)
|
||||
if(RCD_DECONSTRUCT)
|
||||
return list("mode" = RCD_DECONSTRUCT, "delay" = 40, "cost" = 26)
|
||||
return FALSE
|
||||
|
||||
/turf/closed/wall/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
||||
/turf/closed/wall/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||
switch(passed_mode)
|
||||
if(RCD_DECONSTRUCT)
|
||||
to_chat(user, "<span class='notice'>You deconstruct the wall.</span>")
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/destination_x
|
||||
var/destination_y
|
||||
|
||||
var/global/datum/gas_mixture/space/space_gas = new
|
||||
var/global/datum/gas_mixture/immutable/space/space_gas = new
|
||||
plane = PLANE_SPACE
|
||||
light_power = 0.25
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
|
||||
@@ -159,18 +159,29 @@
|
||||
return 0
|
||||
|
||||
|
||||
/turf/open/space/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
||||
/turf/open/space/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||
if(!CanBuildHere())
|
||||
return FALSE
|
||||
|
||||
switch(the_rcd.mode)
|
||||
if(RCD_FLOORWALL)
|
||||
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 2)
|
||||
return FALSE
|
||||
|
||||
/turf/open/space/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
||||
/turf/open/space/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||
switch(passed_mode)
|
||||
if(RCD_FLOORWALL)
|
||||
to_chat(user, "<span class='notice'>You build a floor.</span>")
|
||||
ChangeTurf(/turf/open/floor/plating)
|
||||
return TRUE
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/turf/open/space/ReplaceWithLattice()
|
||||
var/dest_x = destination_x
|
||||
var/dest_y = destination_y
|
||||
var/dest_z = destination_z
|
||||
..()
|
||||
destination_x = dest_x
|
||||
destination_y = dest_y
|
||||
destination_z = dest_z
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
message["message_sender"] = source
|
||||
message["message"] = msg
|
||||
message["source"] = "([config.cross_name])"
|
||||
message["key"] = GLOB.comms_key
|
||||
message["key"] = global.comms_key
|
||||
message["crossmessage"] = type
|
||||
|
||||
world.Export("[config.cross_address]?[list2params(message)]")
|
||||
|
||||
@@ -755,11 +755,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
GLOB.medals_enabled = !GLOB.medals_enabled
|
||||
global.medals_enabled = !global.medals_enabled
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] [GLOB.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.</span>")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] [global.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.</span>")
|
||||
feedback_add_details("admin_verb","Toggle Medal Disable") // If...
|
||||
log_admin("[key_name(src)] [GLOB.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.")
|
||||
log_admin("[key_name(src)] [global.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.")
|
||||
|
||||
/client/proc/view_runtimes()
|
||||
set category = "Debug"
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
var/agentcount = 0
|
||||
|
||||
for(var/i = 0, i<numagents,i++)
|
||||
shuffle(candidates) //More shuffles means more randoms
|
||||
shuffle_inplace(candidates) //More shuffles means more randoms
|
||||
for(var/mob/j in candidates)
|
||||
if(!j || !j.client)
|
||||
candidates.Remove(j)
|
||||
|
||||
@@ -322,10 +322,10 @@
|
||||
|
||||
for(var/t in turf_list)
|
||||
var/turf/open/T = t
|
||||
if (space_is_all_consuming && !space_in_group && istype(T.air, /datum/gas_mixture/space))
|
||||
if (space_is_all_consuming && !space_in_group && istype(T.air, /datum/gas_mixture/immutable/space))
|
||||
space_in_group = 1
|
||||
qdel(A)
|
||||
A = new/datum/gas_mixture/space()
|
||||
A = new/datum/gas_mixture/immutable/space()
|
||||
A.merge(T.air)
|
||||
|
||||
for(var/id in A_gases)
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
//"immutable" gas mixture used for immutable calculations
|
||||
//it can be changed, but any changes will ultimately be undone before they can have any effect
|
||||
|
||||
/datum/gas_mixture/immutable
|
||||
var/initial_temperature
|
||||
|
||||
/datum/gas_mixture/immutable/proc/reset_gas_mix()
|
||||
temperature = initial_temperature
|
||||
temperature_archived = initial_temperature
|
||||
|
||||
/datum/gas_mixture/immutable/New()
|
||||
..()
|
||||
reset_gas_mix()
|
||||
|
||||
/datum/gas_mixture/immutable/garbage_collect()
|
||||
reset_gas_mix()
|
||||
|
||||
/datum/gas_mixture/immutable/archive()
|
||||
return 1 //nothing changes, so we do nothing and the archive is successful
|
||||
|
||||
/datum/gas_mixture/immutable/merge()
|
||||
return 0 //we're immutable.
|
||||
|
||||
/datum/gas_mixture/immutable/heat_capacity_archived()
|
||||
return heat_capacity()
|
||||
|
||||
/datum/gas_mixture/immutable/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
|
||||
. = ..(sharer, 0)
|
||||
reset_gas_mix()
|
||||
|
||||
/datum/gas_mixture/immutable/after_share()
|
||||
temperature = initial_temperature
|
||||
reset_gas_mix()
|
||||
|
||||
/datum/gas_mixture/immutable/react()
|
||||
return 0 //we're immutable.
|
||||
|
||||
/datum/gas_mixture/immutable/copy()
|
||||
return new type //we're immutable, so we can just return a new instance.
|
||||
|
||||
/datum/gas_mixture/immutable/copy_from()
|
||||
return 0 //we're immutable.
|
||||
|
||||
/datum/gas_mixture/immutable/copy_from_turf()
|
||||
return 0 //we're immutable.
|
||||
|
||||
/datum/gas_mixture/immutable/parse_gas_string()
|
||||
return 0 //we're immutable.
|
||||
|
||||
/datum/gas_mixture/immutable/temperature_share(datum/gas_mixture/sharer, conduction_coefficient, sharer_temperature, sharer_heat_capacity)
|
||||
. = ..()
|
||||
temperature = initial_temperature
|
||||
|
||||
//used by space tiles
|
||||
/datum/gas_mixture/immutable/space
|
||||
initial_temperature = TCMB
|
||||
|
||||
/datum/gas_mixture/immutable/space/garbage_collect()
|
||||
gases.Cut() //clever way of ensuring we always are empty.
|
||||
|
||||
/datum/gas_mixture/immutable/space/heat_capacity()
|
||||
return 7000
|
||||
|
||||
/datum/gas_mixture/immutable/space/remove()
|
||||
return copy() //we're always empty, so we can just return a copy.
|
||||
|
||||
/datum/gas_mixture/immutable/space/remove_ratio()
|
||||
return copy() //we're always empty, so we can just return a copy.
|
||||
|
||||
|
||||
//used by cloners
|
||||
/datum/gas_mixture/immutable/cloner
|
||||
initial_temperature = T20C
|
||||
|
||||
/datum/gas_mixture/immutable/cloner/reset_gas_mix()
|
||||
assert_gas("n2")
|
||||
gases["n2"][MOLES] = MOLES_O2STANDARD + MOLES_N2STANDARD
|
||||
..()
|
||||
|
||||
/datum/gas_mixture/immutable/cloner/heat_capacity()
|
||||
return (MOLES_O2STANDARD + MOLES_N2STANDARD)*20 //specific heat of nitrogen is 20
|
||||
@@ -105,7 +105,7 @@
|
||||
/datum/export/rcd
|
||||
cost = 100 // 15 metal -> 75 credits, +25 credits for production
|
||||
unit_name = "rapid construction device"
|
||||
export_types = list(/obj/item/weapon/rcd)
|
||||
export_types = list(/obj/item/weapon/construction/rcd)
|
||||
|
||||
/datum/export/rcd_ammo
|
||||
cost = 15 // 1.5 metal, 1 glass -> 12.5 credits, +2.5 credits
|
||||
|
||||
@@ -279,7 +279,7 @@ GLOBAL_LIST(external_rsc_urls)
|
||||
add_admin_verbs()
|
||||
to_chat(src, get_message_output("memo"))
|
||||
adminGreet()
|
||||
if((GLOB.comms_key == "default_pwd" || length(GLOB.comms_key) <= 6) && GLOB.comms_allowed) //It's the default value or less than 6 characters long, but it somehow didn't disable comms.
|
||||
if((global.comms_key == "default_pwd" || length(global.comms_key) <= 6) && global.comms_allowed) //It's the default value or less than 6 characters long, but it somehow didn't disable comms.
|
||||
to_chat(src, "<span class='danger'>The server's API key is either too short or is the default value! Consider changing it immediately!</span>")
|
||||
|
||||
/* if(mentor && !holder)
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
/obj/item/weapon/melee/baton/loaded=1,\
|
||||
/obj/item/clothing/mask/gas/sechailer=1,\
|
||||
/obj/item/weapon/gun/energy/e_gun=1,\
|
||||
/obj/item/weapon/rcd/loaded=1)
|
||||
/obj/item/weapon/construction/rcd/loaded=1)
|
||||
|
||||
/datum/outfit/ert/engineer/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
..()
|
||||
@@ -158,7 +158,7 @@
|
||||
/obj/item/weapon/melee/baton/loaded=1,\
|
||||
/obj/item/clothing/mask/gas/sechailer/swat=1,\
|
||||
/obj/item/weapon/gun/energy/pulse/pistol/loyalpin=1,\
|
||||
/obj/item/weapon/rcd/combat=1)
|
||||
/obj/item/weapon/construction/rcd/combat=1)
|
||||
|
||||
|
||||
/datum/outfit/centcom_official
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
obj_integrity = 300
|
||||
max_integrity = 300
|
||||
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75, fire = 50, acid = 75)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals,/obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/pipe_dispenser)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals,/obj/item/device/t_scanner, /obj/item/weapon/construction/rcd, /obj/item/weapon/pipe_dispenser)
|
||||
siemens_coefficient = 0
|
||||
var/obj/item/clothing/head/helmet/space/hardsuit/helmet
|
||||
actions_types = list(/datum/action/item_action/toggle_helmet)
|
||||
|
||||
@@ -493,7 +493,7 @@
|
||||
icon_state = "coatengineer"
|
||||
item_state = "coatengineer"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 20, fire = 30, acid = 45)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/pipe_dispenser)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/device/t_scanner, /obj/item/weapon/construction/rcd, /obj/item/weapon/pipe_dispenser)
|
||||
hoodtype = /obj/item/clothing/head/hooded/winterhood/engineering
|
||||
|
||||
/obj/item/clothing/head/hooded/winterhood/engineering
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
triggering = FALSE
|
||||
message_admins("[key_name_admin(usr)] cancelled event [name].")
|
||||
log_admin_private("[key_name(usr)] cancelled event [name].")
|
||||
feedback_add_details("admin_verb","Cancel Event: [typepath]")
|
||||
feedback_add_details("event_admin_cancelled","[typepath]")
|
||||
|
||||
/datum/round_event_control/proc/runEvent(random)
|
||||
var/datum/round_event/E = new typepath()
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
else
|
||||
regular_candidates = list()
|
||||
|
||||
shuffle(regular_candidates)
|
||||
shuffle_inplace(regular_candidates)
|
||||
|
||||
var/list/candidates = priority_candidates + regular_candidates
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
/datum/round_event_control/shuttle_loan
|
||||
name = "Shuttle loan"
|
||||
name = "Shuttle Loan"
|
||||
typepath = /datum/round_event/shuttle_loan
|
||||
max_occurrences = 1
|
||||
earliest_start = 4000
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
if(turfs.len) //Pick a turf to spawn at if we can
|
||||
var/turf/T = pick(turfs)
|
||||
new/obj/effect/spacevine_controller(T) //spawn a controller at turf
|
||||
new /datum/spacevine_controller(T) //spawn a controller at turf
|
||||
|
||||
|
||||
/datum/spacevine_mutation
|
||||
@@ -80,12 +80,7 @@
|
||||
/datum/spacevine_mutation/space_covering/New()
|
||||
. = ..()
|
||||
if(!coverable_turfs)
|
||||
coverable_turfs = typecacheof(list(
|
||||
/turf/open/space
|
||||
))
|
||||
coverable_turfs -= typecacheof(list(
|
||||
/turf/open/space/transit
|
||||
))
|
||||
coverable_turfs = typecacheof(list(/turf/open/space)) - /turf/open/space/transit
|
||||
|
||||
/datum/spacevine_mutation/space_covering/on_grow(obj/structure/spacevine/holder)
|
||||
process_mutation(holder)
|
||||
@@ -324,10 +319,10 @@
|
||||
obj_integrity = 50
|
||||
max_integrity = 50
|
||||
var/energy = 0
|
||||
var/obj/effect/spacevine_controller/master = null
|
||||
var/datum/spacevine_controller/master = null
|
||||
var/list/mutations = list()
|
||||
|
||||
/obj/structure/spacevine/New()
|
||||
/obj/structure/spacevine/Initialize()
|
||||
..()
|
||||
add_atom_colour("#ffffff", FIXED_COLOUR_PRIORITY)
|
||||
|
||||
@@ -347,13 +342,7 @@
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
SM.on_death(src)
|
||||
if(master)
|
||||
master.vines -= src
|
||||
master.growth_queue -= src
|
||||
if(!master.vines.len)
|
||||
var/obj/item/seeds/kudzu/KZ = new(loc)
|
||||
KZ.mutations |= mutations
|
||||
KZ.set_potency(master.mutativeness * 10)
|
||||
KZ.set_production((master.spread_cap / initial(master.spread_cap)) * 5)
|
||||
master.VineDestroyed(src)
|
||||
mutations = list()
|
||||
set_opacity(0)
|
||||
if(has_buckled_mobs())
|
||||
@@ -428,41 +417,49 @@
|
||||
/obj/structure/spacevine/attack_alien(mob/living/user)
|
||||
eat(user)
|
||||
|
||||
/obj/effect/spacevine_controller
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
var/list/obj/structure/spacevine/vines = list()
|
||||
var/list/growth_queue = list()
|
||||
/datum/spacevine_controller
|
||||
var/list/obj/structure/spacevine/vines
|
||||
var/list/growth_queue
|
||||
var/spread_multiplier = 5
|
||||
var/spread_cap = 30
|
||||
var/list/GLOB.mutations_list = list()
|
||||
var/list/vine_mutations_list
|
||||
var/mutativeness = 1
|
||||
|
||||
/obj/effect/spacevine_controller/New(loc, list/muts, potency, production)
|
||||
add_atom_colour("#ffffff", FIXED_COLOUR_PRIORITY)
|
||||
spawn_spacevine_piece(loc, , muts)
|
||||
/datum/spacevine_controller/New(turf/location, list/muts, potency, production)
|
||||
spawn_spacevine_piece(location, null, muts)
|
||||
START_PROCESSING(SSobj, src)
|
||||
init_subtypes(/datum/spacevine_mutation/, GLOB.mutations_list)
|
||||
vines = list()
|
||||
growth_queue = list()
|
||||
vine_mutations_list = list()
|
||||
init_subtypes(/datum/spacevine_mutation/, vine_mutations_list)
|
||||
if(potency != null)
|
||||
mutativeness = potency / 10
|
||||
if(production != null)
|
||||
spread_cap *= production / 5
|
||||
spread_multiplier /= production / 5
|
||||
..()
|
||||
|
||||
/obj/effect/spacevine_controller/ex_act() //only killing all vines will end this suffering
|
||||
return
|
||||
/datum/spacevine_controller/vv_drop_down/vv_get_dropdown()
|
||||
. = ..()
|
||||
. += "---"
|
||||
.["Delete Vines"] = "?_src_=\ref[src];purge_vines=1"
|
||||
|
||||
/obj/effect/spacevine_controller/singularity_act()
|
||||
return
|
||||
/datum/spacevine_controller/Topic(href, href_list)
|
||||
if(..() || !check_rights(R_ADMIN, FALSE))
|
||||
return
|
||||
|
||||
if(href_list["purge_vines"])
|
||||
if(alert(usr, "Are you sure you want to delete this spacevine cluster?", "Delete Vines", "Yes", "No") != "Yes")
|
||||
return
|
||||
DeleteVines()
|
||||
|
||||
/obj/effect/spacevine_controller/singularity_pull()
|
||||
return
|
||||
/datum/spacevine_controller/proc/DeleteVines() //this is kill
|
||||
QDEL_LIST(vines) //this will also qdel us
|
||||
|
||||
/obj/effect/spacevine_controller/Destroy()
|
||||
/datum/spacevine_controller/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/spacevine_controller/proc/spawn_spacevine_piece(turf/location, obj/structure/spacevine/parent, list/muts)
|
||||
/datum/spacevine_controller/proc/spawn_spacevine_piece(turf/location, obj/structure/spacevine/parent, list/muts)
|
||||
var/obj/structure/spacevine/SV = new(location)
|
||||
growth_queue += SV
|
||||
vines += SV
|
||||
@@ -476,17 +473,28 @@
|
||||
var/parentcolor = parent.atom_colours[FIXED_COLOUR_PRIORITY]
|
||||
SV.add_atom_colour(parentcolor, FIXED_COLOUR_PRIORITY)
|
||||
if(prob(mutativeness))
|
||||
var/datum/spacevine_mutation/randmut = pick(GLOB.mutations_list - SV.mutations)
|
||||
var/datum/spacevine_mutation/randmut = pick(vine_mutations_list - SV.mutations)
|
||||
randmut.add_mutation_to_vinepiece(SV)
|
||||
|
||||
for(var/datum/spacevine_mutation/SM in SV.mutations)
|
||||
SM.on_birth(SV)
|
||||
|
||||
/obj/effect/spacevine_controller/process()
|
||||
if(!vines)
|
||||
/datum/spacevine_controller/proc/VineDestroyed(obj/structure/spacevine/S)
|
||||
S.master = null
|
||||
vines -= S
|
||||
growth_queue -= S
|
||||
if(!vines.len)
|
||||
var/obj/item/seeds/kudzu/KZ = new(S.loc)
|
||||
KZ.mutations |= S.mutations
|
||||
KZ.set_potency(mutativeness * 10)
|
||||
KZ.set_production((spread_cap / initial(spread_cap)) * 5)
|
||||
qdel(src)
|
||||
|
||||
/datum/spacevine_controller/process()
|
||||
if(!LAZYLEN(vines))
|
||||
qdel(src) //space vines exterminated. Remove the controller
|
||||
return
|
||||
if(!growth_queue)
|
||||
if(!LAZYLEN(growth_queue))
|
||||
qdel(src) //Sanity check
|
||||
return
|
||||
|
||||
|
||||
@@ -6,27 +6,10 @@
|
||||
earliest_start = 0
|
||||
|
||||
/datum/round_event/wizard/rpgloot/start()
|
||||
var/list/prefixespositive = list("greater", "major", "blessed", "superior", "enpowered", "honed", "true", "glorious", "robust")
|
||||
var/list/prefixesnegative = list("lesser", "minor", "blighted", "inferior", "enfeebled", "rusted", "unsteady", "tragic", "gimped")
|
||||
var/list/suffixes = list("orc slaying", "elf slaying", "corgi slaying", "strength", "dexterity", "constitution", "intelligence", "wisdom", "charisma", "the forest", "the hills", "the plains", "the sea", "the sun", "the moon", "the void", "the world", "the fool", "many secrets", "many tales", "many colors", "rending", "sundering", "the night", "the day")
|
||||
var/upgrade_scroll_chance = 0
|
||||
var/upgrade_scroll_chance = 0
|
||||
for(var/obj/item/I in world)
|
||||
if(istype(I,/obj/item/organ/))
|
||||
continue
|
||||
var/quality = pick(1;15, 2;14, 2;13, 2;12, 3;11, 3;10, 3;9, 4;8, 4;7, 4;6, 5;5, 5;4, 5;3, 6;2, 6;1, 6;0)
|
||||
if(prob(50))
|
||||
quality = -quality
|
||||
if(quality > 0)
|
||||
I.name = "[pick(prefixespositive)] [I.name] of [pick(suffixes)] +[quality]"
|
||||
else if(quality < 0)
|
||||
I.name = "[pick(prefixesnegative)] [I.name] of [pick(suffixes)] [quality]"
|
||||
else
|
||||
I.name = "[I.name] of [pick(suffixes)]"
|
||||
|
||||
I.force = max(0,I.force + quality)
|
||||
I.throwforce = max(0,I.throwforce + quality)
|
||||
for(var/value in I.armor)
|
||||
I.armor[value] += quality
|
||||
if(!istype(I.rpg_loot))
|
||||
I.rpg_loot = new(I)
|
||||
|
||||
if(istype(I,/obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = I
|
||||
@@ -36,28 +19,97 @@
|
||||
upgrade_scroll_chance = max(0,upgrade_scroll_chance-100)
|
||||
upgrade_scroll_chance += 25
|
||||
|
||||
GLOB.rpg_loot_items = TRUE
|
||||
|
||||
/obj/item/upgradescroll
|
||||
name = "Item Fortification Scroll"
|
||||
name = "item fortification scroll"
|
||||
desc = "Somehow, this piece of paper can be applied to items to make them \"better\". Apparently there's a risk of losing the item if it's already \"too good\". <i>This all feels so arbitrary...</i>"
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "scroll"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
var/upgrade_amount = 1
|
||||
var/can_backfire = TRUE
|
||||
var/one_use = TRUE
|
||||
|
||||
/obj/item/upgradescroll/afterattack(obj/item/target, mob/user , proximity)
|
||||
if(!proximity || !istype(target))
|
||||
return
|
||||
var/quality = target.force - initial(target.force)
|
||||
if(quality > 9 && prob((quality - 9)*10))
|
||||
to_chat(user, "<span class='danger'>[target] catches fire!</span>")
|
||||
if(target.resistance_flags & (LAVA_PROOF|FIRE_PROOF))
|
||||
target.resistance_flags &= ~(LAVA_PROOF|FIRE_PROOF)
|
||||
target.resistance_flags |= FLAMMABLE
|
||||
target.fire_act()
|
||||
|
||||
var/datum/rpg_loot/rpg_loot_datum = target.rpg_loot
|
||||
if(!istype(rpg_loot_datum))
|
||||
rpg_loot_datum = new /datum/rpg_loot(target)
|
||||
|
||||
var/quality = rpg_loot_datum.quality
|
||||
|
||||
if(can_backfire && (quality > 9 && prob((quality - 9)*10)))
|
||||
to_chat(user, "<span class='danger'>[target] violently glows blue for a while, then evaporates.</span>")
|
||||
target.burn()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[target] glows blue and seems vaguely \"better\"!</span>")
|
||||
rpg_loot_datum.modify(upgrade_amount)
|
||||
|
||||
if(one_use)
|
||||
qdel(src)
|
||||
return
|
||||
target.force += 1
|
||||
target.throwforce += 1
|
||||
for(var/value in target.armor)
|
||||
target.armor[value] += 1
|
||||
to_chat(user, "<span class='notice'>[target] glows blue and seems vaguely \"better\"!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/upgradescroll/unlimited
|
||||
name = "unlimited foolproof item fortification scroll"
|
||||
desc = "Somehow, this piece of paper can be applied to items to make them \"better\". This scroll is made from the tongues of dead paper wizards, and can be used an unlimited number of times, with no drawbacks."
|
||||
one_use = FALSE
|
||||
can_backfire = FALSE
|
||||
|
||||
/datum/rpg_loot
|
||||
var/positive_prefix = "okay"
|
||||
var/negative_prefix = "weak"
|
||||
var/suffix = "something profound"
|
||||
var/quality = 0
|
||||
|
||||
var/obj/item/attached
|
||||
var/original_name
|
||||
|
||||
/datum/rpg_loot/New(attached_item=null)
|
||||
attached = attached_item
|
||||
|
||||
randomise()
|
||||
|
||||
/datum/rpg_loot/Destroy()
|
||||
attached = null
|
||||
|
||||
/datum/rpg_loot/proc/randomise()
|
||||
var/static/list/prefixespositive = list("greater", "major", "blessed", "superior", "enpowered", "honed", "true", "glorious", "robust")
|
||||
var/static/list/prefixesnegative = list("lesser", "minor", "blighted", "inferior", "enfeebled", "rusted", "unsteady", "tragic", "gimped")
|
||||
var/static/list/suffixes = list("orc slaying", "elf slaying", "corgi slaying", "strength", "dexterity", "constitution", "intelligence", "wisdom", "charisma", "the forest", "the hills", "the plains", "the sea", "the sun", "the moon", "the void", "the world", "the fool", "many secrets", "many tales", "many colors", "rending", "sundering", "the night", "the day")
|
||||
|
||||
var/new_quality = pick(1;15, 2;14, 2;13, 2;12, 3;11, 3;10, 3;9, 4;8, 4;7, 4;6, 5;5, 5;4, 5;3, 6;2, 6;1, 6;0)
|
||||
|
||||
suffix = pick(suffixes)
|
||||
positive_prefix = pick(prefixespositive)
|
||||
negative_prefix = pick(prefixesnegative)
|
||||
|
||||
if(prob(50))
|
||||
new_quality = -new_quality
|
||||
|
||||
modify(new_quality)
|
||||
|
||||
/datum/rpg_loot/proc/rename()
|
||||
var/obj/item/I = attached
|
||||
if(!original_name)
|
||||
original_name = I.name
|
||||
if(quality < 0)
|
||||
I.name = "[negative_prefix] [original_name] of [suffix] [quality]"
|
||||
else if(quality == 0)
|
||||
I.name = "[original_name] of [suffix]"
|
||||
else if(quality > 0)
|
||||
I.name = "[positive_prefix] [original_name] of [suffix] +[quality]"
|
||||
|
||||
/datum/rpg_loot/proc/modify(quality_mod)
|
||||
var/obj/item/I = attached
|
||||
quality += quality_mod
|
||||
|
||||
I.force = max(0,I.force + quality_mod)
|
||||
I.throwforce = max(0,I.throwforce + quality_mod)
|
||||
|
||||
for(var/value in I.armor)
|
||||
I.armor[value] += quality
|
||||
|
||||
rename()
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
if(!mobs)
|
||||
return
|
||||
|
||||
shuffle(moblocs)
|
||||
shuffle(mobs)
|
||||
shuffle_inplace(moblocs)
|
||||
shuffle_inplace(mobs)
|
||||
|
||||
for(var/mob/living/carbon/human/H in mobs)
|
||||
if(!moblocs)
|
||||
@@ -55,8 +55,8 @@
|
||||
if(!mobs)
|
||||
return
|
||||
|
||||
shuffle(mobnames)
|
||||
shuffle(mobs)
|
||||
shuffle_inplace(mobnames)
|
||||
shuffle_inplace(mobs)
|
||||
|
||||
for(var/mob/living/carbon/human/H in mobs)
|
||||
if(!mobnames)
|
||||
@@ -89,7 +89,7 @@
|
||||
if(!mobs)
|
||||
return
|
||||
|
||||
shuffle(mobs)
|
||||
shuffle_inplace(mobs)
|
||||
|
||||
var/obj/effect/proc_holder/spell/targeted/mind_transfer/swapper = new /obj/effect/proc_holder/spell/targeted/mind_transfer
|
||||
while(mobs.len > 1)
|
||||
|
||||
@@ -538,7 +538,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
||||
/obj/item/device/radio/headset/syndicate, /obj/item/weapon/grenade/plastic/c4,\
|
||||
/obj/item/device/powersink, /obj/item/weapon/storage/box/syndie_kit,\
|
||||
/obj/item/toy/syndicateballoon, /obj/item/weapon/gun/energy/laser/captain,\
|
||||
/obj/item/weapon/hand_tele, /obj/item/weapon/rcd, /obj/item/weapon/tank/jetpack,\
|
||||
/obj/item/weapon/hand_tele, /obj/item/weapon/construction/rcd, /obj/item/weapon/tank/jetpack,\
|
||||
/obj/item/clothing/under/rank/captain, /obj/item/device/aicard,\
|
||||
/obj/item/clothing/shoes/magboots, /obj/item/areaeditor/blueprints, /obj/item/weapon/disk/nuclear,\
|
||||
/obj/item/clothing/suit/space/nasavoid, /obj/item/weapon/tank)
|
||||
@@ -673,7 +673,6 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
||||
QDEL_IN(O, 300)
|
||||
|
||||
|
||||
|
||||
/obj/effect/hallucination/bolts
|
||||
var/list/doors = list()
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
P.name = "Blank Card"
|
||||
P.card_icon = "cas_white"
|
||||
cards += P
|
||||
shuffle(cards) // distribute blank cards throughout deck
|
||||
shuffle_inplace(cards) // distribute blank cards throughout deck
|
||||
..()
|
||||
|
||||
/obj/item/toy/cards/deck/cas/attack_hand(mob/user)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//Vars that will not be copied when using /DuplicateObject
|
||||
GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("area","type","loc","locs","vars", "parent","parent_type", "verbs","ckey","key","power_supply","contents","reagents","stat","x","y","z","group","atmos_adjacent_turfs"))
|
||||
GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("tag","area","type","loc","locs","vars", "parent","parent_type", "verbs","ckey","key","power_supply","contents","reagents","stat","x","y","z","group","atmos_adjacent_turfs"))
|
||||
|
||||
/proc/DuplicateObject(atom/original, perfectcopy = TRUE, sameloc = FALSE, atom/newloc = null, nerf = FALSE, holoitem=FALSE)
|
||||
if(!original)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user