Merge remote-tracking branch 'origin/dev' into dev

Conflicts:
	code/modules/virus2/helpers.dm
This commit is contained in:
Zulker Nayeen Nahiyan
2015-01-19 02:15:38 +06:00
69 changed files with 666 additions and 483 deletions
+1
View File
@@ -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>
+9 -7
View File
@@ -608,12 +608,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 +628,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"
+10
View File
@@ -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")
+2 -2
View File
@@ -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
+8 -7
View File
@@ -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>"
+4 -23
View File
@@ -31,30 +31,11 @@
bundle = W
bundle.worth += src.worth
bundle.update_icon()
if (!istype(src.loc, /turf) && istype(user, /mob/living/carbon/human))
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/h_user = user
if(h_user.r_hand == src)
h_user.drop_from_inventory(src)
h_user.put_in_r_hand(bundle)
else if(h_user.l_hand == src)
h_user.drop_from_inventory(src)
h_user.put_in_l_hand(bundle)
else if (h_user.l_store == src)
h_user.drop_from_inventory(src)
bundle.loc = h_user
bundle.layer = 20
h_user.l_store = bundle
h_user.update_inv_pockets()
else if (h_user.r_store == src)
h_user.drop_from_inventory(src)
bundle.loc = h_user
bundle.layer = 20
h_user.r_store = bundle
h_user.update_inv_pockets()
else
src.loc = get_turf(h_user)
if(h_user.client) h_user.client.screen -= src
h_user.put_in_hands(bundle)
h_user.drop_from_inventory(src)
h_user.drop_from_inventory(bundle)
h_user.put_in_hands(bundle)
user << "<span class='notice'>You add [src.worth] Thalers worth of money to the bundles.<br>It holds [bundle.worth] Thalers now.</span>"
del(src)
+16 -8
View File
@@ -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)
+17 -17
View File
@@ -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
+9 -1
View File
@@ -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)
+2 -1
View File
@@ -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()
+4 -4
View File
@@ -30,12 +30,12 @@
/datum/event/radiation_storm/proc/radiate()
for(var/mob/living/carbon/C in living_mob_list)
var/turf/T = get_turf(C)
if(!T)
var/area/A = get_area(C)
if(!A)
continue
if(!(T.z in config.station_levels))
if(!(A.z in config.station_levels))
continue
if(istype(T.loc, /area/maintenance) || istype(T.loc, /area/crew_quarters))
if(A.rad_shielded)
continue
if(istype(C,/mob/living/carbon/human))
+29 -3
View File
@@ -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--
@@ -120,7 +120,7 @@
else
msg += "[t_He] [t_has] \icon[gloves] \a [gloves] on [t_his] hands.\n"
else if(blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] blood-stained hands!</span>\n"
msg += "<span class='warning'>[t_He] [t_has] [(hand_blood_color != "#030303") ? "blood" : "oil"]-stained hands!</span>\n"
//handcuffed?
@@ -145,7 +145,7 @@
else
msg += "[t_He] [t_is] wearing \icon[shoes] \a [shoes] on [t_his] feet.\n"
else if(feet_blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] blood-stained feet!</span>\n"
msg += "<span class='warning'>[t_He] [t_has] [(feet_blood_color != "#030303") ? "blood" : "oil"]-stained feet!</span>\n"
//mask
if(wear_mask && !skipmask)
@@ -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>")
@@ -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)
@@ -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()
+17 -26
View File
@@ -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,4 @@ 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>"
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++
@@ -113,7 +113,11 @@
/mob/living/simple_animal/hostile/proc/ListTargets(var/dist = 7)
var/list/L = hearers(src, dist)
L += mechas_list
for (var/obj/mecha/M in mechas_list)
if (get_dist(src, M) <= dist)
L += M
return L
/mob/living/simple_animal/hostile/death()
+2
View File
@@ -360,6 +360,8 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return
M.shakecamera = 1
spawn(1)
if(!M.client)
return
var/atom/oldeye=M.client.eye
var/aiEyeFlag = 0
+13 -22
View File
@@ -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"])
+6 -6
View File
@@ -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)
+10 -3
View File
@@ -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>"
+3
View File
@@ -79,6 +79,9 @@ display round(lastgen) and phorontank amount
icon_state = initial(icon_state)
handleInactive()
/obj/machinery/power/powered()
return 1 //doesn't require an external power source
/obj/machinery/power/port_gen/attack_hand(mob/user as mob)
if(..())
return
@@ -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
+9 -2
View File
@@ -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"] )
+26 -26
View File
@@ -187,20 +187,20 @@
max_energy = 100
dispensable_reagents = list("water","ice","coffee","cream","tea","icetea","cola","spacemountainwind","dr_gibb","space_up","tonic","sodawater","lemon_lime","sugar","orangejuice","limejuice","watermelonjuice")
/obj/machinery/chem_dispenser/soda/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob)
..()
if(istype(B, /obj/item/device/multitool))
if(hackedcheck == 0)
user << "You change the mode from 'McNano' to 'Pizza King'."
dispensable_reagents += list("thirteenloko","grapesoda")
hackedcheck = 1
return
/obj/machinery/chem_dispenser/soda/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob)
..()
if(istype(B, /obj/item/device/multitool))
if(hackedcheck == 0)
user << "You change the mode from 'McNano' to 'Pizza King'."
dispensable_reagents += list("thirteenloko","grapesoda")
hackedcheck = 1
return
else
user << "You change the mode from 'Pizza King' to 'McNano'."
dispensable_reagents -= list("thirteenloko")
hackedcheck = 0
return
else
user << "You change the mode from 'Pizza King' to 'McNano'."
dispensable_reagents -= list("thirteenloko","grapesoda")
hackedcheck = 0
return
/obj/machinery/chem_dispenser/beer
icon_state = "booze_dispenser"
@@ -212,21 +212,21 @@
desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one."
dispensable_reagents = list("lemon_lime","sugar","orangejuice","limejuice","sodawater","tonic","beer","kahlua","whiskey","wine","vodka","gin","rum","tequilla","vermouth","cognac","ale","mead")
/obj/machinery/chem_dispenser/beer/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob)
..()
/obj/machinery/chem_dispenser/beer/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob)
..()
if(istype(B, /obj/item/device/multitool))
if(hackedcheck == 0)
user << "You disable the 'nanotrasen-are-cheap-bastards' lock, enabling hidden and very expensive boozes."
dispensable_reagents += list("goldschlager","patron","watermelonjuice","berryjuice")
hackedcheck = 1
return
if(istype(B, /obj/item/device/multitool))
if(hackedcheck == 0)
user << "You disable the 'nanotrasen-are-cheap-bastards' lock, enabling hidden and very expensive boozes."
dispensable_reagents += list("goldschlager","patron","watermelonjuice","berryjuice")
hackedcheck = 1
return
else
user << "You re-enable the 'nanotrasen-are-cheap-bastards' lock, disabling hidden and very expensive boozes."
dispensable_reagents -= list("goldschlager","patron","watermelonjuice","berryjuice")
hackedcheck = 0
return
else
user << "You re-enable the 'nanotrasen-are-cheap-bastards' lock, disabling hidden and very expensive boozes."
dispensable_reagents -= list("goldschlager","patron","watermelonjuice","berryjuice")
hackedcheck = 0
return
/obj/machinery/chem_dispenser/meds
name = "chem dispenser magic"
+1 -1
View File
@@ -185,7 +185,7 @@ datum/tech/materials
datum/tech/engineering
name = "Engineering Research"
desc = "Development of new and improved engineering parts and."
desc = "Development of new and improved engineering parts."
id = "engineering"
datum/tech/phorontech
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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."
+11 -7
View File
@@ -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
+29 -12
View File
@@ -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>"
+20 -17
View File
@@ -72,16 +72,15 @@ 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]")
@@ -96,20 +95,24 @@ proc/airborne_can_reach(turf/source, turf/target)
M.virus2["[D.uniqueID]"] = D
BITSET(M.hud_updateflag, 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)
BITSET(M.hud_updateflag, 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)
BITSET(M.hud_updateflag, STATUS_HUD)
D.makerandom(2)
infect_mob(M, D)
//Fancy prob() function.
/proc/dprob(var/p)