Fixes conflict and screen object breaking

This commit is contained in:
variableundefined
2018-10-21 08:31:46 +08:00
1144 changed files with 37485 additions and 20931 deletions
+1 -1
View File
@@ -111,7 +111,7 @@
X.pixel_y = Pixel_y
/obj/effect/ebeam
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
anchored = 1
var/datum/beam/owner
+1 -1
View File
@@ -16,7 +16,7 @@ var/global/datum/repository/air_alarm/air_alarm_repository = new()
if(is_station_contact(passed_alarm.z)) // Still need sanity checks
alarms[++alarms.len] = passed_alarm.get_nano_data_console()
else
for(var/obj/machinery/alarm/alarm in (monitored_alarms ? monitored_alarms : air_alarms)) // Generating the whole list again is a bad habit but I can't be bothered to fix it right now
for(var/obj/machinery/alarm/alarm in (monitored_alarms ? monitored_alarms : GLOB.air_alarms)) // Generating the whole list again is a bad habit but I can't be bothered to fix it right now
if(!monitored_alarms && !is_station_contact(alarm.z))
continue
alarms[++alarms.len] = alarm.get_nano_data_console()
+1 -1
View File
@@ -59,7 +59,7 @@ var/global/datum/repository/crew/crew_repository = new()
/datum/repository/crew/proc/scan()
var/list/tracked = list()
for(var/mob/living/carbon/human/H in mob_list)
for(var/mob/living/carbon/human/H in GLOB.mob_list)
if(istype(H.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/C = H.w_uniform
if(C.has_sensor)
+1 -1
View File
@@ -11,7 +11,7 @@ var/global/datum/repository/powermonitor/powermonitor_repository = new()
if(!refresh)
return cache_entry.data
for(var/obj/machinery/computer/monitor/pMon in power_monitors)
for(var/obj/machinery/computer/monitor/pMon in GLOB.power_monitors)
if( !(pMon.stat & (NOPOWER|BROKEN)) )
pMonData[++pMonData.len] = list ("Name" = pMon.name, "ref" = "\ref[pMon]")
+31
View File
@@ -0,0 +1,31 @@
/datum/click_intercept
var/client/holder = null
var/list/obj/screen/buttons = list()
/datum/click_intercept/New(client/C)
create_buttons()
enter(C)
return ..()
/datum/click_intercept/Destroy()
holder.screen -= buttons
holder.click_intercept = null
holder.show_popup_menus = TRUE
holder = null
QDEL_LIST(buttons)
return ..()
/datum/click_intercept/proc/enter(client/C)
holder = C
holder.click_intercept = src
holder.show_popup_menus = FALSE
holder.screen += buttons
/datum/click_intercept/proc/quit()
qdel(src)
/datum/click_intercept/proc/create_buttons()
return
/datum/click_intercept/proc/InterceptClickOn(user,params,atom/object)
return
+9 -9
View File
@@ -40,7 +40,7 @@
var/real_rank = t.fields["real_rank"]
if(OOC)
var/active = 0
for(var/mob/M in player_list)
for(var/mob/M in GLOB.player_list)
if(M.real_name == name && M.client && M.client.inactivity <= 10 * 60 * 10)
active = 1
break
@@ -222,7 +222,7 @@ var/global/list/PDA_Manifest = list()
/datum/datacore/proc/manifest()
for(var/mob/living/carbon/human/H in player_list)
for(var/mob/living/carbon/human/H in GLOB.player_list)
manifest_inject(H)
/datum/datacore/proc/manifest_modify(name, assignment)
@@ -358,7 +358,7 @@ var/record_id_num = 1001
preview_icon.Blend(temp, ICON_OVERLAY)
var/head = "head"
if(head_organ.alt_head && head_organ.dna.species.bodyflags & HAS_ALT_HEADS)
var/datum/sprite_accessory/alt_heads/alternate_head = alt_heads_list[head_organ.alt_head]
var/datum/sprite_accessory/alt_heads/alternate_head = GLOB.alt_heads_list[head_organ.alt_head]
if(alternate_head.icon_state)
head = alternate_head.icon_state
temp = new /icon(icobase, "[head]_[g]")
@@ -390,7 +390,7 @@ var/record_id_num = 1001
var/icon/t_marking_s
if(H.dna.species.bodyflags & HAS_TAIL_MARKINGS)
var/tail_marking = H.m_styles["tail"]
var/datum/sprite_accessory/tail_marking_style = marking_styles_list[tail_marking]
var/datum/sprite_accessory/tail_marking_style = GLOB.marking_styles_list[tail_marking]
if(tail_marking_style && tail_marking_style.species_allowed)
t_marking_s = new/icon("icon" = tail_marking_style.icon, "icon_state" = "[tail_marking_style.icon_state]_s")
t_marking_s.Blend(H.m_colours["tail"], ICON_ADD)
@@ -405,7 +405,7 @@ var/record_id_num = 1001
eyes_s.Blend(eyes_organ.eye_colour, ICON_ADD)
face_s.Blend(eyes_s, ICON_OVERLAY)
var/datum/sprite_accessory/hair_style = hair_styles_full_list[head_organ.h_style]
var/datum/sprite_accessory/hair_style = GLOB.hair_styles_full_list[head_organ.h_style]
if(hair_style)
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
// I'll want to make a species-specific proc for this sooner or later
@@ -425,13 +425,13 @@ var/record_id_num = 1001
//Head Accessory
if(head_organ.dna.species.bodyflags & HAS_HEAD_ACCESSORY)
var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[head_organ.ha_style]
var/datum/sprite_accessory/head_accessory_style = GLOB.head_accessory_styles_list[head_organ.ha_style]
if(head_accessory_style && head_accessory_style.species_allowed)
var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s")
head_accessory_s.Blend(head_organ.headacc_colour, ICON_ADD)
face_s.Blend(head_accessory_s, ICON_OVERLAY)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[head_organ.f_style]
var/datum/sprite_accessory/facial_hair_style = GLOB.facial_hair_styles_list[head_organ.f_style]
if(facial_hair_style && facial_hair_style.species_allowed)
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
if(istype(head_organ.dna.species, /datum/species/slime))
@@ -451,14 +451,14 @@ var/record_id_num = 1001
if((H.dna.species.bodyflags & HAS_HEAD_MARKINGS) || (H.dna.species.bodyflags & HAS_BODY_MARKINGS))
if(H.dna.species.bodyflags & HAS_BODY_MARKINGS) //Body markings.
var/body_marking = H.m_styles["body"]
var/datum/sprite_accessory/body_marking_style = marking_styles_list[body_marking]
var/datum/sprite_accessory/body_marking_style = GLOB.marking_styles_list[body_marking]
if(body_marking_style && body_marking_style.species_allowed)
var/icon/b_marking_s = new/icon("icon" = body_marking_style.icon, "icon_state" = "[body_marking_style.icon_state]_s")
b_marking_s.Blend(H.m_colours["body"], ICON_ADD)
face_s.Blend(b_marking_s, ICON_OVERLAY)
if(H.dna.species.bodyflags & HAS_HEAD_MARKINGS) //Head markings.
var/head_marking = H.m_styles["head"]
var/datum/sprite_accessory/head_marking_style = marking_styles_list[head_marking]
var/datum/sprite_accessory/head_marking_style = GLOB.marking_styles_list[head_marking]
if(head_marking_style && head_marking_style.species_allowed)
var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s")
h_marking_s.Blend(H.m_colours["head"], ICON_ADD)
+6 -6
View File
@@ -31,7 +31,7 @@
/datum/proc/vv_get_var(var_name)
switch(var_name)
if("attack_log")
if("attack_log", "debug_log")
return debug_variable(var_name, vars[var_name], 0, src, sanitize = FALSE)
if("vars")
return debug_variable(var_name, list(), 0, src)
@@ -546,7 +546,7 @@
to_chat(usr, "This can only be used on instances of type /mob")
return
var/new_name = sanitize(copytext(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null,1,MAX_NAME_LEN))
var/new_name = reject_bad_name(sanitize(copytext(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null,1,MAX_NAME_LEN)))
if( !new_name || !M ) return
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
@@ -817,7 +817,7 @@
if(A.reagents)
var/chosen_id
var/list/reagent_options = sortAssoc(chemical_reagents_list)
var/list/reagent_options = sortAssoc(GLOB.chemical_reagents_list)
switch(alert(usr, "Choose a method.", "Add Reagents", "Enter ID", "Choose ID"))
if("Enter ID")
var/valid_id
@@ -1033,7 +1033,7 @@
to_chat(usr, "This can only be done to instances of type /mob")
return
var/new_language = input("Please choose a language to add.","Language",null) as null|anything in all_languages
var/new_language = input("Please choose a language to add.","Language",null) as null|anything in GLOB.all_languages
if(!new_language)
return
@@ -1215,8 +1215,8 @@
return
switch(Text)
if("brute") L.adjustBruteLoss(amount)
if("fire") L.adjustFireLoss(amount)
if("brute") L.adjustBruteLoss(amount, robotic=1)
if("fire") L.adjustFireLoss(amount, robotic=1)
if("toxin") L.adjustToxLoss(amount)
if("oxygen")L.adjustOxyLoss(amount)
if("brain") L.adjustBrainLoss(amount)
+1 -1
View File
@@ -36,7 +36,7 @@
var/datum/disease/DD = new D.type(1, D, 0)
viruses += DD
DD.affected_mob = src
active_diseases += DD //Add it to the active diseases list, now that it's actually in a mob and being processed.
GLOB.active_diseases += DD //Add it to the active diseases list, now that it's actually in a mob and being processed.
//Copy properties over. This is so edited diseases persist.
var/list/skipped = list("affected_mob","holder","carrier","stage","type","parent_type","vars","transformed")
+1 -1
View File
@@ -67,7 +67,7 @@ var/list/diseases = subtypesof(/datum/disease)
/datum/disease/Destroy()
affected_mob = null
active_diseases.Remove(src)
GLOB.active_diseases.Remove(src)
return ..()
/datum/disease/proc/stage_act()
+3 -3
View File
@@ -251,7 +251,7 @@ var/list/advance_cures = list(
cures = list(advance_cures[res])
// Get the cure name from the cure_id
var/datum/reagent/D = chemical_reagents_list[cures[1]]
var/datum/reagent/D = GLOB.chemical_reagents_list[cures[1]]
cure_text = D.name
@@ -394,10 +394,10 @@ var/list/advance_cures = list(
D.AssignName(new_name)
D.Refresh()
for(var/datum/disease/advance/AD in active_diseases)
for(var/datum/disease/advance/AD in GLOB.active_diseases)
AD.Refresh()
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
if(!is_station_level(H.z))
continue
if(!H.HasDisease(D))
@@ -28,23 +28,28 @@ Bonus
..()
if(prob(SYMPTOM_ACTIVATION_PROB * 3))
var/mob/living/M = A.affected_mob
var/datum/reagents/RD = M.reagents
switch(A.stage)
if(2)
if(M.reagents.get_reagent_amount("oculine")<10)
M.reagents.add_reagent("oculine", 10)
if(RD.check_and_add("oculine", 10, 10))
to_chat(M, "<span class='notice'>Your hearing feels clearer and crisp.</span>")
if(3)
if(M.reagents.get_reagent_amount("antihol") < 10 && M.reagents.get_reagent_amount("oculine") < 10 )
M.reagents.add_reagent_list(list("antihol"=10, "oculine"=10))
if(RD.check_and_add("antihol", 10, 10))
to_chat(M, "<span class='notice'>You feel sober.</span>")
RD.check_and_add("oculine", 10, 10)
if(4)
if(M.reagents.get_reagent_amount("antihol") < 10 && M.reagents.get_reagent_amount("oculine") < 10 && M.reagents.get_reagent_amount("synaphydramine") < 10)
M.reagents.add_reagent_list(list("antihol"=10, "oculine"=10, "synaphydramine"=5))
if(RD.check_and_add("synaphydramine", 10, 5))
to_chat(M, "<span class='notice'>You feel focused.</span>")
RD.check_and_add("antihol", 10, 10)
RD.check_and_add("oculine", 10, 10)
if(5)
if(M.reagents.get_reagent_amount("antihol") < 10 && M.reagents.get_reagent_amount("oculine") < 10 && M.reagents.get_reagent_amount("synaphydramine") < 10 && M.reagents.get_reagent_amount("mannitol") < 10)
M.reagents.add_reagent_list(list("mannitol"=10, "antihol"=10, "oculine"=10, "synaphydramine"=10))
if(RD.check_and_add("mannitol", 10, 10))
to_chat(M, "<span class='notice'>Your mind feels relaxed.</span>")
RD.check_and_add("synaphydramine", 10, 5)
RD.check_and_add("antihol", 10, 10)
RD.check_and_add("oculine", 10, 10)
return
/*
+1 -2
View File
@@ -24,7 +24,6 @@
to_chat(affected_mob, "<span class='danger'>Your stomach stings painfully.</span>")
if(prob(20))
affected_mob.adjustToxLoss(2)
affected_mob.updatehealth()
if(4)
if(prob(10))
affected_mob.visible_message("<span class='danger'>[affected_mob] buzzes.</span>", \
@@ -37,4 +36,4 @@
new /mob/living/simple_animal/hostile/poison/bees(affected_mob.loc)
//if(5)
//Plus if you die, you explode into bees
return
return
-3
View File
@@ -25,7 +25,6 @@
to_chat(affected_mob, "<span class='danger'>You don't feel like yourself.</span>")
if(prob(5))
affected_mob.adjustBrainLoss(1)
affected_mob.updatehealth()
if(3)
if(prob(2))
affected_mob.emote("stare")
@@ -33,7 +32,6 @@
affected_mob.emote("drool")
if(prob(10) && affected_mob.getBrainLoss()<=98)//shouldn't retard you to death now
affected_mob.adjustBrainLoss(2)
affected_mob.updatehealth()
if(prob(2))
to_chat(affected_mob, "<span class='danger'>Your try to remember something important...but can't.</span>")
@@ -44,7 +42,6 @@
affected_mob.emote("drool")
if(prob(15) && affected_mob.getBrainLoss()<=98) //shouldn't retard you to death now
affected_mob.adjustBrainLoss(3)
affected_mob.updatehealth()
if(prob(2))
to_chat(affected_mob, "<span class='danger'>Strange buzzing fills your head, removing all thoughts.</span>")
if(prob(3))
+1 -2
View File
@@ -41,7 +41,6 @@
to_chat(affected_mob, "<span class='danger'>Your stomach hurts.</span>")
if(prob(20))
affected_mob.adjustToxLoss(2)
affected_mob.updatehealth()
if(4)
if(!transformed && !carrier)
//Save original dna for when the disease is cured.
@@ -69,4 +68,4 @@
affected_mob.domutcheck()
to_chat(affected_mob, "<span class='notice'>You feel more like yourself.</span>")
return ..()
return ..()
-2
View File
@@ -31,7 +31,6 @@
to_chat(affected_mob, "<span class='danger'>Your stomach hurts.</span>")
if(prob(20))
affected_mob.adjustToxLoss(1)
affected_mob.updatehealth()
if(3)
if(affected_mob.lying && prob(15))
@@ -50,5 +49,4 @@
to_chat(affected_mob, "<span class='danger'>Your stomach hurts.</span>")
if(prob(20))
affected_mob.adjustToxLoss(1)
affected_mob.updatehealth()
return
+1 -3
View File
@@ -18,7 +18,6 @@
if(2)
if(prob(45))
affected_mob.adjustToxLoss(5)
affected_mob.updatehealth()
if(prob(1))
affected_mob.emote("sneeze")
if(3)
@@ -32,7 +31,6 @@
if(prob(10))
affected_mob.emote("cough")
affected_mob.adjustToxLoss(5)
affected_mob.updatehealth()
if(5)
to_chat(affected_mob, "<span class='danger'>Your body feels as if it's trying to rip itself open...</span>")
if(prob(50))
@@ -50,4 +48,4 @@
cure_chance = 10
agent = "gibbis"
spread_flags = NON_CONTAGIOUS
disease_flags = CURABLE
disease_flags = CURABLE
+1 -3
View File
@@ -19,7 +19,6 @@
if(2)
if(prob(45))
affected_mob.adjustToxLoss(5)
affected_mob.updatehealth()
if(prob(1))
to_chat(affected_mob, "<span class='danger'>You feel strange...</span>")
if(3)
@@ -35,8 +34,7 @@
to_chat(affected_mob, "<span class='danger'>You feel a burning beat inside...</span>")
if(prob(20))
affected_mob.adjustToxLoss(5)
affected_mob.updatehealth()
if(5)
to_chat(affected_mob, "<span class='danger'>Your body is unable to contain the Rhumba Beat...</span>")
if(prob(50))
affected_mob.gib()
affected_mob.gib()
+2 -2
View File
@@ -29,7 +29,7 @@
for(var/I in callees)
var/obj/machinery/hologram/holopad/H = I
if(!QDELETED(H) && !(H.stat & NOPOWER))
if(!QDELETED(H) && !(H.stat & NOPOWER) && H.anchored)
dialed_holopads += H
var/area/area = get_area(H)
LAZYADD(H.holo_calls, src)
@@ -159,7 +159,7 @@
/datum/holocall/proc/Check()
for(var/I in dialed_holopads)
var/obj/machinery/hologram/holopad/H = I
if((H.stat & NOPOWER))
if((H.stat & NOPOWER) || !H.anchored)
ConnectionFailure(H)
if(QDELETED(src))
+243 -293
View File
@@ -1,32 +1,22 @@
/* Note from Carnie:
The way datum/mind stuff works has been changed a lot.
Minds now represent IC characters rather than following a client around constantly.
Guidelines for using minds properly:
- Never mind.transfer_to(ghost). The var/current and var/original of a mind must always be of type mob/living!
ghost.mind is however used as a reference to the ghost's corpse
- When creating a new mob for an existing IC character (e.g. cloning a dead guy or borging a brain of a human)
the existing mind of the old mob should be transfered to the new mob like so:
mind.transfer_to(new_mob)
- You must not assign key= or ckey= after transfer_to() since the transfer_to transfers the client for you.
By setting key or ckey explicitly after transfering the mind with transfer_to you will cause bugs like DCing
the player.
- IMPORTANT NOTE 2, if you want a player to become a ghost, use mob.ghostize() It does all the hard work for you.
- When creating a new mob which will be a new IC character (e.g. putting a shade in a construct or randomly selecting
a ghost to become a xeno during an event). Simply assign the key or ckey like you've always done.
new_mob.key = key
The Login proc will handle making a new mob for that mobtype (including setting up stuff like mind.name). Simple!
However if you want that mind to have any special properties like being a traitor etc you will have to do that
yourself.
*/
/datum/mind
@@ -47,7 +37,7 @@
var/role_alt_title
var/datum/job/assigned_job
var/list/kills=list()
var/list/kills = list()
var/list/datum/objective/objectives = list()
var/list/datum/objective/special_verbs = list()
@@ -78,9 +68,8 @@
//zealot_master is a reference to the mob that converted them into a zealot (for ease of investigation and such)
var/mob/living/carbon/human/zealot_master = null
/datum/mind/New(var/key)
src.key = key
/datum/mind/New(new_key)
key = new_key
/datum/mind/Destroy()
ticker.minds -= src
@@ -122,19 +111,15 @@
/datum/mind/proc/wipe_memory()
memory = null
/datum/mind/proc/show_memory(mob/recipient, window=1)
/datum/mind/proc/show_memory(mob/recipient, window = 1)
if(!recipient)
recipient = current
var/output = "<B>[current.real_name]'s Memories:</B><HR>"
output += memory
if(objectives.len)
output += "<HR><B>Objectives:</B>"
var/obj_count = 1
for(var/datum/objective/objective in objectives)
output += "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
output += "<HR><B>Objectives:</B><BR>"
output += gen_objective_text()
if(job_objectives.len)
output += "<HR><B>Job Objectives:</B><UL>"
@@ -145,17 +130,213 @@
obj_count++
output += "</UL>"
if(window)
recipient << browse(output,"window=memory")
recipient << browse(output, "window=memory")
else
to_chat(recipient, "<i>[output]</i>")
/datum/mind/proc/gen_objective_text(admin = FALSE)
. = ""
var/obj_count = 1
for(var/datum/objective/objective in objectives)
. += "<b>Objective #[obj_count]</b>: [objective.explanation_text]"
if(admin)
. += " <a href='?src=[UID()];obj_edit=\ref[objective]'>Edit</a> " // Edit
. += "<a href='?src=[UID()];obj_delete=\ref[objective]'>Delete</a> " // Delete
. += "<a href='?src=[UID()];obj_completed=\ref[objective]'>" // Mark Completed
. += "<font color=[objective.completed ? "green" : "red"]>Toggle Completion</font>"
. += "</a>"
. += "<br>"
obj_count++
/datum/mind/proc/_memory_edit_header(gamemode, list/alt)
. = gamemode
if(ticker.mode.config_tag == gamemode || (LAZYLEN(alt) && (ticker.mode.config_tag in alt)))
. = uppertext(.)
. = "<i><b>[.]</b></i>: "
/datum/mind/proc/_memory_edit_role_enabled(role)
. = "|Disabled in Prefs"
if(current && current.client && (role in current.client.prefs.be_special))
. = "|Enabled in Prefs"
/datum/mind/proc/memory_edit_implant(mob/living/carbon/human/H)
if(ismindshielded(H))
. = "Mindshield Implant:<a href='?src=[UID()];implant=remove'>Remove</a>|<b><font color='green'>Implanted</font></b></br>"
else
. = "Mindshield Implant:<b>No Implant</b>|<a href='?src=[UID()];implant=add'>Implant [H.p_them()]!</a></br>"
/datum/mind/proc/memory_edit_revolution(mob/living/carbon/human/H)
. = _memory_edit_header("revolution")
if(ismindshielded(H))
. += "<b>NO</b>|headrev|rev"
else if(src in ticker.mode.head_revolutionaries)
. += "<a href='?src=[UID()];revolution=clear'>no</a>|<b><font color='red'>HEADREV</font></b>|<a href='?src=[UID()];revolution=rev'>rev</a>"
. += "<br>Flash: <a href='?src=[UID()];revolution=flash'>give</a>"
var/list/L = current.get_contents()
var/obj/item/flash/flash = locate() in L
if(flash)
if(!flash.broken)
. += "|<a href='?src=[UID()];revolution=takeflash'>take</a>."
else
. += "|<a href='?src=[UID()];revolution=takeflash'>take</a>|<a href='?src=[UID()];revolution=repairflash'>repair</a>."
else
. += "."
. += " <a href='?src=[UID()];revolution=reequip'>Reequip</a> (gives traitor uplink)."
if(objectives.len==0)
. += "<br>Objectives are empty! <a href='?src=[UID()];revolution=autoobjectives'>Set to kill all heads</a>."
else if(src in ticker.mode.revolutionaries)
. += "<a href='?src=[UID()];revolution=clear'>no</a>|<a href='?src=[UID()];revolution=headrev'>headrev</a>|<b><font color='red'>REV</font></b>"
else
. += "<b>NO</b>|<a href='?src=[UID()];revolution=headrev'>headrev</a>|<a href='?src=[UID()];revolution=rev'>rev</a>"
. += _memory_edit_role_enabled(ROLE_REV)
/datum/mind/proc/memory_edit_cult(mob/living/carbon/human/H)
. = _memory_edit_header("cult")
if(ismindshielded(H))
. += "<B>NO</B>|cultist"
else if(src in ticker.mode.cult)
. += "<a href='?src=[UID()];cult=clear'>no</a>|<b><font color='red'>CULTIST</font></b>"
. += "<br>Give <a href='?src=[UID()];cult=tome'>tome</a>|<a href='?src=[UID()];cult=equip'>equip</a>."
else
. += "<b>NO</b>|<a href='?src=[UID()];cult=cultist'>cultist</a>"
. += _memory_edit_role_enabled(ROLE_CULTIST)
/datum/mind/proc/memory_edit_wizard(mob/living/carbon/human/H)
. = _memory_edit_header("wizard")
if(src in ticker.mode.wizards)
. += "<b><font color='red'>WIZARD</font></b>|<a href='?src=[UID()];wizard=clear'>no</a>"
. += "<br><a href='?src=[UID()];wizard=lair'>To lair</a>, <a href='?src=[UID()];common=undress'>undress</a>, <a href='?src=[UID()];wizard=dressup'>dress up</a>, <a href='?src=[UID()];wizard=name'>let choose name</a>."
if(objectives.len==0)
. += "<br>Objectives are empty! <a href='?src=[UID()];wizard=autoobjectives'>Randomize!</a>"
else
. += "<a href='?src=[UID()];wizard=wizard'>wizard</a>|<b>NO</b>"
. += _memory_edit_role_enabled(ROLE_WIZARD)
/datum/mind/proc/memory_edit_changeling(mob/living/carbon/human/H)
. = _memory_edit_header("changeling", list("traitorchan"))
if(src in ticker.mode.changelings)
. += "<b><font color='red'>CHANGELING</font></b>|<a href='?src=[UID()];changeling=clear'>no</a>"
if(objectives.len==0)
. += "<br>Objectives are empty! <a href='?src=[UID()];changeling=autoobjectives'>Randomize!</a>"
if(changeling && changeling.absorbed_dna.len && (current.real_name != changeling.absorbed_dna[1]))
. += "<br><a href='?src=[UID()];changeling=initialdna'>Transform to initial appearance.</a>"
else
. += "<a href='?src=[UID()];changeling=changeling'>changeling</a>|<b>NO</b>"
. += _memory_edit_role_enabled(ROLE_CHANGELING)
/datum/mind/proc/memory_edit_vampire(mob/living/carbon/human/H)
. = _memory_edit_header("vampire", list("traitorvamp"))
if(src in ticker.mode.vampires)
. += "<b><font color='red'>VAMPIRE</font></b>|<a href='?src=[UID()];vampire=clear'>no</a>"
if(objectives.len==0)
. += "<br>Objectives are empty! <a href='?src=[UID()];vampire=autoobjectives'>Randomize!</a>"
else
. += "<a href='?src=[UID()];vampire=vampire'>vampire</a>|<b>NO</b>"
. += _memory_edit_role_enabled(ROLE_VAMPIRE)
/** Enthralled ***/
. += "<br><b><i>enthralled</i></b>: "
if(src in ticker.mode.vampire_enthralled)
. += "<b><font color='red'>THRALL</font></b>|<a href='?src=[UID()];vampthrall=clear'>no</a>"
else
. += "thrall|<b>NO</b>"
/datum/mind/proc/memory_edit_nuclear(mob/living/carbon/human/H)
. = _memory_edit_header("nuclear")
if(src in ticker.mode.syndicates)
. += "<b><font color='red'>OPERATIVE</b></font>|<a href='?src=[UID()];nuclear=clear'>no</a>"
. += "<br><a href='?src=[UID()];nuclear=lair'>To shuttle</a>, <a href='?src=[UID()];common=undress'>undress</a>, <a href='?src=[UID()];nuclear=dressup'>dress up</a>."
var/code
for(var/obj/machinery/nuclearbomb/bombue in GLOB.machines)
if(length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN")
code = bombue.r_code
break
if(code)
. += " Code is [code]. <a href='?src=[UID()];nuclear=tellcode'>tell the code.</a>"
else
. += "<a href='?src=[UID()];nuclear=nuclear'>operative</a>|<b>NO</b>"
. += _memory_edit_role_enabled(ROLE_OPERATIVE)
/datum/mind/proc/memory_edit_shadowling(mob/living/carbon/human/H)
. = _memory_edit_header("shadowling")
if(src in ticker.mode.shadows)
. += "<b><font color='red'>SHADOWLING</font></b>|thrall|<a href='?src=[UID()];shadowling=clear'>no</a>"
else if(src in ticker.mode.shadowling_thralls)
. += "Shadowling|<b><font color='red'>THRALL</font></b>|<a href='?src=[UID()];shadowling=clear'>no</a>"
else
. += "<a href='?src=[UID()];shadowling=shadowling'>shadowling</a>|<a href='?src=[UID()];shadowling=thrall'>thrall</a>|<b>NO</b>"
. += _memory_edit_role_enabled(ROLE_SHADOWLING)
/datum/mind/proc/memory_edit_abductor(mob/living/carbon/human/H)
. = _memory_edit_header("abductor")
if(src in ticker.mode.abductors)
. += "<b><font color='red'>ABDUCTOR</font></b>|<a href='?src=[UID()];abductor=clear'>no</a>"
. += "|<a href='?src=[UID()];common=undress'>undress</a>|<a href='?src=[UID()];abductor=equip'>equip</a>"
else
. += "<a href='?src=[UID()];abductor=abductor'>abductor</a>|<b>NO</b>"
. += _memory_edit_role_enabled(ROLE_ABDUCTOR)
/datum/mind/proc/memory_edit_traitor()
. = _memory_edit_header("traitor", list("traitorchan", "traitorvamp"))
if(src in ticker.mode.traitors)
. += "<b><font color='red'>TRAITOR</font></b>|<a href='?src=[UID()];traitor=clear'>no</a>"
if(objectives.len==0)
. += "<br>Objectives are empty! <a href='?src=[UID()];traitor=autoobjectives'>Randomize</a>!"
else
. += "<a href='?src=[UID()];traitor=traitor'>traitor</a>|<b>NO</b>"
. += _memory_edit_role_enabled(ROLE_TRAITOR)
/datum/mind/proc/memory_edit_silicon()
. = "<i><b>Silicon</b></i>: "
var/mob/living/silicon/robot/robot = current
if(istype(robot) && robot.emagged)
. += "<br>Cyborg: <b><font color='red'>Is emagged!</font></b> <a href='?src=[UID()];silicon=unemag'>Unemag!</a><br>0th law: [robot.laws.zeroth_law]"
var/mob/living/silicon/ai/ai = current
if(istype(ai) && ai.connected_robots.len)
var/n_e_robots = 0
for(var/mob/living/silicon/robot/R in ai.connected_robots)
if(R.emagged)
n_e_robots++
. += "<br>[n_e_robots] of [ai.connected_robots.len] slaved cyborgs are emagged. <a href='?src=[UID()];silicon=unemagcyborgs'>Unemag</a>"
/datum/mind/proc/memory_edit_uplink()
. = ""
if(ishuman(current) && ((src in ticker.mode.head_revolutionaries) || \
(src in ticker.mode.traitors) || \
(src in ticker.mode.syndicates)))
. = "Uplink: <a href='?src=[UID()];common=uplink'>give</a>"
var/obj/item/uplink/hidden/suplink = find_syndicate_uplink()
var/crystals
if(suplink)
crystals = suplink.uses
if(suplink)
. += "|<a href='?src=[UID()];common=takeuplink'>take</a>"
if(usr.client.holder.rights & (R_SERVER|R_EVENT))
. += ", <a href='?src=[UID()];common=crystals'>[crystals]</a> crystals"
else
. += ", [crystals] crystals"
. += "." //hiel grammar
// ^ whoever left this comment is literally a grammar nazi. stalin better. in russia grammar correct you.
/datum/mind/proc/edit_memory()
if(!ticker || !ticker.mode)
alert("Not before round-start!", "Alert")
return
var/out = "<B>[name]</B>[(current&&(current.real_name!=name))?" (as [current.real_name])":""]<br>"
out += "Mind currently owned by key: [key] [active?"(synced)":"(not synced)"]<br>"
var/out = "<B>[name]</B>[(current && (current.real_name != name))?" (as [current.real_name])" : ""]<br>"
out += "Mind currently owned by key: [key] [active ? "(synced)" : "(not synced)"]<br>"
out += "Assigned role: [assigned_role]. <a href='?src=[UID()];role_edit=1'>Edit</a><br>"
out += "Factions and special roles:<br>"
@@ -169,284 +350,60 @@
"nuclear",
"traitor", // "traitorchan",
)
var/text = ""
var/mob/living/carbon/human/H = current
if(ishuman(current))
/** Impanted**/
if(ismindshielded(H))
text = "Mindshield Implant:<a href='?src=[UID()];implant=remove'>Remove</a>|<b><font color='green'>Implanted</font></b></br>"
else
text = "Mindshield Implant:<b>No Implant</b>|<a href='?src=[UID()];implant=add'>Implant [H.p_them()]!</a></br>"
sections["implant"] = text
sections["implant"] = memory_edit_implant(H)
/** REVOLUTION ***/
text = "revolution"
if(ticker.mode.config_tag=="revolution")
text += uppertext(text)
text = "<i><b>[text]</b></i>: "
if(ismindshielded(H))
text += "<b>NO</b>|headrev|rev"
else if(src in ticker.mode.head_revolutionaries)
text += "<a href='?src=[UID()];revolution=clear'>no</a>|<b><font color='red'>HEADREV</font></b>|<a href='?src=[UID()];revolution=rev'>rev</a>"
text += "<br>Flash: <a href='?src=[UID()];revolution=flash'>give</a>"
var/list/L = current.get_contents()
var/obj/item/flash/flash = locate() in L
if(flash)
if(!flash.broken)
text += "|<a href='?src=[UID()];revolution=takeflash'>take</a>."
else
text += "|<a href='?src=[UID()];revolution=takeflash'>take</a>|<a href='?src=[UID()];revolution=repairflash'>repair</a>."
else
text += "."
text += " <a href='?src=[UID()];revolution=reequip'>Reequip</a> (gives traitor uplink)."
if(objectives.len==0)
text += "<br>Objectives are empty! <a href='?src=[UID()];revolution=autoobjectives'>Set to kill all heads</a>."
else if(src in ticker.mode.revolutionaries)
text += "<a href='?src=[UID()];revolution=clear'>no</a>|<a href='?src=[UID()];revolution=headrev'>headrev</a>|<b><font color='red'>REV</font></b>"
else
text += "<b>NO</b>|<a href='?src=[UID()];revolution=headrev'>headrev</a>|<a href='?src=[UID()];revolution=rev'>rev</a>"
if(current && current.client && (ROLE_REV in current.client.prefs.be_special))
text += "|Enabled in Prefs"
else
text += "|Disabled in Prefs"
sections["revolution"] = text
sections["revolution"] = memory_edit_revolution(H)
/** CULT ***/
text = "cult"
if(ticker.mode.config_tag=="cult")
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
if(ismindshielded(H))
text += "<B>NO</B>|cultist"
else if(src in ticker.mode.cult)
text += "<a href='?src=[UID()];cult=clear'>no</a>|<b><font color='red'>CULTIST</font></b>"
text += "<br>Give <a href='?src=[UID()];cult=tome'>tome</a>|<a href='?src=[UID()];cult=equip'>equip</a>."
/*
if(objectives.len==0)
text += "<br>Objectives are empty! Set to sacrifice and <a href='?src=[UID()];cult=escape'>escape</a> or <a href='?src=[UID()];cult=summon'>summon</a>."
*/
else
text += "<b>NO</b>|<a href='?src=[UID()];cult=cultist'>cultist</a>"
if(current && current.client && (ROLE_CULTIST in current.client.prefs.be_special))
text += "|Enabled in Prefs"
else
text += "|Disabled in Prefs"
sections["cult"] = text
sections["cult"] = memory_edit_cult(H)
/** WIZARD ***/
text = "wizard"
if(ticker.mode.config_tag=="wizard")
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
if(src in ticker.mode.wizards)
text += "<b><font color='red'>WIZARD</font></b>|<a href='?src=[UID()];wizard=clear'>no</a>"
text += "<br><a href='?src=[UID()];wizard=lair'>To lair</a>, <a href='?src=[UID()];common=undress'>undress</a>, <a href='?src=[UID()];wizard=dressup'>dress up</a>, <a href='?src=[UID()];wizard=name'>let choose name</a>."
if(objectives.len==0)
text += "<br>Objectives are empty! <a href='?src=[UID()];wizard=autoobjectives'>Randomize!</a>"
else
text += "<a href='?src=[UID()];wizard=wizard'>wizard</a>|<b>NO</b>"
if(current && current.client && (ROLE_WIZARD in current.client.prefs.be_special))
text += "|Enabled in Prefs"
else
text += "|Disabled in Prefs"
sections["wizard"] = text
sections["wizard"] = memory_edit_wizard(H)
/** CHANGELING ***/
text = "changeling"
if(ticker.mode.config_tag=="changeling" || ticker.mode.config_tag=="traitorchan")
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
if(src in ticker.mode.changelings)
text += "<b><font color='red'>CHANGELING</font></b>|<a href='?src=[UID()];changeling=clear'>no</a>"
if(objectives.len==0)
text += "<br>Objectives are empty! <a href='?src=[UID()];changeling=autoobjectives'>Randomize!</a>"
if( changeling && changeling.absorbed_dna.len && (current.real_name != changeling.absorbed_dna[1]) )
text += "<br><a href='?src=[UID()];changeling=initialdna'>Transform to initial appearance.</a>"
else
text += "<a href='?src=[UID()];changeling=changeling'>changeling</a>|<b>NO</b>"
if(current && current.client && (ROLE_CHANGELING in current.client.prefs.be_special))
text += "|Enabled in Prefs"
else
text += "|Disabled in Prefs"
sections["changeling"] = text
sections["changeling"] = memory_edit_changeling(H)
/** VAMPIRE ***/
text = "vampire"
if(ticker.mode.config_tag=="vampire" || ticker.mode.config_tag=="traitorvamp")
text = uppertext(text)
text = "<b><i>[text]</i></b>: "
if(src in ticker.mode.vampires)
text += "<b><font color='red'>VAMPIRE</font></b>|<a href='?src=[UID()];vampire=clear'>no</a>"
if(objectives.len==0)
text += "<br>Objectives are empty! <a href='?src=[UID()];vampire=autoobjectives'>Randomize!</a>"
else
text += "<a href='?src=[UID()];vampire=vampire'>vampire</a>|<b>NO</b>"
if(current && current.client && (ROLE_VAMPIRE in current.client.prefs.be_special))
text += "|Enabled in Prefs"
else
text += "|Disabled in Prefs"
/** Enthralled ***/
text += "<br><b><i>enthralled</i></b>: "
if(src in ticker.mode.vampire_enthralled)
text += "<b><font color='red'>THRALL</font></b>|<a href='?src=[UID()];vampthrall=clear'>no</a>"
else
text += "thrall|<b>NO</b>"
sections["vampire"] = text
sections["vampire"] = memory_edit_vampire(H)
/** NUCLEAR ***/
text = "nuclear"
if(ticker.mode.config_tag=="nuclear")
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
if(src in ticker.mode.syndicates)
text += "<b><font color='red'>OPERATIVE</b></font>|<a href='?src=[UID()];nuclear=clear'>no</a>"
text += "<br><a href='?src=[UID()];nuclear=lair'>To shuttle</a>, <a href='?src=[UID()];common=undress'>undress</a>, <a href='?src=[UID()];nuclear=dressup'>dress up</a>."
var/code
for(var/obj/machinery/nuclearbomb/bombue in machines)
if(length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN")
code = bombue.r_code
break
if(code)
text += " Code is [code]. <a href='?src=[UID()];nuclear=tellcode'>tell the code.</a>"
else
text += "<a href='?src=[UID()];nuclear=nuclear'>operative</a>|<b>NO</b>"
if(current && current.client && (ROLE_OPERATIVE in current.client.prefs.be_special))
text += "|Enabled in Prefs"
else
text += "|Disabled in Prefs"
sections["nuclear"] = text
sections["nuclear"] = memory_edit_nuclear(H)
/** SHADOWLING **/
text = "shadowling"
if(ticker.mode.config_tag == "shadowling")
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
if(src in ticker.mode.shadows)
text += "<b><font color='red'>SHADOWLING</font></b>|thrall|<a href='?src=[UID()];shadowling=clear'>no</a>"
else if(src in ticker.mode.shadowling_thralls)
text += "Shadowling|<b><font color='red'>THRALL</font></b>|<a href='?src=[UID()];shadowling=clear'>no</a>"
else
text += "<a href='?src=[UID()];shadowling=shadowling'>shadowling</a>|<a href='?src=[UID()];shadowling=thrall'>thrall</a>|<b>NO</b>"
if(current && current.client && (ROLE_SHADOWLING in current.client.prefs.be_special))
text += "|Enabled in Prefs"
else
text += "|Disabled in Prefs"
sections["shadowling"] = text
sections["shadowling"] = memory_edit_shadowling(H)
/** Abductors **/
text = "abductor"
if(ticker.mode.config_tag == "abductor")
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
if(src in ticker.mode.abductors)
text += "<b><font color='red'>ABDUCTOR</font></b>|<a href='?src=[UID()];abductor=clear'>no</a>"
text += "|<a href='?src=[UID()];common=undress'>undress</a>|<a href='?src=[UID()];abductor=equip'>equip</a>"
else
text += "<a href='?src=[UID()];abductor=abductor'>abductor</a>|<b>NO</b>"
if(current && current.client && (ROLE_ABDUCTOR in current.client.prefs.be_special))
text += "|Enabled in Prefs"
else
text += "|Disabled in Prefs"
sections["Abductor"] = text
sections["abductor"] = memory_edit_abductor(H)
/** TRAITOR ***/
text = "traitor"
if(ticker.mode.config_tag=="traitor" || ticker.mode.config_tag=="traitorchan" || ticker.mode.config_tag=="traitorvamp")
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
if(src in ticker.mode.traitors)
text += "<b><font color='red'>TRAITOR</font></b>|<a href='?src=[UID()];traitor=clear'>no</a>"
if(objectives.len==0)
text += "<br>Objectives are empty! <a href='?src=[UID()];traitor=autoobjectives'>Randomize</a>!"
else
text += "<a href='?src=[UID()];traitor=traitor'>traitor</a>|<b>NO</b>"
if(current && current.client && (ROLE_TRAITOR in current.client.prefs.be_special))
text += "|Enabled in Prefs"
else
text += "|Disabled in Prefs"
sections["traitor"] = text
sections["traitor"] = memory_edit_traitor()
/** SILICON ***/
if(issilicon(current))
text = "silicon"
var/mob/living/silicon/robot/robot = current
if(istype(robot) && robot.emagged)
text += "<br>Cyborg: <b><font color='red'>Is emagged!</font></b> <a href='?src=[UID()];silicon=unemag'>Unemag!</a><br>0th law: [robot.laws.zeroth_law]"
var/mob/living/silicon/ai/ai = current
if(istype(ai) && ai.connected_robots.len)
var/n_e_robots = 0
for(var/mob/living/silicon/robot/R in ai.connected_robots)
if(R.emagged)
n_e_robots++
text += "<br>[n_e_robots] of [ai.connected_robots.len] slaved cyborgs are emagged. <a href='?src=[UID()];silicon=unemagcyborgs'>Unemag</a>"
sections["silicon"] = memory_edit_silicon()
/*
This prioritizes antags relevant to the current round to make them appear at the top of the panel.
Traitorchan and traitorvamp are snowflaked in because they have multiple sections.
*/
if(ticker.mode.config_tag == "traitorchan")
if(sections["traitor"])
out += sections["traitor"]+"<br>"
out += sections["traitor"] + "<br>"
if(sections["changeling"])
out += sections["changeling"]+"<br>"
out += sections["changeling"] + "<br>"
sections -= "traitor"
sections -= "changeling"
if(ticker.mode.config_tag == "traitorvamp")
// Elif technically unnecessary but it makes the following else look better
else if(ticker.mode.config_tag == "traitorvamp")
if(sections["traitor"])
out += sections["traitor"]+"<br>"
out += sections["traitor"] + "<br>"
if(sections["vampire"])
out += sections["vampire"]+"<br>"
out += sections["vampire"] + "<br>"
sections -= "traitor"
sections -= "vampire"
else
if(sections[ticker.mode.config_tag])
out += sections[ticker.mode.config_tag]+"<br>"
out += sections[ticker.mode.config_tag] + "<br>"
sections -= ticker.mode.config_tag
for(var/i in sections)
if(sections[i])
out += sections[i]+"<br>"
if(((src in ticker.mode.head_revolutionaries) || \
(src in ticker.mode.traitors) || \
(src in ticker.mode.syndicates)) && \
ishuman(current) )
text = "Uplink: <a href='?src=[UID()];common=uplink'>give</a>"
var/obj/item/uplink/hidden/suplink = find_syndicate_uplink()
var/crystals
if(suplink)
crystals = suplink.uses
if(suplink)
text += "|<a href='?src=[UID()];common=takeuplink'>take</a>"
if(usr.client.holder.rights & (R_SERVER|R_EVENT))
text += ", <a href='?src=[UID()];common=crystals'>[crystals]</a> crystals"
else
text += ", [crystals] crystals"
text += "." //hiel grammar
out += text
out += sections[i] + "<br>"
out += memory_edit_uplink()
out += "<br>"
out += "<b>Memory:</b><br>"
@@ -456,14 +413,9 @@
if(objectives.len == 0)
out += "EMPTY<br>"
else
var/obj_count = 1
for(var/datum/objective/objective in objectives)
out += "<B>[obj_count]</B>: [objective.explanation_text] <a href='?src=[UID()];obj_edit=\ref[objective]'>Edit</a> <a href='?src=[UID()];obj_delete=\ref[objective]'>Delete</a> <a href='?src=[UID()];obj_completed=\ref[objective]'><font color=[objective.completed ? "green" : "red"]>Toggle Completion</font></a><br>"
obj_count++
out += gen_objective_text(admin = TRUE)
out += "<a href='?src=[UID()];obj_add=1'>Add objective</a><br><br>"
out += "<a href='?src=[UID()];obj_announce=1'>Announce objectives</a><br><br>"
usr << browse(out, "window=edit_memory[src];size=400x500")
/datum/mind/Topic(href, href_list)
@@ -471,7 +423,7 @@
return
if(href_list["role_edit"])
var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in joblist
var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in GLOB.joblist
if(!new_role)
return
assigned_role = new_role
@@ -479,10 +431,11 @@
message_admins("[key_name_admin(usr)] has changed [key_name_admin(current)]'s assigned role to [assigned_role]")
else if(href_list["memory_edit"])
var/new_memo = copytext(input("Write new memory", "Memory", memory) as null|message,1,MAX_MESSAGE_LEN)
if(isnull(new_memo))
var/messageinput = input("Write new memory", "Memory", memory) as null|message
if(isnull(messageinput))
return
var/confirmed = alert(usr, "Are you sure?", "Edit Memory", "Yes", "No")
var/new_memo = copytext(messageinput, 1,MAX_MESSAGE_LEN)
var/confirmed = alert(usr, "Are you sure you want to edit their memory? It will wipe out their original memory!", "Edit Memory", "Yes", "No")
if(confirmed == "Yes") // Because it is too easy to accidentally wipe someone's memory
memory = new_memo
log_admin("[key_name(usr)] has edited [key_name(current)]'s memory")
@@ -1028,7 +981,7 @@
if("tellcode")
var/code
for(var/obj/machinery/nuclearbomb/bombue in machines)
for(var/obj/machinery/nuclearbomb/bombue in GLOB.machines)
if(length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN")
code = bombue.r_code
break
@@ -1283,12 +1236,9 @@
return A
/datum/mind/proc/announce_objectives()
var/obj_count = 1
to_chat(current, "<span class='notice'>Your current objectives:</span>")
for(var/objective in objectives)
var/datum/objective/O = objective
to_chat(current, "<B>Objective #[obj_count]</B>: [O.explanation_text]")
obj_count++
for(var/line in splittext(gen_objective_text(), "<br>"))
to_chat(current, line)
/datum/mind/proc/find_syndicate_uplink()
var/list/L = current.get_contents()
@@ -1349,7 +1299,7 @@
special_role = SPECIAL_ROLE_VAMPIRE
ticker.mode.forge_vampire_objectives(src)
ticker.mode.greet_vampire(src)
ticker.mode.update_change_icons_added(src)
ticker.mode.update_vampire_icons_added(src)
/datum/mind/proc/make_Changeling()
if(!(src in ticker.mode.changelings))
@@ -1438,7 +1388,7 @@
var/list/obj/effect/landmark/abductor/scientist_landmarks = new
agent_landmarks.len = 4
scientist_landmarks.len = 4
for(var/obj/effect/landmark/abductor/A in landmarks_list)
for(var/obj/effect/landmark/abductor/A in GLOB.landmarks_list)
if(istype(A, /obj/effect/landmark/abductor/agent))
agent_landmarks[text2num(A.team)] = A
else if(istype(A, /obj/effect/landmark/abductor/scientist))
@@ -1496,7 +1446,7 @@
S.action.Grant(new_character)
/datum/mind/proc/get_ghost(even_if_they_cant_reenter)
for(var/mob/dead/observer/G in dead_mob_list)
for(var/mob/dead/observer/G in GLOB.dead_mob_list)
if(G.mind == src)
if(G.can_reenter_corpse || even_if_they_cant_reenter)
return G
@@ -1674,4 +1624,4 @@
/mob/living/simple_animal/construct/armoured/mind_initialize()
..()
mind.assigned_role = "Juggernaut"
mind.special_role = SPECIAL_ROLE_CULTIST
mind.special_role = SPECIAL_ROLE_CULTIST
+8 -6
View File
@@ -89,12 +89,9 @@
for(var/path in backpack_contents)
var/number = backpack_contents[path]
for(var/i = 0, i < number, i++)
equip_item(H, path, slot_in_backpack)
if(implants)
for(var/path in implants)
var/obj/item/implant/I = new path(H)
I.implant(H)
for(var/i in 1 to number)
H.equip_or_collect(new path(H), slot_in_backpack)
for(var/path in cybernetic_implants)
var/obj/item/organ/internal/O = new path(H)
O.insert(H)
@@ -107,6 +104,11 @@
H.internal = H.get_item_by_slot(internals_slot)
H.update_action_buttons_icon()
if(implants)
for(var/implant_type in implants)
var/obj/item/implant/I = new implant_type(H)
I.implant(H, null)
H.update_body()
return 1
+2 -2
View File
@@ -669,9 +669,9 @@
return
if(is_tsf_lieutenant)
H.real_name = "Lieutenant [pick(last_names)]"
H.real_name = "Lieutenant [pick(GLOB.last_names)]"
else
H.real_name = "[pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant First Class", "Master Sergeant", "Sergeant Major")] [pick(last_names)]"
H.real_name = "[pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant First Class", "Master Sergeant", "Sergeant Major")] [pick(GLOB.last_names)]"
H.name = H.real_name
var/obj/item/card/id/I = H.wear_id
if(istype(I))
+13 -14
View File
@@ -53,19 +53,18 @@
return -1
return .
/datum/recipe/proc/check_items(obj/container) //1=precisely, 0=insufficiently, -1=superfluous
if(!items)
if(locate(/obj/) in container)
return -1
else
return 1
/datum/recipe/proc/check_items(obj/container, list/ignored_items = null) //1=precisely, 0=insufficiently, -1=superfluous
. = 1
var/list/checklist = items.Copy()
var/list/checklist = items ? items.Copy() : list()
for(var/obj/O in container)
if(ignored_items && is_type_in_list(O, ignored_items)) //skip if this is something we are ignoring
continue
if(!items)
return -1
var/found = 0
for(var/type in checklist)
if(istype(O,type))
checklist-=type
checklist -= type
found = 1
break
if(!found)
@@ -95,16 +94,16 @@
container.reagents.clear_reagents()
return result_obj
/proc/select_recipe(list/datum/recipe/avaiable_recipes, obj/obj, exact = 1 as num)
/proc/select_recipe(list/datum/recipe/available_recipes, obj/obj, exact = 1 as num, list/ignored_items = null)
if(!exact)
exact = -1
var/list/datum/recipe/possible_recipes = new
for(var/datum/recipe/recipe in avaiable_recipes)
if(recipe.check_reagents(obj.reagents)==exact && recipe.check_items(obj)==exact)
possible_recipes+=recipe
if(possible_recipes.len==0)
for(var/datum/recipe/recipe in available_recipes)
if(recipe.check_reagents(obj.reagents) == exact && recipe.check_items(obj, ignored_items) == exact)
possible_recipes += recipe
if(possible_recipes.len == 0)
return null
else if(possible_recipes.len==1)
else if(possible_recipes.len == 1)
return possible_recipes[1]
else //okay, let's select the most complicated recipe
var/r_count = 0
+27 -13
View File
@@ -146,7 +146,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
if(!istype(H.shoes, /obj/item/clothing/shoes/sandal))
to_chat(user, "<span class='notice'>I don't feel strong enough without my sandals.</span>")
return 0
if(!istype(H.head, /obj/item/clothing/head/wizard) && !istype(H.head, /obj/item/clothing/head/helmet/space/hardsuit/wizard) && !istype(H.wear_suit, /obj/item/clothing/head/helmet/space/eva/plasmaman/wizard))
if(!istype(H.head, /obj/item/clothing/head/wizard) && !istype(H.head, /obj/item/clothing/head/helmet/space/hardsuit/wizard) && !istype(H.head, /obj/item/clothing/head/helmet/space/eva/plasmaman/wizard))
to_chat(user, "<span class='notice'>I don't feel strong enough without my hat.</span>")
return 0
else if(!ishuman(user))
@@ -261,9 +261,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
if(istype(target,/mob/living) && message)
to_chat(target, text("[message]"))
if(sparks_spread)
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread()
sparks.set_up(sparks_amt, 0, location) //no idea what the 0 is
sparks.start()
do_sparks(sparks_amt, 0, location)
if(smoke_spread)
if(smoke_spread == 1)
var/datum/effect_system/smoke_spread/smoke = new
@@ -321,7 +319,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/include_user = 0 //if it includes usr in the target list
var/random_target = 0 // chooses random viable target instead of asking the caster
var/random_target_priority = TARGET_CLOSEST // if random_target is enabled how it will pick the target
var/humans_only = 0 //for avoiding simple animals and only doing "human" mobs, 0 = all mobs, 1 = humans only
/obj/effect/proc_holder/spell/aoe_turf //affects all turfs in view or range (depends)
var/inner_radius = -1 //for all your ring spell needs
@@ -331,18 +329,30 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
switch(max_targets)
if(0) //unlimited
for(var/mob/living/target in view_or_range(range, user, selection_type))
targets += target
if(!humans_only)
for(var/mob/living/target in view_or_range(range, user, selection_type))
targets += target
else
for(var/mob/living/carbon/human/target in view_or_range(range, user, selection_type))
targets += target
if(1) //single target can be picked
if(range < 0)
targets += user
else
var/possible_targets = list()
for(var/mob/living/M in view_or_range(range, user, selection_type))
if(!include_user && user == M)
continue
possible_targets += M
if(!humans_only)
for(var/mob/living/M in view_or_range(range, user, selection_type))
if(!include_user && user == M)
continue
possible_targets += M
else
for(var/mob/living/carbon/human/M in view_or_range(range, user, selection_type))
if(!include_user && user == M)
continue
possible_targets += M
//targets += input("Choose the target for the spell.", "Targeting") as mob in possible_targets
//Adds a safety check post-input to make sure those targets are actually in range.
@@ -366,8 +376,12 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
else
var/list/possible_targets = list()
for(var/mob/living/target in view_or_range(range, user, selection_type))
possible_targets += target
if(!humans_only)
for(var/mob/living/target in view_or_range(range, user, selection_type))
possible_targets += target
else
for(var/mob/living/carbon/human/target in view_or_range(range, user, selection_type))
possible_targets += target
for(var/i=1,i<=max_targets,i++)
if(!possible_targets.len)
break
+25 -1
View File
@@ -30,4 +30,28 @@
SC.locked = 0
C.open()
return
return
/obj/effect/proc_holder/spell/aoe_turf/knock/greater
name = "Greater Knock"
desc = "On first cast, will remove access restrictions on all airlocks on the station, and announce this spell's use to the station. On any further cast, will open all doors in sight. Cannot be refunded once bought!"
charge_max = 200
invocation = "MAIOR OXIN FIERA"
invocation_type = "shout"
range = 7
level_max = 0 //Cannot be improved, quality of life since can't be refunded
cooldown_min = 200
var/used = FALSE
/obj/effect/proc_holder/spell/aoe_turf/knock/greater/cast(list/targets, mob/user = usr)
if(!used)
used = TRUE
for(var/obj/machinery/door/airlock/A in GLOB.airlocks)
if(is_station_level(A.z))
A.req_access = list()
A.req_one_access = list()
command_announcement.Announce("We have removed all access requirements on your station's airlocks. You can thank us later!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message")
else
..()
return
+1
View File
@@ -68,6 +68,7 @@ Also, you never added distance checking after target is selected. I've went ahea
ghost.mind.transfer_to(caster)
if(ghost.key)
GLOB.non_respawnable_keys -= ghost.ckey //ghostizing with an argument of 0 will make them unable to respawn forever, which is bad
caster.key = ghost.key //have to transfer the key since the mind was not active
qdel(ghost)
+3 -2
View File
@@ -93,9 +93,10 @@
var/obj/machinery/portable_atmospherics/P = item_to_retrive.loc
P.disconnect()
P.update_icon()
if(istype(item_to_retrive.loc, /obj/structure/disposalholder) || istype(item_to_retrive.loc, /obj/machinery/disposal))//fixes the breaking of disposals. No more bluespace connected disposal bins!
break
item_to_retrive = item_to_retrive.loc
infinite_recursion += 1
if(!item_to_retrive)
+2 -2
View File
@@ -32,11 +32,11 @@
var/obj/screen/alert/status_effect/A = owner.throw_alert(id, alert_type)
A.attached_effect = src //so the alert can reference us, if it needs to
linked_alert = A //so we can reference the alert, if we need to
fast_processing.Add(src)
GLOB.fast_processing.Add(src)
return TRUE
/datum/status_effect/Destroy()
fast_processing.Remove(src)
GLOB.fast_processing.Remove(src)
if(owner)
owner.clear_alert(id)
LAZYREMOVE(owner.status_effects, src)
+2
View File
@@ -943,6 +943,8 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
/obj/item/reagent_containers/food/condiment/peppermill,
/obj/item/kitchen/rollingpin,
/obj/item/storage/fancy/egg_box,
/obj/item/mixing_bowl,
/obj/item/mixing_bowl,
/obj/item/reagent_containers/food/condiment/enzyme,
/obj/item/reagent_containers/food/condiment/sugar,
/obj/item/reagent_containers/food/snacks/meat/monkey,
+13 -3
View File
@@ -214,13 +214,13 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
/datum/uplink_item/jobspecific/rad_laser
name = "Radiation Laser"
desc = "A radiation laser concealed inside of a Health Analyser. After a moderate delay, causes temporary collapse and radiation. Has adjustable controls, but will not function as a regular health analyser, only appears like one. May not function correctly on radiation resistant humanoids!"
desc = "A radiation laser concealed inside of a Health Analyzer. After a moderate delay, causes temporary collapse and radiation. Has adjustable controls, but will not function as a regular health analyzer, only appears like one. May not function correctly on radiation resistant humanoids!"
reference = "RL"
item = /obj/item/rad_laser
cost = 5
job = list("Chief Medical Officer", "Medical Doctor", "Geneticist", "Psychiatrist", "Chemist", "Paramedic", "Coroner", "Virologist")
/datum/uplink_item/dangerous/cat_grenade
/datum/uplink_item/jobspecific/cat_grenade
name = "Feral Cat Delivery Grenade"
desc = "The feral cat delivery grenade contains 8 dehydrated feral cats in a similar manner to dehydrated monkeys, which, upon detonation, will be rehydrated by a small reservoir of water contained within the grenade. These cats will then attack anything in sight."
item = /obj/item/grenade/spawnergrenade/feral_cats
@@ -352,7 +352,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
item = /obj/item/pen/poison
cost = 2
excludefrom = list(/datum/game_mode/nuclear)
job = list("Head of Personnel", "Quartermaster", "Cargo Technician")
job = list("Head of Personnel", "Quartermaster", "Cargo Technician", "Librarian")
// DANGEROUS WEAPONS
@@ -500,6 +500,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
reference = "AGG"
item = /obj/item/storage/box/syndie_kit/atmosgasgrenades
cost = 11
surplus = 0
/datum/uplink_item/dangerous/emp
name = "EMP Grenades and Implanter Kit"
@@ -959,6 +960,15 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
cost = 1
surplus = 20
/datum/uplink_item/stealthy_tools/clownkit
name = "Honk Brand Infiltration Kit"
desc = "All the tools you need to play the best prank Nanotrasen has ever seen. Includes a voice changer clown mask, magnetic clown shoes, and standard clown outfit, tools, and backpack."
reference = "HBIK"
item = /obj/item/storage/backpack/clown/syndie
cost = 6
gamemodes = list(/datum/game_mode/nuclear)
surplus = 0
// DEVICE AND TOOLS
/datum/uplink_item/device_tools
+3 -3
View File
@@ -60,7 +60,7 @@
weather_duration = rand(weather_duration_lower, weather_duration_upper)
START_PROCESSING(SSweather, src)
update_areas()
for(var/M in player_list)
for(var/M in GLOB.player_list)
var/turf/mob_turf = get_turf(M)
if(mob_turf && (mob_turf.z in impacted_z_levels))
if(telegraph_message)
@@ -74,7 +74,7 @@
return
stage = MAIN_STAGE
update_areas()
for(var/M in player_list)
for(var/M in GLOB.player_list)
var/turf/mob_turf = get_turf(M)
if(mob_turf && (mob_turf.z in impacted_z_levels))
if(weather_message)
@@ -88,7 +88,7 @@
return
stage = WIND_DOWN_STAGE
update_areas()
for(var/M in player_list)
for(var/M in GLOB.player_list)
var/turf/mob_turf = get_turf(M)
if(mob_turf && (mob_turf.z in impacted_z_levels))
if(end_message)
@@ -26,7 +26,7 @@
if(issilicon(L))
return
for(var/obj/structure/O in L.loc)
if(O.density || O.buckled_mob && istype(O, /obj/structure/stool/bed))
if(O.density || O.buckled_mob && istype(O, /obj/structure/bed))
return
if(L.loc.density)
return
@@ -36,4 +36,4 @@
/datum/weather/floor_is_lava/fake
name = "the floor is lava (fake)"
aesthetic = TRUE
aesthetic = TRUE