Merge remote-tracking branch 'citadel/master' into combat_rework_experimental
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
name = "Initializing..."
|
||||
var/target
|
||||
|
||||
/obj/effect/statclick/New(loc, text, target) //Don't port this to Initialize it's too critical
|
||||
INITIALIZE_IMMEDIATE(/obj/effect/statclick) //it's new, but rebranded.
|
||||
|
||||
/obj/effect/statclick/Initialize(mapload, text, target) //Don't port this to Initialize it's too critical
|
||||
. = ..()
|
||||
name = text
|
||||
src.target = target
|
||||
|
||||
@@ -551,3 +551,15 @@
|
||||
|
||||
/datum/config_entry/number/max_shuttle_size
|
||||
config_entry_value = 500
|
||||
|
||||
//wound config stuff (increases the max injury roll, making injuries more likely)
|
||||
/datum/config_entry/number/wound_exponent
|
||||
config_entry_value = WOUND_DAMAGE_EXPONENT
|
||||
min_val = 0
|
||||
integer = FALSE
|
||||
|
||||
//adds a set amount to any injury rolls on a limb using get_damage() multiplied by this number
|
||||
/datum/config_entry/number/wound_damage_multiplier
|
||||
config_entry_value = 0.333
|
||||
min_val = 0
|
||||
integer = FALSE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* Failsafe
|
||||
*
|
||||
* Pretty much pokes the MC to make sure it's still alive.
|
||||
@@ -31,7 +31,7 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
|
||||
Initialize()
|
||||
|
||||
/datum/controller/failsafe/Initialize()
|
||||
set waitfor = 0
|
||||
set waitfor = FALSE
|
||||
Failsafe.Loop()
|
||||
if(!QDELETED(src))
|
||||
qdel(src) //when Loop() returns, we delete ourselves and let the mc recreate us
|
||||
@@ -97,4 +97,4 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
|
||||
|
||||
/datum/controller/failsafe/stat_entry(msg)
|
||||
msg = "Defcon: [defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])"
|
||||
return msg
|
||||
return msg
|
||||
@@ -20,8 +20,9 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
|
||||
|
||||
Initialize()
|
||||
|
||||
/datum/controller/global_vars/Destroy()
|
||||
//fuck off kevinz
|
||||
/datum/controller/global_vars/Destroy(force)
|
||||
// This is done to prevent an exploit where admins can get around protected vars
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
return QDEL_HINT_IWILLGC
|
||||
|
||||
/datum/controller/global_vars/stat_entry(msg)
|
||||
|
||||
@@ -97,9 +97,9 @@
|
||||
return
|
||||
|
||||
//This is used so the mc knows when the subsystem sleeps. do not override.
|
||||
/datum/controller/subsystem/proc/ignite(resumed = 0)
|
||||
/datum/controller/subsystem/proc/ignite(resumed = FALSE)
|
||||
SHOULD_NOT_OVERRIDE(TRUE)
|
||||
set waitfor = 0
|
||||
set waitfor = FALSE
|
||||
. = SS_SLEEPING
|
||||
fire(resumed)
|
||||
. = state
|
||||
|
||||
@@ -366,7 +366,7 @@ SUBSYSTEM_DEF(air)
|
||||
sleep(world.tick_lag)
|
||||
var/timer = world.timeofday
|
||||
log_mapping("There are [starting_ats] active turfs at roundstart caused by a difference of the air between the adjacent turfs. You can see its coordinates using \"Mapping -> Show roundstart AT list\" verb (debug verbs required).")
|
||||
var/list/turfs_to_check = get_amt_active_turfs()
|
||||
var/list/turfs_to_check = get_active_turfs()
|
||||
for(var/T in turfs_to_check)
|
||||
GLOB.active_turfs_startlist += T
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(dcs)
|
||||
name = "Datum Component System"
|
||||
flags = SS_NO_INIT
|
||||
wait = 1 SECONDS
|
||||
|
||||
var/list/elements_by_type = list()
|
||||
|
||||
|
||||
@@ -60,9 +60,9 @@ SUBSYSTEM_DEF(economy)
|
||||
secmedsrv_payout() // Payout based on crew safety, health, and mood.
|
||||
civ_payout() // Payout based on ??? Profit
|
||||
car_payout() // Cargo's natural gain in the cash moneys.
|
||||
for(var/A in bank_accounts)
|
||||
var/datum/bank_account/B = A
|
||||
B.payday(1)
|
||||
for(var/account in bank_accounts)
|
||||
var/datum/bank_account/bank_account = account
|
||||
bank_account.payday(1)
|
||||
|
||||
|
||||
/datum/controller/subsystem/economy/proc/get_dep_account(dep_id)
|
||||
|
||||
@@ -100,7 +100,7 @@ SUBSYSTEM_DEF(events)
|
||||
// REEEEEEEEE
|
||||
/client/proc/forceEvent()
|
||||
set name = "Trigger Event"
|
||||
set category = "Fun"
|
||||
set category = "Admin.Events"
|
||||
|
||||
if(!holder ||!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
@@ -665,7 +665,7 @@ SUBSYSTEM_DEF(job)
|
||||
message_admins(msg)
|
||||
CRASH(msg)
|
||||
|
||||
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, equipbackpackstuff, bypass_prereqs = FALSE)
|
||||
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, equipbackpackstuff, bypass_prereqs = FALSE, can_drop = TRUE)
|
||||
var/mob/the_mob = N
|
||||
if(!the_mob)
|
||||
the_mob = M // cause this doesn't get assigned if player is a latejoiner
|
||||
@@ -694,9 +694,15 @@ SUBSYSTEM_DEF(job)
|
||||
var/mob/living/carbon/C = M
|
||||
var/obj/item/storage/backpack/B = C.back
|
||||
if(!B || !SEND_SIGNAL(B, COMSIG_TRY_STORAGE_INSERT, I, null, TRUE, TRUE)) // Otherwise, try to put it in the backpack, for carbons.
|
||||
I.forceMove(get_turf(C))
|
||||
if(can_drop)
|
||||
I.forceMove(get_turf(C))
|
||||
else
|
||||
qdel(I)
|
||||
else if(!M.equip_to_slot_if_possible(I, SLOT_IN_BACKPACK, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // Otherwise, try to put it in the backpack
|
||||
I.forceMove(get_turf(M)) // If everything fails, just put it on the floor under the mob.
|
||||
if(can_drop)
|
||||
I.forceMove(get_turf(M)) // If everything fails, just put it on the floor under the mob.
|
||||
else
|
||||
qdel(I)
|
||||
|
||||
/datum/controller/subsystem/job/proc/FreeRole(rank)
|
||||
if(!rank)
|
||||
|
||||
@@ -447,7 +447,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
//Manual loading of away missions.
|
||||
/client/proc/admin_away()
|
||||
set name = "Load Away Mission / Virtual Reality"
|
||||
set category = "Fun"
|
||||
set category = "Admin.Events"
|
||||
|
||||
if(!holder ||!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
@@ -27,28 +27,6 @@ SUBSYSTEM_DEF(statpanels)
|
||||
var/ETA = SSshuttle.emergency.getModeStr()
|
||||
if(ETA)
|
||||
global_data += "[ETA] [SSshuttle.emergency.getTimerStr()]"
|
||||
/* Please fix
|
||||
if(SSvote.mode)
|
||||
var/static/list/supported = list(PLURALITY_VOTING, APPROVAL_VOTING)
|
||||
global_data += "Vote active!, There is currently a vote running. Question: [SSvote.question]"
|
||||
if(!(SSvote.vote_system in supported))
|
||||
global_data += "<STATPANEL VOTING DISABLED>, The current vote system is not supported by statpanel rendering. Please vote manually by opening the vote popup using the action button or chat link."
|
||||
return
|
||||
global_data += "Time Left:, [round(SSvote.end_time - world.time)] seconds"
|
||||
|
||||
global_data += "Choices:"
|
||||
for(var/i in 1 to SSvote.choice_statclicks.len)
|
||||
var/choice = SSvote.choice_statclicks[i]
|
||||
var/ivotedforthis = FALSE
|
||||
if(usr.ckey)
|
||||
switch(SSvote.vote_system)
|
||||
if(APPROVAL_VOTING)
|
||||
ivotedforthis = SSvote.voted[usr.ckey] && (i in SSvote.voted[usr.ckey])
|
||||
if(PLURALITY_VOTING)
|
||||
ivotedforthis = SSvote.voted[usr.ckey] == i
|
||||
|
||||
global_data += (ivotedforthis? "\[X\]" : "\[ \]", SSvote.choice_statclicks[choice])
|
||||
*/
|
||||
|
||||
encoded_global_data = url_encode(json_encode(global_data))
|
||||
src.currentrun = GLOB.clients.Copy()
|
||||
@@ -63,6 +41,31 @@ SUBSYSTEM_DEF(statpanels)
|
||||
var/ping_str = url_encode("Ping: [round(target.lastping, 1)]ms (Average: [round(target.avgping, 1)]ms)")
|
||||
var/other_str = url_encode(json_encode(target.mob.get_status_tab_items()))
|
||||
target << output("[encoded_global_data];[ping_str];[other_str]", "statbrowser:update")
|
||||
if(SSvote.mode)
|
||||
var/list/vote_arry = list(
|
||||
list("Vote active!", "There is currently a vote running. Question: [SSvote.question]")
|
||||
) //see the MC on how this works.
|
||||
if(!(SSvote.vote_system in list(PLURALITY_VOTING, APPROVAL_VOTING)))
|
||||
vote_arry[++vote_arry.len] += list("STATPANEL VOTING DISABLED!", "The current vote system is not supported by statpanel rendering. Please vote manually by opening the vote popup using the action button or chat link.", "disabled")
|
||||
//does not return.
|
||||
else
|
||||
vote_arry[++vote_arry.len] += list("Time Left:", " [round(SSvote.end_time - world.time)] seconds")
|
||||
vote_arry[++vote_arry.len] += list("Choices:", "")
|
||||
for(var/choice in SSvote.choice_statclicks)
|
||||
var/choice_id = SSvote.choice_statclicks[choice]
|
||||
var/ivotedforthis = FALSE
|
||||
if(target.ckey)
|
||||
switch(SSvote.vote_system)
|
||||
if(APPROVAL_VOTING)
|
||||
ivotedforthis = SSvote.voted[target.ckey] && (text2num(choice_id) in SSvote.voted[usr.ckey])
|
||||
if(PLURALITY_VOTING)
|
||||
ivotedforthis = (SSvote.voted[target.ckey] == text2num(choice_id))
|
||||
vote_arry[++vote_arry.len] += list(ivotedforthis ? "\[X\]" : "\[ \]", choice, "[REF(SSvote)];vote=[choice_id];statpannel=1")
|
||||
var/vote_str = url_encode(json_encode(vote_arry))
|
||||
target << output("[vote_str]", "statbrowser:update_voting")
|
||||
else
|
||||
var/null_bullet = url_encode(json_encode(list(list(null))))
|
||||
target << output("[null_bullet]", "statbrowser:update_voting")
|
||||
if(!target.holder)
|
||||
target << output("", "statbrowser:remove_admin_tabs")
|
||||
else
|
||||
|
||||
@@ -16,6 +16,7 @@ SUBSYSTEM_DEF(vote)
|
||||
var/question = null
|
||||
var/list/choices = list()
|
||||
/// List of choice = object for statclick objects for statpanel voting
|
||||
/// statclick rework? 2: list("name"="id")
|
||||
var/list/choice_statclicks = list()
|
||||
var/list/scores = list()
|
||||
var/list/choice_descs = list() // optional descriptions
|
||||
@@ -49,34 +50,6 @@ SUBSYSTEM_DEF(vote)
|
||||
client_popup.open(0)
|
||||
next_pop = world.time+VOTE_COOLDOWN
|
||||
|
||||
/**
|
||||
* Renders a statpanel. Directly uses statpanel/stat calls since this is called from base of mob/Stat().
|
||||
*/
|
||||
/datum/controller/subsystem/vote/proc/render_statpanel(mob/M)
|
||||
if(!mode) // check if vote is running
|
||||
return
|
||||
if(!statpanel("Status")) // don't bother if they're not focused on this panel
|
||||
return
|
||||
var/static/list/supported = list(PLURALITY_VOTING, APPROVAL_VOTING)
|
||||
stat("Vote active!", "There is currently a vote running. Question: [question]")
|
||||
if(!(vote_system in supported))
|
||||
stat("<STATPANEL VOTING DISABLED>", "The current vote system is not supported by statpanel rendering. Please vote manually by opening the vote popup using the action button or chat link.")
|
||||
return
|
||||
stat("Time Left:", "[round(end_time - world.time)] seconds")
|
||||
stat(null, null)
|
||||
stat("Choices:", null)
|
||||
stat(null, null)
|
||||
for(var/i in 1 to choice_statclicks.len)
|
||||
var/choice = choice_statclicks[i]
|
||||
var/ivotedforthis = FALSE
|
||||
switch(vote_system)
|
||||
if(APPROVAL_VOTING)
|
||||
ivotedforthis = voted[usr.ckey] && (i in voted[usr.ckey])
|
||||
if(PLURALITY_VOTING)
|
||||
ivotedforthis = voted[usr.ckey] == i
|
||||
stat(ivotedforthis? "\[X\]" : "\[ \]", choice_statclicks[choice])
|
||||
stat(null, null)
|
||||
|
||||
/datum/controller/subsystem/vote/proc/reset()
|
||||
initiator = null
|
||||
end_time = 0
|
||||
@@ -87,26 +60,10 @@ SUBSYSTEM_DEF(vote)
|
||||
voted.Cut()
|
||||
voting.Cut()
|
||||
scores.Cut()
|
||||
cleanup_statclicks()
|
||||
choice_statclicks = list()
|
||||
display_votes = initial(display_votes) //CIT CHANGE - obfuscated votes
|
||||
remove_action_buttons()
|
||||
|
||||
/datum/controller/subsystem/vote/proc/cleanup_statclicks()
|
||||
for(var/choice in choice_statclicks)
|
||||
qdel(choice_statclicks[choice])
|
||||
choice_statclicks = list()
|
||||
|
||||
/obj/effect/statclick/vote
|
||||
name = "ERROR"
|
||||
var/choice
|
||||
|
||||
/obj/effect/statclick/vote/Click()
|
||||
SSvote.submit_vote(choice)
|
||||
|
||||
/obj/effect/statclick/vote/New(loc, choice, name)
|
||||
src.choice = choice
|
||||
src.name = name
|
||||
|
||||
/datum/controller/subsystem/vote/proc/get_result()
|
||||
//get the highest number of votes
|
||||
var/greatest_votes = 0
|
||||
@@ -582,10 +539,10 @@ SUBSYSTEM_DEF(vote)
|
||||
to_chat(world, "\n<font color='purple'><b>[text]</b>\nType <b>vote</b> or click <a href='?src=[REF(src)]'>here</a> to place your votes.\nYou have [DisplayTimeText(vp)] to vote.</font>")
|
||||
end_time = started_time+vp
|
||||
// generate statclick list
|
||||
cleanup_statclicks()
|
||||
choice_statclicks = list()
|
||||
for(var/i in 1 to choices.len)
|
||||
var/choice = choices[i]
|
||||
choice_statclicks[choice] = new /obj/effect/statclick/vote(null, i, choice)
|
||||
choice_statclicks[choice] = "[i]"
|
||||
//
|
||||
for(var/c in GLOB.clients)
|
||||
SEND_SOUND(c, sound('sound/misc/server-ready.ogg'))
|
||||
@@ -785,7 +742,8 @@ SUBSYSTEM_DEF(vote)
|
||||
submit_vote(round(text2num(href_list["vote"])),round(text2num(href_list["score"])))
|
||||
else
|
||||
submit_vote(round(text2num(href_list["vote"])))
|
||||
usr.vote()
|
||||
if(!href_list["statpannel"])
|
||||
usr.vote()
|
||||
|
||||
/datum/controller/subsystem/vote/proc/remove_action_buttons()
|
||||
for(var/v in generated_actions)
|
||||
|
||||
Reference in New Issue
Block a user