diff --git a/baystation12.dme b/baystation12.dme index 64aafc66f6d..5d6ca4934a5 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -209,6 +209,7 @@ #include "code\ATMOSPHERICS\components\unary\heat_source.dm" #include "code\ATMOSPHERICS\components\unary\outlet_injector.dm" #include "code\ATMOSPHERICS\components\unary\oxygen_generator.dm" +#include "code\ATMOSPHERICS\components\unary\thermal_plate.dm" #include "code\ATMOSPHERICS\components\unary\unary_base.dm" #include "code\ATMOSPHERICS\components\unary\vent_pump.dm" #include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm" diff --git a/code/ATMOSPHERICS/components/unary/thermal_plate.dm b/code/ATMOSPHERICS/components/unary/thermal_plate.dm new file mode 100644 index 00000000000..22570a23478 --- /dev/null +++ b/code/ATMOSPHERICS/components/unary/thermal_plate.dm @@ -0,0 +1,81 @@ +#define RADIATION_CAPACITY 30000 //Radiation isn't particularly effective (TODO BALANCE) + + +/obj/machinery/atmospherics/unary/thermal_plate +//Based off Heat Reservoir and Space Heater +//Transfers heat between a pipe system and environment, based on which has a greater thermal energy concentration + + icon = 'cold_sink.dmi' + icon_state = "intact_off" + + name = "Thermal Transfer Plate" + desc = "Transfers heat to and from an area" + + update_icon() + if(node) + icon_state = "intact_off" + else + icon_state = "exposed" + return + + process() + ..() + + var/datum/gas_mixture/environment = loc.return_air() + + //Get processable air sample and thermal info from environment + + var/transfer_moles = 0.25 * environment.total_moles() + var/datum/gas_mixture/external_removed = environment.remove(transfer_moles) + + if (!external_removed) + return radiate() + + if (external_removed.total_moles() < 10) + return radiate() + + //Get same info from connected gas + + var/internal_transfer_moles = 0.25 * air_contents.total_moles() + var/datum/gas_mixture/internal_removed = air_contents.remove(internal_transfer_moles) + + if (!internal_removed) + environment.merge(external_removed) + return 1 + + var/combined_heat_capacity = internal_removed.heat_capacity() + external_removed.heat_capacity() + var/combined_energy = internal_removed.temperature * internal_removed.heat_capacity() + external_removed.heat_capacity() * external_removed.temperature + + if(!combined_heat_capacity) combined_heat_capacity = 1 + var/final_temperature = combined_energy / combined_heat_capacity + + external_removed.temperature = final_temperature + environment.merge(external_removed) + + internal_removed.temperature = final_temperature + air_contents.merge(internal_removed) + + network.update = 1 + + return 1 + + proc/radiate() + + var/internal_transfer_moles = 0.25 * air_contents.total_moles() + var/datum/gas_mixture/internal_removed = air_contents.remove(internal_transfer_moles) + + if (!internal_removed) + return 1 + + var/combined_heat_capacity = internal_removed.heat_capacity() + RADIATION_CAPACITY + var/combined_energy = internal_removed.temperature * internal_removed.heat_capacity() + (RADIATION_CAPACITY * 6.4) + + var/final_temperature = combined_energy / combined_heat_capacity + + internal_removed.temperature = final_temperature + air_contents.merge(internal_removed) + + if (network) + network.update = 1 + + return 1 diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm index 24fdc2fff7a..8e4381baf24 100644 --- a/code/game/machinery/bots/medbot.dm +++ b/code/game/machinery/bots/medbot.dm @@ -33,18 +33,19 @@ var/heal_threshold = 15 //Start healing when they have this much damage in a category var/use_beaker = 0 //Use reagents in beaker instead of default treatment agents. //Setting which reagents to use to treat what by default. By id. - var/treatment_brute = "bicaridine" - var/treatment_oxy = "dexalin" - var/treatment_fire = "kelotane" - var/treatment_tox = "anti_toxin" - var/treatment_virus = "spaceacillin" +// var/treatment_brute = "bicaridine" +// var/treatment_oxy = "dexalin" +// var/treatment_fire = "kelotane" +// var/treatment_tox = "anti_toxin" +// var/treatment_virus = "spaceacillin" + var/reagent_id = "inaprovaline" var/shut_up = 0 //self explanatory :) /obj/machinery/bot/medbot/mysterious name = "Mysterious Medibot" desc = "International Medibot of mystery." skin = "bezerk" - treatment_oxy = "dexalinp" + reagent_id = "dexalinp" /obj/item/weapon/firstaid_arm_assembly name = "first aid/robot arm assembly" @@ -263,6 +264,9 @@ if ((C == src.oldpatient) && (world.time < src.last_found + 100)) continue + if(C.getOxyLoss() < 5 && reagent_id == "inaprovaline" && !src.emagged && !src.reagent_glass) + continue + if(src.assess_patient(C)) src.patient = C src.oldpatient = C @@ -333,25 +337,18 @@ continue //They're injured enough for it! - if((C.getBruteLoss() >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_brute))) + if(C.getBruteLoss() >= heal_threshold) return 1 //If they're already medicated don't bother! - if((C.getOxyLoss() >= (15 + heal_threshold)) && (!C.reagents.has_reagent(src.treatment_oxy))) + if(C.getOxyLoss() >= (15 + heal_threshold)) return 1 - if((C.getFireLoss() >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_fire))) + if(C.getFireLoss() >= heal_threshold) return 1 - if((C.getToxLoss() >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_tox))) + if(C.getToxLoss() >= heal_threshold) return 1 - - for(var/datum/disease/D in C.viruses) - if((D.stage > 1) || (D.spread_type == AIRBORNE)) - - if (!C.reagents.has_reagent(src.treatment_virus)) - return 1 //STOP DISEASE FOREVER - return 0 /obj/machinery/bot/medbot/proc/medicate_patient(mob/living/carbon/C as mob) @@ -374,8 +371,6 @@ src.last_found = world.time return - var/reagent_id = null - //Use whatever is inside the loaded beaker. If there is one. if((src.use_beaker) && (src.reagent_glass) && (src.reagent_glass.reagents.total_volume)) reagent_id = "internal_beaker" @@ -383,9 +378,7 @@ if(src.emagged) //Emagged! Time to poison everybody. reagent_id = "toxin" - if (!reagent_id) reagent_id = "inaprovaline" - - if(!reagent_id) //If they don't need any of that they're probably cured! + if(C.getOxyLoss() < 10 && reagent_id == "inaprovaline") //If they don't need any of that they're probably cured! src.oldpatient = src.patient src.patient = null src.currently_healing = 0 @@ -409,6 +402,7 @@ src.icon_state = "medibot[src.on]" src.currently_healing = 0 + reagent_id = "inaprovaline" return // src.speak(reagent_id) diff --git a/code/game/objects/storage/bible.dm b/code/game/objects/storage/bible.dm index 71232179582..b2900ac6847 100644 --- a/code/game/objects/storage/bible.dm +++ b/code/game/objects/storage/bible.dm @@ -6,7 +6,7 @@ new /obj/item/weapon/spacecash(src) new /obj/item/weapon/spacecash(src) -/obj/item/weapon/storage/bible/proc/bless(mob/living/carbon/M as mob) +/*/obj/item/weapon/storage/bible/proc/bless(mob/living/carbon/M as mob) if(ishuman(M)) var/mob/living/carbon/human/H = M var/heal_amt = 10 @@ -14,13 +14,13 @@ var/datum/organ/external/affecting = H.organs[name] if(affecting.heal_damage(heal_amt, heal_amt)) H.UpdateDamageIcon() - return + return */ /obj/item/weapon/storage/bible/attack(mob/M as mob, mob/living/user as mob) - var/chaplain = 0 - if(user.mind && (user.mind.assigned_role == "Chaplain")) - chaplain = 1 +// var/chaplain = 0 +// if(user.mind && (user.mind.assigned_role == "Chaplain")) +// chaplain = 1 M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") @@ -29,10 +29,10 @@ if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") user << "\red You don't have the dexterity to do this!" return - if(!chaplain) - user << "\red The book sizzles in your hands." - user.take_organ_damage(0,10) - return +// if(!chaplain) +// user << "\red The book sizzles in your hands." +// user.take_organ_damage(0,10) +// return if ((user.mutations & CLUMSY) && prob(50)) user << "\red The [src] slips out of your hand and hits your head." @@ -48,7 +48,7 @@ M << "\red The power of [src.deity_name] clears your mind of heresy!" user << "\red You see how [M]'s eyes become clear, the cult no longer holds control over him!" ticker.mode.remove_cultist(M.mind) - if ((istype(M, /mob/living/carbon/human) && prob(60))) +/* if ((istype(M, /mob/living/carbon/human) && prob(60))) bless(M) for(var/mob/O in viewers(M, null)) O.show_message(text("\red [] heals [] with the power of [src.deity_name]!", user, M), 1) @@ -60,7 +60,7 @@ M << "\red You feel dumber." for(var/mob/O in viewers(M, null)) O.show_message(text("\red [] beats [] over the head with []!", user, M, src), 1) - playsound(src.loc, "punch", 25, 1, -1) + playsound(src.loc, "punch", 25, 1, -1) */ else if(M.stat == 2) for(var/mob/O in viewers(M, null)) O.show_message(text("\red [] smacks []'s lifeless corpse with [].", user, M, src), 1) diff --git a/maps/tgstation.2.0.8.dmm b/maps/tgstation.2.0.8.dmm index 30ea8d6fd51..a6f135b9e54 100644 --- a/maps/tgstation.2.0.8.dmm +++ b/maps/tgstation.2.0.8.dmm @@ -3042,7 +3042,7 @@ "bgz" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/wall/r_wall,/area/bridge/meeting_room) "bgA" = (/obj/machinery/camera{c_tag = "Central Hallway East"; dir = 4; network = "SS13"},/obj/structure/disposalpipe/segment{dir = 1},/turf/simulated/floor,/area/hallway/primary/central) "bgB" = (/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced,/obj/structure/grille,/obj/machinery/door/poddoor/shutters{density = 0; dir = 8; icon_state = "shutter0"; id = "kitchen3"; name = "Kitchen Shutters"; opacity = 0},/turf/simulated/floor/plating,/area/crew_quarters/kitchen) -"bgC" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/condiment/enzyme,/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor{icon_state = "cafeteria"; dir = 2},/area/crew_quarters/kitchen) +"bgC" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/obj/structure/closet/secure_closet/fridge,/turf/simulated/floor{icon_state = "cafeteria"; dir = 2},/area/crew_quarters/kitchen) "bgD" = (/obj/machinery/light,/obj/machinery/alarm{dir = 1; pixel_y = -22},/turf/simulated/floor{icon_state = "cafeteria"; dir = 2},/area/crew_quarters/kitchen) "bgE" = (/obj/item/device/radio/intercom{name = "Station Intercom (General)"; pixel_y = -29},/turf/simulated/floor{icon_state = "cafeteria"; dir = 2},/area/crew_quarters/kitchen) "bgF" = (/obj/machinery/firealarm{dir = 1; pixel_y = -24},/turf/simulated/floor{icon_state = "cafeteria"; dir = 2},/area/crew_quarters/kitchen) @@ -3156,7 +3156,7 @@ "biJ" = (/obj/structure/table,/obj/item/weapon/paper_bin{pixel_x = -3; pixel_y = 7},/turf/simulated/floor,/area/bridge/meeting_room) "biK" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "heads_meeting"; name = "Meeting Room Window Shields"; opacity = 0},/obj/machinery/atmospherics/pipe/simple{tag = "icon-intact-b-f (NORTH)"; icon_state = "intact-b-f"; dir = 1; level = 2; color = "blue"},/turf/simulated/floor/plating,/area/bridge/meeting_room) "biL" = (/obj/structure/disposalpipe/segment{dir = 1},/turf/simulated/floor,/area/hallway/primary/central) -"biM" = (/obj/structure/closet/secure_closet/fridge,/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor{icon_state = "cafeteria"; dir = 2},/area/crew_quarters/kitchen) +"biM" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/obj/structure/table,/obj/item/weapon/packageWrap,/obj/item/weapon/packageWrap,/obj/item/device/destTagger{pixel_x = 4; pixel_y = 3},/obj/item/weapon/reagent_containers/food/condiment/enzyme,/turf/simulated/floor{icon_state = "cafeteria"; dir = 2},/area/crew_quarters/kitchen) "biN" = (/obj/structure/table,/obj/machinery/blender{pixel_y = 0},/turf/simulated/floor{icon_state = "cafeteria"; dir = 2},/area/crew_quarters/kitchen) "biO" = (/obj/machinery/light{dir = 1},/turf/simulated/floor{icon_state = "bar"},/area/crew_quarters/bar) "biP" = (/obj/machinery/status_display{density = 0; layer = 4; pixel_x = 0; pixel_y = 32},/turf/simulated/floor{icon_state = "bar"},/area/crew_quarters/bar)