-tg- disease1

Wee! Readds Disease1, kills off disease2, and finally removes poop.dmi
(fucking piece of shit)

Needs WAY more testing, most of which I don't know how to do yet, because
I've never used this system. Fun!

Changes:
 - Virus2 has been removed completely.
  - Some symptoms have not been readded. Aka, none of them have been
    readded, I just wanted to get this shit ported.
  - Virology has been updated slightly to mirror -tg-'s boxstation, as the
    virus2 machines are gone.
 - Welcome back, disease1
  - The centrifuge, vials, splicer, analyzer, growerthing, have all been
    replaced by the PanD.E.M.I.C. 2220
  - No symptoms have been completely removed; However, vision symptoms
    have been disabled pending byond 510, and genetics symptoms have been
    disabled until "when I figure out how to fix them".
  - Advanced Mutation Toxin now uses a disease, which turns people from
    species, to slime person, to slime. Slime people are instantly turned
    to a slime.
  - Diseased touch now give people appendicitis. Yes, they VANT YOUR...
    appendix.
  - Virology now has a fridge with the following in it:
    - Antiviral Syringes
    - 1 Rhinovirus culture
    - 1 Flu culture
    - 1 Bottle of Mutagen
    - 1 Bottle of Plasma
    - 1 Bottle of Synaptizine
  - A few more things, which I can't remember and can't look at while writing
    this commit. Sometimes, git hurts.

TODO:
 - Test more shit and figure out how the PanD.E.M.I.C. works/is supposed to
   work.
 - Fix genetics symptoms.
 - Give vampires a less shitty diseased touch.
 - Add appendicitis event.
 -
