Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/~yogs_defines/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
#define is_shadow_or_thrall(M) (is_thrall(M) || is_shadow(M))

#define isspacepod(A) (istype(A, /obj/spacepod))

#define ispreternis(A) (is_species(A, /datum/species/preternis))
13 changes: 13 additions & 0 deletions code/__DEFINES/~yogs_defines/mobs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#define PRETERNIS_LEVEL_FULL 550
#define PRETERNIS_LEVEL_WELL_FED 450
#define PRETERNIS_LEVEL_FED 350
#define PRETERNIS_LEVEL_HUNGRY 250
#define PRETERNIS_LEVEL_STARVING 150
#define PRETERNIS_LEVEL_NONE 0

#define ELECTRICITY_TO_NUTRIMENT_FACTOR 0.12
Comment thread
alexkar598 marked this conversation as resolved.
Outdated

#define PRETERNIS_NV_OFF 2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming that this is how far you can see with NV on/off, should probably have a comment though

#define PRETERNIS_NV_ON 8

#define BODYPART_ANY -1
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/damage_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
var/list/obj/item/bodypart/parts = list()
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
if(status && (BP.status != status))
if(!(status == BODYPART_ANY) && (status && (BP.status != status))) //yogs - allows robot limb healing override
continue
if((brute && BP.brute_dam) || (burn && BP.burn_dam) || (stamina && BP.stamina_dam))
parts += BP
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/dynamic_fhair_suffix = ""

//for augmented heads
if(HD.status == BODYPART_ROBOTIC)
if(HD.status == BODYPART_ROBOTIC || yogs_draw_robot_hair) //yogs allow for robot head hair
return

//we check if our hat or helmet hides our facial hair.
Expand Down
6 changes: 3 additions & 3 deletions code/modules/surgery/bodyparts/bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
if(owner && (owner.status_flags & GODMODE))
return FALSE //godmode

if(required_status && (status != required_status))
if(!(required_status == -1) && (required_status && (status != required_status)))
Comment thread
alexkar598 marked this conversation as resolved.
Outdated
return FALSE

var/dmg_mlt = CONFIG_GET(number/damage_multiplier)
Expand Down Expand Up @@ -197,8 +197,8 @@
//Damage cannot go below zero.
//Cannot remove negative damage (i.e. apply damage)
/obj/item/bodypart/proc/heal_damage(brute, burn, stamina, required_status, updating_health = TRUE)

if(required_status && (status != required_status)) //So we can only heal certain kinds of limbs, ie robotic vs organic.
// yogs -- line below updated to allow for robotic body part healing override
Comment thread
alexkar598 marked this conversation as resolved.
if(!(required_status == BODYPART_ANY) && (required_status && (status != required_status)) ) //So we can only heal certain kinds of limbs, ie robotic vs organic.
return

brute_dam = round(max(brute_dam - brute, 0), DAMAGE_PRECISION)
Expand Down
5 changes: 3 additions & 2 deletions config/game_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ EMOJIS
## To speed things up make the number negative, to slow things down, make the number positive.

## These modify the run/walk speed of all mobs before the mob-specific modifiers are applied.
RUN_DELAY 1
WALK_DELAY 4
RUN_DELAY 2
WALK_DELAY 8
Comment thread
alexkar598 marked this conversation as resolved.
Outdated

## The variables below affect the movement of specific mob types. THIS AFFECTS ALL SUBTYPES OF THE TYPE YOU CHOOSE!
## Entries completely override all subtypes. Later entries have precedence over earlier entries.
Expand Down Expand Up @@ -445,6 +445,7 @@ ROUNDSTART_RACES lizard
#ROUNDSTART_RACES moth
ROUNDSTART_RACES plasmaman
#ROUNDSTART_RACES shadow
ROUNDSTART_RACES preternis

