Merge branch 'master' of https://github.com/tgstation/-tg-station into action_action_action_action_action

Conflicts:
	icons/mob/actions.dmi
This commit is contained in:
Incoming
2015-11-10 17:03:05 -05:00
154 changed files with 3787 additions and 1376 deletions
+5
View File
@@ -170,11 +170,16 @@
if(BANTYPE_ANY_FULLBAN)
bantype_str = "ANY"
bantype_pass = 1
if(BANTYPE_ANY_JOB)
bantype_str = "ANYJOB"
bantype_pass = 1
if( !bantype_pass ) return
var/bantype_sql
if(bantype_str == "ANY")
bantype_sql = "(bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now() ) )"
else if(bantype_str == "ANYJOB")
bantype_sql = "(bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now() ) )"
else
bantype_sql = "bantype = '[bantype_str]'"
+9 -5
View File
@@ -47,6 +47,15 @@ var/global/floorIsLava = 0
body += "<A href='?_src_=holder;newban=\ref[M]'>Ban</A> | "
body += "<A href='?_src_=holder;jobban2=\ref[M]'>Jobban</A> | "
body += "<A href='?_src_=holder;appearanceban=\ref[M]'>Identity Ban</A> | "
if(jobban_isbanned(M, "OOC"))
body+= "<A href='?_src_=holder;jobban3=OOC;jobban4=\ref[M]'><font color=red>OOCBan</font></A> | "
else
body+= "<A href='?_src_=holder;jobban3=OOC;jobban4=\ref[M]'>OOCBan</A> | "
if(jobban_isbanned(M, "emote"))
body+= "<A href='?_src_=holder;jobban3=emote;jobban4=\ref[M]'><font color=red>EmoteBan</font></A> | "
else
body+= "<A href='?_src_=holder;jobban3=emote;jobban4=\ref[M]'>Emoteban</A> | "
body += "<A href='?_src_=holder;shownoteckey=[M.ckey]'>Notes</A> | "
if(M.client)
if(M.client.check_watchlist(M.client.ckey))
@@ -66,11 +75,6 @@ var/global/floorIsLava = 0
body += "<A href='?_src_=holder;mute=[M.ckey];mute_type=[MUTE_DEADCHAT]'><font color='[(muted & MUTE_DEADCHAT)?"red":"blue"]'>DEADCHAT</font></a>\]"
body += "(<A href='?_src_=holder;mute=[M.ckey];mute_type=[MUTE_ALL]'><font color='[(muted & MUTE_ALL)?"red":"blue"]'>toggle all</font></a>)"
if(jobban_isbanned(M, "OOC"))
body+= "<A href='?_src_=holder;jobban3=OOC;jobban4=\ref[M]'><font color=red>OOCBAN</font></A> | "
else
body+= "<A href='?_src_=holder;jobban3=OOC;jobban4=\ref[M]'>OOCBAN</A> | "
body += "<br><br>"
body += "<A href='?_src_=holder;jumpto=\ref[M]'><b>Jump to</b></A> | "
body += "<A href='?_src_=holder;getmob=\ref[M]'>Get</A> | "
+48
View File
@@ -440,6 +440,54 @@
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td></tr>"
dat += "</table>"
if(ticker.mode.red_deities.len || ticker.mode.red_deity_prophets || ticker.mode.blue_deity_prophets || ticker.mode.red_deity_followers || ticker.mode.blue_deity_followers)
dat += "<br><table cellspacing=5><tr><td><B>Red Deity</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.red_deities)
var/mob/M = N.current
if(M)
dat += "<tr><td>Red Deity: <a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(ghost)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "</table>"
if(ticker.mode.blue_deities.len)
dat += "<br><table cellspacing=5><tr><td><B>Blue Deity</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.blue_deities)
var/mob/M = N.current
if(M)
dat += "<tr><td>Blue Deity: <a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(ghost)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "</table>"
if(ticker.mode.red_deity_prophets.len)
dat += "<br><table cellspacing=5><tr><td><B>Red Deity Prophets</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.red_deity_prophets)
var/mob/M = N.current
if(M)
dat += "<tr><td>Red Deity Prophet: <a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(ghost)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "</table>"
if(ticker.mode.blue_deity_prophets.len)
dat += "<br><table cellspacing=5><tr><td><B>Blue Deity Prophets</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.blue_deity_prophets)
var/mob/M = N.current
if(M)
dat += "<tr><td>Blue Deity Prophet: <a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(ghost)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "</table>"
if(ticker.mode.red_deity_followers.len)
dat += "<br><table cellspacing=5><tr><td><B>Red Deity Followers</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.red_deity_followers)
var/mob/M = N.current
if(M)
dat += "<tr><td>Red Deity Followers: <a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(ghost)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "</table>"
if(ticker.mode.blue_deity_followers.len)
dat += "<br><table cellspacing=5><tr><td><B>Blue Deity Followers</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.blue_deity_followers)
var/mob/M = N.current
if(M)
dat += "<tr><td>Blue Deity Followers: <a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(ghost)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "</table>"
if(ticker.mode.traitors.len > 0)
dat += "<br><table cellspacing=5><tr><td><B>Traitors</B></td><td></td><td></td></tr>"
for(var/datum/mind/traitor in ticker.mode.traitors)
+1 -5
View File
@@ -950,10 +950,6 @@
//Unbanning joblist
//all jobs in joblist are banned already OR we didn't give a reason (implying they shouldn't be banned)
if(joblist.len) //at least 1 banned job exists in joblist so we have stuff to unban.
if(!config.ban_legacy_system)
usr << "Unfortunately, database based unbanning cannot be done through this panel"
DB_ban_panel(M.ckey)
return
var/msg
for(var/job in joblist)
var/reason = jobban_isbanned(M, job)
@@ -962,7 +958,7 @@
if("Yes")
ban_unban_log_save("[key_name(usr)] unjobbanned [key_name(M)] from [job]")
log_admin("[key_name(usr)] unbanned [key_name(M)] from [job]")
DB_ban_unban(M.ckey, BANTYPE_JOB_PERMA, job)
DB_ban_unban(M.ckey, BANTYPE_ANY_JOB, job)
feedback_inc("ban_job_unban",1)
feedback_add_details("ban_job_unban","- [job]")
jobban_unban(M, job)
+11 -11
View File
@@ -65,11 +65,11 @@
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in player_list)
if(applicant.client.prefs.be_special & BE_TRAITOR)
if(ROLE_TRAITOR in applicant.client.prefs.be_special)
if(!applicant.stat)
if(applicant.mind)
if (!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "traitor") && !jobban_isbanned(applicant, "Syndicate"))
if(!jobban_isbanned(applicant, ROLE_TRAITOR) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
@@ -101,11 +101,11 @@
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in player_list)
if(applicant.client.prefs.be_special & BE_CHANGELING)
if(ROLE_CHANGELING in applicant.client.prefs.be_special)
if(!applicant.stat)
if(applicant.mind)
if (!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "changeling") && !jobban_isbanned(applicant, "Syndicate"))
if(!jobban_isbanned(applicant, ROLE_CHANGELING) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
@@ -135,11 +135,11 @@
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in player_list)
if(applicant.client.prefs.be_special & BE_REV)
if(ROLE_REV in applicant.client.prefs.be_special)
if(applicant.stat == CONSCIOUS)
if(applicant.mind)
if(!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "revolutionary") && !jobban_isbanned(applicant, "Syndicate"))
if(!jobban_isbanned(applicant, ROLE_REV) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
@@ -206,11 +206,11 @@
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in player_list)
if(applicant.client.prefs.be_special & BE_CULTIST)
if(ROLE_CULTIST in applicant.client.prefs.be_special)
if(applicant.stat == CONSCIOUS)
if(applicant.mind)
if(!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "cultist") && !jobban_isbanned(applicant, "Syndicate"))
if(!jobban_isbanned(applicant, ROLE_CULTIST) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
@@ -381,11 +381,11 @@
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in player_list)
if(applicant.client.prefs.be_special & BE_GANG)
if(ROLE_GANG in applicant.client.prefs.be_special)
if(!applicant.stat)
if(applicant.mind)
if(!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "gangster") && !jobban_isbanned(applicant, "Syndicate"))
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
@@ -580,7 +580,7 @@
var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in player_list)
if(applicant.client.prefs.be_special & BE_SHADOWLING)
if(ROLE_SHADOWLING in applicant.client.prefs.be_special)
if(!applicant.stat)
if(applicant.mind)
if(!applicant.mind.special_role)
+1 -1
View File
@@ -198,7 +198,7 @@
var/list/candidates = list()
for(var/mob/M in player_list)
if(M.stat != DEAD) continue //we are not dead!
if(!M.client.prefs.be_special & BE_ALIEN) continue //we don't want to be an alium
if(!(ROLE_ALIEN in M.client.prefs.be_special)) continue //we don't want to be an alium
if(M.client.is_afk()) continue //we are afk
if(M.mind && M.mind.current && M.mind.current.stat != DEAD) continue //we have a live body we are tied to
candidates += M.ckey
-1
View File
@@ -344,7 +344,6 @@ var/next_external_rsc = 0
'icons/pda_icons/pda_blank.png',
'icons/pda_icons/pda_boom.png',
'icons/pda_icons/pda_bucket.png',
'icons/pda_icons/pda_chatroom.png',
'icons/pda_icons/pda_medbot.png',
'icons/pda_icons/pda_floorbot.png',
'icons/pda_icons/pda_cleanbot.png',
+26 -33
View File
@@ -2,24 +2,6 @@
var/list/preferences_datums = list()
var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm
//some autodetection here.
"traitor" = /datum/game_mode/traitor, //0
"operative" = /datum/game_mode/nuclear, //1
"changeling" = /datum/game_mode/changeling, //2
"wizard" = /datum/game_mode/wizard, //3
"malf AI" = /datum/game_mode/malfunction, //4
"revolutionary" = /datum/game_mode/revolution, //5
"alien", //6
"pAI/posibrain", //7
"cultist" = /datum/game_mode/cult, //8
"blob" = /datum/game_mode/blob, //9
"ninja", //10
"monkey" = /datum/game_mode/monkey, //11
"gangster" = /datum/game_mode/gang, //12
"shadowling" = /datum/game_mode/shadowling, //13
"abductor" = /datum/game_mode/abduction //14
)
/datum/preferences
@@ -36,7 +18,14 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
//game-preferences
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
var/ooccolor = null
var/be_special = 0 //Special role selection
//Antag preferences
var/list/be_special = list() //Special role selection
var/tmp/old_be_special = 0 //Bitflag version of be_special, used to update old savefiles and nothing more
//If it's 0, that's good, if it's anything but 0, the owner of this prefs file's antag choices were,
//autocorrected this round, not that you'd need to check that.
var/UI_style = "Midnight"
var/toggles = TOGGLES_DEFAULT
var/chat_toggles = TOGGLES_DEFAULT_CHAT
@@ -377,15 +366,16 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
dat += "</td><td width='300px' height='300px' valign='top'>"
dat += "<h2>Antagonist Settings</h2>"
dat += "<h2>Special Role Settings</h2>"
if(jobban_isbanned(user, "Syndicate"))
dat += "<font color=red><b>You are banned from antagonist roles.</b></font>"
src.be_special = 0
var/n = 0
src.be_special = list()
for (var/i in special_roles)
if(jobban_isbanned(user, i))
dat += "<b>Be [i]:</b> <a href='?_src_=prefs;jobbancheck=[i]'>BANNED</a><br>"
dat += "<b>Be [capitalize(i)]:</b> <a href='?_src_=prefs;jobbancheck=[i]'>BANNED</a><br>"
else
var/days_remaining = null
if(config.use_age_restriction_for_jobs && ispath(special_roles[i])) //If it's a game mode antag, check if the player meets the minimum age
@@ -394,10 +384,10 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
days_remaining = temp_mode.get_remaining_days(user.client)
if(days_remaining)
dat += "<b>Be [i]:</b> <font color=red> \[IN [days_remaining] DAYS]</font><br>"
dat += "<b>Be [capitalize(i)]:</b> <font color=red> \[IN [days_remaining] DAYS]</font><br>"
else
dat += "<b>Be [i]:</b> <a href='?_src_=prefs;preference=be_special;num=[n]'>[src.be_special&(1<<n) ? "Yes" : "No"]</a><br>"
n++
dat += "<b>Be [capitalize(i)]:</b> <a href='?_src_=prefs;preference=be_special;be_special_type=[i]'>[(i in be_special) ? "Yes" : "No"]</a><br>"
dat += "</td></tr></table>"
dat += "<hr><center>"
@@ -1005,11 +995,6 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
facial_hair_style = random_facial_hair_style(gender)
hair_style = random_hair_style(gender)
if("hear_adminhelps")
toggles ^= SOUND_ADMINHELP
if("announce_login")
toggles ^= ANNOUNCE_LOGIN
if("ui")
switch(UI_style)
if("Midnight")
@@ -1019,9 +1004,17 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
else
UI_style = "Midnight"
if("hear_adminhelps")
toggles ^= SOUND_ADMINHELP
if("announce_login")
toggles ^= ANNOUNCE_LOGIN
if("be_special")
var/num = text2num(href_list["num"])
be_special ^= (1<<num)
var/be_special_type = href_list["be_special_type"]
if(be_special_type in be_special)
be_special -= be_special_type
else
be_special += be_special_type
if("name")
be_random_name = !be_random_name
+71 -1
View File
@@ -30,6 +30,69 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
return savefile_version
return -1
/datum/preferences/proc/update_antagchoices(current_version)
if((!islist(be_special) || old_be_special ) && current_version < 12)
//Archived values of when antag pref defines were a bitfield+fitflags
var/B_traitor = 1
var/B_operative = 2
var/B_changeling = 4
var/B_wizard = 8
var/B_malf = 16
var/B_rev = 32
var/B_alien = 64
var/B_pai = 128
var/B_cultist = 256
var/B_blob = 512
var/B_ninja = 1024
var/B_monkey = 2048
var/B_gang = 4096
var/B_shadowling = 8192
var/B_abductor = 16384
var/B_revenant = 32768
var/list/archived = list(B_traitor,B_operative,B_changeling,B_wizard,B_malf,B_rev,B_alien,B_pai,B_cultist,B_blob,B_ninja,B_monkey,B_gang,B_shadowling,B_abductor,B_revenant)
be_special = list()
for(var/flag in archived)
if(old_be_special & flag)
//this is shitty, but this proc should only be run once per player and then never again for the rest of eternity,
switch(flag)
if(1) //why aren't these the variables above? Good question, it's because byond complains the expression isn't constant, when it is.
be_special += ROLE_TRAITOR
if(2)
be_special += ROLE_OPERATIVE
if(4)
be_special += ROLE_CHANGELING
if(8)
be_special += ROLE_WIZARD
if(16)
be_special += ROLE_MALF
if(32)
be_special += ROLE_REV
if(64)
be_special += ROLE_ALIEN
if(128)
be_special += ROLE_PAI
if(256)
be_special += ROLE_CULTIST
if(512)
be_special += ROLE_BLOB
if(1024)
be_special += ROLE_NINJA
if(2048)
be_special += ROLE_MONKEY
if(4096)
be_special += ROLE_GANG
if(8192)
be_special += ROLE_SHADOWLING
if(16384)
be_special += ROLE_ABDUCTOR
if(32768)
be_special += ROLE_REVENANT
/datum/preferences/proc/update_preferences(current_version)
if(current_version < 10)
toggles |= MEMBER_PUBLIC
@@ -103,6 +166,13 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["lastchangelog"] >> lastchangelog
S["UI_style"] >> UI_style
S["be_special"] >> be_special
if(islist(S["be_special"]))
S["be_special"] >> be_special
else //force update and store the old bitflag version of be_special
needs_update = 11
S["be_special"] >> old_be_special
S["default_slot"] >> default_slot
S["chat_toggles"] >> chat_toggles
S["toggles"] >> toggles
@@ -113,12 +183,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//try to fix any outdated data if necessary
if(needs_update >= 0)
update_preferences(needs_update) //needs_update = savefile_version if we need an update (positive integer)
update_antagchoices(needs_update)
//Sanitize
ooccolor = sanitize_ooccolor(sanitize_hexcolor(ooccolor, 6, 1, initial(ooccolor)))
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
UI_style = sanitize_inlist(UI_style, list("Midnight", "Plasmafire", "Retro"), initial(UI_style))
be_special = sanitize_integer(be_special, 0, 65535, initial(be_special))
default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot))
toggles = sanitize_integer(toggles, 0, 65535, initial(toggles))
ghost_form = sanitize_inlist(ghost_form, ghost_forms, initial(ghost_form))
+1 -2
View File
@@ -205,7 +205,6 @@
src.ambience_playing = 0
feedback_add_details("admin_verb", "SAmbi") //If you are copy-pasting this, I bet you read this comment expecting to see the same thing :^)
var/list/ghost_forms = list("ghost","ghostking","ghostian2","skeleghost","ghost_red","ghost_black", \
"ghost_blue","ghost_yellow","ghost_green","ghost_pink", \
"ghost_cyan","ghost_dblue","ghost_dred","ghost_dgreen", \
@@ -237,4 +236,4 @@ var/list/ghost_forms = list("ghost","ghostking","ghostian2","skeleghost","ghost_
set category = "Preferences"
set desc = "Allows you to access the Setup Character screen. Changes to your character won't take effect until next round, but other changes will."
prefs.current_tab = 1
prefs.ShowChoices(usr)
prefs.ShowChoices(usr)
+2 -2
View File
@@ -18,8 +18,8 @@
makeAbductorTeam()
/datum/round_event/abductor/proc/makeAbductorTeam()
var/list/mob/dead/observer/candidates = pollCandidates("Do you wish to be considered for an Abductor Team?", "abductor", null, BE_ABDUCTOR )
var/list/mob/dead/observer/candidates = pollCandidates("Do you wish to be considered for an Abductor Team?", "abductor", null, ROLE_ABDUCTOR )
if(candidates.len >= 2)
//Oh god why we can't have static functions
var/number = ticker.mode.abductor_teams + 1
+2 -2
View File
@@ -42,7 +42,7 @@
message_admins("An event attempted to spawn an alien but no suitable vents were found. Shutting down.")
return kill()
var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET, "alien candidate")
var/list/candidates = get_candidates(ROLE_ALIEN, ALIEN_AFK_BRACKET, "alien candidate")
if(!candidates.len)
if(end_if_fail)
return 0
@@ -68,4 +68,4 @@
message_admins("Situation has been resolved")
return 0
message_admins("Unfortunately, no candidates were available for becoming an alien. Shutting down.")
return kill()
return kill()
+3 -3
View File
@@ -10,7 +10,7 @@
/datum/round_event/operative/proc/get_operative(end_if_fail = 0)
key_of_operative = null
if(!key_of_operative)
var/list/candidates = get_candidates(BE_OPERATIVE, 3000, "operative")
var/list/candidates = get_candidates(ROLE_OPERATIVE, 3000, "operative")
if(!candidates.len)
if(end_if_fail)
return 0
@@ -29,7 +29,7 @@
spawn_locs += L.loc
if(!spawn_locs.len)
return kill()
var/mob/living/carbon/human/operative = new(pick(spawn_locs))
var/datum/preferences/A = new
A.copy_to(operative)
@@ -45,7 +45,7 @@
var/obj/machinery/nuclearbomb/selfdestruct/nuke = locate() in machines
if(nuke)
var/nuke_code
var/nuke_code
if(!nuke.r_code || nuke.r_code == "ADMIN")
nuke_code = "[rand(10000, 99999)]"
nuke.r_code = nuke_code
+1 -1
View File
@@ -10,7 +10,7 @@
for(var/datum/mind/M in ticker.mode.wizards)
if(!ishuman(M.current)) continue
var/mob/living/carbon/human/W = M.current
var/list/candidates = get_candidates(BE_WIZARD)
var/list/candidates = get_candidates(ROLE_WIZARD)
if(!candidates) return //Sad Trombone
var/client/C = pick(candidates)
@@ -16,7 +16,6 @@
var/max_n_of_items = 1500
var/icon_on = "smartfridge"
var/icon_off = "smartfridge-off"
var/list/item_quants = list()
/obj/machinery/smartfridge/New()
..()
@@ -26,7 +25,6 @@
RefreshParts()
/obj/machinery/smartfridge/construction()
item_quants.Cut()
for(var/datum/A in contents)
qdel(A)
@@ -134,13 +132,6 @@
S.remove_from_storage(O,src)
O.loc = src
var/n ="\ref[O]"
if(item_quants[n])
item_quants[n]++
else
item_quants[n] = 1
sortList(item_quants)
/obj/machinery/smartfridge/attack_paw(mob/user)
return src.attack_hand(user)
@@ -165,24 +156,32 @@
if (contents.len == 0)
dat += "<font color = 'red'>No product loaded!</font>"
else
for (var/O in item_quants)
if(item_quants[O] > 0)
var/N = item_quants[O]
var/obj/item/item = locate(O)
var/obj/item/itemName = sanitize(item.name)
dat += "<FONT color = 'blue'><B>[capitalize(itemName)]</B>:"
dat += " [N] </font>"
dat += "<a href='byond://?src=\ref[src];vend=[O];amount=1'>Vend</A> "
if(N > 5)
dat += "(<a href='byond://?src=\ref[src];vend=[O];amount=5'>x5</A>)"
if(N > 10)
dat += "(<a href='byond://?src=\ref[src];vend=[O];amount=10'>x10</A>)"
if(N > 25)
dat += "(<a href='byond://?src=\ref[src];vend=[O];amount=25'>x25</A>)"
if(N > 1)
dat += "(<a href='?src=\ref[src];vend=\ref[O];amount=[N]'>All</A>)"
var/listofitems = list()
for (var/atom/movable/O in contents)
if (listofitems[O.name])
listofitems[O.name]++
else
listofitems[O.name] = 1
sortList(listofitems)
dat += "<br>"
for (var/O in listofitems)
if(listofitems[O] <= 0)
continue
var/N = listofitems[O]
var/itemName = url_encode(O)
dat += "<FONT color = 'blue'><B>[capitalize(O)]</B>:"
dat += " [N] </font>"
dat += "<a href='byond://?src=\ref[src];vend=[itemName];amount=1'>Vend</A> "
if(N > 5)
dat += "(<a href='byond://?src=\ref[src];vend=[itemName];amount=5'>x5</A>)"
if(N > 10)
dat += "(<a href='byond://?src=\ref[src];vend=[itemName];amount=10'>x10</A>)"
if(N > 25)
dat += "(<a href='byond://?src=\ref[src];vend=[itemName];amount=25'>x25</A>)"
if(N > 1)
dat += "(<a href='?src=\ref[src];vend=[itemName];amount=[N]'>All</A>)"
dat += "<br>"
dat += "</TT>"
user << browse("<HEAD><TITLE>[src] supplies</TITLE></HEAD><TT>[dat]</TT>", "window=smartfridge")
@@ -195,24 +194,18 @@
usr.set_machine(src)
var/N = href_list["vend"]
usr << N
var/amount = text2num(href_list["amount"])
if(item_quants[N] <= 0) // Sanity check, there are probably ways to press the button when it shouldn't be possible.
return
item_quants[N] = max(item_quants[N] - amount, 0)
var/i = amount
for(var/obj/O in contents)
if(locate(N) == O)
if(i <= 0)
break
if(O.name == N)
O.loc = src.loc
i--
if(i <= 0)
break
src.updateUsrDialog()
return
updateUsrDialog()
// ----------------------------
+4 -4
View File
@@ -314,12 +314,12 @@
newalpha = 0
if(lighting_object.alpha != newalpha)
var/change_time = LIGHTING_TIME
if(instantly)
change_time = 0
animate(lighting_object, alpha = newalpha, time = change_time)
lighting_object.alpha = newalpha
else
animate(lighting_object, alpha = newalpha, time = LIGHTING_TIME)
if(newalpha >= LIGHTING_DARKEST_VISIBLE_ALPHA) //Doesn't actually make it darker or anything, just tells byond you can't see the tile
animate(luminosity = 0, time = 0)
luminosity = 0
lighting_changed = 0
@@ -385,6 +385,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(href_list["reenter"])
reenter_corpse()
//We don't want to update the current var
//But we will still carry a mind.
/mob/dead/observer/mind_initialize()
return
/mob/dead/observer/verb/toggle_ghosthud()
set name = "Toggle Ghost HUD"
set desc = "Toggles your ghost's on-screen HUD"
@@ -67,7 +67,7 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
/obj/item/organ/internal/body_egg/alien_embryo/proc/AttemptGrow(gib_on_success = 1)
if(!owner) return
var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET, "alien candidate")
var/list/candidates = get_candidates(ROLE_ALIEN, ALIEN_AFK_BRACKET, "alien candidate")
var/client/C = null
// To stop clientless larva, we will check that our host has a client
@@ -72,6 +72,13 @@
m_type = 2
if ("custom")
if(jobban_isbanned(src, "emote"))
src << "You cannot send custom emotes (banned)"
return
if(src.client)
if(client.prefs.muted & MUTE_IC)
src << "You cannot send IC messages (muted)."
return
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
if (!input)
return
@@ -337,7 +337,7 @@ datum/species/human/spec_death(gibbed, mob/living/carbon/human/H)
speedmod = 3
armor = 55
punchmod = 5
no_equip = list(slot_wear_mask, slot_wear_suit, slot_gloves, slot_shoes, slot_head, slot_w_uniform)
no_equip = list(slot_wear_mask, slot_wear_suit, slot_gloves, slot_shoes, slot_w_uniform)
nojumpsuit = 1
meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/golem
+3
View File
@@ -144,6 +144,9 @@
m_type = 1
if ("me")
if(jobban_isbanned(src, "emote"))
src << "You cannot send custom emotes (banned)"
return
if (src.client)
if(client.prefs.muted & MUTE_IC)
src << "You cannot send IC messages (muted)."
@@ -42,7 +42,6 @@
var/metabolism_efficiency = 1 //more or less efficiency to metabolize helpful/harmful reagents and regulate body temperature..
var/list/image/staticOverlays = list()
var/has_limbs = 0 //does the mob have distinct limbs?(arms,legs, chest,head)
var/list/datum/action/actions = list()
var/list/pipes_shown = list()
var/last_played_vent
+1
View File
@@ -5,4 +5,5 @@
ticker.mode.remove_gangster(mind, remove_bosses=1)
ticker.mode.remove_thrall(mind,0)
ticker.mode.remove_shadowling(mind)
ticker.mode.remove_hog_follower(mind,0)
..()
@@ -9,7 +9,6 @@
/mob/living/silicon/pai/var/list/available_software = list(
"crew manifest" = 5,
"digital messenger" = 5,
"chatroom client" = 5,
"medical records" = 15,
"security records" = 15,
//"camera jack" = 10,
@@ -67,8 +66,6 @@
left_part = src.softwareCamera()
if("signaller")
left_part = src.softwareSignal()
if("chatroom")
src.chatroom() //snowflake? maybe, but it's less effort this way
//usr << browse_rsc('windowbak.png') // This has been moved to the mob's Login() proc
@@ -287,8 +284,6 @@
for(var/s in src.software)
if(s == "digital messenger")
dat += "<a href='byond://?src=\ref[src];software=pdamessage;sub=0'>Digital Messenger</a> <br>"
if(s == "chatroom client")
dat += "<a href='byond://?src=\ref[src];software=chatroom;sub=0'>Chatroom Client</a> <br>"
if(s == "crew manifest")
dat += "<a href='byond://?src=\ref[src];software=manifest;sub=0'>Crew Manifest</a> <br>"
if(s == "medical records")
@@ -645,7 +640,3 @@
dat += "<br><br>"
dat += "Messages: <hr> [pda.tnote]"
return dat
/mob/living/silicon/pai/proc/chatroom()
pda.mode = 5
pda.attack_self(src)
@@ -79,6 +79,13 @@
m_type = 2
if ("custom")
if(jobban_isbanned(src, "emote"))
src << "You cannot send custom emotes (banned)"
return
if(src.client)
if(client.prefs.muted & MUTE_IC)
src << "You cannot send IC messages (muted)."
return
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
if (!input)
return
@@ -3,10 +3,12 @@
..()
regenerate_icons()
show_laws(0)
if(mind) ticker.mode.remove_revolutionary(mind)
if(mind) ticker.mode.remove_gangster(mind,1,remove_bosses=1)
if(mind) ticker.mode.remove_thrall(mind,0)
if(mind) ticker.mode.remove_shadowling(mind)
if(mind)
ticker.mode.remove_revolutionary(mind)
ticker.mode.remove_gangster(mind,1,remove_bosses=1)
ticker.mode.remove_thrall(mind,0)
ticker.mode.remove_shadowling(mind)
ticker.mode.remove_hog_follower(mind, 0)
/mob/living/silicon/robot/update_hotkey_mode()
winset(src, null, "mainwindow.macro=borghotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#F0F0F0")
@@ -33,7 +33,7 @@
/mob/living/simple_animal/hostile/retaliate/goat/Destroy()
qdel(udder)
udder = null
..()
return ..()
/mob/living/simple_animal/hostile/retaliate/goat/Life()
. = ..()
@@ -107,7 +107,7 @@
/mob/living/simple_animal/cow/Destroy()
qdel(udder)
udder = null
..()
return ..()
/mob/living/simple_animal/cow/attackby(obj/item/O, mob/user, params)
if(stat == CONSCIOUS && istype(O, /obj/item/weapon/reagent_containers/glass))
@@ -292,4 +292,4 @@ var/global/chicken_count = 0
/obj/udder/Destroy()
qdel(reagents)
..()
return ..()
@@ -554,7 +554,7 @@
return
used = TRUE
user << "[use_message]"
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the [mob_name] of [user.real_name]?", "pAI", null, FALSE, 100)
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the [mob_name] of [user.real_name]?", ROLE_PAI, null, FALSE, 100)
var/mob/dead/observer/theghost = null
if(candidates.len)
@@ -193,7 +193,7 @@
/datum/round_event/morph/proc/get_morph(end_if_fail = 0)
key_of_morph = null
if(!key_of_morph)
var/list/candidates = get_candidates(BE_ALIEN)
var/list/candidates = get_candidates(ROLE_ALIEN)
if(!candidates.len)
if(end_if_fail)
return 0
@@ -14,7 +14,6 @@
invisibility = INVISIBILITY_REVENANT
health = INFINITY //Revenants don't use health, they use essence instead
maxHealth = INFINITY
alpha = 160
layer = 5
healable = 0
see_invisible = SEE_INVISIBLE_MINIMUM
@@ -61,7 +60,6 @@
unreveal_time = 0
revealed = 0
invisibility = INVISIBILITY_REVENANT
alpha = 160
src << "<span class='revenboldnotice'>You are once more concealed.</span>"
if(unstun_time && world.time >= unstun_time)
unstun_time = 0
@@ -69,6 +67,7 @@
src << "<span class='revenboldnotice'>You can move again!</span>"
if(essence_regenerating && !inhibited && essence < essence_regen_cap) //While inhibited, essence will not regenerate
essence = min(essence_regen_cap, essence+essence_regen_amount)
update_spooky_icon()
..()
@@ -79,12 +78,13 @@
return
revealed = 1
invisibility = 0
alpha = 255
if(!unreveal_time)
src << "<span class='revendanger'>You have been revealed!</span>"
unreveal_time = world.time + time
else
src << "<span class='revenwarning'>You have been revealed!</span>"
unreveal_time = world.time + time
unreveal_time = unreveal_time + time
update_spooky_icon()
/mob/living/simple_animal/revenant/proc/stun(time)
if(!src)
@@ -94,9 +94,23 @@
notransform = 1
if(!unstun_time)
src << "<span class='revendanger'>You cannot move!</span>"
unstun_time = world.time + time
else
src << "<span class='revenwarning'>You cannot move!</span>"
unstun_time = world.time + time
unstun_time = unstun_time + time
update_spooky_icon()
/mob/living/simple_animal/revenant/proc/update_spooky_icon()
if(unreveal_time)
if(draining)
icon_state = "revenant_draining"
return
if(unstun_time)
icon_state = "revenant_stun"
return
icon_state = "revenant_revealed"
return
icon_state = "revenant_idle"
/mob/living/simple_animal/revenant/ex_act(severity, target)
return 1 //Immune to the effects of explosions.
@@ -185,12 +199,15 @@
drained_mobs.Add(target)
target.death(0)
else
src << "<span class='revenwarning'>[target] has been drawn out of your grasp. The link has been broken.</span>"
target.visible_message("<span class='warning'>[target] slumps onto the ground.</span>", \
"<span class='revenwarning'>Violets lights, dancing in your vision, receding--</span>")
icon_state = "revenant_idle"
src << "<span class='revenwarning'>[target ? "[target] has":"They have"] been drawn out of your grasp. The link has been broken.</span>"
draining = 0
essence_drained = 0
if(target) //Wait, target is WHERE NOW?
target.visible_message("<span class='warning'>[target] slumps onto the ground.</span>", \
"<span class='revenwarning'>Violets lights, dancing in your vision, receding--</span>")
return
else
src << "<span class='revenwarning'>You are not close enough to siphon [target]'s soul. The link has been broken.</span>"
src << "<span class='revenwarning'>You are not close enough to siphon [target ? "[target]'s":"their"] soul. The link has been broken.</span>"
draining = 0
essence_drained = 0
return
@@ -402,7 +419,7 @@
key_of_revenant = client_to_revive.key
if(!key_of_revenant)
message_admins("The new revenant's old client either could not be found or is in a new, living mob - grabbing a random candidate instead...")
var/list/candidates = get_candidates(BE_REVENANT)
var/list/candidates = get_candidates(ROLE_REVENANT)
if(!candidates.len)
qdel(R)
message_admins("No candidates were found for the new revenant. Oh well!")
@@ -77,7 +77,7 @@
desc = "Directs a large amount of essence into nearby electrical lights, causing lights to shock those nearby."
charge_max = 200
range = 5
stun = 35
stun = 30
cast_amount = 45
var/shock_range = 2
var/shock_damage = 18
@@ -116,7 +116,6 @@
desc = "Twists and corrupts the nearby area as well as dispelling holy auras on floors."
charge_max = 150
range = 3
stun = 25
unlock_amount = 75
cast_amount = 40
action_icon_state = "defile"
@@ -21,7 +21,7 @@
return
key_of_revenant = null
if(!key_of_revenant)
var/list/candidates = get_candidates(BE_REVENANT)
var/list/candidates = get_candidates(ROLE_REVENANT)
if(!candidates.len)
if(end_if_fail)
return 0
@@ -15,7 +15,7 @@
/datum/round_event/slaughter/proc/get_slaughter(end_if_fail = 0)
key_of_slaughter = null
if(!key_of_slaughter)
var/list/candidates = get_candidates(BE_ALIEN)
var/list/candidates = get_candidates(ROLE_ALIEN)
if(!candidates.len)
if(end_if_fail)
return 0
+2
View File
@@ -57,6 +57,8 @@
add_click_catcher()
sync_mind()
// Calling update_interface() in /mob/Login() causes the Cyborg to immediately be ghosted; because of winget().
// Calling it in the overriden Login, such as /mob/living/Login() doesn't cause this.
/mob/proc/update_interface()
+1
View File
@@ -6,6 +6,7 @@
hud_possible = list(ANTAG_HUD)
pressure_resistance = 8
var/datum/mind/mind
var/list/datum/action/actions = list()
var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak
+17
View File
@@ -433,6 +433,23 @@
gib(src)
/mob/proc/become_god(var/side_colour)
var/mob/camera/god/G = new /mob/camera/god(loc)
G.side = side_colour
G.invisibility = 40
if(mind)
mind.transfer_to(G)
else
G.key = key
G.job = "Deity"
G.rename_self("deity", 0)
G.update_icons()
. = G
qdel(src)
/mob/living/carbon/human/proc/corgize()
if (notransform)
+1 -1
View File
@@ -54,7 +54,7 @@ Contents:
//selecting a candidate player
if(!key)
var/list/candidates = get_candidates(BE_NINJA)
var/list/candidates = get_candidates(ROLE_NINJA)
if(!candidates.len)
return kill()
var/client/C = pick(candidates)
+1
View File
@@ -66,6 +66,7 @@
*/
/obj/item/weapon/pen/sleepy
origin_tech = "materials=2;syndicate=5"
flags = OPENCONTAINER
/obj/item/weapon/pen/sleepy/attack(mob/living/M, mob/user)
+1 -1
View File
@@ -42,7 +42,7 @@
if(!(src in view()))
user << "Your soul is too far away."
return
makeNewConstruct(/mob/living/simple_animal/construct/harvester, user, null, 1)
makeNewConstruct(/mob/living/simple_animal/construct/harvester, user, null, 0)
PoolOrNew(/obj/effect/particle_effect/smoke/sleeping, user.loc)
@@ -188,8 +188,9 @@
if(data >= 75 && prob(33)) // 30 units, 135 seconds
if (!M.confused) M.confused = 1
M.confused += 3
if(iscultist(M))
if(iscultist(M) || (is_handofgod_cultist(M) && !is_handofgod_prophet(M)))
ticker.mode.remove_cultist(M.mind)
ticker.mode.remove_hog_follower(M.mind)
holder.remove_reagent(src.id, src.volume) // maybe this is a little too perfect and a max() cap on the statuses would be better??
M.jitteriness = 0
M.stuttering = 0
-21
View File
@@ -1,18 +1,5 @@
var/global/list/obj/machinery/message_server/message_servers = list()
/datum/data_chat_msg
var/sender = "Anon"
var/channel = "ss13"
var/message = "Blank"
/datum/data_chat_msg/New(var/param_sen = "", var/param_chan = "", var/param_msg = "")
if(param_sen)
sender = param_sen
if(param_chan)
channel = param_chan
if(param_msg)
message = param_msg
/datum/data_pda_msg
var/recipient = "Unspecified" //name of the person
var/sender = "Unspecified" //name of the sender
@@ -81,7 +68,6 @@ var/global/list/obj/machinery/message_server/message_servers = list()
idle_power_usage = 10
active_power_usage = 100
var/list/datum/data_chat_msg/chat_msgs = list()
var/list/datum/data_pda_msg/pda_msgs = list()
var/list/datum/data_rc_msg/rc_msgs = list()
var/active = 1
@@ -115,9 +101,6 @@ var/global/list/obj/machinery/message_server/message_servers = list()
update_icon()
return
/obj/machinery/message_server/proc/send_chat_message(sender = "", channel = "", message = "")
chat_msgs += new/datum/data_chat_msg(sender,channel,message)
/obj/machinery/message_server/proc/send_pda_message(recipient = "",sender = "",message = "",photo=null)
. = new/datum/data_pda_msg(recipient,sender,message,photo)
pda_msgs += .
@@ -272,13 +255,10 @@ var/obj/machinery/blackbox_recorder/blackbox
/obj/machinery/blackbox_recorder/proc/round_end_data_gathering()
var/chat_msg_amt = 0
var/pda_msg_amt = 0
var/rc_msg_amt = 0
for (var/obj/machinery/message_server/MS in message_servers)
if (MS.chat_msgs.len > chat_msg_amt)
chat_msg_amt = MS.chat_msgs.len
if (MS.pda_msgs.len > pda_msg_amt)
pda_msg_amt = MS.pda_msgs.len
if (MS.rc_msgs.len > rc_msg_amt)
@@ -297,7 +277,6 @@ var/obj/machinery/blackbox_recorder/blackbox
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","CHA-[chat_msg_amt]")
feedback_add_details("radio_usage","PDA-[pda_msg_amt]")
feedback_add_details("radio_usage","RC-[rc_msg_amt]")
@@ -176,7 +176,7 @@
user << "<span class='notice'>You offer the sentience potion to [M]...</span>"
being_used = 1
var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET)
var/list/candidates = get_candidates(ROLE_ALIEN, ALIEN_AFK_BRACKET)
shuffle(candidates)