Merge pull request #6183 from Citadel-Station-13/upstream-merge-36548

[MIRROR] Added a new ability to sentient diseases
This commit is contained in:
LetterJay
2018-04-01 19:50:43 -05:00
committed by GitHub
13 changed files with 169 additions and 24 deletions
@@ -7,6 +7,7 @@ is currently following.
GLOBAL_LIST_INIT(disease_ability_singletons, list(
new /datum/disease_ability/action/cough(),
new /datum/disease_ability/action/sneeze(),
new /datum/disease_ability/action/infect(),
new /datum/disease_ability/symptom/cough(),
new /datum/disease_ability/symptom/sneeze(),\
new /datum/disease_ability/symptom/hallucigen(),
@@ -165,7 +166,6 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list(
short_desc = "Force the host you are following to sneeze, spreading your infection to those in front of them."
long_desc = "Force the host you are following to sneeze with extra force, spreading your infection to any victims in a 4 meter cone in front of your host.<br>Cooldown: 20 seconds"
/datum/action/cooldown/disease_sneeze
name = "Sneeze"
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
@@ -194,6 +194,47 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list(
StartCooldown()
return TRUE
/datum/disease_ability/action/infect
name = "Secrete Infection"
actions = list(/datum/action/cooldown/disease_infect)
cost = 2
required_total_points = 3
short_desc = "Cause all objects your host is touching to become infectious for a limited time, spreading your infection to anyone who touches them."
long_desc = "Cause the host you are following to excrete an infective substance from their pores, causing all objects touching their skin to transmit your infection to anyone who touches them for the next 30 seconds. This includes the floor, if they are not wearing shoes, and any items they are holding, if they are not wearing gloves.<br>Cooldown: 40 seconds"
/datum/action/cooldown/disease_infect
name = "Secrete Infection"
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
button_icon_state = "infect"
desc = "Cause the host you are following to excrete an infective substance from their pores, causing all objects touching their skin to transmit your infection to anyone who touches them for the next 30 seconds.<br>Cooldown: 40 seconds"
cooldown_time = 400
/datum/action/cooldown/disease_infect/Trigger()
if(!..())
return FALSE
var/mob/camera/disease/D = owner
var/mob/living/carbon/human/H = D.following_host
if(!H)
return FALSE
for(var/V in H.get_equipped_items(FALSE))
var/obj/O = V
O.AddComponent(/datum/component/infective, D.disease_template, 300)
//no shoes? infect the floor.
if(!H.shoes)
var/turf/T = get_turf(H)
if(T && !isspaceturf(T))
T.AddComponent(/datum/component/infective, D.disease_template, 300)
//no gloves? infect whatever we are holding.
if(!H.gloves)
for(var/V in H.held_items)
if(!V)
continue
var/obj/O = V
O.AddComponent(/datum/component/infective, D.disease_template, 300)
StartCooldown()
return TRUE
//passive symptom abilities
/datum/disease_ability/symptom/cough
+7 -6
View File
@@ -37,20 +37,20 @@
else
..()
/obj/item/reagent_containers/food/snacks/proc/On_Consume()
if(!usr)
/obj/item/reagent_containers/food/snacks/proc/On_Consume(mob/living/eater)
if(!eater)
return
if(!reagents.total_volume)
var/obj/item/trash_item = generate_trash(usr)
var/obj/item/trash_item = generate_trash(eater)
qdel(src)
usr.put_in_hands(trash_item)
eater.put_in_hands(trash_item)
/obj/item/reagent_containers/food/snacks/attack_self(mob/user)
return
/obj/item/reagent_containers/food/snacks/attack(mob/living/M, mob/user, def_zone)
/obj/item/reagent_containers/food/snacks/attack(mob/living/M, mob/living/user, def_zone)
if(user.a_intent == INTENT_HARM)
return ..()
if(!eatverb)
@@ -109,11 +109,12 @@
M.satiety -= junkiness
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,50), 1)
if(reagents.total_volume)
SendSignal(COMSIG_FOOD_EATEN, M, user)
var/fraction = min(bitesize / reagents.total_volume, 1)
reagents.reaction(M, INGEST, fraction)
reagents.trans_to(M, bitesize)
bitecount++
On_Consume()
On_Consume(M)
checkLiked(fraction, M)
return 1
@@ -75,6 +75,7 @@
affecting = get_bodypart(ran_zone(user.zone_selected))
if(!affecting) //missing limb? we select the first bodypart (you can never have zero, because of chest)
affecting = bodyparts[1]
I.SendSignal(COMSIG_ITEM_ATTACK_ZONE, src, user, affecting)
send_item_attack_message(I, user, affecting.name)
if(I.force)
//CIT CHANGES START HERE - combatmode and resting checks
@@ -173,6 +173,8 @@
affecting = get_bodypart(ran_zone(user.zone_selected))
var/target_area = parse_zone(check_zone(user.zone_selected)) //our intended target
I.SendSignal(COMSIG_ITEM_ATTACK_ZONE, src, user, affecting)
SSblackbox.record_feedback("nested tally", "item_used_for_combat", 1, list("[I.force]", "[I.type]"))
SSblackbox.record_feedback("tally", "zone_targeted", 1, target_area)
@@ -67,6 +67,7 @@
var/zone = ran_zone(BODY_ZONE_CHEST, 65)//Hits a random part of the body, geared towards the chest
var/dtype = BRUTE
var/volume = I.get_volume_by_throwforce_and_or_w_class()
I.SendSignal(COMSIG_MOVABLE_IMPACT_ZONE, src, zone)
dtype = I.damtype
if (I.throwforce > 0) //If the weapon's throwforce is greater than zero...