## Races that are better than humans in some ways, but worse in others
ROUNDSTART_RACES ethereal
Expand Down
Binary file modified icons/mob/human.dmi
Binary file not shown.
Binary file modified icons/mob/human_parts.dmi
Binary file not shown.
7 changes: 7 additions & 0 deletions yogstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
#include "code\__DEFINES\~yogs_defines\keybindings.dm"
#include "code\__DEFINES\~yogs_defines\logging.dm"
#include "code\__DEFINES\~yogs_defines\mentor.dm"
#include "code\__DEFINES\~yogs_defines\mobs.dm"
#include "code\__DEFINES\~yogs_defines\preferences.dm"
#include "code\__DEFINES\~yogs_defines\shuttles.dm"
#include "code\__DEFINES\~yogs_defines\spacepods.dm"
Expand Down Expand Up @@ -2813,7 +2814,9 @@
#include "yogstation\code\datums\components\uplink.dm"
#include "yogstation\code\datums\components\walks.dm"
#include "yogstation\code\datums\components\storage\storage.dm"
#include "yogstation\code\datums\diseases\_MobProcs.dm"
#include "yogstation\code\datums\diseases\cluwnification.dm"
#include "yogstation\code\datums\diseases\advance\advance.dm"
#include "yogstation\code\datums\diseases\advance\symptoms\confusion.dm"
#include "yogstation\code\datums\diseases\advance\symptoms\heal.dm"
#include "yogstation\code\datums\mood_events\generic_positive_events.dm"
Expand Down Expand Up @@ -3071,6 +3074,10 @@
#include "yogstation\code\modules\mob\living\carbon\human\species_types\jellypeople.dm"
#include "yogstation\code\modules\mob\living\carbon\human\species_types\lizard.dm"
#include "yogstation\code\modules\mob\living\carbon\human\species_types\plantpeople.dm"
#include "yogstation\code\modules\mob\living\carbon\human\species_types\preternis\organs.dm"
#include "yogstation\code\modules\mob\living\carbon\human\species_types\preternis\power_suck.dm"
#include "yogstation\code\modules\mob\living\carbon\human\species_types\preternis\preternis.dm"
#include "yogstation\code\modules\mob\living\carbon\human\species_types\preternis\screen_alerts.dm"
#include "yogstation\code\modules\mob\living\silicon\silicon.dm"
#include "yogstation\code\modules\mob\living\silicon\ai\ai.dm"
#include "yogstation\code\modules\mob\living\silicon\ai\vox_sounds.dm"
Expand Down
4 changes: 4 additions & 0 deletions yogstation/code/datums/diseases/_MobProcs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/mob/living/carbon/human/CanContractDisease(datum/disease/D)
var/infectchance = dna.species ? dna.species.yogs_virus_infect_chance : 100 //will this compile? who knows
if(prob(infectchance))
return ..()
9 changes: 9 additions & 0 deletions yogstation/code/datums/diseases/advance/advance.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/datum/disease/advance/Refresh(new_name)
. = ..()
if(affected_mob.dna)
Comment thread
alexkar598 marked this conversation as resolved.
Outdated
var/datum/species/S
properties["resistance"] += S.virus_resistance_boost
properties["stealth"] += S.virus_stealth_boost
properties["stage_rate"] += S.virus_stage_rate_boost
properties["transmittable"] += S.virus_transmittable_boost
AssignProperties() //this is a bit inefficent because its called twice but modularization amiright?
15 changes: 13 additions & 2 deletions yogstation/code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@
////////////////////
/obj/item/bodypart
var/should_draw_yogs = FALSE

/mob/living/carbon/proc/draw_yogs_parts(do_it)
for(var/O in bodyparts)
var/obj/item/bodypart/B = O
B.should_draw_yogs = do_it
B.should_draw_yogs = do_it

/datum/species
var/yogs_draw_robot_hair = FALSE //DAMN ROBOTS STEALING OUR HAIR AND AIR
var/yogs_virus_infect_chance = 100
var/virus_resistance_boost = 0
var/virus_stealth_boost = 0
var/virus_stage_rate_boost = 0
var/virus_transmittable_boost = 0

/datum/species/proc/spec_AltClickOn(atom/A,mob/living/carbon/human/H)
return 0
Comment thread
alexkar598 marked this conversation as resolved.
Outdated
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/obj/item/organ/eyes/preternis
name = "preternis eyes"
desc = "An experimental upgraded version of eyes that can see in the dark.They are designed to fit preternis"
see_in_dark = 8
Comment thread
alexkar598 marked this conversation as resolved.
Outdated
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
actions_types = list(/datum/action/item_action/organ_action/use)
var/night_vision = TRUE

/obj/item/organ/eyes/preternis/ui_action_click()
var/datum/species/preternis/S = owner.dna.species
if(S.charge < PRETERNIS_LEVEL_FED)
return
sight_flags = initial(sight_flags)
switch(lighting_alpha)
if (LIGHTING_PLANE_ALPHA_VISIBLE)
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
if (LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE)
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
if (LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE)
lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE
else
lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
sight_flags &= ~SEE_BLACKNESS
owner.update_sight()

/obj/item/organ/eyes/preternis/on_life()
. = ..()
if(!ispreternis(owner))
qdel(src) //these eyes depend on being inside a preternis
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't you like, just make them not work rather than making a specieschange mean they lose their eyes permanently?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i tought so too but it gives them new eyes of the other species when they switch so this just affects transplants and its not meant to be in a preternis and this is wasted process cycles otherwise,tell me if its mandatory i change this

