Skip to content

Commit

Permalink
a lil bit of this
Browse files Browse the repository at this point in the history
  • Loading branch information
TobyThorne committed Nov 1, 2023
1 parent e7a6235 commit 11e9194
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2450,6 +2450,12 @@
#include "code\modules\organs\organ.dm"
#include "code\modules\organs\pain.dm"
#include "code\modules\organs\robolimbs.dm"
#include "code\modules\organs\conditions\rejection.dm"
#include "code\modules\organs\conditions\external\dead.dm"
#include "code\modules\organs\conditions\internal\dead.dm"
#include "code\modules\organs\conditions\internal\disconnected.dm"
#include "code\modules\organs\conditions\internal\eyes\cataract.dm"
#include "code\modules\organs\conditions\internal\liver\cirrhosis.dm"
#include "code\modules\organs\external\_external.dm"
#include "code\modules\organs\external\_external_damage.dm"
#include "code\modules\organs\external\_external_icons.dm"
Expand Down
9 changes: 6 additions & 3 deletions code/modules/organs/organ.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var/list/organ_cache = list()
)
var/list/default_conditions = list() // Contains OROCON IDs
var/list/conditions = list()
var/list/active_conditions = list() // Thinking conditions

var/efficiency = 1.0

Expand Down Expand Up @@ -81,21 +82,24 @@ var/list/organ_cache = list()
owner = null
dna = null
QDEL_NULL(food_organ)
QDEL_LIST(conditions)
QDEL_NULL_LIST(conditions)
active_conditions.Cut()
capacities.Cut()
return ..()

/obj/item/organ/proc/add_condition(var/condition_id, update_conditions = TRUE)
if(!condition_id || !(condition_id in GLOB.organ_conditions))
return FALSE
conditions[condition_id] = new GLOB.organ_conditions[condition_id]()
active_conditions.Add(conditions[condition_id])
if(update_conditions)
update_conditions()
return TRUE

/obj/item/organ/proc/remove_condition(var/condition_id, update_conditions = TRUE)
if(!condition_id || !(condition_id in GLOB.organ_conditions) || !conditions[condition_id])
return FALSE
active_conditions.Remove(conditions[conditions_id])
qdel(conditions[conditions_id])
conditions.Remove(conditions_id)
if(update_conditions)
Expand Down Expand Up @@ -157,8 +161,7 @@ var/list/organ_cache = list()
if(NEXT_THINK)
set_next_think(world.time + 1 SECOND)
return

if(!owner)
else
if(reagents && !is_preserved())
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list
if(B && prob(40))
Expand Down
Binary file added icons/obj/organs/appendix.dmi
Binary file not shown.
Binary file added icons/obj/organs/brain.dmi
Binary file not shown.
Binary file added icons/obj/organs/eye.dmi
Binary file not shown.
Binary file added icons/obj/organs/heart.dmi
Binary file not shown.
Binary file added icons/obj/organs/kidney.dmi
Binary file not shown.
Binary file added icons/obj/organs/liver.dmi
Binary file not shown.
Binary file added icons/obj/organs/lung.dmi
Binary file not shown.
Binary file added icons/obj/organs/misc.dmi
Binary file not shown.
Binary file added icons/obj/organs/posibrain.dmi
Binary file not shown.
Binary file added icons/obj/organs/stomach.dmi
Binary file not shown.

0 comments on commit 11e9194

Please sign in to comment.