mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Merge remote-tracking branch 'refs/remotes/ParadiseSS13/master'
This commit is contained in:
@@ -33,7 +33,7 @@ client/proc/one_click_antag()
|
||||
var/datum/mind/themind = null
|
||||
|
||||
for(var/mob/living/silicon/ai/ai in player_list)
|
||||
if(ai.client && ai.client.prefs.be_special & BE_MALF)
|
||||
if(ai.client && (ROLE_MALF in ai.client.prefs.be_special))
|
||||
AIs += ai
|
||||
|
||||
if(AIs.len)
|
||||
@@ -57,8 +57,8 @@ client/proc/one_click_antag()
|
||||
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(player_old_enough_antag(applicant.client,BE_TRAITOR))
|
||||
if(ROLE_TRAITOR in applicant.client.prefs.be_special)
|
||||
if(player_old_enough_antag(applicant.client,ROLE_TRAITOR))
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
@@ -91,8 +91,8 @@ client/proc/one_click_antag()
|
||||
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(player_old_enough_antag(applicant.client,BE_CHANGELING))
|
||||
if(ROLE_CHANGELING in applicant.client.prefs.be_special)
|
||||
if(player_old_enough_antag(applicant.client,ROLE_CHANGELING))
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
@@ -123,8 +123,8 @@ client/proc/one_click_antag()
|
||||
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(player_old_enough_antag(applicant.client,BE_REV))
|
||||
if(ROLE_REV in applicant.client.prefs.be_special)
|
||||
if(player_old_enough_antag(applicant.client,ROLE_REV))
|
||||
if(applicant.stat == CONSCIOUS)
|
||||
if(applicant.mind)
|
||||
if(!applicant.mind.special_role)
|
||||
@@ -150,9 +150,9 @@ client/proc/one_click_antag()
|
||||
var/time_passed = world.time
|
||||
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(istype(G) && G.client && G.client.prefs.be_special & BE_WIZARD)
|
||||
if(istype(G) && G.client && (ROLE_WIZARD in G.client.prefs.be_special))
|
||||
if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
|
||||
if(player_old_enough_antag(G.client,BE_WIZARD))
|
||||
if(player_old_enough_antag(G.client,ROLE_WIZARD))
|
||||
spawn(0)
|
||||
switch(G.timed_alert("Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","No",300,"Yes","No"))//alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
@@ -192,8 +192,8 @@ client/proc/one_click_antag()
|
||||
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(player_old_enough_antag(applicant.client,BE_CULTIST))
|
||||
if(ROLE_CULTIST in applicant.client.prefs.be_special)
|
||||
if(player_old_enough_antag(applicant.client,ROLE_CULTIST))
|
||||
if(applicant.stat == CONSCIOUS)
|
||||
if(applicant.mind)
|
||||
if(!applicant.mind.special_role)
|
||||
@@ -224,9 +224,9 @@ client/proc/one_click_antag()
|
||||
var/time_passed = world.time
|
||||
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(istype(G) && G.client && G.client.prefs.be_special & BE_OPERATIVE)
|
||||
if(istype(G) && G.client && (ROLE_OPERATIVE in G.client.prefs.be_special))
|
||||
if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate"))
|
||||
if(player_old_enough_antag(G.client,BE_OPERATIVE))
|
||||
if(player_old_enough_antag(G.client,ROLE_OPERATIVE))
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a nuke team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
@@ -442,8 +442,8 @@ client/proc/one_click_antag()
|
||||
|
||||
//Generates a list of candidates from active ghosts.
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(istype(G) && G.client && G.client.prefs.be_special & BE_RAIDER)
|
||||
if(player_old_enough_antag(G.client,BE_RAIDER))
|
||||
if(istype(G) && G.client && (ROLE_RAIDER in G.client.prefs.be_special))
|
||||
if(player_old_enough_antag(G.client,ROLE_RAIDER))
|
||||
if(!jobban_isbanned(G, "raider") && !jobban_isbanned(G, "Syndicate"))
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a vox raiding party arriving on the station?","Please answer in 30 seconds!","Yes","No"))
|
||||
@@ -543,8 +543,8 @@ client/proc/one_click_antag()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
if(applicant.client.prefs.be_special & BE_VAMPIRE)
|
||||
if(player_old_enough_antag(applicant.client,BE_VAMPIRE))
|
||||
if(ROLE_VAMPIRE in applicant.client.prefs.be_special)
|
||||
if(player_old_enough_antag(applicant.client,ROLE_VAMPIRE))
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
if (!applicant.mind.special_role)
|
||||
|
||||
@@ -444,7 +444,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
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(jobban_isbanned(M, "alien") || jobban_isbanned(M, "Syndicate")) continue //we are jobbanned
|
||||
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
|
||||
|
||||
@@ -204,6 +204,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
save_preferences(C)
|
||||
save_character(C) //let's save this new random character so it doesn't keep generating new ones.
|
||||
|
||||
|
||||
// Hello I am a proc full of snowflake species checks how are you
|
||||
/datum/preferences/proc/ShowChoices(mob/user)
|
||||
if(!user || !user.client) return
|
||||
update_preview_icon()
|
||||
@@ -412,7 +414,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
dat += "</td><td width='300px' height='300px' valign='top'>"
|
||||
dat += "<h2>Special Role Settings</h2>"
|
||||
// dat += "<br><br>"
|
||||
// dat += "<br><br>"
|
||||
if(jobban_isbanned(user, "Syndicate"))
|
||||
dat += "<b>You are banned from special roles.</b>"
|
||||
src.be_special = list()
|
||||
@@ -434,7 +436,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<a href='?_src_=prefs;preference=reset_all'>Reset Setup</a>"
|
||||
dat += "</center></body></html>"
|
||||
|
||||
// user << browse(dat, "window=preferences;size=560x580")
|
||||
// user << browse(dat, "window=preferences;size=560x580")
|
||||
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 810)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
@@ -1132,6 +1134,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
ha_style = "None" // No Vulp ears on Unathi
|
||||
m_style = "None" // No Unathi markings on Tajara
|
||||
|
||||
body_accessory = null //no vulpatail on humans damnit
|
||||
if("speciesprefs")//oldvox code
|
||||
speciesprefs = !speciesprefs
|
||||
@@ -1673,6 +1676,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
character.g_markings = g_markings
|
||||
character.b_markings = b_markings
|
||||
character.m_style = m_style
|
||||
|
||||
if(body_accessory)
|
||||
character.body_accessory = body_accessory_by_name["[body_accessory]"]
|
||||
|
||||
@@ -1687,6 +1691,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
character.gender = MALE
|
||||
|
||||
/datum/preferences/proc/open_load_dialog(mob/user)
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT slot,real_name FROM [format_table_name("characters")] WHERE ckey='[user.ckey]' ORDER BY slot")
|
||||
|
||||
var/dat = "<body>"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
volume = text2num(query.item[10])
|
||||
|
||||
old_roles_to_new(C)
|
||||
|
||||
|
||||
//Sanitize
|
||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||
// lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||
@@ -118,6 +118,8 @@
|
||||
facial_style_name,
|
||||
marking_style_name,
|
||||
head_accessory_style_name,
|
||||
hair_style_name,
|
||||
facial_style_name,
|
||||
eyes_red,
|
||||
eyes_green,
|
||||
eyes_blue,
|
||||
@@ -150,7 +152,7 @@
|
||||
speciesprefs,
|
||||
socks,
|
||||
body_accessory
|
||||
FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' AND slot='[slot]'"})
|
||||
FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' AND slot='[slot]'"})
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during character slot loading. Error : \[[err]\]\n")
|
||||
@@ -429,7 +431,6 @@
|
||||
return
|
||||
return 1
|
||||
|
||||
|
||||
// If you see this proc lying around and don't know why it's there, expunge it, as this is for a short-term DB update, starting 27/12/2015
|
||||
// 0 on failed update, 1 on success
|
||||
/datum/preferences/proc/old_roles_to_new(var/client/C)
|
||||
@@ -536,4 +537,4 @@
|
||||
load_character(C)
|
||||
return 0
|
||||
load_character(C,pick(saves))
|
||||
return 1*/
|
||||
return 1*/
|
||||
@@ -264,6 +264,7 @@ BLIND // can't see anything
|
||||
var/flash_protect = 0
|
||||
var/tint = 0
|
||||
var/HUDType = null
|
||||
var/darkness_view = 0
|
||||
var/vision_flags = 0
|
||||
var/see_darkness = 1
|
||||
|
||||
|
||||
@@ -364,6 +364,27 @@
|
||||
user.update_inv_wear_suit()
|
||||
user.update_inv_w_uniform()
|
||||
|
||||
//Elite Syndie suit
|
||||
/obj/item/clothing/head/helmet/space/rig/syndi/elite
|
||||
name = "elite syndicate hardsuit helmet"
|
||||
desc = "An elite version of the syndicate helmet, with improved armour and fire shielding. It is in travel mode. Property of Gorlex Marauders."
|
||||
icon_state = "hardsuit0-syndielite"
|
||||
item_color = "syndielite"
|
||||
armor = list(melee = 80, bullet = 70, laser = 50, energy = 25, bomb = 55, bio = 100, rad = 70)
|
||||
heat_protection = HEAD
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
sprite_sheets = null
|
||||
|
||||
/obj/item/clothing/suit/space/rig/syndi/elite
|
||||
name = "elite syndicate hardsuit"
|
||||
desc = "An elite version of the syndicate hardsuit, with improved armour and fire shielding. It is in travel mode."
|
||||
icon_state = "hardsuit0-syndielite"
|
||||
item_color = "syndielite"
|
||||
armor = list(melee = 80, bullet = 70, laser = 50, energy = 25, bomb = 55, bio = 100, rad = 70)
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
sprite_sheets = null
|
||||
|
||||
//Wizard Rig
|
||||
/obj/item/clothing/head/helmet/space/rig/wizard
|
||||
name = "gem-encrusted hardsuit helmet"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(temp_vent.parent.other_atmosmch.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
|
||||
vents += temp_vent
|
||||
|
||||
var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET)
|
||||
var/list/candidates = get_candidates(ROLE_ALIEN,ALIEN_AFK_BRACKET)
|
||||
|
||||
while(spawncount > 0 && vents.len && candidates.len)
|
||||
var/obj/vent = pick_n_take(vents)
|
||||
@@ -33,4 +33,4 @@
|
||||
|
||||
spawncount--
|
||||
successSpawn = 1
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(temp_vent.parent.other_atmosmch.len > 50)
|
||||
vents += temp_vent
|
||||
|
||||
var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET)
|
||||
var/list/candidates = get_candidates(ROLE_BORER,ALIEN_AFK_BRACKET)
|
||||
while(spawncount > 0 && vents.len && candidates.len)
|
||||
var/obj/vent = pick_n_take(vents)
|
||||
var/client/C = pick_n_take(candidates)
|
||||
@@ -32,4 +32,4 @@
|
||||
|
||||
spawncount--
|
||||
successSpawn = 1
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/datum/event/spawn_slaughter/proc/get_slaughter(var/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_DEMON)
|
||||
if(!candidates.len)
|
||||
if(end_if_fail)
|
||||
return 0
|
||||
@@ -55,4 +55,3 @@
|
||||
return 0
|
||||
message_admins("Unfortunately, no candidates were available for becoming a Slaugter Demon. Shutting down.")
|
||||
kill()
|
||||
|
||||
@@ -2,80 +2,4 @@
|
||||
var/list/currently_querying // Used to avoid asking the same ghost repeatedly.
|
||||
|
||||
// The following procs are used to grab players for mobs produced by a seed (mostly for dionaea).
|
||||
/datum/seed/proc/handle_living_product(var/mob/living/host)
|
||||
/*
|
||||
if(!host || !istype(host)) return
|
||||
|
||||
spawn(0)
|
||||
request_player(host)
|
||||
if(istype(host,/mob/living/simple_animal))
|
||||
return
|
||||
spawn(75)
|
||||
if(!host.ckey && !host.client)
|
||||
host.death() // This seems redundant, but a lot of mobs don't
|
||||
host.stat = DEAD // handle death() properly. Better safe than etc.
|
||||
host.visible_message("<span class='danger'>[host] is malformed and unable to survive. It expires pitifully, leaving behind some seeds.</span>")
|
||||
|
||||
var/total_yield = rand(1,3)
|
||||
for(var/j = 0;j<=total_yield;j++)
|
||||
var/obj/item/seeds/S = new(get_turf(host))
|
||||
S.seed_type = name
|
||||
S.update_seed()
|
||||
|
||||
/datum/seed/proc/request_player(var/mob/living/host)
|
||||
if(!host) return
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(jobban_isbanned(O, "Dionaea"))
|
||||
continue
|
||||
if(O.client)
|
||||
if(O.client.prefs.be_special & BE_PLANT && !(O.client in currently_querying))
|
||||
currently_querying |= O.client
|
||||
question(O.client,host)
|
||||
|
||||
/datum/seed/proc/question(var/client/C,var/mob/living/host)
|
||||
spawn(0)
|
||||
|
||||
if(!C || !host || !(C.mob && istype(C.mob,/mob/dead))) return // We don't want to spam them repeatedly if they're already in a mob.
|
||||
|
||||
var/response = alert(C, "Someone is harvesting [display_name]. Would you like to play as one?", "Sentient plant harvest", "Yes", "No", "Never for this round.")
|
||||
|
||||
if(!C || !host || !(C.mob && istype(C.mob,/mob/dead))) return // ...or accidentally accept an invalid argument for transfer.
|
||||
|
||||
if(response == "Yes")
|
||||
transfer_personality(C,host)
|
||||
else if (response == "Never for this round")
|
||||
C.prefs.be_special ^= BE_PLANT
|
||||
|
||||
currently_querying -= C
|
||||
|
||||
/datum/seed/proc/transfer_personality(var/client/player,var/mob/living/host)
|
||||
|
||||
//Something is wrong, abort.
|
||||
if(!player || !host) return
|
||||
|
||||
//Host already has a controller, pike off slowpoke.
|
||||
if(host.client && host.ckey) return
|
||||
|
||||
//Transfer them over.
|
||||
host.ckey = player.ckey
|
||||
if(player.mob && player.mob.mind)
|
||||
player.mob.mind.transfer_to(host)
|
||||
|
||||
if(host.dna) host.dna.real_name = host.real_name
|
||||
|
||||
// Update mode specific HUD icons.
|
||||
callHook("harvest_podman", list(host))
|
||||
|
||||
host << "\green <B>You awaken slowly, stirring into sluggish motion as the air caresses you.</B>"
|
||||
|
||||
// This is a hack, replace with some kind of species blurb proc.
|
||||
if(istype(host,/mob/living/simple_animal/diona))
|
||||
host << "<B>You are [host], one of a race of drifting interstellar plantlike creatures that sometimes share their seeds with human traders.</B>"
|
||||
host << "<B>Too much darkness will send you into shock and starve you, but light will help you heal.</B>"
|
||||
|
||||
var/newname = input(host,"Enter a name, or leave blank for the default name.", "Name change","") as text
|
||||
newname = sanitize(newname)
|
||||
if (newname != "")
|
||||
host.real_name = newname
|
||||
host.name = host.real_name
|
||||
*/
|
||||
/datum/seed/proc/handle_living_product(var/mob/living/host)
|
||||
@@ -83,7 +83,7 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
|
||||
AttemptGrow()
|
||||
|
||||
/obj/item/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1)
|
||||
var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,1)
|
||||
var/list/candidates = get_candidates(ROLE_ALIEN,ALIEN_AFK_BRACKET,1)
|
||||
var/client/C = null
|
||||
|
||||
// To stop clientless larva, we will check that our host has a client
|
||||
|
||||
@@ -32,8 +32,9 @@
|
||||
/obj/item/device/mmi/posibrain/proc/request_player()
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(check_observer(O))
|
||||
O << "\blue <b>\A [src] has been activated. (<a href='?src=\ref[O];jump=\ref[src]'>Teleport</a> | <a href='?src=\ref[src];signup=\ref[O]'>Sign Up</a>)"
|
||||
//question(O.client)
|
||||
O << "<span class='boldnotice'>\A [src] has been activated. (<a href='?src=\ref[O];jump=\ref[src]'>Teleport</a> | <a href='?src=\ref[src];signup=\ref[O]'>Sign Up</a>)</span>"
|
||||
// if(ROLE_POSIBRAIN in O.client.prefs.be_special) The Guardian implementation looks cleaner
|
||||
// question(O.client)
|
||||
|
||||
/obj/item/device/mmi/posibrain/proc/check_observer(var/mob/dead/observer/O)
|
||||
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
|
||||
@@ -52,7 +53,7 @@
|
||||
if(response == "Yes")
|
||||
transfer_personality(C.mob)
|
||||
else if (response == "Never for this round")
|
||||
C.prefs.be_special ^= BE_PAI
|
||||
C.prefs.be_special -= ROLE_POSIBRAIN
|
||||
|
||||
// This should not ever happen, but let's be safe
|
||||
/obj/item/device/mmi/posibrain/dropbrain(var/turf/dropspot)
|
||||
|
||||
@@ -413,6 +413,7 @@
|
||||
if(H.client)
|
||||
H.client.screen += global_hud.darkMask
|
||||
|
||||
var/minimum_darkness_view = INFINITY
|
||||
if(H.glasses)
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses))
|
||||
var/obj/item/clothing/glasses/G = H.glasses
|
||||
@@ -420,6 +421,7 @@
|
||||
|
||||
if(G.darkness_view)
|
||||
H.see_in_dark = G.darkness_view
|
||||
minimum_darkness_view = G.darkness_view
|
||||
|
||||
if(!G.see_darkness)
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
@@ -437,6 +439,9 @@
|
||||
var/obj/item/clothing/head/hat = H.head
|
||||
H.sight |= hat.vision_flags
|
||||
|
||||
if(hat.darkness_view && hat.darkness_view < minimum_darkness_view) // Pick the lowest of the two darkness_views between the glasses and helmet.
|
||||
H.see_in_dark = hat.darkness_view
|
||||
|
||||
if(!hat.see_darkness)
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
|
||||
@@ -789,7 +789,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
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_SENTIENT, ALIEN_AFK_BRACKET)
|
||||
|
||||
shuffle(candidates)
|
||||
|
||||
|
||||
@@ -348,15 +348,15 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
|
||||
proc/requestRecruits(var/obj/item/device/paicard/P)
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(O.client && O.client.prefs.be_special & BE_PAI)
|
||||
if(player_old_enough_antag(O.client,BE_PAI))
|
||||
if(O.client && (ROLE_PAI in O.client.prefs.be_special))
|
||||
if(player_old_enough_antag(O.client,ROLE_PAI))
|
||||
if(check_recruit(O))
|
||||
O << "\blue <b>A pAI card is looking for personalities. (<a href='?src=\ref[O];jump=\ref[P]'>Teleport</a> | <a href='?src=\ref[src];signup=\ref[O]'>Sign Up</a>)</b>"
|
||||
//question(O.client)
|
||||
proc/check_recruit(var/mob/dead/observer/O)
|
||||
if(jobban_isbanned(O, "pAI") || jobban_isbanned(O,"nonhumandept"))
|
||||
return 0
|
||||
if(!player_old_enough_antag(O.client,BE_PAI))
|
||||
if(!player_old_enough_antag(O.client,ROLE_PAI))
|
||||
return 0
|
||||
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
|
||||
return 0
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
if(jobban_isbanned(O,"nonhumandept") || jobban_isbanned(O,"Drone"))
|
||||
continue
|
||||
if(O.client)
|
||||
if(O.client.prefs.be_special & BE_PAI)
|
||||
if(ROLE_PAI in O.client.prefs.be_special)
|
||||
question(O.client,O)
|
||||
|
||||
/mob/living/silicon/robot/drone/proc/question(var/client/C,var/mob/M)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
if (!message)
|
||||
return
|
||||
log_say("[key_name(src)] : [message]")
|
||||
if (stat == 2)
|
||||
if (stat == DEAD)
|
||||
return say_dead(message)
|
||||
var/mob/living/simple_animal/borer/B = src.loc
|
||||
src << "You whisper silently, \"[message]\""
|
||||
@@ -302,7 +302,7 @@
|
||||
detatch()
|
||||
leave_host()
|
||||
|
||||
mob/living/simple_animal/borer/proc/detatch()
|
||||
/mob/living/simple_animal/borer/proc/detatch()
|
||||
|
||||
if(!host) return
|
||||
|
||||
@@ -416,7 +416,7 @@ mob/living/simple_animal/borer/proc/detatch()
|
||||
src << "You cannot infest a target in your current state."
|
||||
return
|
||||
|
||||
if(M.stat == 2)
|
||||
if(M.stat == DEAD)
|
||||
src << "That is not an appropriate target."
|
||||
return
|
||||
|
||||
@@ -457,15 +457,15 @@ mob/living/simple_animal/borer/proc/detatch()
|
||||
return
|
||||
|
||||
//Procs for grabbing players.
|
||||
mob/living/simple_animal/borer/proc/request_player()
|
||||
/mob/living/simple_animal/borer/proc/request_player()
|
||||
for(var/mob/O in respawnable_list)
|
||||
if(jobban_isbanned(O, "Syndicate"))
|
||||
continue
|
||||
if(O.client)
|
||||
if(O.client.prefs.be_special & BE_ALIEN && !jobban_isbanned(O, "alien"))
|
||||
if((ROLE_BORER in O.client.prefs.be_special) && !jobban_isbanned(O, "alien"))
|
||||
question(O.client)
|
||||
|
||||
mob/living/simple_animal/borer/proc/question(var/client/C)
|
||||
/mob/living/simple_animal/borer/proc/question(var/client/C)
|
||||
spawn(0)
|
||||
if(!C) return
|
||||
var/response = alert(C, "A cortical borer needs a player. Are you interested?", "Cortical borer request", "Yes", "No", "Never for this round")
|
||||
@@ -474,9 +474,9 @@ mob/living/simple_animal/borer/proc/question(var/client/C)
|
||||
if(response == "Yes")
|
||||
transfer_personality(C)
|
||||
else if (response == "Never for this round")
|
||||
C.prefs.be_special ^= BE_ALIEN
|
||||
C.prefs.be_special -= ROLE_BORER
|
||||
|
||||
mob/living/simple_animal/borer/proc/transfer_personality(var/client/candidate)
|
||||
/mob/living/simple_animal/borer/proc/transfer_personality(var/client/candidate)
|
||||
|
||||
if(!candidate)
|
||||
return
|
||||
|
||||
@@ -641,7 +641,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]?",BE_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_GUARDIAN, null, FALSE, 100)
|
||||
var/mob/dead/observer/theghost = null
|
||||
|
||||
if(candidates.len)
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
|
||||
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!")
|
||||
|
||||
@@ -13,7 +13,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/reagent/nicotine/on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
var/smoke_message = pick("You can just feel your lungs dying!", "You feel relaxed.", "You feel calmed.", "You feel the lung cancer forming.", "You feel the money you wasted.", "You feel like a space cowboy.", "You feel rugged.")
|
||||
var/smoke_message = pick("You feel relaxed.", "You feel calmed.", "You feel less stressed.", "You feel more placid.", "You feel more undivided.")
|
||||
if(prob(5))
|
||||
M << "<span class='notice'>[smoke_message]</span>"
|
||||
if(prob(50))
|
||||
@@ -27,8 +27,6 @@
|
||||
return
|
||||
|
||||
/datum/reagent/nicotine/overdose_process(var/mob/living/M as mob)
|
||||
if(prob(20))
|
||||
M << "You feel like you smoked too much."
|
||||
M.adjustToxLoss(1*REM)
|
||||
M.adjustOxyLoss(1*REM)
|
||||
..()
|
||||
|
||||
@@ -45,7 +45,6 @@ datum/reagents/proc/metabolize(var/mob/M)
|
||||
if(M && R)
|
||||
if(R.volume >= R.overdose_threshold && !R.overdosed && R.overdose_threshold > 0)
|
||||
R.overdosed = 1
|
||||
M << "<span class = 'userdanger'>You feel like you took too much [R.name]!</span>"
|
||||
R.overdose_start(M)
|
||||
if(R.volume < R.overdose_threshold && R.overdosed)
|
||||
R.overdosed = 0
|
||||
|
||||
@@ -36,4 +36,11 @@
|
||||
desc = "Helps with burn injuries."
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("synthflesh", 20)
|
||||
reagents.add_reagent("synthflesh", 20)
|
||||
|
||||
/obj/item/weapon/reagent_containers/pill/patch/nicotine
|
||||
name = "nicotine patch"
|
||||
desc = "Helps temporarily curb the cravings of nicotine dependency."
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("nicotine", 20)
|
||||
@@ -144,13 +144,16 @@
|
||||
confused_start = 100
|
||||
|
||||
//copy paste from LSD... shoot me
|
||||
/datum/reagent/ethanol/absinthe/on_mob_life(var/mob/M)
|
||||
/datum/reagent/ethanol/absinthe/on_mob_life(var/mob/living/M)
|
||||
if(!M) M = holder.my_atom
|
||||
if(!data) data = 1
|
||||
data++
|
||||
M:hallucination += 5
|
||||
if(volume > overdose_threshold)
|
||||
M:adjustToxLoss(1)
|
||||
M.hallucination += 5
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/reagent/ethanol/absinthe/overdose_process(mob/living/M)
|
||||
M.adjustToxLoss(1)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -164,8 +167,11 @@
|
||||
/datum/reagent/ethanol/rum/on_mob_life(var/mob/living/M as mob)
|
||||
..()
|
||||
M.dizziness +=5
|
||||
if(volume > overdose_threshold)
|
||||
M:adjustToxLoss(1)
|
||||
return
|
||||
|
||||
/datum/reagent/ethanol/rum/overdose_process(mob/living/M)
|
||||
M.adjustToxLoss(1)
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/reagent/ethanol/mojito
|
||||
|
||||
@@ -309,12 +309,6 @@ var/obj/machinery/blackbox_recorder/blackbox
|
||||
var/DBQuery/query_insert = dbcon.NewQuery(sql)
|
||||
query_insert.Execute()
|
||||
|
||||
// Sanitize inputs to avoid SQL injection attacks
|
||||
proc/sql_sanitize_text(var/text)
|
||||
text = replacetext(text, "'", "''")
|
||||
text = replacetext(text, ";", "")
|
||||
text = replacetext(text, "&", "")
|
||||
return text
|
||||
|
||||
proc/feedback_set(var/variable,var/value)
|
||||
if(!blackbox) return
|
||||
|
||||
Reference in New Issue
Block a user