This commit is contained in:
Ghommie
2019-07-15 17:33:41 +02:00
478 changed files with 4946 additions and 2469 deletions
+1 -1
View File
@@ -29,7 +29,7 @@
/datum/surgery_step/handle_cavity/success(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/obj/item/bodypart/chest/CH = target.get_bodypart(BODY_ZONE_CHEST)
if(tool)
if(IC || tool.w_class > WEIGHT_CLASS_NORMAL || (tool.item_flags & NODROP) || istype(tool, /obj/item/organ))
if(IC || tool.w_class > WEIGHT_CLASS_NORMAL || HAS_TRAIT(tool, TRAIT_NODROP) || istype(tool, /obj/item/organ))
to_chat(user, "<span class='warning'>You can't seem to fit [tool] in [target]'s [target_zone]!</span>")
return 0
var/obj/item/electronic_assembly/EA = tool
+1 -1
View File
@@ -89,7 +89,7 @@
holder = item
holder.item_flags |= NODROP
ADD_TRAIT(holder, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT)
holder.resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
holder.slot_flags = null
holder.materials = null
@@ -46,7 +46,7 @@
/obj/item/organ/cyberimp/chest/reviver
name = "Reviver implant"
desc = "This implant will attempt to revive you if you lose consciousness. For the faint of heart!"
desc = "This implant will attempt to revive and heal you if you lose consciousness. For the faint of heart!"
icon_state = "chest_implant"
implant_color = "#AD0000"
slot = ORGAN_SLOT_HEART_AID
@@ -51,8 +51,7 @@
active = !active
if(active)
for(var/obj/item/I in owner.held_items)
if(!(I.item_flags & NODROP))
stored_items += I
stored_items += I
var/list/L = owner.get_empty_held_indexes()
if(LAZYLEN(L) == owner.held_items.len)
@@ -62,7 +61,7 @@
else
for(var/obj/item/I in stored_items)
to_chat(owner, "<span class='notice'>Your [owner.get_held_index_name(owner.get_held_index_of_item(I))]'s grip tightens.</span>")
I.item_flags |= NODROP
ADD_TRAIT(I, TRAIT_NODROP, ANTI_DROP_IMPLANT_TRAIT)
else
release_items()
@@ -83,10 +82,9 @@
to_chat(owner, "<span class='warning'>Your [owner.get_held_index_name(owner.get_held_index_of_item(I))] spasms and throws the [I.name]!</span>")
stored_items = list()
/obj/item/organ/cyberimp/brain/anti_drop/proc/release_items()
for(var/obj/item/I in stored_items)
I.item_flags &= ~NODROP
REMOVE_TRAIT(I, TRAIT_NODROP, ANTI_DROP_IMPLANT_TRAIT)
stored_items = list()
@@ -103,3 +103,23 @@
desc = "A single use autosurgeon that contains a penis. A screwdriver can be used to remove it, but implants can't be placed back in."
uses = 1
starting_organ = /obj/item/organ/genital/penis
/obj/item/autosurgeon/testicles
desc = "A single use autosurgeon that contains a set of testicles. A screwdriver can be used to remove it, but implants can't be placed back in."
uses = 1
starting_organ = /obj/item/organ/genital/testicles
/obj/item/autosurgeon/vagina
desc = "A single use autosurgeon that contains a vagina. A screwdriver can be used to remove it, but implants can't be placed back in."
uses = 1
starting_organ = /obj/item/organ/genital/vagina
/obj/item/autosurgeon/breasts
desc = "A single use autosurgeon that contains a set of breasts. A screwdriver can be used to remove it, but implants can't be placed back in."
uses = 1
starting_organ = /obj/item/organ/genital/breasts
/obj/item/autosurgeon/womb
desc = "A single use autosurgeon that contains a womb. A screwdriver can be used to remove it, but implants can't be placed back in."
uses = 1
starting_organ = /obj/item/organ/genital/womb
+48 -36
View File
@@ -288,51 +288,52 @@
gas_breathed = breath_gases[/datum/gas/stimulum]
if (gas_breathed > gas_stimulation_min)
var/existing = H.reagents.get_reagent_amount("stimulum")
H.reagents.add_reagent("stimulum",max(0, 1 - existing))
H.reagents.add_reagent("stimulum", max(0, 5 - existing))
breath_gases[/datum/gas/stimulum]-=gas_breathed
// Miasma
if (breath_gases[/datum/gas/miasma])
var/miasma_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/miasma])
if(miasma_pp > MINIMUM_MOLES_DELTA_TO_MOVE)
//Miasma sickness
if(prob(0.5 * miasma_pp))
var/datum/disease/advance/miasma_disease = new /datum/disease/advance/random(2,3)
miasma_disease.name = "Unknown"
miasma_disease.try_infect(owner)
//Miasma sickness
if(prob(0.05 * miasma_pp))
var/datum/disease/advance/miasma_disease = new /datum/disease/advance/random(2,3)
miasma_disease.name = "Unknown"
miasma_disease.try_infect(owner)
// Miasma side effects
switch(miasma_pp)
if(1 to 5)
// At lower pp, give out a little warning
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "smell")
if(prob(5))
to_chat(owner, "<span class='notice'>There is an unpleasant smell in the air.</span>")
if(5 to 15)
//At somewhat higher pp, warning becomes more obvious
if(prob(15))
to_chat(owner, "<span class='warning'>You smell something horribly decayed inside this room.</span>")
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/bad_smell)
if(15 to 30)
//Small chance to vomit. By now, people have internals on anyway
if(prob(5))
to_chat(owner, "<span class='warning'>The stench of rotting carcasses is unbearable!</span>")
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/nauseating_stench)
owner.vomit()
if(30 to INFINITY)
//Higher chance to vomit. Let the horror start
if(prob(15))
to_chat(owner, "<span class='warning'>The stench of rotting carcasses is unbearable!</span>")
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/nauseating_stench)
owner.vomit()
else
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "smell")
// Miasma side effects
switch(miasma_pp)
if(1 to 5)
// At lower pp, give out a little warning
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "smell")
if(prob(5))
to_chat(owner, "<span class='notice'>There is an unpleasant smell in the air.</span>")
if(5 to 15)
//At somewhat higher pp, warning becomes more obvious
if(prob(15))
to_chat(owner, "<span class='warning'>You smell something horribly decayed inside this room.</span>")
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/bad_smell)
if(15 to 30)
//Small chance to vomit. By now, people have internals on anyway
if(prob(5))
to_chat(owner, "<span class='warning'>The stench of rotting carcasses is unbearable!</span>")
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/nauseating_stench)
owner.vomit()
if(30 to INFINITY)
//Higher chance to vomit. Let the horror start
if(prob(15))
to_chat(owner, "<span class='warning'>The stench of rotting carcasses is unbearable!</span>")
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "smell", /datum/mood_event/disgust/nauseating_stench)
owner.vomit()
else
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "smell")
// In a full miasma atmosphere with 101.34 pKa, about 10 disgust per breath, is pretty low compared to threshholds
// Then again, this is a purely hypothetical scenario and hardly reachable
owner.adjust_disgust(0.1 * miasma_pp)
// In a full miasma atmosphere with 101.34 pKa, about 10 disgust per breath, is pretty low compared to threshholds
// Then again, this is a purely hypothetical scenario and hardly reachable
owner.adjust_disgust(0.1 * miasma_pp)
breath_gases[/datum/gas/miasma]-=gas_breathed
breath_gases[/datum/gas/miasma]-=gas_breathed
// Clear out moods when no miasma at all
else
@@ -442,3 +443,14 @@
heat_level_1_threshold = 400 // better adapted for heat, obv. Lavaland standard is 300
heat_level_2_threshold = 600 // up 200 from level 1, 1000 is silly but w/e for level 3
/obj/item/organ/lungs/slime
name = "vacuole"
desc = "A large organelle designed to store oxygen and other important gasses."
safe_toxins_max = 0 //We breathe this to gain POWER.
/obj/item/organ/lungs/slime/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
. = ..()
if (breath.gases[/datum/gas/plasma])
var/plasma_pp = breath.get_breath_partial_pressure(breath.gases[/datum/gas/plasma])
owner.blood_volume += (0.2 * plasma_pp) // 10/s when breathing literally nothing but plasma, which will suffocate you.
+50 -42
View File
@@ -8,6 +8,7 @@
var/list/languages_possible
var/say_mod = null
var/taste_sensitivity = 15 // lower is more sensitive.
var/modifies_speech = FALSE
var/static/list/languages_possible_base = typecacheof(list(
/datum/language/common,
/datum/language/draconic,
@@ -24,24 +25,25 @@
. = ..()
languages_possible = languages_possible_base
/obj/item/organ/tongue/get_spans()
return list()
/obj/item/organ/tongue/proc/TongueSpeech(var/message)
return message
/obj/item/organ/tongue/proc/handle_speech(datum/source, list/speech_args)
/obj/item/organ/tongue/Insert(mob/living/carbon/M, special = 0)
..()
if(say_mod && M.dna && M.dna.species)
M.dna.species.say_mod = say_mod
if (modifies_speech)
RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
M.UnregisterSignal(M, COMSIG_MOB_SAY)
/obj/item/organ/tongue/Remove(mob/living/carbon/M, special = 0)
..()
if(say_mod && M.dna && M.dna.species)
M.dna.species.say_mod = initial(M.dna.species.say_mod)
UnregisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
M.RegisterSignal(M, COMSIG_MOB_SAY, /mob/living/carbon/.proc/handle_tongueless_speech)
/obj/item/organ/tongue/could_speak_in_language(datum/language/dt)
. = is_type_in_typecache(dt, languages_possible)
return is_type_in_typecache(dt, languages_possible)
/obj/item/organ/tongue/lizard
name = "forked tongue"
@@ -49,14 +51,16 @@
icon_state = "tonguelizard"
say_mod = "hisses"
taste_sensitivity = 10 // combined nose + tongue, extra sensitive
modifies_speech = TRUE
/obj/item/organ/tongue/lizard/TongueSpeech(var/message)
var/regex/lizard_hiss = new("s+", "g")
var/regex/lizard_hiSS = new("S+", "g")
if(copytext(message, 1, 2) != "*")
/obj/item/organ/tongue/lizard/handle_speech(datum/source, list/speech_args)
var/static/regex/lizard_hiss = new("s+", "g")
var/static/regex/lizard_hiSS = new("S+", "g")
var/message = speech_args[SPEECH_MESSAGE]
if(message[1] != "*")
message = lizard_hiss.Replace(message, "sss")
message = lizard_hiSS.Replace(message, "SSS")
return message
speech_args[SPEECH_MESSAGE] = message
/obj/item/organ/tongue/fly
name = "proboscis"
@@ -64,14 +68,16 @@
icon_state = "tonguefly"
say_mod = "buzzes"
taste_sensitivity = 25 // you eat vomit, this is a mercy
modifies_speech = TRUE
/obj/item/organ/tongue/fly/TongueSpeech(var/message)
var/regex/fly_buzz = new("z+", "g")
var/regex/fly_buZZ = new("Z+", "g")
if(copytext(message, 1, 2) != "*")
/obj/item/organ/tongue/fly/handle_speech(datum/source, list/speech_args)
var/static/regex/fly_buzz = new("z+", "g")
var/static/regex/fly_buZZ = new("Z+", "g")
var/message = speech_args[SPEECH_MESSAGE]
if(message[1] != "*")
message = fly_buzz.Replace(message, "zzz")
message = fly_buZZ.Replace(message, "ZZZ")
return message
speech_args[SPEECH_MESSAGE] = message
/obj/item/organ/tongue/abductor
name = "superlingual matrix"
@@ -79,9 +85,11 @@
icon_state = "tongueayylmao"
say_mod = "gibbers"
taste_sensitivity = 101 // ayys cannot taste anything.
modifies_speech = TRUE
/obj/item/organ/tongue/abductor/TongueSpeech(var/message)
/obj/item/organ/tongue/abductor/handle_speech(datum/source, list/speech_args)
//Hacks
var/message = speech_args[SPEECH_MESSAGE]
var/mob/living/carbon/human/user = usr
var/rendered = "<span class='abductor'><b>[user.name]:</b> [message]</span>"
user.log_talk(message, LOG_SAY, tag="abductor")
@@ -97,7 +105,7 @@
for(var/mob/M in GLOB.dead_mob_list)
var/link = FOLLOW_LINK(M, user)
to_chat(M, "[link] [rendered]")
return ""
speech_args[SPEECH_MESSAGE] = ""
/obj/item/organ/tongue/zombie
name = "rotting tongue"
@@ -105,9 +113,10 @@
icon_state = "tonguezombie"
say_mod = "moans"
taste_sensitivity = 32
modifies_speech = TRUE
/obj/item/organ/tongue/zombie/TongueSpeech(var/message)
var/list/message_list = splittext(message, " ")
/obj/item/organ/tongue/zombie/handle_speech(datum/source, list/speech_args)
var/list/message_list = splittext(speech_args[SPEECH_MESSAGE], " ")
var/maxchanges = max(round(message_list.len / 1.5), 2)
for(var/i = rand(maxchanges / 2, maxchanges), i > 0, i--)
@@ -120,7 +129,7 @@
if(prob(20) && message_list.len > 3)
message_list.Insert(insertpos, "[pick("BRAINS", "Brains", "Braaaiinnnsss", "BRAAAIIINNSSS")]...")
return jointext(message_list, " ")
speech_args[SPEECH_MESSAGE] = jointext(message_list, " ")
/obj/item/organ/tongue/alien
name = "alien tongue"
@@ -128,6 +137,7 @@
icon_state = "tonguexeno"
say_mod = "hisses"
taste_sensitivity = 10 // LIZARDS ARE ALIENS CONFIRMED
modifies_speech = TRUE // not really, they just hiss
var/static/list/languages_possible_alien = typecacheof(list(
/datum/language/xenocommon,
/datum/language/common,
@@ -139,9 +149,8 @@
. = ..()
languages_possible = languages_possible_alien
/obj/item/organ/tongue/alien/TongueSpeech(var/message)
/obj/item/organ/tongue/alien/handle_speech(datum/source, list/speech_args)
playsound(owner, "hiss", 25, 1, 1)
return message
/obj/item/organ/tongue/bone
name = "bone \"tongue\""
@@ -150,7 +159,7 @@
say_mod = "rattles"
attack_verb = list("bitten", "chattered", "chomped", "enamelled", "boned")
taste_sensitivity = 101 // skeletons cannot taste anything
modifies_speech = TRUE
var/chattering = FALSE
var/phomeme_type = "sans"
var/list/phomeme_types = list("sans", "papyrus")
@@ -159,29 +168,20 @@
. = ..()
phomeme_type = pick(phomeme_types)
/obj/item/organ/tongue/bone/TongueSpeech(var/message)
. = message
if(chattering)
//Annoy everyone nearby with your chattering.
chatter(message, phomeme_type, usr)
/obj/item/organ/tongue/bone/get_spans()
. = ..()
// Feature, if the tongue talks directly, it will speak with its span
/obj/item/organ/tongue/bone/handle_speech(datum/source, list/speech_args)
if (chattering)
chatter(speech_args[SPEECH_MESSAGE], phomeme_type, source)
switch(phomeme_type)
if("sans")
. |= SPAN_SANS
speech_args[SPEECH_SPANS] |= SPAN_SANS
if("papyrus")
. |= SPAN_PAPYRUS
speech_args[SPEECH_SPANS] |= SPAN_PAPYRUS
/obj/item/organ/tongue/bone/plasmaman
name = "plasma bone \"tongue\""
desc = "Like animated skeletons, Plasmamen vibrate their teeth in order to produce speech."
icon_state = "tongueplasma"
/obj/item/organ/tongue/bone/plasmaman/get_spans()
return
modifies_speech = FALSE
/obj/item/organ/tongue/robot
name = "robotic voicebox"
@@ -190,10 +190,18 @@
icon_state = "tonguerobot"
say_mod = "states"
attack_verb = list("beeped", "booped")
modifies_speech = TRUE
taste_sensitivity = 25 // not as good as an organic tongue
var/electronics_magic = TRUE
/obj/item/organ/tongue/robot/can_speak_in_language(datum/language/dt)
. = TRUE // THE MAGIC OF ELECTRONICS
return ..() || electronics_magic
/obj/item/organ/tongue/robot/get_spans()
return ..() | SPAN_ROBOT
/obj/item/organ/tongue/robot/handle_speech(datum/source, list/speech_args)
speech_args[SPEECH_SPANS] |= SPAN_ROBOT
/obj/item/organ/tongue/robot/ipc
name = "positronic voicebox"
say_mod = "beeps"
desc = "A voice synthesizer used by IPCs to smoothly interface with organic lifeforms."
electronics_magic = FALSE
+8 -3
View File
@@ -49,9 +49,14 @@
var/datum/surgery_step/S = get_surgery_step()
if(S)
if(S.try_op(user, target, user.zone_selected, user.get_active_held_item(), src, try_to_fail))
return 1
return 0
var/obj/item/tool = user.get_active_held_item()
if(S.try_op(user, target, user.zone_selected, tool, src, try_to_fail))
return TRUE
if(iscyborg(user) && user.a_intent != INTENT_HARM) //to save asimov borgs a LOT of heartache
return TRUE
if(tool.item_flags & SURGICAL_TOOL) //Just because you used the wrong tool it doesn't mean you meant to whack the patient with it
to_chat(user, "<span class='warning'>This step requires a different tool!</span>")
return TRUE
/datum/surgery/proc/get_surgery_step()
var/step_type = steps[status]
+7
View File
@@ -4,6 +4,7 @@
icon = 'icons/obj/surgery.dmi'
icon_state = "retractor"
materials = list(MAT_METAL=6000, MAT_GLASS=3000)
item_flags = SURGICAL_TOOL
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_TINY
@@ -33,6 +34,7 @@
icon = 'icons/obj/surgery.dmi'
icon_state = "hemostat"
materials = list(MAT_METAL=5000, MAT_GLASS=2500)
item_flags = SURGICAL_TOOL
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_TINY
attack_verb = list("attacked", "pinched")
@@ -66,6 +68,7 @@
icon = 'icons/obj/surgery.dmi'
icon_state = "cautery"
materials = list(MAT_METAL=2500, MAT_GLASS=750)
item_flags = SURGICAL_TOOL
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_TINY
attack_verb = list("burnt")
@@ -102,6 +105,7 @@
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
hitsound = 'sound/weapons/circsawhit.ogg'
materials = list(MAT_METAL=10000, MAT_GLASS=6000)
item_flags = SURGICAL_TOOL
flags_1 = CONDUCT_1
force = 15
w_class = WEIGHT_CLASS_NORMAL
@@ -151,6 +155,7 @@
throw_speed = 3
throw_range = 5
materials = list(MAT_METAL=4000, MAT_GLASS=1000)
item_flags = SURGICAL_TOOL
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP_ACCURATE
@@ -209,6 +214,7 @@
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
hitsound = 'sound/weapons/circsawhit.ogg'
throwhitsound = 'sound/weapons/pierce.ogg'
item_flags = SURGICAL_TOOL
flags_1 = CONDUCT_1
force = 15
w_class = WEIGHT_CLASS_NORMAL
@@ -278,6 +284,7 @@
desc = "A container for holding body parts."
icon = 'icons/obj/storage.dmi'
icon_state = "evidenceobj"
item_flags = SURGICAL_TOOL
/obj/item/organ_storage/afterattack(obj/item/I, mob/user, proximity)
. = ..()