mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-27 02:23:47 +00:00
Merge branch 'master' of github.com:Tastyfish/Baystation12
This commit is contained in:
@@ -312,7 +312,7 @@ var/datum/cameranet/cameranet = new()
|
||||
|
||||
/proc/checkcameravis(atom/A)
|
||||
for(var/obj/machinery/camera/C in view(A,7))
|
||||
if(!C.status)
|
||||
if(!C.status || C.stat == 2)
|
||||
continue
|
||||
return 1
|
||||
return 0
|
||||
@@ -146,9 +146,6 @@
|
||||
src.inventory_head = item_to_add
|
||||
update_clothing()
|
||||
|
||||
if(inventory_head && inventory_head.type == /obj/item/clothing/head/caphat)
|
||||
name = "Captain "+real_name
|
||||
|
||||
if("back")
|
||||
if(inventory_back)
|
||||
usr << "\red The [inventory_back] is already in this slot."
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
/proc/is_convertable_to_cult(datum/mind/mind)
|
||||
if(!istype(mind)) return 0
|
||||
if(istype(mind.current, /mob/living/carbon/human) && (mind.assigned_role in list("Captain", "Head of Security", "Security Officer", "Detective", "Chaplain", "Warden"))) return 0
|
||||
for(var/obj/item/weapon/implant/loyalty/L in mind.current)
|
||||
if(L && L.implanted)
|
||||
return 0
|
||||
@@ -19,7 +18,7 @@
|
||||
/datum/game_mode/cult
|
||||
name = "cult"
|
||||
config_tag = "cult"
|
||||
restricted_jobs = list("Chaplain", "Security Officer", "Warden", "Detective", "AI", "Cyborg", "Captain", "Head of Security")
|
||||
restricted_jobs = list("AI", "Cyborg")
|
||||
required_players = 3
|
||||
required_enemies = 3
|
||||
|
||||
@@ -71,12 +70,11 @@
|
||||
/datum/game_mode/cult/post_setup()
|
||||
modePlayer += cult
|
||||
if("sacrifice" in objectives)
|
||||
var/list/possible_targets = get_unconvertables()
|
||||
var/list/possible_targets = list()
|
||||
|
||||
if(!possible_targets.len)
|
||||
for(var/mob/living/carbon/human/player in world)
|
||||
if(player.mind && !(player.mind in cult))
|
||||
possible_targets += player.mind
|
||||
for(var/mob/living/carbon/human/player in world)
|
||||
if(player.mind && !(player.mind in cult))
|
||||
possible_targets += player.mind
|
||||
|
||||
if(possible_targets.len > 0)
|
||||
sacrifice_target = pick(possible_targets)
|
||||
@@ -247,14 +245,6 @@
|
||||
del(I)
|
||||
|
||||
|
||||
/datum/game_mode/cult/proc/get_unconvertables()
|
||||
var/list/ucs = list()
|
||||
for(var/mob/living/carbon/human/player in world)
|
||||
if(!is_convertable_to_cult(player.mind))
|
||||
ucs += player.mind
|
||||
return ucs
|
||||
|
||||
|
||||
/datum/game_mode/cult/proc/check_cult_victory()
|
||||
var/cult_fail = 0
|
||||
if(objectives.Find("survive"))
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
return ..()
|
||||
if (world.time <= usr:lastDblClick+2)
|
||||
return ..()
|
||||
if(istype(usr, /mob/living/silicon/ai) && usr.client.eye == usr:eyeobj)
|
||||
return ..()
|
||||
|
||||
//try to find the closest working camera in the same area, switch to it
|
||||
var/area/A = get_area(src)
|
||||
@@ -93,6 +95,12 @@
|
||||
usr.machine = usr
|
||||
|
||||
spawn (0)
|
||||
if(client.eye == eyeobj)
|
||||
if(checkcameravis(target))
|
||||
eyeobj.loc = target.loc
|
||||
else
|
||||
usr << "Target is not on or near any active cameras on the station."
|
||||
return
|
||||
while (usr:cameraFollow == target)
|
||||
if (usr:cameraFollow == null)
|
||||
return
|
||||
|
||||
@@ -62,7 +62,7 @@ CLIPBOARDS
|
||||
var/n_name = input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text
|
||||
n_name = copytext(n_name, 1, 32)
|
||||
if ((src.loc == usr && usr.stat == 0))
|
||||
src.name = text("paper[]", (n_name ? text("- '[n_name]'") : null))
|
||||
src.name = n_name && n_name != "" ? n_name : "Untitled paper"
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
if (src.client.holder.rank == "Admin Observer")
|
||||
C << "<span class=\"gfartooc\"><span class=\"prefix\">OOC:</span> <span class=\"name\">[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</span> <span class=\"message\">[msg]</span></span>"
|
||||
else
|
||||
C << "<span class=\"adminooc\" color=[src.client.ooccolor]><span class=\"prefix\">OOC:</span> <span class=\"name\">[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</span> <span class=\"message\">[msg]</span></span>"
|
||||
C << "<font color=[src.client.ooccolor]><b><span class=\"prefix\">OOC:</span> <span class=\"name\">[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</span> <span class=\"message\">[msg]</span></b></font>"
|
||||
|
||||
else if (C.listen_ooc)
|
||||
C << "<span class=\"ooc\"><span class=\"prefix\">OOC:</span> <span class=\"name\">[src.client.stealth ? src.client.fakekey : src.key]:</span> <span class=\"message\">[msg]</span></span>"
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
src.stat = 2
|
||||
src.dizziness = 0
|
||||
src.jitteriness = 0
|
||||
src.sleeping = 0
|
||||
src.sleeping_willingly = 0
|
||||
|
||||
tension_master.death(src)
|
||||
|
||||
|
||||
@@ -74,7 +74,14 @@
|
||||
if(!(message))
|
||||
return
|
||||
else
|
||||
message = "<B>[src]</B> [message]"
|
||||
if(cmptext(copytext(message, 1, 3), "v "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 1
|
||||
else if(cmptext(copytext(message, 1, 3), "h "))
|
||||
message = "<B>[src]</B> [copytext(message, 3)]"
|
||||
m_type = 2
|
||||
else
|
||||
message = "<B>[src]</B> [message]"
|
||||
|
||||
if ("salute")
|
||||
if (!src.buckled)
|
||||
|
||||
@@ -80,10 +80,10 @@
|
||||
|
||||
//if(icon_state == initial(icon_state))
|
||||
var/icontype = ""
|
||||
var/list/icons = list("Blue", "HAL9000", "Monochrome", "Rainbow", "HAL9000 Mark2", "Inverted", "Firewall", "Green", "Text", "Smiley", "Angry", "Dorf", "Matrix")
|
||||
if (src.name == "B.A.N.N.E.D." && src.ckey == "Spaceman96")
|
||||
icontype = input("Please, select a display!", "AI", null/*, null*/) in list("B.A.N.N.E.D.", "Blue", "HAL9000", "Monochrome", "Rainbow", "HAL9000 Mark2", "Inverted", "Firewall", "Green", "Text", "Smiley", "Angry", "Dorf", "Matrix")
|
||||
else
|
||||
icontype = input("Please, select a display!", "AI", null/*, null*/) in list("Blue", "HAL9000", "Monochrome", "Rainbow", "HAL9000 Mark2", "Inverted", "Firewall", "Green", "Text", "Smiley", "Angry", "Dorf", "Matrix")
|
||||
icons += "B.A.N.N.E.D."
|
||||
icontype = input("Please, select a display!", "AI", null/*, null*/) in icons
|
||||
if(icontype == "Blue")
|
||||
icon_state = "ai"
|
||||
else if(icontype == "HAL9000")
|
||||
@@ -346,9 +346,12 @@
|
||||
|
||||
// ok, we're alive, camera is good and in our network...
|
||||
|
||||
machine = src
|
||||
src:current = C
|
||||
reset_view(C)
|
||||
if(client.eye == eyeobj)
|
||||
eyeobj.loc = C.loc
|
||||
else
|
||||
machine = src
|
||||
src:current = C
|
||||
reset_view(C)
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/ai/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
|
||||
|
||||
@@ -114,7 +114,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
M << browse(dat, "window=paiRecruit")
|
||||
|
||||
proc/findPAI(var/obj/item/device/paicard/p, var/mob/user)
|
||||
requestRecruits()
|
||||
requestRecruits(user)
|
||||
var/list/available = list()
|
||||
for(var/datum/paiCandidate/c in paiController.pai_candidates)
|
||||
if(c.ready)
|
||||
@@ -159,7 +159,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
|
||||
user << browse(dat, "window=findPai")
|
||||
|
||||
proc/requestRecruits()
|
||||
proc/requestRecruits(var/mob/origin)
|
||||
for(var/mob/dead/observer/O in world)
|
||||
if(jobban_isbanned(O, "pAI"))
|
||||
continue
|
||||
@@ -176,10 +176,10 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
if(!hasSubmitted && O.client.be_pai)
|
||||
spawn question(O.client)
|
||||
|
||||
proc/question(var/client/C)
|
||||
proc/question(var/client/C, var/mob/origin)
|
||||
asked.Add(C.key)
|
||||
asked[C.key] = world.time
|
||||
var/response = alert(C, "Someone is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round")
|
||||
var/response = alert(C, "[origin] is requesting a pAI personality. Would you like to play as a personal AI?", "pAI Request", "Yes", "No", "Never for this round")
|
||||
if(response == "Yes")
|
||||
recruitWindow(C.mob)
|
||||
else if (response == "Never for this round")
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
message = "<B>[src]</B> glares at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> glares."
|
||||
m_type = 1
|
||||
|
||||
if ("stare")
|
||||
var/M = null
|
||||
@@ -115,6 +116,7 @@
|
||||
message = "<B>[src]</B> stares at [param]."
|
||||
else
|
||||
message = "<B>[src]</B> stares."
|
||||
m_type = 1
|
||||
|
||||
if ("look")
|
||||
var/M = null
|
||||
@@ -132,6 +134,7 @@
|
||||
else
|
||||
message = "<B>[src]</B> looks."
|
||||
m_type = 1
|
||||
|
||||
if("beep")
|
||||
var/M = null
|
||||
if(param)
|
||||
@@ -147,7 +150,8 @@
|
||||
else
|
||||
message = "<B>[src]</B> beeps."
|
||||
playsound(src.loc, 'twobeep.ogg', 50, 0)
|
||||
m_type = 1
|
||||
m_type = 2
|
||||
|
||||
if("ping")
|
||||
var/M = null
|
||||
if(param)
|
||||
@@ -163,7 +167,8 @@
|
||||
else
|
||||
message = "<B>[src]</B> pings."
|
||||
playsound(src.loc, 'ping.ogg', 50, 0)
|
||||
m_type = 1
|
||||
m_type = 2
|
||||
|
||||
if("buzz")
|
||||
var/M = null
|
||||
if(param)
|
||||
@@ -179,7 +184,11 @@
|
||||
else
|
||||
message = "<B>[src]</B> buzzes."
|
||||
playsound(src.loc, 'buzz-sigh.ogg', 50, 0)
|
||||
m_type = 1
|
||||
m_type = 2
|
||||
|
||||
if("help")
|
||||
src << "beep-(none)/mob, ping-(none)/mob, buzz-(none)/mob, look-(none)/mob, stare-(none)/mob, glare-(none)/mob, twitch, twitch_s"
|
||||
|
||||
else
|
||||
src << text("Invalid Emote: []", act)
|
||||
if ((message && src.stat == 0))
|
||||
|
||||
@@ -584,7 +584,7 @@ datum/preferences
|
||||
|
||||
else if(link_tags["loadslot"])
|
||||
var/slot = text2num(link_tags["loadslot"])
|
||||
if(slot == "CLOSE")
|
||||
if(link_tags["loadslot"] == "CLOSE")
|
||||
closesave(user)
|
||||
return
|
||||
if(!savefile_load(user, slot))
|
||||
|
||||
@@ -988,16 +988,16 @@
|
||||
lighting = autoset(lighting, 0)
|
||||
environ = autoset(environ, 0)
|
||||
area.poweralert(0, src)
|
||||
else if(cell.percent() < 15) // <15%, turn off lighting & equipment
|
||||
equipment = autoset(equipment, 2)
|
||||
lighting = autoset(lighting, 2)
|
||||
environ = autoset(environ, 1)
|
||||
area.poweralert(0, src)
|
||||
else if(cell.percent() < 30) // <30%, turn off equipment
|
||||
else if(cell.percent() < 15) // <15%, turn off equipment
|
||||
equipment = autoset(equipment, 2)
|
||||
lighting = autoset(lighting, 1)
|
||||
environ = autoset(environ, 1)
|
||||
area.poweralert(0, src)
|
||||
else if(cell.percent() < 30) // <30%, turn off lighting & equipment
|
||||
equipment = autoset(equipment, 2)
|
||||
lighting = autoset(lighting, 2)
|
||||
environ = autoset(environ, 1)
|
||||
area.poweralert(0, src)
|
||||
else // otherwise all can be on
|
||||
equipment = autoset(equipment, 1)
|
||||
lighting = autoset(lighting, 1)
|
||||
|
||||
Reference in New Issue
Block a user