Merge branch 'master' into upstream-merge-32311

This commit is contained in:
LetterJay
2017-12-29 18:38:50 -06:00
committed by GitHub
302 changed files with 4918 additions and 20468 deletions
+2 -13
View File
@@ -344,19 +344,6 @@
/datum/action/item_action/change
name = "Change"
/datum/action/item_action/nano_picket_sign
name = "Retext Nano Picket Sign"
var/obj/item/picket_sign/S
/datum/action/item_action/nano_picket_sign/New(Target)
..()
if(istype(Target, /obj/item/picket_sign))
S = Target
/datum/action/item_action/nano_picket_sign/Trigger()
if(istype(S))
S.retext(owner)
/datum/action/item_action/adjust
/datum/action/item_action/adjust/New(Target)
@@ -490,6 +477,8 @@
return FALSE
return TRUE
/datum/action/spell_action/spell
/datum/action/spell_action/spell/IsAvailable()
if(!target)
return FALSE
+12 -12
View File
@@ -1,12 +1,12 @@
/datum/action/item_action/zoom_speed_action
name = "Toggle Zooming Speed"
icon_icon = 'icons/mob/actions/actions_spells.dmi'
button_icon_state = "projectile"
background_icon_state = "bg_tech"
/datum/action/item_action/zoom_lock_action
name = "Switch Zoom Mode"
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "zoom_mode"
background_icon_state = "bg_tech"
/datum/action/item_action/zoom_speed_action
name = "Toggle Zooming Speed"
icon_icon = 'icons/mob/actions/actions_spells.dmi'
button_icon_state = "projectile"
background_icon_state = "bg_tech"
/datum/action/item_action/zoom_lock_action
name = "Switch Zoom Mode"
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "zoom_mode"
background_icon_state = "bg_tech"
+2
View File
@@ -1,3 +1,5 @@
/datum/action/item_action/flightsuit
icon_icon = 'icons/mob/actions/actions_flightsuit.dmi'
+2 -1
View File
@@ -223,7 +223,8 @@
if(verbose)
to_chat(user, "<span class='warning'>[target] is not compatible with our biology.</span>")
return
if((target.has_disability(NOCLONE)) || (target.has_disability(NOCLONE)))
if((target.has_disability(DISABILITY_NOCLONE)) || (target.has_disability(DISABILITY_NOCLONE)))
if(verbose)
to_chat(user, "<span class='warning'>DNA of [target] is ruined beyond usability!</span>")
return
+17 -17
View File
@@ -7,14 +7,14 @@
name = "Monkey"
job_rank = ROLE_MONKEY
roundend_category = "monkeys"
var/datum/objective_team/monkey/monkey_team
var/datum/team/monkey/monkey_team
/datum/antagonist/monkey/on_gain()
. = ..()
SSticker.mode.ape_infectees += owner
owner.special_role = "Infected Monkey"
var/datum/disease/D = new /datum/disease/transformation/jungle_fever
var/datum/disease/D = new /datum/disease/transformation/jungle_fever/monkeymode
if(!owner.current.HasDisease(D))
D.affected_mob = owner
owner.current.viruses += D
@@ -38,13 +38,13 @@
if(D)
D.cure()
/datum/antagonist/monkey/create_team(datum/objective_team/monkey/new_team)
/datum/antagonist/monkey/create_team(datum/team/monkey/new_team)
if(!new_team)
for(var/datum/antagonist/monkey/N in get_antagonists(/datum/antagonist/monkey, TRUE))
if(N.monkey_team)
monkey_team = N.monkey_team
return
monkey_team = new /datum/objective_team/monkey
monkey_team = new /datum/team/monkey
monkey_team.update_objectives()
return
if(!istype(new_team))
@@ -60,9 +60,6 @@
/datum/antagonist/monkey/leader/on_gain()
. = ..()
var/datum/disease/D = (/datum/disease/transformation/jungle_fever in owner.current.viruses)
if(D)
D.visibility_flags = HIDDEN_SCANNER|HIDDEN_PANDEMIC
var/obj/item/organ/heart/freedom/F = new
F.Insert(owner.current, drop_if_replaced = FALSE)
SSticker.mode.ape_leaders += owner
@@ -99,45 +96,45 @@
return TRUE
return FALSE
/datum/objective_team/monkey
/datum/team/monkey
name = "Monkeys"
/datum/objective_team/monkey/proc/update_objectives()
/datum/team/monkey/proc/update_objectives()
objectives = list()
var/datum/objective/monkey/O = new /datum/objective/monkey()
O.team = src
objectives += O
return
/datum/objective_team/monkey/proc/infected_monkeys_alive()
/datum/team/monkey/proc/infected_monkeys_alive()
var/datum/disease/D = new /datum/disease/transformation/jungle_fever()
for(var/mob/living/carbon/monkey/M in GLOB.alive_mob_list)
if(M.HasDisease(D))
return TRUE
return FALSE
/datum/objective_team/monkey/proc/infected_monkeys_escaped()
/datum/team/monkey/proc/infected_monkeys_escaped()
var/datum/disease/D = new /datum/disease/transformation/jungle_fever()
for(var/mob/living/carbon/monkey/M in GLOB.alive_mob_list)
if(M.HasDisease(D) && (M.onCentCom() || M.onSyndieBase()))
return TRUE
return FALSE
/datum/objective_team/monkey/proc/infected_humans_escaped()
/datum/team/monkey/proc/infected_humans_escaped()
var/datum/disease/D = new /datum/disease/transformation/jungle_fever()
for(var/mob/living/carbon/human/M in GLOB.alive_mob_list)
if(M.HasDisease(D) && (M.onCentCom() || M.onSyndieBase()))
return TRUE
return FALSE
/datum/objective_team/monkey/proc/infected_humans_alive()
/datum/team/monkey/proc/infected_humans_alive()
var/datum/disease/D = new /datum/disease/transformation/jungle_fever()
for(var/mob/living/carbon/human/M in GLOB.alive_mob_list)
if(M.HasDisease(D))
return TRUE
return FALSE
/datum/objective_team/monkey/proc/get_result()
/datum/team/monkey/proc/get_result()
if(infected_monkeys_escaped())
return MONKEYS_ESCAPED
if(infected_monkeys_alive())
@@ -146,7 +143,7 @@
return DISEASE_LIVED
return MONKEYS_DIED
/datum/objective_team/monkey/roundend_report()
/datum/team/monkey/roundend_report()
var/list/parts = list()
switch(get_result())
if(MONKEYS_ESCAPED)
@@ -161,10 +158,13 @@
if(MONKEYS_DIED)
parts += "<span class='redtext big'><B>Monkey Major Defeat!</B></span>"
parts += "<span class='redtext'><B>All the monkeys died, and Jungle Fever was wiped out!</B></span>"
if(LAZYLEN(SSticker.mode.ape_leaders))
var/list/leaders = get_antagonists(/datum/antagonist/monkey/leader, TRUE)
var/list/monkeys = get_antagonists(/datum/antagonist/monkey, TRUE)
if(LAZYLEN(leaders))
parts += "<span class='header'>The monkey leaders were:</span>"
parts += printplayerlist(SSticker.mode.ape_leaders)
if(LAZYLEN(SSticker.mode.ape_infectees))
if(LAZYLEN(monkeys))
parts += "<span class='header'>The monkeys were:</span>"
parts += printplayerlist(SSticker.mode.ape_infectees)
return "<div class='panel redborder'>[parts.Join("<br>")]</div>"
+2 -2
View File
@@ -42,7 +42,7 @@
lose_text = "<span class='notice'>You feel smart again.</span>"
/datum/brain_trauma/mild/dumbness/on_gain()
owner.add_disability(DUMB, TRAUMA_DISABILITY)
owner.add_disability(DISABILITY_DUMB, TRAUMA_DISABILITY)
..()
/datum/brain_trauma/mild/dumbness/on_life()
@@ -54,7 +54,7 @@
..()
/datum/brain_trauma/mild/dumbness/on_lose()
owner.remove_disability(DUMB, TRAUMA_DISABILITY)
owner.remove_disability(DISABILITY_DUMB, TRAUMA_DISABILITY)
owner.derpspeech = 0
..()
+1 -1
View File
@@ -68,7 +68,7 @@
return
/datum/brain_trauma/mild/phobia/on_hear(message, speaker, message_language, raw_message, radio_freq)
if(owner.disabilities & DEAF || world.time < next_scare) //words can't trigger you if you can't hear them *taps head*
if(owner.has_disability(DISABILITY_DEAF) || world.time < next_scare) //words can't trigger you if you can't hear them *taps head*
return message
for(var/word in trigger_words)
if(findtext(message, word))
+15 -24
View File
@@ -12,11 +12,11 @@
lose_text = "<span class='notice'>You suddenly remember how to speak.</span>"
/datum/brain_trauma/severe/mute/on_gain()
owner.add_disability(MUTE, TRAUMA_DISABILITY)
owner.add_disability(DISABILITY_MUTE, TRAUMA_DISABILITY)
..()
/datum/brain_trauma/severe/mute/on_lose()
owner.remove_disability(MUTE, TRAUMA_DISABILITY)
owner.remove_disability(DISABILITY_MUTE, TRAUMA_DISABILITY)
..()
/datum/brain_trauma/severe/aphasia
@@ -50,11 +50,17 @@
lose_text = "<span class='notice'>Your vision returns.</span>"
/datum/brain_trauma/severe/blindness/on_gain()
owner.become_blind(TRAUMA_DISABILITY)
owner.become_blind()
..()
//no fiddling with genetics to get out of this one
/datum/brain_trauma/severe/blindness/on_life()
if(!(owner.disabilities & BLIND))
on_gain()
..()
/datum/brain_trauma/severe/blindness/on_lose()
owner.cure_blind(TRAUMA_DISABILITY)
owner.cure_blind()
..()
/datum/brain_trauma/severe/paralysis
@@ -120,7 +126,7 @@
stress -= 4
/datum/brain_trauma/severe/monophobia/proc/check_alone()
if(owner.has_disability(BLIND))
if(owner.has_disability(DISABILITY_BLIND))
return TRUE
for(var/mob/M in oview(owner, 7))
if(!isliving(M)) //ghosts ain't people
@@ -182,11 +188,11 @@
lose_text = "<span class='notice'>You feel in control of your hands again.</span>"
/datum/brain_trauma/severe/discoordination/on_gain()
owner.add_disability(MONKEYLIKE, TRAUMA_DISABILITY)
owner.add_disability(DISABILITY_MONKEYLIKE, TRAUMA_DISABILITY)
..()
/datum/brain_trauma/severe/discoordination/on_lose()
owner.remove_disability(MONKEYLIKE, TRAUMA_DISABILITY)
owner.remove_disability(DISABILITY_MONKEYLIKE, TRAUMA_DISABILITY)
..()
/datum/brain_trauma/severe/pacifism
@@ -197,24 +203,9 @@
lose_text = "<span class='notice'>You no longer feel compelled to not harm.</span>"
/datum/brain_trauma/severe/pacifism/on_gain()
owner.add_disability(PACIFISM, TRAUMA_DISABILITY)
owner.add_disability(DISABILITY_PACIFISM, TRAUMA_DISABILITY)
..()
/datum/brain_trauma/severe/pacifism/on_lose()
owner.remove_disability(PACIFISM, TRAUMA_DISABILITY)
..()
/datum/brain_trauma/severe/pacifism
name = "Traumatic Non-Violence"
desc = "Patient is extremely unwilling to harm others in violent ways."
scan_desc = "pacific syndrome"
gain_text = "<span class='notice'>You feel oddly peaceful.</span>"
lose_text = "<span class='notice'>You no longer feel compelled to not harm.</span>"
/datum/brain_trauma/severe/pacifism/on_gain()
owner.disabilities |= PACIFISM
..()
/datum/brain_trauma/severe/pacifism/on_lose()
owner.disabilities &= ~PACIFISM
owner.remove_disability(DISABILITY_PACIFISM, TRAUMA_DISABILITY)
..()
@@ -192,7 +192,7 @@
return //no random switching
/datum/brain_trauma/severe/split_personality/brainwashing/on_hear(message, speaker, message_language, raw_message, radio_freq)
if(owner.disabilities & DEAF || owner == speaker)
if(owner.has_disability(DISABILITY_DEAF) || owner == speaker)
return message
if(findtext(message, codeword))
message = replacetext(message, codeword, "<span class='warning'>[codeword]</span>")
+1 -1
View File
@@ -51,7 +51,7 @@
/datum/component/material_container/proc/OnAttackBy(obj/item/I, mob/living/user)
var/list/tc = allowed_typecache
if(user.a_intent == INTENT_HARM)
if(user.a_intent != INTENT_HELP)
return
if((I.flags_2 & (HOLOGRAM_2 | NO_MAT_REDEMPTION_2)) || (tc && !is_type_in_typecache(I, tc)))
to_chat(user, "<span class='warning'>[parent] won't accept [I]!</span>")
+10 -9
View File
@@ -3,29 +3,29 @@
for(var/thing in viruses)
var/datum/disease/DD = thing
if(D.IsSame(DD))
return 1
return 0
return TRUE
return FALSE
/mob/proc/CanContractDisease(datum/disease/D)
if(stat == DEAD)
return 0
return FALSE
if(D.GetDiseaseID() in resistances)
return 0
return FALSE
if(HasDisease(D))
return 0
return FALSE
if(!(type in D.viable_mobtypes))
return 0
return FALSE
return 1
return TRUE
/mob/proc/ContactContractDisease(datum/disease/D)
if(!CanContractDisease(D))
return 0
return FALSE
AddDisease(D)
@@ -53,12 +53,13 @@
else
DD.vars[V] = D.vars[V]
DD.after_add()
DD.affected_mob.med_hud_set_status()
/mob/living/carbon/ContactContractDisease(datum/disease/D, target_zone)
if(!CanContractDisease(D))
return 0
return FALSE
var/obj/item/clothing/Cl = null
var/passed = TRUE
+7 -4
View File
@@ -60,14 +60,14 @@
/datum/disease/proc/has_cure()
if(!(disease_flags & CURABLE))
return 0
return FALSE
. = cures.len
for(var/C_id in cures)
if(!affected_mob.reagents.has_reagent(C_id))
.--
if(!. || (needs_all_cures && . < cures.len))
return 0
return FALSE
//Airborne spreading
/datum/disease/proc/spread(force_spread = 0)
@@ -111,8 +111,8 @@
/datum/disease/proc/IsSame(datum/disease/D)
if(istype(src, D.type))
return 1
return 0
return TRUE
return FALSE
/datum/disease/proc/Copy()
@@ -120,6 +120,9 @@
D.strain_data = strain_data.Copy()
return D
/datum/disease/proc/after_add()
return
/datum/disease/proc/GetDiseaseID()
return "[type]"
+75 -77
View File
@@ -1,10 +1,10 @@
/datum/symptom/heal
name = "Basic Healing (does nothing)" //warning for adminspawn viruses
desc = "You should not be seeing this."
stealth = 0
resistance = 0
stage_speed = 0
transmittable = 0
stealth = 1
resistance = -4
stage_speed = -4
transmittable = -4
level = 0 //not obtainable
base_message_chance = 20 //here used for the overlays
symptom_delay_min = 1
@@ -22,6 +22,7 @@
/datum/symptom/heal/Activate(datum/disease/advance/A)
if(!..())
return
//100% chance to activate for slow but consistent healing
var/mob/living/M = A.affected_mob
switch(A.stage)
if(4, 5)
@@ -44,20 +45,20 @@
return TRUE
/datum/symptom/heal/starlight
/datum/symptom/heal/toxin
name = "Starlight Condensation"
desc = "The virus reacts to direct starlight, producing regenerative chemicals. Works best against toxin-based damage."
stealth = -1
resistance = -2
stage_speed = 0
transmittable = 1
desc = "The virus reacts to direct starlight, producing regenerative chemicals that can cure toxin damage."
stealth = 1
resistance = -3
stage_speed = -3
transmittable = -3
level = 6
passive_message = "<span class='notice'>You miss the feeling of starlight on your skin.</span>"
var/nearspace_penalty = 0.3
threshold_desc = "<b>Stage Speed 6:</b> Increases healing speed.<br>\
<b>Transmission 6:</b> Removes penalty for only being close to space."
/datum/symptom/heal/starlight/Start(datum/disease/advance/A)
/datum/symptom/heal/toxin/Start(datum/disease/advance/A)
if(!..())
return
if(A.properties["transmission"] >= 6)
@@ -65,7 +66,7 @@
if(A.properties["stage_rate"] >= 6)
power = 2
/datum/symptom/heal/starlight/CanHeal(datum/disease/advance/A)
/datum/symptom/heal/toxin/CanHeal(datum/disease/advance/A)
var/mob/living/M = A.affected_mob
if(istype(get_turf(M), /turf/open/space))
return power
@@ -74,25 +75,15 @@
if(istype(T, /turf/open/space))
return power * nearspace_penalty
/datum/symptom/heal/starlight/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)
/datum/symptom/heal/toxin/Heal(mob/living/M, datum/disease/advance/A, actual_power)
var/heal_amt = actual_power
if(M.getToxLoss() && prob(5))
to_chat(M, "<span class='notice'>Your skin tingles as the starlight seems to heal you.</span>")
M.adjustToxLoss(-(4 * heal_amt)) //most effective on toxins
var/list/parts = M.get_damaged_bodyparts(1,1)
if(!parts.len)
return
for(var/obj/item/bodypart/L in parts)
if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len))
M.update_damage_overlays()
to_chat(M, "<span class='notice'>Your skin tingles as the starlight purges toxins from your bloodstream.</span>")
M.adjustToxLoss(-heal_amt)
return 1
/datum/symptom/heal/starlight/passive_message_condition(mob/living/M)
if(M.getBruteLoss() || M.getFireLoss() || M.getToxLoss())
/datum/symptom/heal/toxin/passive_message_condition(mob/living/M)
if(M.getToxLoss())
return TRUE
return FALSE
@@ -100,7 +91,7 @@
name = "Toxolysis"
stealth = 0
resistance = -2
stage_speed = 2
stage_speed = -2
transmittable = -2
level = 7
var/food_conversion = FALSE
@@ -162,50 +153,58 @@
to_chat(C, "<span class='notice'>You feel an odd gurgle in your stomach, as if it was working much faster than normal.</span>")
return 1
/datum/symptom/heal/darkness
name = "Nocturnal Regeneration"
desc = "The virus is able to mend the host's flesh when in conditions of low light, repairing physical damage. More effective against brute damage."
stealth = 2
resistance = -1
stage_speed = -2
transmittable = -1
/datum/symptom/heal/brute
name = "Cellular Molding"
desc = "The virus is able to shift cells around when in conditions of high heat, repairing existing physical damage."
stealth = 1
resistance = -3
stage_speed = -3
transmittable = -3
level = 6
passive_message = "<span class='notice'>You feel tingling on your skin as light passes over it.</span>"
passive_message = "<span class='notice'>You feel the flesh pulsing under your skin for a moment, but it's too cold to move.</span>"
threshold_desc = "<b>Stage Speed 8:</b> Doubles healing speed."
/datum/symptom/heal/darkness/Start(datum/disease/advance/A)
/datum/symptom/heal/brute/Start(datum/disease/advance/A)
if(!..())
return
if(A.properties["stage_rate"] >= 8)
power = 2
/datum/symptom/heal/darkness/CanHeal(datum/disease/advance/A)
/datum/symptom/heal/brute/CanHeal(datum/disease/advance/A)
var/mob/living/M = A.affected_mob
var/light_amount = 0
if(isturf(M.loc)) //else, there's considered to be no light
var/turf/T = M.loc
light_amount = min(1,T.get_lumcount()) - 0.5
if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD)
return power
switch(M.bodytemperature)
if(0 to 340)
return FALSE
if(340 to BODYTEMP_HEAT_DAMAGE_LIMIT)
. = 0.3 * power
if(BODYTEMP_HEAT_DAMAGE_LIMIT to 400)
. = 0.75 * power
if(400 to 460)
. = power
else
. = 1.5 * power
/datum/symptom/heal/darkness/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)
if(M.on_fire)
. *= 2
/datum/symptom/heal/brute/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)
var/heal_amt = 2 * actual_power
var/list/parts = M.get_damaged_bodyparts(1,1)
var/list/parts = M.get_damaged_bodyparts(1,0) //brute only
if(!parts.len)
return
if(prob(5))
to_chat(M, "<span class='notice'>The darkness soothes and mends your wounds.</span>")
to_chat(M, "<span class='notice'>You feel your flesh moving beneath your heated skin, mending your wounds.</span>")
for(var/obj/item/bodypart/L in parts)
if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len * 0.5)) //more effective on brute
if(L.heal_damage(heal_amt/parts.len, 0))
M.update_damage_overlays()
return 1
/datum/symptom/heal/darkness/passive_message_condition(mob/living/M)
if(M.getBruteLoss() || M.getFireLoss())
/datum/symptom/heal/brute/passive_message_condition(mob/living/M)
if(M.getBruteLoss())
return TRUE
return FALSE
@@ -213,8 +212,8 @@
name = "Regenerative Coma"
desc = "The virus causes the host to fall into a death-like coma when severely damaged, then rapidly fixes the damage."
stealth = 0
resistance = 2
stage_speed = -3
resistance = 0
stage_speed = -2
transmittable = -2
level = 8
passive_message = "<span class='notice'>The pain from your wounds makes you feel oddly sleepy...</span>"
@@ -284,20 +283,20 @@
return TRUE
return FALSE
/datum/symptom/heal/water
/datum/symptom/heal/burn
name = "Tissue Hydration"
desc = "The virus uses excess water inside and outside the body to repair damaged tissue cells. More effective against burns."
stealth = 0
resistance = -1
stage_speed = 0
transmittable = 1
desc = "The virus uses excess water inside and outside the body to repair burned tisue cells."
stealth = 1
resistance = -3
stage_speed = -3
transmittable = -3
level = 6
passive_message = "<span class='notice'>Your skin feels oddly dry...</span>"
passive_message = "<span class='notice'>Your burned skin feels oddly dry...</span>"
var/absorption_coeff = 1
threshold_desc = "<b>Resistance 5:</b> Water is consumed at a much slower rate.<br>\
<b>Stage Speed 7:</b> Increases healing speed."
/datum/symptom/heal/water/Start(datum/disease/advance/A)
/datum/symptom/heal/burn/Start(datum/disease/advance/A)
if(!..())
return
if(A.properties["stage_rate"] >= 7)
@@ -305,7 +304,7 @@
if(A.properties["stealth"] >= 2)
absorption_coeff = 0.25
/datum/symptom/heal/water/CanHeal(datum/disease/advance/A)
/datum/symptom/heal/burn/CanHeal(datum/disease/advance/A)
. = 0
var/mob/living/M = A.affected_mob
if(M.fire_stacks < 0)
@@ -318,33 +317,33 @@
M.reagents.remove_reagent("water", 0.5 * absorption_coeff)
. += power * 0.5
/datum/symptom/heal/water/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)
/datum/symptom/heal/burn/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)
var/heal_amt = 2 * actual_power
var/list/parts = M.get_damaged_bodyparts(1,1) //more effective on burns
var/list/parts = M.get_damaged_bodyparts(0,1) //burn only
if(!parts.len)
return
if(prob(5))
to_chat(M, "<span class='notice'>You feel yourself absorbing the water around you to soothe your damaged skin.</span>")
to_chat(M, "<span class='notice'>You feel yourself absorbing the water around you to soothe your burned skin.</span>")
for(var/obj/item/bodypart/L in parts)
if(L.heal_damage(heal_amt/parts.len * 0.5, heal_amt/parts.len))
if(L.heal_damage(0, heal_amt/parts.len))
M.update_damage_overlays()
return 1
/datum/symptom/heal/water/passive_message_condition(mob/living/M)
if(M.getBruteLoss() || M.getFireLoss())
/datum/symptom/heal/burn/passive_message_condition(mob/living/M)
if(M.getFireLoss())
return TRUE
return FALSE
/datum/symptom/heal/plasma
name = "Plasma Fixation"
desc = "The virus draws plasma from the atmosphere and from inside the body to heal and stabilize body temperature."
desc = "The virus draws plasma from the atmosphere and from inside the body to stabilize body temperature and heal burns."
stealth = 0
resistance = 3
resistance = 0
stage_speed = -2
transmittable = -2
level = 8
@@ -380,6 +379,8 @@
/datum/symptom/heal/plasma/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)
var/heal_amt = 4 * actual_power
var/list/parts = M.get_damaged_bodyparts(0,1) //burn only
if(prob(5))
to_chat(M, "<span class='notice'>You feel yourself absorbing plasma inside and around you...</span>")
@@ -392,25 +393,24 @@
if(prob(5))
to_chat(M, "<span class='notice'>You feel warmer.</span>")
M.adjustToxLoss(-heal_amt)
var/list/parts = M.get_damaged_bodyparts(1,1)
if(!parts.len)
return
if(prob(5))
to_chat(M, "<span class='notice'>The pain from your wounds fades rapidly.</span>")
to_chat(M, "<span class='notice'>The pain from your burns fades rapidly.</span>")
for(var/obj/item/bodypart/L in parts)
if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len))
if(L.heal_damage(0, heal_amt/parts.len))
M.update_damage_overlays()
return 1
/datum/symptom/heal/radiation
name = "Radioactive Resonance"
desc = "The virus uses radiation to fix damage through dna mutations."
stealth = -1
resistance = -2
stage_speed = 2
stage_speed = 0
transmittable = -3
level = 6
symptom_delay_min = 1
@@ -450,8 +450,6 @@
if(cellular_damage)
M.adjustCloneLoss(-heal_amt * 0.5)
M.adjustToxLoss(-(2 * heal_amt))
var/list/parts = M.get_damaged_bodyparts(1,1)
if(!parts.len)
@@ -58,12 +58,11 @@ Bonus
M.blur_eyes(20)
M.adjust_eye_damage(5)
if(eyes.eye_damage >= 10)
M.become_nearsighted(EYE_DAMAGE)
M.become_nearsighted()
if(prob(eyes.eye_damage - 10 + 1))
if(!remove_eyes)
if(!M.has_disability(BLIND))
if(!M.has_disability(DISABILITY_BLIND))
to_chat(M, "<span class='userdanger'>You go blind!</span>")
M.become_blind(EYE_DAMAGE)
else
M.visible_message("<span class='warning'>[M]'s eyes fall off their sockets!</span>", "<span class='userdanger'>Your eyes fall off their sockets!</span>")
eyes.Remove(M)
@@ -112,18 +111,16 @@ Bonus
return
switch(A.stage)
if(4, 5) //basically oculine
if(M.has_disability(BLIND, EYE_DAMAGE))
if(M.has_disability(DISABILITY_BLIND, EYE_DAMAGE))
if(prob(20))
to_chat(M, "<span class='warning'>Your vision slowly returns...</span>")
M.cure_blind(EYE_DAMAGE)
M.cure_nearsighted(EYE_DAMAGE)
M.cure_blind()
M.cure_nearsighted()
M.blur_eyes(35)
else if(M.has_disability(NEARSIGHT, EYE_DAMAGE))
else if(M.has_disability(DISABILITY_NEARSIGHT, EYE_DAMAGE))
to_chat(M, "<span class='warning'>The blackness in your peripheral vision fades.</span>")
M.cure_nearsighted(EYE_DAMAGE)
M.cure_nearsighted()
M.blur_eyes(10)
else if(M.eye_blind || M.eye_blurry)
M.set_blindness(0)
M.set_blurriness(0)
+15 -5
View File
@@ -1,6 +1,6 @@
/datum/disease/gbs
name = "GBS"
max_stages = 4
max_stages = 5
spread_text = "On contact"
spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS
cure_text = "Synaptizine & Sulfur"
@@ -16,15 +16,25 @@
..()
switch(stage)
if(2)
if(prob(5))
affected_mob.emote("cough")
if(prob(45))
affected_mob.adjustToxLoss(5)
affected_mob.updatehealth()
if(prob(1))
affected_mob.emote("sneeze")
if(3)
if(prob(5))
affected_mob.emote("cough")
else if(prob(5))
affected_mob.emote("gasp")
if(prob(10))
to_chat(affected_mob, "<span class='danger'>Your body hurts all over!</span>")
to_chat(affected_mob, "<span class='danger'>You're starting to feel very weak...</span>")
if(4)
to_chat(affected_mob, "<span class='userdanger'>Your body feels as if it's trying to rip itself apart!</span>")
if(prob(10))
affected_mob.emote("cough")
affected_mob.adjustToxLoss(5)
affected_mob.updatehealth()
if(5)
to_chat(affected_mob, "<span class='danger'>Your body feels as if it's trying to rip itself open...</span>")
if(prob(50))
affected_mob.gib()
else
+11 -2
View File
@@ -65,8 +65,8 @@
/datum/disease/transformation/jungle_fever
name = "Jungle Fever"
cure_text = "Bananas"
cures = list("banana")
cure_text = "Death."
cures = list("adminordrazine")
spread_text = "Monkey Bites"
spread_flags = VIRUS_SPREAD_SPECIAL
viable_mobtypes = list(/mob/living/carbon/monkey, /mob/living/carbon/human)
@@ -113,6 +113,15 @@
remove_monkey(affected_mob.mind)
..()
/datum/disease/transformation/jungle_fever/monkeymode
visibility_flags = HIDDEN_SCANNER|HIDDEN_PANDEMIC
disease_flags = CAN_CARRY //no vaccines! no cure!
/datum/disease/transformation/jungle_fever/monkeymode/after_add()
if(affected_mob && !is_monkey_leader(affected_mob.mind))
visibility_flags = NONE
/datum/disease/transformation/robot
-2
View File
@@ -45,8 +45,6 @@
set name = "Show Server Revision"
set desc = "Check the current server code revision"
if(GLOB.round_id)
to_chat(src, "<b>Round ID:</b> [GLOB.round_id]")
if(GLOB.revdata.originmastercommit)
to_chat(src, "<b>Server revision compiled on:</b> [GLOB.revdata.date]")
var/prefix = ""
+1 -1
View File
@@ -197,7 +197,7 @@
/obj/item/twohanded/bostaff/attack(mob/target, mob/living/user)
add_fingerprint(user)
if((user.has_disability(CLUMSY)) && prob(50))
if((user.has_disability(DISABILITY_CLUMSY)) && prob(50))
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
user.Knockdown(60)
if(ishuman(user))
+7 -21
View File
@@ -461,27 +461,20 @@
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
if (ishuman(current))
if(is_monkey_leader(src))
text += "<a href='?src=[REF(src)];monkey=healthy'>healthy</a> | <a href='?src=[REF(src)];monkey=infected'>infected</a> <b>LEADER</b> | <a href='?src=[REF(src)];monkey=human'>human</a> | other"
else
text += "<a href='?src=[REF(src)];monkey=healthy'>healthy</a> | <a href='?src=[REF(src)];monkey=infected'>infected</a> | <a href='?src=[REF(src)];monkey=leader'>leader</a> | <b>HUMAN</b> | other"
text += "<a href='?src=[REF(src)];monkey=healthy'>healthy</a> | <a href='?src=[REF(src)];monkey=infected'>infected</a> | <b>HUMAN</b> | other"
else if(ismonkey(current))
var/found = FALSE
for(var/datum/disease/transformation/jungle_fever/JF in current.viruses)
found = TRUE
break
var/isLeader = is_monkey_leader(src)
if(isLeader)
text += "<a href='?src=[REF(src)];monkey=healthy'>healthy</a> | <a href='?src=[REF(src)];monkey=infected'>infected</a> <b>LEADER</b> | <a href='?src=[REF(src)];monkey=human'>human</a> | other"
else if(found)
text += "<a href='?src=[REF(src)];monkey=healthy'>healthy</a> | <b>INFECTED</b> | <a href='?src=[REF(src)];monkey=leader'>leader</a> | <a href='?src=[REF(src)];monkey=human'>human</a> | other"
if(found)
text += "<a href='?src=[REF(src)];monkey=healthy'>healthy</a> | <b>INFECTED</b> | <a href='?src=[REF(src)];monkey=human'>human</a> | other"
else
text += "<b>HEALTHY</b> | <a href='?src=[REF(src)];monkey=infected'>infected</a> | <a href='?src=[REF(src)];monkey=leader'>leader</a> | <a href='?src=[REF(src)];monkey=human'>human</a> | other"
text += "<b>HEALTHY</b> | <a href='?src=[REF(src)];monkey=infected'>infected</a> | <a href='?src=[REF(src)];monkey=human'>human</a> | other"
else
text += "healthy | infected | leader | human | <b>OTHER</b>"
text += "healthy | infected | human | <b>OTHER</b>"
if(current && current.client && (ROLE_MONKEY in current.client.prefs.be_special))
text += " | Enabled in Prefs"
@@ -1262,17 +1255,11 @@
else if (istype(M) && length(M.viruses))
for(var/thing in M.viruses)
var/datum/disease/D = thing
D.cure(FALSE)
if("leader")
if(check_rights(R_ADMIN, 0))
add_monkey_leader(src)
log_admin("[key_name(usr)] made [key_name(current)] a monkey leader!")
message_admins("[key_name_admin(usr)] made [key_name_admin(current)] a monkey leader!")
D.cure(0)
if("infected")
if(check_rights(R_ADMIN, 0))
if (check_rights(R_ADMIN, 0))
var/mob/living/carbon/human/H = current
var/mob/living/carbon/monkey/M = current
add_monkey(src)
if (istype(H))
log_admin("[key_name(usr)] attempting to monkeyize and infect [key_name(current)]")
message_admins("<span class='notice'>[key_name_admin(usr)] attempting to monkeyize and infect [key_name_admin(current)]</span>")
@@ -1290,7 +1277,6 @@
for(var/datum/disease/transformation/jungle_fever/JF in M.viruses)
JF.cure(0)
stoplag() //because deleting of virus is doing throught spawn(0) //What
remove_monkey(src)
log_admin("[key_name(usr)] attempting to humanize [key_name(current)]")
message_admins("<span class='notice'>[key_name_admin(usr)] attempting to humanize [key_name_admin(current)]</span>")
H = M.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_DEFAULTMSG)
+1
View File
@@ -8,6 +8,7 @@ GLOBAL_LIST_EMPTY(mutations_list)
GLOB.mutations_list[name] = src
/datum/mutation/human
var/dna_block
var/quality
var/get_chance = 100
+4 -4
View File
@@ -85,12 +85,12 @@
/datum/mutation/human/clumsy/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
owner.add_disability(CLUMSY, GENETIC_MUTATION)
owner.add_disability(DISABILITY_CLUMSY, GENETIC_MUTATION)
/datum/mutation/human/clumsy/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.remove_disability(CLUMSY, GENETIC_MUTATION)
owner.remove_disability(DISABILITY_CLUMSY, GENETIC_MUTATION)
//Tourettes causes you to randomly stand in place and shout.
@@ -124,12 +124,12 @@
/datum/mutation/human/deaf/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
owner.add_disability(DEAF, GENETIC_MUTATION)
owner.add_disability(DISABILITY_DEAF, GENETIC_MUTATION)
/datum/mutation/human/deaf/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.remove_disability(DEAF, GENETIC_MUTATION)
owner.remove_disability(DISABILITY_DEAF, GENETIC_MUTATION)
//Monified turns you into a monkey.
+4 -4
View File
@@ -7,12 +7,12 @@
/datum/mutation/human/nearsight/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
owner.become_nearsighted(GENETIC_MUTATION)
owner.become_nearsighted()
/datum/mutation/human/nearsight/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.cure_nearsighted(GENETIC_MUTATION)
owner.cure_nearsighted()
//Blind makes you blind. Who knew?
@@ -24,12 +24,12 @@
/datum/mutation/human/blind/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
owner.become_blind(GENETIC_MUTATION)
owner.become_blind()
/datum/mutation/human/blind/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.cure_blind(GENETIC_MUTATION)
owner.cure_blind()
//X-Ray Vision lets you see through walls.
+2 -2
View File
@@ -30,12 +30,12 @@
/datum/mutation/human/mute/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
owner.add_disability(MUTE, GENETIC_MUTATION)
owner.add_disability(DISABILITY_MUTE, GENETIC_MUTATION)
/datum/mutation/human/mute/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.remove_disability(MUTE, GENETIC_MUTATION)
owner.remove_disability(DISABILITY_MUTE, GENETIC_MUTATION)
/datum/mutation/human/smile
+239 -239
View File
@@ -1,239 +1,239 @@
//Designed for things that need precision trajectories like projectiles.
//Don't use this for anything that you don't absolutely have to use this with (like projectiles!) because it isn't worth using a datum unless you need accuracy down to decimal places in pixels.
#define RETURN_PRECISE_POSITION(A) new /datum/position(A)
#define RETURN_PRECISE_POINT(A) new /datum/point(A)
/datum/position //For positions with map x/y/z and pixel x/y so you don't have to return lists. Could use addition/subtraction in the future I guess.
var/x = 0
var/y = 0
var/z = 0
var/pixel_x = 0
var/pixel_y = 0
/datum/position/proc/valid()
return x && y && z && !isnull(pixel_x) && !isnull(pixel_y)
/datum/position/New(_x = 0, _y = 0, _z = 0, _pixel_x = 0, _pixel_y = 0) //first argument can also be a /datum/point.
if(istype(_x, /datum/point))
var/datum/point/P = _x
var/turf/T = P.return_turf()
_x = T.x
_y = T.y
_z = T.z
_pixel_x = P.return_px()
_pixel_y = P.return_py()
else if(isatom(_x))
var/atom/A = _x
_x = A.x
_y = A.y
_z = A.z
_pixel_x = A.pixel_x
_pixel_y = A.pixel_y
x = _x
y = _y
z = _z
pixel_x = _pixel_x
pixel_y = _pixel_y
/datum/position/proc/return_turf()
return locate(x, y, z)
/datum/position/proc/return_px()
return pixel_x
/datum/position/proc/return_py()
return pixel_y
/datum/position/proc/return_point()
return new /datum/point(src)
/proc/point_midpoint_points(datum/point/a, datum/point/b) //Obviously will not support multiZ calculations! Same for the two below.
var/datum/point/P = new
P.x = round(a.x + (b.x - a.x) / 2, 1)
P.y = round(a.y + (b.y - a.y) / 2, 1)
P.z = a.z
return P
/proc/pixel_length_between_points(datum/point/a, datum/point/b)
return sqrt(((b.x - a.x) ** 2) + ((b.y - a.y) ** 2))
/proc/angle_between_points(datum/point/a, datum/point/b)
return ATAN2((b.y - a.y), (b.x - a.x))
/datum/point //A precise point on the map in absolute pixel locations based on world.icon_size. Pixels are FROM THE EDGE OF THE MAP!
var/x = 0
var/y = 0
var/z = 0
/datum/point/proc/valid()
return x && y && z
/datum/point/proc/copy_to(datum/point/p = new)
p.x = x
p.y = y
p.z = z
return p
/datum/point/New(_x, _y, _z, _pixel_x = 0, _pixel_y = 0) //first argument can also be a /datum/position or /atom.
if(istype(_x, /datum/position))
var/datum/position/P = _x
_x = P.x
_y = P.y
_z = P.z
_pixel_x = P.pixel_x
_pixel_y = P.pixel_y
else if(istype(_x, /atom))
var/atom/A = _x
_x = A.x
_y = A.y
_z = A.z
_pixel_x = A.pixel_x
_pixel_y = A.pixel_y
initialize_location(_x, _y, _z, _pixel_x, _pixel_y)
/datum/point/proc/initialize_location(tile_x, tile_y, tile_z, p_x = 0, p_y = 0)
if(!isnull(tile_x))
x = ((tile_x - 1) * world.icon_size) + world.icon_size / 2 + p_x
if(!isnull(tile_y))
y = ((tile_y - 1) * world.icon_size) + world.icon_size / 2+ p_y
if(!isnull(tile_z))
z = tile_z
/datum/point/proc/return_turf()
return locate(CEILING(x / world.icon_size, 1), CEILING(y / world.icon_size, 1), z)
/datum/point/proc/return_coordinates() //[turf_x, turf_y, z]
return list(CEILING(x / world.icon_size, 1), CEILING(y / world.icon_size, 1), z)
/datum/point/proc/return_position()
return new /datum/position(src)
/datum/point/proc/return_px()
return MODULUS(x, world.icon_size) - 16
/datum/point/proc/return_py()
return MODULUS(y, world.icon_size) - 16
/datum/point/proc/mapcheck()
. = FALSE
var/maxx = world.icon_size * world.maxx
var/maxy = world.icon_size * world.maxy
var/move_zx = 0
var/move_zy = 0
if(x < 0)
x += maxx
move_zx -= 1
if(y < 0)
y += maxy
move_zy -= 1
if(x > maxx)
x -= maxx
move_zx += 1
if(y > maxy)
y -= maxy
move_zy += 1
var/datum/space_level/S = GLOB.z_levels_list["[z]"]
if(move_zx != 0)
var/datum/space_level/L = S.neigbours["[move_zx < 0? WEST : EAST]"]
z = L.z_value
. = TRUE
if(move_zy != 0)
var/datum/space_level/L = S.neigbours["[move_zy < 0? SOUTH : NORTH]"]
z = L.z_value
. = TRUE
/datum/point/vector
var/speed = 32 //pixels per iteration
var/iteration = 0
var/angle = 0
var/mpx = 0 //calculated x/y movement amounts to prevent having to do trig every step.
var/mpy = 0
var/starting_x = 0 //just like before, pixels from EDGE of map! This is set in initialize_location().
var/starting_y = 0
var/starting_z = 0
/datum/point/vector/New(_x, _y, _z, _pixel_x = 0, _pixel_y = 0, _angle, _speed)
..()
initialize_trajectory(_speed, _angle)
/datum/point/vector/initialize_location(tile_x, tile_y, tile_z, p_x = 0, p_y = 0)
. = ..()
starting_x = x
starting_y = y
starting_z = z
/datum/point/vector/copy_to(datum/point/vector/v = new)
..(v)
v.speed = speed
v.iteration = iteration
v.angle = angle
v.mpx = mpx
v.mpy = mpy
v.starting_x = starting_x
v.starting_y = starting_y
v.starting_z = starting_z
return v
/datum/point/vector/proc/initialize_trajectory(pixel_speed, new_angle)
if(!isnull(pixel_speed))
speed = pixel_speed
set_angle(new_angle)
/datum/point/vector/proc/set_angle(new_angle) //calculations use "byond angle" where north is 0 instead of 90, and south is 180 instead of 270.
if(isnull(angle))
return
angle = new_angle
update_offsets()
/datum/point/vector/proc/update_offsets()
mpx = sin(angle) * speed
mpy = cos(angle) * speed
/datum/point/vector/proc/set_speed(new_speed)
if(isnull(new_speed) || speed == new_speed)
return
speed = new_speed
update_offsets()
/datum/point/vector/proc/increment(multiplier = 1)
iteration++
x += mpx * 1
y += mpy * 1
if(mapcheck())
on_z_change()
/datum/point/vector/proc/return_vector_after_increments(amount = 7, multiplier = 1, force_simulate = FALSE)
var/datum/point/vector/v = copy_to()
if(force_simulate)
for(var/i in 1 to amount)
v.increment(multiplier)
else
v.increment(multiplier * amount)
return v
/datum/point/vector/proc/on_z_change()
return
/datum/point/vector/processed //pixel_speed is per decisecond.
var/last_process = 0
var/last_move = 0
var/paused = FALSE
/datum/point/vector/processed/Destroy()
STOP_PROCESSING(SSprojectiles, src)
/datum/point/vector/processed/proc/start()
last_process = world.time
last_move = world.time
START_PROCESSING(SSprojectiles, src)
/datum/point/vector/processed/process()
if(paused)
last_move += world.time - last_process
last_process = world.time
return
var/needed_time = world.time - last_move
last_process = world.time
last_move = world.time
increment(needed_time)
//Designed for things that need precision trajectories like projectiles.
//Don't use this for anything that you don't absolutely have to use this with (like projectiles!) because it isn't worth using a datum unless you need accuracy down to decimal places in pixels.
#define RETURN_PRECISE_POSITION(A) new /datum/position(A)
#define RETURN_PRECISE_POINT(A) new /datum/point(A)
/datum/position //For positions with map x/y/z and pixel x/y so you don't have to return lists. Could use addition/subtraction in the future I guess.
var/x = 0
var/y = 0
var/z = 0
var/pixel_x = 0
var/pixel_y = 0
/datum/position/proc/valid()
return x && y && z && !isnull(pixel_x) && !isnull(pixel_y)
/datum/position/New(_x = 0, _y = 0, _z = 0, _pixel_x = 0, _pixel_y = 0) //first argument can also be a /datum/point.
if(istype(_x, /datum/point))
var/datum/point/P = _x
var/turf/T = P.return_turf()
_x = T.x
_y = T.y
_z = T.z
_pixel_x = P.return_px()
_pixel_y = P.return_py()
else if(isatom(_x))
var/atom/A = _x
_x = A.x
_y = A.y
_z = A.z
_pixel_x = A.pixel_x
_pixel_y = A.pixel_y
x = _x
y = _y
z = _z
pixel_x = _pixel_x
pixel_y = _pixel_y
/datum/position/proc/return_turf()
return locate(x, y, z)
/datum/position/proc/return_px()
return pixel_x
/datum/position/proc/return_py()
return pixel_y
/datum/position/proc/return_point()
return new /datum/point(src)
/proc/point_midpoint_points(datum/point/a, datum/point/b) //Obviously will not support multiZ calculations! Same for the two below.
var/datum/point/P = new
P.x = round(a.x + (b.x - a.x) / 2, 1)
P.y = round(a.y + (b.y - a.y) / 2, 1)
P.z = a.z
return P
/proc/pixel_length_between_points(datum/point/a, datum/point/b)
return sqrt(((b.x - a.x) ** 2) + ((b.y - a.y) ** 2))
/proc/angle_between_points(datum/point/a, datum/point/b)
return ATAN2((b.y - a.y), (b.x - a.x))
/datum/point //A precise point on the map in absolute pixel locations based on world.icon_size. Pixels are FROM THE EDGE OF THE MAP!
var/x = 0
var/y = 0
var/z = 0
/datum/point/proc/valid()
return x && y && z
/datum/point/proc/copy_to(datum/point/p = new)
p.x = x
p.y = y
p.z = z
return p
/datum/point/New(_x, _y, _z, _pixel_x = 0, _pixel_y = 0) //first argument can also be a /datum/position or /atom.
if(istype(_x, /datum/position))
var/datum/position/P = _x
_x = P.x
_y = P.y
_z = P.z
_pixel_x = P.pixel_x
_pixel_y = P.pixel_y
else if(istype(_x, /atom))
var/atom/A = _x
_x = A.x
_y = A.y
_z = A.z
_pixel_x = A.pixel_x
_pixel_y = A.pixel_y
initialize_location(_x, _y, _z, _pixel_x, _pixel_y)
/datum/point/proc/initialize_location(tile_x, tile_y, tile_z, p_x = 0, p_y = 0)
if(!isnull(tile_x))
x = ((tile_x - 1) * world.icon_size) + world.icon_size / 2 + p_x
if(!isnull(tile_y))
y = ((tile_y - 1) * world.icon_size) + world.icon_size / 2+ p_y
if(!isnull(tile_z))
z = tile_z
/datum/point/proc/return_turf()
return locate(CEILING(x / world.icon_size, 1), CEILING(y / world.icon_size, 1), z)
/datum/point/proc/return_coordinates() //[turf_x, turf_y, z]
return list(CEILING(x / world.icon_size, 1), CEILING(y / world.icon_size, 1), z)
/datum/point/proc/return_position()
return new /datum/position(src)
/datum/point/proc/return_px()
return MODULUS(x, world.icon_size) - 16
/datum/point/proc/return_py()
return MODULUS(y, world.icon_size) - 16
/datum/point/proc/mapcheck()
. = FALSE
var/maxx = world.icon_size * world.maxx
var/maxy = world.icon_size * world.maxy
var/move_zx = 0
var/move_zy = 0
if(x < 0)
x += maxx
move_zx -= 1
if(y < 0)
y += maxy
move_zy -= 1
if(x > maxx)
x -= maxx
move_zx += 1
if(y > maxy)
y -= maxy
move_zy += 1
var/datum/space_level/S = GLOB.z_levels_list["[z]"]
if(move_zx != 0)
var/datum/space_level/L = S.neigbours["[move_zx < 0? WEST : EAST]"]
z = L.z_value
. = TRUE
if(move_zy != 0)
var/datum/space_level/L = S.neigbours["[move_zy < 0? SOUTH : NORTH]"]
z = L.z_value
. = TRUE
/datum/point/vector
var/speed = 32 //pixels per iteration
var/iteration = 0
var/angle = 0
var/mpx = 0 //calculated x/y movement amounts to prevent having to do trig every step.
var/mpy = 0
var/starting_x = 0 //just like before, pixels from EDGE of map! This is set in initialize_location().
var/starting_y = 0
var/starting_z = 0
/datum/point/vector/New(_x, _y, _z, _pixel_x = 0, _pixel_y = 0, _angle, _speed)
..()
initialize_trajectory(_speed, _angle)
/datum/point/vector/initialize_location(tile_x, tile_y, tile_z, p_x = 0, p_y = 0)
. = ..()
starting_x = x
starting_y = y
starting_z = z
/datum/point/vector/copy_to(datum/point/vector/v = new)
..(v)
v.speed = speed
v.iteration = iteration
v.angle = angle
v.mpx = mpx
v.mpy = mpy
v.starting_x = starting_x
v.starting_y = starting_y
v.starting_z = starting_z
return v
/datum/point/vector/proc/initialize_trajectory(pixel_speed, new_angle)
if(!isnull(pixel_speed))
speed = pixel_speed
set_angle(new_angle)
/datum/point/vector/proc/set_angle(new_angle) //calculations use "byond angle" where north is 0 instead of 90, and south is 180 instead of 270.
if(isnull(angle))
return
angle = new_angle
update_offsets()
/datum/point/vector/proc/update_offsets()
mpx = sin(angle) * speed
mpy = cos(angle) * speed
/datum/point/vector/proc/set_speed(new_speed)
if(isnull(new_speed) || speed == new_speed)
return
speed = new_speed
update_offsets()
/datum/point/vector/proc/increment(multiplier = 1)
iteration++
x += mpx * 1
y += mpy * 1
if(mapcheck())
on_z_change()
/datum/point/vector/proc/return_vector_after_increments(amount = 7, multiplier = 1, force_simulate = FALSE)
var/datum/point/vector/v = copy_to()
if(force_simulate)
for(var/i in 1 to amount)
v.increment(multiplier)
else
v.increment(multiplier * amount)
return v
/datum/point/vector/proc/on_z_change()
return
/datum/point/vector/processed //pixel_speed is per decisecond.
var/last_process = 0
var/last_move = 0
var/paused = FALSE
/datum/point/vector/processed/Destroy()
STOP_PROCESSING(SSprojectiles, src)
/datum/point/vector/processed/proc/start()
last_process = world.time
last_move = world.time
START_PROCESSING(SSprojectiles, src)
/datum/point/vector/processed/process()
if(paused)
last_move += world.time - last_process
last_process = world.time
return
var/needed_time = world.time - last_move
last_process = world.time
last_move = world.time
increment(needed_time)
+1 -23
View File
@@ -33,7 +33,7 @@
if(LINGHIVE_LING)
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
var/msg = "<i><font color=#800080><b>[changeling.changelingID]:</b> [message]</font></i>"
log_talk(user,"[changeling.changelingID]/[user.key] : [message]",LOGSAY)
log_talk(src,"[changeling.changelingID]/[user.key] : [message]",LOGSAY)
for(var/_M in GLOB.mob_list)
var/mob/M = _M
if(M in GLOB.dead_mob_list)
@@ -110,25 +110,3 @@
AI.holopad_talk(message, language)
return FALSE
return TRUE
/datum/saymode/monkey
key = "k"
mode = MODE_MONKEY
/datum/saymode/monkey/handle_message(mob/living/user, message, datum/language/language)
var/datum/mind = user.mind
if(!mind)
return TRUE
if(is_monkey_leader(mind) || (ismonkey(user) && is_monkey(mind)))
log_talk(user, "(MONKEY) [user]/[user.key]: [message]",LOGSAY)
if(prob(75) && ismonkey(user))
user.visible_message("<span class='notice'>\The [user] chimpers.</span>")
var/msg = "<span class='[is_monkey_leader(mind) ? "monkeylead" : "monkeyhive"]'><b><font size=2>\[[is_monkey_leader(mind) ? "Monkey Leader" : "Monkey"]\]</font> [user]</b>: [message]</span>"
for(var/_M in GLOB.mob_list)
var/mob/M = _M
if(M in GLOB.dead_mob_list)
var/link = FOLLOW_LINK(M, user)
to_chat(M, "[link] [msg]")
if((is_monkey_leader(M.mind) || ismonkey(M)) && (M.mind in SSticker.mode.ape_infectees))
to_chat(M, msg)
return FALSE