From be18146f0873e4571abd71c7bfabd96c3f51286a Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Fri, 29 Jan 2016 05:41:50 -0800 Subject: [PATCH 1/5] Increases the number of memes in the codebase --- .../mob/living/carbon/brain/brain_item.dm | 2 +- .../living/carbon/human/species/skeleton.dm | 6 +++++- code/modules/organs/organ_external.dm | 6 +++++- .../oldchem/reagents/drink/reagents_drink.dm | 18 ++++++++++++++++++ 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index 5a0132f6bd8..a44b3d20450 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -104,7 +104,7 @@ icon_state = "green slime extract" /obj/item/organ/brain/golem - name = "chem" + name = "Runic mind" desc = "A tightly furled roll of paper, covered with indecipherable runes." icon = 'icons/obj/wizard.dmi' icon_state = "scroll" diff --git a/code/modules/mob/living/carbon/human/species/skeleton.dm b/code/modules/mob/living/carbon/human/species/skeleton.dm index 82c7864dd46..16ae7862906 100644 --- a/code/modules/mob/living/carbon/human/species/skeleton.dm +++ b/code/modules/mob/living/carbon/human/species/skeleton.dm @@ -30,4 +30,8 @@ heat_level_1 = 999999999 heat_level_2 = 999999999 heat_level_3 = 999999999 - heat_level_3_breathe = 999999999 \ No newline at end of file + heat_level_3_breathe = 999999999 + + has_organ = list( + "brain" = /obj/item/organ/brain/golem, + ) \ No newline at end of file diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index f6c08a20d84..f80e1975b76 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -566,7 +566,11 @@ Note that amputating the affected organ does in fact remove the infection from t if(!(status & ORGAN_ROBOT) && W.bleeding()) W.bleed_timer-- - status |= ORGAN_BLEEDING + if(H && (H.species.flags & NO_BLOOD)) // Bloodless organic races are finicky + W.clamped = 1 + W.bleed_timer = 0 + else + status |= ORGAN_BLEEDING clamped |= W.clamped diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm b/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm index dc43ffb54b4..e58687cb925 100644 --- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm +++ b/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm @@ -148,6 +148,24 @@ if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) if(holder.has_reagent("capsaicin")) holder.remove_reagent("capsaicin", 2) + + // Sometimes Crazylemon feels very silly + if(istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.species.name in list("Skeleton")) + H.heal_overall_damage(4,4) + if(prob(5)) // 5% chance per proc to find a random limb, and mend it + var/list/our_organs = H.organs.Copy() + shuffle(our_organs) + for(var/obj/item/organ/external/L in our_organs) + if(istype(L)) + if(L.brute_dam < L.min_broken_damage) + L.status &= ~ORGAN_BROKEN + L.status &= ~ORGAN_SPLINTED + L.perma_injury = 0 + break // We're only checking one limb here, bucko + if(prob(3)) + H.say(pick("Thanks Mr Skeltal", "Thank for strong bones", "Doot doot!")) ..() return From d75be4d0fd6bee903fe0d3be955f8e002cb5f3fa Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Sat, 30 Jan 2016 20:19:05 -0800 Subject: [PATCH 2/5] For those who want to get off of Mr Bone's Wild Ride --- code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm b/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm index e58687cb925..42c76ebaafa 100644 --- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm +++ b/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm @@ -150,7 +150,7 @@ holder.remove_reagent("capsaicin", 2) // Sometimes Crazylemon feels very silly - if(istype(M, /mob/living/carbon/human)) + if(istype(M, /mob/living/carbon/human) && id == "milk") // This is only for the purest of milk var/mob/living/carbon/human/H = M if(H.species.name in list("Skeleton")) H.heal_overall_damage(4,4) From 2f11aa1b0a00a0918a5d54ed7b8f962507c4f451 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Mon, 1 Feb 2016 10:25:33 -0800 Subject: [PATCH 3/5] Species now can have reagent-specific reactions --- .../living/carbon/human/species/species.dm | 9 ++++- .../living/carbon/human/species/station.dm | 34 +++++++++++++++++++ .../modules/reagents/newchem/newchem_procs.dm | 7 +++- 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 20b1ecdfba3..de2af282e2a 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -608,4 +608,11 @@ It'll return null if the organ doesn't correspond, so include null checks when u /datum/species/proc/return_organ(var/organ_slot) if(!(organ_slot in has_organ)) return null - return has_organ[organ_slot] \ No newline at end of file + return has_organ[organ_slot] + +// Do species-specific reagent handling here +// Return 1 if it should do normal processing too +// Return 0 if it shouldn't deplete and do its normal effect +// Other return values will cause weird badness +/datum/species/proc/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) + return 1 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index ff9ae6ff835..c0e7aac4277 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -139,6 +139,40 @@ /datum/species/vulpkanin/handle_death(var/mob/living/carbon/human/H) H.stop_tail_wagging(1) +/datum/species/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) + if(R.id in list("coco", "hot_coco", "chocolate_milk", "chocolate")) + // I have no idea if chocolate is THIS bad for dogs, but I guess this should get the point across + if(prob(20)) + H.emote(pick("twitch","drool", "quiver")) + if(prob(10)) + H.emote("scream") + H.drop_l_hand() + H.drop_r_hand() + if(prob(5)) + H.confused = max(H.confused, 3) + if(prob(15)) + H.fakevomit() + if(prob(2)) + H.visible_message("[H] starts having a seizure!", "You have a seizure!") + H.Paralyse(5) + H.jitteriness = 1000 + if(R.current_cycle >= 5) + H.jitteriness += 10 + if(R.current_cycle >= 20) + if(prob(5)) + H.emote("collapse") + switch(R.current_cycle) + if(0 to 60) + H.adjustBrainLoss(1) + H.adjustToxLoss(1) + if(61 to INFINITY) + H.adjustBrainLoss(2) + H.adjustToxLoss(2) + H.Paralyse(5) + H.losebreath += 5 + return 1 + return ..() + /datum/species/skrell name = "Skrell" name_plural = "Skrell" diff --git a/code/modules/reagents/newchem/newchem_procs.dm b/code/modules/reagents/newchem/newchem_procs.dm index 92aa05c0280..40a4905e0ef 100644 --- a/code/modules/reagents/newchem/newchem_procs.dm +++ b/code/modules/reagents/newchem/newchem_procs.dm @@ -32,9 +32,14 @@ datum/reagents/proc/metabolize(var/mob/M) //Species with PROCESS_DUO are only affected by reagents that affect both organics and synthetics, like acid and hellwater if((R.process_flags & ORGANIC) && (R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_DUO)) can_process = 1 + + //If handle_reagents returns 0, it's doing the reagent removal on its own + var/species_handled = !(H.species.handle_reagents(H, R)) + can_process = can_process && !species_handled //If the mob can't process it, remove the reagent at it's normal rate without doing any addictions, overdoses, or on_mob_life() for the reagent if(can_process == 0) - R.holder.remove_reagent(R.id, R.metabolization_rate) + if(!species_handled) + R.holder.remove_reagent(R.id, R.metabolization_rate) continue //We'll assume that non-human mobs lack the ability to process synthetic-oriented reagents (adjust this if we need to change that assumption) else From 0913ea5664ba0488d2cbb237232dd52258598cb4 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Mon, 1 Feb 2016 10:54:48 -0800 Subject: [PATCH 4/5] desnowflakes el memerinnos --- .../living/carbon/human/species/skeleton.dm | 22 ++++++++++++++++++- .../living/carbon/human/species/station.dm | 2 +- .../oldchem/reagents/drink/reagents_drink.dm | 18 --------------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/skeleton.dm b/code/modules/mob/living/carbon/human/species/skeleton.dm index 16ae7862906..d827abab1c1 100644 --- a/code/modules/mob/living/carbon/human/species/skeleton.dm +++ b/code/modules/mob/living/carbon/human/species/skeleton.dm @@ -34,4 +34,24 @@ has_organ = list( "brain" = /obj/item/organ/brain/golem, - ) \ No newline at end of file + ) + +/datum/species/skeleton/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) + // Crazylemon is still silly + if(R.id == "milk") + H.heal_overall_damage(4,4) + if(prob(5)) // 5% chance per proc to find a random limb, and mend it + var/list/our_organs = H.organs.Copy() + shuffle(our_organs) + for(var/obj/item/organ/external/L in our_organs) + if(istype(L)) + if(L.brute_dam < L.min_broken_damage) + L.status &= ~ORGAN_BROKEN + L.status &= ~ORGAN_SPLINTED + L.perma_injury = 0 + break // We're only checking one limb here, bucko + if(prob(3)) + H.say(pick("Thanks Mr Skeltal", "Thank for strong bones", "Doot doot!")) + return 1 + + return ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index c0e7aac4277..982cad4e31b 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -139,7 +139,7 @@ /datum/species/vulpkanin/handle_death(var/mob/living/carbon/human/H) H.stop_tail_wagging(1) -/datum/species/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) +/datum/species/vulpkanin/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) if(R.id in list("coco", "hot_coco", "chocolate_milk", "chocolate")) // I have no idea if chocolate is THIS bad for dogs, but I guess this should get the point across if(prob(20)) diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm b/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm index 42c76ebaafa..dc43ffb54b4 100644 --- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm +++ b/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm @@ -148,24 +148,6 @@ if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) if(holder.has_reagent("capsaicin")) holder.remove_reagent("capsaicin", 2) - - // Sometimes Crazylemon feels very silly - if(istype(M, /mob/living/carbon/human) && id == "milk") // This is only for the purest of milk - var/mob/living/carbon/human/H = M - if(H.species.name in list("Skeleton")) - H.heal_overall_damage(4,4) - if(prob(5)) // 5% chance per proc to find a random limb, and mend it - var/list/our_organs = H.organs.Copy() - shuffle(our_organs) - for(var/obj/item/organ/external/L in our_organs) - if(istype(L)) - if(L.brute_dam < L.min_broken_damage) - L.status &= ~ORGAN_BROKEN - L.status &= ~ORGAN_SPLINTED - L.perma_injury = 0 - break // We're only checking one limb here, bucko - if(prob(3)) - H.say(pick("Thanks Mr Skeltal", "Thank for strong bones", "Doot doot!")) ..() return From a7c6ae2871c83173803917bc1e99df64c601e4b4 Mon Sep 17 00:00:00 2001 From: Crazylemon Date: Mon, 1 Feb 2016 12:23:05 -0800 Subject: [PATCH 5/5] Chocolate no longer makes people ripperonis --- .../living/carbon/human/species/station.dm | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index 0c7055d68e0..349b28b6efb 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -157,40 +157,6 @@ /datum/species/vulpkanin/handle_death(var/mob/living/carbon/human/H) H.stop_tail_wagging(1) -/datum/species/vulpkanin/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) - if(R.id in list("coco", "hot_coco", "chocolate_milk", "chocolate")) - // I have no idea if chocolate is THIS bad for dogs, but I guess this should get the point across - if(prob(20)) - H.emote(pick("twitch","drool", "quiver")) - if(prob(10)) - H.emote("scream") - H.drop_l_hand() - H.drop_r_hand() - if(prob(5)) - H.confused = max(H.confused, 3) - if(prob(15)) - H.fakevomit() - if(prob(2)) - H.visible_message("[H] starts having a seizure!", "You have a seizure!") - H.Paralyse(5) - H.jitteriness = 1000 - if(R.current_cycle >= 5) - H.jitteriness += 10 - if(R.current_cycle >= 20) - if(prob(5)) - H.emote("collapse") - switch(R.current_cycle) - if(0 to 60) - H.adjustBrainLoss(1) - H.adjustToxLoss(1) - if(61 to INFINITY) - H.adjustBrainLoss(2) - H.adjustToxLoss(2) - H.Paralyse(5) - H.losebreath += 5 - return 1 - return ..() - /datum/species/skrell name = "Skrell" name_plural = "Skrell"