This commit is contained in:
Tigercat2000
2016-03-27 21:24:00 -07:00
parent b40a6d2573
commit ad2cf86898
120 changed files with 4818 additions and 3432 deletions
+38 -15
View File
@@ -92,6 +92,42 @@
#undef STOMACH_ATTACK_DELAY
/mob/living/carbon/proc/vomit(var/lost_nutrition = 10, var/blood = 0, var/stun = 1, var/distance = 0, var/message = 1)
if(src.is_muzzled())
if(message)
src << "<span class='warning'>The muzzle prevents you from vomiting!</span>"
return 0
if(stun)
Stun(4)
if(nutrition < 100 && !blood)
if(message)
visible_message("<span class='warning'>[src] dry heaves!</span>", \
"<span class='userdanger'>You try to throw up, but there's nothing your stomach!</span>")
if(stun)
Weaken(10)
else
if(message)
visible_message("<span class='danger'>[src] throws up!</span>", \
"<span class='userdanger'>You throw up!</span>")
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
var/turf/T = get_turf(src)
for(var/i=0 to distance)
if(blood)
if(T)
T.add_blood_floor(src)
if(stun)
adjustBruteLoss(3)
else
if(T)
T.add_vomit_floor(src)
nutrition -= lost_nutrition
if(stun)
adjustToxLoss(-3)
T = get_step(T, dir)
if (is_blocked_turf(T))
break
return 1
/mob/living/carbon/gib()
for(var/obj/item/organ/internal/I in internal_organs)
if(isturf(loc))
@@ -107,19 +143,6 @@
visible_message("<span class='danger'>[M] bursts out of [src]!</span>")
. = ..()
/mob/living/carbon/attack_hand(mob/M as mob)
if(!istype(M, /mob/living/carbon)) return
if (ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if (H.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
H << "\red You can't use your [temp.name]"
return
return
/mob/living/carbon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, override = 0, tesla_shock = 0)
if(status_flags & GODMODE) //godmode
return 0
@@ -546,12 +569,12 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
/mob/living/carbon/show_inv(mob/user)
user.set_machine(src)
var/dat = {"<table>
<tr><td><B>Left Hand:</B></td><td><A href='?src=\ref[src];item=[slot_l_hand]'>[(l_hand && !(l_hand.flags&ABSTRACT)) ? l_hand : "<font color=grey>Empty</font>"]</A></td></tr>
<tr><td><B>Right Hand:</B></td><td><A href='?src=\ref[src];item=[slot_r_hand]'>[(r_hand && !(r_hand.flags&ABSTRACT)) ? r_hand : "<font color=grey>Empty</font>"]</A></td></tr>
<tr><td>&nbsp;</td></tr>"}
dat += "<tr><td><B>Back:</B></td><td><A href='?src=\ref[src];item=[slot_back]'>[(back && !(back.flags&ABSTRACT)) ? back : "<font color=grey>Empty</font>"]</A>"
if(istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank))
dat += "&nbsp;<A href='?src=\ref[src];internal=[slot_back]'>[internal ? "Disable Internals" : "Set Internals"]</A>"
@@ -23,4 +23,17 @@
for(var/datum/surgery/S in surgeries)
if(S.next_step(user, src))
return 1
..()
..()
/mob/living/carbon/attack_hand(mob/living/carbon/human/user)
if(!iscarbon(user))
return
for(var/datum/disease/D in viruses)
if(D.IsSpreadByTouch())
user.ContractDisease(D)
for(var/datum/disease/D in user.viruses)
if(D.IsSpreadByTouch())
ContractDisease(D)
return 0
@@ -4,7 +4,6 @@
var/list/stomach_contents = list()
var/list/internal_organs = list()
var/brain_op_stage = 0.0
var/list/datum/disease2/disease/virus2 = list()
var/antibodies = 0
var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm
@@ -789,8 +789,6 @@
for(var/mob/M in range(location,aoe_range))
if (M.internal != null && M.wear_mask && (M.wear_mask.flags & AIRTIGHT))
continue
if(!airborne_can_reach(location,M,aoe_range))
continue
// Now, we don't have this:
//new /obj/effects/fart_cloud(T,L)
// But:
@@ -161,9 +161,6 @@
if(ismob(AM))
var/mob/tmob = AM
if(iscarbon(tmob) && prob(10))
spread_disease_to(tmob, "Contact")
//BubbleWrap - Should stop you pushing a restrained person out of the way
//i still don't get it, is this supposed to be 'bubblewrapping' or was it made by a guy named 'BubbleWrap'
if(ishuman(tmob))
@@ -1246,44 +1243,6 @@
return 0
return 1
/mob/living/carbon/human/proc/vomit(hairball=0)
if(stat==DEAD)return
if(!check_has_mouth())
return
if(!lastpuke)
lastpuke = 1
src << "<spawn class='warning'>You feel nauseous..."
spawn(150) //15 seconds until second warning
src << "<spawn class='warning'>You feel like you are about to throw up!"
spawn(100) //and you have 10 more for mad dash to the bucket
Stun(5)
if(hairball)
src.visible_message("<span class='warning'>[src] hacks up a hairball!</span>","<span class='warning'>You hack up a hairball!</span>")
else
src.visible_message("<span class='warning'>[src] throws up!</span>","<span class='warning'>You throw up!</span>")
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
var/turf/location = loc
if (istype(location, /turf/simulated))
location.add_vomit_floor(src, 1)
var/stomach_len = src.stomach_contents.len
if (stomach_len)
var/content = src.stomach_contents[stomach_len]
if (istype(content, /atom/movable))
var/atom/movable/AM = content
src.stomach_contents.Remove(AM)
AM.loc = location
if(!hairball)
nutrition -= 40
adjustToxLoss(-3)
spawn(350) //wait 35 seconds before next volley
lastpuke = 0
/mob/living/carbon/human/proc/get_visible_gender()
if(wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT && ((head && head.flags_inv & HIDEMASK) || wear_mask))
@@ -1315,12 +1274,6 @@
H.brainmob.mind.transfer_to(src)
qdel(H)
for (var/ID in virus2)
var/datum/disease2/disease/V = virus2[ID]
V.cure(src)
..()
/mob/living/carbon/human/proc/is_lung_ruptured()
@@ -48,10 +48,6 @@
apply_effect(4, WEAKEN, armor_block)
return
else
if(istype(M,/mob/living/carbon))
// log_debug("No gloves, [M] is truing to infect [src]")
M.spread_disease_to(src, "Contact")
var/datum/martial_art/attacker_style = M.martial_art
+26 -82
View File
@@ -64,8 +64,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
update_mutations()
check_mutations=0
handle_virus_updates()
handle_shock()
handle_pain()
handle_heartbeat()
@@ -345,12 +343,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(breath)
loc.assume_air(breath)
//spread virus2
if(virus2.len > 0)
if(prob(10) && get_infection_chance(src))
for(var/mob/living/carbon/M in view(1,src))
src.spread_disease_to(M)
// USED IN DEATHWHISPERS
@@ -952,7 +944,23 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
// Puke if toxloss is too high
if(!stat)
if (getToxLoss() >= 45 && nutrition > 20)
vomit()
lastpuke ++
if(lastpuke >= 25) // about 25 second delay I guess
Stun(5)
visible_message("<span class='danger'>[src] throws up!</span>", \
"<span class='userdanger'>[src] throws up!</span>")
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
var/turf/location = loc
if (istype(location, /turf/simulated))
location.add_vomit_floor(src, 1)
nutrition -= 20
adjustToxLoss(-3)
// make it so you can only puke so fast
lastpuke = 0
//0.1% chance of playing a scary sound to someone who's in complete darkness
if(isturf(loc) && rand(1,1000) == 1)
@@ -961,69 +969,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(L && L.lum_r + L.lum_g + L.lum_b == 0)
playsound_local(src,pick(scarySounds),50, 1, -1)
// Separate proc so we can jump out of it when we've succeeded in spreading disease.
/mob/living/carbon/human/proc/findAirborneVirii()
for(var/obj/effect/decal/cleanable/blood/B in get_turf(src))
if(B.virus2.len)
for (var/ID in B.virus2)
var/datum/disease2/disease/V = B.virus2[ID]
if (infect_virus2(src,V))
return 1
for(var/obj/effect/decal/cleanable/mucus/M in get_turf(src))
if(M.virus2.len)
for (var/ID in M.virus2)
var/datum/disease2/disease/V = M.virus2[ID]
if (infect_virus2(src,V))
return 1
for(var/obj/effect/decal/cleanable/poop/P in get_turf(src))
if(P.virus2.len)
for (var/ID in P.virus2)
var/datum/disease2/disease/V = P.virus2[ID]
if (infect_virus2(src,V))
return 1
return 0
/mob/living/carbon/human/proc/handle_virus_updates()
if(status_flags & GODMODE) return 0 //godmode
if(bodytemperature > 406)
for (var/ID in virus2)
var/datum/disease2/disease/V = virus2[ID]
V.cure(src)
if(mob_master.current_cycle % 3) //don't spam checks over all objects in view every tick.
for(var/obj/effect/decal/cleanable/O in view(1,src))
if(istype(O,/obj/effect/decal/cleanable/blood))
var/obj/effect/decal/cleanable/blood/B = O
if(B.virus2.len)
for (var/ID in B.virus2)
var/datum/disease2/disease/V = B.virus2[ID]
infect_virus2(src,V.getcopy())
else if(istype(O,/obj/effect/decal/cleanable/mucus))
var/obj/effect/decal/cleanable/mucus/M = O
if(M.virus2.len)
for (var/ID in M.virus2)
var/datum/disease2/disease/V = M.virus2[ID]
infect_virus2(src,V.getcopy())
for (var/ID in virus2)
var/datum/disease2/disease/V = virus2[ID]
if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
CRASH("virus2 nulled before calling activate()")
else
V.activate(src)
// activate may have deleted the virus
if(!V) continue
// check if we're immune
if(V.antigen & src.antibodies)
V.dead = 1
return
/mob/living/carbon/human/handle_changeling()
if(mind)
if(mind.changeling)
@@ -1157,16 +1102,15 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
for(var/mob/living/carbon/human/H in range(decaylevel, src))
if(prob(5))
if(airborne_can_reach(get_turf(src), get_turf(H)))
if(istype(loc,/obj/item/bodybag))
return
var/obj/item/clothing/mask/M = H.wear_mask
if(M && (M.flags & MASKCOVERSMOUTH))
return
if(H.species && H.species.flags & NO_BREATHE)
return //no puking if you can't smell!
H << "<spawn class='warning'>You smell something foul..."
H.fakevomit()
if(istype(loc,/obj/item/bodybag))
return
var/obj/item/clothing/mask/M = H.wear_mask
if(M && (M.flags & MASKCOVERSMOUTH))
return
if(H.species && H.species.flags & NO_BREATHE)
return //no puking if you can't smell!
H << "<spawn class='warning'>You smell something foul..."
H.fakevomit()
/mob/living/carbon/human/proc/handle_heartbeat()
var/client/C = src.client
+1 -6
View File
@@ -84,12 +84,7 @@
if(breath)
loc.assume_air(breath)
//spread virus2
if(virus2.len > 0)
if(prob(10) && get_infection_chance(src))
for(var/mob/living/carbon/M in view(1,src))
src.spread_disease_to(M)
air_update_turf()
//Third link in a breath chain, calls handle_breath_temperature()
/mob/living/carbon/proc/check_breath(datum/gas_mixture/breath)
+3
View File
@@ -386,6 +386,9 @@
C.handcuffed = initial(C.handcuffed)
C.heart_attack = 0
for(var/datum/disease/D in C.viruses)
D.cure(0)
// restore all of the human's blood and reset their shock stage
if(ishuman(src))
var/mob/living/carbon/human/human_mob = src
+2 -10
View File
@@ -6,6 +6,8 @@
hud_used = null
if(mind && mind.current == src)
spellremove(src)
for(var/infection in viruses)
qdel(infection)
ghostize()
for(var/mob/dead/observer/M in following_mobs)
M.following = null
@@ -1383,16 +1385,6 @@ mob/proc/yank_out_object()
location.add_vomit_floor(src, 1)
playsound(location, 'sound/effects/splat.ogg', 50, 1)
/mob/proc/fakepoop() //for aesthetic craps. Whyyyyy -Fox
if(stat==DEAD)
return
var/turf/location = loc
if (istype(location, /turf/simulated))
src.visible_message("<span class='warning'>[src] has explosive diarrhea all over the floor!</span>","<span class='warning'>You have explosive diarrhea all over the floor!</span>")
location.add_poop_floor()
playsound(location, 'sound/effects/splat.ogg', 50, 1)
/mob/proc/adjustEarDamage()
return
+2 -2
View File
@@ -194,8 +194,8 @@
//List of active diseases
var/viruses = list() // replaces var/datum/disease/virus
var/list/viruses = list() // replaces var/datum/disease/virus
var/list/resistances = list()
mouse_drag_pointer = MOUSE_ACTIVE_POINTER