Merge pull request #12596 from Ghommie/Ghommie-cit819
Porting further material datum features and improvements.
This commit is contained in:
@@ -31,10 +31,6 @@
|
||||
beating = 0
|
||||
var/fakingit = 0
|
||||
|
||||
/obj/item/organ/heart/vampheart/prepare_eat()
|
||||
..()
|
||||
// Do cool stuff for eating vamp heart?
|
||||
|
||||
/obj/item/organ/heart/vampheart/Restart()
|
||||
beating = 0 // DONT run ..(). We don't want to start beating again.
|
||||
return 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/organ/genital
|
||||
color = "#fcccb3"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
organ_flags = ORGAN_NO_DISMEMBERMENT
|
||||
organ_flags = ORGAN_NO_DISMEMBERMENT|ORGAN_EDIBLE
|
||||
var/shape
|
||||
var/sensitivity = 1 // wow if this were ever used that'd be cool but it's not but i'm keeping it for my unshit code
|
||||
var/genital_flags //see citadel_defines.dm
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
/// get_random_food proc.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define STOP_SERVING_BREAKFAST (15 MINUTES)
|
||||
|
||||
/obj/item/reagent_containers/food
|
||||
possible_transfer_amounts = list()
|
||||
@@ -51,5 +50,3 @@
|
||||
if((foodtype & BREAKFAST) && world.time - SSticker.round_start_time < STOP_SERVING_BREAKFAST)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "breakfast", /datum/mood_event/breakfast)
|
||||
last_check_time = world.time
|
||||
|
||||
#undef STOP_SERVING_BREAKFAST
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/meat
|
||||
var/subjectname = ""
|
||||
var/subjectjob = null
|
||||
custom_materials = list(/datum/material/meat = MINERAL_MATERIAL_AMOUNT * 4)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/meat/slab
|
||||
name = "meat"
|
||||
|
||||
@@ -10,6 +10,17 @@
|
||||
tastes = list("crust" = 1, "tomato" = 1, "cheese" = 1)
|
||||
foodtype = GRAIN | DAIRY | VEGETABLES
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/pizzaslice/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/kitchen/rollingpin))
|
||||
if(!isturf(loc))
|
||||
to_chat(user, "<span class='warning'>You need to put [src] on a surface to roll it out!</span>")
|
||||
return
|
||||
new /obj/item/stack/sheet/pizza(loc)
|
||||
to_chat(user, "<span class='notice'>You smoosh [src] into a cheesy sheet.</span>")
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/pizzaslice
|
||||
icon = 'icons/obj/food/pizzaspaghetti.dmi'
|
||||
list_reagents = list(/datum/reagent/consumable/nutriment = 5)
|
||||
|
||||
@@ -111,9 +111,6 @@
|
||||
go_inert()
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/regenerative_core/prepare_eat()
|
||||
return null
|
||||
|
||||
/*************************Legion core********************/
|
||||
/obj/item/organ/regenerative_core/legion
|
||||
desc = "A strange rock that crackles with power. It can be used to heal completely, but it will rapidly decay into uselessness."
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
var/points = 0 //How many points this ore gets you from the ore redemption machine
|
||||
var/refined_type = null //What this ore defaults to being refined into
|
||||
novariants = TRUE // Ore stacks handle their icon updates themselves to keep the illusion that there's more going
|
||||
mats_per_stack = MINERAL_MATERIAL_AMOUNT
|
||||
var/list/stack_overlays
|
||||
|
||||
/obj/item/stack/ore/update_overlays()
|
||||
|
||||
@@ -76,9 +76,6 @@
|
||||
REMOVE_SKILL_MODIFIER_BODY(/datum/skill_modifier/heavy_brain_damage, null, C)
|
||||
C.update_hair()
|
||||
|
||||
/obj/item/organ/brain/prepare_eat()
|
||||
return // Too important to eat.
|
||||
|
||||
/obj/item/organ/brain/proc/transfer_identity(mob/living/L)
|
||||
name = "[L.name]'s brain"
|
||||
if(brainmob)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/obj/item/organ/alien
|
||||
icon_state = "xgibmid2"
|
||||
food_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/toxin/acid = 10)
|
||||
var/list/alien_powers = list()
|
||||
organ_flags = ORGAN_NO_SPOIL
|
||||
organ_flags = ORGAN_NO_SPOIL|ORGAN_EDIBLE
|
||||
|
||||
/obj/item/organ/alien/Initialize()
|
||||
. = ..()
|
||||
@@ -26,12 +27,6 @@
|
||||
owner.RemoveAbility(P)
|
||||
..()
|
||||
|
||||
/obj/item/organ/alien/prepare_eat()
|
||||
var/obj/S = ..()
|
||||
S.reagents.add_reagent(/datum/reagent/toxin/acid, 10)
|
||||
return S
|
||||
|
||||
|
||||
/obj/item/organ/alien/plasmavessel
|
||||
name = "plasma vessel"
|
||||
icon_state = "plasma"
|
||||
@@ -39,17 +34,13 @@
|
||||
zone = BODY_ZONE_CHEST
|
||||
slot = "plasmavessel"
|
||||
alien_powers = list(/obj/effect/proc_holder/alien/plant, /obj/effect/proc_holder/alien/transfer)
|
||||
food_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/toxin/plasma = 10)
|
||||
|
||||
var/storedPlasma = 100
|
||||
var/max_plasma = 250
|
||||
var/heal_rate = 5
|
||||
var/plasma_rate = 10
|
||||
|
||||
/obj/item/organ/alien/plasmavessel/prepare_eat()
|
||||
var/obj/S = ..()
|
||||
S.reagents.add_reagent(/datum/reagent/toxin/plasma, storedPlasma/10)
|
||||
return S
|
||||
|
||||
/obj/item/organ/alien/plasmavessel/large
|
||||
name = "large plasma vessel"
|
||||
icon_state = "plasma_large"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
name = "alien embryo"
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "larva0_dead"
|
||||
food_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/toxin/acid = 10)
|
||||
var/stage = 0
|
||||
var/bursting = FALSE
|
||||
|
||||
@@ -16,11 +17,6 @@
|
||||
if(prob(10))
|
||||
AttemptGrow(0)
|
||||
|
||||
/obj/item/organ/body_egg/alien_embryo/prepare_eat()
|
||||
var/obj/S = ..()
|
||||
S.reagents.add_reagent(/datum/reagent/toxin/acid, 10)
|
||||
return S
|
||||
|
||||
/obj/item/organ/body_egg/alien_embryo/on_life()
|
||||
. = ..()
|
||||
if(!owner)
|
||||
|
||||
@@ -89,11 +89,7 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
|
||||
//These count in on_life ticks which should be 2 seconds per every increment of 1 in a perfect world.
|
||||
var/dwarf_eth_ticker = 0 //Currently set =< 1, that means this will fire the proc around every 2 seconds
|
||||
var/last_alcohol_spam
|
||||
|
||||
/obj/item/organ/dwarfgland/prepare_eat()
|
||||
var/obj/S = ..()
|
||||
S.reagents.add_reagent(/datum/reagent/consumable/ethanol, stored_alcohol/10)
|
||||
return S
|
||||
food_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/consumable/ethanol = 10)
|
||||
|
||||
/obj/item/organ/dwarfgland/on_life() //Primary loop to hook into to start delayed loops for other loops..
|
||||
. = ..()
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
S.source = get_or_create_estorage(/datum/robot_energy_storage/wrapping_paper)
|
||||
|
||||
if(S && S.source)
|
||||
S.custom_materials = null
|
||||
S.set_custom_materials(null)
|
||||
S.is_cyborg = 1
|
||||
|
||||
if(I.loc != src)
|
||||
|
||||
@@ -114,11 +114,13 @@
|
||||
/obj/item/ammo_box/update_icon()
|
||||
. = ..()
|
||||
desc = "[initial(desc)] There [stored_ammo.len == 1 ? "is" : "are"] [stored_ammo.len] shell\s left!"
|
||||
for (var/material in bullet_cost)
|
||||
var/material_amount = bullet_cost[material]
|
||||
material_amount = (material_amount*stored_ammo.len) + base_cost[material]
|
||||
custom_materials[material] = material_amount
|
||||
set_custom_materials(custom_materials)//make sure we setup the correct properties again
|
||||
if(length(bullet_cost))
|
||||
var/temp_materials = custom_materials.Copy()
|
||||
for (var/material in bullet_cost)
|
||||
var/material_amount = bullet_cost[material]
|
||||
material_amount = (material_amount*stored_ammo.len) + base_cost[material]
|
||||
temp_materials[material] = material_amount
|
||||
set_custom_materials(temp_materials)
|
||||
|
||||
/obj/item/ammo_box/update_icon_state()
|
||||
switch(multiple_sprites)
|
||||
|
||||
@@ -154,3 +154,12 @@
|
||||
build_path = /obj/item/circuitboard/machine/shuttle/heater
|
||||
category = list ("Shuttle Machinery")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
/datum/design/board/sheetifier
|
||||
name = "Sheetifier"
|
||||
desc = "This machine turns weird things into sheets."
|
||||
id = "sheetifier"
|
||||
build_path = /obj/item/circuitboard/machine/sheetifier
|
||||
category = list ("Misc. Machinery")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ALL
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
for(var/i in 1 to amount)
|
||||
var/obj/O = new path(get_turf(src))
|
||||
if(efficient_with(O.type))
|
||||
O.set_custom_materials(matlist.Copy())
|
||||
O.set_custom_materials(matlist)
|
||||
O.rnd_crafted(src)
|
||||
SSblackbox.record_feedback("nested tally", "item_printed", amount, list("[type]", "[path]"))
|
||||
investigate_log("[key_name(user)] built [amount] of [path] at [src]([type]).", INVESTIGATE_RESEARCH)
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
display_name = "Advanced Engineering"
|
||||
description = "Pushing the boundaries of physics, one chainsaw-fist at a time."
|
||||
prereq_ids = list("engineering", "emp_basic")
|
||||
design_ids = list("engine_goggles", "magboots", "forcefield_projector", "weldingmask" , "rcd_loaded", "rpd", "tray_goggles_prescription", "engine_goggles_prescription", "mesons_prescription", "rcd_upgrade_frames", "rcd_upgrade_simple_circuits", "rcd_ammo_large")
|
||||
design_ids = list("engine_goggles", "magboots", "forcefield_projector", "weldingmask" , "rcd_loaded", "rpd",
|
||||
"tray_goggles_prescription", "engine_goggles_prescription", "mesons_prescription", "rcd_upgrade_frames",
|
||||
"rcd_upgrade_simple_circuits", "rcd_ammo_large", "sheetifier")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 4000)
|
||||
|
||||
/datum/techweb_node/anomaly
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
time = 64
|
||||
name = "manipulate organs"
|
||||
repeatable = 1
|
||||
implements = list(/obj/item/organ = 100, /obj/item/reagent_containers/food/snacks/organ = 0, /obj/item/organ_storage = 100)
|
||||
implements = list(/obj/item/organ = 100, /obj/item/organ_storage = 100)
|
||||
var/implements_extract = list(TOOL_HEMOSTAT = 100, TOOL_CROWBAR = 55)
|
||||
var/current_type
|
||||
var/obj/item/organ/I = null
|
||||
@@ -85,6 +85,10 @@
|
||||
if(target_zone != I.zone || target.getorganslot(I.slot))
|
||||
to_chat(user, "<span class='notice'>There is no room for [I] in [target]'s [parse_zone(target_zone)]!</span>")
|
||||
return -1
|
||||
var/obj/item/organ/meatslab = tool
|
||||
if(!meatslab.useable)
|
||||
to_chat(user, "<span class='warning'>[I] seems to have been chewed on, you can't use this!</span>")
|
||||
return -1
|
||||
display_results(user, target, "<span class='notice'>You begin to insert [tool] into [target]'s [parse_zone(target_zone)]...</span>",
|
||||
"[user] begins to insert [tool] into [target]'s [parse_zone(target_zone)].",
|
||||
"[user] begins to insert something into [target]'s [parse_zone(target_zone)].")
|
||||
@@ -111,9 +115,6 @@
|
||||
else
|
||||
return -1
|
||||
|
||||
else if(istype(tool, /obj/item/reagent_containers/food/snacks/organ))
|
||||
to_chat(user, "<span class='warning'>[tool] was bitten by someone! It's too damaged to use!</span>")
|
||||
return -1
|
||||
/datum/surgery_step/manipulate_organs/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if(current_type == "insert")
|
||||
if(istype(tool, /obj/item/organ_storage))
|
||||
|
||||
@@ -37,9 +37,3 @@
|
||||
..()
|
||||
if(inflamed)
|
||||
M.ForceContractDisease(new /datum/disease/appendicitis(), FALSE, TRUE)
|
||||
|
||||
/obj/item/organ/appendix/prepare_eat()
|
||||
var/obj/S = ..()
|
||||
if(inflamed)
|
||||
S.reagents.add_reagent(/datum/reagent/toxin/bad_food, 5)
|
||||
return S
|
||||
|
||||
@@ -61,10 +61,10 @@
|
||||
return "a healthy"
|
||||
return "<span class='danger'>an unstable</span>"
|
||||
|
||||
/obj/item/organ/heart/prepare_eat()
|
||||
var/obj/S = ..()
|
||||
S.icon_state = "[icon_base]-off"
|
||||
return S
|
||||
/obj/item/organ/heart/OnEatFrom(eater, feeder)
|
||||
. = ..()
|
||||
beating = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/organ/heart/on_life()
|
||||
. = ..()
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
var/toxLethality = LIVER_DEFAULT_TOX_LETHALITY//affects how much damage toxins do to the liver
|
||||
var/filterToxins = TRUE //whether to filter toxins
|
||||
var/cachedmoveCalc = 1
|
||||
food_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/iron = 5)
|
||||
|
||||
/obj/item/organ/liver/on_life()
|
||||
. = ..()
|
||||
@@ -44,11 +45,6 @@
|
||||
if(damage > 10 && prob(damage/3))//the higher the damage the higher the probability
|
||||
to_chat(owner, "<span class='warning'>You feel a dull pain in your abdomen.</span>")
|
||||
|
||||
/obj/item/organ/liver/prepare_eat()
|
||||
var/obj/S = ..()
|
||||
S.reagents.add_reagent(/datum/reagent/iron, 5)
|
||||
return S
|
||||
|
||||
/obj/item/organ/liver/applyOrganDamage(d, maximum = maxHealth)
|
||||
. = ..()
|
||||
if(!. || QDELETED(owner))
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
now_fixed = "<span class='warning'>Your lungs seem to once again be able to hold air.</span>"
|
||||
high_threshold_cleared = "<span class='info'>The constriction around your chest loosens as your breathing calms down.</span>"
|
||||
|
||||
food_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/medicine/salbutamol = 5)
|
||||
|
||||
//Breath damage
|
||||
|
||||
var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa
|
||||
@@ -458,11 +460,6 @@
|
||||
else if(!(organ_flags & ORGAN_FAILING))
|
||||
failed = FALSE
|
||||
|
||||
/obj/item/organ/lungs/prepare_eat()
|
||||
var/obj/S = ..()
|
||||
S.reagents.add_reagent(/datum/reagent/medicine/salbutamol, 5)
|
||||
return S
|
||||
|
||||
/obj/item/organ/lungs/ipc
|
||||
name = "ipc lungs"
|
||||
icon_state = "lungs-c"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/zone = BODY_ZONE_CHEST
|
||||
var/slot
|
||||
// DO NOT add slots with matching names to different zones - it will break internal_organs_slot list!
|
||||
var/organ_flags = NONE
|
||||
var/organ_flags = ORGAN_EDIBLE
|
||||
var/maxHealth = STANDARD_ORGAN_THRESHOLD
|
||||
var/damage = 0 //total damage this organ has sustained
|
||||
///Healing factor and decay factor function on % of maxhealth, and do not work by applying a static number per tick
|
||||
@@ -25,7 +25,23 @@
|
||||
var/now_fixed
|
||||
var/high_threshold_cleared
|
||||
var/low_threshold_cleared
|
||||
rad_flags = RAD_NO_CONTAMINATE
|
||||
|
||||
///When you take a bite you cant jam it in for surgery anymore.
|
||||
var/useable = TRUE
|
||||
var/list/food_reagents = list(/datum/reagent/consumable/nutriment = 5)
|
||||
|
||||
/obj/item/organ/Initialize()
|
||||
. = ..()
|
||||
if(organ_flags & ORGAN_EDIBLE)
|
||||
AddComponent(/datum/component/edible, food_reagents, null, RAW | MEAT | GROSS, null, 10, null, null, null, CALLBACK(src, .proc/OnEatFrom))
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/organ/Destroy()
|
||||
if(owner)
|
||||
// The special flag is important, because otherwise mobs can die
|
||||
// while undergoing transformation into different mobs.
|
||||
Remove(TRUE)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/proc/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
|
||||
if(!iscarbon(M) || owner == M)
|
||||
@@ -157,47 +173,8 @@
|
||||
if(damage > high_threshold)
|
||||
. += "<span class='warning'>[src] is starting to look discolored.</span>"
|
||||
|
||||
|
||||
/obj/item/organ/proc/prepare_eat()
|
||||
var/obj/item/reagent_containers/food/snacks/organ/S = new
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon = icon
|
||||
S.icon_state = icon_state
|
||||
S.w_class = w_class
|
||||
|
||||
return S
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/organ
|
||||
name = "appendix"
|
||||
icon_state = "appendix"
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
list_reagents = list(/datum/reagent/consumable/nutriment = 5)
|
||||
foodtype = RAW | MEAT | GROSS
|
||||
|
||||
|
||||
/obj/item/organ/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/organ/Destroy()
|
||||
if(owner)
|
||||
// The special flag is important, because otherwise mobs can die
|
||||
// while undergoing transformation into different mobs.
|
||||
Remove(TRUE)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/attack(mob/living/carbon/M, mob/user)
|
||||
if(M == user && ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(status == ORGAN_ORGANIC)
|
||||
var/obj/item/reagent_containers/food/snacks/S = prepare_eat()
|
||||
if(S)
|
||||
qdel(src)
|
||||
if(H.put_in_active_hand(S))
|
||||
S.attack(H, H)
|
||||
else
|
||||
..()
|
||||
/obj/item/organ/proc/OnEatFrom(eater, feeder)
|
||||
useable = FALSE //You can't use it anymore after eating it you spaztic
|
||||
|
||||
/obj/item/organ/item_action_slot_check(slot,mob/user)
|
||||
return //so we don't grant the organ's action to mobs who pick up the organ.
|
||||
|
||||
@@ -252,6 +252,7 @@
|
||||
name = "robotic voicebox"
|
||||
desc = "A voice synthesizer that can interface with organic lifeforms."
|
||||
status = ORGAN_ROBOTIC
|
||||
organ_flags = ORGAN_NO_SPOIL
|
||||
icon_state = "tonguerobot"
|
||||
say_mod = "states"
|
||||
attack_verb = list("beeped", "booped")
|
||||
|
||||
Reference in New Issue
Block a user