return
var/datum/species/preternis/S = owner.dna.species
if(S.charge >= PRETERNIS_LEVEL_FED)
if(see_in_dark == PRETERNIS_NV_OFF)
see_in_dark = PRETERNIS_NV_ON
owner.update_sight()
else
if(see_in_dark == PRETERNIS_NV_ON)
see_in_dark = PRETERNIS_NV_OFF
owner.update_sight()
if(lighting_alpha < LIGHTING_PLANE_ALPHA_VISIBLE)
lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
sight_flags &= ~SEE_BLACKNESS
owner.update_sight()

/obj/item/organ/lungs/preternis
name = "preternis lungs"
desc = "An experimental set of lungs.Due to the cybernetic nature of these lungs,they are less resistant to heat and cold but are more efficent at filtering oxygen."
icon_state = "lungs-c"
safe_oxygen_min = 12
safe_toxins_max = 10
gas_stimulation_min = 0.1 //fucking filters removing my stimulants

cold_level_1_threshold = 280
cold_level_1_damage = 1.5
cold_level_2_threshold = 260
cold_level_2_damage = 3
cold_level_3_threshold = 200
cold_level_3_damage = 4.5

heat_level_1_threshold = 320
heat_level_2_threshold = 400
heat_level_3_threshold = 600 //HALP MY LUNGS ARE ON FIRE
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
/mob/living/carbon/AltClickOn(atom/A)
if(ispreternis(src))
Comment thread
alexkar598 marked this conversation as resolved.
Outdated
dna.species.spec_AltClickOn(A,src)
return
..()

/datum/species/preternis/spec_AltClickOn(atom/A,H)
return species_drain_act(H, A)

/datum/species/preternis/proc/species_drain_act(mob/living/carbon/human/H, atom/A)
if(!istype(H) || !A)
return 0

if(!A.can_consume_power_from())
return 0 //if it returns text, we want it to continue so we can get the error message later.

var/siemens_coefficient = 1

if(H.reagents.has_reagent("teslium"))
siemens_coefficient *= 1.5

if (charge == PRETERNIS_LEVEL_FULL - 25)
to_chat(H,"<span class='notice'>CONSUME protocol reports no need for additional power at this time.</span>")
return 1

if(H.gloves)
if(H.gloves.siemens_coefficient == 0)
to_chat(H,"<span class='info'>NOTICE: [H.gloves] prevent electrical contact - CONSUME protocol aborted.</span>")
return 1
else
if(H.gloves.siemens_coefficient < 1)
to_chat(H,"<span class='info'>NOTICE: [H.gloves] are interfering with electrical contact - advise removal before activating CONSUME protocol.</span>")
siemens_coefficient *= H.gloves.siemens_coefficient

H.face_atom(A)
H.visible_message("<span class='warning'>[H] starts placing their hands on [A]...</span>", "<span class='warning'>You start placing your hands on [A]...</span>")
if(!do_after(H, 20, target = A))
to_chat(H,"<span class='info'>CONSUME protocol aborted.</span>")
return 1

to_chat(H,"<span class='info'>Extracutaneous implants detect viable power source. Initiating CONSUME protocol.</span>")

var/done = 0
Comment thread
alexkar598 marked this conversation as resolved.
Outdated
var/drain = 150 * siemens_coefficient

var/cycle = 0
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.attach(A)
spark_system.set_up(5, 0, A)
while(!done)
cycle++
var/nutritionIncrease = drain * ELECTRICITY_TO_NUTRIMENT_FACTOR

if(charge + nutritionIncrease > PRETERNIS_LEVEL_FULL)
nutritionIncrease = max(PRETERNIS_LEVEL_FULL - charge, 0) //if their nutrition goes up from some other source, this could be negative, which would cause bad things to happen.
drain = nutritionIncrease/ELECTRICITY_TO_NUTRIMENT_FACTOR

if (do_after(H,15, target = A))
var/can_drain = A.can_consume_power_from()
if(!can_drain || istext(can_drain))
if(istext(can_drain))
to_chat(H,can_drain)
done = 1
Comment thread
alexkar598 marked this conversation as resolved.
Outdated
else
playsound(A.loc, "sparks", 50, 1)
if(prob(75))
spark_system.start()
var/drained = A.consume_power_from(drain)
if(drained < drain)
to_chat(H,"<span class='info'>[A]'s power has been depleted, CONSUME protocol halted.</span>")
done = 1
Comment thread
alexkar598 marked this conversation as resolved.
Outdated
charge += drained * ELECTRICITY_TO_NUTRIMENT_FACTOR

