mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 02:25:06 +01:00
Merge branch 'dev' into ofDryingAndRacks
This commit is contained in:
@@ -653,6 +653,7 @@ var/global/floorIsLava = 0
|
||||
<A href='?src=\ref[src];secretsfun=flicklights'>Ghost Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=retardify'>Make all players retarded</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=fakeguns'>Make all items look like guns</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=paintball'>Paintball Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=schoolgirl'>Japanese Animes Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=eagles'>Egalitarian Station Mode</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=launchshuttle'>Launch a shuttle</A><BR>
|
||||
|
||||
@@ -46,6 +46,7 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/cmd_admin_create_centcom_report,
|
||||
/client/proc/check_words, /*displays cult-words*/
|
||||
/client/proc/check_ai_laws, /*shows AI and borg laws*/
|
||||
/client/proc/rename_ai, /*properly renames the AI*/
|
||||
/client/proc/check_antagonists,
|
||||
/client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/
|
||||
/client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
|
||||
@@ -282,7 +283,7 @@ var/list/admin_verbs_mentor = list(
|
||||
if(holder.rights & R_SERVER) verbs += admin_verbs_server
|
||||
if(holder.rights & R_DEBUG)
|
||||
verbs += admin_verbs_debug
|
||||
if(config.debugparanoid && !check_rights(R_ADMIN))
|
||||
if(config.debugparanoid && !check_rights(R_ADMIN))
|
||||
verbs.Remove(admin_verbs_paranoid_debug) //Right now it's just callproc but we can easily add others later on.
|
||||
if(holder.rights & R_POSSESS) verbs += admin_verbs_possess
|
||||
if(holder.rights & R_PERMISSIONS) verbs += admin_verbs_permissions
|
||||
@@ -308,24 +309,7 @@ var/list/admin_verbs_mentor = list(
|
||||
admin_verbs_rejuv,
|
||||
admin_verbs_sounds,
|
||||
admin_verbs_spawn,
|
||||
/*Debug verbs added by "show debug verbs"*/
|
||||
/client/proc/Cell,
|
||||
/client/proc/do_not_use_these,
|
||||
/client/proc/camera_view,
|
||||
/client/proc/sec_camera_report,
|
||||
/client/proc/intercom_view,
|
||||
/client/proc/atmosscan,
|
||||
/client/proc/powerdebug,
|
||||
/client/proc/count_objects_on_z_level,
|
||||
/client/proc/count_objects_all,
|
||||
/client/proc/cmd_assume_direct_control,
|
||||
/client/proc/jump_to_dead_group,
|
||||
/client/proc/startSinglo,
|
||||
/client/proc/ticklag,
|
||||
/client/proc/cmd_admin_grantfullaccess,
|
||||
/client/proc/kaboom,
|
||||
/client/proc/splash,
|
||||
/client/proc/cmd_admin_areatest
|
||||
debug_verbs
|
||||
)
|
||||
|
||||
/client/proc/hide_most_verbs()//Allows you to keep some functionality while hiding some verbs
|
||||
@@ -608,12 +592,14 @@ var/list/admin_verbs_mentor = list(
|
||||
|
||||
var/datum/disease2/disease/D = new /datum/disease2/disease()
|
||||
|
||||
var/greater = ((input("Is this a lesser or greater disease?", "Give Disease") in list("Lesser", "Greater")) == "Greater")
|
||||
|
||||
D.makerandom(greater)
|
||||
if (!greater)
|
||||
D.infectionchance = 1
|
||||
var/severity = 1
|
||||
var/greater = input("Is this a lesser, greater, or badmin disease?", "Give Disease") in list("Lesser", "Greater", "Badmin")
|
||||
switch(greater)
|
||||
if ("Lesser") severity = 1
|
||||
if ("Greater") severity = 2
|
||||
if ("Badmin") severity = 99
|
||||
|
||||
D.makerandom(severity)
|
||||
D.infectionchance = input("How virulent is this disease? (1-100)", "Give Disease", D.infectionchance) as num
|
||||
|
||||
if(istype(T,/mob/living/carbon/human))
|
||||
@@ -626,8 +612,8 @@ var/list/admin_verbs_mentor = list(
|
||||
infect_virus2(T,D,1)
|
||||
|
||||
feedback_add_details("admin_verb","GD2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] gave [key_name(T)] a [(greater)? "greater":"lesser"] disease2 with infection chance [D.infectionchance].")
|
||||
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] a [(greater)? "greater":"lesser"] disease2 with infection chance [D.infectionchance].", 1)
|
||||
log_admin("[key_name(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].")
|
||||
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].", 1)
|
||||
|
||||
/client/proc/make_sound(var/obj/O in world) // -- TLE
|
||||
set category = "Special Verbs"
|
||||
@@ -706,6 +692,17 @@ var/list/admin_verbs_mentor = list(
|
||||
if(holder)
|
||||
src.holder.output_ai_laws()
|
||||
|
||||
/client/proc/rename_ai(mob/living/silicon/ai/AI in world)
|
||||
set name = "Rename AI"
|
||||
set category = "Admin"
|
||||
|
||||
if(holder)
|
||||
var/new_name = trim_strip_input(src, "Enter new AI name. Leave blank or as is to cancel.", "Enter new AI Name", AI.name)
|
||||
if(new_name && new_name != AI.name)
|
||||
admin_log_and_message_admins("has renamed the AI '[AI.name]' to '[new_name]'")
|
||||
AI.SetName(new_name)
|
||||
feedback_add_details("admin_verb","RAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
//---- bs12 verbs ----
|
||||
|
||||
|
||||
@@ -2399,6 +2399,16 @@
|
||||
W.item_color = "schoolgirl"
|
||||
message_admins("[key_name_admin(usr)] activated Japanese Animes mode")
|
||||
world << sound('sound/AI/animes.ogg')
|
||||
if("paintball")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","PB")
|
||||
for(var/species in all_species)
|
||||
var/datum/species/S = all_species[species]
|
||||
S.blood_color = "rainbow"
|
||||
for(var/obj/effect/decal/cleanable/blood/B in world)
|
||||
B.basecolor = "rainbow"
|
||||
B.update_icon()
|
||||
message_admins("[key_name_admin(usr)] activated Paintball mode")
|
||||
if("eagles")//SCRAW
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","EgL")
|
||||
|
||||
@@ -517,7 +517,7 @@ var/global/list/gear_datums = list()
|
||||
cost = 2
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/gponcho
|
||||
/datum/gear/bponcho
|
||||
display_name = "poncho, blue"
|
||||
path = /obj/item/clothing/suit/poncho/blue
|
||||
cost = 3
|
||||
@@ -529,7 +529,7 @@ var/global/list/gear_datums = list()
|
||||
cost = 3
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/rponcho
|
||||
/datum/gear/pponcho
|
||||
display_name = "poncho, purple"
|
||||
path = /obj/item/clothing/suit/poncho/purple
|
||||
cost = 3
|
||||
|
||||
@@ -399,8 +399,6 @@ BLIND // can't see anything
|
||||
*/
|
||||
var/obj/item/clothing/tie/hastie = null
|
||||
var/displays_id = 1
|
||||
var/rolled_down = 0
|
||||
var/basecolor
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/uniform.dmi')
|
||||
|
||||
/obj/item/clothing/under/update_clothing_icon()
|
||||
@@ -526,11 +524,14 @@ BLIND // can't see anything
|
||||
if(!istype(usr, /mob/living)) return
|
||||
if(usr.stat) return
|
||||
|
||||
if(copytext(item_color,-2) != "_d")
|
||||
basecolor = item_color
|
||||
if(basecolor + "_d_s" in icon_states('icons/mob/uniform.dmi'))
|
||||
body_parts_covered = "[basecolor]" ? LEGS|LOWER_TORSO : UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
item_color = item_color == "[basecolor]" ? "[basecolor]_d" : "[basecolor]"
|
||||
if(initial(item_color) + "_d_s" in icon_states('icons/mob/uniform.dmi'))
|
||||
if (item_color == initial(item_color))
|
||||
body_parts_covered &= LOWER_TORSO|LEGS|FEET
|
||||
item_color = "[initial(item_color)]_d"
|
||||
else
|
||||
body_parts_covered = initial(body_parts_covered)
|
||||
item_color = initial(item_color)
|
||||
|
||||
update_clothing_icon()
|
||||
else
|
||||
usr << "<span class='notice'>You cannot roll down the uniform!</span>"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
siemens_coefficient = 0.9
|
||||
var/gas_filter_strength = 1 //For gas mask filters
|
||||
var/list/filtered_gases = list("phoron", "sleeping_agent")
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 75, rad = 0)
|
||||
|
||||
/obj/item/clothing/mask/gas/filter_air(datum/gas_mixture/air)
|
||||
var/datum/gas_mixture/filtered = new
|
||||
@@ -32,7 +33,7 @@
|
||||
desc = "A modernised version of the classic design, this mask will not only filter out phoron but it can also be connected to an air supply."
|
||||
icon_state = "plaguedoctor"
|
||||
item_state = "gas_mask"
|
||||
armor = list(melee = 0, bullet = 0, laser = 2,energy = 2, bomb = 0, bio = 75, rad = 0)
|
||||
armor = list(melee = 0, bullet = 0, laser = 2,energy = 2, bomb = 0, bio = 90, rad = 0)
|
||||
body_parts_covered = HEAD|FACE
|
||||
|
||||
/obj/item/clothing/mask/gas/swat
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
body_parts_covered = 0
|
||||
gas_transfer_coefficient = 0.90
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 25, rad = 0)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0)
|
||||
|
||||
/obj/item/clothing/mask/fakemoustache
|
||||
name = "fake moustache"
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
piece.name = "[suit_type] [initial(piece.name)]"
|
||||
piece.desc = "It seems to be part of a [src.name]."
|
||||
piece.icon_state = "[initial(icon_state)]"
|
||||
piece.armor = armor
|
||||
piece.armor = armor.Copy()
|
||||
piece.min_cold_protection_temperature = min_cold_protection_temperature
|
||||
piece.max_heat_protection_temperature = max_heat_protection_temperature
|
||||
piece.siemens_coefficient = siemens_coefficient
|
||||
@@ -227,7 +227,7 @@
|
||||
if(!failed_to_seal && M.back == src && piece == compare_piece)
|
||||
|
||||
if(!instant)
|
||||
if(!do_after(M,SEAL_DELAY))
|
||||
if(!do_after(M,SEAL_DELAY,needhand=0))
|
||||
failed_to_seal = 1
|
||||
|
||||
piece.icon_state = "[initial(icon_state)][!seal_target ? "_sealed" : ""]"
|
||||
@@ -251,6 +251,13 @@
|
||||
else
|
||||
helmet.flags &= ~AIRTIGHT
|
||||
helmet.update_light(wearer)
|
||||
|
||||
//sealed pieces become airtight, protecting against diseases
|
||||
if (!seal_target)
|
||||
piece.armor["bio"] = 100
|
||||
else
|
||||
piece.armor["bio"] = src.armor["bio"]
|
||||
|
||||
else
|
||||
failed_to_seal = 1
|
||||
|
||||
|
||||
@@ -18,19 +18,27 @@
|
||||
|
||||
/datum/event/carp_migration/start()
|
||||
if(severity == EVENT_LEVEL_MAJOR)
|
||||
for(var/i = 1 to rand(3,5))
|
||||
spawn_fish(landmarks_list.len)
|
||||
else if(severity == EVENT_LEVEL_MODERATE)
|
||||
spawn_fish(landmarks_list.len)
|
||||
else if(severity == EVENT_LEVEL_MODERATE)
|
||||
spawn_fish(rand(4, 6)) //12 to 30 carp, in small groups
|
||||
else
|
||||
spawn_fish(rand(1, 5))
|
||||
spawn_fish(rand(1, 3), 1, 2) //1 to 6 carp, alone or in pairs
|
||||
|
||||
/datum/event/carp_migration/proc/spawn_fish(var/num_groups, var/group_size_min=3, var/group_size_max=5)
|
||||
var/list/spawn_locations = list()
|
||||
|
||||
/datum/event/carp_migration/proc/spawn_fish(var/limit)
|
||||
for(var/obj/effect/landmark/C in landmarks_list)
|
||||
if(C.name == "carpspawn")
|
||||
spawned_carp.Add(new /mob/living/simple_animal/hostile/carp(C.loc))
|
||||
if(spawned_carp.len >= limit)
|
||||
return
|
||||
spawn_locations.Add(C.loc)
|
||||
spawn_locations = shuffle(spawn_locations)
|
||||
num_groups = min(num_groups, spawn_locations.len)
|
||||
|
||||
var/i = 1
|
||||
while (i <= num_groups)
|
||||
var/group_size = rand(group_size_min, group_size_max)
|
||||
for (var/j = 1, j <= group_size, j++)
|
||||
spawned_carp.Add(new /mob/living/simple_animal/hostile/carp(spawn_locations[i]))
|
||||
i++
|
||||
|
||||
/datum/event/carp_migration/end()
|
||||
for(var/mob/living/simple_animal/hostile/carp/C in spawned_carp)
|
||||
|
||||
@@ -25,7 +25,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
|
||||
if(!next_event_time)
|
||||
set_event_delay()
|
||||
|
||||
if(delayed)
|
||||
if(delayed || !config.allow_random_events)
|
||||
next_event_time += (world.time - last_world_time)
|
||||
else if(world.time > next_event_time)
|
||||
start_event()
|
||||
@@ -139,22 +139,22 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
|
||||
/datum/event_container/moderate
|
||||
severity = EVENT_LEVEL_MODERATE
|
||||
available_events = list(
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 10),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 5, list(ASSIGNMENT_ENGINEER = 25, ASSIGNMENT_SECURITY = 25)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space vines", /datum/event/spacevine, 10, list(ASSIGNMENT_ENGINEER = 5)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 10)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 50, list(ASSIGNMENT_AI = 25, ASSIGNMENT_SECURITY = 25)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 50)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 25, list(ASSIGNMENT_ENGINEER = 10)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 15, list(ASSIGNMENT_ENGINEER = 5, ASSIGNMENT_JANITOR = 15)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 0, list(ASSIGNMENT_MEDICAL = 10), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 10), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 10)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 5, list(ASSIGNMENT_SECURITY = 5), 1),
|
||||
new /datum/event_meta/alien(EVENT_LEVEL_MODERATE, "Alien Infestation", /datum/event/alien_infestation, 2.5,list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
|
||||
new /datum/event_meta/ninja(EVENT_LEVEL_MODERATE, "Space Ninja", /datum/event/space_ninja, 0, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 25, ASSIGNMENT_CYBORG = 25, ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SCIENTIST = 5)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 1230),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 100, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 20), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 20, list(ASSIGNMENT_SECURITY = 20)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space vines", /datum/event/spacevine, 200, list(ASSIGNMENT_ENGINEER = 10)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 20)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 500, list(ASSIGNMENT_AI = 150, ASSIGNMENT_SECURITY = 120)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 100)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 200, list(ASSIGNMENT_ENGINEER = 60)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 250, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_JANITOR = 150)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 0, list(ASSIGNMENT_MEDICAL = 50), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 10), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 150)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 50, ASSIGNMENT_CYBORG = 50, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5)),
|
||||
new /datum/event_meta/alien(EVENT_LEVEL_MODERATE, "Alien Infestation", /datum/event/alien_infestation, 2.5, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
|
||||
new /datum/event_meta/ninja(EVENT_LEVEL_MODERATE, "Space Ninja", /datum/event/space_ninja, 0, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
|
||||
)
|
||||
|
||||
/datum/event_container/major
|
||||
|
||||
@@ -45,6 +45,10 @@
|
||||
|
||||
log_debug("Event '[EM.name]' has completed at [worldtime2text()].")
|
||||
|
||||
/datum/event_manager/proc/delay_events(var/severity, var/delay)
|
||||
var/list/datum/event_container/EC = event_containers[severity]
|
||||
EC.next_event_time += delay
|
||||
|
||||
/datum/event_manager/proc/Interact(var/mob/living/user)
|
||||
|
||||
var/html = GetInteractWindow()
|
||||
@@ -75,6 +79,7 @@
|
||||
|
||||
/datum/event_manager/proc/GetInteractWindow()
|
||||
var/html = "<A align='right' href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
html += "<A align='right' href='?src=\ref[src];pause_all=[!config.allow_random_events]'>Pause All - [config.allow_random_events ? "Pause" : "Resume"]</A>"
|
||||
|
||||
if(selected_event_container)
|
||||
var/event_time = max(0, selected_event_container.next_event_time - world.time)
|
||||
@@ -92,7 +97,7 @@
|
||||
html += "<td>[EM.max_weight]</td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];toggle_oneshot=\ref[EM]'>[EM.one_shot]</A></td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];toggle_enabled=\ref[EM]'>[EM.enabled]</A></td>"
|
||||
html += "<td><span class='alert'>[EM.get_weight()]</span></td>"
|
||||
html += "<td><span class='alert'>[EM.get_weight(number_active_with_role())]</span></td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];remove=\ref[EM];EC=\ref[selected_event_container]'>Remove</A></td>"
|
||||
html += "</tr>"
|
||||
html += "</table>"
|
||||
@@ -207,6 +212,9 @@
|
||||
var/datum/event_container/EC = locate(href_list["pause"])
|
||||
EC.delayed = !EC.delayed
|
||||
admin_log_and_message_admins("has [EC.delayed ? "paused" : "resumed"] countdown for [severity_to_string[EC.severity]] events.")
|
||||
else if(href_list["pause_all"])
|
||||
config.allow_random_events = text2num(href_list["pause_all"])
|
||||
admin_log_and_message_admins("has [config.allow_random_events ? "resumed" : "paused"] countdown for all events.")
|
||||
else if(href_list["interval"])
|
||||
var/delay = input("Enter delay modifier. A value less than one means events fire more often, higher than one less often.", "Set Interval Modifier") as num|null
|
||||
if(delay && delay > 0)
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
power_failure(0)
|
||||
|
||||
/datum/event/grid_check/announce()
|
||||
command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check", new_sound = 'sound/AI/poweroff.ogg')
|
||||
if (prob(30))
|
||||
command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Automated Grid Check", new_sound = 'sound/AI/poweroff.ogg')
|
||||
|
||||
/datum/event/grid_check/end()
|
||||
power_restore()
|
||||
|
||||
@@ -1,11 +1,36 @@
|
||||
datum/event/viral_infection
|
||||
var/list/viruses = list()
|
||||
|
||||
datum/event/viral_infection/setup()
|
||||
announceWhen = rand(0, 3000)
|
||||
endWhen = announceWhen + 1
|
||||
|
||||
//generate 1-3 viruses. This way there's an upper limit on how many individual diseases need to be cured if many people are initially infected
|
||||
var/num_diseases = rand(1,3)
|
||||
for (var/i=0, i < num_diseases, i++)
|
||||
var/datum/disease2/disease/D = new /datum/disease2/disease
|
||||
|
||||
var/strength = 1 //whether the disease is of the greater or lesser variety
|
||||
if (severity >= EVENT_LEVEL_MAJOR && prob(75))
|
||||
strength = 2
|
||||
D.makerandom(strength)
|
||||
viruses += D
|
||||
|
||||
datum/event/viral_infection/announce()
|
||||
command_announcement.Announce("Confirmed outbreak of level five biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg')
|
||||
var/level
|
||||
if (severity == EVENT_LEVEL_MUNDANE)
|
||||
return
|
||||
else if (severity == EVENT_LEVEL_MODERATE)
|
||||
level = pick("one", "two", "three", "four")
|
||||
else
|
||||
level = "five"
|
||||
|
||||
if (severity == EVENT_LEVEL_MAJOR || prob(60))
|
||||
command_announcement.Announce("Confirmed outbreak of level [level] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg')
|
||||
|
||||
datum/event/viral_infection/start()
|
||||
if(!viruses.len) return
|
||||
|
||||
var/list/candidates = list() //list of candidate keys
|
||||
for(var/mob/living/carbon/human/G in player_list)
|
||||
if(G.client && G.stat != DEAD)
|
||||
@@ -13,9 +38,10 @@ datum/event/viral_infection/start()
|
||||
if(!candidates.len) return
|
||||
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
|
||||
|
||||
severity = severity == 1 ? 1 : severity - 1
|
||||
severity = max(EVENT_LEVEL_MUNDANE, severity - 1)
|
||||
var/actual_severity = severity * rand(1, 3)
|
||||
while(actual_severity > 0 && candidates.len)
|
||||
infect_mob_random_lesser(candidates[1])
|
||||
var/datum/disease2/disease/D = pick(viruses)
|
||||
infect_mob(candidates[1], D.getcopy())
|
||||
candidates.Remove(candidates[1])
|
||||
actual_severity--
|
||||
|
||||
@@ -217,8 +217,8 @@ proc/populate_seed_list()
|
||||
"water",
|
||||
"potassium",
|
||||
"plasticide",
|
||||
"slimetoxin",
|
||||
"aslimetoxin",
|
||||
"mutationtoxin",
|
||||
"amutationtoxin",
|
||||
"inaprovaline",
|
||||
"space_drugs",
|
||||
"paroxetine",
|
||||
|
||||
@@ -362,6 +362,8 @@
|
||||
|
||||
SV.life()
|
||||
|
||||
if(!SV) continue
|
||||
|
||||
if(SV.energy < 2) //If tile isn't fully grown
|
||||
var/chance
|
||||
if(seed)
|
||||
|
||||
@@ -143,7 +143,7 @@ Works together with spawning an observer, noted above.
|
||||
ghost.can_reenter_corpse = can_reenter_corpse
|
||||
ghost.timeofdeath = src.timeofdeath //BS12 EDIT
|
||||
ghost.key = key
|
||||
if(!ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
|
||||
return ghost
|
||||
|
||||
|
||||
@@ -871,6 +871,7 @@
|
||||
else
|
||||
target.show_message("\blue You hear a voice that seems to echo around the room: [say]")
|
||||
usr.show_message("\blue You project your mind into [target.real_name]: [say]")
|
||||
log_say("[key_name(usr)] sent a telepathic message to [key_name(target)]: [say]")
|
||||
for(var/mob/dead/observer/G in world)
|
||||
G.show_message("<i>Telepathic message from <b>[src]</b> to <b>[target]</b>: [say]</i>")
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ emp_act
|
||||
/mob/living/carbon/human/proc/getarmor_organ(var/datum/organ/external/def_zone, var/type)
|
||||
if(!type) return 0
|
||||
var/protection = 0
|
||||
var/list/protective_gear = list(head, wear_mask, wear_suit, w_uniform)
|
||||
var/list/protective_gear = list(head, wear_mask, wear_suit, w_uniform, gloves, shoes)
|
||||
for(var/gear in protective_gear)
|
||||
if(gear && istype(gear ,/obj/item/clothing))
|
||||
var/obj/item/clothing/C = gear
|
||||
|
||||
@@ -640,9 +640,10 @@ It can still be worn/put on as normal.
|
||||
W.hold.close(usr)
|
||||
usr.put_in_hands(tie)
|
||||
suit.hastie = null*/
|
||||
suit.hastie.on_removed(usr)
|
||||
suit.hastie = null
|
||||
target.update_inv_w_uniform()
|
||||
if(suit && suit.hastie)
|
||||
suit.hastie.on_removed(usr)
|
||||
suit.hastie = null
|
||||
target.update_inv_w_uniform()
|
||||
if("id")
|
||||
slot_to_process = slot_wear_id
|
||||
if (target.wear_id)
|
||||
|
||||
@@ -407,11 +407,10 @@
|
||||
loc.assume_air(breath)
|
||||
|
||||
//spread some viruses while we are at it
|
||||
if (virus2.len > 0)
|
||||
if (prob(10) && get_infection_chance(src))
|
||||
// log_debug("[src] : Exhaling some viruses")
|
||||
for(var/mob/living/carbon/M in view(1,src))
|
||||
src.spread_disease_to(M)
|
||||
if (virus2.len > 0 && prob(10))
|
||||
// log_debug("[src] : Exhaling some viruses")
|
||||
for(var/mob/living/carbon/M in view(1,src))
|
||||
src.spread_disease_to(M)
|
||||
|
||||
|
||||
proc/get_breath_from_internal(volume_needed)
|
||||
@@ -1426,21 +1425,19 @@
|
||||
client.screen |= G.overlay
|
||||
if(G.vision_flags)
|
||||
sight |= G.vision_flags
|
||||
if(!druggy)
|
||||
if(!druggy && !seer)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
if(istype(G,/obj/item/clothing/glasses/night))
|
||||
if(istype(G,/obj/item/clothing/glasses/night) && !seer)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
/* HUD shit goes here, as long as it doesn't modify sight flags */
|
||||
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
|
||||
var/obj/item/clothing/glasses/hud/O = G
|
||||
if(istype(G, /obj/item/clothing/glasses/sunglasses/sechud))
|
||||
var/obj/item/clothing/glasses/sunglasses/sechud/O = G
|
||||
if(O.hud) O.hud.process_hud(src)
|
||||
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
|
||||
else if(istype(G, /obj/item/clothing/glasses/hud))
|
||||
var/obj/item/clothing/glasses/hud/O = G
|
||||
var/obj/item/clothing/glasses/sunglasses/sechud/S = G
|
||||
O = S.hud
|
||||
if(istype(O))
|
||||
O.process_hud(src)
|
||||
if(!druggy)
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
if(!druggy && !seer) see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
proc/handle_random_events()
|
||||
// Puke if toxloss is too high
|
||||
|
||||
@@ -35,23 +35,29 @@
|
||||
if("head", "mouth", "eyes")
|
||||
// ----- HEAD ----- //
|
||||
switch(attack_damage)
|
||||
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target] across \his cheek!</span>")
|
||||
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target]'s [pick("head", "neck")] [pick("", "", "", "with spread [pick(attack_noun)]")]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[pick("[user] [pick(attack_verb)] [target] across \his face!", "[user] rakes \his [pick(attack_noun)] across [target]'s face!")]</span>")
|
||||
if("chest", "l_arm", "r_arm", "l_hand", "r_hand", "groin", "l_leg", "r_leg", "l_foot", "r_foot")
|
||||
if(1 to 2)
|
||||
user.visible_message("<span class='danger'>[user] scratched [target] across \his cheek!</span>")
|
||||
if(3 to 4)
|
||||
user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target]'s [pick("head", "neck")]!</span>") //'with spread claws' sounds a little bit odd, just enough that conciseness is better here I think
|
||||
if(5)
|
||||
user.visible_message(pick(
|
||||
"<span class='danger'>[user] rakes \his [pick(attack_noun)] across [target]'s face!</span>",
|
||||
"<span class='danger'>[user] tears \his [pick(attack_noun)] into [target]'s face!</span>",
|
||||
))
|
||||
else
|
||||
// ----- BODY ----- //
|
||||
switch(attack_damage)
|
||||
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target]'s [affecting.display_name]!</span>")
|
||||
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [pick("", "", "the side of")] [target]'s [affecting.display_name]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[user] tears \his [pick(attack_noun)] deep into [target]'s [affecting.display_name]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[user] tears \his [pick(attack_noun)] [pick("deep into", "into", "across")] [target]'s [affecting.display_name]!</span>")
|
||||
|
||||
/datum/unarmed_attack/claws/strong
|
||||
attack_verb = list("slash")
|
||||
attack_verb = list("slashed")
|
||||
damage = 10
|
||||
shredding = 1
|
||||
|
||||
/datum/unarmed_attack/bite/strong
|
||||
attack_verb = list("maul")
|
||||
attack_verb = list("mauled")
|
||||
damage = 15
|
||||
shredding = 1
|
||||
|
||||
|
||||
@@ -35,17 +35,18 @@
|
||||
switch(zone) // strong punches can have effects depending on where they hit
|
||||
if("head", "mouth", "eyes")
|
||||
// Induce blurriness
|
||||
target.visible_message("<span class='danger'>[target] looks dazed.</span>", "<span class='danger'>You see stars.</span>")
|
||||
target.visible_message("<span class='danger'>[target] looks momentarily disoriented.</span>", "<span class='danger'>You see stars.</span>")
|
||||
target.apply_effect(attack_damage*2, EYE_BLUR, armour)
|
||||
if("l_arm", "l_hand")
|
||||
if (target.l_hand)
|
||||
// Disarm left hand
|
||||
target.visible_message("<span class='danger'>[src] [pick("dropped", "let go off")] \the [target.l_hand][pick("", " with a scream")]!</span>")
|
||||
//Urist McAssistant dropped the macguffin with a scream just sounds odd. Plus it doesn't work with NO_PAIN
|
||||
target.visible_message("<span class='danger'>\The [target.l_hand] was knocked right out of [src]'s grasp!</span>")
|
||||
target.drop_l_hand()
|
||||
if("r_arm", "r_hand")
|
||||
if (target.r_hand)
|
||||
// Disarm right hand
|
||||
target.visible_message("<span class='danger'>[src] [pick("dropped", "let go off")] \the [target.r_hand][pick("", " with a scream")]!</span>")
|
||||
target.visible_message("<span class='danger'>\The [target.r_hand] was knocked right out of [src]'s grasp!</span>")
|
||||
target.drop_r_hand()
|
||||
if("chest")
|
||||
if(!target.lying)
|
||||
@@ -113,21 +114,30 @@
|
||||
if("head", "mouth", "eyes")
|
||||
// ----- HEAD ----- //
|
||||
switch(attack_damage)
|
||||
if(1 to 2) user.visible_message("<span class='danger'>[user] slapped [target] across \his cheek!</span>")
|
||||
if(3 to 4) user.visible_message("<span class='danger'>[user] struck [target] in the head[pick("", " with a closed fist")]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[user] gave [target] a resounding slap to the face!</span>")
|
||||
if("chest", "l_arm", "r_arm", "l_hand", "r_hand", "groin", "l_leg", "r_let", "l_foot", "r_foot")
|
||||
if(1 to 2)
|
||||
user.visible_message("<span class='danger'>[user] slapped [target] across \his cheek!</span>")
|
||||
if(3 to 4)
|
||||
user.visible_message(pick(
|
||||
80; "<span class='danger'>[user] [pick(attack_verb)] [target] in the head!</span>", //striking someone with a 'closed fist' is called punching them.
|
||||
20; "<span class='danger'>[user] struck [target] in the head[pick("", " with a closed fist")]!</span>"
|
||||
))
|
||||
if(5)
|
||||
user.visible_message(pick(
|
||||
10; "<span class='danger'>[user] gave [target] a resounding slap to the face!</span>",
|
||||
90; "<span class='danger'>[user] smashed \his [pick(attack_noun)] into [target]'s [organ]!</span>"
|
||||
))
|
||||
else
|
||||
// ----- BODY ----- //
|
||||
switch(attack_damage)
|
||||
if(1 to 2) user.visible_message("<span class='danger'>[user] slapped [target]'s [organ]!</span>")
|
||||
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target] in \his [organ]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[user] slammed \his [pick(attack_noun)] into [target]'s [organ]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[user] smashed \his [pick(attack_noun)] into [target]'s [organ]!</span>")
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] [pick("punched", "threw a punch", "struck", "slapped", "rammed their [pick(attack_noun)] into")] [target]'s [organ]!</span>")
|
||||
user.visible_message("<span class='danger'>[user] [pick("punched", "threw a punch", "struck", "slapped", "slammed their [pick(attack_noun)] into")] [target]'s [organ]!</span>") //why do we have a separate set of verbs for lying targets?
|
||||
|
||||
/datum/unarmed_attack/kick
|
||||
attack_verb = list("kicked", "kneed")
|
||||
attack_noun = list("kick", "knee strike")
|
||||
attack_verb = list("kicked", "kicked", "kicked", "kneed")
|
||||
attack_noun = list("kick", "kick", "kick", "knee strike")
|
||||
attack_sound = "swing_hit"
|
||||
damage = 0
|
||||
|
||||
@@ -161,7 +171,7 @@
|
||||
attack_damage = Clamp(attack_damage, 1, 5)
|
||||
|
||||
switch(attack_damage)
|
||||
if(1 to 2) user.visible_message("<span class='danger'>[user] gave [target] a light [pick(attack_noun)] to the [organ]!</span>")
|
||||
if(1 to 2) user.visible_message("<span class='danger'>[user] threw [target] a glancing [pick(attack_noun)] to the [organ]!</span>") //it's not that they're kicking lightly, it's that the kick didn't quite connect
|
||||
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target] in \his [organ]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[user] landed a strong [pick(attack_noun)] against [target]'s [organ]!</span>")
|
||||
|
||||
@@ -204,6 +214,6 @@
|
||||
attack_damage = Clamp(attack_damage, 1, 5)
|
||||
|
||||
switch(attack_damage)
|
||||
if(1 to 2) user.visible_message("<span class='danger'>[user] [pick("clomped on", "treaded on")] [target]'s [organ]!</span>")
|
||||
if(3 to 4) user.visible_message("<span class='danger'>[pick("[user] stomped down on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down onto")] [target]'s [organ]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[pick("[user] landed a devastating stomp on", "[user] stomped down hard on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down hard onto")] [target]'s [organ]!</span>")
|
||||
if(1 to 2) user.visible_message("<span class='danger'>[user] [pick("stepped on", "treaded on")] [target]'s [organ]!</span>") //stepped on conveys the same meaning and is more recognizable as an actual word than "clomped"
|
||||
if(3 to 4) user.visible_message("<span class='danger'>[pick("[user] stomped on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down onto")] [target]'s [organ]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[pick("[user] landed a powerful stomp on", "[user] stomped down hard on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down hard onto")] [target]'s [organ]!</span>") //Devastated lol. No. We want to say that the stomp was powerful or forceful, not that it /wrought devastation/
|
||||
@@ -54,4 +54,4 @@
|
||||
var/obj/item/device/aicard/card = loc
|
||||
card.update_icon()
|
||||
|
||||
return ..(gibbed)
|
||||
return ..(gibbed,"gives one shrill beep before falling lifeless.")
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
status_flags = GODMODE // You can't damage it.
|
||||
mouse_opacity = 0
|
||||
see_in_dark = 7
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
|
||||
// Movement code. Returns 0 to stop air movement from moving it.
|
||||
/mob/aiEye/Move()
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
src.see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
|
||||
//Congratulations! You've found a way for AI's to run without using power!
|
||||
|
||||
@@ -234,3 +234,7 @@
|
||||
sight_mode |= module_state_3:sight_mode
|
||||
else
|
||||
src << "<span class='notice'>You need to disable a module first!</span>"
|
||||
|
||||
/mob/living/silicon/robot/put_in_hands(var/obj/item/W) // No hands.
|
||||
W.loc = get_turf(src)
|
||||
return 1
|
||||
|
||||
@@ -23,6 +23,11 @@ var/list/robot_verbs_default = list(
|
||||
var/integrated_light_power = 6
|
||||
var/datum/wires/robot/wires
|
||||
|
||||
//Icon stuff
|
||||
|
||||
var/icontype //Persistent icontype tracking allows for cleaner icon updates
|
||||
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
|
||||
|
||||
//Hud stuff
|
||||
|
||||
var/obj/screen/cells = null
|
||||
@@ -106,6 +111,8 @@ var/list/robot_verbs_default = list(
|
||||
robot_modules_background.icon_state = "block"
|
||||
robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
|
||||
ident = rand(1, 999)
|
||||
module_sprites["Basic"] = "robot"
|
||||
icontype = "Default"
|
||||
updatename("Default")
|
||||
updateicon()
|
||||
|
||||
@@ -227,11 +234,10 @@ var/list/robot_verbs_default = list(
|
||||
modules+="Combat"
|
||||
modtype = input("Please, select a module!", "Robot", null, null) in modules
|
||||
|
||||
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
|
||||
|
||||
if(module)
|
||||
return
|
||||
|
||||
module_sprites = list()
|
||||
switch(modtype)
|
||||
if("Standard")
|
||||
module = new /obj/item/weapon/robot_module/standard(src)
|
||||
@@ -958,38 +964,25 @@ var/list/robot_verbs_default = list(
|
||||
|
||||
overlays.Cut()
|
||||
if(stat == 0)
|
||||
overlays += "eyes"
|
||||
overlays.Cut()
|
||||
overlays += "eyes-[icon_state]"
|
||||
else
|
||||
overlays -= "eyes"
|
||||
|
||||
if(opened && custom_sprite == 1) //Custom borgs also have custom panels, heh
|
||||
if(wiresexposed)
|
||||
overlays += "[src.ckey]-openpanel +w"
|
||||
else if(cell)
|
||||
overlays += "[src.ckey]-openpanel +c"
|
||||
else
|
||||
overlays += "[src.ckey]-openpanel -c"
|
||||
overlays += "eyes-[module_sprites[icontype]]"
|
||||
|
||||
if(opened)
|
||||
var/panelprefix = custom_sprite ? src.ckey : "ov"
|
||||
if(wiresexposed)
|
||||
overlays += "ov-openpanel +w"
|
||||
overlays += "[panelprefix]-openpanel +w"
|
||||
else if(cell)
|
||||
overlays += "ov-openpanel +c"
|
||||
overlays += "[panelprefix]-openpanel +c"
|
||||
else
|
||||
overlays += "ov-openpanel -c"
|
||||
overlays += "[panelprefix]-openpanel -c"
|
||||
|
||||
if(module_active && istype(module_active,/obj/item/borg/combat/shield))
|
||||
overlays += "[icon_state]-shield"
|
||||
overlays += "[module_sprites[icontype]]-shield"
|
||||
|
||||
if(modtype == "Combat")
|
||||
var/base_icon = ""
|
||||
base_icon = icon_state
|
||||
if(module_active && istype(module_active,/obj/item/borg/combat/mobility))
|
||||
icon_state = "[icon_state]-roll"
|
||||
icon_state = "[module_sprites[icontype]]-roll"
|
||||
else
|
||||
icon_state = base_icon
|
||||
icon_state = module_sprites[icontype]
|
||||
return
|
||||
|
||||
//Call when target overlay should be added/removed
|
||||
@@ -1222,8 +1215,6 @@ var/list/robot_verbs_default = list(
|
||||
else
|
||||
triesleft--
|
||||
|
||||
var/icontype
|
||||
|
||||
if (custom_sprite == 1)
|
||||
icontype = "Custom"
|
||||
triesleft = 0
|
||||
@@ -1304,4 +1295,5 @@ var/list/robot_verbs_default = list(
|
||||
if(2) //New Module
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] module change detected: [name] has loaded the [module.name].</span><br>"
|
||||
if(3) //New Name
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] reclassification detected: [oldname] is now designated as [newname].</span><br>"
|
||||
if(oldname != newname)
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] reclassification detected: [oldname] is now designated as [newname].</span><br>"
|
||||
|
||||
@@ -34,8 +34,11 @@
|
||||
if(!stacktypes || !stacktypes.len) return
|
||||
|
||||
for(var/T in stacktypes)
|
||||
var/O = locate(T) in src.modules
|
||||
var/obj/item/stack/S = O
|
||||
var/obj/item/stack/S
|
||||
for(var/obj/O in src.modules)
|
||||
if(O.type == T)
|
||||
S = O
|
||||
break
|
||||
|
||||
if(!S)
|
||||
src.modules -= null
|
||||
@@ -43,6 +46,9 @@
|
||||
src.modules |= S
|
||||
S.amount = 1
|
||||
|
||||
if(!istype(S))
|
||||
continue
|
||||
|
||||
if(S && S.amount < stacktypes[T])
|
||||
S.amount++
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
/mob/living/simple_animal/cat/MouseDrop(atom/over_object)
|
||||
|
||||
var/mob/living/carbon/H = over_object
|
||||
if(!istype(H)) return ..()
|
||||
if(!istype(H) || !Adjacent(H)) return ..()
|
||||
|
||||
if(H.a_intent == "help")
|
||||
get_scooped(H)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
json_writer
|
||||
proc
|
||||
WriteObject(list/L)
|
||||
WriteObject(list/L, cached_data = null)
|
||||
. = "{"
|
||||
var/i = 1
|
||||
for(var/k in L)
|
||||
@@ -9,7 +9,9 @@ json_writer
|
||||
. += {"\"[k]\":[write(val)]"}
|
||||
if(i++ < L.len)
|
||||
. += ","
|
||||
.+= "}"
|
||||
if(cached_data)
|
||||
. = copytext(., 1, lentext(.)) + ",\"cached\":[cached_data]}"
|
||||
. += "}"
|
||||
|
||||
write(val)
|
||||
if(isnum(val))
|
||||
|
||||
@@ -7,6 +7,6 @@ proc
|
||||
var/static/json_reader/_jsonr = new()
|
||||
return _jsonr.ReadObject(_jsonr.ScanJson(json))
|
||||
|
||||
list2json(list/L)
|
||||
list2json(list/L, var/cached_data = null)
|
||||
var/static/json_writer/_jsonw = new()
|
||||
return _jsonw.WriteObject(L)
|
||||
return _jsonw.WriteObject(L, cached_data)
|
||||
|
||||
@@ -57,6 +57,8 @@ nanoui is used to open and update nano browser uis
|
||||
// the current status/visibility of the ui
|
||||
var/status = STATUS_INTERACTIVE
|
||||
|
||||
var/cached_data = null
|
||||
|
||||
// Only allow users with a certain user.stat to get updates. Defaults to 0 (concious)
|
||||
var/allowed_user_stat = 0 // -1 = ignore, 0 = alive, 1 = unconcious or alive, 2 = dead concious or alive
|
||||
|
||||
@@ -366,7 +368,7 @@ nanoui is used to open and update nano browser uis
|
||||
template_data_json = list2json(templates)
|
||||
|
||||
var/list/send_data = get_send_data(initial_data)
|
||||
var/initial_data_json = list2json(send_data)
|
||||
var/initial_data_json = list2json(send_data, cached_data)
|
||||
|
||||
var/url_parameters_json = list2json(list("src" = "\ref[src]"))
|
||||
|
||||
@@ -442,6 +444,19 @@ nanoui is used to open and update nano browser uis
|
||||
|
||||
winset(user, window_id, "on-close=\"nanoclose [params]\"")
|
||||
|
||||
/**
|
||||
* Appends already processed json txt to the list2json proc when setting initial-data and data pushes
|
||||
* Used for data that is fucking huge like manifests and camera lists that doesn't change often.
|
||||
* And we only want to process them when they change.
|
||||
* Fuck javascript
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/nanoui/proc/load_cached_data(var/data)
|
||||
cached_data = data
|
||||
return
|
||||
|
||||
|
||||
/**
|
||||
* Push data to an already open UI window
|
||||
*
|
||||
@@ -455,7 +470,7 @@ nanoui is used to open and update nano browser uis
|
||||
var/list/send_data = get_send_data(data)
|
||||
|
||||
//user << list2json(data) // used for debugging
|
||||
user << output(list2params(list(list2json(send_data))),"[window_id].browser:receiveUpdateData")
|
||||
user << output(list2params(list(list2json(send_data,cached_data))),"[window_id].browser:receiveUpdateData")
|
||||
|
||||
/**
|
||||
* This Topic() proc is called whenever a user clicks on a link within a Nano UI
|
||||
|
||||
@@ -290,29 +290,24 @@ proc/blood_splatter(var/target,var/datum/reagent/blood/source,var/large)
|
||||
source.data["blood_type"] = donor.dna.b_type
|
||||
|
||||
// Are we dripping or splattering?
|
||||
if(!large)
|
||||
|
||||
// Only a certain number of drips can be on a given turf.
|
||||
var/list/drips = list()
|
||||
var/list/drip_icons = list("1","2","3","4","5")
|
||||
|
||||
for(var/obj/effect/decal/cleanable/blood/drip/drop in T)
|
||||
drips += drop
|
||||
drip_icons.Remove(drop.icon_state)
|
||||
|
||||
// If we have too many drips, remove them and spawn a proper blood splatter.
|
||||
if(drips.len >= 5)
|
||||
//TODO: copy all virus data from drips to new splatter?
|
||||
for(var/obj/effect/decal/cleanable/blood/drip/drop in drips)
|
||||
del drop
|
||||
else
|
||||
decal_type = /obj/effect/decal/cleanable/blood/drip
|
||||
var/list/drips = list()
|
||||
// Only a certain number of drips (or one large splatter) can be on a given turf.
|
||||
for(var/obj/effect/decal/cleanable/blood/drip/drop in T)
|
||||
drips |= drop.drips
|
||||
del(drop)
|
||||
if(!large && drips.len < 3)
|
||||
decal_type = /obj/effect/decal/cleanable/blood/drip
|
||||
|
||||
// Find a blood decal or create a new one.
|
||||
B = locate(decal_type) in T
|
||||
if(!B)
|
||||
B = new decal_type(T)
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/drip/drop = B
|
||||
if(istype(drop) && drips && drips.len && !large)
|
||||
drop.overlays |= drips
|
||||
drop.drips |= drips
|
||||
|
||||
// If there's no data to copy, call it quits here.
|
||||
if(!source)
|
||||
return B
|
||||
@@ -330,11 +325,7 @@ proc/blood_splatter(var/target,var/datum/reagent/blood/source,var/large)
|
||||
else
|
||||
B.blood_DNA[source.data["blood_DNA"]] = "O+"
|
||||
|
||||
// Update virus information. //Looks like this is out of date.
|
||||
//for(var/datum/disease/D in source.data["viruses"])
|
||||
// var/datum/disease/new_virus = D.Copy(1)
|
||||
// source.viruses += new_virus
|
||||
// new_virus.holder = B
|
||||
// Update virus information.
|
||||
if(source.data["virus2"])
|
||||
B.virus2 = virus_copylist(source.data["virus2"])
|
||||
|
||||
|
||||
@@ -562,7 +562,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
O.setAmputatedTree()
|
||||
|
||||
//Handles dismemberment
|
||||
/datum/organ/external/proc/droplimb(var/override = 0,var/no_explode = 0)
|
||||
/datum/organ/external/proc/droplimb(var/override = 0,var/no_explode = 0,var/amputation=0)
|
||||
if(destspawn) return
|
||||
if(override)
|
||||
status |= ORGAN_DESTROYED
|
||||
@@ -579,9 +579,13 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
germ_level = 0
|
||||
|
||||
// If any organs are attached to this, destroy them
|
||||
for(var/datum/organ/external/O in children)
|
||||
O.droplimb(1, no_explode, amputation)
|
||||
|
||||
//Replace all wounds on that arm with one wound on parent organ.
|
||||
wounds.Cut()
|
||||
if (parent)
|
||||
if (parent && !amputation)
|
||||
var/datum/wound/W
|
||||
if(max_damage < 50)
|
||||
W = new/datum/wound/lost_limb/small(max_damage)
|
||||
@@ -591,10 +595,6 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
parent.update_damages()
|
||||
update_damages()
|
||||
|
||||
// If any organs are attached to this, destroy them
|
||||
for(var/datum/organ/external/O in children)
|
||||
O.droplimb(1)
|
||||
|
||||
var/obj/organ //Dropped limb object
|
||||
switch(body_part)
|
||||
if(HEAD)
|
||||
|
||||
@@ -6,9 +6,13 @@
|
||||
var/label = null
|
||||
var/labels_left = 30
|
||||
var/mode = 0 //off or on.
|
||||
|
||||
/obj/item/weapon/hand_labeler/attack()
|
||||
return
|
||||
|
||||
/obj/item/weapon/hand_labeler/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(!proximity)
|
||||
return
|
||||
if(!mode) //if it's off, give up.
|
||||
return
|
||||
if(A == loc) // if placing the labeller into something (e.g. backpack)
|
||||
@@ -24,10 +28,13 @@
|
||||
user << "<span class='notice'>Label too big.</span>"
|
||||
return
|
||||
if(ishuman(A))
|
||||
user << "<span class='notice'>You can't label humans.</span>"
|
||||
user << "<span class='notice'>The label refuses to stick to [A.name].</span>"
|
||||
return
|
||||
if(issilicon(A))
|
||||
user << "<span class='notice'>You can't label cyborgs.</span>"
|
||||
user << "<span class='notice'>The label refuses to stick to [A.name].</span>"
|
||||
return
|
||||
if(isobserver(A))
|
||||
user << "<span class='notice'>[src] passes through [A.name].</span>"
|
||||
return
|
||||
if(istype(A, /obj/item/weapon/reagent_containers/glass))
|
||||
user << "<span class='notice'>The label can't stick to the [A.name]. (Try using a pen)</span>"
|
||||
|
||||
@@ -35,8 +35,9 @@
|
||||
user.drop_from_inventory(P)
|
||||
P.loc = src
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
user:update_inv_l_hand()
|
||||
user:update_inv_r_hand()
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
else if(istype(W, /obj/item/weapon/photo))
|
||||
amount++
|
||||
if(screen == 2)
|
||||
@@ -57,6 +58,8 @@
|
||||
user << "<span class='notice'>You add \the [W.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].</span>"
|
||||
del(W)
|
||||
else
|
||||
if(istype(W, /obj/item/weapon/tape_roll))
|
||||
return 0
|
||||
if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/toy/crayon))
|
||||
usr << browse("", "window=[name]") //Closes the dialog
|
||||
P = src[page]
|
||||
|
||||
@@ -105,8 +105,11 @@ display round(lastgen) and phorontank amount
|
||||
var/sheet_path = /obj/item/stack/sheet/mineral/phoron
|
||||
var/board_path = "/obj/item/weapon/circuitboard/pacman"
|
||||
var/sheet_left = 0 // How much is left of the sheet
|
||||
var/time_per_sheet = 40
|
||||
var/heat = 0
|
||||
|
||||
//produces up to 80 kW and lasts for 20 minutes with 50 sheets
|
||||
var/time_per_sheet = 96
|
||||
power_gen = 20000
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/initialize()
|
||||
..()
|
||||
@@ -329,9 +332,12 @@ display round(lastgen) and phorontank amount
|
||||
name = "S.U.P.E.R.P.A.C.M.A.N.-type Portable Generator"
|
||||
icon_state = "portgen1"
|
||||
sheet_path = /obj/item/stack/sheet/mineral/uranium
|
||||
power_gen = 15000
|
||||
time_per_sheet = 65
|
||||
board_path = "/obj/item/weapon/circuitboard/pacman/super"
|
||||
|
||||
//produces 80 kW like the PACMAN but 50 sheets will last for 2 hours
|
||||
power_gen = 20000
|
||||
time_per_sheet = 576
|
||||
|
||||
overheat()
|
||||
explosion(src.loc, 3, 3, 3, -1)
|
||||
|
||||
@@ -339,8 +345,11 @@ display round(lastgen) and phorontank amount
|
||||
name = "M.R.S.P.A.C.M.A.N.-type Portable Generator"
|
||||
icon_state = "portgen2"
|
||||
sheet_path = /obj/item/stack/sheet/mineral/tritium
|
||||
power_gen = 40000
|
||||
time_per_sheet = 80
|
||||
board_path = "/obj/item/weapon/circuitboard/pacman/mrs"
|
||||
|
||||
//produces 200 kW and lasts for 1 hour with 50 sheets
|
||||
power_gen = 50000
|
||||
time_per_sheet = 288
|
||||
|
||||
overheat()
|
||||
explosion(src.loc, 4, 4, 4, -1)
|
||||
|
||||
@@ -294,6 +294,8 @@
|
||||
for(var/obj/structure/cable/Cable in net2.cables) //merge cables
|
||||
net1.add_cable(Cable)
|
||||
|
||||
if(!net2) return net1
|
||||
|
||||
for(var/obj/machinery/power/Node in net2.nodes) //merge power machines
|
||||
if(!Node.connect_to_network())
|
||||
Node.disconnect_from_network() //if somehow we can't connect the machine to the new powernet, disconnect it from the old nonetheless
|
||||
|
||||
@@ -16,9 +16,11 @@
|
||||
|
||||
/datum/powernet/New()
|
||||
powernets += src
|
||||
..()
|
||||
|
||||
/datum/powernet/Del()
|
||||
powernets -= src
|
||||
..()
|
||||
|
||||
//Returns the amount of excess power (before refunding to SMESs) from last tick.
|
||||
//This is for machines that might adjust their power consumption using this data.
|
||||
@@ -110,8 +112,7 @@
|
||||
S.restore() // and restore some of the power that was used
|
||||
|
||||
//updates the viewed load (as seen on power computers)
|
||||
viewload = 0.8*viewload + 0.2*load
|
||||
viewload = round(viewload)
|
||||
viewload = round(load)
|
||||
|
||||
//reset the powernet
|
||||
load = 0
|
||||
|
||||
@@ -206,8 +206,6 @@ var/global/list/uneatable = list(
|
||||
|
||||
/obj/machinery/singularity/proc/eat()
|
||||
set background = 1
|
||||
if(defer_powernet_rebuild != 2)
|
||||
defer_powernet_rebuild = 1
|
||||
// Let's just make this one loop.
|
||||
for(var/atom/X in orange(grav_pull,src))
|
||||
var/dist = get_dist(X, src)
|
||||
@@ -226,9 +224,6 @@ var/global/list/uneatable = list(
|
||||
// Turf and movable atoms
|
||||
else if(dist <= consume_range && (isturf(X) || istype(X, /atom/movable)))
|
||||
consume(X)
|
||||
|
||||
if(defer_powernet_rebuild != 2)
|
||||
defer_powernet_rebuild = 0
|
||||
return
|
||||
|
||||
|
||||
@@ -567,11 +562,7 @@ var/global/list/uneatable = list(
|
||||
|
||||
/obj/machinery/singularity/narsie/wizard/eat()
|
||||
set background = 1
|
||||
if(defer_powernet_rebuild != 2)
|
||||
defer_powernet_rebuild = 1
|
||||
for(var/atom/X in orange(consume_range,src))
|
||||
if(isturf(X) || istype(X, /atom/movable))
|
||||
consume(X)
|
||||
if(defer_powernet_rebuild != 2)
|
||||
defer_powernet_rebuild = 0
|
||||
return
|
||||
|
||||
@@ -301,6 +301,13 @@
|
||||
data["outputMax"] = output_level_max
|
||||
data["outputLoad"] = round(output_used)
|
||||
|
||||
if(outputting)
|
||||
data["outputting"] = 2 // smes is outputting
|
||||
else if(!outputting && output_attempt)
|
||||
data["outputting"] = 1 // smes is online but not outputting because it's charge level is too low
|
||||
else
|
||||
data["outputting"] = 0 // smes is not outputting
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
@@ -322,11 +329,11 @@
|
||||
return 1
|
||||
|
||||
if( href_list["cmode"] )
|
||||
inputting(!inputting)
|
||||
inputting(!input_attempt)
|
||||
update_icon()
|
||||
|
||||
else if( href_list["online"] )
|
||||
outputting(!outputting)
|
||||
outputting(!output_attempt)
|
||||
update_icon()
|
||||
else if( href_list["input"] )
|
||||
switch( href_list["input"] )
|
||||
|
||||
@@ -427,7 +427,7 @@ datum
|
||||
holder.remove_reagent(src.id, 0.25 * REAGENTS_METABOLISM)
|
||||
return
|
||||
|
||||
/* silicate
|
||||
silicate
|
||||
name = "Silicate"
|
||||
id = "silicate"
|
||||
description = "A compound that can be used to reinforce glass."
|
||||
@@ -437,31 +437,9 @@ datum
|
||||
reaction_obj(var/obj/O, var/volume)
|
||||
src = null
|
||||
if(istype(O,/obj/structure/window))
|
||||
if(O:silicate <= 200)
|
||||
|
||||
O:silicate += volume
|
||||
O:health += volume * 3
|
||||
|
||||
if(!O:silicateIcon)
|
||||
var/icon/I = icon(O.icon,O.icon_state,O.dir)
|
||||
|
||||
var/r = (volume / 100) + 1
|
||||
var/g = (volume / 70) + 1
|
||||
var/b = (volume / 50) + 1
|
||||
I.SetIntensity(r,g,b)
|
||||
O.icon = I
|
||||
O:silicateIcon = I
|
||||
else
|
||||
var/icon/I = O:silicateIcon
|
||||
|
||||
var/r = (volume / 100) + 1
|
||||
var/g = (volume / 70) + 1
|
||||
var/b = (volume / 50) + 1
|
||||
I.SetIntensity(r,g,b)
|
||||
O.icon = I
|
||||
O:silicateIcon = I
|
||||
|
||||
return*/
|
||||
var/obj/structure/window/W = O
|
||||
W.apply_silicate(volume)
|
||||
return
|
||||
|
||||
oxygen
|
||||
name = "Oxygen"
|
||||
|
||||
@@ -55,14 +55,14 @@ datum
|
||||
empulse(location, round(created_volume / 24), round(created_volume / 14), 1)
|
||||
holder.clear_reagents()
|
||||
return
|
||||
/*
|
||||
|
||||
silicate
|
||||
name = "Silicate"
|
||||
id = "silicate"
|
||||
result = "silicate"
|
||||
required_reagents = list("aluminum" = 1, "silicon" = 1, "oxygen" = 1)
|
||||
result_amount = 3
|
||||
*/
|
||||
|
||||
stoxin
|
||||
name = "Soporific"
|
||||
id = "stoxin"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
..()
|
||||
src.verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/afterattack(atom/A as mob|obj, mob/user as mob)
|
||||
/obj/item/weapon/reagent_containers/spray/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
|
||||
if(istype(A, /obj/item/weapon/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/closet) \
|
||||
|| istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart))
|
||||
return
|
||||
@@ -46,7 +46,7 @@
|
||||
user << "<span class='notice'>\The [src] is empty!</span>"
|
||||
return
|
||||
|
||||
Spray_at(A)
|
||||
Spray_at(A, user, proximity)
|
||||
|
||||
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
|
||||
@@ -61,28 +61,39 @@
|
||||
log_game("[key_name(user)] fired Space lube from \a [src].")
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/proc/Spray_at(atom/A as mob|obj)
|
||||
var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this, 1/spray_size)
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
/obj/item/weapon/reagent_containers/spray/proc/Spray_at(atom/A as mob|obj, mob/user as mob, proximity)
|
||||
if (A.density && proximity)
|
||||
A.visible_message("[usr] sprays [A] with [src].")
|
||||
var/obj/D = new/obj()
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this)
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
spawn(0)
|
||||
D.reagents.reaction(A)
|
||||
sleep(5)
|
||||
del(D)
|
||||
else
|
||||
var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this, 1/spray_size)
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
|
||||
var/turf/A_turf = get_turf(A)//BS12
|
||||
var/turf/A_turf = get_turf(A)//BS12
|
||||
|
||||
spawn(0)
|
||||
for(var/i=0, i<spray_size, i++)
|
||||
step_towards(D,A)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/T in get_turf(D))
|
||||
D.reagents.reaction(T)
|
||||
spawn(0)
|
||||
for(var/i=0, i<spray_size, i++)
|
||||
step_towards(D,A)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/T in get_turf(D))
|
||||
D.reagents.reaction(T)
|
||||
|
||||
// When spraying against the wall, also react with the wall, but
|
||||
// not its contents. BS12
|
||||
if(get_dist(D, A_turf) == 1 && A_turf.density)
|
||||
D.reagents.reaction(A_turf)
|
||||
sleep(2)
|
||||
sleep(3)
|
||||
del(D)
|
||||
// When spraying against the wall, also react with the wall, but
|
||||
// not its contents. BS12
|
||||
if(get_dist(D, A_turf) == 1 && A_turf.density)
|
||||
D.reagents.reaction(A_turf)
|
||||
sleep(2)
|
||||
sleep(3)
|
||||
del(D)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
spawned_obj.desc += " It is made of [source_material]."
|
||||
else
|
||||
spawned_obj.desc = "It is made of [source_material]."
|
||||
source_material.loc = null
|
||||
del(source_material)
|
||||
|
||||
spawn_progress_time = 0
|
||||
max_spawn_time = rand(30,100)
|
||||
|
||||
@@ -67,8 +67,7 @@
|
||||
/datum/surgery_step/open_encased/retract
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/retractor = 100, \
|
||||
/obj/item/weapon/crowbar = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
/obj/item/weapon/crowbar = 75
|
||||
)
|
||||
|
||||
min_duration = 30
|
||||
@@ -124,8 +123,7 @@
|
||||
/datum/surgery_step/open_encased/close
|
||||
allowed_tools = list(
|
||||
/obj/item/weapon/retractor = 100, \
|
||||
/obj/item/weapon/crowbar = 75, \
|
||||
/obj/item/weapon/kitchen/utensil/fork = 20
|
||||
/obj/item/weapon/crowbar = 75
|
||||
)
|
||||
|
||||
min_duration = 20
|
||||
|
||||
@@ -305,7 +305,7 @@
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] cuts off [target]'s [affected.display_name] with \the [tool].", \
|
||||
"\blue You cut off [target]'s [affected.display_name] with \the [tool].")
|
||||
affected.droplimb(1,0)
|
||||
affected.droplimb(1,1,1)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
@@ -98,7 +98,7 @@ proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool)
|
||||
//We had proper tools! (or RNG smiled.) and user did not move or change hands.
|
||||
if(prob(S.tool_quality(tool)) && do_mob(user, M, rand(S.min_duration, S.max_duration)))
|
||||
S.end_step(user, M, user.zone_sel.selecting, tool) //finish successfully
|
||||
else if (tool in user.contents && user.Adjacent(M)) //or
|
||||
else if ((tool in user.contents) && user.Adjacent(M)) //or
|
||||
S.fail_step(user, M, user.zone_sel.selecting, tool) //malpractice~
|
||||
else // This failing silently was a pain.
|
||||
user << "\red You must remain close to your patient to conduct surgery."
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
|
||||
load.forceMove(dest)
|
||||
load.set_dir(get_dir(loc, dest))
|
||||
load.anchored = initial(load.anchored)
|
||||
load.anchored = 0 //we can only load non-anchored items, so it makes sense to set this to false
|
||||
load.pixel_x = initial(load.pixel_x)
|
||||
load.pixel_y = initial(load.pixel_y)
|
||||
load.layer = initial(load.layer)
|
||||
|
||||
@@ -16,17 +16,21 @@
|
||||
uniqueID = rand(0,10000)
|
||||
..()
|
||||
|
||||
/datum/disease2/disease/proc/makerandom(var/greater=0)
|
||||
/datum/disease2/disease/proc/makerandom(var/severity=1)
|
||||
for(var/i=1 ; i <= max_stage ; i++ )
|
||||
var/datum/disease2/effectholder/holder = new /datum/disease2/effectholder
|
||||
holder.stage = i
|
||||
if(greater)
|
||||
holder.getrandomeffect(2)
|
||||
else
|
||||
holder.getrandomeffect()
|
||||
holder.getrandomeffect(severity)
|
||||
effects += holder
|
||||
uniqueID = rand(0,10000)
|
||||
infectionchance = rand(60,90)
|
||||
switch(severity)
|
||||
if(1)
|
||||
infectionchance = 1
|
||||
if(2)
|
||||
infectionchance = rand(10,20)
|
||||
else
|
||||
infectionchance = rand(60,90)
|
||||
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
spreadtype = prob(70) ? "Airborne" : "Contact"
|
||||
@@ -76,7 +80,7 @@
|
||||
clicks += 10
|
||||
|
||||
//Moving to the next stage
|
||||
if(clicks > stage*100 && prob(10))
|
||||
if(clicks > max(stage*100, 200) && prob(10))
|
||||
if(stage == max_stage)
|
||||
src.cure(mob)
|
||||
mob.antibodies |= src.antigen
|
||||
@@ -84,7 +88,8 @@
|
||||
clicks = 0
|
||||
//Do nasty effects
|
||||
for(var/datum/disease2/effectholder/e in effects)
|
||||
e.runeffect(mob,stage)
|
||||
if(prob(33))
|
||||
e.runeffect(mob,stage)
|
||||
|
||||
//Short airborne spread
|
||||
if(src.spreadtype == "Airborne")
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/datum/disease2/effectholder/proc/runeffect(var/mob/living/carbon/human/mob,var/stage)
|
||||
if(happensonce > -1 && effect.stage <= stage && prob(chance))
|
||||
effect.activate(mob)
|
||||
effect.activate(mob, multiplier)
|
||||
if(happensonce == 1)
|
||||
happensonce = -1
|
||||
|
||||
@@ -33,14 +33,14 @@
|
||||
multiplier = rand(1,effect.maxm)
|
||||
|
||||
/datum/disease2/effectholder/proc/majormutate()
|
||||
getrandomeffect(2)
|
||||
getrandomeffect(3)
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
////////////////////////EFFECTS/////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/disease2/effect
|
||||
var/chance_maxm = 50
|
||||
var/chance_maxm = 50 //note that disease effects only proc once every 3 ticks for humans
|
||||
var/name = "Blanking effect"
|
||||
var/stage = 4
|
||||
var/maxm = 1
|
||||
@@ -56,10 +56,16 @@
|
||||
|
||||
////////////////////////STAGE 4/////////////////////////////////
|
||||
|
||||
/datum/disease2/effect/nothing
|
||||
name = "Nil Syndrome"
|
||||
stage = 4
|
||||
badness = 1
|
||||
chance_maxm = 0
|
||||
|
||||
/datum/disease2/effect/gibbingtons
|
||||
name = "Gibbingtons Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
badness = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.gib()
|
||||
|
||||
@@ -67,19 +73,21 @@
|
||||
name = "Radian's Syndrome"
|
||||
stage = 4
|
||||
maxm = 3
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.radiation += (2*multiplier)
|
||||
|
||||
/datum/disease2/effect/deaf
|
||||
name = "Dead Ear Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.ear_deaf += 20
|
||||
|
||||
/datum/disease2/effect/monkey
|
||||
name = "Monkism Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
badness = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/h = mob
|
||||
@@ -88,7 +96,7 @@
|
||||
/datum/disease2/effect/suicide
|
||||
name = "Suicidal Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
badness = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.suiciding = 1
|
||||
//instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
|
||||
@@ -101,12 +109,14 @@
|
||||
/datum/disease2/effect/killertoxins
|
||||
name = "Toxification Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.adjustToxLoss(15*multiplier)
|
||||
|
||||
/datum/disease2/effect/dna
|
||||
name = "Reverse Pattern Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.bodytemperature = max(mob.bodytemperature, 350)
|
||||
scramble(0,mob,10)
|
||||
@@ -115,6 +125,7 @@
|
||||
/datum/disease2/effect/organs
|
||||
name = "Shutdown Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
@@ -140,6 +151,7 @@
|
||||
/datum/disease2/effect/immortal
|
||||
name = "Longevity Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
@@ -157,11 +169,10 @@
|
||||
var/backlash_amt = 5*multiplier
|
||||
mob.apply_damages(backlash_amt,backlash_amt,backlash_amt,backlash_amt)
|
||||
|
||||
////////////////////////STAGE 3/////////////////////////////////
|
||||
|
||||
/datum/disease2/effect/bones
|
||||
name = "Fragile Bones Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
@@ -174,6 +185,8 @@
|
||||
for (var/datum/organ/external/E in H.organs)
|
||||
E.min_broken_damage = initial(E.min_broken_damage)
|
||||
|
||||
////////////////////////STAGE 3/////////////////////////////////
|
||||
|
||||
/datum/disease2/effect/toxins
|
||||
name = "Hyperacidity"
|
||||
stage = 3
|
||||
@@ -192,9 +205,8 @@
|
||||
name = "Telepathy Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.dna.check_integrity()
|
||||
mob.dna.SetSEState(REMOTETALKBLOCK,1)
|
||||
domutcheck(mob, null)
|
||||
domutcheck(mob, null, MUTCHK_FORCED)
|
||||
|
||||
/datum/disease2/effect/mind
|
||||
name = "Lazy Mind Syndrome"
|
||||
@@ -239,10 +251,10 @@
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.apply_damage(2, CLONE)
|
||||
|
||||
|
||||
/datum/disease2/effect/groan
|
||||
name = "Groaning Syndrome"
|
||||
stage = 3
|
||||
chance_maxm = 25
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*groan")
|
||||
////////////////////////STAGE 2/////////////////////////////////
|
||||
@@ -250,6 +262,7 @@
|
||||
/datum/disease2/effect/scream
|
||||
name = "Loudness Syndrome"
|
||||
stage = 2
|
||||
chance_maxm = 25
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*scream")
|
||||
|
||||
@@ -262,6 +275,7 @@
|
||||
/datum/disease2/effect/sleepy
|
||||
name = "Resting Syndrome"
|
||||
stage = 2
|
||||
chance_maxm = 15
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*collapse")
|
||||
|
||||
@@ -288,6 +302,7 @@
|
||||
/datum/disease2/effect/fridge
|
||||
name = "Refridgerator Syndrome"
|
||||
stage = 2
|
||||
chance_maxm = 25
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*shiver")
|
||||
|
||||
@@ -333,17 +348,19 @@
|
||||
name = "Flemmingtons"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "\red Mucous runs down the back of your throat."
|
||||
mob << "<span class='warning'>Mucous runs down the back of your throat.</span>"
|
||||
|
||||
/datum/disease2/effect/drool
|
||||
name = "Saliva Effect"
|
||||
stage = 1
|
||||
chance_maxm = 25
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*drool")
|
||||
|
||||
/datum/disease2/effect/twitch
|
||||
name = "Twitcher"
|
||||
stage = 1
|
||||
chance_maxm = 25
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*twitch")
|
||||
|
||||
@@ -351,4 +368,4 @@
|
||||
name = "Headache"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class = 'notice'> Your head hurts a bit</span>"
|
||||
mob << "<span class='warning'>Your head hurts a bit.</span>"
|
||||
|
||||
@@ -1,49 +1,58 @@
|
||||
//Returns 1 if mob can be infected, 0 otherwise. Checks his clothing.
|
||||
proc/get_infection_chance(var/mob/living/carbon/M, var/vector = "Airborne")
|
||||
var/score = 0
|
||||
//Returns 1 if mob can be infected, 0 otherwise.
|
||||
proc/infection_check(var/mob/living/carbon/M, var/vector = "Airborne")
|
||||
if (!istype(M))
|
||||
return 0
|
||||
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/protection = M.getarmor(null, "bio") //gets the full body bio armour value, weighted by body part coverage.
|
||||
var/score = round(0.06*protection) //scales 100% protection to 6.
|
||||
|
||||
if (vector == "Airborne")
|
||||
if(M.internal) //not breathing infected air helps greatly
|
||||
score = 30
|
||||
if(M.wear_mask)
|
||||
score += 5
|
||||
if(istype(M:wear_mask, /obj/item/clothing/mask/surgical) && !M.internal)
|
||||
score += 10
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space))
|
||||
score += 20
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood))
|
||||
score += 30
|
||||
switch(vector)
|
||||
if("Airborne")
|
||||
if(M.internal)
|
||||
score = 6 //not breathing infected air helps greatly
|
||||
var/obj/item/I = M.wear_mask
|
||||
|
||||
//masks provide a small bonus and can replace overall bio protection
|
||||
score = max(score, round(0.06*I.armor["bio"]))
|
||||
if (istype(I, /obj/item/clothing/mask))
|
||||
score += 1 //this should be added after
|
||||
|
||||
if("Contact")
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
//gloves provide a larger bonus
|
||||
if (istype(H.gloves, /obj/item/clothing/gloves))
|
||||
score += 2
|
||||
|
||||
|
||||
if (vector == "Contact")
|
||||
if(M:gloves) score += 15
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space))
|
||||
score += 15
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood))
|
||||
score += 15
|
||||
|
||||
|
||||
// log_debug("[M]'s resistance to [vector] viruses: [score]")
|
||||
|
||||
if(score >= 30)
|
||||
if(score >= 6)
|
||||
return 0
|
||||
else if(score == 25 && prob(99))
|
||||
else if(score >= 5 && prob(99))
|
||||
return 0
|
||||
else if(score == 20 && prob(95))
|
||||
else if(score >= 4 && prob(95))
|
||||
return 0
|
||||
else if(score == 15 && prob(75))
|
||||
else if(score >= 3 && prob(75))
|
||||
return 0
|
||||
else if(score == 10 && prob(55))
|
||||
else if(score >= 2 && prob(55))
|
||||
return 0
|
||||
else if(score == 5 && prob(35))
|
||||
else if(score >= 1 && prob(35))
|
||||
return 0
|
||||
// log_debug("Infection got through")
|
||||
return 1
|
||||
|
||||
//Similar to infection check, but used for when M is spreading the virus.
|
||||
/proc/infection_spreading_check(var/mob/living/carbon/M, var/vector = "Airborne")
|
||||
if (!istype(M))
|
||||
return 0
|
||||
|
||||
var/protection = M.getarmor(null, "bio") //gets the full body bio armour value, weighted by body part coverage.
|
||||
|
||||
if (vector == "Airborne")
|
||||
var/obj/item/I = M.wear_mask
|
||||
if (istype(I))
|
||||
protection = max(protection, round(0.06*I.armor["bio"]))
|
||||
|
||||
return prob(protection)
|
||||
|
||||
//Checks if table-passing table can reach target (5 tile radius)
|
||||
proc/airborne_can_reach(turf/source, turf/target)
|
||||
var/obj/dummy = new(source)
|
||||
@@ -72,44 +81,42 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
return
|
||||
if(M.reagents.has_reagent("spaceacillin"))
|
||||
return
|
||||
|
||||
if(istype(M,/mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/chimp = M
|
||||
if (!(chimp.greaterform in disease.affected_species))
|
||||
return
|
||||
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/chump = M
|
||||
if (!(chump.species.name in disease.affected_species))
|
||||
return
|
||||
|
||||
if(!disease.affected_species.len)
|
||||
return
|
||||
|
||||
if (!(M.species.name in disease.affected_species))
|
||||
if (forced)
|
||||
disease.affected_species[1] = M.species.name
|
||||
else
|
||||
return //not compatible with this species
|
||||
|
||||
// log_debug("Infecting [M]")
|
||||
|
||||
if(prob(disease.infectionchance) || forced)
|
||||
// certain clothes can prevent an infection
|
||||
if(!forced && !get_infection_chance(M, disease.spreadtype))
|
||||
return
|
||||
|
||||
if(forced || (infection_check(M, disease.spreadtype) && prob(disease.infectionchance)))
|
||||
var/datum/disease2/disease/D = disease.getcopy()
|
||||
D.minormutate()
|
||||
// log_debug("Adding virus")
|
||||
M.virus2["[D.uniqueID]"] = D
|
||||
M.hud_updateflag |= 1 << STATUS_HUD
|
||||
|
||||
|
||||
//Infects mob M with disease D
|
||||
/proc/infect_mob(var/mob/living/carbon/M, var/datum/disease2/disease/D)
|
||||
infect_virus2(M,D,1)
|
||||
M.hud_updateflag |= 1 << STATUS_HUD
|
||||
|
||||
//Infects mob M with random lesser disease, if he doesn't have one
|
||||
/proc/infect_mob_random_lesser(var/mob/living/carbon/M)
|
||||
var/datum/disease2/disease/D = new /datum/disease2/disease
|
||||
D.makerandom()
|
||||
D.infectionchance = 1
|
||||
infect_virus2(M,D,1)
|
||||
M.hud_updateflag |= 1 << STATUS_HUD
|
||||
D.makerandom(1)
|
||||
infect_mob(M, D)
|
||||
|
||||
//Infects mob M with random greated disease, if he doesn't have one
|
||||
/proc/infect_mob_random_greater(var/mob/living/carbon/M)
|
||||
var/datum/disease2/disease/D = new /datum/disease2/disease
|
||||
D.makerandom(1)
|
||||
infect_virus2(M,D,1)
|
||||
M.hud_updateflag |= 1 << STATUS_HUD
|
||||
D.makerandom(2)
|
||||
infect_mob(M, D)
|
||||
|
||||
//Fancy prob() function.
|
||||
/proc/dprob(var/p)
|
||||
@@ -125,12 +132,15 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
// log_debug("Attempting virus [ID]")
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
if(V.spreadtype != vector) continue
|
||||
|
||||
//It's hard to get other people sick if you're in an airtight suit.
|
||||
if(!infection_spreading_check(src, V.spreadtype)) continue
|
||||
|
||||
if (vector == "Airborne")
|
||||
if(airborne_can_reach(get_turf(src), get_turf(victim)))
|
||||
// log_debug("In range, infecting")
|
||||
infect_virus2(victim,V)
|
||||
else
|
||||
// else
|
||||
// log_debug("Could not reach target")
|
||||
|
||||
if (vector == "Contact")
|
||||
@@ -147,7 +157,7 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
var/mob/living/carbon/human/H = victim
|
||||
var/datum/organ/external/select_area = H.get_organ(src.zone_sel.selecting)
|
||||
var/list/clothes = list(H.head, H.wear_mask, H.wear_suit, H.w_uniform, H.gloves, H.shoes)
|
||||
for(var/obj/item/clothing/C in clothes )
|
||||
for(var/obj/item/clothing/C in clothes)
|
||||
if(C && istype(C))
|
||||
if(C.body_parts_covered & select_area.body_part)
|
||||
nudity = 0
|
||||
@@ -155,4 +165,5 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
for (var/ID in victim.virus2)
|
||||
var/datum/disease2/disease/V = victim.virus2[ID]
|
||||
if(V && V.spreadtype != vector) continue
|
||||
if(!infection_spreading_check(victim, V.spreadtype)) continue
|
||||
infect_virus2(src,V)
|
||||
|
||||
Reference in New Issue
Block a user