Merge branch 'master' into upstream-merge-26140

This commit is contained in:
LetterJay
2017-05-13 01:28:34 -04:00
committed by GitHub
519 changed files with 5635 additions and 3264 deletions

View File

@@ -37,15 +37,15 @@ GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not us
#define JUDGEMENT_CV_REQ 300
//general component/cooldown things
#define SLAB_PRODUCTION_TIME 900 //how long(deciseconds) slabs require to produce a single component; defaults to 1 minute 30 seconds
#define SLAB_PRODUCTION_TIME 450 //how long(deciseconds) slabs require to produce a single component; defaults to 45 seconds
#define SLAB_SERVANT_SLOWDOWN 300 //how much each servant above 5 slows down slab-based generation; defaults to 30 seconds per sevant
#define SLAB_SERVANT_SLOWDOWN 150 //how much each servant above 5 slows down slab-based generation; defaults to 15 seconds per sevant
#define SLAB_SLOWDOWN_MAXIMUM 2700 //maximum slowdown from additional servants; defaults to 4 minutes 30 seconds
#define SLAB_SLOWDOWN_MAXIMUM 1350 //maximum slowdown from additional servants; defaults to 2 minutes 15 seconds
#define CACHE_PRODUCTION_TIME 600 //how long(deciseconds) caches require to produce a component; defaults to 1 minute
#define CACHE_PRODUCTION_TIME 300 //how long(deciseconds) caches require to produce a component; defaults to 30 seconds
#define ACTIVE_CACHE_SLOWDOWN 100 //how many additional deciseconds caches take to produce a component for each linked cache; defaults to 10 seconds
#define ACTIVE_CACHE_SLOWDOWN 50 //how many additional deciseconds caches take to produce a component for each linked cache; defaults to 5 seconds
#define LOWER_PROB_PER_COMPONENT 10 //how much each component in the cache reduces the weight of getting another of that component type
@@ -87,9 +87,9 @@ GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not us
#define GATEWAY_RATVAR_ARRIVAL 300 //when progress is at or above this, game over ratvar's here everybody go home
#define ARK_SUMMON_COST 3 //how many of each component an Ark costs to summon
#define ARK_SUMMON_COST 5 //how many of each component an Ark costs to summon
#define ARK_CONSUME_COST 7 //how many of each component an Ark needs to consume to activate
#define ARK_CONSUME_COST 15 //how many of each component an Ark needs to consume to activate
//Objective text define
#define CLOCKCULT_OBJECTIVE "Construct the Ark of the Clockwork Justicar and free Ratvar."

View File

@@ -32,7 +32,7 @@
#define BOTANIST (1<<2)
#define COOK (1<<3)
#define JANITOR (1<<4)
#define LIBRARIAN (1<<5)
#define CURATOR (1<<5)
#define QUARTERMASTER (1<<6)
#define CARGOTECH (1<<7)
#define MINER (1<<8)

View File

@@ -16,10 +16,10 @@
#define LIGHTING_BASE_MATRIX \
list \
( \
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
1, 1, 1, 0, \
1, 1, 1, 0, \
1, 1, 1, 0, \
1, 1, 1, 0, \
0, 0, 0, 1 \
) \
@@ -78,4 +78,11 @@
#define DYNAMIC_LIGHTING_ENABLED 1 //dynamic lighting enabled
#define DYNAMIC_LIGHTING_FORCED 2 //dynamic lighting enabled even if the area doesn't require power
#define DYNAMIC_LIGHTING_IFSTARLIGHT 3 //dynamic lighting enabled only if starlight is.
#define IS_DYNAMIC_LIGHTING(A) A.dynamic_lighting
#define IS_DYNAMIC_LIGHTING(A) A.dynamic_lighting
//code assumes higher numbers override lower numbers.
#define LIGHTING_NO_UPDATE 0
#define LIGHTING_VIS_UPDATE 1
#define LIGHTING_CHECK_UPDATE 2
#define LIGHTING_FORCE_UPDATE 3

3
code/__DEFINES/menu.dm Normal file
View File

@@ -0,0 +1,3 @@
#define CHECKBOX_NONE 0
#define CHECKBOX_GROUP 1
#define CHECKBOX_TOGGLE 2

View File

@@ -201,6 +201,21 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache)
#define BLOOD_STATE_XENO "xeno"
#define BLOOD_STATE_OIL "oil"
#define BLOOD_STATE_NOT_BLOODY "no blood whatsoever"
//suit sensors: sensor_mode defines
#define SENSOR_OFF 0
#define SENSOR_LIVING 1
#define SENSOR_VITALS 2
#define SENSOR_COORDS 3
//suit sensors: has_sensor defines
#define BROKEN_SENSORS -1
#define NO_SENSORS 0
#define HAS_SENSORS 1
#define LOCKED_SENSORS 2
//Turf wet states
#define TURF_DRY 0
#define TURF_WET_WATER 1

View File

@@ -31,5 +31,6 @@
/////////////
#define STATUS_EFFECT_SIGILMARK /datum/status_effect/sigil_mark
#define STATUS_EFFECT_BELLIGERENT /datum/status_effect/belligerent //forces the affected to walk, doing damage if they try to run
#define STATUS_EFFECT_HISWRATH /datum/status_effect/his_wrath //His Wrath.

View File

@@ -1,18 +0,0 @@
diff a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm (rejected hunks)
@@ -26,4 +26,13 @@
#define INITIALIZE_HINT_NORMAL 0 //Nothing happens
#define INITIALIZE_HINT_LATELOAD 1 //Call LateInitialize
-#define INITIALIZE_HINT_QDEL 2 //Call qdel on the atom
\ No newline at end of file
+#define INITIALIZE_HINT_QDEL 2 //Call qdel on the atom
+
+//type and all subtypes should always call Initialize in New()
+#define INITIALIZE_IMMEDIATE(X) ##X/New(loc, ...){\
+ ..();\
+ if(!initialized) {\
+ args[1] = TRUE;\
+ SSatoms.InitAtom(src, args);\
+ }\
+}
\ No newline at end of file

View File

