Merge branch 'master' into digileg-runtime

This commit is contained in:
Poojawa
2018-03-19 21:33:50 -05:00
committed by GitHub
1329 changed files with 2726 additions and 1986 deletions
+1 -1
View File
@@ -191,7 +191,7 @@
FD.CalculateAffectingAreas()
to_chat(usr, "<span class='notice'>You rename the '[prevname]' to '[str]'.</span>")
log_game("[key_name(usr)] has renamed [prevname] to [str]")
A.update_area_size()
A.update_areasize()
interact()
return 1
+1 -1
View File
@@ -2,7 +2,7 @@
name = "body egg"
desc = "All slimy and yuck."
icon_state = "innards"
zone = "chest"
zone = BODY_ZONE_CHEST
slot = "parasite_egg"
/obj/item/organ/body_egg/on_find(mob/living/finder)
+4 -6
View File
@@ -129,7 +129,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
reagents.add_reagent_list(list_reagents)
if(starts_lit)
light()
AddComponent(/datum/component/knockoff,90,list("mouth"),list(slot_wear_mask))//90% to knock off when wearing a mask
AddComponent(/datum/component/knockoff,90,list(BODY_ZONE_PRECISE_MOUTH),list(slot_wear_mask))//90% to knock off when wearing a mask
/obj/item/clothing/mask/cigarette/Destroy()
STOP_PROCESSING(SSobj, src)
@@ -546,12 +546,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(prot || prob(75))
user.visible_message("After a few attempts, [user] manages to light [src].", "<span class='notice'>After a few attempts, you manage to light [src].</span>")
else
var/hitzone = user.held_index_to_dir(user.active_hand_index) == "r" ? "r_hand" : "l_hand"
var/hitzone = user.held_index_to_dir(user.active_hand_index) == "r" ? BODY_ZONE_PRECISE_R_HAND : BODY_ZONE_PRECISE_L_HAND
user.apply_damage(5, BURN, hitzone)
user.visible_message("<span class='warning'>After a few attempts, [user] manages to light [src] - however, [user.p_they()] burn their finger in the process.</span>", "<span class='warning'>You burn yourself while lighting the lighter!</span>")
GET_COMPONENT_FROM(mood, /datum/component/mood, user)
if(mood)
mood.add_event("burnt_thumb", /datum/mood_event/burnt_thumb)
user.SendSignal(COMSIG_ADD_MOOD_EVENT, "burnt_thumb", /datum/mood_event/burnt_thumb)
else
set_lit(FALSE)
@@ -800,7 +798,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
vapetime = 0
if(prob(5))//small chance for the vape to break and deal damage if it's emagged
playsound(get_turf(src), 'sound/effects/pop_expl.ogg', 50, 0)
M.apply_damage(20, BURN, "head")
M.apply_damage(20, BURN, BODY_ZONE_HEAD)
M.Knockdown(300, 1, 0)
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread
sp.set_up(5, 1, src)
+2 -4
View File
@@ -69,7 +69,7 @@
if(do_after(user, src.cleanspeed, target = target))
to_chat(user, "<span class='notice'>You scrub \the [target.name] out.</span>")
qdel(target)
else if(ishuman(target) && user.zone_selected == "mouth")
else if(ishuman(target) && user.zone_selected == BODY_ZONE_PRECISE_MOUTH)
var/mob/living/carbon/human/H = user
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>", "<span class='notice'>You wash \the [target]'s mouth out with [src.name]!</span>") //washes mouth out with soap sounds better than 'the soap' here
H.lip_style = null //removes lipstick
@@ -117,9 +117,7 @@
AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50)
/obj/item/weapon/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
if(mood)
mood.add_event("honk", /datum/mood_event/honk)
M.SendSignal(COMSIG_ADD_MOOD_EVENT, "honk", /datum/mood_event/honk)
/obj/item/bikehorn/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] solemnly points the horn at [user.p_their()] temple! It looks like [user.p_theyre()] trying to commit suicide!</span>")
+8 -8
View File
@@ -78,7 +78,7 @@
//you can wipe off lipstick with paper!
/obj/item/paper/attack(mob/M, mob/user)
if(user.zone_selected == "mouth")
if(user.zone_selected == BODY_ZONE_PRECISE_MOUTH)
if(!ismob(M))
return
@@ -109,12 +109,12 @@
/obj/item/razor/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] begins shaving [user.p_them()]self without the razor guard! It looks like [user.p_theyre()] trying to commit suicide!</span>")
shave(user, "mouth")
shave(user, "head")//doesnt need to be "head" specifically, but whatever
shave(user, BODY_ZONE_PRECISE_MOUTH)
shave(user, BODY_ZONE_HEAD)//doesnt need to be BODY_ZONE_HEAD specifically, but whatever
return BRUTELOSS
/obj/item/razor/proc/shave(mob/living/carbon/human/H, location = "mouth")
if(location == "mouth")
/obj/item/razor/proc/shave(mob/living/carbon/human/H, location = BODY_ZONE_PRECISE_MOUTH)
if(location == BODY_ZONE_PRECISE_MOUTH)
H.facial_hair_style = "Shaved"
else
H.hair_style = "Skinhead"
@@ -127,10 +127,10 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/location = user.zone_selected
if((location in list("eyes", "mouth", "head")) && !H.get_bodypart("head"))
if((location in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_HEAD)) && !H.get_bodypart(BODY_ZONE_HEAD))
to_chat(user, "<span class='warning'>[H] doesn't have a head!</span>")
return
if(location == "mouth")
if(location == BODY_ZONE_PRECISE_MOUTH)
if(!(FACEHAIR in H.dna.species.species_traits))
to_chat(user, "<span class='warning'>There is no facial hair to shave!</span>")
return
@@ -158,7 +158,7 @@
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
shave(H, location)
else if(location == "head")
else if(location == BODY_ZONE_HEAD)
if(!(HAIR in H.dna.species.species_traits))
to_chat(user, "<span class='warning'>There is no hair to shave!</span>")
return
+6 -5
View File
@@ -244,8 +244,13 @@
if(!proximity || !check_allowed_items(target))
return
if(check_empty(user))
var/cost = 1
if(paint_mode == PAINT_LARGE_HORIZONTAL)
cost = 5
var/charges_used = use_charges(user, cost)
if(!charges_used)
return
. = charges_used
if(istype(target, /obj/effect/decal/cleanable))
target = target.loc
@@ -353,10 +358,6 @@
audible_message("<span class='notice'>You hear spraying.</span>")
playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5)
var/cost = 1
if(paint_mode == PAINT_LARGE_HORIZONTAL)
cost = 5
. = use_charges(user, cost)
var/fraction = min(1, . / reagents.maximum_volume)
if(affected_turfs.len)
fraction /= affected_turfs.len
+3 -3
View File
@@ -417,7 +417,7 @@
var/mob/living/carbon/H = M
if(user.zone_selected != "chest")
if(user.zone_selected != BODY_ZONE_CHEST)
to_chat(user, "<span class='warning'>You need to target your patient's chest with [src]!</span>")
return
@@ -507,7 +507,7 @@
H.visible_message("<span class='warning'>[H] thrashes wildly, clutching at their chest!</span>",
"<span class='userdanger'>You feel a horrible agony in your chest!</span>")
H.set_heartattack(TRUE)
H.apply_damage(50, BURN, "chest")
H.apply_damage(50, BURN, BODY_ZONE_CHEST)
add_logs(user, H, "overloaded the heart of", defib)
H.Knockdown(100)
H.Jitter(100)
@@ -626,7 +626,7 @@
icon_state = "defibpaddles0"
item_state = "defibpaddles0"
req_defib = FALSE
/obj/item/twohanded/shockpaddles/cyborg/attack(mob/M, mob/user)
if(iscyborg(user))
var/mob/living/silicon/robot/R = user
@@ -47,7 +47,7 @@
/obj/item/device/flashlight/attack(mob/living/carbon/M, mob/living/carbon/human/user)
add_fingerprint(user)
if(istype(M) && on && user.zone_selected in list("eyes", "mouth"))
if(istype(M) && on && user.zone_selected in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH))
if((user.has_trait(TRAIT_CLUMSY) || user.has_trait(TRAIT_DUMB)) && prob(50)) //too dumb to use flashlight properly
return ..() //just hit them in the head
@@ -56,7 +56,7 @@
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(!M.get_bodypart("head"))
if(!M.get_bodypart(BODY_ZONE_HEAD))
to_chat(user, "<span class='warning'>[M] doesn't have a head!</span>")
return
@@ -65,7 +65,7 @@
return
switch(user.zone_selected)
if("eyes")
if(BODY_ZONE_PRECISE_EYES)
if((M.head && M.head.flags_cover & HEADCOVERSEYES) || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSEYES) || (M.glasses && M.glasses.flags_cover & GLASSESCOVERSEYES))
to_chat(user, "<span class='notice'>You're going to need to remove that [(M.head && M.head.flags_cover & HEADCOVERSEYES) ? "helmet" : (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSEYES) ? "mask": "glasses"] first.</span>")
return
@@ -90,7 +90,7 @@
else //they're okay!
to_chat(user, "<span class='notice'>[M]'s pupils narrow.</span>")
if("mouth")
if(BODY_ZONE_PRECISE_MOUTH)
if((M.head && M.head.flags_cover & HEADCOVERSMOUTH) || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSMOUTH))
to_chat(user, "<span class='notice'>You're going to need to remove that [(M.head && M.head.flags_cover & HEADCOVERSMOUTH) ? "helmet" : "mask"] first.</span>")
@@ -100,7 +100,7 @@
var/list/mouth_organs = new
for(var/obj/item/organ/O in M.internal_organs)
if(O.zone == "mouth")
if(O.zone == BODY_ZONE_PRECISE_MOUTH)
mouth_organs.Add(O)
var/organ_list = ""
var/organ_count = LAZYLEN(mouth_organs)
@@ -372,7 +372,7 @@
return TRUE
/obj/item/device/flashlight/emp/attack(mob/living/M, mob/living/user)
if(on && user.zone_selected in list("eyes", "mouth")) // call original attack when examining organs
if(on && user.zone_selected in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH)) // call original attack when examining organs
..()
return
@@ -89,7 +89,7 @@
//human/alien mobs
if(iscarbon(target))
var/mob/living/carbon/C = target
if(user.zone_selected == "eyes")
if(user.zone_selected == BODY_ZONE_PRECISE_EYES)
add_logs(user, C, "shone in the eyes", src)
var/severity = 1
@@ -109,7 +109,7 @@
jill.emote("scream")
playsound(src, 'sound/effects/snap.ogg', 75, TRUE, frequency = 0.5)
playsound(src, 'sound/effects/splat.ogg', 50, TRUE, frequency = 0.5)
jill.apply_damage(9999, BRUTE, "head")
jill.apply_damage(9999, BRUTE, BODY_ZONE_HEAD)
jill.death() //just in case, for some reason, they're still alive
flash_color(jill, flash_color = "#FF0000", flash_time = 100)
+2 -2
View File
@@ -266,12 +266,12 @@
if(isliving(AM))
var/mob/living/L = AM
var/snap = 0
var/def_zone = "chest"
var/def_zone = BODY_ZONE_CHEST
if(iscarbon(L))
var/mob/living/carbon/C = L
snap = 1
if(!C.lying)
def_zone = pick("l_leg", "r_leg")
def_zone = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
if(!C.legcuffed && C.get_num_legs() >= 2) //beartrap can't cuff your leg if there's already a beartrap or legcuffs, or you don't have two legs.
C.legcuffed = src
forceMove(C)
+2 -2
View File
@@ -48,7 +48,7 @@
icon_state = "fork"
forkload = null
else if(user.zone_selected == "eyes")
else if(user.zone_selected == BODY_ZONE_PRECISE_EYES)
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
M = user
return eyestab(M,user)
@@ -78,7 +78,7 @@
AddComponent(/datum/component/butchering, 80 - force, 100, force - 10) //bonus chance increases depending on force
/obj/item/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user)
if(user.zone_selected == "eyes")
if(user.zone_selected == BODY_ZONE_PRECISE_EYES)
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
M = user
return eyestab(M,user)
+1 -1
View File
@@ -116,7 +116,7 @@
user.Knockdown(60 * force)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, "head")
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
else
user.take_bodypart_damage(2*force)
return
+2 -2
View File
@@ -70,7 +70,7 @@
switch(mode)
if(0)
if(M.health >= 0)
if(user.zone_selected == "head")
if(user.zone_selected == BODY_ZONE_HEAD)
user.visible_message("<span class='notice'>[user] playfully boops [M] on the head!</span>", \
"<span class='notice'>You playfully boop [M] on the head!</span>")
user.do_attack_animation(M, ATTACK_EFFECT_BOOP)
@@ -95,7 +95,7 @@
if(M.lying)
user.visible_message("<span class='notice'>[user] shakes [M] trying to get [M.p_them()] up!</span>", \
"<span class='notice'>You shake [M] trying to get [M.p_them()] up!</span>")
else if(user.zone_selected == "head")
else if(user.zone_selected == BODY_ZONE_HEAD)
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
"<span class='warning'>You bop [M] on the head!</span>")
user.do_attack_animation(M, ATTACK_EFFECT_PUNCH)
+5 -1
View File
@@ -156,7 +156,7 @@
/obj/item/storage/bag/bio,
/obj/item/reagent_containers/blood,
/obj/item/tank/internals/emergency_oxygen,
/obj/item/pinpointer/crew,
/obj/item/pinpointer/crew,
/obj/item/gun/syringe/syndicate,
/obj/item/implantcase,
/obj/item/implant,
@@ -278,6 +278,10 @@
for(var/i in 1 to 6)
new /obj/item/device/soulstone(src)
/obj/item/storage/belt/soulstone/full/chappy/PopulateContents()
for(var/i in 1 to 6)
new /obj/item/device/soulstone/anybody/chaplain(src)
/obj/item/storage/belt/champion
name = "championship belt"
desc = "Proves to the world that you are the strongest!"
+2 -4
View File
@@ -96,9 +96,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
H.visible_message("<span class='notice'>[user] heals [H] with the power of [deity_name]!</span>")
to_chat(H, "<span class='boldnotice'>May the power of [deity_name] compel you to be healed!</span>")
playsound(src.loc, "punch", 25, 1, -1)
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
if(mood)
mood.add_event("blessing", /datum/mood_event/blessing)
H.SendSignal(COMSIG_ADD_MOOD_EVENT, "blessing", /datum/mood_event/blessing)
return 1
/obj/item/storage/book/bible/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE)
@@ -215,7 +213,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
uses -= 1
to_chat(H, "<span class='userdanger'>You try to open the book AND IT BITES YOU!</span>")
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
H.apply_damage(5, BRUTE, pick("l_arm", "r_arm"))
H.apply_damage(5, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
to_chat(H, "<span class='notice'>Your name appears on the inside cover, in blood.</span>")
var/ownername = H.real_name
desc += "<span class='warning'>The name [ownername] is written in blood inside the cover.</span>"
+1 -1
View File
@@ -37,7 +37,7 @@
update_icon()
/obj/item/storage/box/suicide_act(mob/living/carbon/user)
var/obj/item/bodypart/head/myhead = user.get_bodypart("head")
var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD)
if(myhead)
user.visible_message("<span class='suicide'>[user] puts [user.p_their()] head into \the [src], and begins closing it! It looks like [user.p_theyre()] trying to commit suicide!</span>")
myhead.dismember()
+1 -1
View File
@@ -73,7 +73,7 @@
/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!istype(M))
return ..()
if(user.zone_selected != "eyes" && user.zone_selected != "head")
if(user.zone_selected != BODY_ZONE_PRECISE_EYES && user.zone_selected != BODY_ZONE_HEAD)
return ..()
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
M = user
+1 -1
View File
@@ -99,7 +99,7 @@
playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1)
if(iscarbon(user))
var/mob/living/carbon/C = user
var/obj/item/bodypart/BP = C.get_bodypart("head")
var/obj/item/bodypart/BP = C.get_bodypart(BODY_ZONE_HEAD)
if(BP)
BP.drop_limb()
playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
+4 -4
View File
@@ -294,7 +294,7 @@
if(wielded)
user.visible_message("<span class='suicide'>[user] begins spinning way too fast! It looks like [user.p_theyre()] trying to commit suicide!</span>")
var/obj/item/bodypart/head/myhead = user.get_bodypart("head")//stole from chainsaw code
var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD)//stole from chainsaw code
var/obj/item/organ/brain/B = user.getorganslot(ORGAN_SLOT_BRAIN)
B.vital = FALSE//this cant possibly be a good idea
var/randdir
@@ -578,7 +578,7 @@
if(on)
user.visible_message("<span class='suicide'>[user] begins to tear [user.p_their()] head off with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(src, 'sound/weapons/chainsawhit.ogg', 100, 1)
var/obj/item/bodypart/head/myhead = user.get_bodypart("head")
var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD)
if(myhead)
myhead.dismember()
else
@@ -705,14 +705,14 @@
"<span class='warning'>\"As you pick up [src] your arms ignite, reminding you of all your past sins.\"</span>")
if(ishuman(U))
var/mob/living/carbon/human/H = U
H.apply_damage(rand(force/2, force), BURN, pick("l_arm", "r_arm"))
H.apply_damage(rand(force/2, force), BURN, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
else
U.adjustFireLoss(rand(force/2,force))
/obj/item/twohanded/pitchfork/demonic/attack(mob/target, mob/living/carbon/human/user)
if(user.mind && user.owns_soul() && !is_devil(user))
to_chat(user, "<span class ='warning'>[src] burns in your hands.</span>")
user.apply_damage(rand(force/2, force), BURN, pick("l_arm", "r_arm"))
user.apply_damage(rand(force/2, force), BURN, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
..()
/obj/item/twohanded/pitchfork/demonic/ascended/afterattack(atom/target, mob/user, proximity)
+6 -2
View File
@@ -19,7 +19,7 @@
return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS)
/obj/item/banhammer/attack(mob/M, mob/user)
if(user.zone_selected == "head")
if(user.zone_selected == BODY_ZONE_HEAD)
M.visible_message("<span class='danger'>[user] are stroking the head of [M] with a bangammer</span>", "<span class='userdanger'>[user] are stroking the head with a bangammer</span>", "you hear a bangammer stroking a head");
else
M.visible_message("<span class='danger'>[M] has been banned FOR NO REISIN by [user]</span>", "<span class='userdanger'>You have been banned FOR NO REISIN by [user]</span>", "you hear a banhammer banning someone")
@@ -444,6 +444,10 @@
throw_range = 2
attack_verb = list("busted")
/obj/item/statuebust/Initialize()
. = ..()
addtimer(CALLBACK(src, /datum.proc/AddComponent, /datum/component/beauty, 1000), 0)
/obj/item/tailclub
name = "tail club"
desc = "For the beating to death of lizards with their own tails."
@@ -605,7 +609,7 @@
if(ishuman(M))
var/mob/living/carbon/human/L = M
L.endTailWag()
if(user.a_intent != INTENT_HARM && ((user.zone_selected == "mouth") || (user.zone_selected == "eyes") || (user.zone_selected == "head")))
if(user.a_intent != INTENT_HARM && ((user.zone_selected == BODY_ZONE_PRECISE_MOUTH) || (user.zone_selected == BODY_ZONE_PRECISE_EYES) || (user.zone_selected == BODY_ZONE_HEAD)))
user.do_attack_animation(M)
playsound(M, 'sound/weapons/slap.ogg', 50, 1, -1)
user.visible_message("<span class='danger'>[user] slaps [M]!</span>",