commit
This commit is contained in:
@@ -441,24 +441,6 @@
|
||||
dat += "<td><A href='?priv_msg=[N.key]'>PM</A></td></tr>"
|
||||
dat += "</table>"
|
||||
|
||||
for(var/datum/gang/G in SSticker.mode.gangs)
|
||||
dat += "<br><table cellspacing=5><tr><td><B>[G.name] Gang: [round((G.territory.len/GLOB.start_state.num_territories)*100, 1)]% Control</B></td><td></td></tr>"
|
||||
for(var/datum/mind/N in G.bosses)
|
||||
var/mob/M = N.current
|
||||
if(!M)
|
||||
dat += "<tr><td><a href='?_src_=vars;Vars=\ref[N]'>[N.name]([N.key])</a><i>Gang Boss body destroyed!</i></td>"
|
||||
dat += "<td><A href='?priv_msg=[N.key]'>PM</A></td></tr>"
|
||||
else
|
||||
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a> <b>(Boss)</b>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
|
||||
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
|
||||
dat += "<td><A href='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</a></td></tr>"
|
||||
for(var/datum/mind/N in G.gangsters)
|
||||
var/mob/M = N.current
|
||||
if(M)
|
||||
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
|
||||
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td></tr>"
|
||||
dat += "</table>"
|
||||
|
||||
if(SSticker.mode.changelings.len > 0)
|
||||
dat += "<br><table cellspacing=5><tr><td><B>Changelings</B></td><td></td><td></td></tr>"
|
||||
for(var/datum/mind/changeling in SSticker.mode.changelings)
|
||||
|
||||
@@ -94,13 +94,6 @@
|
||||
message_admins("[key_name(usr)] spawned a blob with base resource gain [strength].")
|
||||
log_admin("[key_name(usr)] spawned a blob with base resource gain [strength].")
|
||||
new/datum/round_event/ghost_role/blob(TRUE, strength)
|
||||
if("gangs")
|
||||
if(src.makeGangsters())
|
||||
message_admins("[key_name(usr)] created gangs.")
|
||||
log_admin("[key_name(usr)] created gangs.")
|
||||
else
|
||||
message_admins("[key_name(usr)] tried to create gangs. Unfortunately, there were not enough candidates available.")
|
||||
log_admin("[key_name(usr)] failed create gangs.")
|
||||
if("centcom")
|
||||
message_admins("[key_name(usr)] is creating a CentCom response team...")
|
||||
if(src.makeEmergencyresponseteam())
|
||||
@@ -804,14 +797,6 @@
|
||||
else
|
||||
dat += "<td width='20%'><a href='?src=\ref[src];jobban3=revolutionary;jobban4=\ref[M]'>Revolutionary</a></td>"
|
||||
|
||||
//Gangster
|
||||
if(jobban_isbanned(M, "gangster") || isbanned_dept)
|
||||
dat += "<td width='20%'><a href='?src=\ref[src];jobban3=gangster;jobban4=\ref[M]'><font color=red>Gangster</font></a></td>"
|
||||
else
|
||||
dat += "<td width='20%'><a href='?src=\ref[src];jobban3=gangster;jobban4=\ref[M]'>Gangster</a></td>"
|
||||
|
||||
dat += "</tr><tr align='center'>" //Breaking it up so it fits nicer on the screen every 5 entries
|
||||
|
||||
//Cultist
|
||||
if(jobban_isbanned(M, "cultist") || isbanned_dept)
|
||||
dat += "<td width='20%'><a href='?src=\ref[src];jobban3=cultist;jobban4=\ref[M]'><font color=red>Cultist</font></a></td>"
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
<a href='?src=\ref[src];makeAntag=cult'>Make Cult</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=clockcult'>Make Clockwork Cult</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=blob'>Make Blob</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=gangs'>Make Gangsters</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=wizard'>Make Wizard (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=nukeops'>Make Nuke Team (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=centcom'>Make CentCom Response Team (Requires Ghosts)</a><br>
|
||||
@@ -358,43 +357,6 @@
|
||||
|
||||
return
|
||||
|
||||
|
||||
/datum/admins/proc/makeGangsters()
|
||||
|
||||
var/datum/game_mode/gang/temp = new
|
||||
if(config.protect_roles_from_antagonist)
|
||||
temp.restricted_jobs += temp.protected_jobs
|
||||
|
||||
if(config.protect_assistant_from_antagonist)
|
||||
temp.restricted_jobs += "Assistant"
|
||||
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(ROLE_GANG in applicant.client.prefs.be_special)
|
||||
var/turf/T = get_turf(applicant)
|
||||
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
|
||||
if(!jobban_isbanned(applicant, ROLE_GANG) && !jobban_isbanned(applicant, "Syndicate"))
|
||||
if(temp.age_check(applicant.client))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len >= 2)
|
||||
for(var/needs_assigned=2,needs_assigned>0,needs_assigned--)
|
||||
H = pick(candidates)
|
||||
if(GLOB.gang_colors_pool.len)
|
||||
var/datum/gang/newgang = new()
|
||||
SSticker.mode.gangs += newgang
|
||||
H.mind.make_Gang(newgang)
|
||||
candidates.Remove(H)
|
||||
else if(needs_assigned == 2)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
/datum/admins/proc/makeOfficial()
|
||||
var/mission = input("Assign a task for the official", "Assign Task", "Conduct a routine preformance review of [station_name()] and its Captain.")
|
||||
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to be considered to be a CentCom Official?", "deathsquad")
|
||||
|
||||
@@ -50,8 +50,8 @@ GLOBAL_VAR_INIT(highlander, FALSE)
|
||||
equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(src), slot_ears)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/head/beret/highlander(src), slot_head)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(src), slot_shoes)
|
||||
equip_to_slot_or_del(new /obj/item/pinpointer(src), slot_l_store)
|
||||
for(var/obj/item/pinpointer/P in src)
|
||||
equip_to_slot_or_del(new /obj/item/pinpointer/nuke(src), slot_l_store)
|
||||
for(var/obj/item/pinpointer/nuke/P in src)
|
||||
P.attack_self(src)
|
||||
var/obj/item/card/id/W = new(src)
|
||||
W.icon_state = "centcom"
|
||||
@@ -77,48 +77,3 @@ GLOBAL_VAR_INIT(highlander, FALSE)
|
||||
|
||||
to_chat(src, "<span class='boldannounce'>Your [H1.name] cries out for blood. Claim the lives of others, and your own will be restored!\n\
|
||||
Activate it in your hand, and it will lead to the nearest target. Attack the nuclear authentication disk with it, and you will store it.</span>")
|
||||
|
||||
/proc/only_me()
|
||||
if(!SSticker.HasRoundStarted())
|
||||
alert("The game hasn't started yet!")
|
||||
return
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H.stat == 2 || !(H.client)) continue
|
||||
if(is_special_character(H)) continue
|
||||
|
||||
SSticker.mode.traitors += H.mind
|
||||
H.mind.special_role = "[H.real_name] Prime"
|
||||
|
||||
var/datum/objective/hijackclone/hijack_objective = new /datum/objective/hijackclone
|
||||
hijack_objective.owner = H.mind
|
||||
H.mind.objectives += hijack_objective
|
||||
|
||||
to_chat(H, "<B>You are the multiverse summoner. Activate your blade to summon copies of yourself from another universe to fight by your side.</B>")
|
||||
H.mind.announce_objectives()
|
||||
|
||||
var/datum/gang/multiverse/G = new(src, "[H.real_name]")
|
||||
SSticker.mode.gangs += G
|
||||
G.bosses[H.mind] = 0 //No they don't use influence but this prevents runtimes.
|
||||
G.add_gang_hud(H.mind)
|
||||
H.mind.gang_datum = G
|
||||
|
||||
var/obj/item/slot_item_ID = H.get_item_by_slot(slot_wear_id)
|
||||
qdel(slot_item_ID)
|
||||
var/obj/item/slot_item_hand = H.get_item_for_held_index(2)
|
||||
H.dropItemToGround(slot_item_hand)
|
||||
|
||||
var /obj/item/multisword/multi = new(H)
|
||||
H.put_in_hands_or_del(multi)
|
||||
|
||||
var/obj/item/card/id/W = new(H)
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Multiverse Summoner"
|
||||
W.registered_name = H.real_name
|
||||
W.update_label(H.real_name)
|
||||
H.equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used THERE CAN BE ONLY ME!</span>")
|
||||
log_admin("[key_name(usr)] used there can be only me.")
|
||||
|
||||
@@ -615,7 +615,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]")
|
||||
|
||||
if(isobserver(M))
|
||||
new /obj/effect/gibspawner/generic(get_turf(M))
|
||||
new /obj/effect/gibspawner/generic(get_turf(M))
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
M.gib()
|
||||
@@ -649,9 +649,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set desc = "switches between 1x and custom views"
|
||||
|
||||
if(view == world.view)
|
||||
change_view(input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128))
|
||||
change_view(input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128))
|
||||
else
|
||||
change_view(world.view)
|
||||
change_view(world.view)
|
||||
|
||||
log_admin("[key_name(usr)] changed their view range to [view].")
|
||||
//message_admins("\blue [key_name_admin(usr)] changed their view range to [view].") //why? removed by order of XSI
|
||||
@@ -970,10 +970,6 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
if(istype(H, /datum/atom_hud/antag))
|
||||
(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
|
||||
|
||||
for(var/datum/gang/G in SSticker.mode.gangs)
|
||||
var/datum/atom_hud/antag/H = G.ganghud
|
||||
(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
|
||||
|
||||
to_chat(usr, "You toggled your admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
||||
message_admins("[key_name_admin(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
||||
log_admin("[key_name(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
||||
@@ -1157,14 +1153,14 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
set category = "Server"
|
||||
set name = "Toggle Hub"
|
||||
|
||||
world.update_hub_visibility(!GLOB.hub_visibility)
|
||||
world.update_hub_visibility(!GLOB.hub_visibility)
|
||||
|
||||
log_admin("[key_name(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
|
||||
message_admins("[key_name_admin(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
|
||||
if (GLOB.hub_visibility && !world.reachable)
|
||||
log_admin("[key_name(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
|
||||
message_admins("[key_name_admin(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
|
||||
if (GLOB.hub_visibility && !world.reachable)
|
||||
message_admins("WARNING: The server will not show up on the hub because byond is detecting that a filewall is blocking incoming connections.")
|
||||
|
||||
SSblackbox.add_details("admin_toggle","Toggled Hub Visibility|[GLOB.hub_visibility]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.add_details("admin_toggle","Toggled Hub Visibility|[GLOB.hub_visibility]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/smite(mob/living/carbon/human/target as mob)
|
||||
set name = "Smite"
|
||||
@@ -1208,6 +1204,6 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
if(!message)
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(usr)] triggered a CentCom recall, with the admiral message of: [message]")
|
||||
log_game("[key_name(usr)] triggered a CentCom recall, with the message of: [message]")
|
||||
message_admins("[key_name_admin(usr)] triggered a CentCom recall, with the admiral message of: [message]")
|
||||
log_game("[key_name(usr)] triggered a CentCom recall, with the message of: [message]")
|
||||
SSshuttle.centcom_recall(SSshuttle.emergency.timer, message)
|
||||
|
||||
@@ -81,8 +81,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
be_special += ROLE_NINJA
|
||||
if(2048)
|
||||
be_special += ROLE_MONKEY
|
||||
if(4096)
|
||||
be_special += ROLE_GANG
|
||||
if(16384)
|
||||
be_special += ROLE_ABDUCTOR
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
var/cooldown = 0
|
||||
var/obj/item/device/flashlight/F = null
|
||||
var/can_flashlight = 0
|
||||
var/gang //Is this a gang outfit?
|
||||
var/scan_reagents = 0 //Can the wearer see reagents while it's equipped?
|
||||
|
||||
//Var modification - PLEASE be careful with this I know who you are and where you live
|
||||
|
||||
@@ -163,6 +163,3 @@
|
||||
icon = 'icons/obj/clothing/neck.dmi'
|
||||
icon_state = "bling"
|
||||
item_color = "bling"
|
||||
|
||||
/obj/item/clothing/neck/necklace/dope/gang_contraband_value()
|
||||
return 2
|
||||
|
||||
@@ -0,0 +1,265 @@
|
||||
GLOBAL_LIST_EMPTY(exp_to_update)
|
||||
GLOBAL_PROTECT(exp_to_update)
|
||||
|
||||
|
||||
// Procs
|
||||
/datum/job/proc/required_playtime_remaining(client/C)
|
||||
if(!C)
|
||||
return 0
|
||||
if(!config.use_exp_tracking)
|
||||
return 0
|
||||
if(!exp_requirements || !exp_type)
|
||||
return 0
|
||||
if(!job_is_xp_locked(src.title))
|
||||
return 0
|
||||
if(config.use_exp_restrictions_admin_bypass && check_rights(R_ADMIN, FALSE, C.mob))
|
||||
return 0
|
||||
var/isexempt = C.prefs.db_flags & DB_FLAG_EXEMPT
|
||||
if(isexempt)
|
||||
return 0
|
||||
var/my_exp = C.calc_exp_type(get_exp_req_type())
|
||||
var/job_requirement = get_exp_req_amount()
|
||||
if(my_exp >= job_requirement)
|
||||
return 0
|
||||
else
|
||||
return (job_requirement - my_exp)
|
||||
|
||||
/datum/job/proc/get_exp_req_amount()
|
||||
if(title in GLOB.command_positions)
|
||||
if(config.use_exp_restrictions_heads_hours)
|
||||
return config.use_exp_restrictions_heads_hours * 60
|
||||
return exp_requirements
|
||||
|
||||
/datum/job/proc/get_exp_req_type()
|
||||
if(title in GLOB.command_positions)
|
||||
if(config.use_exp_restrictions_heads_department && exp_type_department)
|
||||
return exp_type_department
|
||||
return exp_type
|
||||
|
||||
/proc/job_is_xp_locked(jobtitle)
|
||||
if(!config.use_exp_restrictions_heads && jobtitle in GLOB.command_positions)
|
||||
return FALSE
|
||||
if(!config.use_exp_restrictions_other && !(jobtitle in GLOB.command_positions))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/client/proc/calc_exp_type(exptype)
|
||||
var/list/explist = prefs.exp.Copy()
|
||||
var/amount = 0
|
||||
var/list/typelist = GLOB.exp_jobsmap[exptype]
|
||||
if(!typelist)
|
||||
return -1
|
||||
for(var/job in typelist["titles"])
|
||||
if(job in explist)
|
||||
amount += explist[job]
|
||||
return amount
|
||||
|
||||
/client/proc/get_exp_report()
|
||||
if(!config.use_exp_tracking)
|
||||
return "Tracking is disabled in the server configuration file."
|
||||
var/list/play_records = prefs.exp
|
||||
if(!play_records.len)
|
||||
set_exp_from_db()
|
||||
play_records = prefs.exp
|
||||
if(!play_records.len)
|
||||
return "[key] has no records."
|
||||
var/return_text = list()
|
||||
return_text += "<UL>"
|
||||
var/list/exp_data = list()
|
||||
for(var/category in SSjob.name_occupations)
|
||||
if(play_records[category])
|
||||
exp_data[category] = text2num(play_records[category])
|
||||
else
|
||||
exp_data[category] = 0
|
||||
for(var/category in GLOB.exp_specialmap)
|
||||
if(play_records[category])
|
||||
exp_data[category] = text2num(play_records[category])
|
||||
else
|
||||
exp_data[category] = 0
|
||||
if(prefs.db_flags & DB_FLAG_EXEMPT)
|
||||
return_text += "<LI>Exempt (all jobs auto-unlocked)</LI>"
|
||||
|
||||
for(var/dep in exp_data)
|
||||
if(exp_data[dep] > 0)
|
||||
if(exp_data[EXP_TYPE_LIVING] > 0)
|
||||
var/percentage = num2text(round(exp_data[dep]/exp_data[EXP_TYPE_LIVING]*100))
|
||||
return_text += "<LI>[dep] [get_exp_format(exp_data[dep])] ([percentage]%)</LI>"
|
||||
else
|
||||
return_text += "<LI>[dep] [get_exp_format(exp_data[dep])] </LI>"
|
||||
if(config.use_exp_restrictions_admin_bypass && check_rights(R_ADMIN, 0, mob))
|
||||
return_text += "<LI>Admin (all jobs auto-unlocked)</LI>"
|
||||
return_text += "</UL>"
|
||||
var/list/jobs_locked = list()
|
||||
var/list/jobs_unlocked = list()
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
if(job.exp_requirements && job.exp_type)
|
||||
if(!job_is_xp_locked(job.title))
|
||||
continue
|
||||
else if(!job.required_playtime_remaining(mob.client))
|
||||
jobs_unlocked += job.title
|
||||
else
|
||||
var/xp_req = job.get_exp_req_amount()
|
||||
jobs_locked += "[job.title] [get_exp_format(text2num(calc_exp_type(job.get_exp_req_type())))] / [get_exp_format(xp_req)] as [job.get_exp_req_type()])"
|
||||
if(jobs_unlocked.len)
|
||||
return_text += "<BR><BR>Jobs Unlocked:<UL><LI>"
|
||||
return_text += jobs_unlocked.Join("</LI><LI>")
|
||||
return_text += "</LI></UL>"
|
||||
if(jobs_locked.len)
|
||||
return_text += "<BR><BR>Jobs Not Unlocked:<UL><LI>"
|
||||
return_text += jobs_locked.Join("</LI><LI>")
|
||||
return_text += "</LI></UL>"
|
||||
return return_text
|
||||
|
||||
|
||||
/client/proc/get_exp_living()
|
||||
if(!prefs.exp)
|
||||
return "No data"
|
||||
var/exp_living = text2num(prefs.exp[EXP_TYPE_LIVING])
|
||||
return get_exp_format(exp_living)
|
||||
|
||||
/proc/get_exp_format(expnum)
|
||||
if(expnum > 60)
|
||||
return num2text(round(expnum / 60)) + "h"
|
||||
else if(expnum > 0)
|
||||
return num2text(expnum) + "m"
|
||||
else
|
||||
return "0h"
|
||||
|
||||
/datum/controller/subsystem/blackbox/proc/update_exp(mins, ann = FALSE)
|
||||
if(!SSdbcore.Connect())
|
||||
return -1
|
||||
for(var/client/L in GLOB.clients)
|
||||
if(L.is_afk())
|
||||
continue
|
||||
addtimer(CALLBACK(L,/client/proc/update_exp_list,mins,ann),10)
|
||||
|
||||
/datum/controller/subsystem/blackbox/proc/update_exp_db()
|
||||
SSdbcore.MassInsert(format_table_name("role_time"),GLOB.exp_to_update,TRUE)
|
||||
LAZYCLEARLIST(GLOB.exp_to_update)
|
||||
|
||||
//resets a client's exp to what was in the db.
|
||||
/client/proc/set_exp_from_db()
|
||||
if(!config.use_exp_tracking)
|
||||
return -1
|
||||
if(!SSdbcore.Connect())
|
||||
return -1
|
||||
var/datum/DBQuery/exp_read = SSdbcore.NewQuery("SELECT job, minutes FROM [format_table_name("role_time")] WHERE ckey = '[sanitizeSQL(ckey)]'")
|
||||
if(!exp_read.Execute())
|
||||
return -1
|
||||
var/list/play_records = list()
|
||||
while(exp_read.NextRow())
|
||||
play_records[exp_read.item[1]] = text2num(exp_read.item[2])
|
||||
|
||||
for(var/rtype in SSjob.name_occupations)
|
||||
if(!play_records[rtype])
|
||||
play_records[rtype] = 0
|
||||
for(var/rtype in GLOB.exp_specialmap)
|
||||
if(!play_records[rtype])
|
||||
play_records[rtype] = 0
|
||||
|
||||
prefs.exp = play_records
|
||||
|
||||
|
||||
//updates player db flags
|
||||
/client/proc/update_flag_db(newflag, state = FALSE)
|
||||
|
||||
if(!SSdbcore.Connect())
|
||||
return -1
|
||||
|
||||
if(!set_db_player_flags())
|
||||
return -1
|
||||
|
||||
if((prefs.db_flags & newflag) && !state)
|
||||
prefs.db_flags &= ~newflag
|
||||
else
|
||||
prefs.db_flags |= newflag
|
||||
|
||||
var/datum/DBQuery/flag_update = SSdbcore.NewQuery("UPDATE [format_table_name("player")] SET flags = '[prefs.db_flags]' WHERE ckey='[sanitizeSQL(ckey)]'")
|
||||
|
||||
if(!flag_update.Execute())
|
||||
return -1
|
||||
|
||||
|
||||
/client/proc/update_exp_list(minutes, announce_changes = FALSE)
|
||||
if(!config.use_exp_tracking)
|
||||
return -1
|
||||
if(!SSdbcore.Connect())
|
||||
return -1
|
||||
var/datum/DBQuery/exp_read = SSdbcore.NewQuery("SELECT job, minutes FROM [format_table_name("role_time")] WHERE ckey = '[sanitizeSQL(ckey)]'")
|
||||
if(!exp_read.Execute())
|
||||
return -1
|
||||
var/list/play_records = list()
|
||||
while(exp_read.NextRow())
|
||||
play_records[exp_read.item[1]] = text2num(exp_read.item[2])
|
||||
|
||||
for(var/rtype in SSjob.name_occupations)
|
||||
if(!play_records[rtype])
|
||||
play_records[rtype] = 0
|
||||
for(var/rtype in GLOB.exp_specialmap)
|
||||
if(!play_records[rtype])
|
||||
play_records[rtype] = 0
|
||||
var/list/old_records = play_records.Copy()
|
||||
if(isliving(mob))
|
||||
if(mob.stat != DEAD)
|
||||
var/rolefound = FALSE
|
||||
play_records[EXP_TYPE_LIVING] += minutes
|
||||
if(announce_changes)
|
||||
to_chat(src,"<span class='notice'>You got: [minutes] Living EXP!</span>")
|
||||
if(mob.mind.assigned_role)
|
||||
for(var/job in SSjob.name_occupations)
|
||||
if(mob.mind.assigned_role == job)
|
||||
rolefound = TRUE
|
||||
play_records[job] += minutes
|
||||
if(announce_changes)
|
||||
to_chat(src,"<span class='notice'>You got: [minutes] [job] EXP!</span>")
|
||||
if(!rolefound)
|
||||
for(var/role in GLOB.exp_specialmap[EXP_TYPE_SPECIAL])
|
||||
if(mob.mind.assigned_role == role)
|
||||
rolefound = TRUE
|
||||
play_records[role] += minutes
|
||||
if(announce_changes)
|
||||
to_chat(mob,"<span class='notice'>You got: [minutes] [role] EXP!</span>")
|
||||
if(mob.mind.special_role && !mob.mind.var_edited)
|
||||
var/trackedrole = mob.mind.special_role
|
||||
play_records[trackedrole] += minutes
|
||||
if(announce_changes)
|
||||
to_chat(src,"<span class='notice'>You got: [minutes] [trackedrole] EXP!</span>")
|
||||
if(!rolefound)
|
||||
play_records["Unknown"] += minutes
|
||||
else
|
||||
play_records[EXP_TYPE_GHOST] += minutes
|
||||
if(announce_changes)
|
||||
to_chat(src,"<span class='notice'>You got: [minutes] Ghost EXP!</span>")
|
||||
else if(isobserver(mob))
|
||||
play_records[EXP_TYPE_GHOST] += minutes
|
||||
if(announce_changes)
|
||||
to_chat(src,"<span class='notice'>You got: [minutes] Ghost EXP!</span>")
|
||||
else if(minutes) //Let "refresh" checks go through
|
||||
return
|
||||
prefs.exp = play_records
|
||||
|
||||
for(var/jtype in play_records)
|
||||
if(play_records[jtype] != old_records[jtype])
|
||||
LAZYINITLIST(GLOB.exp_to_update)
|
||||
GLOB.exp_to_update.Add(list(list(
|
||||
"job" = "'[sanitizeSQL(jtype)]'",
|
||||
"ckey" = "'[sanitizeSQL(ckey)]'",
|
||||
"minutes" = play_records[jtype])))
|
||||
addtimer(CALLBACK(SSblackbox,/datum/controller/subsystem/blackbox/proc/update_exp_db),20,TIMER_OVERRIDE|TIMER_UNIQUE)
|
||||
|
||||
|
||||
//ALWAYS call this at beginning to any proc touching player flags, or your database admin will probably be mad
|
||||
/client/proc/set_db_player_flags()
|
||||
if(!SSdbcore.Connect())
|
||||
return FALSE
|
||||
|
||||
var/datum/DBQuery/flags_read = SSdbcore.NewQuery("SELECT flags FROM [format_table_name("player")] WHERE ckey='[ckey]'")
|
||||
|
||||
if(!flags_read.Execute())
|
||||
return FALSE
|
||||
|
||||
if(flags_read.NextRow())
|
||||
prefs.db_flags = text2num(flags_read.item[1])
|
||||
else if(isnull(prefs.db_flags))
|
||||
prefs.db_flags = 0 //This PROBABLY won't happen, but better safe than sorry.
|
||||
return TRUE
|
||||
@@ -309,13 +309,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
..()
|
||||
if(statpanel("Status"))
|
||||
if(SSticker.HasRoundStarted())
|
||||
for(var/datum/gang/G in SSticker.mode.gangs)
|
||||
if(G.is_dominating)
|
||||
stat(null, "[G.name] Gang Takeover: [max(G.domination_time_remaining(), 0)]")
|
||||
if(istype(SSticker.mode, /datum/game_mode/blob))
|
||||
var/datum/game_mode/blob/B = SSticker.mode
|
||||
if(B.message_sent)
|
||||
stat(null, "Blobs to Blob Win: [GLOB.blobs_legit.len]/[B.blobwincount]")
|
||||
var/datum/game_mode/blob/B = SSticker.mode
|
||||
if(B.message_sent)
|
||||
stat(null, "Blobs to Blob Win: [GLOB.blobs_legit.len]/[B.blobwincount]")
|
||||
|
||||
/mob/dead/observer/verb/reenter_corpse()
|
||||
set category = "Ghost"
|
||||
|
||||
@@ -560,7 +560,7 @@
|
||||
|
||||
// climbing out of a gut
|
||||
if(attempt_vr(src,"vore_process_resist",args)) return TRUE
|
||||
|
||||
|
||||
//Breaking out of a container (Locker, sleeper, cryo...)
|
||||
else if(isobj(loc))
|
||||
var/obj/C = loc
|
||||
@@ -740,9 +740,6 @@
|
||||
|
||||
if(statpanel("Status"))
|
||||
if(SSticker && SSticker.mode)
|
||||
for(var/datum/gang/G in SSticker.mode.gangs)
|
||||
if(G.is_dominating)
|
||||
stat(null, "[G.name] Gang Takeover: [max(G.domination_time_remaining(), 0)]")
|
||||
if(istype(SSticker.mode, /datum/game_mode/blob))
|
||||
var/datum/game_mode/blob/B = SSticker.mode
|
||||
if(B.message_sent)
|
||||
|
||||
@@ -2,5 +2,4 @@
|
||||
if(mind && SSticker.mode)
|
||||
SSticker.mode.remove_cultist(mind, 0, 0)
|
||||
SSticker.mode.remove_revolutionary(mind, 0)
|
||||
SSticker.mode.remove_gangster(mind, remove_bosses=1)
|
||||
..()
|
||||
|
||||
@@ -5,4 +5,3 @@
|
||||
show_laws(0)
|
||||
if(mind)
|
||||
SSticker.mode.remove_revolutionary(mind)
|
||||
SSticker.mode.remove_gangster(mind,1,remove_bosses=1)
|
||||
|
||||
@@ -301,16 +301,6 @@
|
||||
var/datum/DBQuery/query_round_shuttle_name = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET shuttle_name = '[name]' WHERE id = [GLOB.round_id]")
|
||||
query_round_shuttle_name.Execute()
|
||||
|
||||
// Gangs only have one attempt left if the shuttle has
|
||||
// docked with the station to prevent suffering from
|
||||
// endless dominator delays
|
||||
for(var/datum/gang/G in SSticker.mode.gangs)
|
||||
if(G.is_dominating)
|
||||
G.dom_attempts = 0
|
||||
else
|
||||
G.dom_attempts = min(1,G.dom_attempts)
|
||||
|
||||
|
||||
if(SHUTTLE_DOCKED)
|
||||
if(time_left <= ENGINES_START_TIME)
|
||||
mode = SHUTTLE_IGNITING
|
||||
|
||||
@@ -218,10 +218,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
surplus = 40
|
||||
include_modes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/dangerous/smg/unrestricted
|
||||
item = /obj/item/gun/ballistic/automatic/c20r/unrestricted
|
||||
include_modes = list(/datum/game_mode/gang)
|
||||
|
||||
/datum/uplink_item/dangerous/machinegun
|
||||
name = "L6 Squad Automatic Weapon"
|
||||
desc = "A fully-loaded Aussec Armoury belt-fed machine gun. \
|
||||
@@ -265,7 +261,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
item = /obj/item/gun/energy/kinetic_accelerator/crossbow
|
||||
cost = 12
|
||||
surplus = 50
|
||||
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
|
||||
exclude_modes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/dangerous/flamethrower
|
||||
name = "Flamethrower"
|
||||
@@ -274,7 +270,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
item = /obj/item/flamethrower/full/tank
|
||||
cost = 4
|
||||
surplus = 40
|
||||
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
|
||||
include_modes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/dangerous/sword
|
||||
name = "Energy Sword"
|
||||
@@ -361,7 +357,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
item = /obj/item/reagent_containers/spray/chemsprayer/bioterror
|
||||
cost = 20
|
||||
surplus = 0
|
||||
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
|
||||
include_modes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/stealthy_weapons/virus_grenade
|
||||
name = "Fungal Tuberculosis Grenade"
|
||||
@@ -466,7 +462,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
These bullets pack a lot of punch that can knock most targets down, but do limited overall damage."
|
||||
item = /obj/item/ammo_box/magazine/smgm45
|
||||
cost = 3
|
||||
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
|
||||
include_modes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/ammo/smg/bag
|
||||
name = ".45 Ammo Duffel Bag"
|
||||
@@ -607,7 +603,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
item = /obj/item/sleeping_carp_scroll
|
||||
cost = 17
|
||||
surplus = 0
|
||||
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
|
||||
exclude_modes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/stealthy_weapons/cqc
|
||||
name = "CQC Manual"
|
||||
@@ -637,7 +633,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
item = /obj/item/gun/ballistic/automatic/toy/pistol/riot
|
||||
cost = 3
|
||||
surplus = 10
|
||||
exclude_modes = list(/datum/game_mode/gang)
|
||||
|
||||
/datum/uplink_item/stealthy_weapons/sleepy_pen
|
||||
name = "Sleepy Pen"
|
||||
@@ -647,7 +642,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
falls asleep, they will be able to move and act."
|
||||
item = /obj/item/pen/sleepy
|
||||
cost = 4
|
||||
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
|
||||
exclude_modes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/stealthy_weapons/soap
|
||||
name = "Syndicate Soap"
|
||||
@@ -670,7 +665,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
item = /obj/item/storage/box/syndie_kit/romerol
|
||||
cost = 25
|
||||
cant_discount = TRUE
|
||||
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
|
||||
exclude_modes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/stealthy_weapons/dart_pistol
|
||||
name = "Dart Pistol"
|
||||
@@ -778,7 +773,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
move the projector from their hand. Disguised users move slowly, and projectiles pass over them."
|
||||
item = /obj/item/device/chameleon
|
||||
cost = 7
|
||||
exclude_modes = list(/datum/game_mode/gang)
|
||||
|
||||
/datum/uplink_item/stealthy_tools/camera_bug
|
||||
name = "Camera Bug"
|
||||
@@ -812,7 +806,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
item = /obj/item/reagent_containers/syringe/mulligan
|
||||
cost = 4
|
||||
surplus = 30
|
||||
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
|
||||
exclude_modes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/stealthy_tools/emplight
|
||||
name = "EMP Flashlight"
|
||||
@@ -840,7 +834,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
//Space Suits and Hardsuits
|
||||
/datum/uplink_item/suits
|
||||
category = "Space Suits and Hardsuits"
|
||||
exclude_modes = list(/datum/game_mode/gang)
|
||||
surplus = 40
|
||||
|
||||
/datum/uplink_item/suits/space_suit
|
||||
@@ -891,7 +884,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
in electronic devices, subverts intended functions, and easily breaks security mechanisms."
|
||||
item = /obj/item/card/emag
|
||||
cost = 6
|
||||
exclude_modes = list(/datum/game_mode/gang)
|
||||
|
||||
/datum/uplink_item/device_tools/toolbox
|
||||
name = "Full Syndicate Toolbox"
|
||||
@@ -921,7 +913,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
and other supplies helpful for a field medic."
|
||||
item = /obj/item/storage/firstaid/tactical
|
||||
cost = 4
|
||||
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
|
||||
include_modes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/device_tools/syndietome
|
||||
name = "Syndicate Tome"
|
||||
@@ -1038,7 +1030,6 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
sends you a small beacon that will teleport the larger beacon to your location upon activation."
|
||||
item = /obj/item/device/sbeacondrop
|
||||
cost = 14
|
||||
exclude_modes = list(/datum/game_mode/gang)
|
||||
|
||||
/datum/uplink_item/device_tools/syndicate_bomb
|
||||
name = "Syndicate Bomb"
|
||||
@@ -1084,7 +1075,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
item = /obj/item/shield/energy
|
||||
cost = 16
|
||||
surplus = 20
|
||||
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
|
||||
include_modes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/device_tools/medgun
|
||||
name = "Medbeam Gun"
|
||||
@@ -1372,7 +1363,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
you will receive."
|
||||
item = /obj/item/storage/box/syndicate
|
||||
cost = 20
|
||||
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
|
||||
exclude_modes = list(/datum/game_mode/nuclear)
|
||||
cant_discount = TRUE
|
||||
|
||||
/datum/uplink_item/badass/surplus
|
||||
@@ -1382,7 +1373,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
item = /obj/structure/closet/crate
|
||||
cost = 20
|
||||
player_minimum = 25
|
||||
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/gang)
|
||||
exclude_modes = list(/datum/game_mode/nuclear)
|
||||
cant_discount = TRUE
|
||||
|
||||
/datum/uplink_item/badass/surplus/spawn_item(turf/loc, obj/item/device/uplink/U)
|
||||
|
||||
Reference in New Issue
Block a user