if(!done)
if(charge > (PRETERNIS_LEVEL_FULL -1))
to_chat(H,"<span class='info'>CONSUME protocol complete. Physical nourishment refreshed.</span>")
done = 1
Comment thread
alexkar598 marked this conversation as resolved.
Outdated
else if(cycle % 4 == 0)
Comment thread
alexkar598 marked this conversation as resolved.
Outdated
var/nutperc = round((charge / PRETERNIS_LEVEL_FULL) * 100)
to_chat(H,"<span class='info'>CONSUME protocol continues. Current satiety level: [nutperc]%.</span>")
else
done = 1
Comment thread
alexkar598 marked this conversation as resolved.
Outdated
qdel(spark_system)
return 1

/atom/proc/can_consume_power_from()
return 0 //if a string is returned, it will evaluate as false and be output to the person draining.

/atom/proc/consume_power_from(amount)
return 0 //return the amount that was drained.

#define MIN_DRAINABLE_POWER 10

//CELL//
/obj/item/stock_parts/cell/can_consume_power_from()
if(charge < MIN_DRAINABLE_POWER)
return "<span class='info'>Power cell depleted, CONSUME protocol halted.</span>"
return 1

/obj/item/stock_parts/cell/consume_power_from(amount)
if((charge - amount) < MIN_DRAINABLE_POWER)
amount = max(charge - MIN_DRAINABLE_POWER, 0)
use(amount)
return amount

//APC//
/obj/machinery/power/apc/can_consume_power_from()
if(!cell)
return "<span class='info'>APC cell absent, CONSUME protocol halted.</span>"
if(stat & BROKEN)
return "<span class='info'>APC is damaged, CONSUME protocol halted.</span>"
if(!operating || shorted)
return "<span class='info'>APC main breaker is off, CONSUME protocol halted.</span>"
if(cell.charge < MIN_DRAINABLE_POWER)
return "<span class='info'>APC cell depleted, CONSUME protocol halted.</span>"
return 1

/obj/machinery/power/apc/consume_power_from(amount)
if((cell.charge - amount) < MIN_DRAINABLE_POWER)
amount = max(cell.charge - MIN_DRAINABLE_POWER, 0)
cell.use(amount)
if(charging == 2)
charging = 0 //if we do not do this here, the APC can get stuck thinking it is fully charged.
update()
return amount

//SMES//
/obj/machinery/power/smes/can_consume_power_from()
if(stat & BROKEN)
return "<span class='info'>SMES is damaged, CONSUME protocol halted.</span>"
if(!output_attempt)
return "<span class='info'>SMES is not outputting power, CONSUME protocol halted.</span>"
if(charge < MIN_DRAINABLE_POWER)
return "<span class='info'>SMES cells depleted, CONSUME protocol halted.</span>"
return 1
Comment thread
alexkar598 marked this conversation as resolved.
Outdated

/obj/machinery/power/smes/consume_power_from(amount)
if((charge - amount) < MIN_DRAINABLE_POWER)
amount = max(charge - MIN_DRAINABLE_POWER, 0)
charge -= amount
return amount

//MECH//
/obj/mecha/can_consume_power_from()
if(!cell)
return "<span class='info'>Mech power cell absent, CONSUME protocol halted.</span>"
if(cell.charge < MIN_DRAINABLE_POWER)
return "<span class='info'>Mech power cell depleted, CONSUME protocol halted.</span>"
return 1
Comment thread
alexkar598 marked this conversation as resolved.
Outdated

/obj/mecha/consume_power_from(amount)
occupant_message("<span class='danger'>Warning: Unauthorized access through sub-route 4, block H, detected.</span>")
if((cell.charge - amount) < MIN_DRAINABLE_POWER)
amount = max(cell.charge - MIN_DRAINABLE_POWER, 0)
cell.use(amount)
return amount

//BORG//
/mob/living/silicon/robot/can_consume_power_from()
if(!cell)
return "<span class='info'>Cyborg power cell absent, CONSUME protocol halted.</span>"
if(cell.charge < MIN_DRAINABLE_POWER)
return "<span class='info'>Cyborg power cell depleted, CONSUME protocol halted.</span>"
return 1
Comment thread
alexkar598 marked this conversation as resolved.
Outdated

/mob/living/silicon/robot/consume_power_from(amount)
src << "<span class='danger'>Warning: Unauthorized access through sub-route 12, block C, detected.</span>"
if((cell.charge - amount) < MIN_DRAINABLE_POWER)
amount = max(cell.charge - MIN_DRAINABLE_POWER, 0)
cell.use(amount)
return amount

#undef MIN_DRAINABLE_POWER



Loading