@@ -457,6 +457,7 @@
#define LAZYACCESS(L, I) (L ? (isnum(I) ? (I > 0 && I <= L.len ? L[I] : null) : L[I]) : null)
#define LAZYLEN(L) length(L)
#define LAZYCLEARLIST(L) if(L) L.Cut()
#define SANITIZE_LIST(L) ( islist(L) ? L : list() )
/* Definining a counter as a series of key -> numeric value entries

View File

@@ -20,13 +20,13 @@
/proc/log_admin(text)
GLOB.admin_log.Add(text)
if (config.log_admin)
GLOB.diary << "\[[time_stamp()]]ADMIN: [text]"
GLOB.world_game_log << "\[[time_stamp()]]ADMIN: [text]"
//Items using this proc are stripped from public logs - use with caution
/proc/log_admin_private(text)
GLOB.admin_log.Add(text)
if (config.log_admin)
GLOB.diary << "\[[time_stamp()]]ADMINPRIVATE: [text]"
GLOB.world_game_log << "\[[time_stamp()]]ADMINPRIVATE: [text]"
/proc/log_adminsay(text)
if (config.log_adminchat)
@@ -38,67 +38,64 @@
/proc/log_game(text)
if (config.log_game)
GLOB.diary << "\[[time_stamp()]]GAME: [text]"
GLOB.world_game_log << "\[[time_stamp()]]GAME: [text]"
/proc/log_vote(text)
if (config.log_vote)
GLOB.diary << "\[[time_stamp()]]VOTE: [text]"
GLOB.world_game_log << "\[[time_stamp()]]VOTE: [text]"
/proc/log_access(text)
if (config.log_access)
GLOB.diary << "\[[time_stamp()]]ACCESS: [text]"
GLOB.world_game_log << "\[[time_stamp()]]ACCESS: [text]"
/proc/log_say(text)
if (config.log_say)
GLOB.diary << "\[[time_stamp()]]SAY: [text]"
GLOB.world_game_log << "\[[time_stamp()]]SAY: [text]"
/proc/log_prayer(text)
if (config.log_prayer)
GLOB.diary << "\[[time_stamp()]]PRAY: [text]"
GLOB.world_game_log << "\[[time_stamp()]]PRAY: [text]"
/proc/log_law(text)
if (config.log_law)
GLOB.diary << "\[[time_stamp()]]LAW: [text]"
GLOB.world_game_log << "\[[time_stamp()]]LAW: [text]"
/proc/log_ooc(text)
if (config.log_ooc)
GLOB.diary << "\[[time_stamp()]]OOC: [text]"
GLOB.world_game_log << "\[[time_stamp()]]OOC: [text]"
/proc/log_whisper(text)
if (config.log_whisper)
GLOB.diary << "\[[time_stamp()]]WHISPER: [text]"
GLOB.world_game_log << "\[[time_stamp()]]WHISPER: [text]"
/proc/log_emote(text)
if (config.log_emote)
GLOB.diary << "\[[time_stamp()]]EMOTE: [text]"
GLOB.world_game_log << "\[[time_stamp()]]EMOTE: [text]"
/proc/log_attack(text)
if (config.log_attack)
GLOB.diaryofmeanpeople << "\[[time_stamp()]]ATTACK: [text]"
GLOB.world_attack_log << "\[[time_stamp()]]ATTACK: [text]"
/proc/log_pda(text)
if (config.log_pda)
GLOB.diary << "\[[time_stamp()]]PDA: [text]"
GLOB.world_game_log << "\[[time_stamp()]]PDA: [text]"
/proc/log_comment(text)
if (config.log_pda)
//reusing the PDA option because I really don't think news comments are worth a config option
GLOB.diary << "\[[time_stamp()]]COMMENT: [text]"
GLOB.world_game_log << "\[[time_stamp()]]COMMENT: [text]"
/proc/log_chat(text)
if (config.log_pda)
GLOB.diary << "\[[time_stamp()]]CHAT: [text]"
GLOB.world_game_log << "\[[time_stamp()]]CHAT: [text]"
/proc/log_sql(text)
if(config.sql_enabled)
GLOB.diary << "\[[time_stamp()]]SQL: [text]"
GLOB.world_game_log << "\[[time_stamp()]]SQL: [text]"
//This replaces world.log so it displays both in DD and the file
/proc/log_world(text)
if(config && config.log_runtimes)
world.log = GLOB.runtime_diary
world.log << text
world.log = null
GLOB.world_runtime_log << text
world.log << text
// Helper procs for building detailed log lines

View File

@@ -1,37 +0,0 @@
#define YOUNG 4
/client/proc/join_date_check(y,m,d)
var/datum/DBQuery/query_datediff = SSdbcore.NewQuery("SELECT DATEDIFF(Now(),'[y]-[m]-[d]')")
if(!query_datediff.Execute())
return FALSE
if(query_datediff.NextRow())
var/diff = text2num(query_datediff.item[1])
if(config.use_account_age_for_jobs)
player_age = max(0,diff) //So job code soesn't freak out if they are time traveling.
if(diff < YOUNG)
var/msg = "(IP: [address], ID: [computer_id]) is a new BYOND account made on [y]-[m]-[d]."
if(diff < 0)
msg += " They are also apparently from the future."
message_admins("[key_name_admin(src)] [msg]")
return TRUE
#undef YOUNG
/client/proc/findJoinDate()
var/http[] = world.Export("http://byond.com/members/[src.ckey]?format=text")
if(!http)
log_world("Failed to connect to byond age check for [src.ckey]")
return FALSE
var/F = file2text(http["CONTENT"])
if(F)
var/regex/R = regex("joined = \"(\\d{4})-(\\d{2})-(\\d{2})\"")
if(!R.Find(F))
CRASH("Age check regex failed")
var/y = R.group[1]
var/m = R.group[2]
var/d = R.group[3]
return join_date_check(y,m,d)

View File

@@ -513,7 +513,7 @@
winset(C, "mainwindow", "flash=5")
/proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
if(SSticker.current_state != GAME_STATE_PLAYING || !character)
if(!SSticker.IsRoundInProgress() || !character)
return
var/area/A = get_area(character)
var/message = "<span class='game deadsay'><span class='name'>\

View File

@@ -24,4 +24,4 @@ GLOBAL_LIST_EMPTY(whitelisted_species_list)
/proc/log_mentor(text)
GLOB.mentor_log.Add(text)
GLOB.diary << "\[[time_stamp()]]MENTOR: [text]"
GLOB.world_game_log << "\[[time_stamp()]]MENTOR: [text]"

View File

@@ -1342,6 +1342,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
//This prevents RCEs from badmins
//kevinz000 if you touch this I will hunt you down
GLOBAL_VAR_INIT(valid_HTTPSGet, FALSE)
GLOBAL_PROTECT(valid_HTTPSGet)
/proc/HTTPSGet(url)
if(findtext(url, "\""))
GLOB.valid_HTTPSGet = FALSE

View File

@@ -29,6 +29,7 @@ GLOBAL_LIST_EMPTY(zombie_infection_list) // A list of all zombie_infection org
GLOBAL_LIST_EMPTY(meteor_list) // List of all meteors.
GLOBAL_LIST_EMPTY(active_jammers) // List of active radio jammers
GLOBAL_LIST_EMPTY(ladders)
GLOBAL_LIST_EMPTY(trophy_cases)
GLOBAL_LIST_EMPTY(wire_color_directory)
GLOBAL_LIST_EMPTY(wire_name_directory)

View File

@@ -5,5 +5,6 @@
#define POLL_IGNORE_POSSESSED_BLADE "possessed_blade"
#define POLL_IGNORE_ALIEN_LARVA "alien_larva"
#define POLL_IGNORE_CLOCKWORK_MARAUDER "clockwork_marauder"
#define POLL_IGNORE_SYNDICATE "syndicate"
GLOBAL_LIST_EMPTY(poll_ignore)

View File

@@ -1,28 +1,34 @@
GLOBAL_VAR(diary)
GLOBAL_PROTECT(diary)
GLOBAL_VAR(runtime_diary)
GLOBAL_PROTECT(runtime_diary)
GLOBAL_VAR(diaryofmeanpeople)
GLOBAL_PROTECT(diaryofmeanpeople)
GLOBAL_VAR(href_logfile)
GLOBAL_PROTECT(href_logfile)
GLOBAL_LIST_EMPTY(bombers)
GLOBAL_PROTECT(bombers)
GLOBAL_LIST_EMPTY(admin_log)
GLOBAL_PROTECT(admin_log)
GLOBAL_LIST_EMPTY(lastsignalers) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
GLOBAL_PROTECT(lastsignalers)
GLOBAL_LIST_EMPTY(lawchanges) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
GLOBAL_PROTECT(lawchanges)
GLOBAL_LIST_EMPTY(combatlog)
GLOBAL_PROTECT(combatlog)
GLOBAL_LIST_EMPTY(IClog)
GLOBAL_PROTECT(IClog)
GLOBAL_LIST_EMPTY(OOClog)
GLOBAL_PROTECT(OOClog)
GLOBAL_LIST_EMPTY(adminlog)
GLOBAL_PROTECT(adminlog)
GLOBAL_VAR(log_directory)
GLOBAL_PROTECT(log_directory)
GLOBAL_VAR(world_game_log)
GLOBAL_PROTECT(world_game_log)
GLOBAL_VAR(world_runtime_log)
GLOBAL_PROTECT(world_runtime_log)
GLOBAL_VAR(world_attack_log)
GLOBAL_PROTECT(world_attack_log)
GLOBAL_VAR(world_href_log)
GLOBAL_PROTECT(world_href_log)
GLOBAL_VAR(round_id)
GLOBAL_PROTECT(round_id)
GLOBAL_VAR(config_error_log)
GLOBAL_PROTECT(config_error_log)
GLOBAL_LIST_EMPTY(bombers)
GLOBAL_PROTECT(bombers)
GLOBAL_LIST_EMPTY(admin_log)
GLOBAL_PROTECT(admin_log)
GLOBAL_LIST_EMPTY(lastsignalers) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
GLOBAL_PROTECT(lastsignalers)
GLOBAL_LIST_EMPTY(lawchanges) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
GLOBAL_PROTECT(lawchanges)
GLOBAL_LIST_EMPTY(combatlog)
GLOBAL_PROTECT(combatlog)
GLOBAL_LIST_EMPTY(IClog)
GLOBAL_PROTECT(IClog)
GLOBAL_LIST_EMPTY(OOClog)
GLOBAL_PROTECT(OOClog)
GLOBAL_LIST_EMPTY(adminlog)
GLOBAL_PROTECT(adminlog)
GLOBAL_LIST_EMPTY(active_turfs_startlist)

View File

@@ -21,7 +21,7 @@
#define ui_inventory "WEST:6,SOUTH:5"
//Middle left indicators
#define ui_lingchemdisplay "WEST:6,CENTER-1:15"
#define ui_lingchemdisplay "WEST,CENTER-1:15"
#define ui_lingstingdisplay "WEST:6,CENTER-3:11"
#define ui_crafting "12:-10,1:5"
#define ui_building "12:-10,1:21"
@@ -104,12 +104,17 @@
#define ui_health "EAST-1:28,CENTER-1:15"
#define ui_internal "EAST-1:28,CENTER:17"
//borgs and aliens
#define ui_alien_nightvision "EAST-1:28,CENTER:17"
//borgs
#define ui_borg_health "EAST-1:28,CENTER-1:15" //borgs have the health display where humans have the pressure damage indicator.
#define ui_alien_health "EAST-1:28,CENTER-1:15" //aliens have the health display where humans have the pressure damage indicator.
#define ui_alienplasmadisplay "EAST-1:28,CENTER-2:15"
#define ui_alien_queen_finder "EAST-1:28,CENTER-3:15"
//aliens
#define ui_alien_health "EAST,CENTER-1:15" //aliens have the health display where humans have the pressure damage indicator.
#define ui_alienplasmadisplay "EAST,CENTER-2:15"
#define ui_alien_queen_finder "EAST,CENTER-3:15"
//constructs
#define ui_construct_pull "EAST,CENTER-2:15"
#define ui_construct_health "EAST,CENTER:15" //same as borgs and humans
// AI

View File

@@ -393,6 +393,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
textlist += "<br>"
else
textlist += "Seconds until Ratvar's arrival: <b>[G.get_arrival_text(TRUE)]</b><br>"
break
if(unconverted_ais_exist)
if(unconverted_ais_exist > 1)
textlist += "<b>[unconverted_ais_exist] unconverted AIs exist!</b><br>"

View File

@@ -0,0 +1,18 @@
/datum/hud/construct
ui_style_icon = 'icons/mob/screen_construct.dmi'
/datum/hud/construct/New(mob/owner)
..()
pull_icon = new /obj/screen/pull()
pull_icon.icon = ui_style_icon
pull_icon.update_icon(mymob)
pull_icon.screen_loc = ui_pull_resist
static_inventory += pull_icon
healths = new /obj/screen/healths/construct()
infodisplay += healths
/mob/living/simple_animal/hostile/construct/create_mob_hud()
if(client && !hud_used)
hud_used = new /datum/hud/construct(src)

View File

@@ -208,7 +208,6 @@
mymob.reload_fullscreen()
update_parallax_pref(screenmob)
/datum/hud/human/show_hud(version = 0,mob/viewmob)
..()
hidden_inventory_update(viewmob)
@@ -266,3 +265,6 @@
E.screen_loc = ui_equip_position(mymob)
if(mymob.hud_used)
show_hud(HUD_STYLE_STANDARD,mymob)
/datum/hud/proc/update_locked_slots()
return

View File

@@ -124,7 +124,6 @@
inv_box.icon = ui_style
inv_box.slot_id = slot_w_uniform
inv_box.icon_state = "uniform"
// inv_box.icon_full = "template"
inv_box.screen_loc = ui_iclothing
toggleable_inventory += inv_box
@@ -133,7 +132,6 @@
inv_box.icon = ui_style
inv_box.slot_id = slot_wear_suit
inv_box.icon_state = "suit"
// inv_box.icon_full = "template"
inv_box.screen_loc = ui_oclothing
toggleable_inventory += inv_box
@@ -155,7 +153,6 @@
inv_box.name = "id"
inv_box.icon = ui_style
inv_box.icon_state = "id"
// inv_box.icon_full = "template_small"
inv_box.screen_loc = ui_id
inv_box.slot_id = slot_wear_id
static_inventory += inv_box
@@ -164,7 +161,6 @@
inv_box.name = "mask"
inv_box.icon = ui_style
inv_box.icon_state = "mask"
// inv_box.icon_full = "template"
inv_box.screen_loc = ui_mask
inv_box.slot_id = slot_wear_mask
toggleable_inventory += inv_box
@@ -173,7 +169,6 @@
inv_box.name = "neck"
inv_box.icon = ui_style
inv_box.icon_state = "neck"
// inv_box.icon_full = "template"
inv_box.screen_loc = ui_neck
inv_box.slot_id = slot_neck
toggleable_inventory += inv_box
@@ -182,7 +177,6 @@
inv_box.name = "back"
inv_box.icon = ui_style
inv_box.icon_state = "back"
// inv_box.icon_full = "template_small"
inv_box.screen_loc = ui_back
inv_box.slot_id = slot_back
static_inventory += inv_box
@@ -191,7 +185,6 @@
inv_box.name = "storage1"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
// inv_box.icon_full = "template_small"
inv_box.screen_loc = ui_storage1
inv_box.slot_id = slot_l_store
static_inventory += inv_box
@@ -200,7 +193,6 @@
inv_box.name = "storage2"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
// inv_box.icon_full = "template_small"
inv_box.screen_loc = ui_storage2
inv_box.slot_id = slot_r_store
static_inventory += inv_box
@@ -209,7 +201,6 @@
inv_box.name = "suit storage"
inv_box.icon = ui_style
inv_box.icon_state = "suit_storage"
// inv_box.icon_full = "template"
inv_box.screen_loc = ui_sstore1
inv_box.slot_id = slot_s_store
static_inventory += inv_box
@@ -233,7 +224,6 @@
inv_box.name = "gloves"
inv_box.icon = ui_style
inv_box.icon_state = "gloves"
// inv_box.icon_full = "template"
inv_box.screen_loc = ui_gloves
inv_box.slot_id = slot_gloves
toggleable_inventory += inv_box
@@ -242,7 +232,6 @@
inv_box.name = "eyes"
inv_box.icon = ui_style
inv_box.icon_state = "glasses"
// inv_box.icon_full = "template"
inv_box.screen_loc = ui_glasses
inv_box.slot_id = slot_glasses
toggleable_inventory += inv_box
@@ -251,7 +240,6 @@
inv_box.name = "ears"
inv_box.icon = ui_style
inv_box.icon_state = "ears"
// inv_box.icon_full = "template"
inv_box.screen_loc = ui_ears
inv_box.slot_id = slot_ears
toggleable_inventory += inv_box
@@ -260,7 +248,6 @@
inv_box.name = "head"
inv_box.icon = ui_style
inv_box.icon_state = "head"
// inv_box.icon_full = "template"
inv_box.screen_loc = ui_head
inv_box.slot_id = slot_head
toggleable_inventory += inv_box
@@ -269,7 +256,6 @@
inv_box.name = "shoes"
inv_box.icon = ui_style
inv_box.icon_state = "shoes"
// inv_box.icon_full = "template"
inv_box.screen_loc = ui_shoes
inv_box.slot_id = slot_shoes
toggleable_inventory += inv_box
@@ -327,6 +313,18 @@
inv_slots[inv.slot_id] = inv
inv.update_icon()
/datum/hud/human/update_locked_slots()
if(!mymob)
return
var/mob/living/carbon/human/H = mymob
var/datum/species/S = H.dna.species
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
if(inv.slot_id in S.no_equip)
inv.alpha = 128
else
inv.alpha = initial(inv.alpha)
/datum/hud/human/hidden_inventory_update(mob/viewer)
if(!mymob)
return

View File

@@ -532,6 +532,12 @@
screen_loc = ui_health
mouse_opacity = 0
/obj/screen/healths/construct
icon = 'icons/mob/screen_construct.dmi'
icon_state = "artificer_health0"
screen_loc = ui_construct_health
mouse_opacity = 0
/obj/screen/healthdoll
name = "health doll"
screen_loc = ui_healthdoll

View File

@@ -117,7 +117,7 @@ GLOBAL_VAR_INIT(dlooc_allowed, 1)
prefs.chat_toggles ^= CHAT_LOOC
prefs.save_preferences()
src << "You will [(prefs.chat_toggles & CHAT_LOOC) ? "now" : "no longer"] see messages on the LOOC channel."
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
SSblackbox.add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/togglelooc()
set category = "Server"
@@ -126,7 +126,7 @@ GLOBAL_VAR_INIT(dlooc_allowed, 1)
toggle_looc()
log_admin("[key_name(usr)] toggled LOOC.")
message_admins("[key_name_admin(usr)] toggled LOOC.")
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
SSblackbox.add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/proc/toggle_looc(toggle = null)
if(toggle != null) //if we're specifically en/disabling ooc
@@ -146,7 +146,7 @@ GLOBAL_VAR_INIT(dlooc_allowed, 1)
log_admin("[key_name(usr)] toggled Dead LOOC.")
message_admins("[key_name_admin(usr)] toggled Dead LOOC.")
feedback_add_details("admin_verb","TDLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
SSblackbox.add_details("admin_verb","TDLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/mob/living/carbon/proc/has_penis()

View File

@@ -45,9 +45,9 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
switch(controller)
if("Master")
Recreate_MC()
feedback_add_details("admin_verb","Restart Master Controller")
SSblackbox.add_details("admin_verb","Restart Master Controller")
if("Failsafe")
new /datum/controller/failsafe()
feedback_add_details("admin_verb","Restart Failsafe Controller")
SSblackbox.add_details("admin_verb","Restart Failsafe Controller")
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.")

View File

@@ -43,10 +43,8 @@
var/log_attack = 0 // log attack messages
var/log_adminchat = 0 // log admin chat messages
var/log_pda = 0 // log pda messages
var/log_hrefs = 0 // log all links clicked in-game. Could be used for debugging and tracking down exploits
var/log_twitter = 0 // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases.
var/log_world_topic = 0 // log all world.Topic() calls
var/log_runtimes = FALSE // log runtimes into a file
var/sql_enabled = 0 // for sql switching
var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour
var/allow_vote_restart = 0 // allow votes to restart
@@ -66,9 +64,9 @@
var/respawn = 1
var/guest_jobban = 1
var/usewhitelist = 0
var/inactivity_period = 3000 //time in ds until a player is considered inactive
var/afk_period = 6000 //time in ds until a player is considered afk and kickable
var/kick_inactive = FALSE //force disconnect for inactive players
var/inactivity_period = 3000 //time in ds until a player is considered inactive
var/afk_period = 6000 //time in ds until a player is considered afk and kickable
var/kick_inactive = FALSE //force disconnect for inactive players
var/load_jobs_from_txt = 0
var/automute_on = 0 //enables automuting/spam prevention
var/minimal_access_threshold = 0 //If the number of players is larger than this threshold, minimal access will be turned on.
@@ -129,6 +127,7 @@
var/forbid_peaceborg = 0
var/panic_bunker = 0 // prevents new people it hasn't seen before from connecting
var/notify_new_player_age = 0 // how long do we notify admins of a new player
var/notify_new_player_account_age = 0 // how long do we notify admins of a new byond account
var/irc_first_connection_alert = 0 // do we notify the irc channel when somebody is connecting for the first time?
var/traitor_scaling_coeff = 6 //how much does the amount of players get divided by to determine traitors
@@ -269,7 +268,7 @@
if(M.config_tag)
if(!(M.config_tag in modes)) // ensure each mode is added only once
GLOB.diary << "Adding game mode [M.name] ([M.config_tag]) to configuration."
GLOB.config_error_log << "Adding game mode [M.name] ([M.config_tag]) to configuration."
modes += M.config_tag
mode_names[M.config_tag] = M.name
probabilities[M.config_tag] = M.probability
@@ -291,7 +290,7 @@
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 = world.file2list(filename)
var/list/Lines = world.file2list(filename)
for(var/t in Lines)
if(!t)
@@ -358,8 +357,6 @@
log_adminchat = 1
if("log_pda")
log_pda = 1
if("log_hrefs")
log_hrefs = 1
if("log_twitter")
log_twitter = 1
if("log_world_topic")
@@ -410,12 +407,12 @@
usewhitelist = TRUE
if("allow_metadata")
allow_Metadata = 1
if("inactivity_period")
inactivity_period = text2num(value) * 10 //documented as seconds in config.txt
if("afk_period")
afk_period = text2num(value) * 10 // ^^^
if("inactivity_period")
inactivity_period = text2num(value) * 10 //documented as seconds in config.txt
if("afk_period")
afk_period = text2num(value) * 10 // ^^^
if("kick_inactive")
kick_inactive = TRUE
kick_inactive = TRUE
if("load_jobs_from_txt")
load_jobs_from_txt = 1
if("forbid_singulo_possession")
@@ -476,6 +473,8 @@
panic_bunker = 1
if("notify_new_player_age")
notify_new_player_age = text2num(value)
if("notify_new_player_account_age")
notify_new_player_account_age = text2num(value)
if("irc_first_connection_alert")
irc_first_connection_alert = 1
if("check_randomizer")
@@ -493,12 +492,6 @@
ipintel_save_bad = text2num(value)
if("aggressive_changelog")
aggressive_changelog = 1
if("log_runtimes")
log_runtimes = TRUE
var/newlog = file("data/logs/runtimes/runtime-[time2text(world.realtime, "YYYY-MM-DD")].log")
if(GLOB.runtime_diary != newlog)
world.log << "Now logging runtimes to data/logs/runtimes/runtime-[time2text(world.realtime, "YYYY-MM-DD")].log"
GLOB.runtime_diary = newlog
if("autoconvert_notes")
autoconvert_notes = 1
if("allow_webclient")
@@ -542,7 +535,7 @@
if("error_msg_delay")
error_msg_delay = text2num(value)
else
GLOB.diary << "Unknown setting in configuration: '[name]'"
GLOB.config_error_log << "Unknown setting in configuration: '[name]'"
else if(type == "game_options")
switch(name)
@@ -605,13 +598,13 @@
if(mode_name in modes)
continuous[mode_name] = 1
else
GLOB.diary << "Unknown continuous configuration definition: [mode_name]."
GLOB.config_error_log << "Unknown continuous configuration definition: [mode_name]."
if("midround_antag")
var/mode_name = lowertext(value)
if(mode_name in modes)
midround_antag[mode_name] = 1
else
GLOB.diary << "Unknown midround antagonist configuration definition: [mode_name]."
GLOB.config_error_log << "Unknown midround antagonist configuration definition: [mode_name]."
if("midround_antag_time_check")
midround_antag_time_check = text2num(value)
if("midround_antag_life_check")
@@ -627,9 +620,9 @@
if(mode_name in modes)
min_pop[mode_name] = text2num(mode_value)
else
GLOB.diary << "Unknown minimum population configuration definition: [mode_name]."
GLOB.config_error_log << "Unknown minimum population configuration definition: [mode_name]."
else
GLOB.diary << "Incorrect minimum population configuration definition: [mode_name] [mode_value]."
GLOB.config_error_log << "Incorrect minimum population configuration definition: [mode_name] [mode_value]."
if("max_pop")
var/pop_pos = findtext(value, " ")
var/mode_name = null
@@ -641,9 +634,9 @@
if(mode_name in modes)
max_pop[mode_name] = text2num(mode_value)
else
GLOB.diary << "Unknown maximum population configuration definition: [mode_name]."
GLOB.config_error_log << "Unknown maximum population configuration definition: [mode_name]."
else
GLOB.diary << "Incorrect maximum population configuration definition: [mode_name] [mode_value]."
GLOB.config_error_log << "Incorrect maximum population configuration definition: [mode_name] [mode_value]."
if("shuttle_refuel_delay")
shuttle_refuel_delay = text2num(value)
if("show_game_type_odds")
@@ -671,9 +664,9 @@
if(prob_name in modes)
probabilities[prob_name] = text2num(prob_value)
else
GLOB.diary << "Unknown game mode probability configuration definition: [prob_name]."
GLOB.config_error_log << "Unknown game mode probability configuration definition: [prob_name]."
else
GLOB.diary << "Incorrect probability configuration definition: [prob_name] [prob_value]."
GLOB.config_error_log << "Incorrect probability configuration definition: [prob_name] [prob_value]."
if("protect_roles_from_antagonist")
protect_roles_from_antagonist = 1
@@ -720,7 +713,7 @@
// Value is in the form "LAWID,NUMBER"
var/list/L = splittext(value, ",")
if(L.len != 2)
GLOB.diary << "Invalid LAW_WEIGHT: " + t
GLOB.config_error_log << "Invalid LAW_WEIGHT: " + t
continue
var/lawid = L[1]
var/weight = text2num(L[2])
@@ -776,8 +769,8 @@
mentors_mobname_only = 1
if ("mentor_legacy_system")
mentor_legacy_system = 1
else
GLOB.diary << "Unknown setting in configuration: '[name]'"
// else
// GLOB.config_error_log << "Adding game mode [M.name] ([M.config_tag]) to configuration."
fps = round(fps)
if(fps <= 0)
@@ -785,7 +778,7 @@
/datum/configuration/proc/loadmaplist(filename)
var/list/Lines = world.file2list(filename)
var/list/Lines = world.file2list(filename)
var/datum/map_config/currentmap = null
for(var/t in Lines)
@@ -831,11 +824,11 @@
maplist[currentmap.map_name] = currentmap
currentmap = null
else
GLOB.diary << "Unknown command in map vote config: '[command]'"
GLOB.config_error_log << "Unknown command in map vote config: '[command]'"
/datum/configuration/proc/loadsql(filename)
var/list/Lines = world.file2list(filename)
var/list/Lines = world.file2list(filename)
for(var/t in Lines)
if(!t)
continue
@@ -875,7 +868,7 @@
if("feedback_tableprefix")
global.sqlfdbktableprefix = value
else
GLOB.diary << "Unknown setting in configuration: '[name]'"
GLOB.config_error_log << "Unknown setting in configuration: '[name]'"
/datum/configuration/proc/pick_mode(mode_name)
// I wish I didn't have to instance the game modes in order to look up

View File

@@ -52,6 +52,12 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
/datum/controller/global_vars/Initialize()
gvars_datum_init_order = list()
gvars_datum_protected_varlist = list("gvars_datum_protected_varlist")
//See https://github.com/tgstation/tgstation/issues/26954
for(var/I in typesof(/datum/controller/global_vars/proc))
var/CLEANBOT_RETURNS = "[I]"
pass(CLEANBOT_RETURNS)
for(var/I in vars - gvars_datum_in_built_vars)
var/start_tick = world.time
call(src, "InitGlobal[I]")()

View File

@@ -48,7 +48,7 @@ GLOBAL_VAR_INIT(CURRENT_TICKLIMIT, TICK_LIMIT_RUNNING)
var/initializations_finished_with_no_players_logged_in //I wonder what this could be?
// Has round started? (So we know what subsystems to run)
var/round_started = 0
var/local_round_started = FALSE //Don't read this var, use SSticker.HasRoundStarted() instead
// The type of the last subsystem to be process()'d.
var/last_type_processed
@@ -189,7 +189,7 @@ GLOBAL_VAR_INIT(CURRENT_TICKLIMIT, TICK_LIMIT_RUNNING)
// Notify the MC that the round has started.
/datum/controller/master/proc/RoundStart()
round_started = 1
local_round_started = TRUE
var/timer = world.time
for (var/datum/controller/subsystem/SS in subsystems)
if (SS.flags & SS_FIRE_IN_LOBBY || SS.flags & SS_TICKER)
@@ -222,7 +222,7 @@ GLOBAL_VAR_INIT(CURRENT_TICKLIMIT, TICK_LIMIT_RUNNING)
// local vars rock
// Schedule the first run of the Subsystems.
round_started = world.has_round_started()
local_round_started = world.has_round_started()
//all this shit is here so that flag edits can be refreshed by restarting the MC. (and for speed)
var/list/tickersubsystems = list()
var/list/normalsubsystems = list()
@@ -245,7 +245,7 @@ GLOBAL_VAR_INIT(CURRENT_TICKLIMIT, TICK_LIMIT_RUNNING)
lobbysubsystems += SS
timer += world.tick_lag * rand(1, 5)
SS.next_fire = timer
else if (round_started)
else if (local_round_started)
timer += world.tick_lag * rand(1, 5)
SS.next_fire = timer
normalsubsystems += SS
@@ -280,7 +280,7 @@ GLOBAL_VAR_INIT(CURRENT_TICKLIMIT, TICK_LIMIT_RUNNING)
// because sleeps are processed in the order received, so longer sleeps are more likely to run first
if (world.tick_usage > TICK_LIMIT_MC)
sleep_delta += 2
GLOB.CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING - (TICK_LIMIT_RUNNING * 0.5)
GLOB.CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING * 0.5
sleep(world.tick_lag * (processing + sleep_delta))
continue
@@ -296,7 +296,7 @@ GLOBAL_VAR_INIT(CURRENT_TICKLIMIT, TICK_LIMIT_RUNNING)
if (!Failsafe || (Failsafe.processing_interval > 0 && (Failsafe.lasttick+(Failsafe.processing_interval*5)) < world.time))
new/datum/controller/failsafe() // (re)Start the failsafe.
if (!queue_head || !(iteration % 3))
if (round_started)
if (local_round_started)
subsystems_to_check = normalsubsystems
else
subsystems_to_check = lobbysubsystems

View File

@@ -1,9 +0,0 @@
diff a/code/controllers/subsystem/atoms.dm b/code/controllers/subsystem/atoms.dm (rejected hunks)
@@ -12,6 +12,7 @@ SUBSYSTEM_DEF(atoms)
var/old_initialized
var/list/late_loaders
+ var/list/created_atoms
var/list/BadInitializeCalls = list()

View File

@@ -1,9 +1,7 @@
GLOBAL_DATUM_INIT(blackbox, /datum/feedback, new)
//the feedback datum; stores all feedback
/datum/feedback
var/list/messages = list()
var/list/messages_admin = list()
SUBSYSTEM_DEF(blackbox)
name = "Blackbox"
wait = 6000
flags = SS_NO_TICK_CHECK
var/list/msg_common = list()
var/list/msg_science = list()
@@ -15,21 +13,48 @@ GLOBAL_DATUM_INIT(blackbox, /datum/feedback, new)
var/list/msg_syndicate = list()
var/list/msg_service = list()
var/list/msg_cargo = list()
var/list/msg_other = list()
var/list/datum/feedback_variable/feedback = new()
var/list/feedback = list() //list of datum/feedback_variable
/datum/feedback/proc/find_feedback_datum(variable)
for (var/datum/feedback_variable/FV in feedback)
if (FV.get_variable() == variable)
return FV
var/datum/feedback_variable/FV = new(variable)
feedback += FV
return FV
//poll population
/datum/controller/subsystem/blackbox/fire()
if(!SSdbcore.Connect())
return
var/playercount = 0
for(var/mob/M in GLOB.player_list)
if(M.client)
playercount += 1
var/admincount = GLOB.admins.len
var/datum/DBQuery/query_record_playercount = SSdbcore.NewQuery("INSERT INTO [format_table_name("legacy_population")] (playercount, admincount, time, server_ip, server_port) VALUES ([playercount], [admincount], '[SQLtime()]', INET_ATON('[world.internet_address]'), '[world.port]')")
query_record_playercount.Execute()
/datum/feedback/proc/get_round_feedback()
return feedback
/datum/controller/subsystem/blackbox/Recover()
msg_common = SSblackbox.msg_common
msg_science = SSblackbox.msg_science
msg_command = SSblackbox.msg_command
msg_medical = SSblackbox.msg_medical
msg_engineering = SSblackbox.msg_engineering
msg_security = SSblackbox.msg_security
msg_deathsquad = SSblackbox.msg_deathsquad
msg_syndicate = SSblackbox.msg_syndicate
msg_service = SSblackbox.msg_service
msg_cargo = SSblackbox.msg_cargo
msg_other = SSblackbox.msg_other
/datum/feedback/proc/round_end_data_gathering()
feedback = SSblackbox.feedback
//no touchie
/datum/controller/subsystem/blackbox/can_vv_get(var_name)
if(var_name == "feedback")
return FALSE
return ..()
/datum/controller/subsystem/blackbox/vv_edit_var(var_name, var_value)
return FALSE
/datum/controller/subsystem/blackbox/Shutdown()
var/pda_msg_amt = 0
var/rc_msg_amt = 0
@@ -39,41 +64,26 @@ GLOBAL_DATUM_INIT(blackbox, /datum/feedback, new)
if (MS.rc_msgs.len > rc_msg_amt)
rc_msg_amt = MS.rc_msgs.len
feedback_set_details("radio_usage","")
set_details("radio_usage","")
feedback_add_details("radio_usage","COM-[msg_common.len]")
feedback_add_details("radio_usage","SCI-[msg_science.len]")
feedback_add_details("radio_usage","HEA-[msg_command.len]")
feedback_add_details("radio_usage","MED-[msg_medical.len]")
feedback_add_details("radio_usage","ENG-[msg_engineering.len]")
feedback_add_details("radio_usage","SEC-[msg_security.len]")
feedback_add_details("radio_usage","DTH-[msg_deathsquad.len]")
feedback_add_details("radio_usage","SYN-[msg_syndicate.len]")
feedback_add_details("radio_usage","SRV-[msg_service.len]")
feedback_add_details("radio_usage","CAR-[msg_cargo.len]")
feedback_add_details("radio_usage","OTH-[messages.len]")
feedback_add_details("radio_usage","PDA-[pda_msg_amt]")
feedback_add_details("radio_usage","RC-[rc_msg_amt]")
add_details("radio_usage","COM-[msg_common.len]")
add_details("radio_usage","SCI-[msg_science.len]")
add_details("radio_usage","HEA-[msg_command.len]")
add_details("radio_usage","MED-[msg_medical.len]")
add_details("radio_usage","ENG-[msg_engineering.len]")
add_details("radio_usage","SEC-[msg_security.len]")
add_details("radio_usage","DTH-[msg_deathsquad.len]")
add_details("radio_usage","SYN-[msg_syndicate.len]")
add_details("radio_usage","SRV-[msg_service.len]")
add_details("radio_usage","CAR-[msg_cargo.len]")
add_details("radio_usage","OTH-[msg_other.len]")
add_details("radio_usage","PDA-[pda_msg_amt]")
add_details("radio_usage","RC-[rc_msg_amt]")
feedback_set_details("round_end","[time2text(world.realtime)]") //This one MUST be the last one that gets set.
set_details("round_end","[time2text(world.realtime)]") //This one MUST be the last one that gets set.
//This proc is only to be called at round end.
/datum/feedback/proc/save_all_data_to_sql()
if (!feedback) return
round_end_data_gathering() //round_end time logging and some other data processing
if (!SSdbcore.Connect()) return
var/round_id
var/datum/DBQuery/query_feedback_max_id = SSdbcore.NewQuery("SELECT MAX(round_id) AS round_id FROM [format_table_name("feedback")]")
if(!query_feedback_max_id.Execute())
if (!SSdbcore.Connect())
return
while (query_feedback_max_id.NextRow())
round_id = query_feedback_max_id.item[1]
if (!isnum(round_id))
round_id = text2num(round_id)
round_id++
var/sqlrowlist = ""
@@ -81,7 +91,7 @@ GLOBAL_DATUM_INIT(blackbox, /datum/feedback, new)
if (sqlrowlist != "")
sqlrowlist += ", " //a comma (,) at the start of the first row to insert will trigger a SQL error
sqlrowlist += "(null, Now(), [round_id], \"[sanitizeSQL(FV.get_variable())]\", [FV.get_value()], \"[sanitizeSQL(FV.get_details())]\")"
sqlrowlist += "(null, Now(), [GLOB.round_id], \"[sanitizeSQL(FV.get_variable())]\", [FV.get_value()], \"[sanitizeSQL(FV.get_details())]\")"
if (sqlrowlist == "")
return
@@ -89,69 +99,99 @@ GLOBAL_DATUM_INIT(blackbox, /datum/feedback, new)
var/datum/DBQuery/query_feedback_save = SSdbcore.NewQuery("INSERT DELAYED IGNORE INTO [format_table_name("feedback")] VALUES " + sqlrowlist)
query_feedback_save.Execute()
/datum/controller/subsystem/blackbox/proc/LogBroadcast(blackbox_msg, freq)
switch(freq)
if(1459)
msg_common += blackbox_msg
if(1351)
msg_science += blackbox_msg
if(1353)
msg_command += blackbox_msg
if(1355)
msg_medical += blackbox_msg
if(1357)
msg_engineering += blackbox_msg
if(1359)
msg_security += blackbox_msg
if(1441)
msg_deathsquad += blackbox_msg
if(1213)
msg_syndicate += blackbox_msg
if(1349)
msg_service += blackbox_msg
if(1347)
msg_cargo += blackbox_msg
else
msg_other += blackbox_msg
/proc/feedback_set(variable,value)
if(!GLOB.blackbox)
return
/datum/controller/subsystem/blackbox/proc/find_feedback_datum(variable)
for(var/datum/feedback_variable/FV in feedback)
if(FV.get_variable() == variable)
return FV
var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable)
if(!FV)
return
var/datum/feedback_variable/FV = new(variable)
feedback += FV
return FV
/datum/controller/subsystem/blackbox/proc/set_val(variable, value)
var/datum/feedback_variable/FV = find_feedback_datum(variable)
FV.set_value(value)
/proc/feedback_inc(variable,value)
if(!GLOB.blackbox)
return
var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable)
if(!FV)
return
/datum/controller/subsystem/blackbox/proc/inc(variable, value)
var/datum/feedback_variable/FV = find_feedback_datum(variable)
FV.inc(value)
/proc/feedback_dec(variable,value)
if(!GLOB.blackbox)
return
var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable)
if(!FV)
return
/datum/controller/subsystem/blackbox/proc/dec(variable,value)
var/datum/feedback_variable/FV = find_feedback_datum(variable)
FV.dec(value)
/proc/feedback_set_details(variable,details)
if(!GLOB.blackbox)
return
var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable)
if(!FV)
return
/datum/controller/subsystem/blackbox/proc/set_details(variable,details)
var/datum/feedback_variable/FV = find_feedback_datum(variable)
FV.set_details(details)
/proc/feedback_add_details(variable,details)
if(!GLOB.blackbox)
return
var/datum/feedback_variable/FV = GLOB.blackbox.find_feedback_datum(variable)
if(!FV)
return
/datum/controller/subsystem/blackbox/proc/add_details(variable,details)
var/datum/feedback_variable/FV = find_feedback_datum(variable)
FV.add_details(details)
/datum/controller/subsystem/blackbox/proc/ReportDeath(mob/living/L)
if(!SSdbcore.Connect())
return
if(!L || !L.key || !L.mind)
return
var/turf/T = get_turf(L)
var/area/placeofdeath = get_area(T.loc)
var/sqlname = sanitizeSQL(L.real_name)
var/sqlkey = sanitizeSQL(L.ckey)
var/sqljob = sanitizeSQL(L.mind.assigned_role)
var/sqlspecial = sanitizeSQL(L.mind.special_role)
var/sqlpod = sanitizeSQL(placeofdeath.name)
var/laname
var/lakey
if(L.lastattacker && ismob(L.lastattacker))
var/mob/LA = L.lastattacker
laname = sanitizeSQL(LA.real_name)
lakey = sanitizeSQL(LA.key)
var/sqlgender = sanitizeSQL(L.gender)
var/sqlbrute = sanitizeSQL(L.getBruteLoss())
var/sqlfire = sanitizeSQL(L.getFireLoss())
var/sqlbrain = sanitizeSQL(L.getBrainLoss())
var/sqloxy = sanitizeSQL(L.getOxyLoss())
var/sqltox = sanitizeSQL(L.getStaminaLoss())
var/sqlclone = sanitizeSQL(L.getStaminaLoss())
var/sqlstamina = sanitizeSQL(L.getStaminaLoss())
var/coord = sanitizeSQL("[L.x], [L.y], [L.z]")
var/map = sanitizeSQL(SSmapping.config.map_name)
var/datum/DBQuery/query_report_death = SSdbcore.NewQuery("INSERT INTO [format_table_name("death")] (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, toxloss, cloneloss, staminaloss, coord, mapname, server_ip, server_port) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[SQLtime()]', '[laname]', '[lakey]', '[sqlgender]', [sqlbrute], [sqlfire], [sqlbrain], [sqloxy], [sqltox], [sqlclone], [sqlstamina], '[coord]', '[map]', INET_ATON('[world.internet_address]'), '[world.port]')")
query_report_death.Execute()
//feedback variable datum, for storing all kinds of data
/datum/feedback_variable
var/variable
var/value
var/details
/datum/feedback_variable/New(var/param_variable,var/param_value = 0)
/datum/feedback_variable/New(param_variable, param_value = 0)
variable = param_variable
value = param_value
@@ -204,50 +244,3 @@ GLOBAL_DATUM_INIT(blackbox, /datum/feedback, new)
/datum/feedback_variable/proc/get_parsed()
return list(variable,value,details)
//sql reporting procs
/proc/sql_poll_population()
if(!config.sql_enabled)
return
if(!SSdbcore.Connect())
return
var/playercount = 0
for(var/mob/M in GLOB.player_list)
if(M.client)
playercount += 1
var/admincount = GLOB.admins.len
var/datum/DBQuery/query_record_playercount = SSdbcore.NewQuery("INSERT INTO [format_table_name("legacy_population")] (playercount, admincount, time, server_ip, server_port) VALUES ([playercount], [admincount], '[SQLtime()]', INET_ATON('[world.internet_address]'), '[world.port]')")
query_record_playercount.Execute()
/proc/sql_report_death(mob/living/L)
if(!config.sql_enabled)
return
if(!SSdbcore.Connect())
return
if(!L || !L.key || !L.mind)
return
var/turf/T = get_turf(L)
var/area/placeofdeath = get_area(T.loc)
var/sqlname = sanitizeSQL(L.real_name)
var/sqlkey = sanitizeSQL(L.ckey)
var/sqljob = sanitizeSQL(L.mind.assigned_role)
var/sqlspecial = sanitizeSQL(L.mind.special_role)
var/sqlpod = sanitizeSQL(placeofdeath.name)
var/laname
var/lakey
if(L.lastattacker && ismob(L.lastattacker))
var/mob/LA = L.lastattacker
laname = sanitizeSQL(LA.real_name)
lakey = sanitizeSQL(LA.key)
var/sqlgender = sanitizeSQL(L.gender)
var/sqlbrute = sanitizeSQL(L.getBruteLoss())
var/sqlfire = sanitizeSQL(L.getFireLoss())
var/sqlbrain = sanitizeSQL(L.getBrainLoss())
var/sqloxy = sanitizeSQL(L.getOxyLoss())
var/sqltox = sanitizeSQL(L.getStaminaLoss())
var/sqlclone = sanitizeSQL(L.getStaminaLoss())
var/sqlstamina = sanitizeSQL(L.getStaminaLoss())
var/coord = sanitizeSQL("[L.x], [L.y], [L.z]")
var/map = sanitizeSQL(SSmapping.config.map_name)
var/datum/DBQuery/query_report_death = SSdbcore.NewQuery("INSERT INTO [format_table_name("death")] (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, toxloss, cloneloss, staminaloss, coord, mapname, server_ip, server_port) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[SQLtime()]', '[laname]', '[lakey]', '[sqlgender]', [sqlbrute], [sqlfire], [sqlbrain], [sqloxy], [sqltox], [sqlclone], [sqlstamina], '[coord]', '[map]', INET_ATON('[world.internet_address]'), '[world.port]')")
query_report_death.Execute()

View File

@@ -483,7 +483,7 @@ SUBSYSTEM_DEF(job)
else level4++ //not selected
tmp_str += "HIGH=[level1]|MEDIUM=[level2]|LOW=[level3]|NEVER=[level4]|BANNED=[level5]|YOUNG=[level6]|-"
feedback_add_details("job_preferences",tmp_str)
SSblackbox.add_details("job_preferences",tmp_str)
/datum/controller/subsystem/job/proc/PopcapReached()
if(config.hard_popcap || config.extreme_popcap)

View File

@@ -36,18 +36,10 @@ SUBSYSTEM_DEF(lighting)
for (i in 1 to GLOB.lighting_update_lights.len)
var/datum/light_source/L = GLOB.lighting_update_lights[i]
if (L.check() || QDELETED(L) || L.force_update)
L.remove_lum()
if (!QDELETED(L))
L.apply_lum()
L.update_corners()
else if (L.vis_update) //We smartly update only tiles that became (in) visible to use.
L.smart_vis_update()
L.needs_update = LIGHTING_NO_UPDATE
L.vis_update = FALSE
L.force_update = FALSE
L.needs_update = FALSE
if(init_tick_checks)
CHECK_TICK
else if (MC_TICK_CHECK)

View File

@@ -119,7 +119,7 @@ SUBSYSTEM_DEF(mapping)
INIT_ANNOUNCE("Loading [config.map_name]...")
TryLoadZ(config.GetFullMapPath(), FailedZs, ZLEVEL_STATION)
INIT_ANNOUNCE("Loaded station in [(REALTIMEOFDAY - start_time)/10]s!")
feedback_add_details("map_name", config.map_name)
SSblackbox.add_details("map_name", config.map_name)
if(config.minetype != "lavaland")
INIT_ANNOUNCE("WARNING: A map without lavaland set as it's minetype was loaded! This is being ignored! Update the maploader code!")

View File

@@ -150,7 +150,7 @@ SUBSYSTEM_DEF(pai)
if(!(ROLE_PAI in G.client.prefs.be_special))
continue
//G << 'sound/misc/server-ready.ogg' //Alerting them to their consideration
to_chat(G, "<span class='ghostalert'>Someone is requesting a pAI personality! Use the pAI button to submit yourself as one.</span>")
to_chat(G, "<span class='ghostalert'>[user] is requesting a pAI personality! Use the pAI button to submit yourself as one.</span>")
addtimer(CALLBACK(src, .proc/spam_again), spam_delay)
var/list/available = list()
for(var/datum/paiCandidate/c in SSpai.candidates)

View File

@@ -11,10 +11,14 @@ SUBSYSTEM_DEF(persistence)
var/list/saved_messages = list()
var/savefile/chisel_messages_sav
var/savefile/trophy_sav
var/list/saved_trophies = list()
/datum/controller/subsystem/persistence/Initialize()
LoadSatchels()
LoadPoly()
LoadChiselMessages()
LoadTrophies()
..()
/datum/controller/subsystem/persistence/proc/LoadSatchels()
@@ -105,10 +109,52 @@ SUBSYSTEM_DEF(persistence)
M.persists = FALSE
qdel(M)
/datum/controller/subsystem/persistence/proc/LoadTrophies()
trophy_sav = new /savefile("data/npc_saves/TrophyItems.sav")
var/saved_json
trophy_sav >> saved_json
if(!saved_json)
return
var/decoded_json = json_decode(saved_json)
if(!islist(decoded_json))
return
saved_trophies = decoded_json
SetUpTrophies(saved_trophies.Copy())
/datum/controller/subsystem/persistence/proc/SetUpTrophies(list/trophy_items)
for(var/A in GLOB.trophy_cases)
var/obj/structure/displaycase/trophy/T = A
T.added_roundstart = TRUE
var/trophy_data = pick_n_take(trophy_items)
if(!islist(trophy_data))
continue
var/list/chosen_trophy = trophy_data
if(!chosen_trophy || isemptylist(chosen_trophy)) //Malformed
continue
var/path = text2path(chosen_trophy["path"]) //If the item no longer exist, this returns null
if(!path)
continue
T.showpiece = new /obj/item/showpiece_dummy(T, path)
T.trophy_message = chosen_trophy["message"]
T.placer_key = chosen_trophy["placer_key"]
T.update_icon()
/datum/controller/subsystem/persistence/proc/CollectData()
CollectChiselMessages()
CollectSecretSatchels()
CollectTrophies()
/datum/controller/subsystem/persistence/proc/CollectSecretSatchels()
for(var/A in new_secret_satchels)
@@ -135,4 +181,16 @@ SUBSYSTEM_DEF(persistence)
chisel_messages_sav[SSmapping.config.map_name] << json_encode(saved_messages)
/datum/controller/subsystem/persistence/proc/SaveChiselMessage(obj/structure/chisel_message/M)
saved_messages += list(M.pack()) // dm eats one list.
saved_messages += list(M.pack()) // dm eats one list
/datum/controller/subsystem/persistence/proc/CollectTrophies()
trophy_sav << json_encode(saved_trophies)
/datum/controller/subsystem/persistence/proc/SaveTrophy(obj/structure/displaycase/trophy/T)
if(!T.added_roundstart && T.showpiece)
var/list/data = list()
data["path"] = T.showpiece.type
data["message"] = T.trophy_message
data["placer_key"] = T.placer_key
saved_trophies += list(data)

View File

@@ -3,14 +3,20 @@
SUBSYSTEM_DEF(ping)
name = "Ping"
wait = 6
flags = SS_NO_INIT|SS_POST_FIRE_TIMING|SS_FIRE_IN_LOBBY
flags = SS_POST_FIRE_TIMING|SS_FIRE_IN_LOBBY
priority = 10
var/list/currentrun
/datum/controller/subsystem/ping/Initialize()
if (config.hub)
world.visibility = 1
..()
/datum/controller/subsystem/ping/fire(resumed = FALSE)
if (!resumed)
src.currentrun = GLOB.clients.Copy()
var/round_started = Master.round_started
var/list/currentrun = src.currentrun
while (length(currentrun))
var/client/C = currentrun[currentrun.len]
@@ -19,7 +25,15 @@ SUBSYSTEM_DEF(ping)
if (MC_TICK_CHECK)
return
continue
if(round_started && C.is_afk(INACTIVITY_KICK))
if(!istype(C.mob, /mob/dead))
log_access("AFK: [key_name(C)]")
to_chat(C, "<span class='danger'>You have been inactive for more than 10 minutes and have been disconnected.</span>")
qdel(C)
winset(C, null, "command=.update_ping+[world.time+world.tick_lag*world.tick_usage/100]")
if (MC_TICK_CHECK) //one day, when ss13 has 1000 people per server, you guys are gonna be glad I added this tick check
return

View File

@@ -5,7 +5,7 @@ PROCESSING_SUBSYSTEM_DEF(flightpacks)
stat_tag = "FM"
flags = SS_NO_INIT|SS_TICKER|SS_KEEP_TIMING
var/flightsuit_processing = FLIGHTSUIT_PROCESSING_FULL
var/flightsuit_processing = FLIGHTSUIT_PROCESSING_NONE
/datum/controller/subsystem/processing/flightpacks/Initialize()
sync_flightsuit_processing()

View File

@@ -1,17 +1,28 @@
#define PING_BUFFER_TIME 25
SUBSYSTEM_DEF(server_maint)
name = "Server Tasks"
wait = 6000
flags = SS_NO_TICK_CHECK
wait = 6
flags = SS_POST_FIRE_TIMING|SS_FIRE_IN_LOBBY
priority = 10
var/list/currentrun
/datum/controller/subsystem/server_maint/Initialize(timeofday)
if (config.hub)
world.visibility = 1
..()
/datum/controller/subsystem/server_maint/fire()
//handle kicking inactive players
if(config.kick_inactive)
for(var/client/C in GLOB.clients)
/datum/controller/subsystem/server_maint/fire(resumed = FALSE)
if(!resumed)
src.currentrun = GLOB.clients.Copy()
var/list/currentrun = src.currentrun
var/round_started = SSticker.HasRoundStarted()
for(var/I in currentrun)
var/client/C = I
//handle kicking inactive players
if(round_started && config.kick_inactive)
if(C.is_afk(config.afk_period))
var/cmob = C.mob
if(!(istype(cmob, /mob/dead/observer) || (istype(cmob, /mob/dead) && C.holder)))
@@ -19,5 +30,10 @@ SUBSYSTEM_DEF(server_maint)
to_chat(C, "<span class='danger'>You have been inactive for more than [config.afk_period / 600] minutes and have been disconnected.</span>")
qdel(C)
if(config.sql_enabled)
sql_poll_population()
if (!(!C || world.time - C.connection_time < PING_BUFFER_TIME || C.inactivity >= (wait-1)))
winset(C, null, "command=.update_ping+[world.time+world.tick_lag*world.tick_usage/100]")
if (MC_TICK_CHECK) //one day, when ss13 has 1000 people per server, you guys are gonna be glad I added this tick check
return
#undef PING_BUFFER_TIME

View File

@@ -243,7 +243,7 @@ SUBSYSTEM_DEF(ticker)
send2irc("Server", "Round of [hide_mode ? "secret":"[mode.name]"] has started[allmins.len ? ".":" with no active admins online!"]")
/datum/controller/subsystem/ticker/proc/OnRoundstart(datum/callback/cb)
if(current_state < GAME_STATE_PLAYING)
if(!HasRoundStarted())
LAZYADD(round_start_events, cb)
else
cb.InvokeAsync()
@@ -625,8 +625,8 @@ SUBSYSTEM_DEF(ticker)
if(selected_tip)
m = selected_tip
else
var/list/randomtips = world.file2list("config/tips.txt")
var/list/memetips = world.file2list("config/sillytips.txt")
var/list/randomtips = world.file2list("strings/tips.txt")
var/list/memetips = world.file2list("strings/sillytips.txt")
if(randomtips.len && prob(95))
m = pick(randomtips)
else if(memetips.len)
@@ -672,15 +672,16 @@ SUBSYSTEM_DEF(ticker)
return
INVOKE_ASYNC(SSmapping, /datum/controller/subsystem/mapping/.proc/maprotate)
/datum/controller/subsystem/ticker/proc/HasRoundStarted()
return current_state >= GAME_STATE_PLAYING
/datum/controller/subsystem/ticker/proc/IsRoundInProgress()
return current_state == GAME_STATE_PLAYING
/proc/send_gamemode_vote()
SSticker.modevoted = TRUE
SSvote.initiate_vote("roundtype","server")
/world/proc/has_round_started()
if (SSticker && SSticker.current_state >= GAME_STATE_PLAYING)
return TRUE
return FALSE
/datum/controller/subsystem/ticker/Recover()
current_state = SSticker.current_state
force_ending = SSticker.force_ending

View File

@@ -124,7 +124,7 @@ SUBSYSTEM_DEF(vote)
if("gamemode")
if(GLOB.master_mode != .)
world.save_mode(.)
if(SSticker && SSticker.mode)
if(SSticker.HasRoundStarted())
restart = 1
else
GLOB.master_mode = .

View File

@@ -8,13 +8,26 @@
var/can_coexist_with_others = TRUE //Whether or not the person will be able to have more than one datum
var/list/typecache_datum_blacklist = list() //List of datums this type can't coexist with
/datum/antagonist/New(datum/mind/new_owner)
. = ..()
typecache_datum_blacklist = typecacheof(typecache_datum_blacklist)
if(new_owner)
owner = new_owner
/datum/antagonist/Destroy()
if(owner)
LAZYREMOVE(owner.antag_datums, src)
owner = null
return ..()
/datum/antagonist/proc/can_be_owned(datum/mind/new_owner)
. = TRUE
if(owner.has_antag_datum(type))
return FALSE
for(var/i in owner.antag_datums)
var/datum/antagonist/A = i
if(is_type_in_typecache(src, A.typecache_datum_blacklist))
return FALSE
/datum/antagonist/proc/on_body_transfer(mob/living/old_body, mob/living/new_body)
remove_innate_effects(old_body)
apply_innate_effects(new_body)
@@ -37,7 +50,7 @@
/datum/antagonist/proc/on_removal()
remove_innate_effects()
if(owner)
owner.antag_datums -= src
LAZYREMOVE(owner.antag_datums, src)
if(!silent && owner.current)
farewell()
qdel(src)
@@ -46,4 +59,4 @@
return
/datum/antagonist/proc/farewell()
return
return

View File

@@ -9,23 +9,49 @@
qdel(hierophant_network)
return ..()
/datum/antagonist/clockcult/can_be_owned(datum/mind/new_owner)
. = ..()
if(.)
if(iscyborg(new_owner.current))
var/mob/living/silicon/robot/R = new_owner.current
if(R.deployed)
var/mob/living/silicon/ai/AI = R.mainframe
R.undeploy()
to_chat(AI, "<span class='userdanger'>Anomaly Detected. Returned to core!</span>") //The AI needs to be in its core to properly be converted
. = is_eligible_servant(new_owner.current)
if(!silent && new_owner.current)
if(issilicon(new_owner.current))
to_chat(new_owner.current, "<span class='heavy_brass'>You are unable to compute this truth. Your vision glows a brilliant yellow, and all at once it comes to you. Ratvar, the \
Clockwork Justiciar, lies in exile, derelict and forgotten in an unseen realm.</span>")
else
to_chat(new_owner.current, "<span class='heavy_brass'>[iscarbon(new_owner.current) ? "Your mind is racing! Your body feels incredibly light! ":""]Your world glows a brilliant \
yellow! All at once it comes to you. Ratvar, the Clockwork Justiciar, lies in exile, derelict and forgotten in an unseen realm.</span>")
if(!.)
new_owner.current.visible_message("<span class='boldwarning'>[new_owner.current] seems to resist an unseen force!</span>")
to_chat(new_owner.current, "<span class='userdanger'>And yet, you somehow push it all away.</span>")
/datum/antagonist/clockcult/greet()
if(!owner.current || silent)
return
owner.current.visible_message("<span class='heavy_brass'>[owner.current]'s eyes glow a blazing yellow!</span>")
to_chat(owner.current, "<span class='heavy_brass'>Assist your new companions in their righteous efforts. Your goal is theirs, and theirs yours. You serve the Clockwork \
Justiciar above all else. Perform his every whim without hesitation.</span>")
/datum/antagonist/clockcult/on_gain()
if(!owner)
return
var/mob/living/current = owner.current
if(!istype(current))
return
SSticker.mode.servants_of_ratvar += owner
SSticker.mode.update_servant_icons_added(owner)
if(jobban_isbanned(current, ROLE_SERVANT_OF_RATVAR))
addtimer(CALLBACK(SSticker.mode, /datum/game_mode.proc/replace_jobbaned_player, owner, ROLE_SERVANT_OF_RATVAR, ROLE_SERVANT_OF_RATVAR), 0)
addtimer(CALLBACK(SSticker.mode, /datum/game_mode.proc/replace_jobbaned_player, current, ROLE_SERVANT_OF_RATVAR, ROLE_SERVANT_OF_RATVAR), 0)
owner.special_role = "Servant of Ratvar"
owner.current.log_message("<font color=#BE8700>Has been converted to the cult of Ratvar!</font>", INDIVIDUAL_ATTACK_LOG)
if(issilicon(current))
var/mob/living/silicon/S = owner
if(iscyborg(S) && !silent)
to_chat(S, "<span class='boldwarning'>You have been desynced from your master AI.</span>")
to_chat(S, "<span class='boldwarning'>In addition, your onboard camera is no longer active and you have gained additional equipment, including a limited clockwork slab.</span>")
if(isAI(S))
to_chat(S, "<span class='boldwarning'>You are able to use your cameras to listen in on conversations.</span>")
to_chat(S, "<span class='heavy_brass'>You can communicate with other servants by using the Hierophant Network action button in the upper left.</span>")
if(iscyborg(current) && !silent)
to_chat(current, "<span class='boldwarning'>You have been desynced from your master AI.</span>")
to_chat(current, "<span class='boldwarning'>In addition, your onboard camera is no longer active and you have gained additional equipment, including a limited clockwork slab.</span>")
if(isAI(current))
to_chat(current, "<span class='boldwarning'>You are able to use your cameras to listen in on conversations.</span>")
to_chat(current, "<span class='heavy_brass'>You can communicate with other servants by using the Hierophant Network action button in the upper left.</span>")
else if(isbrain(current) || isclockmob(current))
to_chat(current, "<span class='nezbere'>You can communicate with other servants by using the Hierophant Network action button in the upper left.</span>")
..()
@@ -39,7 +65,6 @@
if(istype(mob_override))
current = mob_override
GLOB.all_clockwork_mobs += current
SSticker.mode.update_servant_icons_added(owner)
current.faction |= "ratvar"
current.grant_language(/datum/language/ratvar)
current.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them for whatever reason, we need to update buttons
@@ -47,11 +72,17 @@
var/mob/living/silicon/S = current
if(iscyborg(S))
var/mob/living/silicon/robot/R = S
R.UnlinkSelf()
if(!R.shell)
R.UnlinkSelf()
R.module.rebuild_modules()
else if(isAI(S))
var/mob/living/silicon/ai/A = S
A.can_be_carded = FALSE
A.requires_power = POWER_REQ_CLOCKCULT
var/list/AI_frame = list(mutable_appearance('icons/mob/clockwork_mobs.dmi', "aiframe")) //make the AI's cool frame
for(var/d in GLOB.cardinal)
AI_frame += image('icons/mob/clockwork_mobs.dmi', A, "eye[rand(1, 10)]", dir = d) //the eyes are randomly fast or slow
A.add_overlay(AI_frame)
if(!A.lacks_power())
A.ai_restore_power()
if(A.eyeobj)
@@ -84,8 +115,6 @@
current.throw_alert("clockinfo", /obj/screen/alert/clockwork/infodump)
if(!GLOB.clockwork_gateway_activated)
current.throw_alert("scripturereq", /obj/screen/alert/clockwork/scripture_reqs)
update_slab_info()
/datum/antagonist/clockcult/remove_innate_effects(mob/living/mob_override)
var/mob/living/current = owner.current
@@ -102,7 +131,9 @@
var/mob/living/silicon/S = current
if(isAI(S))
var/mob/living/silicon/ai/A = S
A.can_be_carded = initial(A.can_be_carded)
A.requires_power = initial(A.requires_power)
A.cut_overlays()
S.make_laws()
S.update_icons()
S.show_laws()
@@ -113,13 +144,16 @@
R.module.rebuild_modules()
if(temp_owner)
temp_owner.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them, we need to update buttons
update_slab_info()
/datum/antagonist/clockcult/on_removal()
. = ..()
SSticker.mode.servants_of_ratvar -= owner
SSticker.mode.update_servant_icons_removed(owner)
if(!silent)
owner.current.visible_message("<span class='big'>[owner] seems to have remembered their true allegiance!</span>", \
"<span class='userdanger'>A cold, cold darkness flows through your mind, extinguishing the Justiciar's light and all of your memories as his servant.</span>")
owner.current.log_message("<font color=#BE8700>Has renounced the cult of Ratvar!</font>", INDIVIDUAL_ATTACK_LOG)
owner.wipe_memory()
owner.special_role = null
if(iscyborg(owner.current))
to_chat(owner.current, "<span class='warning'>Despite your freedom from Ratvar's influence, you are still irreparably damaged and no longer possess certain functions such as AI linking.</span>")
to_chat(owner.current, "<span class='warning'>Despite your freedom from Ratvar's influence, you are still irreparably damaged and no longer possess certain functions such as AI linking.</span>")
. = ..()

View File

@@ -5,29 +5,46 @@
qdel(communion)
return ..()
/datum/antagonist/cult/can_be_owned(datum/mind/new_owner)
. = ..()
if(.)
. = is_convertable_to_cult(new_owner.current)
/datum/antagonist/cult/on_gain()
. = ..()
if(!owner)
return
SSticker.mode.cult += owner
SSticker.mode.update_cult_icons_added(owner)
if(istype(SSticker.mode, /datum/game_mode/cult))
var/datum/game_mode/cult/C = SSticker.mode
C.memorize_cult_objectives(owner)
if(jobban_isbanned(owner.current, ROLE_CULTIST))
addtimer(CALLBACK(SSticker.mode, /datum/game_mode.proc/replace_jobbaned_player, owner, ROLE_CULTIST, ROLE_CULTIST), 0)
addtimer(CALLBACK(SSticker.mode, /datum/game_mode.proc/replace_jobbaned_player, owner.current, ROLE_CULTIST, ROLE_CULTIST), 0)
owner.current.log_message("<font color=#960000>Has been converted to the cult of Nar'Sie!</font>", INDIVIDUAL_ATTACK_LOG)
/datum/antagonist/cult/apply_innate_effects()
/datum/antagonist/cult/apply_innate_effects(mob/living/mob_override)
. = ..()
owner.current.faction |= "cult"
owner.current.verbs += /mob/living/proc/cult_help
communion.Grant(owner)
var/mob/living/current = owner.current
if(mob_override)
current = mob_override
current.faction |= "cult"
current.verbs += /mob/living/proc/cult_help
communion.Grant(current)
/datum/antagonist/cult/remove_innate_effects()
/datum/antagonist/cult/remove_innate_effects(mob/living/mob_override)
. = ..()
owner.current.faction -= "cult"
owner.current.verbs -= /mob/living/proc/cult_help
var/mob/living/current = owner.current
if(mob_override)
current = mob_override
current.faction -= "cult"
current.verbs -= /mob/living/proc/cult_help
communion.Remove(current)
/datum/antagonist/cult/on_removal()
. = ..()
owner.wipe_memory()
SSticker.mode.cult -= owner
SSticker.mode.update_cult_icons_removed(owner)
to_chat(owner, "<span class='userdanger'>An unfamiliar white light flashes through your mind, cleansing the taint of the Dark One and all your memories as its servant.</span>")
owner.current.log_message("<font color=#960000>Has renounced the cult of Nar'Sie!</font>", INDIVIDUAL_ATTACK_LOG)
if(!silent)
owner.current.visible_message("<span class='big'>[owner] looks like [owner.current.p_they()] just reverted to their old faith!</span>")
owner.current.visible_message("<span class='big'>[owner] looks like [owner.current.p_they()] just reverted to their old faith!</span>")
. = ..()

View File

@@ -27,7 +27,7 @@
. += "---"
.["Call Proc"] = "?_src_=vars;proc_call=\ref[src]"
.["Mark Object"] = "?_src_=vars;mark_object=\ref[src]"
.["Delete"] = "?_src_=vars;delete=\ref[src]"
.["Delete"] = "?_src_=vars;delete=\ref[src]"
/datum/proc/on_reagent_change()
@@ -94,7 +94,6 @@
CLONE:<font size='1'><a href='?_src_=vars;mobToDamage=[refid];adjustDamage=clone'>[M.getCloneLoss()]</a>
BRAIN:<font size='1'><a href='?_src_=vars;mobToDamage=[refid];adjustDamage=brain'>[M.getBrainLoss()]</a>
STAMINA:<font size='1'><a href='?_src_=vars;mobToDamage=[refid];adjustDamage=stamina'>[M.getStaminaLoss()]</a>
AROUSAL:<font size='1'><a href='?_src_=vars;mobToDamage=[refid];adjustDamage=arousal'>[M.getArousalLoss()]</a>
</font>
"}
else
@@ -447,7 +446,7 @@
var/list/L = value
var/list/items = list()
if (L.len > 0 && !(name == "underlays" || name == "overlays" || L.len > (IS_NORMAL_LIST(L) ? 50 : 150)))
if (L.len > 0 && !(name == "underlays" || name == "overlays" || L.len > (IS_NORMAL_LIST(L) ? 50 : 150)))
for (var/i in 1 to L.len)
var/key = L[i]
var/val
@@ -527,16 +526,16 @@
if(T)
callproc_datum(T)
else if(href_list["delete"])
if(!check_rights(R_DEBUG, 0))
return
var/datum/D = locate(href_list["delete"])
if(!D)
to_chat(usr, "Unable to locate item!")
admin_delete(D)
href_list["datumrefresh"] = href_list["delete"]
else if(href_list["delete"])
if(!check_rights(R_DEBUG, 0))
return
var/datum/D = locate(href_list["delete"])
if(!D)
to_chat(usr, "Unable to locate item!")
admin_delete(D)
href_list["datumrefresh"] = href_list["delete"]
else if(href_list["regenerateicons"])
if(!check_rights(0))
return
@@ -1166,8 +1165,6 @@
L.adjustCloneLoss(amount)
if("stamina")
L.adjustStaminaLoss(amount)
if("arousal")
L.adjustArousalLoss(amount)
else
to_chat(usr, "You caused an error. DEBUG: Text:[Text] Mob:[L]")
return
@@ -1178,3 +1175,4 @@
message_admins(msg)
admin_ticket_log(L, msg)
href_list["datumrefresh"] = href_list["mobToDamage"]

View File

@@ -25,7 +25,7 @@
for(var/line in testmerge)
if(line)
log_world("Test merge active of PR #[line]")
feedback_add_details("testmerged_prs","[line]")
SSblackbox.add_details("testmerged_prs","[line]")
log_world("Based off master commit [parentcommit]")
else
log_world(parentcommit)
@@ -75,10 +75,12 @@
if(GLOB.revdata.parentcommit)
to_chat(src, "<b>Server revision compiled on:</b> [GLOB.revdata.date]")
var/prefix = ""
if(GLOB.revdata.testmerge.len)
to_chat(src, GLOB.revdata.GetTestMergeInfo())
to_chat(src, "Based off master commit:")
to_chat(src, "<a href='[config.githuburl]/commit/[GLOB.revdata.parentcommit]'>[GLOB.revdata.parentcommit]</a>")
prefix = "Based off master commit: "
var/pc = GLOB.revdata.parentcommit
to_chat(src, "[prefix]<a href='[config.githuburl]/commit/[pc]'>[copytext(pc, 1, min(length(pc), 7))]</a>")
else
to_chat(src, "Revision unknown")
to_chat(src, "<b>Current Infomational Settings:</b>")
@@ -89,7 +91,7 @@
to_chat(src, "Enforce Continuous Rounds: [config.continuous.len] of [config.modes.len] roundtypes")
to_chat(src, "Allow Midround Antagonists: [config.midround_antag.len] of [config.modes.len] roundtypes")
if(config.show_game_type_odds)
if(SSticker.current_state == GAME_STATE_PLAYING)
if(SSticker.IsRoundInProgress())
var/prob_sum = 0
var/current_odds_differ = FALSE
var/list/probs = list()

159
code/datums/holocall.dm Normal file
View File

@@ -0,0 +1,159 @@
#define HOLOPAD_MAX_DIAL_TIME 200
/mob/camera/aiEye/remote/holo/setLoc()
. = ..()
var/obj/machinery/holopad/H = origin
H.move_hologram(eye_user, loc)
//this datum manages it's own references
/datum/holocall
var/mob/living/user //the one that called
var/obj/machinery/holopad/calling_holopad //the one that sent the call
var/obj/machinery/holopad/connected_holopad //the one that answered the call (may be null)
var/list/dialed_holopads //all things called, will be cleared out to just connected_holopad once answered
var/mob/camera/aiEye/remote/holo/eye //user's eye, once connected
var/obj/effect/overlay/holo_pad_hologram/hologram //user's hologram, once connected
var/call_start_time
//creates a holocall made by `caller` from `calling_pad` to `callees`
/datum/holocall/New(mob/living/caller, obj/machinery/holopad/calling_pad, list/callees)
call_start_time = world.time
user = caller
calling_pad.outgoing_call = src
calling_holopad = calling_pad
dialed_holopads = list()
for(var/I in callees)
var/obj/machinery/holopad/H = I
if(!QDELETED(H) && H.is_operational())
dialed_holopads += H
LAZYADD(H.holo_calls, src)
if(!dialed_holopads.len)
calling_pad.say("Connection failure.")
qdel(src)
return
testing("Holocall started")
//cleans up ALL references :)
/datum/holocall/Destroy()
QDEL_NULL(eye)
user.reset_perspective()
user = null
hologram.HC = null
hologram = null
calling_holopad.outgoing_call = null
for(var/I in dialed_holopads)
var/obj/machinery/holopad/H = I
LAZYREMOVE(H.holo_calls, src)
dialed_holopads.Cut()
if(calling_holopad)
calling_holopad.SetLightsAndPower()
calling_holopad = null
if(connected_holopad)
connected_holopad.SetLightsAndPower()
connected_holopad = null
testing("Holocall destroyed")
return ..()
//Gracefully disconnects a holopad `H` from a call. Pads not in the call are ignored. Notifies participants of the disconnection
/datum/holocall/proc/Disconnect(obj/machinery/holopad/H)
testing("Holocall disconnect")
if(H == connected_holopad)
calling_holopad.say("[usr] disconnected.")
else if(H == calling_holopad && connected_holopad)
connected_holopad.say("[usr] disconnected.")
ConnectionFailure(H, TRUE)
//Forcefully disconnects a holopad `H` from a call. Pads not in the call are ignored.
/datum/holocall/proc/ConnectionFailure(obj/machinery/holopad/H, graceful = FALSE)
testing("Holocall connection failure: graceful [graceful]")
if(H == connected_holopad || H == calling_holopad)
if(!graceful)
calling_holopad.say("Connection failure.")
qdel(src)
return
LAZYREMOVE(H.holo_calls, src)
dialed_holopads -= H
if(!dialed_holopads.len)
if(graceful)
calling_holopad.say("Call rejected.")
testing("No recipients, terminating")
qdel(src)
//Answers a call made to a holopad `H` which cannot be the calling holopad. Pads not in the call are ignored
/datum/holocall/proc/Answer(obj/machinery/holopad/H)
testing("Holocall answer")
if(H == calling_holopad)
CRASH("How cute, a holopad tried to answer itself.")
if(!(H in dialed_holopads))
return
if(connected_holopad)
CRASH("Multi-connection holocall")
for(var/I in dialed_holopads)
if(I == H)
continue
Disconnect(I)
for(var/I in H.holo_calls)
var/datum/holocall/HC = I
if(HC != src)
HC.Disconnect(H)
connected_holopad = H
if(!Check())
return
hologram = H.activate_holo(user)
hologram.HC = src
//eyeobj code is horrid, this is the best copypasta I could make
eye = new
eye.origin = H
eye.eye_initialized = TRUE
eye.eye_user = user
eye.name = "Camera Eye ([user.name])"
user.remote_control = eye
user.reset_perspective(eye)
eye.setLoc(H.loc)
//Checks the validity of a holocall and qdels itself if it's not. Returns TRUE if valid, FALSE otherwise
/datum/holocall/proc/Check()
for(var/I in dialed_holopads)
var/obj/machinery/holopad/H = I
if(!H.is_operational())
ConnectionFailure(H)
if(QDELETED(src))
return FALSE
. = !QDELETED(user) && !user.incapacitated() && !QDELETED(calling_holopad) && calling_holopad.is_operational() && user.loc == calling_holopad.loc
if(.)
if(connected_holopad)
. = !QDELETED(connected_holopad) && connected_holopad.is_operational()
else
. = world.time < (call_start_time + HOLOPAD_MAX_DIAL_TIME)
if(!.)
calling_holopad.say("No answer recieved.")
calling_holopad.temp = ""
if(!.)
testing("Holocall Check fail")
qdel(src)

View File

@@ -44,9 +44,7 @@
var/datum/job/assigned_job
var/list/datum/objective/objectives = list()
var/list/datum/objective/special_verbs = list()
var/list/cult_words = list()
var/list/spell_list = list() // Wizard mode & "Give Spell" badmin button.
var/datum/faction/faction //associated faction
@@ -54,7 +52,7 @@
var/linglink
var/miming = 0 // Mime's vow of silence
var/list/antag_datums = list()
var/list/antag_datums
var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state
var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD
var/datum/gang/gang_datum //Which gang this mind belongs to, if any
@@ -71,6 +69,10 @@
/datum/mind/Destroy()
SSticker.minds -= src
if(islist(antag_datums))
for(var/i in antag_datums)
qdel(i)
antag_datums = null
return ..()
/datum/mind/proc/transfer_to(mob/new_character, var/force_key_move = 0)
@@ -110,15 +112,16 @@
memory = null
// Datum antag mind procs
/datum/mind/proc/add_antag_datum(datum_type, on_gain = TRUE)
/datum/mind/proc/add_antag_datum(datum_type)
if(!datum_type)
return
if(!can_hold_antag_datum(datum_type))
return
var/datum/antagonist/A = new datum_type(src)
antag_datums += A
if(on_gain)
A.on_gain()
if(!A.can_be_owned(src))
qdel(A)
return
LAZYADD(antag_datums, A)
A.on_gain()
return A
/datum/mind/proc/remove_antag_datum(datum_type)
if(!datum_type)
@@ -126,6 +129,7 @@
var/datum/antagonist/A = has_antag_datum(datum_type)
if(A)
A.on_removal()
return TRUE
/datum/mind/proc/remove_all_antag_datums() //For the Lazy amongst us.
for(var/a in antag_datums)
@@ -143,18 +147,6 @@
else if(A.type == datum_type)
return A
/datum/mind/proc/can_hold_antag_datum(datum_type)
if(!datum_type)
return
. = TRUE
if(has_antag_datum(datum_type))
return FALSE
for(var/i in antag_datums)
var/datum/antagonist/A = i
if(is_type_in_typecache(A, A.typecache_datum_blacklist))
return FALSE
/*
Removes antag type's references from a mind.
objectives, uplinks, powers etc are all handled.
@@ -301,7 +293,7 @@
to_chat(recipient, "<i>[output]</i>")
/datum/mind/proc/edit_memory()
if(!SSticker || !SSticker.mode)
if(!SSticker.HasRoundStarted())
alert("Not before round-start!", "Alert")
return

View File

@@ -42,6 +42,7 @@
However, all the inhabitants seem to do is grow drugs and guns."
suffix = "lavaland_surface_seed_vault.dmm"
cost = 10
allow_duplicates = FALSE
/datum/map_template/ruin/lavaland/ash_walker
name = "Ash Walker Nest"

View File

@@ -72,7 +72,7 @@
/datum/map_template/shuttle/emergency/meteor
suffix = "meteor"
name = "An Asteroid With Engines Strapped To It"
name = "Asteroid With Engines Strapped To It"
description = "A hollowed out asteroid with engines strapped to it. Due to its size and difficulty in steering it, this shuttle may damage the docking area."
admin_notes = "This shuttle will likely crush escape, killing anyone there."
credit_cost = -5000

View File

@@ -13,6 +13,7 @@
/datum/status_effect/shadow_mend/on_apply()
owner.visible_message("<span class='notice'>Violet light wraps around [owner]'s body!</span>", "<span class='notice'>Violet light wraps around your body!</span>")
playsound(owner, 'sound/magic/Teleport_app.ogg', 50, 1)
return ..()
/datum/status_effect/shadow_mend/tick()
owner.adjustBruteLoss(-15)
@@ -72,9 +73,12 @@
add_logs(owner, null, "gained Vanguard stun immunity")
owner.add_stun_absorption("vanguard", 200, 1, "'s yellow aura momentarily intensifies!", "Your ward absorbs the stun!", " radiating with a soft yellow light!")
owner.visible_message("<span class='warning'>[owner] begins to faintly glow!</span>", "<span class='brass'>You will absorb all stuns for the next twenty seconds.</span>")
owner.SetStunned(0, FALSE)
owner.SetWeakened(0)
progbar = new(owner, duration, owner)
progbar.bar.color = list("#FAE48C", "#FAE48C", "#FAE48C", rgb(0,0,0))
progbar.update(duration - world.time)
return ..()
/datum/status_effect/vanguard_shield/tick()
progbar.update(duration - world.time)
@@ -127,6 +131,7 @@
animate(owner, color = oldcolor, time = 150, easing = EASE_IN)
addtimer(CALLBACK(owner, /atom/proc/update_atom_colour), 150)
playsound(owner, 'sound/magic/Ethereal_Enter.ogg', 50, 1)
return ..()
/datum/status_effect/inathneqs_endowment/on_remove()
add_logs(owner, null, "lost Inath-neq's invulnerability")
@@ -178,6 +183,7 @@
/datum/status_effect/his_grace/on_apply()
add_logs(owner, null, "gained His Grace's stun immunity")
owner.add_stun_absorption("hisgrace", INFINITY, 3, null, "His Grace protects you from the stun!")
return ..()
/datum/status_effect/his_grace/tick()
bloodlust = 0
@@ -211,6 +217,7 @@
/datum/status_effect/wish_granters_gift/on_apply()
to_chat(owner, "<span class='notice'>Death is not your end! The Wish Granter's energy suffuses you, and you begin to rise...</span>")
return ..()
/datum/status_effect/wish_granters_gift/on_remove()
owner.revive(full_heal = 1, admin_revive = 1)

View File

@@ -29,3 +29,50 @@
owner.adjustBruteLoss(0.1)
owner.adjustFireLoss(0.1)
owner.adjustToxLoss(0.2, TRUE, TRUE)
/datum/status_effect/belligerent
id = "belligerent"
duration = 70
tick_interval = 0 //tick as fast as possible
status_type = STATUS_EFFECT_REPLACE
alert_type = /obj/screen/alert/status_effect/belligerent
var/leg_damage_on_toggle = 2 //damage on initial application and when the owner tries to toggle to run
var/cultist_damage_on_toggle = 10 //damage on initial application and when the owner tries to toggle to run, but to cultists
/obj/screen/alert/status_effect/belligerent
name = "Belligerent"
desc = "<b><font color=#880020>Kneel, her-eti'c.</font></b>"
icon_state = "belligerent"
alerttooltipstyle = "clockcult"
/datum/status_effect/belligerent/on_apply()
return do_movement_toggle(TRUE)
/datum/status_effect/belligerent/tick()
if(!do_movement_toggle())
qdel(src)
/datum/status_effect/belligerent/proc/do_movement_toggle(force_damage)
var/number_legs = owner.get_num_legs()
if(iscarbon(owner) && !is_servant_of_ratvar(owner) && !owner.null_rod_check() && number_legs)
if(force_damage || owner.m_intent != MOVE_INTENT_WALK)
if(GLOB.ratvar_awakens)
owner.Weaken(1)
if(iscultist(owner))
owner.apply_damage(cultist_damage_on_toggle * 0.5, BURN, "l_leg")
owner.apply_damage(cultist_damage_on_toggle * 0.5, BURN, "r_leg")
else
owner.apply_damage(leg_damage_on_toggle * 0.5, BURN, "l_leg")
owner.apply_damage(leg_damage_on_toggle * 0.5, BURN, "r_leg")
if(owner.m_intent != MOVE_INTENT_WALK)
if(!iscultist(owner))
to_chat(owner, "<span class='warning'>Your leg[number_legs > 1 ? "s shiver":" shivers"] with pain!</span>")
else //Cultists take extra burn damage
to_chat(owner, "<span class='warning'>Your leg[number_legs > 1 ? "s burn":" burns"] with pain!</span>")
owner.toggle_move_intent()
return TRUE
return FALSE
/datum/status_effect/belligerent/on_remove()
if(owner.m_intent == MOVE_INTENT_WALK)
owner.toggle_move_intent()

View File

@@ -16,6 +16,7 @@
cube = icon('icons/effects/freeze.dmi', "ice_cube")
owner.add_overlay(cube)
owner.update_canmove()
return ..()
/datum/status_effect/freon/tick()
owner.update_canmove()

View File

@@ -10,6 +10,7 @@
var/status_type = STATUS_EFFECT_UNIQUE //How many of the effect can be on one mob, and what happens when you try to add another
var/on_remove_on_mob_delete = FALSE //if we call on_remove() when the mob is deleted
var/alert_type = /obj/screen/alert/status_effect //the alert thrown by the status effect, contains name and description
var/obj/screen/alert/status_effect/linked_alert = null //the alert itself, if it exists
/datum/status_effect/New(mob/living/new_owner)
if(new_owner)
@@ -30,16 +31,16 @@
/datum/status_effect/proc/start_ticking()
if(!src)
return
if(!owner)
if(!owner || !on_apply())
qdel(src)
return
on_apply()
if(duration != -1)
duration = world.time + initial(duration)
tick_interval = world.time + initial(tick_interval)
if(alert_type)
var/obj/screen/alert/status_effect/A = owner.throw_alert(id, alert_type)
A.attached_effect = src //so the alert can reference us, if it needs to
linked_alert = A //so we can reference the alert, if we need to
START_PROCESSING(SSfastprocess, src)
/datum/status_effect/process()
@@ -53,6 +54,8 @@
qdel(src)
/datum/status_effect/proc/on_apply() //Called whenever the buff is applied.
return TRUE
/datum/status_effect/proc/tick() //Called every tick.
/datum/status_effect/proc/on_remove() //Called whenever the buff expires or is removed; do note that at the point this is called, it is out of the owner's status_effects but owner is not yet null
/datum/status_effect/proc/be_replaced() //Called instead of on_remove when a status effect is replaced by itself or when a status effect with on_remove_on_mob_delete = FALSE has its mob deleted

View File

@@ -274,6 +274,7 @@
return
/atom/proc/ex_act(severity, target)
set waitfor = FALSE
contents_explosion(severity, target)
/atom/proc/blob_act(obj/structure/blob/B)

View File

@@ -24,7 +24,7 @@
if(!istype(H)) return 0
var/obj/item/clothing/under/U = H.w_uniform
if(!istype(U)) return 0
if(U.sensor_mode <= 2) return 0
if(U.sensor_mode <= SENSOR_VITALS) return 0
return 1
/datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H)

View File

@@ -155,7 +155,8 @@
if(!(check_usability(user)))
return
var/list/nuke_candidates = pollCandidatesForMob("Do you want to play as a syndicate [borg_to_spawn ? "[lowertext(borg_to_spawn)] cyborg":"operative"]?", ROLE_OPERATIVE, null, ROLE_OPERATIVE, 150, src)
to_chat(user, "<span class='notice'>You activate [src] and wait for confirmation.</span>")
var/list/nuke_candidates = pollCandidatesForMob("Do you want to play as a syndicate [borg_to_spawn ? "[lowertext(borg_to_spawn)] cyborg":"operative"]?", ROLE_OPERATIVE, null, ROLE_OPERATIVE, 150, POLL_IGNORE_SYNDICATE, src)
if(nuke_candidates.len)
if(!(check_usability(user)))
return

View File

@@ -20,7 +20,7 @@
if(round_converted) //So badmin blobs later don't step on the dead natural blobs metaphorical toes
..()
if(blobwincount <= GLOB.blobs_legit.len)
feedback_set_details("round_end_result","win - blob took over")
SSblackbox.set_details("round_end_result","win - blob took over")
to_chat(world, "<FONT size = 3><B>The blob has taken over the station!</B></FONT>")
to_chat(world, "<B>The entire station was eaten by the Blob!</B>")
log_game("Blob mode completed with a blob victory.")
@@ -28,7 +28,7 @@
SSticker.news_report = BLOB_WIN
else if(station_was_nuked)
feedback_set_details("round_end_result","halfwin - nuke")
SSblackbox.set_details("round_end_result","halfwin - nuke")
to_chat(world, "<FONT size = 3><B>Partial Win: The station has been destroyed!</B></FONT>")
to_chat(world, "<B>Directive 7-12 has been successfully carried out, preventing the Blob from spreading.</B>")
log_game("Blob mode completed with a tie (station destroyed).")
@@ -36,7 +36,7 @@
SSticker.news_report = BLOB_NUKE
else if(!GLOB.blob_cores.len)
feedback_set_details("round_end_result","loss - blob eliminated")
SSblackbox.set_details("round_end_result","loss - blob eliminated")
to_chat(world, "<FONT size = 3><B>The staff has won!</B></FONT>")
to_chat(world, "<B>The alien organism has been eradicated from the station!</B>")
log_game("Blob mode completed with a crew victory.")

View File

@@ -254,19 +254,19 @@ GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "w
for(var/datum/objective/objective in changeling.objectives)
if(objective.check_completion())
text += "<br><b>Objective #[count]</b>: [objective.explanation_text] <font color='green'><b>Success!</b></font>"
feedback_add_details("changeling_objective","[objective.type]|SUCCESS")
SSblackbox.add_details("changeling_objective","[objective.type]|SUCCESS")
else
text += "<br><b>Objective #[count]</b>: [objective.explanation_text] <span class='danger'>Fail.</span>"
feedback_add_details("changeling_objective","[objective.type]|FAIL")
SSblackbox.add_details("changeling_objective","[objective.type]|FAIL")
changelingwin = 0
count++
if(changelingwin)
text += "<br><font color='green'><b>The changeling was successful!</b></font>"
feedback_add_details("changeling_success","SUCCESS")
SSblackbox.add_details("changeling_success","SUCCESS")
else
text += "<br><span class='boldannounce'>The changeling has failed.</span>"
feedback_add_details("changeling_success","FAIL")
SSblackbox.add_details("changeling_success","FAIL")
text += "<br>"
to_chat(world, text)

View File

@@ -13,15 +13,13 @@
var/req_dna = 0 //amount of dna needed to use this ability. Changelings always have atleast 1
var/req_human = 0 //if you need to be human to use this ability
var/req_stat = CONSCIOUS // CONSCIOUS, UNCONSCIOUS or DEAD
var/genetic_damage = 0 // genetic damage caused by using the sting. Nothing to do with cloneloss.
var/max_genetic_damage = 100 // hard counter for spamming abilities. Not used/balanced much yet.
var/always_keep = 0 // important for abilities like revive that screw you if you lose them.
var/ignores_fakedeath = FALSE // usable with the FAKEDEATH flag
/obj/effect/proc_holder/changeling/proc/on_purchase(mob/user, is_respec)
if(!is_respec)
feedback_add_details("changeling_power_purchase",name)
SSblackbox.add_details("changeling_power_purchase",name)
/obj/effect/proc_holder/changeling/proc/on_refund(mob/user)
return
@@ -37,9 +35,9 @@
return
var/datum/changeling/c = user.mind.changeling
if(sting_action(user, target))
feedback_add_details("changeling_powers",name)
SSblackbox.add_details("changeling_powers",name)
sting_feedback(user, target)
take_chemical_cost(c)
c.chem_charges -= chemical_cost
/obj/effect/proc_holder/changeling/proc/sting_action(mob/user, mob/target)
return 0
@@ -47,10 +45,6 @@
/obj/effect/proc_holder/changeling/proc/sting_feedback(mob/user, mob/target)
return 0
/obj/effect/proc_holder/changeling/proc/take_chemical_cost(datum/changeling/changeling)
changeling.chem_charges -= chemical_cost
changeling.geneticdamage += genetic_damage
//Fairly important to remember to return 1 on success >.<
/obj/effect/proc_holder/changeling/proc/can_sting(mob/user, mob/target)
if(!ishuman(user) && !ismonkey(user)) //typecast everything from mob to carbon from this point onwards
@@ -71,9 +65,6 @@
if((user.status_flags & FAKEDEATH) && (!ignores_fakedeath))
to_chat(user, "<span class='warning'>We are incapacitated.</span>")
return 0
if(c.geneticdamage > max_genetic_damage)
to_chat(user, "<span class='warning'>Our genomes are still reassembling. We need time to recover first.</span>")
return 0
return 1
//used in /mob/Stat()

View File

@@ -68,7 +68,7 @@
mind.changeling.purchasedpowers+=S
S.on_purchase(src, is_respec)
if(is_respec)
feedback_add_details("changeling_power_purchase","Readapt")
SSblackbox.add_details("changeling_power_purchase","Readapt")
var/mob/living/carbon/C = src //only carbons have dna now, so we have to typecaste
if(ishuman(C))

View File

@@ -4,7 +4,6 @@
chemical_cost = 0
dna_cost = 0
req_human = 1
max_genetic_damage = 100
/obj/effect/proc_holder/changeling/absorbDNA/can_sting(mob/living/carbon/user)
if(!..())
@@ -42,13 +41,13 @@
to_chat(target, "<span class='userdanger'>You feel a sharp stabbing pain!</span>")
target.take_overall_damage(40)
feedback_add_details("changeling_powers","Absorb DNA|[i]")
SSblackbox.add_details("changeling_powers","Absorb DNA|[i]")
if(!do_mob(user, target, 150))
to_chat(user, "<span class='warning'>Our absorption of [target] has been interrupted!</span>")
changeling.isabsorbing = 0
return
feedback_add_details("changeling_powers","Absorb DNA|4")
SSblackbox.add_details("changeling_powers","Absorb DNA|4")
user.visible_message("<span class='danger'>[user] sucks the fluids from [target]!</span>", "<span class='notice'>We have absorbed [target].</span>")
to_chat(target, "<span class='userdanger'>You are absorbed by the changeling!</span>")

View File

@@ -5,9 +5,6 @@
chemical_cost = 30 //High cost to prevent spam
dna_cost = 2
req_human = 1
genetic_damage = 10
max_genetic_damage = 0
/obj/effect/proc_holder/changeling/biodegrade/sting_action(mob/living/carbon/human/user)
var/used = FALSE // only one form of shackles removed per use

View File

@@ -5,9 +5,6 @@
dna_cost = 2
chemical_cost = 25
req_human = 1
genetic_damage = 10
max_genetic_damage = 50
/obj/effect/proc_holder/changeling/chameleon_skin/sting_action(mob/user)
var/mob/living/carbon/human/H = user //SHOULD always be human, because req_human = 1

View File

@@ -5,8 +5,6 @@
dna_cost = 0
req_dna = 1
req_stat = DEAD
max_genetic_damage = 100
//Fake our own death and fully heal. You will appear to be dead but regenerate fully after a short delay.
/obj/effect/proc_holder/changeling/fakedeath/sting_action(mob/living/user)

View File

@@ -2,10 +2,7 @@
name = "Human Form"
desc = "We change into a human."
chemical_cost = 5
genetic_damage = 3
req_dna = 1
max_genetic_damage = 3
//Transform into a human.
/obj/effect/proc_holder/changeling/humanform/sting_action(mob/living/carbon/user)

View File

@@ -3,7 +3,6 @@
desc = "We debase ourselves and become lesser. We become a monkey."
chemical_cost = 5
dna_cost = 1
genetic_damage = 3
req_human = 1
//Transform into a monkey.

View File

@@ -4,7 +4,6 @@
chemical_cost = 0
dna_cost = 0
req_human = 1
max_genetic_damage = 100
/obj/effect/proc_holder/changeling/linglink/can_sting(mob/living/carbon/user)
if(!..())
@@ -56,7 +55,7 @@
to_chat(target, "<font color=#800040><span class='boldannounce'>You can now communicate in the changeling hivemind, say \":g message\" to communicate!</span>")
target.reagents.add_reagent("salbutamol", 40) // So they don't choke to death while you interrogate them
sleep(1800)
feedback_add_details("changeling_powers","Hivemind Link|[i]")
SSblackbox.add_details("changeling_powers","Hivemind Link|[i]")
if(!do_mob(user, target, 20))
to_chat(user, "<span class='warning'>Our link with [target] has ended!</span>")
changeling.islinking = 0

View File

@@ -16,7 +16,6 @@
helptext = "Yell at Miauw and/or Perakp"
chemical_cost = 1000
dna_cost = -1
genetic_damage = 1000
var/silent = FALSE
var/weapon_type
@@ -67,7 +66,6 @@
helptext = "Yell at Miauw and/or Perakp"
chemical_cost = 1000
dna_cost = -1
genetic_damage = 1000
var/helmet_type = /obj/item
var/suit_type = /obj/item
@@ -89,7 +87,7 @@
return 1
var/mob/living/carbon/human/H = user
if(istype(H.wear_suit, suit_type) || istype(H.head, helmet_type))
H.visible_message("<span class='warning'>[H] casts off their [suit_name_simple]!</span>", "<span class='warning'>We cast off our [suit_name_simple][genetic_damage > 0 ? ", temporarily weakening our genomes." : "."]</span>", "<span class='italics'>You hear the organic matter ripping and tearing!</span>")
H.visible_message("<span class='warning'>[H] casts off their [suit_name_simple]!</span>", "<span class='warning'>We cast off our [suit_name_simple].</span>", "<span class='italics'>You hear the organic matter ripping and tearing!</span>")
H.temporarilyRemoveItemFromInventory(H.head, TRUE) //The qdel on dropped() takes care of it
H.temporarilyRemoveItemFromInventory(H.wear_suit, TRUE)
H.update_inv_wear_suit()
@@ -100,7 +98,6 @@
H.add_splatter_floor()
playsound(H.loc, 'sound/effects/splat.ogg', 50, 1) //So real sounds
changeling.geneticdamage += genetic_damage //Casting off a space suit leaves you weak for a few seconds.
changeling.chem_recharge_slowdown -= recharge_slowdown
return 1
@@ -139,9 +136,7 @@
helptext = "We may retract our armblade in the same manner as we form it. Cannot be used while in lesser form."
chemical_cost = 20
dna_cost = 2
genetic_damage = 10
req_human = 1
max_genetic_damage = 20
weapon_type = /obj/item/weapon/melee/arm_blade
weapon_name_simple = "blade"
@@ -217,9 +212,7 @@
and Harm will stun it, and stab it if we're also holding a sharp weapon. Cannot be used while in lesser form."
chemical_cost = 10
dna_cost = 2
genetic_damage = 5
req_human = 1
max_genetic_damage = 10
weapon_type = /obj/item/weapon/gun/magic/tentacle
weapon_name_simple = "tentacle"
silent = TRUE
@@ -381,9 +374,7 @@
helptext = "Organic tissue cannot resist damage forever; the shield will break after it is hit too much. The more genomes we absorb, the stronger it is. Cannot be used while in lesser form."
chemical_cost = 20
dna_cost = 1
genetic_damage = 12
req_human = 1
max_genetic_damage = 20
weapon_type = /obj/item/weapon/shield/changeling
weapon_name_simple = "shield"
@@ -430,12 +421,10 @@
/obj/effect/proc_holder/changeling/suit/organic_space_suit
name = "Organic Space Suit"
desc = "We grow an organic suit to protect ourselves from space exposure."
helptext = "We must constantly repair our form to make it space-proof, reducing chemical production while we are protected. Retreating the suit damages our genomes. Cannot be used in lesser form."
helptext = "We must constantly repair our form to make it space-proof, reducing chemical production while we are protected. Cannot be used in lesser form."
chemical_cost = 20
dna_cost = 2
genetic_damage = 8
req_human = 1
max_genetic_damage = 20
suit_type = /obj/item/clothing/suit/space/changeling
helmet_type = /obj/item/clothing/head/helmet/space/changeling
@@ -477,12 +466,10 @@
/obj/effect/proc_holder/changeling/suit/armor
name = "Chitinous Armor"
desc = "We turn our skin into tough chitin to protect us from damage."
helptext = "Upkeep of the armor requires a low expenditure of chemicals. The armor is strong against brute force, but does not provide much protection from lasers. Retreating the armor damages our genomes. Cannot be used in lesser form."
helptext = "Upkeep of the armor requires a low expenditure of chemicals. The armor is strong against brute force, but does not provide much protection from lasers. Cannot be used in lesser form."
chemical_cost = 20
dna_cost = 1
genetic_damage = 11
req_human = 1
max_genetic_damage = 20
recharge_slowdown = 0.25
suit_type = /obj/item/clothing/suit/armor/changeling

View File

@@ -40,10 +40,9 @@
return
if(!AStar(user, target.loc, /turf/proc/Distance, user.mind.changeling.sting_range, simulated_only = 0))
return
if(target.mind && target.mind.changeling)
sting_feedback(user,target)
take_chemical_cost(user.mind.changeling)
return
if(target.mind && target.mind.changeling)
sting_feedback(user, target)
user.mind.changeling.chem_charges -= chemical_cost
return 1
/obj/effect/proc_holder/changeling/sting/sting_feedback(mob/user, mob/target)
@@ -62,7 +61,6 @@
sting_icon = "sting_transform"
chemical_cost = 40
dna_cost = 3
genetic_damage = 100
var/datum/changelingprofile/selected_dna = null
/obj/effect/proc_holder/changeling/sting/transformation/Click()
@@ -117,8 +115,6 @@
sting_icon = "sting_armblade"
chemical_cost = 20
dna_cost = 1
genetic_damage = 20
max_genetic_damage = 10
/obj/item/weapon/melee/arm_blade/false
desc = "A grotesque mass of flesh that used to be your arm. Although it looks dangerous at first, you can tell it's actually quite dull and useless."

View File

@@ -5,7 +5,6 @@
dna_cost = 0
req_dna = 1
req_human = 1
max_genetic_damage = 3
/obj/item/clothing/glasses/changeling
name = "flesh"

View File

@@ -198,7 +198,7 @@ Credit where due:
var/datum/game_mode/clockwork_cult/C = SSticker.mode
if(C.check_clockwork_victory())
text += "<span class='large_brass'><b>Ratvar's servants have succeeded in fulfilling His goals!</b></span>"
feedback_set_details("round_end_result", "win - servants completed their objective (summon ratvar)")
SSblackbox.set_details("round_end_result", "win - servants completed their objective (summon ratvar)")
else
var/half_victory = FALSE
var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = locate() in GLOB.all_clockwork_objects
@@ -207,10 +207,10 @@ Credit where due:
if(half_victory)
text += "<span class='large_brass'><b>The crew escaped before Ratvar could rise, but the gateway \
was successfully constructed!</b></span>"
feedback_set_details("round_end_result", "halfwin - servants constructed the gateway but their objective was not completed (summon ratvar)")
SSblackbox.set_details("round_end_result", "halfwin - servants constructed the gateway but their objective was not completed (summon ratvar)")
else
text += "<span class='userdanger'>Ratvar's servants have failed!</span>"
feedback_set_details("round_end_result", "loss - servants failed their objective (summon ratvar)")
SSblackbox.set_details("round_end_result", "loss - servants failed their objective (summon ratvar)")
text += "<br><b>The servants' objective was:</b> <br>[CLOCKCULT_OBJECTIVE]"
text += "<br>Ratvar's servants had <b>[GLOB.clockwork_caches]</b> Tinkerer's Caches."
text += "<br><b>Construction Value(CV)</b> was: <b>[GLOB.clockwork_construction_value]</b>"

View File

@@ -54,8 +54,11 @@
clockwork_desc = "A sigil that will stun the next non-Servant to cross it."
icon_state = "sigildull"
layer = HIGH_SIGIL_LAYER
alpha = 60
alpha = 75
color = "#FAE48C"
light_range = 1.4
light_power = 1
light_color = "#FAE48C"
sigil_name = "Sigil of Transgression"
/obj/effect/clockwork/sigil/transgression/sigil_effects(mob/living/L)
@@ -93,10 +96,6 @@
sigil_name = "Sigil of Submission"
var/glow_type
/obj/effect/clockwork/sigil/submission/New()
..()
update_light()
/obj/effect/clockwork/sigil/submission/proc/post_channel(mob/living/L)
/obj/effect/clockwork/sigil/submission/sigil_effects(mob/living/L)
@@ -202,6 +201,21 @@
and <b>[structure_number]</b> Clockwork Structure[structure_number == 1 ? "":"s"] [structure_number == 1 ? "is":"are"] in range.</span>")
if(iscyborg(user))
to_chat(user, "<span class='brass'>You can recharge from the [sigil_name] by crossing it.</span>")
else if(!GLOB.ratvar_awakens)
to_chat(user, "<span class='brass'>Hitting the [sigil_name] with brass sheets will convert them to power at a rate of <b>1</b> brass sheet to <b>[POWER_FLOOR]W</b> power.</span>")
if(!GLOB.ratvar_awakens)
to_chat(user, "<span class='brass'>You can recharge Clockwork Proselytizers from the [sigil_name].</span>")
/obj/effect/clockwork/sigil/transmission/attackby(obj/item/I, mob/living/user, params)
if(is_servant_of_ratvar(user) && istype(I, /obj/item/stack/tile/brass) && !GLOB.ratvar_awakens)
var/obj/item/stack/tile/brass/B = I
user.visible_message("<span class='warning'>[user] places [B] on [src], causing it to disintegrate into glowing orange energy!</span>", \
"<span class='brass'>You charge the [sigil_name] with [B], providing it with <b>[B.amount * POWER_FLOOR]W</b> of power.</span>")
modify_charge(-(B.amount * POWER_FLOOR))
playsound(src, 'sound/effects/light_flicker.ogg', (B.amount * POWER_FLOOR) * 0.01, 1)
qdel(B)
return TRUE
return ..()
/obj/effect/clockwork/sigil/transmission/sigil_effects(mob/living/L)
if(is_servant_of_ratvar(L))
@@ -214,9 +228,7 @@
if(!cyborg_checks(cyborg))
return
to_chat(cyborg, "<span class='brass'>You start to charge from the [sigil_name]...</span>")
if(!do_after(cyborg, 50, target = src))
return
if(!cyborg_checks(cyborg))
if(!do_after(cyborg, 50, target = src, extra_checks = CALLBACK(src, .proc/cyborg_checks, cyborg, TRUE)))
return
var/giving_power = min(Floor(cyborg.cell.maxcharge - cyborg.cell.charge, MIN_CLOCKCULT_POWER), power_charge) //give the borg either all our power or their missing power floored to MIN_CLOCKCULT_POWER
if(modify_charge(giving_power))
@@ -228,23 +240,27 @@
animate(cyborg, color = previous_color, time = 100)
addtimer(CALLBACK(cyborg, /atom/proc/update_atom_colour), 100)
/obj/effect/clockwork/sigil/transmission/proc/cyborg_checks(mob/living/silicon/robot/cyborg)
/obj/effect/clockwork/sigil/transmission/proc/cyborg_checks(mob/living/silicon/robot/cyborg, silent)
if(!cyborg.cell)
to_chat(cyborg, "<span class='warning'>You have no cell!</span>")
if(!silent)
to_chat(cyborg, "<span class='warning'>You have no cell!</span>")
return FALSE
if(!power_charge)
to_chat(cyborg, "<span class='warning'>The [sigil_name] has no stored power!</span>")
if(!silent)
to_chat(cyborg, "<span class='warning'>The [sigil_name] has no stored power!</span>")
return FALSE
if(cyborg.cell.charge > cyborg.cell.maxcharge - MIN_CLOCKCULT_POWER)
to_chat(cyborg, "<span class='warning'>You are already at maximum charge!</span>")
if(!silent)
to_chat(cyborg, "<span class='warning'>You are already at maximum charge!</span>")
return FALSE
if(cyborg.has_status_effect(STATUS_EFFECT_POWERREGEN))
to_chat(cyborg, "<span class='warning'>You are already regenerating power!</span>")
if(!silent)
to_chat(cyborg, "<span class='warning'>You are already regenerating power!</span>")
return FALSE
return TRUE
/obj/effect/clockwork/sigil/transmission/New()
..()
/obj/effect/clockwork/sigil/transmission/Initialize()
. = ..()
update_glow()
/obj/effect/clockwork/sigil/transmission/proc/modify_charge(amount)
@@ -265,7 +281,7 @@
if(!power_charge)
set_light(0)
else
set_light(round(alpha*0.02, 1), round(alpha*0.005, 1))
set_light(max(alpha*0.02, 1.4), max(alpha*0.01, 0.1))
//Vitality Matrix: Drains health from non-servants to heal or even revive servants.
/obj/effect/clockwork/sigil/vitality
@@ -299,8 +315,7 @@
if((is_servant_of_ratvar(L) && L.suiciding) || sigil_active)
return
visible_message("<span class='warning'>[src] begins to glow bright blue!</span>")
animate(src, alpha = 255, time = 10)
addtimer(CALLBACK(src, .proc/update_alpha), 10)
animate(src, alpha = 255, time = 10, flags = ANIMATION_END_NOW) //we may have a previous animation going. finish it first, then do this one without delay.
sleep(10)
//as long as they're still on the sigil and are either not a servant or they're a servant AND it has remaining vitality
while(L && (!is_servant_of_ratvar(L) || (is_servant_of_ratvar(L) && (GLOB.ratvar_awakens || vitality))) && get_turf(L) == get_turf(src))
@@ -369,12 +384,4 @@
animation_number = initial(animation_number)
sigil_active = FALSE
visible_message("<span class='warning'>[src] slowly stops glowing!</span>")
if(sigil_active || alpha == 255)
animate(src, alpha = initial(alpha), time = 10)
addtimer(CALLBACK(src, .proc/update_alpha), 10)
/obj/effect/clockwork/sigil/vitality/proc/update_alpha()
if(sigil_active)
alpha = 255
else
alpha = initial(alpha)
animate(src, alpha = initial(alpha), time = 10, flags = ANIMATION_END_NOW)

View File

@@ -15,9 +15,8 @@
var/obj/effect/clockwork/spatial_gateway/linked_gateway //The gateway linked to this one
var/timerid
/obj/effect/clockwork/spatial_gateway/New()
..()
update_light()
/obj/effect/clockwork/spatial_gateway/Initialize()
. = ..()
addtimer(CALLBACK(src, .proc/check_setup), 1)
/obj/effect/clockwork/spatial_gateway/Destroy()
@@ -99,12 +98,12 @@
if(severity == 1 && uses)
uses = 0
visible_message("<span class='warning'>[src] is disrupted!</span>")
animate(src, alpha = 0, transform = matrix()*2, time = 10)
animate(src, alpha = 0, transform = matrix()*2, time = 10, flags = ANIMATION_END_NOW)
deltimer(timerid)
timerid = QDEL_IN(src, 10)
linked_gateway.uses = 0
linked_gateway.visible_message("<span class='warning'>[linked_gateway] is disrupted!</span>")
animate(linked_gateway, alpha = 0, transform = matrix()*2, time = 10)
animate(linked_gateway, alpha = 0, transform = matrix()*2, time = 10, flags = ANIMATION_END_NOW)
deltimer(linked_gateway.timerid)
linked_gateway.timerid = QDEL_IN(linked_gateway, 10)
return TRUE
@@ -131,9 +130,9 @@
playsound(src, 'sound/effects/EMPulse.ogg', 50, 1)
playsound(linked_gateway, 'sound/effects/EMPulse.ogg', 50, 1)
transform = matrix() * 1.5
animate(src, transform = matrix() / 1.5, time = 10)
animate(src, transform = matrix() / 1.5, time = 10, flags = ANIMATION_END_NOW)
linked_gateway.transform = matrix() * 1.5
animate(linked_gateway, transform = matrix() / 1.5, time = 10)
animate(linked_gateway, transform = matrix() / 1.5, time = 10, flags = ANIMATION_END_NOW)
A.forceMove(get_turf(linked_gateway))
if(!no_cost)
uses = max(0, uses - 1)
@@ -181,17 +180,26 @@
return procure_gateway(invoker, time_duration, gateway_uses, two_way)
var/istargetobelisk = istype(target, /obj/structure/destructible/clockwork/powered/clockwork_obelisk)
var/issrcobelisk = istype(src, /obj/structure/destructible/clockwork/powered/clockwork_obelisk)
if(issrcobelisk && !anchored)
to_chat(invoker, "<span class='warning'>[src] is no longer secured!</span>")
return FALSE
if(issrcobelisk)
if(!anchored)
to_chat(invoker, "<span class='warning'>[src] is no longer secured!</span>")
return FALSE
var/obj/structure/destructible/clockwork/powered/clockwork_obelisk/CO = src //foolish as I am, how I set this proc up makes substypes unfeasible
if(CO.active)
to_chat(invoker, "<span class='warning'>[src] is now sustaining a gateway!</span>")
return FALSE
if(istargetobelisk)
if(!target.anchored)
to_chat(invoker, "<span class='warning'>That [target.name] is no longer secured!</span>")
return procure_gateway(invoker, time_duration, gateway_uses, two_way)
var/obj/structure/destructible/clockwork/powered/clockwork_obelisk/CO = target
if(CO.active)
to_chat(invoker, "<span class='warning'>That [target.name] is sustaining a gateway, and cannot recieve another!</span>")
return procure_gateway(invoker, time_duration, gateway_uses, two_way)
var/efficiency = CO.get_efficiency_mod()
gateway_uses = round(gateway_uses * (2 * efficiency), 1)
time_duration = round(time_duration * (2 * efficiency), 1)
CO.active = TRUE //you'd be active in a second but you should update immediately
invoker.visible_message("<span class='warning'>The air in front of [invoker] ripples before suddenly tearing open!</span>", \
"<span class='brass'>With a word, you rip open a [two_way ? "two-way":"one-way"] rift to [input_target_key]. It will last for [time_duration / 10] seconds and has [gateway_uses] use[gateway_uses > 1 ? "s" : ""].</span>")
var/obj/effect/clockwork/spatial_gateway/S1 = new(issrcobelisk ? get_turf(src) : get_step(get_turf(invoker), invoker.dir))

View File

@@ -22,6 +22,12 @@
else
for(var/i in GLOB.clockwork_component_cache)
.[i] = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*GLOB.clockwork_component_cache[i], 1)
for(var/obj/structure/destructible/clockwork/massive/celestial_gateway/G in GLOB.all_clockwork_objects)
if(G.still_needs_components())
for(var/i in G.required_components)
if(!G.required_components[i])
. -= i
break
. = pickweight(.)
//returns a component name from a component id
@@ -37,6 +43,8 @@
return "Replicant Alloy"
if(HIEROPHANT_ANSIBLE)
return "Hierophant Ansible"
else
return null
//returns a component acronym from a component id
/proc/get_component_acronym(id)
@@ -51,6 +59,8 @@
return "RA"
if(HIEROPHANT_ANSIBLE)
return "HA"
else
return null
//returns a component id from a component name
/proc/get_component_id(name)
@@ -65,6 +75,8 @@
return REPLICANT_ALLOY
if("Hierophant Ansible")
return HIEROPHANT_ANSIBLE
else
return null
//returns a component spanclass from a component id
/proc/get_component_span(id)
@@ -121,6 +133,8 @@
return /obj/effect/overlay/temp/ratvar/component/alloy
if(HIEROPHANT_ANSIBLE)
return /obj/effect/overlay/temp/ratvar/component/ansible
else
return null
//returns a type for a component from a component id
/proc/get_component_type(id)
@@ -134,4 +148,6 @@
if(REPLICANT_ALLOY)
return /obj/item/clockwork/component/replicant_alloy
if(HIEROPHANT_ANSIBLE)
return /obj/item/clockwork/component/hierophant_ansible
return /obj/item/clockwork/component/hierophant_ansible
else
return null

View File

@@ -286,6 +286,28 @@
user.visible_message("<span class='notice'>[user]'s [proselytizer.name] stops covering [src] with glowing orange energy.</span>", \
"<span class='alloy'>You finish repairing [src]. It is now at <b>[obj_integrity]/[max_integrity]</b> integrity.</span>")
//Hitting a sigil of transmission will try to charge from it.
/obj/effect/clockwork/sigil/transmission/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
. = TRUE
var/list/charge_values = list()
if(!proselytizer.sigil_charge_checks(charge_values, src, user))
return
user.visible_message("<span class='notice'>[user]'s [proselytizer.name] starts draining glowing orange energy from [src]...</span>", \
"<span class='alloy'>You start recharging your [proselytizer.name]...</span>")
proselytizer.recharging = src
while(proselytizer && user && src)
if(!do_after(user, 10, target = src, extra_checks = CALLBACK(proselytizer, /obj/item/clockwork/clockwork_proselytizer.proc/sigil_charge_checks, charge_values, src, user, TRUE)))
break
modify_charge(charge_values["power_gain"])
proselytizer.modify_stored_power(charge_values["power_gain"])
playsound(src, 'sound/effects/light_flicker.ogg', charge_values["power_gain"] * 0.1, 1)
if(proselytizer)
proselytizer.recharging = null
if(user)
user.visible_message("<span class='notice'>[user]'s [proselytizer.name] stops draining glowing orange energy from [src].</span>", \
"<span class='alloy'>You finish recharging your [proselytizer.name]. It now contains <b>[proselytizer.get_power()]W/[proselytizer.get_max_power()]W</b> power.</span>")
//Proselytizer mob heal proc, to avoid as much copypaste as possible.
/mob/living/proc/proselytizer_heal(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer)
var/list/repair_values = list()

View File

@@ -12,6 +12,7 @@
var/uses_power = TRUE
var/metal_to_power = FALSE
var/repairing = null //what we're currently repairing, if anything
var/obj/effect/clockwork/sigil/transmission/recharging = null //the sigil we're charging from, if any
var/speed_multiplier = 1 //how fast this proselytizer works
var/charge_rate = MIN_CLOCKCULT_POWER //how much power we gain every two seconds
var/charge_delay = 2 //how many proccess ticks remain before we can start to charge
@@ -140,10 +141,11 @@
/obj/item/clockwork/clockwork_proselytizer/attack_self(mob/living/user)
if(is_servant_of_ratvar(user))
if(!can_use_power(POWER_WALL_TOTAL))
to_chat(user, "<span class='warning'>[src] requires <b>[POWER_WALL_TOTAL]W</b> of power to produce brass sheets!</span>")
return
modify_stored_power(-POWER_WALL_TOTAL)
if(uses_power)
if(!can_use_power(POWER_WALL_TOTAL))
to_chat(user, "<span class='warning'>[src] requires <b>[POWER_WALL_TOTAL]W</b> of power to produce brass sheets!</span>")
return
modify_stored_power(-POWER_WALL_TOTAL)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
new/obj/item/stack/tile/brass(user.loc, 5)
to_chat(user, "<span class='brass'>You user [stored_power ? "some":"all"] of [src]'s power to produce some brass sheets. It now stores <b>[get_power()]W/[get_max_power()]W</b> of power.</span>")
@@ -182,6 +184,9 @@
if(repairing)
to_chat(user, "<span class='warning'>You are currently repairing [repairing] with [src]!</span>")
return FALSE
if(recharging)
to_chat(user, "<span class='warning'>You are currently recharging [src] from the [recharging.sigil_name]!</span>")
return FALSE
var/list/proselytize_values = target.proselytize_vals(user, src) //relevant values for proselytizing stuff, given as an associated list
if(!islist(proselytize_values))
if(proselytize_values != TRUE) //if we get true, fail, but don't send a message for whatever reason
@@ -237,7 +242,7 @@
/obj/item/clockwork/clockwork_proselytizer/proc/proselytize_checks(list/proselytize_values, atom/target, expected_type, mob/user, silent) //checked constantly while proselytizing
if(!islist(proselytize_values) || !target || QDELETED(target) || !user)
return FALSE
if(repairing)
if(repairing || recharging)
return FALSE
if(target.type != expected_type)
return FALSE
@@ -296,3 +301,20 @@
<b>[round(repair_values["amount_to_heal"]*MIN_CLOCKCULT_POWER, MIN_CLOCKCULT_POWER)]W</b> to fully repair [target == user ? "yourself" : "[target.p_them()]"]!</span>")
return FALSE
return TRUE
//checked constantly while charging from a sigil
/obj/item/clockwork/clockwork_proselytizer/proc/sigil_charge_checks(list/charge_values, obj/effect/clockwork/sigil/transmission/sigil, mob/user, silent)
if(!islist(charge_values) || !sigil || QDELETED(sigil) || !user)
return FALSE
if(can_use_power(RATVAR_POWER_CHECK))
return FALSE
charge_values["power_gain"] = Clamp(sigil.power_charge, 0, POWER_WALL_MINUS_FLOOR)
if(!charge_values["power_gain"])
if(!silent)
to_chat(user, "<span class='warning'>The [sigil.sigil_name] contains no power!</span>")
return FALSE
if(stored_power + charge_values["power_gain"] > max_power)
if(!silent)
to_chat(user, "<span class='warning'>Your [name] contains too much power to charge from the [sigil.sigil_name]!</span>")
return FALSE
return TRUE

View File

@@ -326,13 +326,19 @@
if(production_time != SLAB_PRODUCTION_TIME+SLAB_SLOWDOWN_MAXIMUM)
production_text_addon = ", which increases for each human or silicon servant above <b>[SCRIPT_SERVANT_REQ]</b>"
production_time = production_time/600
var/production_text = "<b>[round(production_time)] minute\s"
var/list/production_text
if(round(production_time))
production_text = list("<b>[round(production_time)] minute\s")
if(production_time != round(production_time))
production_time -= round(production_time)
production_time *= 60
production_text += " and [round(production_time, 1)] second\s"
if(!LAZYLEN(production_text))
production_text = list("<b>[round(production_time, 1)] second\s")
else
production_text += " and [round(production_time, 1)] second\s"
production_text += "</b>"
production_text += production_text_addon
production_text = production_text.Join()
textlist = list("<font color=#BE8700 size=3><b><center>Chetr nyy hagehguf-naq-ubabe Ratvar.</center></b></font><br>\
\

View File

@@ -129,6 +129,7 @@
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
apply_eye_damage(H)
return ..()
/datum/status_effect/wraith_spectacles/tick()
if(!ishuman(owner))

View File

@@ -86,7 +86,7 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
else
successful = TRUE
if(slab && !slab.no_cost && !GLOB.ratvar_awakens) //if the slab exists and isn't debug and ratvar isn't up, log the scripture as being used
feedback_add_details("clockcult_scripture_recited", name)
SSblackbox.add_details("clockcult_scripture_recited", name)
if(slab)
slab.busy = null
qdel(src)

View File

@@ -10,7 +10,7 @@
It will penetrate mindshield implants once before disappearing."
invocations = list("Divinity, enslave...", "...all who trespass here!")
channel_time = 70
consumed_components = list(BELLIGERENT_EYE = 2, GEIS_CAPACITOR = 1, HIEROPHANT_ANSIBLE = 1)
consumed_components = list(BELLIGERENT_EYE = 4, GEIS_CAPACITOR = 2, HIEROPHANT_ANSIBLE = 2)
whispered = TRUE
object_path = /obj/effect/clockwork/sigil/submission/accession
prevent_path = /obj/effect/clockwork/sigil/submission
@@ -32,7 +32,7 @@
It grows faster to invoke with more adjacent Servants."
invocations = list("Shield us...", "...with the...", "... fragments of Engine!")
channel_time = 100
consumed_components = list(VANGUARD_COGWHEEL = 2, REPLICANT_ALLOY = 1, HIEROPHANT_ANSIBLE = 1)
consumed_components = list(VANGUARD_COGWHEEL = 4, REPLICANT_ALLOY = 2, HIEROPHANT_ANSIBLE = 2)
usage_tip = "This scripture will replace all weaker armor worn by affected Servants."
tier = SCRIPTURE_APPLICATION
multiple_invokers_used = TRUE
@@ -99,7 +99,7 @@
If it remains close to you, you will gradually regain health up to a low amount, but it will die if it goes too far from you."
invocations = list("Fright's will...", "...call forth...")
channel_time = 100
consumed_components = list(BELLIGERENT_EYE = 1, VANGUARD_COGWHEEL = 1, GEIS_CAPACITOR = 2)
consumed_components = list(BELLIGERENT_EYE = 2, VANGUARD_COGWHEEL = 2, GEIS_CAPACITOR = 4)
usage_tip = "Marauders are useful as personal bodyguards and frontline warriors."
tier = SCRIPTURE_APPLICATION
primary_component = GEIS_CAPACITOR
@@ -160,7 +160,7 @@
and exceptional speed, though taking damage will temporarily slow it down."
invocations = list("Call forth...", "...the soldiers of Armorer.")
channel_time = 80
consumed_components = list(BELLIGERENT_EYE = 1, VANGUARD_COGWHEEL = 1, REPLICANT_ALLOY = 2)
consumed_components = list(BELLIGERENT_EYE = 2, VANGUARD_COGWHEEL = 2, REPLICANT_ALLOY = 4)
object_path = /obj/structure/destructible/clockwork/shell/fragment
creator_message = "<span class='brass'>You form an anima fragment, a powerful soul vessel receptacle.</span>"
observer_message = "<span class='warning'>The slab disgorges a puddle of black metal that expands and forms into a strange shell!</span>"
@@ -179,7 +179,7 @@
desc = "Places a sigil that stores energy to power clockwork structures."
invocations = list("Divinity...", "...power our creations!")
channel_time = 70
consumed_components = list(VANGUARD_COGWHEEL = 1, GEIS_CAPACITOR = 1, HIEROPHANT_ANSIBLE = 2)
consumed_components = list(VANGUARD_COGWHEEL = 2, GEIS_CAPACITOR = 2, HIEROPHANT_ANSIBLE = 4)
whispered = TRUE
object_path = /obj/effect/clockwork/sigil/transmission
creator_message = "<span class='brass'>A sigil silently appears below you. It will automatically power clockwork structures near it.</span>"
@@ -199,7 +199,7 @@
desc = "Creates a clockwork totem that sabotages nearby machinery and funnels drained power into nearby Sigils of Transmission or the area's APC."
invocations = list("May this totem...", "...shroud the false suns!")
channel_time = 80
consumed_components = list(BELLIGERENT_EYE = 3, REPLICANT_ALLOY = 1, HIEROPHANT_ANSIBLE = 1)
consumed_components = list(BELLIGERENT_EYE = 5, REPLICANT_ALLOY = 2, HIEROPHANT_ANSIBLE = 2)
object_path = /obj/structure/destructible/clockwork/powered/interdiction_lens
creator_message = "<span class='brass'>You form an interdiction lens, which disrupts cameras and radios and drains power.</span>"
observer_message = "<span class='warning'>A brass totem rises from the ground, a purple gem appearing in its center!</span>"
@@ -221,7 +221,7 @@
desc = "Creates a mania motor which will cause brain damage and hallucinations in nearby non-Servant humans. It will also try to convert humans directly adjecent to the motor."
invocations = list("May this transmitter...", "...break the will of all who oppose us!")
channel_time = 80
consumed_components = list(GEIS_CAPACITOR = 3, REPLICANT_ALLOY = 1, HIEROPHANT_ANSIBLE = 1)
consumed_components = list(GEIS_CAPACITOR = 5, REPLICANT_ALLOY = 2, HIEROPHANT_ANSIBLE = 2)
object_path = /obj/structure/destructible/clockwork/powered/mania_motor
creator_message = "<span class='brass'>You form a mania motor which will cause brain damage and hallucinations in nearby humans while active.</span>"
observer_message = "<span class='warning'>A two-pronged machine rises from the ground!</span>"
@@ -244,7 +244,7 @@
and there is at least one existing cache."
invocations = list("May this generator...", "...collect Engine parts that yet hold greatness!")
channel_time = 80
consumed_components = list(BELLIGERENT_EYE = 1, GEIS_CAPACITOR = 1, REPLICANT_ALLOY = 3)
consumed_components = list(BELLIGERENT_EYE = 2, GEIS_CAPACITOR = 2, REPLICANT_ALLOY = 5)
object_path = /obj/structure/destructible/clockwork/powered/tinkerers_daemon
creator_message = "<span class='brass'>You form a tinkerer's daemon which can rapidly collect components at a power cost.</span>"
invokers_required = 2
@@ -278,7 +278,7 @@
desc = "Creates a clockwork obelisk that can broadcast messages over the Hierophant Network or open a Spatial Gateway to any living Servant or clockwork obelisk."
invocations = list("May this obelisk...", "...take us to all places!")
channel_time = 80
consumed_components = list(BELLIGERENT_EYE = 1, VANGUARD_COGWHEEL = 1, HIEROPHANT_ANSIBLE = 3)
consumed_components = list(BELLIGERENT_EYE = 2, VANGUARD_COGWHEEL = 2, HIEROPHANT_ANSIBLE = 5)
object_path = /obj/structure/destructible/clockwork/powered/clockwork_obelisk
creator_message = "<span class='brass'>You form a clockwork obelisk which can broadcast messages or produce Spatial Gateways.</span>"
observer_message = "<span class='warning'>A brass obelisk appears hanging in midair!</span>"

View File

@@ -17,23 +17,10 @@
sort_priority = 1
quickbind = TRUE
quickbind_desc = "Forces nearby non-Servants to walk, doing minor damage with each chant.<br><b>Maximum 15 chants.</b>"
var/noncultist_damage = 2 //damage per chant to noncultists
var/cultist_damage = 8 //damage per chant to non-walking cultists
/datum/clockwork_scripture/channeled/belligerent/chant_effects(chant_number)
for(var/mob/living/carbon/C in hearers(7, invoker))
var/number_legs = C.get_num_legs()
if(!is_servant_of_ratvar(C) && !C.null_rod_check() && number_legs) //you have legs right
C.apply_damage(noncultist_damage * 0.5, BURN, "l_leg")
C.apply_damage(noncultist_damage * 0.5, BURN, "r_leg")
if(C.m_intent != MOVE_INTENT_WALK)
if(!iscultist(C))
to_chat(C, "<span class='warning'>Your leg[number_legs > 1 ? "s shiver":" shivers"] with pain!</span>")
else //Cultists take extra burn damage
to_chat(C, "<span class='warning'>Your leg[number_legs > 1 ? "s burn":" burns"] with pain!</span>")
C.apply_damage(cultist_damage * 0.5, BURN, "l_leg")
C.apply_damage(cultist_damage * 0.5, BURN, "r_leg")
C.toggle_move_intent()
C.apply_status_effect(STATUS_EFFECT_BELLIGERENT)
return TRUE
@@ -272,7 +259,7 @@
var/static/prev_cost = 0
/datum/clockwork_scripture/create_object/tinkerers_cache/creation_update()
var/cache_cost_increase = min(round(GLOB.clockwork_caches*0.25), 5)
var/cache_cost_increase = min(round(GLOB.clockwork_caches*0.4), 10)
if(cache_cost_increase != prev_cost)
prev_cost = cache_cost_increase
consumed_components = list(BELLIGERENT_EYE = 0, VANGUARD_COGWHEEL = 0, GEIS_CAPACITOR = 0, REPLICANT_ALLOY = 1, HIEROPHANT_ANSIBLE = 0)

View File

@@ -9,7 +9,7 @@
desc = "Taps the limitless power of Inath-neq, one of Ratvar's four generals. The benevolence of Inath-Neq will grant complete invulnerability to all Servants in range for fifteen seconds."
invocations = list("I call upon you, Vanguard!!", "Let the Resonant Cogs turn once more!!", "Grant me and my allies the strength to vanquish our foes!!")
channel_time = 100
consumed_components = list(VANGUARD_COGWHEEL = 4, GEIS_CAPACITOR = 2, REPLICANT_ALLOY = 2, HIEROPHANT_ANSIBLE = 2)
consumed_components = list(VANGUARD_COGWHEEL = 10, GEIS_CAPACITOR = 3, REPLICANT_ALLOY = 3, HIEROPHANT_ANSIBLE = 3)
usage_tip = "Servants affected by this scripture are only weak to things that outright destroy bodies, such as bombs or the singularity."
tier = SCRIPTURE_REVENANT
primary_component = VANGUARD_COGWHEEL
@@ -44,7 +44,7 @@
for all non-servant humans on the same z-level as them. The power of this scripture falls off somewhat with distance, and certain things may reduce its effects."
invocations = list("I call upon you, Fright!!", "Let your power shatter the sanity of the weak-minded!!", "Let your tendrils hold sway over all!!")
channel_time = 150
consumed_components = list(BELLIGERENT_EYE = 3, VANGUARD_COGWHEEL = 3, GEIS_CAPACITOR = 6, HIEROPHANT_ANSIBLE = 3)
consumed_components = list(BELLIGERENT_EYE = 6, VANGUARD_COGWHEEL = 6, GEIS_CAPACITOR = 10, HIEROPHANT_ANSIBLE = 6)
usage_tip = "Causes brain damage, hallucinations, confusion, and dizziness in massive amounts."
tier = SCRIPTURE_REVENANT
sort_priority = 3
@@ -108,7 +108,7 @@
clockwork proselytizers will charge very rapidly."
invocations = list("I call upon you, Armorer!!", "Let your machinations reign on this miserable station!!", "Let your power flow through the tools of your master!!")
channel_time = 150
consumed_components = list(BELLIGERENT_EYE = 3, VANGUARD_COGWHEEL = 3, GEIS_CAPACITOR = 3, REPLICANT_ALLOY = 6)
consumed_components = list(BELLIGERENT_EYE = 6, VANGUARD_COGWHEEL = 6, GEIS_CAPACITOR = 6, REPLICANT_ALLOY = 10)
usage_tip = "Ocular wardens will become empowered, clockwork proselytizers will require no alloy, tinkerer's daemons will produce twice as quickly, \
and interdiction lenses, mania motors, tinkerer's daemons, and clockwork obelisks will all require no power."
tier = SCRIPTURE_REVENANT
@@ -153,7 +153,7 @@
will be struck by devastating lightning bolts."
invocations = list("I call upon you, Amperage!!", "Let your energy flow through me!!", "Let your boundless power shatter stars!!")
channel_time = 100
consumed_components = list(BELLIGERENT_EYE = 2, GEIS_CAPACITOR = 2, REPLICANT_ALLOY = 2, HIEROPHANT_ANSIBLE = 4)
consumed_components = list(BELLIGERENT_EYE = 3, GEIS_CAPACITOR = 3, REPLICANT_ALLOY = 3, HIEROPHANT_ANSIBLE = 10)
usage_tip = "Struck targets will also be knocked down for about sixteen seconds."
tier = SCRIPTURE_REVENANT
primary_component = HIEROPHANT_ANSIBLE

View File

@@ -9,7 +9,7 @@
desc = "Forms an automatic short-range turret which will automatically attack nearby unrestrained non-Servants that can see it."
invocations = list("Guardians...", "...of the Engine...", "...defend us!")
channel_time = 120
consumed_components = list(BELLIGERENT_EYE = 1, REPLICANT_ALLOY = 1)
consumed_components = list(BELLIGERENT_EYE = 2, REPLICANT_ALLOY = 1)
object_path = /obj/structure/destructible/clockwork/ocular_warden
creator_message = "<span class='brass'>You form an ocular warden, which will automatically attack nearby unrestrained non-Servants that can see it.</span>"
observer_message = "<span class='warning'>A brass eye takes shape and slowly rises into the air, its red iris glaring!</span>"
@@ -36,7 +36,7 @@
desc = "Creates a small shell fitted for soul vessels. Adding an active soul vessel to it results in a small construct with tools and an inbuilt proselytizer."
invocations = list("Call forth...", "...the workers of Armorer.")
channel_time = 60
consumed_components = list(BELLIGERENT_EYE = 1, HIEROPHANT_ANSIBLE = 1)
consumed_components = list(BELLIGERENT_EYE = 2, HIEROPHANT_ANSIBLE = 1)
object_path = /obj/structure/destructible/clockwork/shell/cogscarab
creator_message = "<span class='brass'>You form a cogscarab, a constructor soul vessel receptacle.</span>"
observer_message = "<span class='warning'>The slab disgorges a puddle of black metal that contracts and forms into a strange shell!</span>"
@@ -56,7 +56,7 @@
Matrices have drained from non-Servants. Dead Servants can be revived by this sigil if there is vitality equal to the target Servant's non-oxygen damage."
invocations = list("Divinity...", "...steal their life...", "...for these shells!")
channel_time = 60
consumed_components = list(BELLIGERENT_EYE = 1, VANGUARD_COGWHEEL = 1)
consumed_components = list(BELLIGERENT_EYE = 1, VANGUARD_COGWHEEL = 2)
whispered = TRUE
object_path = /obj/effect/clockwork/sigil/vitality
creator_message = "<span class='brass'>A vitality matrix appears below you. It will drain life from non-Servants and heal Servants that cross it.</span>"
@@ -77,7 +77,7 @@
chant_invocations = list("Mend our dents!", "Heal our scratches!", "Repair our gears!")
chant_amount = 10
chant_interval = 20
consumed_components = list(VANGUARD_COGWHEEL = 1, REPLICANT_ALLOY = 1)
consumed_components = list(VANGUARD_COGWHEEL = 2, REPLICANT_ALLOY = 1)
usage_tip = "This is a very effective way to rapidly reinforce a base after an attack."
tier = SCRIPTURE_SCRIPT
primary_component = VANGUARD_COGWHEEL
@@ -177,6 +177,7 @@
new /obj/effect/overlay/temp/heal(T, "#1E8CE1")
else
break
new /obj/effect/overlay/temp/ratvar/mending_mantra(get_turf(invoker))
return TRUE
@@ -187,7 +188,7 @@
desc = "Places a luminous sigil that will enslave any valid beings standing on it after a time."
invocations = list("Divinity, enlighten...", "...those who trespass here!")
channel_time = 60
consumed_components = list(BELLIGERENT_EYE = 1, GEIS_CAPACITOR = 1)
consumed_components = list(BELLIGERENT_EYE = 1, GEIS_CAPACITOR = 2)
whispered = TRUE
object_path = /obj/effect/clockwork/sigil/submission
creator_message = "<span class='brass'>A luminous sigil appears below you. The next non-servant to cross it will be enslaved after a brief time if they do not move.</span>"
@@ -207,7 +208,7 @@
desc = "Forms an ancient positronic brain with an overriding directive to serve Ratvar."
invocations = list("Herd the souls of...", "...the blasphemous damned!")
channel_time = 30
consumed_components = list(VANGUARD_COGWHEEL = 1, GEIS_CAPACITOR = 1)
consumed_components = list(VANGUARD_COGWHEEL = 1, GEIS_CAPACITOR = 2)
whispered = TRUE
object_path = /obj/item/device/mmi/posibrain/soul_vessel
creator_message = "<span class='brass'>You form a soul vessel, which can be used in-hand to attract spirits, or used on an unconscious or dead human to extract their consciousness.</span>"
@@ -227,7 +228,7 @@
desc = "Forms a device that, when used on certain objects, converts them into their Ratvarian equivalents. It requires power to function."
invocations = list("With this device...", "...his presence shall be made known.")
channel_time = 20
consumed_components = list(GEIS_CAPACITOR = 1, REPLICANT_ALLOY = 1)
consumed_components = list(GEIS_CAPACITOR = 1, REPLICANT_ALLOY = 2)
whispered = TRUE
object_path = /obj/item/clockwork/clockwork_proselytizer/preloaded
creator_message = "<span class='brass'>You form a clockwork proselytizer.</span>"
@@ -248,7 +249,7 @@
vanish three minutes after being summoned."
invocations = list("Grant me...", "...the might of brass!")
channel_time = 20
consumed_components = list(REPLICANT_ALLOY = 1, HIEROPHANT_ANSIBLE = 1)
consumed_components = list(REPLICANT_ALLOY = 2, HIEROPHANT_ANSIBLE = 1)
whispered = TRUE
usage_tip = "You can impale human targets with the spear by pulling them, then attacking. Throwing the spear at a mob will do massive damage and stun them, but break the spear."
tier = SCRIPTURE_SCRIPT
@@ -307,7 +308,7 @@
Each servant assisting in the invocation adds one additional use and four additional seconds to the gateway's uses and duration."
invocations = list("Spatial Gateway...", "...activate!")
channel_time = 80
consumed_components = list(VANGUARD_COGWHEEL = 1, HIEROPHANT_ANSIBLE = 1)
consumed_components = list(VANGUARD_COGWHEEL = 1, HIEROPHANT_ANSIBLE = 2)
multiple_invokers_used = TRUE
multiple_invokers_optional = TRUE
usage_tip = "This gateway is strictly one-way and will only allow things through the invoker's portal."
@@ -356,7 +357,7 @@
chant_invocations = list("Use charge to kill!", "Slay with power!", "Hunt with energy!")
chant_amount = 4
chant_interval = 5
consumed_components = list(GEIS_CAPACITOR = 1, HIEROPHANT_ANSIBLE = 1)
consumed_components = list(GEIS_CAPACITOR = 1, HIEROPHANT_ANSIBLE = 2)
usage_tip = "Though it requires you to stand still, this scripture can do massive damage."
tier = SCRIPTURE_SCRIPT
primary_component = HIEROPHANT_ANSIBLE

View File

@@ -44,50 +44,57 @@
/obj/structure/destructible/clockwork/powered/clockwork_obelisk/attack_hand(mob/living/user)
if(!is_servant_of_ratvar(user) || total_accessable_power() < hierophant_cost || !anchored)
to_chat(user, "<span class='warning'>You place your hand on the obelisk, but it doesn't react.</span>")
to_chat(user, "<span class='warning'>You place your hand on [src], but it doesn't react.</span>")
return
var/choice = alert(user,"You place your hand on the obelisk...",,"Hierophant Broadcast","Spatial Gateway","Cancel")
var/choice = alert(user,"You place your hand on [src]...",,"Hierophant Broadcast","Spatial Gateway","Cancel")
switch(choice)
if("Hierophant Broadcast")
if(active)
to_chat(user, "<span class='warning'>The obelisk is sustaining a gateway and cannot broadcast!</span>")
to_chat(user, "<span class='warning'>[src] is sustaining a gateway and cannot broadcast!</span>")
return
if(!user.can_speak_vocal())
to_chat(user, "<span class='warning'>You cannot speak through the obelisk!</span>")
to_chat(user, "<span class='warning'>You cannot speak through [src]!</span>")
return
var/input = stripped_input(usr, "Please choose a message to send over the Hierophant Network.", "Hierophant Broadcast", "")
if(!is_servant_of_ratvar(user) || !input || !user.canUseTopic(src, !issilicon(user)))
return
if(!anchored)
to_chat(user, "<span class='warning'>[src] is no longer secured!</span>")
return FALSE
if(active)
to_chat(user, "<span class='warning'>The obelisk is sustaining a gateway and cannot broadcast!</span>")
return
if(!try_use_power(hierophant_cost))
to_chat(user, "<span class='warning'>The obelisk lacks the power to broadcast!</span>")
to_chat(user, "<span class='warning'>[src] is sustaining a gateway and cannot broadcast!</span>")
return
if(!user.can_speak_vocal())
to_chat(user, "<span class='warning'>You cannot speak through the obelisk!</span>")
to_chat(user, "<span class='warning'>You cannot speak through [src]!</span>")
return
if(!try_use_power(hierophant_cost))
to_chat(user, "<span class='warning'>[src] lacks the power to broadcast!</span>")
return
clockwork_say(user, text2ratvar("Hierophant Broadcast, activate! [html_decode(input)]"))
titled_hierophant_message(user, input, "big_brass", "large_brass")
if("Spatial Gateway")
if(active)
to_chat(user, "<span class='warning'>The obelisk is already sustaining a gateway!</span>")
return
if(!try_use_power(gateway_cost))
to_chat(user, "<span class='warning'>The obelisk lacks the power to open a gateway!</span>")
to_chat(user, "<span class='warning'>[src] is already sustaining a gateway!</span>")
return
if(!user.can_speak_vocal())
to_chat(user, "<span class='warning'>You need to be able to speak to open a gateway!</span>")
return
if(procure_gateway(user, round(100 * get_efficiency_mod(), 1), round(5 * get_efficiency_mod(), 1), 1) && !active)
clockwork_say(user, text2ratvar("Spatial Gateway, activate!"))
else
return_power(gateway_cost)
if(!try_use_power(gateway_cost))
to_chat(user, "<span class='warning'>[src] lacks the power to open a gateway!</span>")
return
if(procure_gateway(user, round(100 * get_efficiency_mod(), 1), round(5 * get_efficiency_mod(), 1), 1))
process()
if(!active) //we won't be active if nobody has sent a gateway to us
active = TRUE
clockwork_say(user, text2ratvar("Spatial Gateway, activate!"))
return
return_power(gateway_cost) //if we didn't return above, ie, successfully create a gateway, we give the power back
/obj/structure/destructible/clockwork/powered/clockwork_obelisk/process()
if(!anchored)
return
if(locate(/obj/effect/clockwork/spatial_gateway) in loc)
var/obj/effect/clockwork/spatial_gateway/SG = locate(/obj/effect/clockwork/spatial_gateway)
if(SG && SG.timerid) //it's a valid gateway, we're active
icon_state = active_icon
density = 0
active = TRUE

View File

@@ -28,7 +28,7 @@
var/mutable_appearance/alert_overlay = mutable_appearance('icons/effects/clockwork_effects.dmi', "ratvar_alert")
var/area/A = get_area(src)
notify_ghosts("The Justiciar's light calls to you! Reach out to Ratvar in [A.name] to be granted a shell to spread his glory!", null, source = src, alert_overlay = alert_overlay)
INVOKE_ASYNC(SSshuttle.emergency, /obj/docking_port/mobile/emergency..proc/request, null, 0)
INVOKE_ASYNC(SSshuttle.emergency, /obj/docking_port/mobile/emergency..proc/request, null, 0, 0)
/obj/structure/destructible/clockwork/massive/ratvar/Destroy()
GLOB.ratvar_awakens--
@@ -77,7 +77,7 @@
if(!prey && LAZYLEN(meals))
prey = pick(meals)
to_chat(prey, "<span class='heavy_brass'><font size=5>\"You will do, heretic.\"</font></span>\n\
<span class='userdanger'You feel something massive turn its crushing focus to you...</span>")
<span class='userdanger'>You feel something massive turn its crushing focus to you...</span>")
prey << 'sound/effects/ratvar_reveal.ogg'
else
if((!istype(prey, /obj/singularity/narsie) && prob(10) && LAZYLEN(meals) > 1) || prey.z != z || !(prey in meals))

View File

@@ -18,7 +18,7 @@
var/static/mutable_appearance/component_glow = mutable_appearance('icons/obj/clockwork_objects.dmi', "t_random_component")
var/component_id_to_produce
var/production_time = 0 //last time we produced a component
var/production_cooldown = 120
var/production_cooldown = 60
/obj/structure/destructible/clockwork/powered/tinkerers_daemon/Initialize()
. = ..()

View File

@@ -218,12 +218,12 @@
/datum/game_mode/cult/declare_completion()
if(!check_cult_victory())
feedback_set_details("round_end_result","win - cult win")
feedback_set("round_end_result",acolytes_survived)
SSblackbox.set_details("round_end_result","win - cult win")
SSblackbox.set_val("round_end_result",acolytes_survived)
to_chat(world, "<span class='greentext'>The cult has succeeded! Nar-sie has snuffed out another torch in the void!</span>")
else
feedback_set_details("round_end_result","loss - staff stopped the cult")
feedback_set("round_end_result",acolytes_survived)
SSblackbox.set_details("round_end_result","loss - staff stopped the cult")
SSblackbox.set_val("round_end_result",acolytes_survived)
to_chat(world, "<span class='redtext'>The staff managed to stop the cult! Dark words and heresy are no match for Nanotrasen's finest!</span>")
var/text = ""
@@ -236,31 +236,31 @@
if("survive")
if(!check_survive())
explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. ([acolytes_survived] escaped) <span class='greenannounce'>Success!</span>"
feedback_add_details("cult_objective","cult_survive|SUCCESS|[acolytes_needed]")
SSblackbox.add_details("cult_objective","cult_survive|SUCCESS|[acolytes_needed]")
SSticker.news_report = CULT_ESCAPE
else
explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. ([acolytes_survived] escaped) <span class='boldannounce'>Fail.</span>"
feedback_add_details("cult_objective","cult_survive|FAIL|[acolytes_needed]")
SSblackbox.add_details("cult_objective","cult_survive|FAIL|[acolytes_needed]")
SSticker.news_report = CULT_FAILURE
if("sacrifice")
if(sacrifice_target)
if(sacrifice_target in GLOB.sacrificed)
explanation = "Sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role]. <span class='greenannounce'>Success!</span>"
feedback_add_details("cult_objective","cult_sacrifice|SUCCESS")
SSblackbox.add_details("cult_objective","cult_sacrifice|SUCCESS")
else if(sacrifice_target && sacrifice_target.current)
explanation = "Sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role]. <span class='boldannounce'>Fail.</span>"
feedback_add_details("cult_objective","cult_sacrifice|FAIL")
SSblackbox.add_details("cult_objective","cult_sacrifice|FAIL")
else
explanation = "Sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role]. <span class='boldannounce'>Fail (Gibbed).</span>"
feedback_add_details("cult_objective","cult_sacrifice|FAIL|GIBBED")
SSblackbox.add_details("cult_objective","cult_sacrifice|FAIL|GIBBED")
if("eldergod")
if(!eldergod)
explanation = "Summon Nar-Sie. <span class='greenannounce'>Success!</span>"
feedback_add_details("cult_objective","cult_narsie|SUCCESS")
SSblackbox.add_details("cult_objective","cult_narsie|SUCCESS")
SSticker.news_report = CULT_SUMMON
else
explanation = "Summon Nar-Sie. <span class='boldannounce'>Fail.</span>"
feedback_add_details("cult_objective","cult_narsie|FAIL")
SSblackbox.add_details("cult_objective","cult_narsie|FAIL")
SSticker.news_report = CULT_FAILURE
text += "<br><B>Objective #[obj_count]</B>: [explanation]"

View File

@@ -133,7 +133,7 @@ This file contains the arcane tome files.
text += "<font color='red'><b>Talisman of Armaments</b></font><br>The Talisman of Arming will equip the user with armored robes, a backpack, an eldritch longsword, an empowered bola, and a pair of boots. Any items that cannot \
be equipped will not be summoned. Attacking a fellow cultist with it will instead equip them.<br><br>"
text += "<font color='red'><b>Talisman of Horrors</b></font><br>The Talisman of Horror must be applied directly to the victim, it will shatter your victim's mind with visions of the endtimes that may incapitate them.<br><br>"
text += "<font color='red'><b>Talisman of Horrors</b></font><br>The Talisman of Horror, unlike other talismans, can be applied at range, without the victim noticing. It will cause the victim to have severe hallucinations after a short while.<br><br>"
text += "<font color='red'><b>Talisman of Shackling</b></font><br>The Talisman of Shackling must be applied directly to the victim, it has 4 uses and cuffs victims with magic shackles that disappear when removed.<br><br>"
@@ -247,7 +247,7 @@ This file contains the arcane tome files.
var/obj/effect/rune/R = new rune_to_scribe(Turf, chosen_keyword)
R.add_mob_blood(user)
to_chat(user, "<span class='cult'>The [lowertext(R.cultist_name)] rune [R.cultist_desc]</span>")
feedback_add_details("cult_runes_scribed", R.cultist_name)
SSblackbox.add_details("cult_runes_scribed", R.cultist_name)
/obj/item/weapon/tome/proc/check_rune_turf(turf/T, mob/user)
var/area/A = get_area(T)

View File

@@ -211,7 +211,7 @@ structure_check() searches for nearby cultist structures required for the invoca
log_game("Talisman Creation rune failed - already in use")
return
for(var/I in subtypesof(/obj/item/weapon/paper/talisman) - /obj/item/weapon/paper/talisman/malformed - /obj/item/weapon/paper/talisman/supply - /obj/item/weapon/paper/talisman/supply/weak)
for(var/I in subtypesof(/obj/item/weapon/paper/talisman) - /obj/item/weapon/paper/talisman/malformed - /obj/item/weapon/paper/talisman/supply - /obj/item/weapon/paper/talisman/supply/weak - /obj/item/weapon/paper/talisman/summon_tome)
var/obj/item/weapon/paper/talisman/J = I
var/talisman_cult_name = initial(J.cultist_name)
if(talisman_cult_name)
@@ -633,9 +633,9 @@ structure_check() searches for nearby cultist structures required for the invoca
qdel(src) //delete before pulsing because it's a delay reee
empulse(E, 9*invokers.len, 12*invokers.len) // Scales now, from a single room to most of the station depending on # of chanters
//Rite of Astral Communion: Separates one's spirit from their body. They will take damage while it is active.
/obj/effect/rune/astral
cultist_name = "Astral Communion"
//Rite of Spirit Sight: Separates one's spirit from their body. They will take damage while it is active.
/obj/effect/rune/spirit
cultist_name = "Spirit Sight"
cultist_desc = "severs the link between one's spirit and body. This effect is taxing and one's physical body will take damage while this is active."
invocation = "Fwe'sh mah erl nyag r'ya!"
icon_state = "7"
@@ -644,24 +644,24 @@ structure_check() searches for nearby cultist structures required for the invoca
construct_invoke = 0
var/mob/living/affecting = null
/obj/effect/rune/astral/examine(mob/user)
/obj/effect/rune/spirit/examine(mob/user)
..()
if(affecting)
to_chat(user, "<span class='cultitalic'>A translucent field encases [user] above the rune!</span>")
/obj/effect/rune/astral/can_invoke(mob/living/user)
/obj/effect/rune/spirit/can_invoke(mob/living/user)
if(rune_in_use)
to_chat(user, "<span class='cultitalic'>[src] cannot support more than one body!</span>")
log_game("Astral Communion rune failed - more than one user")
log_game("Spirit Sight rune failed - more than one user")
return list()
var/turf/T = get_turf(src)
if(!(user in T))
to_chat(user, "<span class='cultitalic'>You must be standing on top of [src]!</span>")
log_game("Astral Communion rune failed - user not standing on rune")
log_game("Spirit Sight rune failed - user not standing on rune")
return list()
return ..()
/obj/effect/rune/astral/invoke(var/list/invokers)
/obj/effect/rune/spirit/invoke(var/list/invokers)
var/mob/living/user = invokers[1]
..()
var/turf/T = get_turf(src)
@@ -898,45 +898,6 @@ structure_check() searches for nearby cultist structures required for the invoca
if(is_servant_of_ratvar(L))
L.adjustStaminaLoss(tick_damage*0.5)
//Deals brute damage to all targets on the rune and heals the invoker for each target drained.
/obj/effect/rune/leeching
cultist_name = "Drain Life"
cultist_desc = "drains the life of all targets on the rune, restoring life to the user."
invocation = "Yu'gular faras desdae. Umathar uf'kal thenar!"
icon_state = "3"
color = "#9F1C34"
/obj/effect/rune/leeching/can_invoke(mob/living/user)
if(world.time <= user.next_move)
return list()
var/turf/T = get_turf(src)
var/list/potential_targets = list()
for(var/mob/living/carbon/M in T.contents - user)
if(M.stat != DEAD)
potential_targets += M
if(!potential_targets.len)
to_chat(user, "<span class='cultitalic'>There must be at least one valid target on the rune!</span>")
log_game("Leeching rune failed - no valid targets")
return list()
return ..()
/obj/effect/rune/leeching/invoke(var/list/invokers)
var/mob/living/user = invokers[1]
user.changeNext_move(CLICK_CD_CLICK_ABILITY)
..()
var/turf/T = get_turf(src)
for(var/mob/living/carbon/M in T.contents - user)
if(M.stat != DEAD)
var/drained_amount = rand(10,20)
M.apply_damage(drained_amount, BRUTE, "chest")
user.adjustBruteLoss(-drained_amount)
to_chat(M, "<span class='cultitalic'>You feel extremely weak.</span>")
user.Beam(T,icon_state="drainbeam",time=5)
user.visible_message("<span class='warning'>Blood flows from the rune into [user]!</span>", \
"<span class='cult'>Blood flows into you, healing your wounds and revitalizing your spirit.</span>")
//Rite of Spectral Manifestation: Summons a ghost on top of the rune as a cultist human with no items. User must stand on the rune at all times, and takes damage for each summoned ghost.
/obj/effect/rune/manifest
cultist_name = "Manifest Spirit"

View File

@@ -176,7 +176,7 @@
invocation = "Kla'atu barada nikt'o!"
health_cost = 1
creation_time = 30
uses = 2
uses = 6
var/revealing = FALSE //if it reveals or not
/obj/item/weapon/paper/talisman/true_sight/invoke(mob/living/user, successfuluse = 1)
@@ -186,7 +186,7 @@
"<span class='cultitalic'>You speak the words of the talisman, hiding nearby runes.</span>")
invocation = "Nikt'o barada kla'atu!"
revealing = TRUE
for(var/obj/effect/rune/R in range(3,user))
for(var/obj/effect/rune/R in range(4,user))
R.talismanhide()
else
user.visible_message("<span class='warning'>A flash of light shines from [user]'s hand!</span>", \
@@ -194,22 +194,6 @@
for(var/obj/effect/rune/R in range(3,user))
R.talismanreveal()
//Rite of False Truths: Same as rune
/obj/item/weapon/paper/talisman/make_runes_fake
cultist_name = "Talisman of Disguising"
cultist_desc = "A talisman that will make nearby runes appear fake."
color = "#ff80d5" // honk
invocation = "By'o nar'nar!"
creation_time = 20
/obj/item/weapon/paper/talisman/make_runes_fake/invoke(mob/living/user, successfuluse = 1)
. = ..()
user.visible_message("<span class='warning'>Dust flows from [user]s hand.</span>", \
"<span class='cultitalic'>You speak the words of the talisman, making nearby runes appear fake.</span>")
for(var/obj/effect/rune/R in orange(6,user))
R.desc = "A rune vandalizing the station."
//Rite of Disruption: Weaker than rune
/obj/item/weapon/paper/talisman/emp
cultist_name = "Talisman of Electromagnetic Pulse"
@@ -309,12 +293,12 @@
invocation = "Lo'Nab Na'Dm!"
creation_time = 80
/obj/item/weapon/paper/talisman/horror/attack(mob/living/target, mob/living/user)
if(iscultist(user))
to_chat(user, "<span class='cultitalic'>You disturb [target] with visons of the end!</span>")
/obj/item/weapon/paper/talisman/horror/afterattack(mob/living/target, mob/living/user)
if(iscultist(user) && (get_dist(user, target) < 7))
to_chat(user, "<span class='cultitalic'>You disturb [target] with visions of madness!</span>")
if(iscarbon(target))
var/mob/living/carbon/H = target
H.reagents.add_reagent("mindbreaker", 25)
H.reagents.add_reagent("mindbreaker", 12)
if(is_servant_of_ratvar(target))
to_chat(target, "<span class='userdanger'>You see a brief but horrible vision of Ratvar, rusted and scrapped, being torn apart.</span>")
target.emote("scream")
@@ -379,7 +363,7 @@
cultist_desc = "Use this talisman on a victim to handcuff them with dark bindings."
invocation = "In'totum Lig'abis!"
color = "#B27300" // burnt-orange
uses = 4
uses = 6
/obj/item/weapon/paper/talisman/shackle/invoke(mob/living/user, successfuluse = 0)
if(successfuluse) //if we're forced to be successful(we normally aren't) then do the normal stuff

View File

@@ -2,7 +2,7 @@
name = "devil"
config_tag = "devil"
antag_flag = ROLE_DEVIL
protected_jobs = list("Lawyer", "Librarian", "Chaplain", "Head of Security", "Captain", "AI")
protected_jobs = list("Lawyer", "Curator", "Chaplain", "Head of Security", "Captain", "AI")
required_players = 0
required_enemies = 1
recommended_enemies = 4

View File

@@ -80,12 +80,11 @@
report = config.intercept
addtimer(CALLBACK(GLOBAL_PROC, .proc/display_roundstart_logout_report), ROUNDSTART_LOGOUT_REPORT_TIME)
feedback_set_details("round_start","[time2text(world.realtime)]")
SSblackbox.set_details("round_start","[time2text(world.realtime)]")
if(SSticker && SSticker.mode)
feedback_set_details("game_mode","[SSticker.mode]")
SSblackbox.set_details("game_mode","[SSticker.mode]")
if(GLOB.revdata.commit)
feedback_set_details("revision","[GLOB.revdata.commit]")
feedback_set_details("server_ip","[world.internet_address]:[world.port]")
SSblackbox.set_details("revision","[GLOB.revdata.commit]")
if(report)
addtimer(CALLBACK(src, .proc/send_intercept, 0), rand(waittime_l, waittime_h))
generate_station_goals()
@@ -246,17 +245,17 @@
ghosts++
if(clients > 0)
feedback_set("round_end_clients",clients)
SSblackbox.set_val("round_end_clients",clients)
if(ghosts > 0)
feedback_set("round_end_ghosts",ghosts)
SSblackbox.set_val("round_end_ghosts",ghosts)
if(surviving_humans > 0)
feedback_set("survived_human",surviving_humans)
SSblackbox.set_val("survived_human",surviving_humans)
if(surviving_total > 0)
feedback_set("survived_total",surviving_total)
SSblackbox.set_val("survived_total",surviving_total)
if(escaped_humans > 0)
feedback_set("escaped_human",escaped_humans)
SSblackbox.set_val("escaped_human",escaped_humans)
if(escaped_total > 0)
feedback_set("escaped_total",escaped_total)
SSblackbox.set_val("escaped_total",escaped_total)
send2irc("Server", "Round just ended.")
return 0

View File

@@ -1,3 +1,5 @@
#define DOM_BLOCKED_SPAM_CAP 6
/obj/machinery/dominator
name = "dominator"
desc = "A visibly sinister device. Looks like you can break it if you hit it enough."
@@ -13,9 +15,20 @@
var/datum/gang/gang
var/operating = 0 //0=standby or broken, 1=takeover
var/warned = 0 //if this device has set off the warning at <3 minutes yet
var/spam_prevention = DOM_BLOCKED_SPAM_CAP //first message is immediate
var/datum/effect_system/spark_spread/spark_system
var/obj/effect/countdown/dominator/countdown
/proc/dominator_excessive_walls(atom/A)
var/open = 0
for(var/turf/T in circleviewturfs(center=A,radius=3))
if(!istype(T, /turf/closed))
open++
if(open < 40)
return TRUE
else
return FALSE
/obj/machinery/dominator/tesla_act()
qdel(src)
@@ -48,6 +61,16 @@
if(gang && gang.is_dominating)
var/time_remaining = gang.domination_time_remaining()
if(time_remaining > 0)
if(dominator_excessive_walls(src))
gang.domination_timer += 2
playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0)
if(spam_prevention < DOM_BLOCKED_SPAM_CAP)
spam_prevention++
else
gang.message_gangtools("Warning: There are too many walls around your gang's dominator, its signal is being blocked!")
say("Error: Takeover signal is currently blocked! There are too many walls within 3 standard units of this device.")
spam_prevention = 0
return
. = TRUE
playsound(loc, 'sound/items/timer.ogg', 10, 0)
if(!warned && (time_remaining < 180))

View File

@@ -249,7 +249,7 @@ GLOBAL_LIST_INIT(gang_colors_pool, list("red","orange","yellow","green","blue","
return gang_bosses
/proc/determine_domination_time(var/datum/gang/G)
return max(180,900 - (round((G.territory.len/GLOB.start_state.num_territories)*100, 1) * 12))
return max(180,480 - (round((G.territory.len/GLOB.start_state.num_territories)*100, 1) * 9))
//////////////////////////////////////////////////////////////////////
//Announces the end of the game with all relavent information stated//
@@ -260,12 +260,12 @@ GLOBAL_LIST_INIT(gang_colors_pool, list("red","orange","yellow","green","blue","
return
if(!winner)
to_chat(world, "<span class='redtext'>The station was [station_was_nuked ? "destroyed!" : "evacuated before a gang could claim it! The station wins!"]</span><br>")
feedback_set_details("round_end_result","loss - gangs failed takeover")
SSblackbox.set_details("round_end_result","loss - gangs failed takeover")
SSticker.news_report = GANG_LOSS
else
to_chat(world, "<span class='redtext'>The [winner.name] Gang successfully performed a hostile takeover of the station!</span><br>")
feedback_set_details("round_end_result","win - gang domination complete")
SSblackbox.set_details("round_end_result","win - gang domination complete")
SSticker.news_report = GANG_TAKEOVER
@@ -312,7 +312,9 @@ GLOBAL_LIST_INIT(gang_colors_pool, list("red","orange","yellow","green","blue","
G.domination(0.5)
priority_announce("Multiple station takeover attempts have made simultaneously. Conflicting takeover attempts appears to have restarted.","Network Alert")
else
var/datum/gang/G = winners[1]
G.is_dominating = FALSE
SSticker.mode.explosion_in_progress = 1
SSticker.station_explosion_cinematic(1)
SSticker.station_explosion_cinematic(1,"gang war", null)
SSticker.mode.explosion_in_progress = 0
SSticker.force_ending = pick(winners)
SSticker.force_ending = TRUE

View File

@@ -13,6 +13,7 @@
var/list/territory = list()
var/list/territory_new = list()
var/list/territory_lost = list()
var/recalls = 1
var/dom_attempts = 2
var/points = 15
var/datum/atom_hud/antag/gang/ganghud
@@ -262,4 +263,4 @@
ganghud = new()
/datum/gang/multiverse/income()
return
return

View File

@@ -108,10 +108,16 @@
/datum/gang_item/weapon/ammo/get_cost_display(mob/living/carbon/user, datum/gang/gang, obj/item/device/gangtool/gangtool)
return "&nbsp;&#8627;" + ..() //this is pretty hacky but it looks nice on the popup
/datum/gang_item/weapon/shuriken
name = "Shuriken"
id = "shuriken"
cost = 3
item_path = /obj/item/weapon/throwing_star
/datum/gang_item/weapon/switchblade
name = "Switchblade"
id = "switchblade"
cost = 10
cost = 5
item_path = /obj/item/weapon/switchblade
/datum/gang_item/weapon/pistol
@@ -125,6 +131,18 @@
id = "pistol_ammo"
cost = 10
item_path = /obj/item/ammo_box/magazine/m10mm
/datum/gang_item/weapon/sniper
name = ".50cal Sniper Rifle"
id = "sniper"
cost = 40
item_path = /obj/item/weapon/gun/ballistic/automatic/sniper_rifle
/datum/gang_item/weapon/ammo/sniper_ammo
name = "Standard .50cal Sniper Rounds"
id = "sniper_ammo"
cost = 15
item_path = /obj/item/ammo_box/magazine/sniper_rounds
/datum/gang_item/weapon/uzi
name = "Uzi SMG"
@@ -138,30 +156,8 @@
id = "uzi_ammo"
cost = 40
item_path = /obj/item/ammo_box/magazine/uzim9mm
//SLEEPING CARP
/datum/gang_item/weapon/bostaff
name = "Bo Staff"
id = "bostaff"
cost = 10
item_path = /obj/item/weapon/twohanded/bostaff
/datum/gang_item/weapon/sleeping_carp_scroll
name = "Sleeping Carp Scroll (one-use)"
id = "sleeping_carp_scroll"
cost = 30
item_path = /obj/item/weapon/sleeping_carp_scroll
spawn_msg = "<span class='notice'>Anyone who reads the <b>sleeping carp scroll</b> will learn secrets of the sleeping carp martial arts style.</span>"
/datum/gang_item/weapon/wrestlingbelt
name = "Wrestling Belt"
id = "wrastling_belt"
cost = 20
item_path = /obj/item/weapon/storage/belt/champion/wrestling
spawn_msg = "<span class='notice'>Anyone wearing the <b>wresting belt</b> will know how to be effective with wrestling.</span>"
///////////////////
//EQUIPMENT
///////////////////
@@ -175,6 +171,12 @@
id = "spraycan"
cost = 5
item_path = /obj/item/toy/crayon/spraycan/gang
/datum/gang_item/equipment/sharpener
name = "Sharpener"
id = "whetstone"
cost = 3
item_path = /obj/item/weapon/sharpener
/datum/gang_item/equipment/necklace
name = "Gold Necklace"
@@ -182,12 +184,31 @@
cost = 1
item_path = /obj/item/clothing/neck/necklace/dope
/datum/gang_item/equipment/emp
name = "EMP Grenade"
id = "EMP"
cost = 5
item_path = /obj/item/weapon/grenade/empgrenade
/datum/gang_item/equipment/c4
name = "C4 Explosive"
id = "c4"
cost = 10
cost = 7
item_path = /obj/item/weapon/grenade/plastic/c4
/datum/gang_item/equipment/frag
name = "Fragmentation Grenade"
id = "frag nade"
cost = 10
item_path = /obj/item/weapon/grenade/syndieminibomb/concussion/frag
/datum/gang_item/equipment/stimpack
name = "Black Market Stimulants"
id = "stimpack"
cost = 15
item_path = /obj/item/weapon/reagent_containers/syringe/stimulants
/datum/gang_item/equipment/implant_breaker
name = "Implant Breaker"
id = "implant_breaker"
@@ -284,7 +305,11 @@
if(obj.density)
to_chat(user, "<span class='warning'>There's not enough room here!</span>")
return FALSE
if(dominator_excessive_walls(user))
to_chat(user, "span class='warning'>The <b>dominator</b> will not function here! The <b>dominator</b> requires an open space within three standard units so that walls do not interfere with the signal.</span>")
return FALSE
if(!(usrarea.type in gang.territory|gang.territory_new))
to_chat(user, "<span class='warning'>The <b>dominator</b> can be spawned only on territory controlled by your gang!</span>")
return FALSE

View File

@@ -11,7 +11,7 @@
..()
last_used = world.time
/obj/item/weapon/pen/gang/attack(mob/living/M, mob/user)
/obj/item/weapon/pen/gang/attack(mob/living/M, mob/user, stealth = TRUE)
if(!istype(M))
return
if(ishuman(M) && ishuman(user) && M.stat != DEAD)

View File

@@ -168,6 +168,9 @@
if(recalling)
to_chat(usr, "<span class='warning'>Error: Recall already in progress.</span>")
return 0
if(!gang.recalls)
to_chat(usr, "<span class='warning'>Error: Unable to access communication arrays. Firewall has logged our signature and is blocking all further attempts.</span>")
gang.message_gangtools("[usr] is attempting to recall the emergency shuttle.")
recalling = 1
@@ -209,6 +212,7 @@
userturf = get_turf(user)
if(userturf.z == 1) //Check one more time that they are on station.
if(SSshuttle.cancelEvac(user))
gang.recalls -= 1
return 1
to_chat(loc, "<span class='info'>\icon[src]No response recieved. Emergency shuttle cannot be recalled at this time.</span>")

View File

@@ -50,8 +50,8 @@
else
to_chat(world, "<span class='boldnotice'>Nobody survived the meteor storm!</span>")
feedback_set_details("round_end_result","end - evacuation")
feedback_set("round_end_result",survivors)
SSblackbox.set_details("round_end_result","end - evacuation")
SSblackbox.set_val("round_end_result",survivors)
..()
return 1

View File

@@ -20,7 +20,7 @@
explanation_text = "Your brain is broken... you can only communicate in"
/datum/objective/abductee/speech/New()
var/style = pick(list("pantomime", "rhyme", "haiku", "extended metaphors", "riddles", "extremely literal terms", "sound effects", "military jargon"))
var/style = pick(list("pantomime", "rhyme", "haiku", "extended metaphors", "riddles", "extremely literal terms", "sound effects", "military jargon", "three word sentences"))
explanation_text+= " [style]."
/datum/objective/abductee/capture
@@ -146,3 +146,25 @@
/datum/objective/abductee/sixthsense
explanation_text = "You died back there and went to heaven... or is it hell? No one here seems to know they're dead. Convince them, and maybe you can escape this limbo."
/datum/objective/abductee/toupefallacy
explanation_text = "There are alien parasites masquerading as people's hair. Save people from this invasion."
/datum/objective/abductee/everyoneisthesame
explanation_text = "There is only one other person in existence, he is just really good at pretending to be multiple people."
/datum/objective/abductee/forbiddennumber
explanation_text = "Numbers, how do they work?" //Shouldn't ever see this.
/datum/objective/abductee/forbiddennumber/New()
var/number = rand(2,10)
explanation_text = "Ignore anything in a set of [number], they don't exist."
/datum/objective/abductee/foreignname
explanation_text = "No matter how they say it, other people keep mispronouncing your name. Be sure to correct them whenever possible."
/datum/objective/abductee/pairoff
explanation_text = "Being alone and in large groups are both frightening. Try to be alone with only one other person whenever possible."
/datum/objective/abductee/takeblame
explanation_text = "Try to get formally executed for a crime you didn't commit, without a false confession."

View File

@@ -107,10 +107,10 @@
/datum/game_mode/monkey/declare_completion()
if(check_monkey_victory())
feedback_set_details("round_end_result","win - monkey win")
feedback_set("round_end_result",escaped_monkeys)
SSblackbox.set_details("round_end_result","win - monkey win")
SSblackbox.set_val("round_end_result",escaped_monkeys)
to_chat(world, "<span class='userdanger'>The monkeys have overthrown their captors! Eeek eeeek!!</span>")
else
feedback_set_details("round_end_result","loss - staff stopped the monkeys")
feedback_set("round_end_result",escaped_monkeys)
SSblackbox.set_details("round_end_result","loss - staff stopped the monkeys")
SSblackbox.set_val("round_end_result",escaped_monkeys)
to_chat(world, "<span class='userdanger'>The staff managed to contain the monkey infestation!</span>")

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