April sync (#360)
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
|
||||
/datum/objective/proc/get_crewmember_minds()
|
||||
. = list()
|
||||
for(var/V in data_core.locked)
|
||||
for(var/V in GLOB.data_core.locked)
|
||||
var/datum/data/record/R = V
|
||||
var/mob/M = R.fields["reference"]
|
||||
if(M && M.mind)
|
||||
@@ -246,7 +246,7 @@
|
||||
|
||||
var/area/A = SSshuttle.emergency.areaInstance
|
||||
|
||||
for(var/mob/living/player in player_list) //Make sure nobody else is onboard
|
||||
for(var/mob/living/player in GLOB.player_list) //Make sure nobody else is onboard
|
||||
if(player.mind && player.mind != owner)
|
||||
if(player.stat != DEAD)
|
||||
if(issilicon(player)) //Borgs are technically dead anyways
|
||||
@@ -260,7 +260,7 @@
|
||||
if(player.real_name != owner.current.real_name && !istype(location, /turf/open/floor/plasteel/shuttle/red) && !istype(location, /turf/open/floor/mineral/plastitanium/brig))
|
||||
return 0
|
||||
|
||||
for(var/mob/living/player in player_list) //Make sure at least one of you is onboard
|
||||
for(var/mob/living/player in GLOB.player_list) //Make sure at least one of you is onboard
|
||||
if(player.mind && player.mind != owner)
|
||||
if(player.stat != DEAD)
|
||||
if(issilicon(player)) //Borgs are technically dead anyways
|
||||
@@ -288,7 +288,7 @@
|
||||
|
||||
var/area/A = SSshuttle.emergency.areaInstance
|
||||
|
||||
for(var/mob/living/player in player_list)
|
||||
for(var/mob/living/player in GLOB.player_list)
|
||||
if(issilicon(player))
|
||||
continue
|
||||
if(player.mind)
|
||||
@@ -310,7 +310,7 @@
|
||||
|
||||
var/area/A = SSshuttle.emergency.areaInstance
|
||||
|
||||
for(var/mob/living/player in player_list)
|
||||
for(var/mob/living/player in GLOB.player_list)
|
||||
if(get_area(player) == A && player.mind && player.stat != DEAD && ishuman(player))
|
||||
var/mob/living/carbon/human/H = player
|
||||
if(H.dna.species.id != "human")
|
||||
@@ -350,9 +350,9 @@
|
||||
return 0
|
||||
if(!owner.current || owner.current.stat == DEAD)
|
||||
return 0
|
||||
if(ticker.force_ending) //This one isn't their fault, so lets just assume good faith
|
||||
if(SSticker.force_ending) //This one isn't their fault, so lets just assume good faith
|
||||
return 1
|
||||
if(ticker.mode.station_was_nuked) //If they escaped the blast somehow, let them win
|
||||
if(SSticker.mode.station_was_nuked) //If they escaped the blast somehow, let them win
|
||||
return 1
|
||||
if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME)
|
||||
return 0
|
||||
@@ -435,12 +435,11 @@
|
||||
martyr_compatible = 1
|
||||
|
||||
/datum/objective/nuclear/check_completion()
|
||||
if(ticker && ticker.mode && ticker.mode.station_was_nuked)
|
||||
if(SSticker && SSticker.mode && SSticker.mode.station_was_nuked)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
var/global/list/possible_items = list()
|
||||
GLOBAL_LIST_EMPTY(possible_items)
|
||||
/datum/objective/steal
|
||||
var/datum/objective_item/targetinfo = null //Save the chosen item datum so we can access it later.
|
||||
var/obj/item/steal_target = null //Needed for custom objectives (they're just items, not datums).
|
||||
@@ -452,12 +451,12 @@ var/global/list/possible_items = list()
|
||||
|
||||
/datum/objective/steal/New()
|
||||
..()
|
||||
if(!possible_items.len)//Only need to fill the list when it's needed.
|
||||
init_subtypes(/datum/objective_item/steal,possible_items)
|
||||
if(!GLOB.possible_items.len)//Only need to fill the list when it's needed.
|
||||
init_subtypes(/datum/objective_item/steal,GLOB.possible_items)
|
||||
|
||||
/datum/objective/steal/find_target()
|
||||
var/approved_targets = list()
|
||||
for(var/datum/objective_item/possible_item in possible_items)
|
||||
for(var/datum/objective_item/possible_item in GLOB.possible_items)
|
||||
if(is_unique_objective(possible_item.targetitem) && !(owner.current.mind.assigned_role in possible_item.excludefromjob))
|
||||
approved_targets += possible_item
|
||||
return set_target(safepick(approved_targets))
|
||||
@@ -476,16 +475,14 @@ var/global/list/possible_items = list()
|
||||
return
|
||||
|
||||
/datum/objective/steal/proc/select_target() //For admins setting objectives manually.
|
||||
var/list/possible_items_all = possible_items+"custom"
|
||||
var/list/possible_items_all = GLOB.possible_items+"custom"
|
||||
var/new_target = input("Select target:", "Objective target", steal_target) as null|anything in possible_items_all
|
||||
if (!new_target) return
|
||||
|
||||
if (new_target == "custom") //Can set custom items.
|
||||
var/obj/item/custom_target = input("Select type:","Type") as null|anything in typesof(/obj/item)
|
||||
if (!custom_target) return
|
||||
var/tmp_obj = new custom_target
|
||||
var/custom_name = tmp_obj:name
|
||||
qdel(tmp_obj)
|
||||
var/custom_name = initial(custom_target.name)
|
||||
custom_name = stripped_input("Enter target name:", "Objective target", custom_name)
|
||||
if (!custom_name) return
|
||||
steal_target = custom_target
|
||||
@@ -524,19 +521,17 @@ var/global/list/possible_items = list()
|
||||
H.equip_in_one_of_slots(O, slots)
|
||||
|
||||
|
||||
var/global/list/possible_items_special = list()
|
||||
GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
/datum/objective/steal/special //ninjas are so special they get their own subtype good for them
|
||||
|
||||
/datum/objective/steal/special/New()
|
||||
..()
|
||||
if(!possible_items_special.len)
|
||||
init_subtypes(/datum/objective_item/special,possible_items)
|
||||
init_subtypes(/datum/objective_item/stack,possible_items)
|
||||
if(!GLOB.possible_items_special.len)
|
||||
init_subtypes(/datum/objective_item/special,GLOB.possible_items_special)
|
||||
init_subtypes(/datum/objective_item/stack,GLOB.possible_items_special)
|
||||
|
||||
/datum/objective/steal/special/find_target()
|
||||
return set_target(pick(possible_items_special))
|
||||
|
||||
|
||||
return set_target(pick(GLOB.possible_items_special))
|
||||
|
||||
/datum/objective/steal/exchange
|
||||
dangerrating = 10
|
||||
@@ -653,15 +648,15 @@ var/global/list/possible_items_special = list()
|
||||
|
||||
/datum/objective/absorb/proc/gen_amount_goal(lowbound = 4, highbound = 6)
|
||||
target_amount = rand (lowbound,highbound)
|
||||
if (ticker)
|
||||
if (SSticker)
|
||||
var/n_p = 1 //autowin
|
||||
if (ticker.current_state == GAME_STATE_SETTING_UP)
|
||||
for(var/mob/dead/new_player/P in player_list)
|
||||
if (SSticker.current_state == GAME_STATE_SETTING_UP)
|
||||
for(var/mob/dead/new_player/P in GLOB.player_list)
|
||||
if(P.client && P.ready && P.mind!=owner)
|
||||
n_p ++
|
||||
else if (ticker.current_state == GAME_STATE_PLAYING)
|
||||
for(var/mob/living/carbon/human/P in player_list)
|
||||
if(P.client && !(P.mind in ticker.mode.changelings) && P.mind!=owner)
|
||||
else if (SSticker.current_state == GAME_STATE_PLAYING)
|
||||
for(var/mob/living/carbon/human/P in GLOB.player_list)
|
||||
if(P.client && !(P.mind in SSticker.mode.changelings) && P.mind!=owner)
|
||||
n_p ++
|
||||
target_amount = min(target_amount, n_p)
|
||||
|
||||
@@ -770,10 +765,10 @@ var/global/list/possible_items_special = list()
|
||||
if("Chief Medical Officer")
|
||||
department_string = "medical"
|
||||
|
||||
var/ling_count = ticker.mode.changelings
|
||||
var/ling_count = SSticker.mode.changelings
|
||||
|
||||
for(var/datum/mind/M in ticker.minds)
|
||||
if(M in ticker.mode.changelings)
|
||||
for(var/datum/mind/M in SSticker.minds)
|
||||
if(M in SSticker.mode.changelings)
|
||||
continue
|
||||
if(department_head in get_department_heads(M.assigned_role))
|
||||
if(ling_count)
|
||||
@@ -798,12 +793,12 @@ var/global/list/possible_items_special = list()
|
||||
//So at the time of writing, rand(3,6), it's also capped by the amount of lings there are
|
||||
//Because you can't fill 6 head roles with 3 lings
|
||||
|
||||
var/needed_heads = rand(min_lings,command_positions.len)
|
||||
needed_heads = min(ticker.mode.changelings.len,needed_heads)
|
||||
var/needed_heads = rand(min_lings,GLOB.command_positions.len)
|
||||
needed_heads = min(SSticker.mode.changelings.len,needed_heads)
|
||||
|
||||
var/list/heads = ticker.mode.get_living_heads()
|
||||
var/list/heads = SSticker.mode.get_living_heads()
|
||||
for(var/datum/mind/head in heads)
|
||||
if(head in ticker.mode.changelings) //Looking at you HoP.
|
||||
if(head in SSticker.mode.changelings) //Looking at you HoP.
|
||||
continue
|
||||
if(needed_heads)
|
||||
department_minds += head
|
||||
@@ -863,7 +858,7 @@ var/global/list/possible_items_special = list()
|
||||
|
||||
//Check each department member's mind to see if any of them made it to centcomm alive, if they did it's an automatic fail
|
||||
for(var/datum/mind/M in department_minds)
|
||||
if(M in ticker.mode.changelings) //Lings aren't picked for this, but let's be safe
|
||||
if(M in SSticker.mode.changelings) //Lings aren't picked for this, but let's be safe
|
||||
continue
|
||||
|
||||
if(M.current)
|
||||
@@ -874,7 +869,7 @@ var/global/list/possible_items_special = list()
|
||||
//Check each staff member has been replaced, by cross referencing changeling minds, changeling current dna, the staff minds and their original DNA names
|
||||
var/success = 0
|
||||
changelings:
|
||||
for(var/datum/mind/changeling in ticker.mode.changelings)
|
||||
for(var/datum/mind/changeling in SSticker.mode.changelings)
|
||||
if(success >= department_minds.len) //We did it, stop here!
|
||||
return 1
|
||||
if(ishuman(changeling.current))
|
||||
@@ -902,16 +897,4 @@ var/global/list/possible_items_special = list()
|
||||
command_staff_only = TRUE
|
||||
|
||||
|
||||
//Syndicate borer objective, relies on their owner getting a greentext, no matter if they themselves did anything really.
|
||||
/datum/objective/syndi_borer
|
||||
explanation_text = "You are a modified syndicate cortical borer, assist your owner with their objectives."
|
||||
martyr_compatible = 1
|
||||
|
||||
/datum/objective/syndi_borer/check_completion()
|
||||
if(target)
|
||||
for(var/datum/objective/objective in target.objectives)
|
||||
if(!objective.check_completion())
|
||||
return 0
|
||||
return 1
|
||||
else
|
||||
return 1 //Not sure if we should greentext if we somehow don't even have an owner.
|
||||
|
||||
Reference in New Issue
Block a user