Merge branch 'master' into upstream-merge-33246
This commit is contained in:
@@ -29,8 +29,8 @@
|
||||
|
||||
/datum/round_event_control/New()
|
||||
if(config && !wizardevent) // Magic is unaffected by configs
|
||||
earliest_start = Ceiling(earliest_start * CONFIG_GET(number/events_min_time_mul))
|
||||
min_players = Ceiling(min_players * CONFIG_GET(number/events_min_players_mul))
|
||||
earliest_start = CEILING(earliest_start * CONFIG_GET(number/events_min_time_mul), 1)
|
||||
min_players = CEILING(min_players * CONFIG_GET(number/events_min_players_mul), 1)
|
||||
|
||||
/datum/round_event_control/wizard
|
||||
wizardevent = 1
|
||||
|
||||
@@ -67,12 +67,12 @@
|
||||
|
||||
kill()
|
||||
return
|
||||
if(IsMultiple(activeFor, 4))
|
||||
if(ISMULTIPLE(activeFor, 4))
|
||||
var/obj/machinery/vending/rebel = pick(vendingMachines)
|
||||
vendingMachines.Remove(rebel)
|
||||
infectedMachines.Add(rebel)
|
||||
rebel.shut_up = 0
|
||||
rebel.shoot_inventory = 1
|
||||
|
||||
if(IsMultiple(activeFor, 8))
|
||||
if(ISMULTIPLE(activeFor, 8))
|
||||
originMachine.speak(pick(rampant_speeches))
|
||||
@@ -10,22 +10,30 @@
|
||||
|
||||
var/virus_type
|
||||
|
||||
var/max_severity = 3
|
||||
|
||||
/datum/round_event/disease_outbreak/announce(fake)
|
||||
|
||||
/datum/round_event/disease_outbreak/announce()
|
||||
priority_announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/ai/outbreak7.ogg')
|
||||
|
||||
/datum/round_event/disease_outbreak/setup()
|
||||
announceWhen = rand(15, 30)
|
||||
|
||||
|
||||
/datum/round_event/disease_outbreak/start()
|
||||
if(!virus_type)
|
||||
var/advanced_virus = FALSE
|
||||
max_severity = 3 + max(FLOOR((world.time - control.earliest_start)/6000, 1),0) //3 symptoms at 20 minutes, plus 1 per 10 minutes
|
||||
if(prob(20 + (10 * max_severity)))
|
||||
advanced_virus = TRUE
|
||||
|
||||
if(!virus_type && !advanced_virus)
|
||||
virus_type = pick(/datum/disease/dnaspread, /datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis)
|
||||
|
||||
for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
continue
|
||||
if(!(T.z in GLOB.station_z_levels))
|
||||
if(T.z != ZLEVEL_STATION_PRIMARY)
|
||||
continue
|
||||
if(!H.client)
|
||||
continue
|
||||
@@ -41,16 +49,48 @@
|
||||
continue
|
||||
|
||||
var/datum/disease/D
|
||||
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
|
||||
if(!H.dna || (H.disabilities & BLIND)) //A blindness disease would be the worst.
|
||||
continue
|
||||
D = new virus_type()
|
||||
var/datum/disease/dnaspread/DS = D
|
||||
DS.strain_data["name"] = H.real_name
|
||||
DS.strain_data["UI"] = H.dna.uni_identity
|
||||
DS.strain_data["SE"] = H.dna.struc_enzymes
|
||||
if(!advanced_virus)
|
||||
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
|
||||
if(!H.dna || (H.disabilities & BLIND)) //A blindness disease would be the worst.
|
||||
continue
|
||||
D = new virus_type()
|
||||
var/datum/disease/dnaspread/DS = D
|
||||
DS.strain_data["name"] = H.real_name
|
||||
DS.strain_data["UI"] = H.dna.uni_identity
|
||||
DS.strain_data["SE"] = H.dna.struc_enzymes
|
||||
else
|
||||
D = new virus_type()
|
||||
else
|
||||
D = new virus_type()
|
||||
D = make_virus(max_severity, max_severity)
|
||||
D.carrier = TRUE
|
||||
H.AddDisease(D)
|
||||
break
|
||||
|
||||
if(advanced_virus)
|
||||
var/datum/disease/advance/A = D
|
||||
var/list/name_symptoms = list() //for feedback
|
||||
for(var/datum/symptom/S in A.symptoms)
|
||||
name_symptoms += S.name
|
||||
message_admins("An event has triggered a random advanced virus outbreak on [key_name_admin(H)]! It has these symptoms: [english_list(name_symptoms)]")
|
||||
log_game("An event has triggered a random advanced virus outbreak on [key_name(H)]! It has these symptoms: [english_list(name_symptoms)]")
|
||||
break
|
||||
|
||||
/datum/round_event/disease_outbreak/proc/make_virus(max_symptoms, max_level)
|
||||
if(max_symptoms > SYMPTOM_LIMIT)
|
||||
max_symptoms = SYMPTOM_LIMIT
|
||||
var/datum/disease/advance/A = new(FALSE, null)
|
||||
A.symptoms = list()
|
||||
var/list/datum/symptom/possible_symptoms = list()
|
||||
for(var/symptom in subtypesof(/datum/symptom))
|
||||
var/datum/symptom/S = symptom
|
||||
if(initial(S.level) > max_level)
|
||||
continue
|
||||
if(initial(S.level) <= 0) //unobtainable symptoms
|
||||
continue
|
||||
possible_symptoms += S
|
||||
for(var/i in 1 to max_symptoms)
|
||||
var/datum/symptom/chosen_symptom = pick_n_take(possible_symptoms)
|
||||
if(chosen_symptom)
|
||||
var/datum/symptom/S = new chosen_symptom
|
||||
A.symptoms += S
|
||||
A.Refresh() //just in case someone already made and named the same disease
|
||||
return A
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
priority_announce("Meteors have been detected on collision course with the station.", "Meteor Alert", 'sound/ai/meteors.ogg')
|
||||
|
||||
/datum/round_event/meteor_wave/tick()
|
||||
if(IsMultiple(activeFor, 3))
|
||||
if(ISMULTIPLE(activeFor, 3))
|
||||
spawn_meteors(5, wave_type) //meteor list types defined in gamemode/meteor/meteors.dm
|
||||
|
||||
/datum/round_event_control/meteor_wave/threatening
|
||||
|
||||
@@ -27,31 +27,13 @@
|
||||
A.copy_to(operative)
|
||||
operative.dna.update_dna_identity()
|
||||
|
||||
operative.equipOutfit(/datum/outfit/syndicate/full)
|
||||
|
||||
var/datum/mind/Mind = new /datum/mind(selected.key)
|
||||
Mind.assigned_role = "Lone Operative"
|
||||
Mind.special_role = "Lone Operative"
|
||||
SSticker.mode.traitors |= Mind
|
||||
Mind.active = 1
|
||||
|
||||
var/obj/machinery/nuclearbomb/selfdestruct/nuke = locate() in GLOB.machines
|
||||
if(nuke)
|
||||
var/nuke_code
|
||||
if(!nuke.r_code || nuke.r_code == "ADMIN")
|
||||
nuke_code = random_nukecode()
|
||||
nuke.r_code = nuke_code
|
||||
else
|
||||
nuke_code = nuke.r_code
|
||||
|
||||
Mind.store_memory("<B>Station Self-Destruct Device Code</B>: [nuke_code]", 0, 0)
|
||||
to_chat(Mind.current, "The nuclear authorization code is: <B>[nuke_code]</B>")
|
||||
|
||||
var/datum/objective/nuclear/O = new()
|
||||
O.owner = Mind
|
||||
Mind.objectives += O
|
||||
|
||||
Mind.transfer_to(operative)
|
||||
Mind.add_antag_datum(/datum/antagonist/nukeop/lone)
|
||||
|
||||
message_admins("[key_name_admin(operative)] has been made into lone operative by an event.")
|
||||
log_game("[key_name(operative)] was spawned as a lone operative by an event.")
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/datum/round_event/pirates/announce()
|
||||
priority_announce("Incoming subspace communication. Secure channel opened at all communication consoles.", "Incoming Message", 'sound/ai/commandreport.ogg')
|
||||
|
||||
|
||||
if(!control) //Means this is false alarm, todo : explicit checks instead of using announceWhen
|
||||
return
|
||||
threat = new
|
||||
@@ -45,7 +45,7 @@
|
||||
if(!shuttle_spawned)
|
||||
spawn_shuttle()
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/round_event/pirates/start()
|
||||
if(!paid_off && !shuttle_spawned)
|
||||
@@ -64,7 +64,7 @@
|
||||
var/turf/T = locate(x,y,z)
|
||||
if(!T)
|
||||
CRASH("Pirate event found no turf to load in")
|
||||
|
||||
|
||||
if(!ship.load(T))
|
||||
CRASH("Loading pirate ship failed!")
|
||||
for(var/turf/A in ship.get_affected_turfs(T))
|
||||
@@ -75,7 +75,7 @@
|
||||
candidates -= M
|
||||
else
|
||||
notify_ghosts("Space pirates are waking up!", source = spawner, action=NOTIFY_ATTACK, flashwindow = FALSE)
|
||||
|
||||
|
||||
priority_announce("Unidentified armed ship detected near the station.")
|
||||
|
||||
//Shuttle equipment
|
||||
@@ -104,7 +104,7 @@
|
||||
var/siphoned = min(SSshuttle.points,siphon_per_tick)
|
||||
SSshuttle.points -= siphoned
|
||||
credits_stored += siphoned
|
||||
steal_tech()
|
||||
interrupt_research()
|
||||
else
|
||||
return
|
||||
else
|
||||
@@ -130,23 +130,12 @@
|
||||
else
|
||||
dump_loot(user)
|
||||
|
||||
//20% to sap tech levels on unlocked consoles
|
||||
/obj/machinery/shuttle_scrambler/proc/steal_tech()
|
||||
if(!prob(20))
|
||||
return
|
||||
var/datum/tech/target_tech = pick(subtypesof(/datum/tech))
|
||||
var/target_id = initial(target_tech.id)
|
||||
for(var/obj/machinery/computer/rdconsole/C in GLOB.machines)
|
||||
if(C.screen == RD_CONSOLE_LOCKED_SCREEN || C.stat & (NOPOWER|BROKEN))
|
||||
continue
|
||||
var/datum/research/files = C.files
|
||||
files.LowerTech(target_id,1)
|
||||
new /obj/effect/temp_visual/emp(get_turf(C))
|
||||
for(var/obj/machinery/r_n_d/server/S in GLOB.machines)
|
||||
//interrupt_research
|
||||
/obj/machinery/shuttle_scrambler/proc/interrupt_research()
|
||||
for(var/obj/machinery/rnd/server/S in GLOB.machines)
|
||||
if(S.stat & (NOPOWER|BROKEN))
|
||||
continue
|
||||
var/datum/research/files = S.files
|
||||
files.LowerTech(target_id,1)
|
||||
S.emp_act(1)
|
||||
new /obj/effect/temp_visual/emp(get_turf(S))
|
||||
|
||||
/obj/machinery/shuttle_scrambler/proc/dump_loot(mob/user)
|
||||
@@ -157,7 +146,7 @@
|
||||
new /obj/item/stack/spacecash/c200(drop_location())
|
||||
credits_stored -= 200
|
||||
to_chat(user,"<span class='notice'>You retrieve the siphoned credits!</span>")
|
||||
|
||||
|
||||
|
||||
/obj/machinery/shuttle_scrambler/proc/send_notification()
|
||||
priority_announce("Data theft signal detected, source registered on local gps units.")
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
T = safepick(get_area_turfs(pick(station_areas)))
|
||||
hostiles_spawn += T
|
||||
|
||||
next_boss_spawn = startWhen + Ceiling(2 * number_of_hostiles / number_of_bosses)
|
||||
next_boss_spawn = startWhen + CEILING(2 * number_of_hostiles / number_of_bosses, 1)
|
||||
|
||||
/datum/round_event/portal_storm/announce(fake)
|
||||
set waitfor = 0
|
||||
@@ -117,14 +117,14 @@
|
||||
/datum/round_event/portal_storm/proc/spawn_hostile()
|
||||
if(!hostile_types || !hostile_types.len)
|
||||
return 0
|
||||
return IsMultiple(activeFor, 2)
|
||||
return ISMULTIPLE(activeFor, 2)
|
||||
|
||||
/datum/round_event/portal_storm/proc/spawn_boss()
|
||||
if(!boss_types || !boss_types.len)
|
||||
return 0
|
||||
|
||||
if(activeFor == next_boss_spawn)
|
||||
next_boss_spawn += Ceiling(number_of_hostiles / number_of_bosses)
|
||||
next_boss_spawn += CEILING(number_of_hostiles / number_of_bosses, 1)
|
||||
return 1
|
||||
|
||||
/datum/round_event/portal_storm/proc/time_to_end()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
for(var/speciestype in subtypesof(/datum/species))
|
||||
var/datum/species/S = new speciestype()
|
||||
if(!S.dangerous_existence)
|
||||
if(!S.dangerous_existence && !S.blacklisted)
|
||||
all_species += speciestype
|
||||
|
||||
var/datum/species/new_species = pick(all_species)
|
||||
|
||||
Reference in New Issue
Block a user