diff --git a/_maps/map_files/MetaStation/z3.dmm b/_maps/map_files/MetaStation/z3.dmm index c2a11075ee8..c1e20ddacaa 100644 --- a/_maps/map_files/MetaStation/z3.dmm +++ b/_maps/map_files/MetaStation/z3.dmm @@ -1060,6 +1060,16 @@ /obj/structure/girder, /turf/simulated/floor/plating/airless, /area/AIsattele) +"gw" = ( +/obj/machinery/atmospherics/unary/portables_connector{ + dir = 1 + }, +/turf/simulated/floor/plating/airless, +/area/AIsattele) +"AV" = ( +/obj/machinery/atmospherics/unary/tank/oxygen_agent_b, +/turf/simulated/floor/plating/airless, +/area/AIsattele) (1,1,1) = {" aa @@ -55476,8 +55486,8 @@ aa ay em em -er -eB +AV +gw eG em em diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm index 4e76da50621..e961e85e6bf 100644 --- a/_maps/map_files/cyberiad/cyberiad.dmm +++ b/_maps/map_files/cyberiad/cyberiad.dmm @@ -49566,11 +49566,9 @@ pixel_y = 0; step_size = 0 }, -/obj/item/storage/box/pillbottles, /obj/machinery/atmospherics/unary/vent_pump/on{ dir = 8 }, -/obj/item/storage/box/iv_bags, /turf/simulated/floor/plasteel{ tag = "icon-whitebluefull"; icon_state = "whitebluefull" diff --git a/_maps/map_files/cyberiad/z3.dmm b/_maps/map_files/cyberiad/z3.dmm index e36a8975565..6a80f211aa4 100644 --- a/_maps/map_files/cyberiad/z3.dmm +++ b/_maps/map_files/cyberiad/z3.dmm @@ -4065,6 +4065,16 @@ /obj/structure/girder, /turf/simulated/floor/plating/airless, /area/AIsattele) +"we" = ( +/obj/machinery/atmospherics/unary/portables_connector{ + dir = 1 + }, +/turf/simulated/floor/plating/airless, +/area/AIsattele) +"LU" = ( +/obj/machinery/atmospherics/unary/tank/oxygen_agent_b, +/turf/simulated/floor/plating/airless, +/area/AIsattele) (1,1,1) = {" aa @@ -58481,8 +58491,8 @@ aa aT iF iF -iK -iT +LU +we iW iF iF diff --git a/code/ATMOSPHERICS/components/unary_devices/tank.dm b/code/ATMOSPHERICS/components/unary_devices/tank.dm index bf0c3c8e06d..deb194af6e7 100644 --- a/code/ATMOSPHERICS/components/unary_devices/tank.dm +++ b/code/ATMOSPHERICS/components/unary_devices/tank.dm @@ -16,7 +16,7 @@ if(!istype(T)) return add_underlay(T, node, dir) - + /obj/machinery/atmospherics/unary/tank/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/analyzer)) atmosanalyzer_scan(air_contents, user) @@ -94,4 +94,18 @@ trace_gas.moles = (25*ONE_ATMOSPHERE)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature) air_contents.trace_gases += trace_gas - \ No newline at end of file + +/obj/machinery/atmospherics/unary/tank/oxygen_agent_b + name = "Unidentified Gas Tank" + desc = "A large vessel containing an unknown pressurized gas." + icon_state = "agent_b_map" + +/obj/machinery/atmospherics/unary/tank/oxygen_agent_b/New() + ..() + icon_state = "agent_b" + air_contents.volume = volume + air_contents.temperature = T20C + + var/datum/gas/oxygen_agent_b/trace_gas = new + trace_gas.moles = (50 * ONE_ATMOSPHERE) * (air_contents.volume) / (R_IDEAL_GAS_EQUATION * air_contents.temperature) + air_contents.trace_gases += trace_gas \ No newline at end of file diff --git a/code/LINDA/LINDA_fire.dm b/code/LINDA/LINDA_fire.dm index ada5e6a9e5f..b788cd07d26 100644 --- a/code/LINDA/LINDA_fire.dm +++ b/code/LINDA/LINDA_fire.dm @@ -1,5 +1,7 @@ /atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + if(reagents) + reagents.temperature_reagents(exposed_temperature) return null @@ -10,6 +12,8 @@ /turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh) var/datum/gas_mixture/air_contents = return_air() + if(reagents) + reagents.temperature_reagents(exposed_temperature, 10, 300) if(!air_contents) return 0 if(active_hotspot) @@ -44,42 +48,48 @@ anchored = 1 mouse_opacity = MOUSE_OPACITY_TRANSPARENT unacidable = 1//So you can't melt fire with acid. - icon = 'icons/effects/fire.dmi' + icon = 'icons/goonstation/effects/fire.dmi' icon_state = "1" - layer = TURF_LAYER - + layer = MASSIVE_OBJ_LAYER + alpha = 250 blend_mode = BLEND_ADD - light_range = 3 + light_range = 2 var/volume = 125 var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST var/just_spawned = 1 var/bypassing = 0 + var/fake = FALSE + var/burn_time = 0 /obj/effect/hotspot/New() ..() - SSair.hotspots += src - perform_exposure() + if(!fake) + SSair.hotspots += src + perform_exposure() dir = pick(cardinal) air_update_turf() /obj/effect/hotspot/proc/perform_exposure() var/turf/simulated/location = loc - if(!istype(location) || !(location.air)) return 0 + if(!istype(location) || !(location.air)) + return FALSE - if(volume > CELL_VOLUME*0.95) bypassing = 1 - else bypassing = 0 + if(volume > CELL_VOLUME * 0.95) + bypassing = TRUE + else + bypassing = FALSE if(bypassing) if(!just_spawned) - volume = location.air.fuel_burnt*FIRE_GROWTH_RATE + volume = location.air.fuel_burnt * FIRE_GROWTH_RATE temperature = location.air.temperature else - var/datum/gas_mixture/affected = location.air.remove_ratio(volume/location.air.volume) + var/datum/gas_mixture/affected = location.air.remove_ratio(volume / location.air.volume) affected.temperature = temperature affected.react() temperature = affected.temperature - volume = affected.fuel_burnt*FIRE_GROWTH_RATE + volume = affected.fuel_burnt * FIRE_GROWTH_RATE location.assume_air(affected) for(var/A in loc) @@ -89,7 +99,7 @@ color = heat2color(temperature) set_light(l_color = color) - return 0 + return FALSE /obj/effect/hotspot/process() @@ -131,7 +141,7 @@ W.adjacent_fire_act(W, radiated_temperature) continue var/turf/simulated/T = get_step(src, direction) - if(istype(T) && T.active_hotspot) + if(istype(T) && !T.active_hotspot) T.hotspot_expose(radiated_temperature, CELL_VOLUME/4) else @@ -155,7 +165,8 @@ /obj/effect/hotspot/Destroy() set_light(0) SSair.hotspots -= src - DestroyTurf() + if(!fake) + DestroyTurf() if(istype(loc, /turf/simulated)) var/turf/simulated/T = loc if(T.active_hotspot == src) @@ -182,3 +193,147 @@ ..() if(isliving(L)) L.fire_act() + +/obj/effect/hotspot/fake // Largely for the fireflash procs below + fake = TRUE + burn_time = 30 + +/obj/effect/hotspot/fake/New() + ..() + if(burn_time) + QDEL_IN(src, burn_time) + +/proc/fireflash(atom/center, radius, temp) + if(!temp) + temp = rand(2800, 3200) + for(var/turf/T in view(radius, get_turf(center))) + if(isspaceturf(T)) + continue + if(locate(/obj/effect/hotspot) in T) + continue + if(!can_line(get_turf(center), T, radius + 1)) + continue + + var/obj/effect/hotspot/fake/H = new(T) + H.temperature = temp + H.volume = 400 + H.color = heat2color(H.temperature) + H.set_light(l_color = H.color) + + T.hotspot_expose(H.temperature, H.volume) + for(var/atom/A in T) + if(isliving(A)) + continue + if(A != H) + A.fire_act(null, H.temperature, H.volume) + + if(isfloorturf(T)) + var/turf/simulated/floor/F = T + F.burn_tile() + + for(var/mob/living/L in T) + L.adjust_fire_stacks(3) + L.IgniteMob() + L.bodytemperature = max(temp / 3, L.bodytemperature) + +/proc/fireflash_s(atom/center, radius, temp, falloff) + if(temp < T0C + 60) + return list() + var/list/open = list() + var/list/affected = list() + var/list/closed = list() + var/turf/Ce = get_turf(center) + var/max_dist = radius + if(falloff) + max_dist = min((temp - (T0C + 60)) / falloff, radius) + open[Ce] = 0 + while(open.len) + var/turf/T = open[1] + var/dist = open[T] + open -= T + closed += T + + if(isspaceturf(T)) + continue + if(dist > max_dist) + continue + if(!ff_cansee(Ce, T)) + continue + + var/obj/effect/hotspot/existing_hotspot = locate(/obj/effect/hotspot) in T + var/prev_temp = 0 + var/need_expose = 0 + var/expose_temp = 0 + if(!existing_hotspot) + var/obj/effect/hotspot/fake/H = new(T) + need_expose = TRUE + H.temperature = temp - dist * falloff + expose_temp = H.temperature + H.volume = 400 + H.color = heat2color(H.temperature) + H.set_light(l_color = H.color) + existing_hotspot = H + + else if(existing_hotspot.temperature < temp - dist * falloff) + expose_temp = (temp - dist * falloff) - existing_hotspot.temperature + prev_temp = existing_hotspot.temperature + if(expose_temp > prev_temp * 3) + need_expose = TRUE + existing_hotspot.temperature = temp - dist * falloff + existing_hotspot.color = heat2color(existing_hotspot.temperature) + existing_hotspot.set_light(l_color = existing_hotspot.color) + + affected[T] = existing_hotspot.temperature + if(need_expose && expose_temp) + T.hotspot_expose(expose_temp, existing_hotspot.volume) + for(var/atom/A in T) + if(isliving(A)) + continue + if(A != existing_hotspot) + A.fire_act(null, expose_temp, existing_hotspot.volume) + if(isfloorturf(T)) + var/turf/simulated/floor/F = T + F.burn_tile() + for(var/mob/living/L in T) + L.adjust_fire_stacks(3) + L.IgniteMob() + L.bodytemperature = (2 * L.bodytemperature + temp) / 3 + + if(T.density) + continue + for(var/obj/O in T) + if(O.density) + continue + if(dist == max_dist) + continue + + for(var/dir in cardinal) + var/turf/link = get_step(T, dir) + if (!link) + continue + var/dx = link.x - Ce.x + var/dy = link.y - Ce.y + var/target_dist = max((dist + 1 + sqrt(dx * dx + dy * dy)) / 2, dist) + if(!(link in closed)) + if(link in open) + if(open[link] > target_dist) + open[link] = target_dist + else + open[link] = target_dist + + return affected + +/proc/fireflash_sm(atom/center, radius, temp, falloff, capped = TRUE, bypass_rng = FALSE) + var/list/affected = fireflash_s(center, radius, temp, falloff) + for(var/turf/simulated/T in affected) + var/mytemp = affected[T] + var/melt = 1643.15 // default steel melting point + var/divisor = melt + if(mytemp >= melt * 2) + var/chance = mytemp / divisor + if(capped) + chance = min(chance, 30) + if(prob(chance) || bypass_rng) + T.visible_message("[T] melts!") + T.burn_down() + return affected \ No newline at end of file diff --git a/code/LINDA/LINDA_turf_tile.dm b/code/LINDA/LINDA_turf_tile.dm index 9d859dd3132..82a3642c2b4 100644 --- a/code/LINDA/LINDA_turf_tile.dm +++ b/code/LINDA/LINDA_turf_tile.dm @@ -217,9 +217,9 @@ item.temperature_expose(air, air.temperature, CELL_VOLUME) temperature_expose(air, air.temperature, CELL_VOLUME) - if(air.temperature > MINIMUM_TEMPERATURE_START_SUPERCONDUCTION) - if(consider_superconductivity(starting = 1)) - remove = 0 + if(air.temperature > MINIMUM_TEMPERATURE_START_SUPERCONDUCTION) + if(consider_superconductivity(starting = 1)) + remove = 0 if(air.temperature < T0C && air.return_pressure() > 10) icy = 1 diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index 593419b61b1..ba4bf0090c7 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -26,6 +26,7 @@ #define TOXLOSS 4 #define OXYLOSS 8 #define SHAME 16 +#define OBLITERATION 32 //Bitflags defining which status effects could be or are inflicted on a mob #define CANSTUN 1 @@ -40,6 +41,9 @@ #define FAKEDEATH 8192 //Replaces stuff like changeling.changeling_fakedeath #define XENO_HOST 16384 //Tracks whether we're gonna be a baby alien's mummy. +//Health Defines +#define HEALTH_THRESHOLD_CRIT 0 +#define HEALTH_THRESHOLD_DEAD -100 //Grab levels #define GRAB_PASSIVE 1 diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index 7eaf300277a..65372fed1c8 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -48,32 +48,33 @@ //The gamemode specific ones are just so the gamemodes can query whether a player is old enough //(in game days played) to play that role var/global/list/special_roles = list( - ROLE_TRAITOR = /datum/game_mode/traitor, - ROLE_OPERATIVE = /datum/game_mode/nuclear, - ROLE_CHANGELING = /datum/game_mode/changeling, - ROLE_WIZARD = /datum/game_mode/wizard, - ROLE_REV = /datum/game_mode/revolution, - ROLE_ALIEN, - ROLE_PAI, - ROLE_CULTIST = /datum/game_mode/cult, - ROLE_BLOB = /datum/game_mode/blob, - ROLE_NINJA, -// ROLE_MONKEY = /datum/game_mode/monkey, Sooner or later these are going to get ported -// ROLE_GANG = /datum/game_mode/gang, - ROLE_SHADOWLING = /datum/game_mode/shadowling, - ROLE_ABDUCTOR = /datum/game_mode/abduction, + ROLE_ABDUCTOR = /datum/game_mode/abduction, // Abductor + ROLE_BLOB = /datum/game_mode/blob, // Blob + ROLE_CHANGELING = /datum/game_mode/changeling, // Changeling + ROLE_BORER, // Cortical borer + ROLE_CULTIST = /datum/game_mode/cult, // Cultist + ROLE_DEVIL = /datum/game_mode/devil/devil_agents, // Devil + ROLE_GSPIDER, // Giant spider + ROLE_GUARDIAN, // Guardian + ROLE_MORPH, // Morph + ROLE_OPERATIVE = /datum/game_mode/nuclear, // Operative + ROLE_PAI, // PAI + ROLE_POSIBRAIN, // Positronic brain + ROLE_REVENANT, // Revenant + ROLE_REV = /datum/game_mode/revolution, // Revolutionary + ROLE_SENTIENT, // Sentient animal + ROLE_SHADOWLING = /datum/game_mode/shadowling, // Shadowling + ROLE_DEMON, // Slaguther demon + ROLE_NINJA, // Space ninja + ROLE_TRADER, // Trader + ROLE_TRAITOR = /datum/game_mode/traitor, // Traitor + ROLE_VAMPIRE = /datum/game_mode/vampire, // Vampire + ROLE_RAIDER = /datum/game_mode/heist, // Vox raider + ROLE_ALIEN, // Xenomorph + ROLE_WIZARD = /datum/game_mode/wizard, // Wizard + // UNUSED/BROKEN ANTAGS // ROLE_HOG_GOD = /datum/game_mode/hand_of_god, // ROLE_HOG_CULTIST = /datum/game_mode/hand_of_god, - ROLE_RAIDER = /datum/game_mode/heist, - ROLE_VAMPIRE = /datum/game_mode/vampire, - ROLE_BORER, - ROLE_DEMON, - ROLE_SENTIENT, - ROLE_POSIBRAIN, - ROLE_REVENANT, - ROLE_GUARDIAN, - ROLE_MORPH, - ROLE_TRADER, - ROLE_GSPIDER, - ROLE_DEVIL = /datum/game_mode/devil/devil_agents, +// ROLE_MONKEY = /datum/game_mode/monkey, Sooner or later these are going to get ported +// ROLE_GANG = /datum/game_mode/gang, ) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 79b7da3c10c..c7c3bbf5256 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -74,6 +74,19 @@ //turfs += centerturf return atoms +/proc/ff_cansee(atom/A, atom/B) + var/AT = get_turf(A) + var/BT = get_turf(B) + if(AT == BT) + return 1 + var/list/line = getline(A, B) + for(var/turf/T in line) + if(T == AT || T == BT) + break + if(T.density) + return FALSE + return TRUE + /proc/get_dist_euclidian(atom/Loc1 as turf|mob|obj,atom/Loc2 as turf|mob|obj) var/dx = Loc1.x - Loc2.x var/dy = Loc1.y - Loc2.y diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index bc5cfeada71..93dbd820b8c 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -216,6 +216,23 @@ Turf and target are seperate in case you want to teleport some distance from a t line+=locate(px,py,M.z) return line +//Same as the thing below just for density and without support for atoms. +/proc/can_line(atom/source, atom/target, length = 5) + var/turf/current = get_turf(source) + var/turf/target_turf = get_turf(target) + var/steps = 0 + + while(current != target_turf) + if(steps > length) + return FALSE + if(!current) + return FALSE + if(current.density) + return FALSE + current = get_step_towards(current, target_turf) + steps++ + return TRUE + //Returns whether or not a player is a guest using their ckey as an input /proc/IsGuestKey(key) if(findtext(key, "Guest-", 1, 7) != 1) //was findtextEx @@ -1165,7 +1182,7 @@ var/global/list/common_tools = list( if(istype(W, /obj/item/weldingtool)) var/obj/item/weldingtool/O = W if(O.isOn()) - return 3800 + return 2500 else return 0 if(istype(W, /obj/item/lighter)) @@ -1207,7 +1224,7 @@ var/global/list/common_tools = list( else return 0 if(istype(W, /obj/item/assembly/igniter)) - return 1000 + return 20000 else return 0 diff --git a/code/_onclick/hud/blob_overmind.dm b/code/_onclick/hud/blob_overmind.dm new file mode 100644 index 00000000000..09d076c0726 --- /dev/null +++ b/code/_onclick/hud/blob_overmind.dm @@ -0,0 +1,168 @@ +/mob/camera/blob/create_mob_hud() + if(client && !hud_used) + hud_used = new /datum/hud/blob_overmind(src) + +/obj/screen/blob + icon = 'icons/mob/blob.dmi' + +/obj/screen/blob/MouseEntered(location,control,params) + openToolTip(usr,src,params,title = name,content = desc, theme = "blob") + +/obj/screen/blob/MouseExited() + closeToolTip(usr) + +/obj/screen/blob/BlobHelp + icon_state = "ui_help" + name = "Blob Help" + desc = "Help on playing blob!" + +/obj/screen/blob/BlobHelp/Click() + if(isovermind(usr)) + var/mob/camera/blob/B = usr + B.blob_help() + +/obj/screen/blob/JumpToNode + icon_state = "ui_tonode" + name = "Jump to Node" + desc = "Moves your camera to a selected blob node." + +/obj/screen/blob/JumpToNode/Click() + if(isovermind(usr)) + var/mob/camera/blob/B = usr + B.jump_to_node() + +/obj/screen/blob/JumpToCore + icon_state = "ui_tocore" + name = "Jump to Core" + desc = "Moves your camera to your blob core." + +/obj/screen/blob/JumpToCore/MouseEntered(location,control,params) + if(hud && hud.mymob && isovermind(hud.mymob)) + name = initial(name) + desc = initial(desc) + ..() + +/obj/screen/blob/JumpToCore/Click() + if(isovermind(usr)) + var/mob/camera/blob/B = usr + B.transport_core() + +/obj/screen/blob/Blobbernaut + icon_state = "ui_blobbernaut" + name = "Produce Blobbernaut (20)" + desc = "Produces a strong, but dumb blobbernaut from a factory blob for 20 resources.
The factory blob will be destroyed in the process." + +/obj/screen/blob/Blobbernaut/Click() + if(isovermind(usr)) + var/mob/camera/blob/B = usr + B.create_blobbernaut() + +/obj/screen/blob/ResourceBlob + icon_state = "ui_resource" + name = "Produce Resource Blob (40)" + desc = "Produces a resource blob for 40 resources.
Resource blobs will give you resources every few seconds." + +/obj/screen/blob/ResourceBlob/Click() + if(isovermind(usr)) + var/mob/camera/blob/B = usr + B.create_resource() + +/obj/screen/blob/NodeBlob + icon_state = "ui_node" + name = "Produce Node Blob (60)" + desc = "Produces a node blob for 60 resources.
Node blobs will expand and activate nearby resource and factory blobs." + +/obj/screen/blob/NodeBlob/Click() + if(isovermind(usr)) + var/mob/camera/blob/B = usr + B.create_node() + +/obj/screen/blob/FactoryBlob + icon_state = "ui_factory" + name = "Produce Factory Blob (60)" + desc = "Produces a factory blob for 60 resources.
Factory blobs will produce spores every few seconds." + +/obj/screen/blob/FactoryBlob/Click() + if(isovermind(usr)) + var/mob/camera/blob/B = usr + B.create_factory() + +/obj/screen/blob/ReadaptChemical + icon_state = "ui_chemswap" + name = "Readapt Chemical (50)" + desc = "Randomly rerolls your chemical for 50 resources." + +/obj/screen/blob/ReadaptChemical/MouseEntered(location,control,params) + if(hud && hud.mymob && isovermind(hud.mymob)) + name = initial(name) + desc = initial(desc) + ..() + +/obj/screen/blob/ReadaptChemical/Click() + if(isovermind(usr)) + var/mob/camera/blob/B = usr + B.chemical_reroll() + +/obj/screen/blob/RelocateCore + icon_state = "ui_swap" + name = "Relocate Core (80)" + desc = "Swaps a node and your core for 80 resources." + +/obj/screen/blob/RelocateCore/Click() + if(isovermind(usr)) + var/mob/camera/blob/B = usr + B.relocate_core() + +/datum/hud/blob_overmind/New(mob/user) + ..() + var/obj/screen/using + + blobpwrdisplay = new /obj/screen() + blobpwrdisplay.name = "blob power" + blobpwrdisplay.icon_state = "block" + blobpwrdisplay.screen_loc = ui_health + static_inventory += blobpwrdisplay + + blobhealthdisplay = new /obj/screen() + blobhealthdisplay.name = "blob health" + blobhealthdisplay.icon_state = "block" + blobhealthdisplay.screen_loc = ui_internal + static_inventory += blobhealthdisplay + + using = new /obj/screen/blob/BlobHelp() + using.screen_loc = "WEST:6,NORTH:-3" + static_inventory += using + + using = new /obj/screen/blob/JumpToNode() + using.screen_loc = ui_inventory + static_inventory += using + + using = new /obj/screen/blob/JumpToCore() + using.screen_loc = ui_zonesel + using.hud = src + static_inventory += using + + using = new /obj/screen/blob/Blobbernaut() + using.screen_loc = ui_belt + static_inventory += using + + using = new /obj/screen/blob/ResourceBlob() + using.screen_loc = ui_back + static_inventory += using + + using = new /obj/screen/blob/NodeBlob() + using.screen_loc = using.screen_loc = ui_rhand + static_inventory += using + + using = new /obj/screen/blob/FactoryBlob() + using.screen_loc = using.screen_loc = ui_lhand + static_inventory += using + + using = new /obj/screen/blob/ReadaptChemical() + using.screen_loc = ui_storage1 + using.hud = src + static_inventory += using + + using = new /obj/screen/blob/RelocateCore() + using.screen_loc = ui_storage2 + static_inventory += using \ No newline at end of file diff --git a/code/_onclick/hud/other_mobs.dm b/code/_onclick/hud/other_mobs.dm index 8cf38a88eb9..a82c847a246 100644 --- a/code/_onclick/hud/other_mobs.dm +++ b/code/_onclick/hud/other_mobs.dm @@ -24,24 +24,4 @@ mymob.pullin.icon = 'icons/mob/screen_corgi.dmi' mymob.pullin.update_icon(mymob) mymob.pullin.screen_loc = ui_construct_pull - static_inventory += mymob.pullin - - -/mob/camera/blob/create_mob_hud() - if(client && !hud_used) - hud_used = new /datum/hud/blob_overmind(src) - -/datum/hud/blob_overmind/New(mob/user) - ..() - - blobpwrdisplay = new /obj/screen() - blobpwrdisplay.name = "blob power" - blobpwrdisplay.icon_state = "block" - blobpwrdisplay.screen_loc = ui_health - static_inventory += blobpwrdisplay - - blobhealthdisplay = new /obj/screen() - blobhealthdisplay.name = "blob health" - blobhealthdisplay.icon_state = "block" - blobhealthdisplay.screen_loc = ui_internal - static_inventory += blobhealthdisplay \ No newline at end of file + static_inventory += mymob.pullin \ No newline at end of file diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 76ef6bf5031..47036da9cf8 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -12,6 +12,9 @@ return /obj/item/proc/pre_attackby(atom/A, mob/living/user, params) //do stuff before attackby! + if(is_hot(src) && A.reagents && !ismob(A)) + to_chat(user, "You heat [A] with [src].") + A.reagents.temperature_reagents(is_hot(src)) return TRUE //return FALSE to avoid calling attackby after this proc does stuff // No comment diff --git a/code/_onclick/overmind.dm b/code/_onclick/overmind.dm index 91f24465569..612a5df2482 100644 --- a/code/_onclick/overmind.dm +++ b/code/_onclick/overmind.dm @@ -1,17 +1,35 @@ // Blob Overmind Controls -/mob/camera/blob/CtrlClickOn(var/atom/A) // Expand blob +/mob/camera/blob/ClickOn(var/atom/A, var/params) //Expand blob + var/list/modifiers = params2list(params) + if(modifiers["middle"]) + MiddleClickOn(A) + return + if(modifiers["shift"]) + ShiftClickOn(A) + return + if(modifiers["alt"]) + AltClickOn(A) + return + if(modifiers["ctrl"]) + CtrlClickOn(A) + return var/turf/T = get_turf(A) if(T) expand_blob(T) -/mob/camera/blob/MiddleClickOn(var/atom/A) // Rally spores +/mob/camera/blob/MiddleClickOn(atom/A) //Rally spores var/turf/T = get_turf(A) if(T) rally_spores(T) -/mob/camera/blob/AltClickOn(var/atom/A) // Create a shield +/mob/camera/blob/CtrlClickOn(atom/A) //Create a shield var/turf/T = get_turf(A) if(T) - create_shield(T) \ No newline at end of file + create_shield(T) + +/mob/camera/blob/AltClickOn(atom/A) //Remove a blob + var/turf/T = get_turf(A) + if(T) + revert(T) \ No newline at end of file diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 55408300c18..39ad8d66030 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -100,10 +100,6 @@ //game_options.txt configs - var/health_threshold_softcrit = 0 - var/health_threshold_crit = 0 - var/health_threshold_dead = -100 - var/bones_can_break = 1 var/revival_pod_plants = 1 @@ -672,10 +668,6 @@ value = text2num(value) switch(name) - if("health_threshold_crit") - config.health_threshold_crit = value - if("health_threshold_dead") - config.health_threshold_dead = value if("revival_pod_plants") config.revival_pod_plants = value if("revival_cloning") diff --git a/code/datums/diseases/critical.dm b/code/datums/diseases/critical.dm new file mode 100644 index 00000000000..82748802cce --- /dev/null +++ b/code/datums/diseases/critical.dm @@ -0,0 +1,130 @@ +/datum/disease/critical + +/datum/disease/critical/stage_act() //overriden to ensure unique behavior + stage = min(stage, max_stages) + + if(prob(stage_prob)) + stage = min(stage + 1, max_stages) + + for(var/C_id in cures) + if(affected_mob.reagents.has_reagent(C_id)) + if(prob(cure_chance)) + cure() + return FALSE + return TRUE + +/datum/disease/critical/shock + name = "Shock" + form = "Medical Emergency" + spread_text = "The patient is in shock" + max_stages = 3 + spread_flags = SPECIAL + cure_text = "Saline Solution" + cures = list("salglu_solution") + cure_chance = 10 + viable_mobtypes = list(/mob/living/carbon/human) + stage_prob = 6 + severity = DANGEROUS + disease_flags = CURABLE + bypasses_immunity = TRUE + virus_heal_resistant = TRUE + +/datum/disease/critical/shock/stage_act() + if(..()) + if(affected_mob.health >= 25) + to_chat(affected_mob, "You feel better.") + cure() + return + switch(stage) + if(1) + if(prob(1) && prob(10)) + to_chat(affected_mob, "You feel better.") + cure() + return + if(prob(8)) + affected_mob.emote(pick("shiver", "pale", "moan")) + if(prob(5)) + to_chat(affected_mob, "You feel weak!") + if(2) + if(prob(1) && prob(10)) + to_chat(affected_mob, "You feel better.") + cure() + return + if(prob(8)) + affected_mob.emote(pick("shiver", "pale", "moan", "shudder", "tremble")) + if(prob(5)) + to_chat(affected_mob, "You feel absolutely terrible!") + if(prob(5)) + affected_mob.emote("faint", "collapse", "groan") + if(3) + if(prob(1) && prob(10)) + to_chat(affected_mob, "You feel better.") + cure() + return + if(prob(8)) + affected_mob.emote(pick("shudder", "pale", "tremble", "groan", "bshake")) + if(prob(5)) + to_chat(affected_mob, "You feel horrible!") + if(prob(5)) + affected_mob.emote(pick("faint", "collapse", "groan")) + if(prob(7)) + to_chat(affected_mob, "You can't breathe!") + affected_mob.AdjustLoseBreath(1) + if(prob(5)) + var/datum/disease/D = new /datum/disease/critical/heart_failure + affected_mob.ForceContractDisease(D) + +/datum/disease/critical/heart_failure + name = "Cardiac Failure" + form = "Medical Emergency" + spread_text = "The patient is having a cardiac emergency" + max_stages = 3 + spread_flags = SPECIAL + cure_text = "Cardiac Stimulants" + cures = list("atropine", "epinephrine") + cure_chance = 10 + needs_all_cures = FALSE + viable_mobtypes = list(/mob/living/carbon/human) + stage_prob = 5 + severity = DANGEROUS + disease_flags = CURABLE + required_organs = list(/obj/item/organ/internal/heart) + bypasses_immunity = TRUE + virus_heal_resistant = TRUE + +/datum/disease/critical/heart_failure/stage_act() + if(..()) + switch(stage) + if(1) + if(prob(1) && prob(10)) + to_chat(affected_mob, "You feel better.") + cure() + return + if(prob(8)) + affected_mob.emote(pick("pale", "shudder")) + if(prob(5)) + to_chat(affected_mob, "Your arm hurts!") + else if(prob(5)) + to_chat(affected_mob, "Your chest hurts!") + if(2) + if(prob(1) && prob(10)) + to_chat(affected_mob, "You feel better.") + cure() + return + if(prob(8)) + affected_mob.emote(pick("pale", "groan")) + if(prob(5)) + to_chat(affected_mob, "Your heart lurches in your chest!") + affected_mob.AdjustLoseBreath(1) + if(prob(3)) + to_chat(affected_mob, "Your heart stops beating!") + affected_mob.AdjustLoseBreath(3) + if(prob(5)) + affected_mob.emote(pick("faint", "collapse", "groan")) + if(3) + affected_mob.adjustOxyLoss(1) + if(prob(8)) + affected_mob.emote(pick("twitch", "gasp")) + if(prob(5) && ishuman(affected_mob)) + var/mob/living/carbon/human/H = affected_mob + H.set_heartattack(TRUE) \ No newline at end of file diff --git a/code/datums/diseases/food_poisoning.dm b/code/datums/diseases/food_poisoning.dm index 79a3801ce10..2e7d083455b 100644 --- a/code/datums/diseases/food_poisoning.dm +++ b/code/datums/diseases/food_poisoning.dm @@ -14,20 +14,13 @@ disease_flags = CURABLE spread_flags = NON_CONTAGIOUS virus_heal_resistant = TRUE - var/remissive = 0 /datum/disease/food_poisoning/stage_act() - if(!remissive) - ..() + ..() if(affected_mob.sleeping && prob(33)) to_chat(affected_mob, "You feel better.") - remissive = 1 - if(remissive) - if(prob(stage_prob)) - stage-- - if(stage == 0) - cure() - return + cure() + return switch(stage) if(1) if(prob(5)) diff --git a/code/datums/gas_mixture.dm b/code/datums/gas_mixture.dm index a10c3a8358f..7a7571999cf 100644 --- a/code/datums/gas_mixture.dm +++ b/code/datums/gas_mixture.dm @@ -117,7 +117,7 @@ What are the archived variables for? trace_gas.moles -= reaction_rate*0.05 - temperature -= (reaction_rate*20000)/heat_capacity() + temperature += (reaction_rate*20000)/heat_capacity() reacting = 1 diff --git a/code/datums/spells/inflict_handler.dm b/code/datums/spells/inflict_handler.dm index cfda930afd2..896e399187a 100644 --- a/code/datums/spells/inflict_handler.dm +++ b/code/datums/spells/inflict_handler.dm @@ -44,7 +44,7 @@ else if(amt_dam_fire <= 0) target.heal_overall_damage(amt_dam_brute,amt_dam_fire) target.adjustToxLoss(amt_dam_tox) - target.oxyloss += amt_dam_oxy + target.adjustOxyLoss(amt_dam_oxy) //disabling target.Weaken(amt_weakened) target.Paralyse(amt_paralysis) diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 5330be00665..328482f9892 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -1060,8 +1060,8 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine /datum/supply_packs/organic/bar name = "Bar Starter Kit" contains = list(/obj/item/storage/box/drinkingglasses, - /obj/item/circuitboard/soda, - /obj/item/circuitboard/beer) + /obj/item/circuitboard/chem_dispenser/soda, + /obj/item/circuitboard/chem_dispenser/beer) cost = 20 containername = "beer starter kit" announce_beacons = list("Bar" = list("Bar")) diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index a22bdd371a6..392908127d0 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -351,6 +351,16 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 12 job = list("Research Director") +//Roboticist +/datum/uplink_item/jobspecific/syndiemmi + name = "Syndicate MMI" + desc = "A syndicate developed man-machine-interface which will make any cyborg it is inserted into follow the standard syndicate lawset." + reference = "SMMI" + item = /obj/item/mmi/syndie + cost = 2 + job = list("Roboticist") + surplus = 0 + //Librarian /datum/uplink_item/jobspecific/etwenty name = "The E20" @@ -1160,10 +1170,10 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/device_tools/surgerybag name = "Syndicate Surgery Duffelbag" - desc = "The Syndicate surgery duffelbag is a toolkit containing all surgery tools, a straitjacket, and a muzzle." + desc = "The Syndicate surgery duffelbag comes with a full set of surgery tools, a straightjacket and a muzzle. The bag itself is also made of very light materials and won't slow you down while it is equipped." reference = "SSDB" item = /obj/item/storage/backpack/duffel/syndie/surgery - cost = 4 + cost = 2 /datum/uplink_item/device_tools/bonerepair name = "Prototype Bone Repair Kit" diff --git a/code/game/asteroid.dm b/code/game/asteroid.dm index 6f96aa1dac1..aab2094de5f 100644 --- a/code/game/asteroid.dm +++ b/code/game/asteroid.dm @@ -104,7 +104,7 @@ var/global/max_secret_rooms = 6 theme = "hitech" walltypes = list(/turf/simulated/wall/r_wall=5,/turf/simulated/mineral/random=1) floortypes = list(/turf/simulated/floor/greengrid,/turf/simulated/floor/bluegrid) - treasureitems = list(/obj/item/stock_parts/cell/hyper=1, /obj/machinery/chem_dispenser/constructable=1,/obj/machinery/computer/telescience=1, /obj/machinery/r_n_d/protolathe=1, + treasureitems = list(/obj/item/stock_parts/cell/hyper=1, /obj/item/circuitboard/chem_dispenser=1,/obj/machinery/computer/telescience=1, /obj/machinery/r_n_d/protolathe=1, /obj/machinery/biogenerator=1) fluffitems = list(/obj/structure/table/reinforced=2,/obj/item/stock_parts/scanning_module/phasic=3, /obj/item/stock_parts/matter_bin/super=3,/obj/item/stock_parts/manipulator/pico=3, diff --git a/code/game/atoms.dm b/code/game/atoms.dm index bafbb299bd4..f8988bda5a6 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -317,8 +317,9 @@ /atom/proc/blob_act(obj/structure/blob/B) SEND_SIGNAL(src, COMSIG_ATOM_BLOB_ACT, B) -/atom/proc/fire_act() - return +/atom/proc/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + if(reagents) + reagents.temperature_reagents(exposed_temperature) /atom/proc/emag_act() return @@ -685,10 +686,10 @@ var/list/blood_splatter_icons = list() return pass_flags&passflag /atom/proc/isinspace() - if(istype(get_turf(src), /turf/space)) - return 1 + if(isspaceturf(get_turf(src))) + return TRUE else - return 0 + return FALSE /atom/proc/handle_fall() return diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 178605853e8..461de475b41 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -78,10 +78,11 @@ return 1 return 0 -//helper for getting the appropriate health status UPDATED BY PUCKABOO2 TO INCLUDE NEGATIVES. +//helper for getting the appropriate health status /proc/RoundHealth(mob/living/M) if(M.stat == DEAD || (M.status_flags & FAKEDEATH)) - return "health-100" //what's our health? it doesn't matter, we're dead, or faking + return "health-100-dead" //what's our health? it doesn't matter, we're dead, or faking + var/maxi_health = M.maxHealth if(iscarbon(M) && M.health < 0) maxi_health = 100 //so crit shows up right for aliens and other high-health carbon mobs; noncarbons don't have crit. @@ -91,7 +92,7 @@ if(100 to INFINITY) return "health100" if(95 to 100) - return "health95" //For telling patients to eat a warm donk pocket and go on with their shift. + return "health95" if(90 to 95) return "health90" if(80 to 90) @@ -127,13 +128,13 @@ if(-70 to -60) return "health-60" if(-80 to -70) - return "health-70" //Doc? + return "health-70" if(-90 to -80) - return "health-80" //Hey, doc? + return "health-80" if(-100 to -90) - return "health-90" //HURRY UP, DOC! + return "health-90" else - return "health-100" //doc u had 1 job + return "health-100" //past this point, you're just in trouble return "0" @@ -438,4 +439,4 @@ if(weedlevel < 1) // You don't want to see these icons if the value is small holder.icon_state = "" return - holder.icon_state = "hudweed[RoundPlantBar(weedlevel/10)]" + holder.icon_state = "hudweed[RoundPlantBar(weedlevel/10)]" \ No newline at end of file diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 708d8467fb0..e4b1f1e8a49 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -537,7 +537,7 @@ occupantData["isViableSubject"] = 0 occupantData["health"] = connected.occupant.health occupantData["maxHealth"] = connected.occupant.maxHealth - occupantData["minHealth"] = config.health_threshold_dead + occupantData["minHealth"] = HEALTH_THRESHOLD_DEAD occupantData["uniqueEnzymes"] = connected.occupant.dna.unique_enzymes occupantData["uniqueIdentity"] = connected.occupant.dna.uni_identity occupantData["structuralEnzymes"] = connected.occupant.dna.struc_enzymes diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index 6edc8e67ecc..b1ea3c199c4 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -12,6 +12,8 @@ minbodytemp = 0 maxbodytemp = 360 universal_speak = 1 //So mobs can understand them when a blob uses Blob Broadcast + sentience_type = SENTIENCE_OTHER + gold_core_spawnable = CHEM_MOB_SPAWN_INVALID var/mob/camera/blob/overmind = null /mob/living/simple_animal/hostile/blob/proc/adjustcolors(var/a_color) @@ -21,6 +23,7 @@ /mob/living/simple_animal/hostile/blob/blob_act() return + //////////////// // BLOB SPORE // //////////////// @@ -46,7 +49,7 @@ pressure_resistance = 100 //100 kPa difference required to push throw_pressure_limit = 120 //120 kPa difference required to throw -/mob/living/simple_animal/hostile/blob/blobspore/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) +/mob/living/simple_animal/hostile/blob/blobspore/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) ..() adjustBruteLoss(Clamp(0.01 * exposed_temperature, 1, 5)) diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm index 644383f344d..4bdc2cafddd 100644 --- a/code/game/gamemodes/blob/blobs/core.dm +++ b/code/game/gamemodes/blob/blobs/core.dm @@ -45,7 +45,7 @@ GLOB.poi_list.Remove(src) return ..() -/obj/structure/blob/core/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) +/obj/structure/blob/core/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) return /obj/structure/blob/core/update_icon() diff --git a/code/game/gamemodes/blob/blobs/node.dm b/code/game/gamemodes/blob/blobs/node.dm index 19ac320287a..32b6ce1f408 100644 --- a/code/game/gamemodes/blob/blobs/node.dm +++ b/code/game/gamemodes/blob/blobs/node.dm @@ -20,7 +20,7 @@ var/image/C = new('icons/mob/blob.dmi', "blob_node_overlay") src.overlays += C -/obj/structure/blob/node/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) +/obj/structure/blob/node/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) return /obj/structure/blob/node/Destroy() diff --git a/code/game/gamemodes/blob/blobs/shield.dm b/code/game/gamemodes/blob/blobs/shield.dm index 1fb293be2cf..696a33d94b9 100644 --- a/code/game/gamemodes/blob/blobs/shield.dm +++ b/code/game/gamemodes/blob/blobs/shield.dm @@ -3,9 +3,9 @@ icon = 'icons/mob/blob.dmi' icon_state = "blob_idle" desc = "Some blob creature thingy" - health = 75 + health = 75 fire_resist = 2 - var/maxHealth = 75 + var/maxHealth = 75 /obj/structure/blob/shield/update_icon() if(health <= 0) @@ -13,7 +13,7 @@ return return -/obj/structure/blob/shield/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) +/obj/structure/blob/shield/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) return /obj/structure/blob/shield/CanPass(atom/movable/mover, turf/target, height=0) @@ -42,11 +42,11 @@ P.setAngle(new_angle_s) P.firer = src //so people who fired the lasers are not immune to them when it reflects visible_message("[P] reflects off [src]!") - return -1// complete projectile permutation + return -1// complete projectile permutation else playsound(src, P.hitsound, 50, 1) visible_message("[src] is hit by \a [P]!") take_damage(P.damage, P.damage_type) - + /obj/structure/blob/shield/reflective/bullet_act() return diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index c0f2e4a4a9e..382fc8dd953 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -31,6 +31,7 @@ if(blob_core) blob_core.adjustcolors(blob_reagent_datum.color) + color = blob_reagent_datum.complementary_color ghostimage = image(src.icon,src,src.icon_state) ghost_darkness_images |= ghostimage //so ghosts can see the blob cursor when they disable darkness updateallghostimages() @@ -51,16 +52,7 @@ /mob/camera/blob/Login() ..() sync_mind() - to_chat(src, "You are the overmind!") - to_chat(src, "Your randomly chosen reagent is: [blob_reagent_datum.name]!") - to_chat(src, "You are the overmind and can control the blob! You can expand, which will attack people, and place new blob pieces such as...") - to_chat(src, "Normal Blob will expand your reach and allow you to upgrade into special blobs that perform certain functions.") - to_chat(src, "Shield Blob is a strong and expensive blob which can take more damage. It is fireproof and can block air, use this to protect yourself from station fires.") - to_chat(src, "Reflective Blobis an upgraded Shield Blob which has a high chance of deflecting energy projectiles, but is vulnerable to ballistics and brute damage.") - to_chat(src, "Resource Blob is a blob which will collect more resources for you, try to build these earlier to get a strong income. It will benefit from being near your core or multiple nodes, by having an increased resource rate; put it alone and it won't create resources at all.") - to_chat(src, "Node Blob is a blob which will grow, like the core. Unlike the core it won't give you a small income but it can power resource and factory blobs to increase their rate.") - to_chat(src, "Factory Blob is a blob which will spawn blob spores which will attack nearby food. Putting this nearby nodes and your core will increase the spawn rate; put it alone and it will not spawn any spores.") - to_chat(src, "Shortcuts: CTRL Click = Expand Blob / Middle Mouse Click = Rally Spores / Alt Click = Create Shield") + blob_help() update_health() /mob/camera/blob/proc/update_health() diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index 4491b80d2e4..a3c219fefdc 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -43,7 +43,7 @@ var/obj/structure/blob/B = locate(/obj/structure/blob) in T var/obj/structure/blob/shield/S = locate(/obj/structure/blob/shield) in T - + if(!S) if(!B)//We are on a blob to_chat(src, "There is no blob here!") @@ -59,7 +59,7 @@ B.color = blob_reagent_datum.color B.change_to(/obj/structure/blob/shield) else - + if(istype(S, /obj/structure/blob/shield/reflective)) to_chat(src, "There's already a reflector blob here!") return @@ -68,12 +68,12 @@ else if(S.health < S.maxHealth * 0.5) to_chat(src, "This shield blob is too damaged to be modified properly!") return - + else if (!can_buy(15)) return - + to_chat(src, "You secrete a reflective ooze over the shield blob, allowing it to reflect energy projectiles at the cost of reduced intregrity.") - + S.change_to(/obj/structure/blob/shield/reflective) S.color = blob_reagent_datum.color return @@ -409,7 +409,7 @@ /mob/camera/blob/verb/chemical_reroll() set category = "Blob" set name = "Reactive Chemical Adaptation (50)" - set desc = "Replaces your chemical with a different one" + set desc = "Replaces your chemical with a random, different one." if(!can_buy(50)) return @@ -417,10 +417,31 @@ var/datum/reagent/blob/B = pick((subtypesof(/datum/reagent/blob) - blob_reagent_datum.type)) blob_reagent_datum = new B + color = blob_reagent_datum.complementary_color + for(var/obj/structure/blob/BL in blobs) BL.adjustcolors(blob_reagent_datum.color) for(var/mob/living/simple_animal/hostile/blob/BLO) BLO.adjustcolors(blob_reagent_datum.color) - to_chat(src, "Your reagent is now: [blob_reagent_datum.name]!") + to_chat(src, "Your reagent is now: [blob_reagent_datum.name] - [blob_reagent_datum.description]") + +/mob/camera/blob/verb/blob_help() + set category = "Blob" + set name = "*Blob Help*" + set desc = "Help on how to blob." + to_chat(src, "As the overmind, you can control the blob!") + to_chat(src, "Your blob reagent is: [blob_reagent_datum.name] - [blob_reagent_datum.description]") + to_chat(src, "You can expand, which will attack people, damage objects, or place a Normal Blob if the tile is clear.") + to_chat(src, "Normal Blobs will expand your reach and can be upgraded into special blobs that perform certain functions.") + to_chat(src, "You can upgrade normal blobs into the following types of blob:") + to_chat(src, "Shield Blobs are strong and expensive blobs which take more damage. In additon, they are fireproof and can block air, use these to protect yourself from station fires. Upgrading them again will result in a Reflective blob, capable of reflecting laser projectiles at the cost of the strong blob's extra health.") + to_chat(src, "Resource Blobs are blobs which produce more resources for you, build as many of these as possible to consume the station. This type of blob must be placed near node blobs or your core to work.") + to_chat(src, "Factory Blobs are blobs that spawn blob spores which will attack nearby enemies. This type of blob must be placed near node blobs or your core to work.") + to_chat(src, "Blobbernauts can be produced from factories for a cost, and are hard to kill, powerful, but ultimately dumb. The factory used to create one will be destroyed in the process.") + to_chat(src, "Storage Blobs are storage towers which will store extra resources for you. This increases your max resource cap by 50.") + to_chat(src, "Node Blobs are blobs which grow, like the core. Like the core it can activate resource and factory blobs.") + to_chat(src, "In addition to the buttons on your HUD, there are a few click shortcuts to speed up expansion and defense.") + to_chat(src, "Shortcuts: Click = Expand Blob | CTRL Click = Create Shield Blob | Middle Mouse Click = Rally Spores | Alt Click = Remove Blob") + to_chat(src, "Attempting to talk will send a message to all other overminds, allowing you to coordinate with them.") \ No newline at end of file diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index 7d55f2fe1c9..68f0c12f6ba 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -31,8 +31,10 @@ /obj/structure/blob/CanPass(atom/movable/mover, turf/target, height=0) - if(height==0) return 1 - if(istype(mover) && mover.checkpass(PASSBLOB)) return 1 + if(height==0) + return 1 + if(istype(mover) && mover.checkpass(PASSBLOB)) + return 1 return 0 /obj/structure/blob/CanAStarPass(ID, dir, caller) @@ -45,7 +47,7 @@ Life() return -/obj/structure/blob/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) +/obj/structure/blob/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) ..() var/damage = Clamp(0.01 * exposed_temperature, 0, 4) take_damage(damage, BURN) diff --git a/code/game/gamemodes/changeling/powers/fleshmend.dm b/code/game/gamemodes/changeling/powers/fleshmend.dm index 6dbd4badc30..21d97863105 100644 --- a/code/game/gamemodes/changeling/powers/fleshmend.dm +++ b/code/game/gamemodes/changeling/powers/fleshmend.dm @@ -40,9 +40,6 @@ // The healing itself - doesn't heal toxin damage // (that's anatomic panacea) and the effectiveness decreases with // each use in a short timespan - if(ishuman(user)) - var/mob/living/carbon/human/H = user - H.shock_stage = 0 for(var/i in 1 to healing_ticks) if(user) var/healpertick = -(total_healing / healing_ticks) diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm index 0c8d22b5a8b..6288bed2964 100644 --- a/code/game/gamemodes/changeling/powers/mutations.dm +++ b/code/game/gamemodes/changeling/powers/mutations.dm @@ -220,7 +220,7 @@ /obj/item/gun/magic/tentacle/suicide_act(mob/user) user.visible_message("[user] coils [src] tightly around [user.p_their()] neck! It looks like [user.p_theyre()] trying to commit suicide.") - return (OXYLOSS) + return OXYLOSS /obj/item/ammo_casing/magic/tentacle name = "tentacle" diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm index 83f221a95d3..1fef93d0f13 100644 --- a/code/game/gamemodes/changeling/powers/revive.dm +++ b/code/game/gamemodes/changeling/powers/revive.dm @@ -27,8 +27,6 @@ if(ishuman(user)) var/mob/living/carbon/human/H = user H.restore_blood() - H.traumatic_shock = 0 - H.shock_stage = 0 H.next_pain_time = 0 H.dna.species.create_organs(H) // Now that recreating all organs is necessary, the rest of this organ stuff probably @@ -51,6 +49,8 @@ IO.rejuvenate() IO.trace_chemicals.Cut() H.remove_all_embedded_objects() + for(var/datum/disease/critical/C in user.viruses) + C.cure() user.status_flags &= ~(FAKEDEATH) user.updatehealth("revive sting") user.update_blind_effects() diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index 32abeaac947..e0f329bb0a4 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm @@ -101,10 +101,12 @@ attack_sound = 'sound/effects/empulse.ogg' friendly = "pinches" speed = 0 + a_intent = INTENT_HARM + can_change_intents = 0 faction = list("swarmer") projectiletype = /obj/item/projectile/beam/disabler pass_flags = PASSTABLE - mob_size = MOB_SIZE_TINY + mob_size = MOB_SIZE_SMALL ventcrawler = 2 ranged = 1 light_color = LIGHT_COLOR_CYAN diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index d344074a331..f339be06b88 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -102,7 +102,7 @@ if(summoner) var/resulthealth if(iscarbon(summoner)) - resulthealth = round((abs(config.health_threshold_dead - summoner.health) / abs(config.health_threshold_dead - summoner.maxHealth)) * 100) + resulthealth = round((abs(HEALTH_THRESHOLD_DEAD - summoner.health) / abs(HEALTH_THRESHOLD_DEAD - summoner.maxHealth)) * 100) else resulthealth = round((summoner.health / summoner.maxHealth) * 100) if(hud_used) diff --git a/code/game/gamemodes/miniantags/morph/morph.dm b/code/game/gamemodes/miniantags/morph/morph.dm index 94c39d12442..3bb36870d31 100644 --- a/code/game/gamemodes/miniantags/morph/morph.dm +++ b/code/game/gamemodes/miniantags/morph/morph.dm @@ -38,12 +38,12 @@ var/atom/movable/form = null var/morph_time = 0 - var/playstyle_string = "You are a morph, an abomination of science created primarily with changeling cells. \ - You may take the form of anything nearby by shift-clicking it. This process will alert any nearby \ - observers, and can only be performed once every five seconds. While morphed, you move faster, but do \ + var/playstyle_string = "You are a morph.
As an abomination created primarily with changeling cells, \ + you may take the form of anything nearby by shift-clicking it. This process will alert any nearby \ + observers, and can only be performed once every five seconds.
While morphed, you move faster, but do \ less damage. In addition, anyone within three tiles will note an uncanny wrongness if examining you. \ - You can attack any item or dead creature to consume it - creatures will restore 1/3 of your max health. \ - Finally, you can restore yourself to your original form while morphed by shift-clicking yourself.
" + You can restore yourself to your original form while morphed by shift-clicking yourself.
\ + Finally, you can attack any item or dead creature to consume it - creatures will restore 1/3 of your max health.
" /mob/living/simple_animal/hostile/morph/examine(mob/user) if(morphed) diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm index 9a3ca6073a1..bd17175eaa2 100644 --- a/code/game/gamemodes/scoreboard.dm +++ b/code/game/gamemodes/scoreboard.dm @@ -59,7 +59,7 @@ score_richestjob = E.job score_richestkey = E.key - dmg_score = E.bruteloss + E.fireloss + E.toxloss + E.oxyloss + dmg_score = E.getBruteLoss() + E.getFireLoss() + E.getToxLoss() + E.getOxyLoss() if(dmg_score > score_dmgestdamage) score_dmgestdamage = dmg_score score_dmgestname = E.real_name diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm index a561fe6a273..29a2c9aadca 100644 --- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm @@ -107,6 +107,8 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/collective_mind(null)) H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_regenarmor(null)) H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_extend_shuttle(null)) + H.hud_used = new /datum/hud/human(H, ui_style2icon(H.client.prefs.UI_style), H.client.prefs.UI_style_color, H.client.prefs.UI_style_alpha) + H.hud_used.show_hud(H.hud_used.hud_version) /obj/effect/proc_holder/spell/targeted/shadowling_ascend name = "Ascend" diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 5ed9af46fe1..dbe3146dd7f 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -868,7 +868,7 @@ var/global/list/multiverse = list() var/area/A = get_area(src) to_chat(victim, "You feel a dark presence from [A.name]") -/obj/item/voodoo/fire_act() +/obj/item/voodoo/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) if(target) target.adjust_fire_stacks(20) target.IgniteMob() diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index e7893c3f84e..66cdff69b3f 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -409,6 +409,15 @@ limit = 3 category = "Assistance" +/datum/spellbook_entry/item/oozebottle + name = "Bottle of Ooze" + desc = "A bottle of magically infused ooze, which will awake an all-consuming Morph, capable of cunningly disguising itself as any object it comes in contact with. Be careful though, as Morph diet includes Wizards." + item_path = /obj/item/antag_spawner/morph + cost = 1 + log_name = "BO" + limit = 3 + category = "Assistance" + /datum/spellbook_entry/item/tarotdeck name = "Tarot Deck" desc = "A deck of guardian tarot cards, capable of binding a personal guardian to your body. There are multiple types of guardian available, but all of them will transfer some amount of damage to you. \ diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index a4fc67ddf32..c447ff26e72 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -104,6 +104,7 @@ if(prob(addiction_removal_chance)) to_chat(occupant, "You no longer feel reliant on [R.name]!") occupant.reagents.addiction_list.Remove(R) + qdel(R) for(var/mob/M as mob in src) // makes sure that simple mobs don't get stuck inside a sleeper when they resist out of occupant's grasp if(M == occupant) @@ -148,7 +149,7 @@ occupantData["stat"] = occupant.stat occupantData["health"] = occupant.health occupantData["maxHealth"] = occupant.maxHealth - occupantData["minHealth"] = config.health_threshold_dead + occupantData["minHealth"] = HEALTH_THRESHOLD_DEAD occupantData["bruteLoss"] = occupant.getBruteLoss() occupantData["oxyLoss"] = occupant.getOxyLoss() occupantData["toxLoss"] = occupant.getToxLoss() diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 1be5fa5e43a..95e609ee524 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -244,6 +244,7 @@ update_flag return 0 /obj/machinery/portable_atmospherics/canister/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(exposed_temperature > temperature_resistance) health -= 5 healthcheck() diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 17a27812499..3c24a5064c0 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -34,7 +34,7 @@ var/obj/effect/countdown/clonepod/countdown - var/list/brine_types = list("corazone", "salbutamol", "hydrocodone") + var/list/brine_types = list("corazone", "salbutamol", "epinephrine", "salglu_solution") //stops heart attacks, heart failure, shock, and keeps their O2 levels normal var/list/missing_organs var/organs_number = 0 @@ -479,7 +479,6 @@ occupant.forceMove(get_turf(src)) occupant.update_body() domutcheck(occupant) //Waiting until they're out before possible notransform. - occupant.shock_stage = 0 //Reset Shock occupant.special_post_clone_handling() occupant = null update_icon() diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index c338a0f32c9..c4c8d342aeb 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -112,7 +112,7 @@ occupantData["stat"] = occupant.stat occupantData["health"] = occupant.health occupantData["maxHealth"] = occupant.maxHealth - occupantData["minHealth"] = config.health_threshold_dead + occupantData["minHealth"] = HEALTH_THRESHOLD_DEAD occupantData["bruteLoss"] = occupant.getBruteLoss() occupantData["oxyLoss"] = occupant.getOxyLoss() occupantData["toxLoss"] = occupant.getToxLoss() diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index ece6615b786..85738d3bb65 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -541,13 +541,12 @@ to destroy them and players will be able to make replacements. /obj/item/stock_parts/capacitor = 1) /obj/item/circuitboard/chem_dispenser - name = "circuit board (Portable Chem Dispenser)" - build_path = /obj/machinery/chem_dispenser/constructable + name = "circuit board (Chem Dispenser)" + build_path = /obj/machinery/chem_dispenser board_type = "machine" origin_tech = "materials=4;programming=4;plasmatech=4;biotech=3" frame_desc = "Requires 2 Matter Bins, 1 Capacitor, 1 Manipulator, 1 Console Screen, and 1 Power Cell." - req_components = list( - /obj/item/stock_parts/matter_bin = 2, + req_components = list( /obj/item/stock_parts/matter_bin = 2, /obj/item/stock_parts/capacitor = 1, /obj/item/stock_parts/manipulator = 1, /obj/item/stock_parts/console_screen = 1, @@ -617,30 +616,13 @@ to destroy them and players will be able to make replacements. /obj/item/stock_parts/manipulator = 2, /obj/item/reagent_containers/glass/beaker = 2) -/obj/item/circuitboard/soda +/obj/item/circuitboard/chem_dispenser/soda name = "Circuit board (Soda Machine)" build_path = /obj/machinery/chem_dispenser/soda - board_type = "machine" - frame_desc = "Requires 2 Matter Bins, 1 Manipulators, 1 Capacitor, 1 Console Screen, and 1 Power Cell." - req_components = list( - /obj/item/stock_parts/matter_bin = 2, - /obj/item/stock_parts/manipulator = 1, - /obj/item/stock_parts/capacitor = 1, - /obj/item/stock_parts/console_screen = 1, - /obj/item/stock_parts/cell = 1) -/obj/item/circuitboard/beer +/obj/item/circuitboard/chem_dispenser/beer name = "Circuit board (Beer Machine)" build_path = /obj/machinery/chem_dispenser/beer - board_type = "machine" - frame_desc = "Requires 2 Matter Bins, 1 Manipulators, 1 Capacitor, 1 Console Screen, and 1 Power Cell." - req_components = list( - /obj/item/stock_parts/matter_bin = 2, - /obj/item/stock_parts/manipulator = 1, - /obj/item/stock_parts/capacitor = 1, - /obj/item/stock_parts/console_screen = 1, - /obj/item/stock_parts/cell = 1) - /obj/item/circuitboard/circuit_imprinter name = "Circuit board (Circuit Imprinter)" diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index fc60d8f005d..d05ec96133d 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -208,7 +208,7 @@ occupantData["stat"] = occupant.stat occupantData["health"] = occupant.health occupantData["maxHealth"] = occupant.maxHealth - occupantData["minHealth"] = config.health_threshold_dead + occupantData["minHealth"] = HEALTH_THRESHOLD_DEAD occupantData["bruteLoss"] = occupant.getBruteLoss() occupantData["oxyLoss"] = occupant.getOxyLoss() occupantData["toxLoss"] = occupant.getToxLoss() @@ -378,9 +378,9 @@ occupant.Paralyse(max(5/efficiency, (1/occupant.bodytemperature)*3000/efficiency)) if(air_contents.oxygen > 2) if(occupant.getOxyLoss()) - occupant.adjustOxyLoss(-10) + occupant.adjustOxyLoss(-6) else - occupant.adjustOxyLoss(-2) + occupant.adjustOxyLoss(-1.2) if(beaker && next_trans == 0) var/proportion = 10 * min(1/beaker.volume, 1) // Yes, this means you can get more bang for your buck with a beaker of SF vs a patch @@ -388,7 +388,7 @@ beaker.reagents.reaction(occupant, TOUCH, proportion) beaker.reagents.trans_to(occupant, 1, 10) next_trans++ - if(next_trans == 10) + if(next_trans == 17) next_trans = 0 /obj/machinery/atmospherics/unary/cryo_cell/proc/heat_gas_contents() diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm index 53fab536afd..8e3c7f76342 100644 --- a/code/game/machinery/doors/airlock_types.dm +++ b/code/game/machinery/doors/airlock_types.dm @@ -171,6 +171,7 @@ assemblytype = /obj/structure/door_assembly/door_assembly_plasma /obj/machinery/door/airlock/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(exposed_temperature > 300) PlasmaBurn(exposed_temperature) diff --git a/code/game/machinery/doors/spacepod.dm b/code/game/machinery/doors/spacepod.dm index 5aea5b477ed..ae966070f22 100644 --- a/code/game/machinery/doors/spacepod.dm +++ b/code/game/machinery/doors/spacepod.dm @@ -15,8 +15,9 @@ return 0 /obj/structure/spacepoddoor/Destroy() - air_update_turf(1) - return ..() + var/turf/T = get_turf(src) + . = ..() + T.air_update_turf(TRUE) /obj/structure/spacepoddoor/CanPass(atom/movable/A, turf/T) if(istype(A, /obj/spacepod)) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 1ab22f341b6..21ff909796f 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -205,9 +205,9 @@ qdel(src) /obj/machinery/door/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(exposed_temperature > T0C + (reinf ? 1600 : 800)) take_damage(round(exposed_volume / 200), BURN, 0, 0) - ..() /obj/machinery/door/window/attack_ai(mob/user) return attack_hand(user) diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index b949028c713..f1651d5bb99 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -52,6 +52,7 @@ FIRE ALARM playsound(loc, 'sound/effects/sparks4.ogg', 50, 1) /obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume) + ..() if(!emagged && detecting && temperature > T0C + 200) alarm() // added check of detector status here diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index fb780e5d550..33a2e2840ac 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -1015,13 +1015,16 @@ icon_deny = "med-deny" product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?;Ping!" req_access_txt = "5" - products = list(/obj/item/reagent_containers/glass/bottle/charcoal = 4,/obj/item/reagent_containers/glass/bottle/morphine = 4,/obj/item/reagent_containers/glass/bottle/ether = 4,/obj/item/reagent_containers/glass/bottle/epinephrine = 4, - /obj/item/reagent_containers/glass/bottle/toxin = 4,/obj/item/reagent_containers/syringe/antiviral = 6,/obj/item/reagent_containers/syringe/insulin = 4, - /obj/item/reagent_containers/syringe = 12,/obj/item/healthanalyzer = 5,/obj/item/healthupgrade = 5,/obj/item/reagent_containers/glass/beaker = 4, /obj/item/reagent_containers/hypospray/safety = 2, - /obj/item/reagent_containers/dropper = 2,/obj/item/stack/medical/bruise_pack/advanced = 3, /obj/item/stack/medical/ointment/advanced = 3, - /obj/item/stack/medical/bruise_pack = 3,/obj/item/stack/medical/splint = 4, /obj/item/sensor_device = 2, /obj/item/reagent_containers/hypospray/autoinjector = 4, - /obj/item/pinpointer/crew = 2) - contraband = list(/obj/item/reagent_containers/glass/bottle/pancuronium = 1,/obj/item/reagent_containers/glass/bottle/sulfonal = 1) + products = list(/obj/item/reagent_containers/syringe = 12, /obj/item/reagent_containers/food/pill/patch/styptic = 10, /obj/item/reagent_containers/food/pill/patch/silver_sulf = 10, + /obj/item/reagent_containers/glass/bottle/charcoal = 4, /obj/item/reagent_containers/glass/bottle/epinephrine = 4, /obj/item/reagent_containers/glass/bottle/diphenhydramine = 4, + /obj/item/reagent_containers/glass/bottle/salicylic = 4, /obj/item/reagent_containers/glass/bottle/potassium_iodide =3, /obj/item/reagent_containers/glass/bottle/saline = 5, + /obj/item/reagent_containers/glass/bottle/morphine = 4, /obj/item/reagent_containers/glass/bottle/ether = 4, /obj/item/reagent_containers/glass/bottle/atropine = 3, + /obj/item/reagent_containers/glass/bottle/oculine = 2, /obj/item/reagent_containers/glass/bottle/toxin = 4, /obj/item/reagent_containers/syringe/antiviral = 6, + /obj/item/reagent_containers/syringe/insulin = 6, /obj/item/reagent_containers/syringe/calomel = 10, /obj/item/reagent_containers/hypospray/autoinjector = 5, /obj/item/reagent_containers/food/pill/salbutamol = 10, + /obj/item/reagent_containers/food/pill/mannitol = 10, /obj/item/reagent_containers/food/pill/mutadone = 5, /obj/item/stack/medical/bruise_pack/advanced = 4, /obj/item/stack/medical/ointment/advanced = 4, /obj/item/stack/medical/bruise_pack = 4, + /obj/item/stack/medical/splint = 4, /obj/item/reagent_containers/glass/beaker = 4, /obj/item/reagent_containers/dropper = 4, /obj/item/healthanalyzer = 4, + /obj/item/healthupgrade = 4, /obj/item/reagent_containers/hypospray/safety = 2, /obj/item/sensor_device = 2, /obj/item/pinpointer/crew = 2) + contraband = list(/obj/item/reagent_containers/glass/bottle/sulfonal = 1, /obj/item/reagent_containers/glass/bottle/pancuronium = 1) armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0) //This one's from bay12 @@ -1041,7 +1044,7 @@ icon_deny = "wallmed-deny" req_access_txt = "5" density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude - products = list(/obj/item/stack/medical/bruise_pack = 2,/obj/item/stack/medical/ointment = 2,/obj/item/reagent_containers/hypospray/autoinjector = 4,/obj/item/healthanalyzer = 1) + products = list(/obj/item/stack/medical/bruise_pack = 2, /obj/item/stack/medical/ointment = 2, /obj/item/reagent_containers/hypospray/autoinjector = 4, /obj/item/healthanalyzer = 1) contraband = list(/obj/item/reagent_containers/syringe/charcoal = 4,/obj/item/reagent_containers/syringe/antiviral = 4,/obj/item/reagent_containers/food/pill/tox = 1) armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index e8e4ae6027b..6cfd1d63942 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -721,6 +721,7 @@ check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL, MECHA_INT_CONTROL_LOST, MECHA_INT_SHORT_CIRCUIT), 1) /obj/mecha/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(exposed_temperature > max_temperature) log_message("Exposed to dangerous temperature.", 1) take_damage(5, "fire") diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm index aef1999ff69..d601283a703 100644 --- a/code/game/objects/effects/decals/Cleanable/misc.dm +++ b/code/game/objects/effects/decals/Cleanable/misc.dm @@ -90,7 +90,8 @@ icon_state = "cobweb1" burntime = 1 -/obj/effect/decal/cleanable/cobweb/fire_act() +/obj/effect/decal/cleanable/cobweb/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + ..() qdel(src) /obj/effect/decal/cleanable/molten_object diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 130a50cac89..52ec24df16c 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -35,22 +35,9 @@ if(!reagents.total_volume && !noclear) //scooped up all of it qdel(src) return - if(is_hot(W)) //todo: make heating a reagent holder proc - if(istype(W, /obj/item/clothing/mask/cigarette)) - return - else - src.reagents.chem_temp += 15 - src.reagents.handle_reactions() - to_chat(user, "You heat [src] with [W]!") /obj/effect/decal/cleanable/ex_act() if(reagents) for(var/datum/reagent/R in reagents.reagent_list) R.on_ex_act() - ..() - -/obj/effect/decal/cleanable/fire_act() - if(reagents) - reagents.chem_temp += 30 - reagents.handle_reactions() - ..() + ..() \ No newline at end of file diff --git a/code/game/objects/effects/effect_system/effects_chem_smoke.dm b/code/game/objects/effects/effect_system/effects_chem_smoke.dm index d68692a03e6..f55a64aac8d 100644 --- a/code/game/objects/effects/effect_system/effects_chem_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_chem_smoke.dm @@ -7,6 +7,7 @@ icon_state = "smoke" density = FALSE opacity = FALSE + layer = ABOVE_MOB_LAYER animate_movement = NO_STEPS var/matrix/first = matrix() var/matrix/second = matrix() @@ -17,7 +18,7 @@ var/spread_amount = 96 /obj/effect/particle_effect/chem_smoke/New(location, chem_color) - ..() + ..(location) color = chem_color pixel_x += -16 + rand(-3, 3) pixel_y += -16 + rand(-3, 3) @@ -64,6 +65,7 @@ else location = get_turf(loca) carry.copy_to(chemholder, carry.total_volume) + carry.clear_reagents() if(!silent) var/contained = "" for(var/reagent in carry.reagent_list) @@ -104,7 +106,7 @@ new /obj/effect/particle_effect/chem_smoke(location, color) if(x % 10 == 0) //Once every 10 ticks. - SmokeEm(effect_range) + INVOKE_ASYNC(src, .proc/SmokeEm, effect_range) sleep(1) qdel(src) @@ -112,6 +114,8 @@ /datum/effect_system/smoke_spread/chem/proc/SmokeEm(effect_range = 2) for(var/atom/A in view(effect_range, get_turf(location))) + if(istype(A, /obj/effect/particle_effect)) // Don't impact particle effects, as there can be hundreds of them in a small area. Also, we don't want smoke particles adding themselves to this list. Major performance issue. + continue if(A in smoked_atoms) continue smoked_atoms += A diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm index e765e59442d..6d746377ec7 100644 --- a/code/game/objects/effects/effect_system/effects_foam.dm +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -84,7 +84,10 @@ // foam disolves when heated // except metal foams -/obj/effect/particle_effect/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) +/obj/effect/particle_effect/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) //Don't heat the reagents inside + return + +/obj/effect/particle_effect/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) // overriden to prevent weird behaviors with heating reagents inside if(!metal && prob(max(0, exposed_temperature - 475))) flick("[icon_state]-disolve", src) @@ -178,8 +181,9 @@ air_update_turf(1) /obj/structure/foamedmetal/Destroy() - air_update_turf(1) - return ..() + var/turf/T = get_turf(src) + . = ..() + T.air_update_turf(TRUE) /obj/structure/foamedmetal/Move() var/turf/T = loc diff --git a/code/game/objects/effects/effects.dm b/code/game/objects/effects/effects.dm index a08e7fac021..21b9759df62 100644 --- a/code/game/objects/effects/effects.dm +++ b/code/game/objects/effects/effects.dm @@ -12,8 +12,5 @@ /obj/effect/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) return -/obj/effect/fire_act() - return - /obj/effect/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) return FALSE \ No newline at end of file diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm index 4cf5e79cc77..464d5c277fd 100644 --- a/code/game/objects/effects/glowshroom.dm +++ b/code/game/objects/effects/glowshroom.dm @@ -180,6 +180,7 @@ qdel(src) /obj/structure/glowshroom/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(exposed_temperature > 300) endurance -= 5 CheckEndurance() diff --git a/code/game/objects/effects/snowcloud.dm b/code/game/objects/effects/snowcloud.dm index a67bbd3c5f7..08a64d62f17 100644 --- a/code/game/objects/effects/snowcloud.dm +++ b/code/game/objects/effects/snowcloud.dm @@ -113,7 +113,8 @@ else return ..() -/obj/effect/snow/fire_act() +/obj/effect/snow/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + ..() qdel(src) /obj/effect/snow/ex_act(severity) @@ -133,7 +134,8 @@ ..() qdel(src) -/obj/item/snowball/fire_act() +/obj/item/snowball/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + ..() qdel(src) /obj/item/snowball/ex_act(severity) diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 7ea087eb8cb..f0233bb0f9e 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -69,6 +69,7 @@ qdel(src) /obj/structure/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(exposed_temperature > 300) health -= 5 healthcheck() diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm index 8b9314e9a6f..880043c8be6 100644 --- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm +++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm @@ -211,3 +211,21 @@ pixel_x = rand(-4,4) pixel_y = rand(-4,4) animate(src, pixel_y = pixel_y + 32, alpha = 0, time = 25) + +/obj/effect/temp_visual/shockwave + name = "shockwave" + icon = 'icons/goonstation/effects/64x64.dmi' + icon_state = "shockwave" + randomdir = FALSE + pixel_y = -16 + pixel_x = -16 + duration = 20 + +/obj/effect/temp_visual/implosion + name = "implosion" + icon = 'icons/goonstation/effects/64x64.dmi' + icon_state = "implosion" + randomdir = FALSE + pixel_y = -16 + pixel_x = -16 + duration = 20 \ No newline at end of file diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 3d8548ad11c..4860733f4f7 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -16,6 +16,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d var/inhand_y_dimension = 32 can_be_hit = FALSE + suicidal_hands = TRUE var/r_speed = 1.0 var/health = null @@ -145,16 +146,6 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d /obj/item/blob_act() qdel(src) -//user: The mob that is suiciding -//damagetype: The type of damage the item will inflict on the user -//BRUTELOSS = 1 -//FIRELOSS = 2 -//TOXLOSS = 4 -//OXYLOSS = 8 -//Output a creative message and then return the damagetype done -/obj/item/proc/suicide_act(mob/user) - return - /obj/item/verb/move_to_top() set name = "Move To Top" set category = null @@ -258,7 +249,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d add_fingerprint(user) if(pickup(user)) // Pickup succeeded user.put_in_active_hand(src) - + return 1 /obj/item/attack_alien(mob/user as mob) diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index f4f527c1b7f..85780484264 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -51,7 +51,8 @@ light("[user] tilts [C] and lights [src] with it.") -/obj/item/candle/fire_act() +/obj/item/candle/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + ..() if(!lit) light() //honk diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index b4dd66e3be5..926da3d28cb 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -23,7 +23,7 @@ /obj/item/toy/crayon/suicide_act(mob/user) user.visible_message("[user] is jamming the [name] up [user.p_their()] nose and into [user.p_their()] brain. It looks like [user.p_theyre()] trying to commit suicide.") - return (BRUTELOSS|OXYLOSS) + return BRUTELOSS|OXYLOSS /obj/item/toy/crayon/New() ..() diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index c8473f1dfc8..24c8cbcd3b7 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -187,7 +187,7 @@ /obj/item/flashlight/flare/Destroy() processing_objects.Remove(src) - ..() + return ..() /obj/item/flashlight/flare/proc/turn_off() on = 0 diff --git a/code/game/objects/items/devices/handheld_defib.dm b/code/game/objects/items/devices/handheld_defib.dm new file mode 100644 index 00000000000..199aaf43737 --- /dev/null +++ b/code/game/objects/items/devices/handheld_defib.dm @@ -0,0 +1,91 @@ +/obj/item/handheld_defibrillator + name = "handheld defibrillator" + desc = "Used to restart stopped hearts." + icon = 'icons/goonstation/objects/objects.dmi' + lefthand_file = 'icons/goonstation/mob/inhands/items_lefthand.dmi' + righthand_file = 'icons/goonstation/mob/inhands/items_righthand.dmi' + icon_state = "defib-on" + item_state = "defib" + + var/icon_base = "defib" + var/cooldown = FALSE + var/charge_time = 100 + var/emagged = FALSE + +/obj/item/handheld_defibrillator/emag_act(mob/user) + if(!emagged) + emagged = TRUE + desc += " The screen only shows the word KILL flashing over and over." + if(user) + to_chat(user, "you short out the safeties on [src]") + else + emagged = FALSE + desc = "Used to restart stopped hearts." + if(user) + to_chat(user, "You restore the safeties on [src]") + +/obj/item/handheld_defibrillator/emp_act(severity) + if(emagged) + emagged = FALSE + desc = "Used to restart stopped hearts." + visible_message("[src] beeps: Safety protocols enabled!") + playsound(get_turf(src), 'sound/machines/defib_saftyon.ogg', 50, 0) + else + emagged = TRUE + desc += " The screen only shows the word KILL flashing over and over." + visible_message("[src] beeps: Safety protocols disabled!") + playsound(get_turf(src), 'sound/machines/defib_saftyoff.ogg', 50, 0) + +/obj/item/handheld_defibrillator/attack(mob/living/carbon/human/H, mob/user) + if(!istype(H)) + return ..() + + if(cooldown) + to_chat(user, "[src] is still charging!") + return + + if(emagged || (H.health <= HEALTH_THRESHOLD_CRIT) || (H.undergoing_cardiac_arrest())) + user.visible_message("[user] shocks [H] with [src].", "You shock [H] with [src].") + add_attack_logs(user, H, "defibrillated with [src]") + playsound(user.loc, "sound/weapons/Egloves.ogg", 75, 1) + + if(H.stat == DEAD) + to_chat(user, "[H] doesn't respond at all!") + else + H.set_heartattack(FALSE) + var/total_damage = H.getBruteLoss() + H.getFireLoss() + H.getToxLoss() + if(H.health <= HEALTH_THRESHOLD_CRIT) + if(total_damage >= 90) + to_chat(user, "[H] looks horribly injured. Resuscitation alone may not help revive them.") + if(prob(66)) + to_chat(user, "[H] inhales deeply!") + H.adjustOxyLoss(-50) + else + to_chat(user, "[H] doesn't respond!") + + H.AdjustParalysis(3) + H.AdjustStunned(5) + H.AdjustWeakened(5) + H.AdjustStuttering(10) + to_chat(H, "You feel a powerful jolt!") + H.shock_internal_organs(100) + + if(emagged && prob(10)) + to_chat(user, "[src]'s on board scanner indicates that the target is undergoing a cardiac arrest!") + H.set_heartattack(TRUE) + + cooldown = TRUE + icon_state = "[icon_base]-shock" + addtimer(CALLBACK(src, .proc/short_charge), 10) + addtimer(CALLBACK(src, .proc/recharge), charge_time) + + else + to_chat(user, "[src]'s on board medical scanner indicates that no shock is required.") + +/obj/item/handheld_defibrillator/proc/short_charge() + icon_state = "[icon_base]-off" + +/obj/item/handheld_defibrillator/proc/recharge() + cooldown = FALSE + icon_state = "[icon_base]-on" + playsound(loc, "sound/weapons/flash.ogg", 75, 1) \ No newline at end of file diff --git a/code/game/objects/items/devices/instruments.dm b/code/game/objects/items/devices/instruments.dm index 840d5e64395..6d3a1c2b49d 100644 --- a/code/game/objects/items/devices/instruments.dm +++ b/code/game/objects/items/devices/instruments.dm @@ -19,7 +19,7 @@ /obj/item/instrument/suicide_act(mob/user) user.visible_message("[user] begins to play 'Gloomy Sunday'! It looks like [user.p_theyre()] trying to commit suicide!") - return (BRUTELOSS) + return BRUTELOSS /obj/item/instrument/Initialize(mapload) song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 8ad7fae6d2d..4a20a52fa04 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -125,8 +125,8 @@ REAGENT SCANNER var/mode = 1; -/obj/item/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob) - if(( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) +/obj/item/healthanalyzer/attack(mob/living/M, mob/living/user) + if(((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) to_chat(user, text("You try to analyze the floor's vitals!")) for(var/mob/O in viewers(M, null)) O.show_message(text("[user] has analyzed the floor's vitals!"), 1) @@ -137,7 +137,7 @@ REAGENT SCANNER return user.visible_message("[user] has analyzed [M]'s vitals."," You have analyzed [M]'s vitals.") - if(!istype(M,/mob/living/carbon/human) || M.isSynthetic()) + if(!ishuman(M) || M.isSynthetic()) //these sensors are designed for organic life user.show_message("Analyzing Results for ERROR:\n\t Overall Status: ERROR") user.show_message("\t Key: Suffocation/Toxin/Burns/Brute", 1) @@ -147,122 +147,132 @@ REAGENT SCANNER user.show_message("Subject's pulse: -- bpm.") return - var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss()))) - var/OX = M.getOxyLoss() > 50 ? "[M.getOxyLoss()]" : M.getOxyLoss() - var/TX = M.getToxLoss() > 50 ? "[M.getToxLoss()]" : M.getToxLoss() - var/BU = M.getFireLoss() > 50 ? "[M.getFireLoss()]" : M.getFireLoss() - var/BR = M.getBruteLoss() > 50 ? "[M.getBruteLoss()]" : M.getBruteLoss() - if(M.status_flags & FAKEDEATH) + var/mob/living/carbon/human/H = M + var/fake_oxy = max(rand(1,40), H.getOxyLoss(), (300 - (H.getToxLoss() + H.getFireLoss() + H.getBruteLoss()))) + var/OX = H.getOxyLoss() > 50 ? "[H.getOxyLoss()]" : H.getOxyLoss() + var/TX = H.getToxLoss() > 50 ? "[H.getToxLoss()]" : H.getToxLoss() + var/BU = H.getFireLoss() > 50 ? "[H.getFireLoss()]" : H.getFireLoss() + var/BR = H.getBruteLoss() > 50 ? "[H.getBruteLoss()]" : H.getBruteLoss() + if(H.status_flags & FAKEDEATH) OX = fake_oxy > 50 ? "[fake_oxy]" : fake_oxy - user.show_message("Analyzing Results for [M]:\n\t Overall Status: dead") + user.show_message("Analyzing Results for [H]:\n\t Overall Status: dead") else - user.show_message("Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "dead" : "[M.health]% healthy"]") + user.show_message("Analyzing Results for [H]:\n\t Overall Status: [H.stat > 1 ? "dead" : "[H.health]% healthy"]") user.show_message("\t Key: Suffocation/Toxin/Burns/Brute", 1) user.show_message("\t Damage Specifics: [OX] - [TX] - [BU] - [BR]") - user.show_message("Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1) - if(M.timeofdeath && (M.stat == DEAD || (M.status_flags & FAKEDEATH))) - user.show_message("Time of Death: [station_time_timestamp("hh:mm:ss", M.timeofdeath)]") - var/tdelta = round(world.time - M.timeofdeath) + user.show_message("Body Temperature: [H.bodytemperature-T0C]°C ([H.bodytemperature*1.8-459.67]°F)", 1) + if(H.timeofdeath && (H.stat == DEAD || (H.status_flags & FAKEDEATH))) + user.show_message("Time of Death: [station_time_timestamp("hh:mm:ss", H.timeofdeath)]") + var/tdelta = round(world.time - H.timeofdeath) if(tdelta < (DEFIB_TIME_LIMIT * 10)) user.show_message("Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!") - if(istype(M, /mob/living/carbon/human) && mode == 1) - var/mob/living/carbon/human/H = M + if(mode == 1) var/list/damaged = H.get_damaged_organs(1,1) user.show_message("Localized Damage, Brute/Burn:",1) if(length(damaged) > 0) for(var/obj/item/organ/external/org in damaged) user.show_message("\t\t[capitalize(org.name)]: [(org.brute_dam > 0) ? "[org.brute_dam]" : "0"]-[(org.burn_dam > 0) ? "[org.burn_dam]" : "0"]") - OX = M.getOxyLoss() > 50 ? "Severe oxygen deprivation detected" : "Subject bloodstream oxygen level normal" - TX = M.getToxLoss() > 50 ? "Dangerous amount of toxins detected" : "Subject bloodstream toxin level minimal" - BU = M.getFireLoss() > 50 ? "Severe burn damage detected" : "Subject burn injury status O.K" - BR = M.getBruteLoss() > 50 ? "Severe anatomical damage detected" : "Subject brute-force injury status O.K" - if(M.status_flags & FAKEDEATH) + OX = H.getOxyLoss() > 50 ? "Severe oxygen deprivation detected" : "Subject bloodstream oxygen level normal" + TX = H.getToxLoss() > 50 ? "Dangerous amount of toxins detected" : "Subject bloodstream toxin level minimal" + BU = H.getFireLoss() > 50 ? "Severe burn damage detected" : "Subject burn injury status O.K" + BR = H.getBruteLoss() > 50 ? "Severe anatomical damage detected" : "Subject brute-force injury status O.K" + if(H.status_flags & FAKEDEATH) OX = fake_oxy > 50 ? "Severe oxygen deprivation detected" : "Subject bloodstream oxygen level normal" user.show_message("[OX] | [TX] | [BU] | [BR]") - if(istype(M, /mob/living/carbon)) - if(upgraded) - chemscan(user, M) - for(var/thing in M.viruses) - var/datum/disease/D = thing - if(!(D.visibility_flags & HIDDEN_SCANNER)) - user.show_message("Warning: [D.form] detected\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]") - if(M.getStaminaLoss()) + + if(upgraded) + chemscan(user, H) + for(var/thing in H.viruses) + var/datum/disease/D = thing + if(!(D.visibility_flags & HIDDEN_SCANNER)) + user.show_message("Warning: [D.form] detected\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]") + if(H.undergoing_cardiac_arrest()) + var/obj/item/organ/internal/heart/heart = H.get_int_organ(/obj/item/organ/internal/heart) + if(heart && !(heart.status & ORGAN_DEAD)) + user.show_message("Warning: Medical Emergency detected\nName: Cardiac Arrest.\nType: The patient's heart has stopped.\nStage: 1/1.\nPossible Cure: Electric Shock") + else if(heart && (heart.status & ORGAN_DEAD)) + user.show_message("Subject's heart is necrotic.") + else if(!heart) + user.show_message("Subject has no heart.") + + if(H.getStaminaLoss()) user.show_message("Subject appears to be suffering from fatigue.") - if(M.getCloneLoss()) - user.show_message("Subject appears to have [M.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.") - if(M.has_brain_worms()) + if(H.getCloneLoss()) + user.show_message("Subject appears to have [H.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.") + if(H.has_brain_worms()) user.show_message("Subject suffering from aberrant brain activity. Recommend further scanning.") - else if(M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && !M.get_int_organ(/obj/item/organ/internal/brain)) - user.show_message("Subject is brain dead.") - else if(M.getBrainLoss() >= 60) - user.show_message("Severe brain damage detected. Subject likely to have mental retardation.") - else if(M.getBrainLoss() >= 10) - user.show_message("Significant brain damage detected. Subject may have had a concussion.") - if(ishuman(M)) - var/mob/living/carbon/human/H = M - for(var/name in H.bodyparts_by_name) - var/obj/item/organ/external/e = H.bodyparts_by_name[name] - if(!e) - continue - var/limb = e.name - if(e.status & ORGAN_BROKEN) - if((e.limb_name in list("l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot")) && !(e.status & ORGAN_SPLINTED)) - user.show_message("Unsecured fracture in subject [limb]. Splinting recommended for transport.") - if(e.has_infected_wound()) - user.show_message("Infected wound detected in subject [limb]. Disinfection recommended.") - for(var/name in H.bodyparts_by_name) - var/obj/item/organ/external/e = H.bodyparts_by_name[name] - if(!e) - continue - if(e.status & ORGAN_BROKEN) - user.show_message(text("Bone fractures detected. Advanced scanner required for location."), 1) - break - for(var/obj/item/organ/external/e in H.bodyparts) - if(e.internal_bleeding) - user.show_message(text("Internal bleeding detected. Advanced scanner required for location."), 1) - break - var/blood_id = H.get_blood_id() - if(blood_id) - if(H.bleed_rate) - user.show_message("Subject is bleeding!") - var/blood_percent = round((H.blood_volume / BLOOD_VOLUME_NORMAL)*100) - var/blood_type = H.b_type - if(blood_id != "blood")//special blood substance - var/datum/reagent/R = GLOB.chemical_reagents_list[blood_id] - if(R) - blood_type = R.name - else - blood_type = blood_id - if(H.blood_volume <= BLOOD_VOLUME_SAFE && H.blood_volume > BLOOD_VOLUME_OKAY) - user.show_message("LOW blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]") - else if(H.blood_volume <= BLOOD_VOLUME_OKAY) - user.show_message("CRITICAL blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]") + if(H.get_int_organ(/obj/item/organ/internal/brain)) + if(H.getBrainLoss() >= 100) + user.show_message("Subject is brain dead.") + else if(H.getBrainLoss() >= 60) + user.show_message("Severe brain damage detected. Subject likely to have mental retardation.") + else if(H.getBrainLoss() >= 10) + user.show_message("Significant brain damage detected. Subject may have had a concussion.") + else + user.show_message("Subject has no brain.") + + for(var/name in H.bodyparts_by_name) + var/obj/item/organ/external/e = H.bodyparts_by_name[name] + if(!e) + continue + var/limb = e.name + if(e.status & ORGAN_BROKEN) + if((e.limb_name in list("l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot")) && !(e.status & ORGAN_SPLINTED)) + user.show_message("Unsecured fracture in subject [limb]. Splinting recommended for transport.") + if(e.has_infected_wound()) + user.show_message("Infected wound detected in subject [limb]. Disinfection recommended.") + + for(var/name in H.bodyparts_by_name) + var/obj/item/organ/external/e = H.bodyparts_by_name[name] + if(!e) + continue + if(e.status & ORGAN_BROKEN) + user.show_message(text("Bone fractures detected. Advanced scanner required for location."), 1) + break + for(var/obj/item/organ/external/e in H.bodyparts) + if(e.internal_bleeding) + user.show_message(text("Internal bleeding detected. Advanced scanner required for location."), 1) + break + var/blood_id = H.get_blood_id() + if(blood_id) + if(H.bleed_rate) + user.show_message("Subject is bleeding!") + var/blood_percent = round((H.blood_volume / BLOOD_VOLUME_NORMAL)*100) + var/blood_type = H.b_type + if(blood_id != "blood")//special blood substance + var/datum/reagent/R = GLOB.chemical_reagents_list[blood_id] + if(R) + blood_type = R.name else - user.show_message("Blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]") - - if(H.undergoing_cardiac_arrest() && H.stat != DEAD) - user.show_message("Subject suffering from heart attack: Apply defibrillator immediately.") - user.show_message("Subject's pulse: [H.get_pulse(GETPULSE_TOOL)] bpm.") - var/implant_detect - for(var/obj/item/organ/internal/cyberimp/CI in H.internal_organs) - if(CI.is_robotic()) - implant_detect += "[H.name] is modified with a [CI.name].
" - if(implant_detect) - user.show_message("Detected cybernetic modifications:") - user.show_message("[implant_detect]") - if(H.gene_stability < 40) - user.show_message("Subject's genes are quickly breaking down!") - else if(H.gene_stability < 70) - user.show_message("Subject's genes are showing signs of spontaneous breakdown.") - else if(H.gene_stability < 85) - user.show_message("Subject's genes are showing minor signs of instability.") + blood_type = blood_id + if(H.blood_volume <= BLOOD_VOLUME_SAFE && H.blood_volume > BLOOD_VOLUME_OKAY) + user.show_message("LOW blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]") + else if(H.blood_volume <= BLOOD_VOLUME_OKAY) + user.show_message("CRITICAL blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]") else - user.show_message("Subject's genes are stable.") - src.add_fingerprint(user) - return + user.show_message("Blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]") + + user.show_message("Subject's pulse: [H.get_pulse(GETPULSE_TOOL)] bpm.") + var/implant_detect + for(var/obj/item/organ/internal/cyberimp/CI in H.internal_organs) + if(CI.is_robotic()) + implant_detect += "[H.name] is modified with a [CI.name].
" + if(implant_detect) + user.show_message("Detected cybernetic modifications:") + user.show_message("[implant_detect]") + if(H.gene_stability < 40) + user.show_message("Subject's genes are quickly breaking down!") + else if(H.gene_stability < 70) + user.show_message("Subject's genes are showing signs of spontaneous breakdown.") + else if(H.gene_stability < 85) + user.show_message("Subject's genes are showing minor signs of instability.") + else + user.show_message("Subject's genes are stable.") + add_fingerprint(user) + /obj/item/healthanalyzer/verb/toggle_mode() set name = "Switch Verbosity" @@ -275,19 +285,21 @@ REAGENT SCANNER if(0) to_chat(usr, "The scanner no longer shows limb damage.") -/obj/item/healthanalyzer/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/healthupgrade)) +/obj/item/healthanalyzer/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/healthupgrade)) if(upgraded) to_chat(user, "You have already installed an upgraded in the [src].") else to_chat(user, "You install the upgrade in the [src].") overlays += "advanced" - playsound(loc, W.usesound, 50, 1) - upgraded = 1 - qdel(W) + playsound(loc, I.usesound, 50, 1) + upgraded = TRUE + qdel(I) + return + return ..() /obj/item/healthanalyzer/advanced - upgraded = 1 + upgraded = TRUE /obj/item/healthanalyzer/advanced/New() overlays += "advanced" @@ -834,4 +846,4 @@ REAGENT SCANNER if(target.disabilities & NEARSIGHTED) dat += "Retinal misalignment detected.
" - return dat + return dat \ No newline at end of file diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 4eaf0e79dce..d3d0a2fe6bb 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -47,7 +47,7 @@ update_icon() -/obj/item/taperecorder/fire_act() +/obj/item/taperecorder/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) mytape.ruin() //Fires destroy the tape return ..() @@ -262,7 +262,8 @@ var/list/timestamp = list() var/ruined = 0 -/obj/item/tape/fire_act() +/obj/item/tape/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + ..() ruin() /obj/item/tape/attack_self(mob/user) diff --git a/code/game/objects/items/flag.dm b/code/game/objects/items/flag.dm index 4f8abd4ac49..3ba466b7eec 100644 --- a/code/game/objects/items/flag.dm +++ b/code/game/objects/items/flag.dm @@ -21,7 +21,7 @@ user.visible_message("[user] [rolled ? "rolls up" : "unfurls"] [src].", "You [rolled ? "roll up" : "unfurl"] [src].", "You hear fabric rustling.") update_icon() -/obj/item/flag/fire_act(global_overlay = FALSE) +/obj/item/flag/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = FALSE) ..() update_icon() diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm index d7585608ec7..771ccce0f6b 100644 --- a/code/game/objects/items/latexballoon.dm +++ b/code/game/objects/items/latexballoon.dm @@ -50,9 +50,9 @@ burst() /obj/item/latexballon/temperature_expose(datum/gas_mixture/air, temperature, volume) + ..() if(temperature > T0C+100) burst() - return /obj/item/latexballon/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/tank)) diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 5a8355d1b41..72c0bef16ff 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -184,7 +184,8 @@ var/global/list/datum/stack_recipe/snow_recipes = list( else return ..() -/obj/item/stack/sheet/mineral/plasma/fire_act() +/obj/item/stack/sheet/mineral/plasma/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + ..() atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, amount*10) qdel(src) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index b4405a9fbe5..7607ca52319 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -231,7 +231,7 @@ /obj/item/toy/katana/suicide_act(mob/user) var/dmsg = pick("[user] tries to stab \the [src] into [user.p_their()] abdomen, but it shatters! [user.p_they(TRUE)] look[user.p_s()] as if [user.p_they()] might die from the shame.","[user] tries to stab \the [src] into [user.p_their()] abdomen, but \the [src] bends and breaks in half! [user.p_they(TRUE)] look[user.p_s()] as if [user.p_they()] might die from the shame.","[user] tries to slice [user.p_their()] own throat, but the plastic blade has no sharpness, causing [user.p_them()] to lose [user.p_their()] balance, slip over, and break [user.p_their()] neck with a loud snap!") user.visible_message("[dmsg] It looks like [user.p_theyre()] trying to commit suicide.") - return (BRUTELOSS) + return BRUTELOSS /* @@ -275,7 +275,8 @@ playsound(src, 'sound/effects/snap.ogg', 50, 1) qdel(src) -/obj/item/toy/snappop/fire_act() +/obj/item/toy/snappop/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + ..() pop_burst() /obj/item/toy/snappop/throw_impact(atom/hit_atom) @@ -1186,7 +1187,7 @@ obj/item/toy/cards/deck/syndicate/black if(!cooldown) //for the sanity of everyone var/message = pick("You won't get away this time, Griffin!", "Stop right there, criminal!", "Hoot! Hoot!", "I am the night!") to_chat(user, "You pull the string on the [src].") - playsound(user, 'sound/misc/hoot.ogg', 25, 1) + playsound(user, 'sound/creatures/hoot.ogg', 25, 1) visible_message("[bicon(src)] [message]") cooldown = 1 spawn(30) cooldown = 0 @@ -1205,7 +1206,7 @@ obj/item/toy/cards/deck/syndicate/black if(!cooldown) //for the sanity of everyone var/message = pick("You can't stop me, Owl!", "My plan is flawless! The vault is mine!", "Caaaawwww!", "You will never catch me!") to_chat(user, "You pull the string on the [src].") - playsound(user, 'sound/misc/caw.ogg', 25, 1) + playsound(user, 'sound/creatures/caw.ogg', 25, 1) visible_message("[bicon(src)] [message]") cooldown = 1 spawn(30) cooldown = 0 @@ -1376,7 +1377,7 @@ obj/item/toy/cards/deck/syndicate/black /obj/item/toy/russian_revolver/suicide_act(mob/user) user.visible_message("[user] quickly loads six bullets into [src]'s cylinder and points it at [user.p_their()] head before pulling the trigger! It looks like [user.p_theyre()] trying to commit suicide.") playsound(loc, 'sound/weapons/gunshots/gunshot_strong.ogg', 50, 1) - return (BRUTELOSS) + return BRUTELOSS /obj/item/toy/russian_revolver/New() spin_cylinder() @@ -1689,5 +1690,5 @@ obj/item/toy/cards/deck/syndicate/black /obj/item/restraints/handcuffs/toy desc = "Toy handcuffs. Plastic and extremely cheaply made." throwforce = 0 - breakouttime = 0 + breakouttime = 0 ignoresClumsy = TRUE \ No newline at end of file diff --git a/code/game/objects/items/weapons/cigs.dm b/code/game/objects/items/weapons/cigs.dm index bfe91b5a81b..1378b5c004d 100644 --- a/code/game/objects/items/weapons/cigs.dm +++ b/code/game/objects/items/weapons/cigs.dm @@ -61,7 +61,8 @@ LIGHTERS ARE IN LIGHTERS.DM return ..() -/obj/item/clothing/mask/cigarette/fire_act() +/obj/item/clothing/mask/cigarette/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + ..() light() /obj/item/clothing/mask/cigarette/attackby(obj/item/W as obj, mob/user as mob, params) diff --git a/code/game/objects/items/weapons/courtroom.dm b/code/game/objects/items/weapons/courtroom.dm index d25b6f54d29..72bb3fceb11 100644 --- a/code/game/objects/items/weapons/courtroom.dm +++ b/code/game/objects/items/weapons/courtroom.dm @@ -16,7 +16,7 @@ /obj/item/gavelhammer/suicide_act(mob/user) user.visible_message("[user] has sentenced [user.p_them()]self to death with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") playsound(loc, 'sound/items/gavel.ogg', 50, 1, -1) - return (BRUTELOSS) + return BRUTELOSS /obj/item/gavelblock name = "gavel block" diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 758e30947b0..ea70e29ef83 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -283,7 +283,7 @@ user.visible_message("[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide.") defib.deductcharge(revivecost) playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1) - return (OXYLOSS) + return OXYLOSS /obj/item/twohanded/shockpaddles/dropped(mob/user as mob) if(user) @@ -313,7 +313,7 @@ /obj/item/twohanded/shockpaddles/attack(mob/M, mob/user) var/tobehealed - var/threshold = -config.health_threshold_dead + var/threshold = -HEALTH_THRESHOLD_DEAD var/mob/living/carbon/human/H = M if(busy) @@ -472,7 +472,7 @@ /obj/item/borg_defib/attack(mob/M, mob/user) var/tobehealed - var/threshold = -config.health_threshold_dead + var/threshold = -HEALTH_THRESHOLD_DEAD var/mob/living/carbon/human/H = M if(busy) diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm index d93ebcf3214..666c14801d8 100644 --- a/code/game/objects/items/weapons/dice.dm +++ b/code/game/objects/items/weapons/dice.dm @@ -3,6 +3,7 @@ desc = "Contains all the luck you'll ever need." icon = 'icons/obj/dice.dmi' icon_state = "dicebag" + can_hold = list(/obj/item/dice) /obj/item/storage/pill_bottle/dice/New() ..() diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index be490d29065..d17287b01a6 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -116,6 +116,7 @@ sleep(10) prime() user.gib() + return OBLITERATION /obj/item/grenade/plastic/update_icon() if(nadeassembly) diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm index 03125313656..dd65df1ea3f 100644 --- a/code/game/objects/items/weapons/garrote.dm +++ b/code/game/objects/items/weapons/garrote.dm @@ -168,4 +168,4 @@ /obj/item/twohanded/garrote/suicide_act(mob/user) user.visible_message("[user] is wrapping the [src] around [user.p_their()] neck and pulling the handles! It looks like [user.p_theyre()] trying to commit suicide.") playsound(src.loc, 'sound/weapons/cablecuff.ogg', 15, 1, -1) - return (OXYLOSS) + return OXYLOSS diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 7c26e5c405e..6fa0c875333 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -26,11 +26,15 @@ if((CLUMSY in user.mutations) && prob(50) && (!ignoresClumsy)) to_chat(user, "Uh... how do those things work?!") - apply_cuffs(user,user) - + apply_cuffs(user, user) + return + + cuff(C, user) + +/obj/item/restraints/handcuffs/proc/cuff(mob/living/carbon/C, mob/user, remove_src = TRUE) if(ishuman(C)) var/mob/living/carbon/human/H = C - if(!H.has_left_hand() || !H.has_right_hand()) + if(!(H.has_left_hand() || H.has_right_hand())) to_chat(user, "How do you suggest handcuffing someone with no hands?") return @@ -40,26 +44,31 @@ playsound(loc, cuffsound, 30, 1, -2) if(do_mob(user, C, 30)) - apply_cuffs(C,user) + apply_cuffs(C, user, remove_src) to_chat(user, "You handcuff [C].") if(istype(src, /obj/item/restraints/handcuffs/cable)) - feedback_add_details("handcuffs","C") + feedback_add_details("handcuffs", "C") else - feedback_add_details("handcuffs","H") + feedback_add_details("handcuffs", "H") add_attack_logs(user, C, "Handcuffed ([src])") else to_chat(user, "You fail to handcuff [C].") -/obj/item/restraints/handcuffs/proc/apply_cuffs(mob/living/carbon/target, mob/user) +/obj/item/restraints/handcuffs/proc/apply_cuffs(mob/living/carbon/target, mob/user, remove_src = TRUE) if(!target.handcuffed) - user.drop_item() + if(remove_src) + user.drop_item() if(trashtype) target.handcuffed = new trashtype(target) - qdel(src) + if(remove_src) + qdel(src) else - loc = target - target.handcuffed = src + if(remove_src) + loc = target + target.handcuffed = src + else + target.handcuffed = new type(loc) target.update_handcuffed() return @@ -170,23 +179,7 @@ /obj/item/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user) if(isrobot(user)) - if(ishuman(C)) - var/mob/living/carbon/human/H = C - if(!(H.get_organ("l_hand") || H.get_organ("r_hand"))) - to_chat(user, "How do you suggest handcuffing someone with no hands?") - return - if(!C.handcuffed) - playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) - C.visible_message("[user] is trying to put zipties on [C]!", \ - "[user] is trying to put zipties on [C]!") - if(do_mob(user, C, 30)) - if(!C.handcuffed) - C.handcuffed = new /obj/item/restraints/handcuffs/cable/zipties/used(C) - C.update_handcuffed() - to_chat(user, "You handcuff [C].") - add_attack_logs(user, C, "Handcuffed (ziptie-cuffed)") - else - to_chat(user, "You fail to handcuff [C].") + cuff(C, user, FALSE) /obj/item/restraints/handcuffs/cable/zipties/used desc = "A pair of broken zipties." diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm index 73ff4e5064d..9e471583d3b 100644 --- a/code/game/objects/items/weapons/holy_weapons.dm +++ b/code/game/objects/items/weapons/holy_weapons.dm @@ -15,7 +15,7 @@ /obj/item/nullrod/suicide_act(mob/user) user.visible_message("[user] is killing [user.p_them()]self with \the [src.name]! It looks like [user.p_theyre()] trying to get closer to god!") - return (BRUTELOSS|FIRELOSS) + return BRUTELOSS|FIRELOSS /obj/item/nullrod/attack(mob/M, mob/living/carbon/user) ..() diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index a0810a0b96c..982959dd8f9 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -121,7 +121,7 @@ user.visible_message(pick("[user] is slitting [user.p_their()] wrists with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.", \ "[user] is slitting [user.p_their()] throat with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.", \ "[user] is slitting [user.p_their()] stomach open with the [name]! It looks like [user.p_theyre()] trying to commit seppuku.")) - return (BRUTELOSS) + return BRUTELOSS /obj/item/kitchen/knife/plastic name = "plastic knife" diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm index 3391687f20a..297966525f0 100644 --- a/code/game/objects/items/weapons/legcuffs.dm +++ b/code/game/objects/items/weapons/legcuffs.dm @@ -35,7 +35,7 @@ /obj/item/restraints/legcuffs/beartrap/suicide_act(mob/user) user.visible_message("[user] is sticking [user.p_their()] head in the [name]! It looks like [user.p_theyre()] trying to commit suicide.") playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) - return (BRUTELOSS) + return BRUTELOSS /obj/item/restraints/legcuffs/beartrap/attack_self(mob/user) ..() diff --git a/code/game/objects/items/weapons/lighters.dm b/code/game/objects/items/weapons/lighters.dm index 0b348510b8e..a2d8b03da84 100644 --- a/code/game/objects/items/weapons/lighters.dm +++ b/code/game/objects/items/weapons/lighters.dm @@ -166,7 +166,8 @@ location.hotspot_expose(700, 5) return -/obj/item/match/fire_act() +/obj/item/match/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + ..() matchignite() /obj/item/match/proc/matchignite() diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 8ad283a77da..0d85245d58f 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -16,7 +16,7 @@ /obj/item/melee/energy/suicide_act(mob/user) user.visible_message(pick("[user] is slitting [user.p_their()] stomach open with the [name]! It looks like [user.p_theyre()] trying to commit seppuku.", \ "[user] is falling on the [name]! It looks like [user.p_theyre()] trying to commit suicide.")) - return (BRUTELOSS|FIRELOSS) + return BRUTELOSS|FIRELOSS /obj/item/melee/energy/attack_self(mob/living/carbon/user) if(user.disabilities & CLUMSY && prob(50)) @@ -81,7 +81,7 @@ /obj/item/melee/energy/axe/suicide_act(mob/user) user.visible_message("[user] swings the [name] towards [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide.") - return (BRUTELOSS|FIRELOSS) + return BRUTELOSS|FIRELOSS /obj/item/melee/energy/sword name = "energy sword" diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index a19df11e790..381f19dc4cf 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -17,8 +17,8 @@ /obj/item/melee/chainofcommand/suicide_act(mob/user) - to_chat(viewers(user), "[user] is strangling [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") - return (OXYLOSS) + to_chat(viewers(user), "[user] is strangling [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") + return OXYLOSS /obj/item/melee/rapier name = "captain's rapier" diff --git a/code/game/objects/items/weapons/shards.dm b/code/game/objects/items/weapons/shards.dm index 88de9de1b11..428bfcd8fab 100644 --- a/code/game/objects/items/weapons/shards.dm +++ b/code/game/objects/items/weapons/shards.dm @@ -18,7 +18,7 @@ /obj/item/shard/suicide_act(mob/user) to_chat(viewers(user), pick("[user] is slitting [user.p_their()] wrists with [src]! It looks like [user.p_theyre()] trying to commit suicide.", "[user] is slitting [user.p_their()] throat with [src]! It looks like [user.p_theyre()] trying to commit suicide.")) - return (BRUTELOSS) + return BRUTELOSS /obj/item/shard/New() ..() diff --git a/code/game/objects/items/weapons/storage/artistic_toolbox.dm b/code/game/objects/items/weapons/storage/artistic_toolbox.dm index 4293c0a6167..0d8613cce4a 100644 --- a/code/game/objects/items/weapons/storage/artistic_toolbox.dm +++ b/code/game/objects/items/weapons/storage/artistic_toolbox.dm @@ -176,10 +176,6 @@ affected_mob.SetSleeping(0) affected_mob.SetSlowed(0) affected_mob.SetConfused(0) - if(ishuman(affected_mob)) - var/mob/living/carbon/human/H = affected_mob - if(H.traumatic_shock < 100) - H.shock_stage = 0 stage = 1 switch(progenitor.hunger) if(10 to 60) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 2d06c0fde80..8df4b17251d 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -367,7 +367,6 @@ new /obj/item/FixOVein(src) new /obj/item/clothing/suit/straight_jacket(src) new /obj/item/clothing/mask/muzzle(src) - new /obj/item/mmi/syndie(src) /obj/item/storage/backpack/duffel/syndie/surgery_fake //for maint spawns name = "surgery duffelbag" diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 2fd7d774113..03cf28b25ed 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -42,7 +42,7 @@ /obj/item/storage/bag/trash/suicide_act(mob/user) user.visible_message("[user] puts the [name] over [user.p_their()] head and starts chomping at the insides! Disgusting!") playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1) - return (TOXLOSS) + return TOXLOSS /obj/item/storage/bag/trash/update_icon() if(contents.len == 0) diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index c52d4db7e5b..abf68deb765 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -112,6 +112,7 @@ icon_state = "medicalbelt" item_state = "medical" use_item_overlays = 1 + max_w_class = WEIGHT_CLASS_NORMAL can_hold = list( /obj/item/healthanalyzer, /obj/item/dnainjector, @@ -133,6 +134,7 @@ /obj/item/rad_laser, /obj/item/sensor_device, /obj/item/wrench/medical, + /obj/item/handheld_defibrillator ) /obj/item/storage/belt/medical/surgery diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index 16ecd7cc72c..dfa1bf97358 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -9,9 +9,10 @@ var/mob/affecting = null var/deity_name = "Christ" - suicide_act(mob/user) - to_chat(viewers(user), "[user] stares into [src.name] and attempts to trascend understanding of the universe!") - return (user.dust()) +/obj/item/storage/bible/suicide_act(mob/user) + to_chat(viewers(user), "[user] stares into [src.name] and attempts to transcend understanding of the universe!") + user.dust() + return OBLITERATION /obj/item/storage/bible/booze diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 5a5d1c5ba63..afe4bc1ce13 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -773,6 +773,20 @@ new /obj/item/storage/pill_bottle( src ) new /obj/item/storage/pill_bottle( src ) +/obj/item/storage/box/patch_packs + name = "box of patch packs" + desc = "It has pictures of patch packs on its front." + +/obj/item/storage/box/patch_packs/New() + ..() + new /obj/item/storage/pill_bottle/patch_pack(src) + new /obj/item/storage/pill_bottle/patch_pack(src) + new /obj/item/storage/pill_bottle/patch_pack(src) + new /obj/item/storage/pill_bottle/patch_pack(src) + new /obj/item/storage/pill_bottle/patch_pack(src) + new /obj/item/storage/pill_bottle/patch_pack(src) + new /obj/item/storage/pill_bottle/patch_pack(src) + /obj/item/storage/box/bodybags name = "body bags" desc = "This box contains body bags." diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index 66f7e9b9492..5e81c320041 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -234,6 +234,7 @@ /* * Pill Bottles */ + /obj/item/storage/pill_bottle name = "pill bottle" desc = "It's an airtight container for storing medication." @@ -241,18 +242,38 @@ icon = 'icons/obj/chemical.dmi' item_state = "contsolid" w_class = WEIGHT_CLASS_SMALL - can_hold = list(/obj/item/reagent_containers/food/pill, /obj/item/dice, /obj/item/paper) - allow_quick_gather = 1 - use_to_pickup = 1 - storage_slots = 14 - display_contents_with_number = 1 + can_hold = list(/obj/item/reagent_containers/food/pill) + cant_hold = list(/obj/item/reagent_containers/food/pill/patch) + allow_quick_gather = TRUE + use_to_pickup = TRUE + storage_slots = 50 + max_combined_w_class = 50 + display_contents_with_number = TRUE var/base_name = "" var/label_text = "" + var/applying_meds = FALSE //To Prevent spam clicking and generating runtimes from apply a deleting pill multiple times. + var/rapid_intake_message = "unscrews the cap on the pill bottle and begins dumping the entire contents down their throat!" + var/rapid_post_instake_message = "downs the entire bottle of pills in one go!" /obj/item/storage/pill_bottle/New() ..() base_name = name +/obj/item/storage/pill_bottle/attack(mob/M, mob/user) + if(iscarbon(M) && contents.len) + if(applying_meds) + to_chat(user, "You are already applying meds.") + return + applying_meds = TRUE + for(var/obj/item/reagent_containers/food/pill/P in contents) + if(P.attack(M, user)) + applying_meds = FALSE + else + applying_meds = FALSE + break + else + return ..() + /obj/item/storage/pill_bottle/ert/New() ..() new /obj/item/reagent_containers/food/pill/salicylic(src) @@ -262,27 +283,21 @@ new /obj/item/reagent_containers/food/pill/charcoal(src) new /obj/item/reagent_containers/food/pill/charcoal(src) -/obj/item/storage/pill_bottle/MouseDrop(obj/over_object as obj) //Quick pillbottle fix. -Agouri - if(ishuman(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~ - var/mob/M = usr - if(!( istype(over_object, /obj/screen) )) - return ..() - if((!( M.restrained() ) && !( M.stat ) /*&& M.pocket == src*/)) - switch(over_object.name) - if("r_hand") - M.unEquip(src) - M.put_in_r_hand(src) - if("l_hand") - M.unEquip(src) - M.put_in_l_hand(src) - src.add_fingerprint(usr) - return - if(over_object == usr && in_range(src, usr) || usr.contents.Find(src)) - if(usr.s_active) - usr.s_active.close(usr) - src.show_to(usr) - return - return +/obj/item/storage/pill_bottle/MouseDrop(obj/over_object as obj) // Best utilized if you're a cantankerous doctor with a Vicodin habit. + if(iscarbon(over_object)) + var/mob/living/carbon/C = over_object + if(loc == C && src == C.get_active_hand()) + if(!contents.len) + to_chat(C, "There is nothing in [src]!") + return + C.visible_message("[C] [rapid_intake_message]") + if(do_mob(C, C, 100)) // 10 seconds + for(var/obj/item/reagent_containers/food/pill/P in contents) + P.attack(C, C) + C.visible_message("[C] [rapid_post_instake_message]") + return + + return ..() /obj/item/storage/pill_bottle/attackby(var/obj/item/I, mob/user as mob, params) if(istype(I, /obj/item/pen) || istype(I, /obj/item/flashlight/pen)) @@ -294,7 +309,7 @@ label_text = tmp_label update_name_label() else - ..() + return ..() /obj/item/storage/pill_bottle/proc/update_name_label() if(label_text == "") @@ -302,6 +317,14 @@ else name = "[base_name] ([label_text])" +/obj/item/storage/pill_bottle/patch_pack + name = "Patch Pack" + icon_state = "patch_pack" + can_hold = list(/obj/item/reagent_containers/food/pill/patch) + cant_hold = list() + rapid_intake_message = "flips the lid of the Patch Pack open and begins rapidly stamping patches on themselves!" + rapid_post_instake_message = "stamps the entire contents of the Patch Pack all over their entire body!" + /obj/item/storage/pill_bottle/charcoal name = "Pill bottle (Charcoal)" desc = "Contains pills used to counter toxins." diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index f33fc7240d2..b7356a7757b 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -18,7 +18,7 @@ /obj/item/melee/baton/suicide_act(mob/user) user.visible_message("[user] is putting the live [name] in [user.p_their()] mouth! It looks like [user.p_theyre()] trying to commit suicide.") - return (FIRELOSS) + return FIRELOSS /obj/item/melee/baton/New() ..() diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index e90a7bb4b6d..98f97b66f53 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -32,7 +32,7 @@ /obj/item/wrench/suicide_act(mob/user) user.visible_message("[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!") playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1) - return (BRUTELOSS) + return BRUTELOSS /obj/item/wrench/cyborg name = "automatic wrench" @@ -76,7 +76,7 @@ /obj/item/wrench/power/suicide_act(mob/user) user.visible_message("[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!") - return (BRUTELOSS) + return BRUTELOSS /obj/item/wrench/medical name = "medical wrench" @@ -113,7 +113,7 @@ return user.dust() - return OXYLOSS + return OBLITERATION //Screwdriver /obj/item/screwdriver @@ -143,7 +143,7 @@ /obj/item/screwdriver/suicide_act(mob/user) user.visible_message("[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!") - return(BRUTELOSS) + return BRUTELOSS /obj/item/screwdriver/New(loc, var/param_color = null) ..() @@ -199,7 +199,7 @@ /obj/item/screwdriver/power/suicide_act(mob/user) user.visible_message("[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!") - return(BRUTELOSS) + return BRUTELOSS /obj/item/screwdriver/power/attack_self(mob/user) playsound(get_turf(user), 'sound/items/change_drill.ogg', 50, 1) @@ -256,7 +256,7 @@ /obj/item/wirecutters/suicide_act(mob/user) user.visible_message("[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!") playsound(loc, usesound, 50, 1, -1) - return (BRUTELOSS) + return BRUTELOSS /obj/item/wirecutters/brass name = "brass wirecutters" @@ -299,7 +299,7 @@ if(head) head.droplimb(0, DROPLIMB_BLUNT, FALSE, TRUE) playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1) - return (BRUTELOSS) + return BRUTELOSS /obj/item/wirecutters/power/attack_self(mob/user) playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) @@ -349,7 +349,7 @@ /obj/item/weldingtool/suicide_act(mob/user) user.visible_message("[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!") - return (FIRELOSS) + return FIRELOSS /obj/item/weldingtool/proc/update_torch() overlays.Cut() @@ -469,7 +469,6 @@ /obj/item/weldingtool/afterattack(atom/O, mob/user, proximity) if(!proximity) return - if(welding) remove_fuel(1) var/turf/location = get_turf(user) @@ -739,7 +738,7 @@ obj/item/weldingtool/experimental/process() /obj/item/crowbar/power/suicide_act(mob/user) user.visible_message("[user] is putting [user.p_their()] head in [src]. It looks like [user.p_theyre()] trying to commit suicide!") playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1) - return (BRUTELOSS) + return BRUTELOSS /obj/item/crowbar/power/attack_self(mob/user) playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1) diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index de219626d31..29f2c2dd488 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -797,7 +797,7 @@ /obj/item/twohanded/pitchfork/suicide_act(mob/user) user.visible_message("[user] impales \himself in \his abdomen with [src]! It looks like \he's trying to commit suicide...") - return (BRUTELOSS) + return BRUTELOSS /obj/item/twohanded/pitchfork/demonic/pickup(mob/user) . = ..() diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index cd295befb83..b759139dba6 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -12,8 +12,8 @@ /obj/item/banhammer/suicide_act(mob/user) - to_chat(viewers(user), "[user] is hitting [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to ban [user.p_them()]self from life.") - return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS) + to_chat(viewers(user), "[user] is hitting [user.p_them()]self with the [src.name]! It looks like [user.p_theyre()] trying to ban [user.p_them()]self from life.") + return BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS /obj/item/sord name = "\improper SORD" @@ -49,7 +49,7 @@ /obj/item/claymore/suicide_act(mob/user) user.visible_message("[user] is falling on the [name]! It looks like [user.p_theyre()] trying to commit suicide.") - return(BRUTELOSS) + return BRUTELOSS /obj/item/claymore/ceremonial name = "ceremonial claymore" @@ -76,7 +76,7 @@ /obj/item/katana/suicide_act(mob/user) user.visible_message("[user] is slitting [user.p_their()] stomach open with [src]! It looks like [user.p_theyre()] trying to commit seppuku.") - return(BRUTELOSS) + return BRUTELOSS /obj/item/harpoon name = "harpoon" diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index 3ab8de69f7f..246fc5df75d 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -93,7 +93,7 @@ /obj/move_crushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction) collision_damage(pusher, force, direction) return TRUE - + /obj/proc/collision_damage(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction) var/amt = max(0, ((force - (move_resist * MOVE_FORCE_CRUSH_RATIO)) / (move_resist * MOVE_FORCE_CRUSH_RATIO)) * 10) take_damage(amt, BRUTE) @@ -163,14 +163,15 @@ //// FIRE -/obj/fire_act(global_overlay=1) +/obj/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + ..() if(!burn_state) burn_state = ON_FIRE SSfires.processing[src] = src burn_world_time = world.time + burntime*rand(10,20) if(global_overlay) overlays += fire_overlay - return 1 + return TRUE /obj/proc/burn() empty_object_contents(1, loc) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index d9358c3a694..6506a5fdf2e 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -29,6 +29,7 @@ var/on_blueprints = FALSE //Are we visible on the station blueprints at roundstart? var/force_blueprints = FALSE //forces the obj to be on the blueprints, regardless of when it was created. + var/suicidal_hands = FALSE // Does it requires you to hold it to commit suicide with it? /obj/New() ..() @@ -76,6 +77,19 @@ processing_objects.Remove(src) return 0 +//user: The mob that is suiciding +//damagetype: The type of damage the item will inflict on the user +//BRUTELOSS = 1 +//FIRELOSS = 2 +//TOXLOSS = 4 +//OXYLOSS = 8 +//SHAME = 16 +//OBLITERATION = 32 + +//Output a creative message and then return the damagetype done +/obj/proc/suicide_act(mob/user) + return FALSE + /obj/assume_air(datum/gas_mixture/giver) if(loc) return loc.assume_air(giver) diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index 1738344ae60..90e32882087 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -56,8 +56,9 @@ ..() /obj/structure/alien/resin/Destroy() - air_update_turf(1) - return ..() + var/turf/T = get_turf(src) + . = ..() + T.air_update_turf(TRUE) /obj/structure/alien/resin/Move() var/turf/T = loc @@ -157,6 +158,7 @@ new /obj/structure/alien/weeds(T, linked_node) /obj/structure/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(exposed_temperature > 300) take_damage(5, BURN, 0, 0) @@ -294,6 +296,7 @@ Burst(kill = TRUE) /obj/structure/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(exposed_temperature > 500) take_damage(5, BURN, 0, 0) diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 61113a4864a..8c4f40a7b62 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -245,7 +245,7 @@ LINEN BINS else icon_state = "linenbin-full" -/obj/structure/bedsheetbin/fire_act() +/obj/structure/bedsheetbin/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) if(!amount) return ..() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm index 551a8b30d9d..a25b8d03c00 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm @@ -13,6 +13,9 @@ ..() new /obj/item/storage/box/autoinjectors(src) new /obj/item/storage/box/syringes(src) + new /obj/item/storage/box/pillbottles(src) + new /obj/item/storage/box/patch_packs(src) + new /obj/item/storage/box/iv_bags(src) new /obj/item/reagent_containers/dropper(src) new /obj/item/reagent_containers/dropper(src) new /obj/item/reagent_containers/glass/beaker(src) @@ -67,6 +70,7 @@ new /obj/item/radio/headset/headset_med(src) new /obj/item/clothing/gloves/color/latex/nitrile(src) new /obj/item/defibrillator/loaded(src) + new /obj/item/handheld_defibrillator(src) new /obj/item/storage/belt/medical(src) new /obj/item/clothing/glasses/hud/health(src) new /obj/item/clothing/shoes/sandal/white(src) @@ -181,6 +185,7 @@ new /obj/item/radio/headset/heads/cmo(src) new /obj/item/clothing/gloves/color/latex/nitrile(src) new /obj/item/defibrillator/compact/loaded(src) + new /obj/item/handheld_defibrillator(src) new /obj/item/storage/belt/medical(src) new /obj/item/flash(src) new /obj/item/reagent_containers/hypospray/CMO(src) @@ -216,6 +221,8 @@ ..() new /obj/item/storage/box/pillbottles(src) new /obj/item/storage/box/pillbottles(src) + new /obj/item/storage/box/patch_packs(src) + new /obj/item/storage/box/patch_packs(src) /obj/structure/closet/secure_closet/medical_wall diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 6851cd3cfc5..9b777d45b58 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -249,6 +249,7 @@ qdel(src) /obj/structure/falsewall/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(exposed_temperature > 300) burnbabyburn() diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index b46324a838c..b3468668f5a 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -48,6 +48,7 @@ qdel(src) /obj/structure/girder/temperature_expose(datum/gas_mixture/air, exposed_temperature) + ..() var/temp_check = exposed_temperature if(temp_check >= GIRDER_MELTING_TEMP) take_damage(10) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 8d3e178fe58..c06e5d82244 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -261,10 +261,10 @@ return 0 /obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(!broken) if(exposed_temperature > T0C + 1500) take_damage(1, BURN, 0, 0) - ..() /obj/structure/grille/hitby(atom/movable/AM) if(istype(AM, /obj)) diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm index 0b730a539b9..e5c0fc85722 100644 --- a/code/game/objects/structures/holosign.dm +++ b/code/game/objects/structures/holosign.dm @@ -82,8 +82,8 @@ /obj/structure/holosign/barrier/atmos/Destroy() var/turf/T = get_turf(src) + . = ..() T.air_update_turf(TRUE) - return ..() /obj/structure/holosign/barrier/cyborg name = "Energy Field" diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index 4ea0fc34e2d..f4efa5452b0 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -22,16 +22,18 @@ icon = 'icons/obj/inflatable.dmi' icon_state = "wall" - + var/torn = /obj/item/inflatable/torn + var/intact = /obj/item/inflatable var/health = 50.0 /obj/structure/inflatable/Initialize(location) ..() - air_update_turf(1) + air_update_turf(TRUE) /obj/structure/inflatable/Destroy() - air_update_turf(1) - return ..() + var/turf/T = get_turf(src) + . = ..() + T.air_update_turf(TRUE) /obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0) return 0 @@ -122,13 +124,13 @@ playsound(loc, 'sound/machines/hiss.ogg', 75, 1) if(violent) visible_message("[src] rapidly deflates!") - var/obj/item/inflatable/torn/R = new /obj/item/inflatable/torn(loc) + var/obj/item/inflatable/torn/R = new torn(loc) src.transfer_fingerprints_to(R) qdel(src) else visible_message("[src] slowly deflates.") spawn(50) - var/obj/item/inflatable/R = new /obj/item/inflatable(loc) + var/obj/item/inflatable/R = new intact(loc) src.transfer_fingerprints_to(R) qdel(src) @@ -164,6 +166,8 @@ icon = 'icons/obj/inflatable.dmi' icon_state = "door_closed" + torn = /obj/item/inflatable/door/torn + intact = /obj/item/inflatable/door var/state = 0 //closed, 1 == open var/isSwitchingStates = 0 @@ -238,21 +242,6 @@ else icon_state = "door_closed" -/obj/structure/inflatable/door/deflate(var/violent=0) - playsound(loc, 'sound/machines/hiss.ogg', 75, 1) - if(violent) - visible_message("[src] rapidly deflates!") - var/obj/item/inflatable/door/torn/R = new /obj/item/inflatable/door/torn(loc) - src.transfer_fingerprints_to(R) - qdel(src) - else - visible_message("[src] slowly deflates.") - spawn(50) - var/obj/item/inflatable/door/R = new /obj/item/inflatable/door(loc) - src.transfer_fingerprints_to(R) - qdel(src) - air_update_turf(1) - /obj/item/inflatable/torn name = "torn inflatable wall" desc = "A folded membrane which rapidly expands into a large cubical shape on activation. It is too torn to be usable." diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index 389d2e8676b..0434638cc9a 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -229,6 +229,7 @@ return ..() /obj/structure/mineral_door/transparent/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(exposed_temperature > 300) TemperatureAct(exposed_temperature) diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index 19b6dc02617..91e2d552859 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -125,12 +125,13 @@ desc = "Heavy duty, airtight, plastic flaps." /obj/structure/plasticflaps/mining/Initialize() - air_update_turf(1) + air_update_turf(TRUE) ..() /obj/structure/plasticflaps/mining/Destroy() - air_update_turf(1) - return ..() + var/turf/T = get_turf(src) + . = ..() + T.air_update_turf(TRUE) /obj/structure/plasticflaps/mining/CanAtmosPass(turf/T) - return 0 + return FALSE diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index 090327d1c7f..88adc9643ba 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -169,6 +169,7 @@ icon_state = "xeno" /obj/structure/statue/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(exposed_temperature > 300) PlasmaBurn(exposed_temperature) @@ -359,7 +360,8 @@ else return ..() -/obj/structure/snowman/built/fire_act() +/obj/structure/snowman/built/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + ..() qdel(src) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index cf87454a97c..ad655a39b64 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -461,9 +461,9 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f overlays += crack_overlay /obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(exposed_temperature > (T0C + heat_resistance)) take_damage(round(exposed_volume / 100), BURN, 0, 0) - ..() /obj/structure/window/GetExplosionBlock() return reinf && fulltile ? real_explosion_block : 0 diff --git a/code/game/sound.dm b/code/game/sound.dm index 9e0a28493bd..d76c767593f 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -5,6 +5,9 @@ var/turf/turf_source = get_turf(source) + if(!turf_source) + return + //allocate a channel if necessary now so its the same for everyone channel = channel || open_sound_channel() @@ -16,7 +19,7 @@ listeners = listeners & hearers(maxdistance, turf_source) for(var/P in listeners) var/mob/M = P - if(!M || !M.client) + if(!M || !M.client || M.z != turf_source.z) continue var/distance = get_dist(M, turf_source) diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index d26a24b39a2..6b3dc1e93ff 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -79,6 +79,9 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3"," src.hotspot_expose(1000,CELL_VOLUME) return +/turf/simulated/floor/burn_down() + ex_act(2) + /turf/simulated/floor/is_shielded() for(var/obj/structure/A in contents) if(A.level == 3) diff --git a/code/game/turfs/simulated/floor/mineral.dm b/code/game/turfs/simulated/floor/mineral.dm index 38f1bdc14a1..d201a38d697 100644 --- a/code/game/turfs/simulated/floor/mineral.dm +++ b/code/game/turfs/simulated/floor/mineral.dm @@ -33,6 +33,7 @@ icons = list("plasma","plasma_dam") /turf/simulated/floor/mineral/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(exposed_temperature > 300) PlasmaBurn() diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 4c855ac1f15..6fddc40dfa9 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -201,6 +201,11 @@ for(var/i=0, i 300) PlasmaBurn(exposed_temperature) @@ -246,6 +247,9 @@ /turf/simulated/wall/mineral/titanium/nodecon/thermitemelt(mob/user as mob, speed) return +/turf/simulated/wall/mineral/titanium/nodecon/burn_down() + return + /////////////////////Plastitanium walls///////////////////// /turf/simulated/wall/mineral/plastitanium diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index c9b385d7b67..2ff2c4ee9fc 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -288,6 +288,9 @@ /turf/proc/Bless() flags |= NOJAUNT +/turf/proc/burn_down() + return + ///////////////////////////////////////////////////////////////////////// // Navigation procs // Used for A-star pathfinding diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index 06b168da042..46d5c4e36ba 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -1,7 +1,7 @@ /mob/var/suiciding = 0 /mob/living/carbon/human/proc/do_suicide(damagetype, byitem) - var/threshold = (config.health_threshold_crit + config.health_threshold_dead) / 2 + var/threshold = check_death_method() ? ((HEALTH_THRESHOLD_CRIT + HEALTH_THRESHOLD_DEAD) / 2) : (HEALTH_THRESHOLD_DEAD - 50) var/dmgamt = maxHealth - threshold var/damage_mod = 1 @@ -52,6 +52,9 @@ /mob/living/carbon/human/verb/suicide() set hidden = 1 + be_suicidal() + +/mob/living/carbon/human/proc/be_suicidal(forced = FALSE) if(stat == DEAD) to_chat(src, "You're already dead!") return @@ -69,20 +72,39 @@ to_chat(src, "You're already committing suicide! Be patient!") return - var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") - if(confirm == "Yes") - suiciding = 1 + var/confirm = null + if(!forced) + confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") + + if(forced || (confirm == "Yes")) + suiciding = TRUE var/obj/item/held_item = get_active_hand() if(held_item) var/damagetype = held_item.suicide_act(src) if(damagetype) if(damagetype & SHAME) adjustStaminaLoss(200) - suiciding = 0 + suiciding = FALSE + return + if(damagetype & OBLITERATION) // Does it gib or something? Don't deal damage return do_suicide(damagetype, held_item) return + else + for(var/obj/O in orange(1, src)) + if(O.suicidal_hands) + continue + var/damagetype = O.suicide_act(src) + if(damagetype) + if(damagetype & SHAME) + adjustStaminaLoss(200) + suiciding = FALSE + return + if(damagetype & OBLITERATION) + return + do_suicide(damagetype, O) + return to_chat(viewers(src), "[src] [replacetext(pick(dna.species.suicide_messages), "their", p_their())] It looks like [p_theyre()] trying to commit suicide.") do_suicide(0) diff --git a/code/modules/antagonists/_common/antag_spawner.dm b/code/modules/antagonists/_common/antag_spawner.dm index 937c831dfbf..2b78de43f82 100644 --- a/code/modules/antagonists/_common/antag_spawner.dm +++ b/code/modules/antagonists/_common/antag_spawner.dm @@ -10,7 +10,6 @@ /obj/item/antag_spawner/proc/equip_antag(mob/target) return - /obj/item/antag_spawner/borg_tele name = "syndicate cyborg teleporter" desc = "A single-use teleporter used to deploy a Syndicate Cyborg on the field." @@ -149,7 +148,6 @@ to_chat(S, "Objective #[1]: [KillDaWiz.explanation_text]") to_chat(S, "Objective #[2]: [KillDaCrew.explanation_text]") - /obj/item/antag_spawner/slaughter_demon/laughter name = "vial of tickles" desc = "A magically infused bottle of clown love, distilled from \ @@ -160,3 +158,59 @@ lurking just beyond the veil..." objective_verb = "Hug and Tickle" demon_type = /mob/living/simple_animal/slaughter/laughter + +/obj/item/antag_spawner/morph + name = "vial of ooze" + desc = "A magically infused bottle of ooze, distilled by methods rather not be spoken of. Used to awaken an all-consuming monstrosity." + icon = 'icons/obj/wizard.dmi' + icon_state = "vialooze" + var/shatter_msg = "You shatter the bottle, no \ + turning back now!" + var/veil_msg = "The sludge is awake and seeps \ + away..." + var/objective_verb = "Eat" + var/mob/living/morph_type = /mob/living/simple_animal/hostile/morph + +/obj/item/antag_spawner/morph/attack_self(mob/user) + if(level_blocks_magic(user.z))//this is to make sure the wizard does NOT summon a morph from the Den.. + to_chat(user, "You should probably wait until you reach the station.") + return + + if(used) + to_chat(user, "This bottle already has a broken seal.") + return + used = TRUE + to_chat(user, "You break the seal on the bottle, calling upon the dire sludge to awaken...") + + var/list/candidates = pollCandidates("Do you want to play as a morph awakened by [user.real_name]?", ROLE_MORPH, 1, 100) + + if(candidates.len > 0) + var/mob/C = pick(candidates) + spawn_antag(C, get_turf(src.loc), initial(morph_type.name), user) + to_chat(user, "[shatter_msg]") + to_chat(user, "[veil_msg]") + playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, 1) + qdel(src) + else + used = FALSE + to_chat(user, "The sludge does not respond to your attempt to awake it. Perhaps you should try again later.") + +/obj/item/antag_spawner/morph/spawn_antag(client/C, turf/T, type = "", mob/user) + var/mob/living/simple_animal/hostile/morph/M = new /mob/living/simple_animal/hostile/morph(pick(xeno_spawn)) + M.key = C.key + M.mind.assigned_role = SPECIAL_ROLE_MORPH + M.mind.special_role = SPECIAL_ROLE_MORPH + to_chat(M, M.playstyle_string) + ticker.mode.traitors += M.mind + var/datum/objective/assassinate/KillDaWiz = new /datum/objective/assassinate + KillDaWiz.owner = M.mind + KillDaWiz.target = user.mind + KillDaWiz.explanation_text = "[objective_verb] [user.real_name], the one who was foolish enough to awake you." + M.mind.objectives += KillDaWiz + var/datum/objective/KillDaCrew = new /datum/objective + KillDaCrew.owner = M.mind + KillDaCrew.explanation_text = "[objective_verb] everyone and everything else while you're at it." + M.mind.objectives += KillDaCrew + to_chat(M, "Objective #[1]: [KillDaWiz.explanation_text]") + to_chat(M, "Objective #[2]: [KillDaCrew.explanation_text]") + M << 'sound/magic/mutate.ogg' \ No newline at end of file diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index 0c3fed01011..300443714ab 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -294,7 +294,7 @@ You can set verify to TRUE if you want send() to sleep until the client has the /datum/asset/chem_master/register() for(var/i = 1 to 20) assets["pill[i].png"] = icon('icons/obj/chemical.dmi', "pill[i]") - for(var/i in list("bottle", "small_bottle", "wide_bottle", "round_bottle")) + for(var/i in list("bottle", "small_bottle", "wide_bottle", "round_bottle", "reagent_bottle")) assets["[i].png"] = icon('icons/obj/chemical.dmi', "[i]") for(var/asset_name in assets) register_asset(asset_name, assets[asset_name]) diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 0a09f4504bb..caf98b866cc 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -435,37 +435,35 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "" if(TAB_GAME) // General Preferences + // LEFT SIDE OF THE PAGE dat += "
" dat += "

General Settings

" - dat += "Fancy NanoUI: [(nanoui_fancy) ? "Yes" : "No"]
" - dat += "Ghost-Item Attack Animation: [(show_ghostitem_attack) ? "Yes" : "No"]
" - dat += "Window Flashing: [(windowflashing) ? "Yes" : "No"]
" - dat += "Custom UI settings:
" - dat += " - UI Style: [UI_style]
" - dat += " - Color: [UI_style_color]
__

" - dat += " - Alpha (transparency): [UI_style_alpha]
" - dat += "
" - dat += "Play admin midis: [(sound & SOUND_MIDI) ? "Yes" : "No"]
" - dat += "Play lobby music: [(sound & SOUND_LOBBY) ? "Yes" : "No"]
" + dat += "Attack Animations: [(show_ghostitem_attack) ? "Yes" : "No"]
" if(user.client.holder) - dat += "Adminhelp sound: " - dat += "[(sound & SOUND_ADMINHELP)?"On":"Off"]
" - - if(check_rights(R_ADMIN,0)) - dat += "OOC:     Change
" - if(config.allow_Metadata) - dat += "OOC notes: Edit
" + dat += "Adminhelp sound: [(sound & SOUND_ADMINHELP)?"On":"Off"]
" if(unlock_content) dat += "BYOND Membership Publicity: [(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]
" + dat += "Custom UI settings:
" + dat += " - Alpha (transparency): [UI_style_alpha]
" + dat += " - Color: [UI_style_color]    
" + dat += " - UI Style: [UI_style]
" + dat += "Deadchat Anonymity: [ghost_anonsay ? "Anonymous" : "Not Anonymous"]
" if(user.client.donator_level >= DONATOR_LEVEL_ONE) dat += "Donator Publicity: [(toggles & DONATOR_PUBLIC) ? "Public" : "Hidden"]
" - - dat += "Randomized character slot: [randomslot ? "Yes" : "No"]
" - dat += "Ghost ears: [(toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
" - dat += "Ghost sight: [(toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
" - dat += "Ghost radio: [(toggles & CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]
" - dat += "Deadchat anonymity: [ghost_anonsay ? "Anonymous" : "Not Anonymous"]
" + dat += "Fancy NanoUI: [(nanoui_fancy) ? "Yes" : "No"]
" dat += "FPS: [clientfps]
" + dat += "Ghost Ears: [(toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
" + dat += "Ghost Sight: [(toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
" + dat += "Ghost Radio: [(toggles & CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]
" + if(check_rights(R_ADMIN,0)) + dat += "OOC Color:     Change
" + if(config.allow_Metadata) + dat += "OOC Notes: Edit
" + dat += "Play Admin MIDIs: [(sound & SOUND_MIDI) ? "Yes" : "No"]
" + dat += "Play Lobby Music: [(sound & SOUND_LOBBY) ? "Yes" : "No"]
" + dat += "Randomized Character Slot: [randomslot ? "Yes" : "No"]
" + dat += "Window Flashing: [(windowflashing) ? "Yes" : "No"]
" + // RIGHT SIDE OF THE PAGE dat += "
" dat += "

Special Role Settings

" if(jobban_isbanned(user, "Syndicate")) @@ -554,7 +552,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "Reset Setup" dat += "" - var/datum/browser/popup = new(user, "preferences", "
Character Setup
", 820, 640) + var/datum/browser/popup = new(user, "preferences", "
Character Setup
", 820, 660) popup.set_content(dat) popup.open(0) diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 5bc13912a04..62873252ad1 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -430,7 +430,7 @@ /obj/item/clothing/head/griffin/proc/caw() if(cooldown < world.time - 20) // A cooldown, to stop people being jerks - playsound(src.loc, 'sound/misc/caw.ogg', 50, 1) + playsound(src.loc, 'sound/creatures/caw.ogg', 50, 1) cooldown = world.time diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 38f54b1067a..0c4dba9ae49 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -188,7 +188,7 @@ /obj/item/clothing/mask/gas/owl_mask/proc/hoot() if(cooldown < world.time - 35) // A cooldown, to stop people being jerks - playsound(src.loc, 'sound/misc/hoot.ogg', 50, 1) + playsound(src.loc, 'sound/creatures/hoot.ogg', 50, 1) cooldown = world.time // ******************************************************************** diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 77fcd03c7df..113720caff1 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -491,5 +491,6 @@ /obj/item/clothing/mask/cursedclown/suicide_act(mob/user) user.visible_message("[user] gazes into the eyes of [src]. [src] gazes back!") spawn(10) - user.gib() - return BRUTELOSS + if(user) + user.gib() + return OBLITERATION diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 09ecdad8ed7..23206e8b9b3 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -154,7 +154,7 @@ /obj/item/fluff/rsik_katana/suicide_act(mob/user) user.visible_message("[user] tries to stab [src] into [user.p_their()] stomach! Except [src] shatters! [user.p_they(TRUE)] look[user.p_s()] as if [user.p_they()] might die from the shame.") - return(BRUTELOSS) + return BRUTELOSS /obj/item/crowbar/fluff/zelda_creedy_1 // Zomgponies: Griffin Rowley name = "Zelda's Crowbar" diff --git a/code/modules/events/sentience.dm b/code/modules/events/sentience.dm index 59fbbc01e55..419bebfe2c1 100644 --- a/code/modules/events/sentience.dm +++ b/code/modules/events/sentience.dm @@ -33,6 +33,7 @@ SA.key = SG.key SA.universal_speak = 1 SA.sentience_act() + SA.can_collar = 1 SA.maxHealth = max(SA.maxHealth + 200) SA.melee_damage_lower = max(SA.melee_damage_lower + 15) SA.melee_damage_upper = max(SA.melee_damage_upper + 15) diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index 55e87f575b0..7d52d7cd969 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -684,6 +684,7 @@ wither() /obj/structure/spacevine/temperature_expose(null, temp, volume) + ..() var/override = 0 for(var/datum/spacevine_mutation/SM in mutations) override += SM.process_temperature(src, temp, volume) diff --git a/code/modules/fish/fish_items.dm b/code/modules/fish/fish_items.dm index 63a4b668930..a0882ae5df8 100644 --- a/code/modules/fish/fish_items.dm +++ b/code/modules/fish/fish_items.dm @@ -25,9 +25,9 @@ throw_speed = 3 throw_range = 7 - suicide_act(mob/user) //"A tiny net is a death sentence: it's a net and it's tiny!" https://www.youtube.com/watch?v=FCI9Y4VGCVw - to_chat(viewers(user), "[user] places the [src.name] on top of [user.p_their()] head, [user.p_their()] fingers tangled in the netting! It looks like [user.p_theyre()] trying to commit suicide.") - return(OXYLOSS) +/obj/item/fish_net/suicide_act(mob/user) //"A tiny net is a death sentence: it's a net and it's tiny!" https://www.youtube.com/watch?v=FCI9Y4VGCVw + to_chat(viewers(user), "[user] places the [src.name] on top of [user.p_their()] head, [user.p_their()] fingers tangled in the netting! It looks like [user.p_theyre()] trying to commit suicide.") + return OXYLOSS /obj/item/fishfood name = "fish food can" @@ -51,9 +51,9 @@ throw_range = 7 attack_verb = list("scrubbed", "brushed", "scraped") - suicide_act(mob/user) - to_chat(viewers(user), "[user] is vigorously scrubbing [user.p_them()]self raw with the [name]! It looks like [user.p_theyre()] trying to commit suicide.") - return(BRUTELOSS|FIRELOSS) +/obj/item/tank_brush/suicide_act(mob/user) + to_chat(viewers(user), "[user] is vigorously scrubbing [user.p_them()]self raw with the [name]! It looks like [user.p_theyre()] trying to commit suicide.") + return BRUTELOSS|FIRELOSS ////////////////////////////////////////////// // Fish Items // diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 2c9c2480a4b..52a4a9dcd35 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -106,17 +106,6 @@ return FALSE -/obj/item/reagent_containers/food/drinks/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/clothing/mask/cigarette)) //ciggies are weird - return FALSE - if(is_hot(I)) - if(reagents) - reagents.chem_temp += 15 - to_chat(user, "You heat [src] with [I].") - reagents.handle_reactions() - else - return ..() - /obj/item/reagent_containers/food/drinks/examine(mob/user) if(!..(user, 1)) return diff --git a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm index f5bd0e8e4eb..bdc473d774e 100644 --- a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm @@ -27,7 +27,7 @@ else ..() -/obj/item/reagent_containers/food/drinks/drinkingglass/fire_act() +/obj/item/reagent_containers/food/drinks/drinkingglass/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) if(!reagents.total_volume) return ..() diff --git a/code/modules/food_and_drinks/drinks/drinks/shotglass.dm b/code/modules/food_and_drinks/drinks/drinks/shotglass.dm index 393543b093c..cd158c70e74 100644 --- a/code/modules/food_and_drinks/drinks/drinks/shotglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/shotglass.dm @@ -51,7 +51,7 @@ if(A.volume >= 5 && A.alcohol_perc >= 0.35) //Only an approximation to if something's flammable but it will do return TRUE -/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/fire_act(global_overlay = FALSE) +/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = FALSE) if(!isShotFlammable() || burn_state == ON_FIRE) //You can't light a shot that's not flammable! return ..() diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm index 64a585e9051..d512e3888a9 100644 --- a/code/modules/food_and_drinks/food/condiment.dm +++ b/code/modules/food_and_drinks/food/condiment.dm @@ -131,7 +131,7 @@ user.name = newname user.real_name = newname desc = "Salt. From dead crew, presumably." - return (TOXLOSS) + return TOXLOSS /obj/item/reagent_containers/food/condiment/peppermill name = "pepper mill" diff --git a/code/modules/food_and_drinks/food/foods/seafood.dm b/code/modules/food_and_drinks/food/foods/seafood.dm index d06f1eeb77b..9e4407d9602 100644 --- a/code/modules/food_and_drinks/food/foods/seafood.dm +++ b/code/modules/food_and_drinks/food/foods/seafood.dm @@ -97,6 +97,24 @@ bitesize = 3 list_reagents = list("nutriment" = 2) +/obj/item/reagent_containers/food/snacks/shrimp_skewer + name = "shrimp skewer" + desc = "Four shrimp lightly grilled on a skewer. Yummy!" + trash = /obj/item/stack/rods + icon = 'icons/obj/food/seafood.dmi' + icon_state = "shrimpskewer" + bitesize = 3 + list_reagents = list("nutriment" = 8) + +/obj/item/reagent_containers/food/snacks/fish_skewer + name = "fish skewer" + desc = "A whole fish battered and grilled on a skewer. Hope you're hungry!" + trash = /obj/item/stack/rods + icon = 'icons/obj/food/seafood.dmi' + icon_state = "fishskewer" + bitesize = 3 + list_reagents = list("protein" = 6, "vitamin" = 4) + /obj/item/reagent_containers/food/snacks/sliceable/Ebi_maki name = "ebi makiroll" desc = "A large unsliced roll of Ebi Sushi." diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index c5bcd22a885..edcb85e0d15 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -24,6 +24,18 @@ idle_power_usage = 2 active_power_usage = 500 +/obj/machinery/gibber/suicide_act(mob/user) + if(occupant || locked) + return FALSE + user.visible_message("[user] climbs into [src] and turns it on!") + user.Stun(10) + user.forceMove(src) + occupant = user + update_icon() + feedinTopanim() + addtimer(CALLBACK(src, .proc/startgibbing, user), 33) + return OBLITERATION + /obj/machinery/gibber/Destroy() if(contents.len) for(var/atom/movable/A in contents) @@ -145,7 +157,7 @@ set name = "Empty Gibber" set src in oview(1) - if(usr.stat != CONSCIOUS) + if(usr.incapacitated()) return go_out() diff --git a/code/modules/food_and_drinks/recipes/recipes_grill.dm b/code/modules/food_and_drinks/recipes/recipes_grill.dm index ae7f2b25076..83f9aea745f 100644 --- a/code/modules/food_and_drinks/recipes/recipes_grill.dm +++ b/code/modules/food_and_drinks/recipes/recipes_grill.dm @@ -232,3 +232,22 @@ /obj/item/reagent_containers/food/snacks/goliath ) result = /obj/item/reagent_containers/food/snacks/goliath_steak + +/datum/recipe/grill/shrimp_skewer + items = list( + /obj/item/reagent_containers/food/snacks/shrimp, + /obj/item/reagent_containers/food/snacks/shrimp, + /obj/item/reagent_containers/food/snacks/shrimp, + /obj/item/reagent_containers/food/snacks/shrimp, + /obj/item/stack/rods, + ) + result = /obj/item/reagent_containers/food/snacks/shrimp_skewer + +/datum/recipe/grill/fish_skewer + reagents = list("flour" = 10) + items = list( + /obj/item/reagent_containers/food/snacks/salmonmeat, + /obj/item/reagent_containers/food/snacks/salmonmeat, + /obj/item/stack/rods, + ) + result = /obj/item/reagent_containers/food/snacks/fish_skewer diff --git a/code/modules/food_and_drinks/recipes/recipes_microwave.dm b/code/modules/food_and_drinks/recipes/recipes_microwave.dm index 81fbe20e3d4..44c572b34e7 100644 --- a/code/modules/food_and_drinks/recipes/recipes_microwave.dm +++ b/code/modules/food_and_drinks/recipes/recipes_microwave.dm @@ -133,6 +133,13 @@ ) result = /obj/item/reagent_containers/food/snacks/baseballburger +/datum/recipe/microwave/cheeseburger + items = list( + /obj/item/reagent_containers/food/snacks/monkeyburger, + /obj/item/reagent_containers/food/snacks/cheesewedge, + ) + result = /obj/item/reagent_containers/food/snacks/cheeseburger + /datum/recipe/microwave/hotdog items = list( /obj/item/reagent_containers/food/snacks/bun, diff --git a/code/modules/hydroponics/grown/banana.dm b/code/modules/hydroponics/grown/banana.dm index 4515b3ad75f..dd56ade79be 100644 --- a/code/modules/hydroponics/grown/banana.dm +++ b/code/modules/hydroponics/grown/banana.dm @@ -30,13 +30,13 @@ playsound(loc, 'sound/items/bikehorn.ogg', 50, 1, -1) sleep(25) if(!user) - return (OXYLOSS) + return OXYLOSS user.say("BANG!") sleep(25) if(!user) - return (OXYLOSS) + return OXYLOSS user.visible_message("[user] laughs so hard [user.p_they()] begin[user.p_s()] to suffocate!") - return (OXYLOSS) + return OXYLOSS /obj/item/grown/bananapeel seed = /obj/item/seeds/banana @@ -52,7 +52,7 @@ /obj/item/grown/bananapeel/suicide_act(mob/user) user.visible_message("[user] is deliberately slipping on the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") playsound(loc, 'sound/misc/slip.ogg', 50, 1, -1) - return (BRUTELOSS) + return BRUTELOSS // Mimana - invisible sprites are totally a feature! diff --git a/code/modules/hydroponics/grown/kudzu.dm b/code/modules/hydroponics/grown/kudzu.dm index eea80e17e60..64b84649770 100644 --- a/code/modules/hydroponics/grown/kudzu.dm +++ b/code/modules/hydroponics/grown/kudzu.dm @@ -24,7 +24,7 @@ /obj/item/seeds/kudzu/suicide_act(mob/user) user.visible_message("[user] swallows the pack of kudzu seeds! It looks like [user.p_theyre()] trying to commit suicide..") plant(user) - return (BRUTELOSS) + return BRUTELOSS /obj/item/seeds/kudzu/proc/plant(mob/user) if(istype(user.loc, /turf/space)) diff --git a/code/modules/hydroponics/grown/misc.dm b/code/modules/hydroponics/grown/misc.dm index 605f5082522..0d60c7d864f 100644 --- a/code/modules/hydroponics/grown/misc.dm +++ b/code/modules/hydroponics/grown/misc.dm @@ -151,5 +151,4 @@ /obj/item/reagent_containers/food/snacks/grown/cherry_bomb/proc/prime() icon_state = "cherry_bomb_lit" playsound(src, 'sound/goonstation/misc/fuse.ogg', seed.potency, 0) - reagents.chem_temp = 1000 //Sets off the black powder - reagents.handle_reactions() + reagents.set_reagent_temp(1000) //Sets off the black powder \ No newline at end of file diff --git a/code/modules/hydroponics/grown/nettle.dm b/code/modules/hydroponics/grown/nettle.dm index 8c4ed2b029c..af829387525 100644 --- a/code/modules/hydroponics/grown/nettle.dm +++ b/code/modules/hydroponics/grown/nettle.dm @@ -45,7 +45,7 @@ /obj/item/grown/nettle/suicide_act(mob/user) user.visible_message("[user] is eating some of the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") - return (BRUTELOSS|TOXLOSS) + return BRUTELOSS|TOXLOSS /obj/item/grown/nettle/pickup(mob/living/user) ..() diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index f71cd6ed86a..4ed9d963274 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -153,7 +153,8 @@ Burn() processing_objects.Add(src) -/obj/structure/bonfire/fire_act(exposed_temperature, exposed_volume) +/obj/structure/bonfire/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + ..() StartBurning() /obj/structure/bonfire/Crossed(atom/movable/AM) diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index a3453585817..14080c62bba 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -34,7 +34,7 @@ /obj/item/reagent_containers/spray/weedspray/suicide_act(mob/user) user.visible_message("[user] is huffing the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") - return (TOXLOSS) + return TOXLOSS /obj/item/reagent_containers/spray/pestspray // -- Skie desc = "It's some pest eliminator spray! Do not inhale!" @@ -56,7 +56,7 @@ /obj/item/reagent_containers/spray/pestspray/suicide_act(mob/user) user.visible_message("[user] is huffing the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") - return (TOXLOSS) + return TOXLOSS /obj/item/cultivator name = "cultivator" @@ -91,7 +91,7 @@ /obj/item/hatchet/suicide_act(mob/user) user.visible_message("[user] is chopping at [user.p_them()]self with the [name]! It looks like [user.p_theyre()] trying to commit suicide.") playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) - return (BRUTELOSS) + return BRUTELOSS /obj/item/hatchet/unathiknife name = "duelling knife" @@ -126,7 +126,7 @@ if(affecting) affecting.droplimb(1, DROPLIMB_SHARP) playsound(loc, pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg'), 50, 1, -1) - return (BRUTELOSS) + return BRUTELOSS /obj/item/scythe/pre_attackby(atom/A, mob/living/user, params) if(swiping || !istype(A, /obj/structure/spacevine) || get_turf(A) == get_turf(user)) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index f4e23e1cdac..2e95d21e10b 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -411,8 +411,6 @@ var/smoke_amount = round(sqrt(G.seed.potency * 0.1), 1) S.set_up(G.reagents, splat_location) S.start(smoke_amount) - if(G && G.reagents) - G.reagents.clear_reagents() /datum/plant_gene/trait/plant_type // Parent type name = "you shouldn't see this" diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index aed823b372b..2940e810ade 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -267,7 +267,7 @@ H.Weaken(4) if(H.staminaloss && !H.sleeping) var/total_health = (H.health - H.staminaloss) - if(total_health <= config.health_threshold_crit && !H.stat) + if(total_health <= HEALTH_THRESHOLD_CRIT && !H.stat) H.visible_message("[user] delivers a heavy hit to [H]'s head, knocking [H.p_them()] out cold!", \ "[user] knocks you unconscious!") H.SetSleeping(30) diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index 61108563512..2e1ecfa0b55 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -52,7 +52,7 @@ F.attackby(OB, AM) return ..() -/obj/item/stack/ore/fire_act() +/obj/item/stack/ore/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) ..() if(isnull(refined_type)) return diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index e91c79e46c9..3a65bcabd2c 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -148,6 +148,8 @@ Works together with spawning an observer, noted above. /mob/proc/ghostize(var/flags = GHOST_CAN_REENTER) if(key) + if(player_logged) //if they have disconnected we want to remove their SSD overlay + overlays -= image('icons/effects/effects.dmi', icon_state = "zzz_glow") if(GLOB.non_respawnable_keys[ckey]) flags &= ~GHOST_CAN_REENTER var/mob/dead/observer/ghost = new(src, flags) //Transfer safety to observer spawning proc. diff --git a/code/modules/mob/living/carbon/_defines.dm b/code/modules/mob/living/carbon/_defines.dm index 163ce8f7c8d..a5a524f86ed 100644 --- a/code/modules/mob/living/carbon/_defines.dm +++ b/code/modules/mob/living/carbon/_defines.dm @@ -1,10 +1,9 @@ -//NOTE: Breathing happens once per FOUR TICKS, unless the last breath fails. In which case it happens once per ONE TICK! So oxyloss healing is done once per 4 ticks while oxyloss damage is applied once per tick! -#define HUMAN_MAX_OXYLOSS 3 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it. -#define HUMAN_CRIT_MAX_OXYLOSS ( (tickerProcess.getLastTickerTimeDuration()) / 3) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 100HP to get through, so (1/3)*last_tick_duration per second. Breaths however only happen every 4 ticks. +//NOTE: Breathing happens once EVERY OTHER TICK. +#define HUMAN_MAX_OXYLOSS 5 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it. #define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point #define HEAT_DAMAGE_LEVEL_2 3 //Amount of damage applied when your body temperature passes the 400K point -#define HEAT_DAMAGE_LEVEL_3 10 //Amount of damage applied when your body temperature passes the 1000K point +#define HEAT_DAMAGE_LEVEL_3 5 //Amount of damage applied when your body temperature passes the 1000K point #define COLD_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when your body temperature just passes the 260.15k safety point #define COLD_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when your body temperature passes the 200K point diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index 6012a8fb7f3..3af2250bbbd 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -46,13 +46,13 @@ if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP SetSilence(0) else //ALIVE. LIGHTS ARE ON - if(health < config.health_threshold_dead || !get_int_organ(/obj/item/organ/internal/brain)) + if(health < HEALTH_THRESHOLD_DEAD && check_death_method() || !get_int_organ(/obj/item/organ/internal/brain)) death() SetSilence(0) return 1 //UNCONSCIOUS. NO-ONE IS HOME - if((getOxyLoss() > 50) || (config.health_threshold_crit >= health)) + if((getOxyLoss() > 50) || (HEALTH_THRESHOLD_CRIT >= health && check_death_method())) if(health <= 20 && prob(1)) emote("gasp") if(!reagents.has_reagent("epinephrine")) diff --git a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm index 44287493718..bdc2ee31f77 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm @@ -18,7 +18,7 @@ if(stat == DEAD) //If we mostly took damage from fire - if(fireloss > 125) + if(getFireLoss() > 125) icon_state = "alien[caste]_husked" pixel_y = 0 else diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index a64750ad93d..5ebaaffac0c 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -93,6 +93,9 @@ /mob/living/carbon/alien/larva/show_inv(mob/user as mob) return +/mob/living/carbon/alien/larva/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE) + return FALSE + /* Commented out because it's duplicated in life.dm /mob/living/carbon/alien/larva/proc/grow() // Larvae can grow into full fledged Xenos if they survive long enough -- TLE if(icon_state == "larva_l" && !canmove) // This is a shit death check. It is made of shit and death. Fix later. diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index a4b783e08fb..a0668db8327 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -19,7 +19,7 @@ return 1 //UNCONSCIOUS. NO-ONE IS HOME - if( (getOxyLoss() > 25) || (config.health_threshold_crit >= health) ) + if((getOxyLoss() > 25) || (HEALTH_THRESHOLD_CRIT >= health && check_death_method())) //if( health <= 20 && prob(1) ) // spawn(0) // emote("gasp") diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index 5294e3bda91..04dcb0c60ef 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -65,9 +65,9 @@ var/const/MAX_ACTIVE_TIME = 400 return /obj/item/clothing/mask/facehugger/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(exposed_temperature > 300) Die() - return /obj/item/clothing/mask/facehugger/equipped(mob/M) Attach(M) diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 2ac3b3c4d6b..d0cf06f1bf7 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -32,7 +32,7 @@ . = ..() if(.) - if(!container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life))) + if(!container && (health < HEALTH_THRESHOLD_DEAD && check_death_method() || ((world.time - timeofhostdeath) > config.revival_brain_life))) death() return 0 diff --git a/code/modules/mob/living/carbon/brain/update_status.dm b/code/modules/mob/living/carbon/brain/update_status.dm index 431d1eea0c3..6fec51bb07b 100644 --- a/code/modules/mob/living/carbon/brain/update_status.dm +++ b/code/modules/mob/living/carbon/brain/update_status.dm @@ -3,12 +3,12 @@ return // if(health <= min_health) if(stat == DEAD) - if(container && health > config.health_threshold_dead) + if(container && health > HEALTH_THRESHOLD_DEAD) update_revive() create_debug_log("revived, trigger reason: [reason]") return else - if(!container || health <= config.health_threshold_dead) + if(!container || health <= HEALTH_THRESHOLD_DEAD && check_death_method()) // Considered "dead" without any external apparatus death() create_debug_log("died, trigger reason: [reason]") diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index d72e5b6e2af..0f1c5d91df1 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -209,7 +209,7 @@ /mob/living/carbon/proc/help_shake_act(mob/living/carbon/M) add_attack_logs(M, src, "Shaked", ATKLOG_ALL) - if(health >= config.health_threshold_crit) + if(health >= HEALTH_THRESHOLD_CRIT) if(src == M && ishuman(src)) var/mob/living/carbon/human/H = src visible_message( \ diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 5d816ed625e..4ecd81e1338 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -22,9 +22,8 @@ var/wetlevel = 0 //how wet the mob is - var/failed_last_breath = FALSE //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks. var/co2overloadtime = null var/dreaming = 0 //How many dream images we have left to send var/nightmare = 0 - blood_volume = BLOOD_VOLUME_NORMAL + blood_volume = BLOOD_VOLUME_NORMAL \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 3e1c874a067..442d7aaf044 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -680,6 +680,14 @@ message = "[src] trembles." m_type = 1 + if("shudder", "shudders") + message = "[src] shudders." + m_type = 1 + + if("bshake", "bshakes") + message = "[src] shakes." + m_type = 1 + if("sneeze", "sneezes") if(miming) message = "[src] sneezes." diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 5550378984a..09787bbf73b 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1651,6 +1651,9 @@ Eyes need to have significantly high darksight to shine unless the mob has the X ..() /mob/living/carbon/human/proc/do_cpr(mob/living/carbon/human/H) + if(H == src) + to_chat(src, "You cannot perform CPR on yourself!") + return if(H.stat == DEAD || (H.status_flags & FAKEDEATH)) to_chat(src, "[H.name] is dead!") return @@ -1662,25 +1665,29 @@ Eyes need to have significantly high darksight to shine unless the mob has the X return if((head && (head.flags_cover & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && !wear_mask.mask_adjusted)) to_chat(src, "Remove your mask first!") - return 0 + return if((H.head && (H.head.flags_cover & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags_cover & MASKCOVERSMOUTH) && !H.wear_mask.mask_adjusted)) to_chat(src, "Remove [H.p_their()] mask first!") - return 0 - visible_message("[src] is trying to perform CPR on [H.name]!", \ - "You try to perform CPR on [H.name]!") + return + if(H.receiving_cpr) // To prevent spam stacking + to_chat(src, "They are already receiving CPR!") + return + visible_message("[src] is trying to perform CPR on [H.name]!", "You try to perform CPR on [H.name]!") + H.receiving_cpr = TRUE if(do_mob(src, H, 40)) - if(H.health > config.health_threshold_dead && H.health <= config.health_threshold_crit) - var/suff = min(H.getOxyLoss(), 7) - H.adjustOxyLoss(-suff) + if(H.health <= HEALTH_THRESHOLD_CRIT) + H.adjustOxyLoss(-15) + H.SetLoseBreath(0) + H.AdjustParalysis(-1) H.updatehealth("cpr") - visible_message("[src] performs CPR on [H.name]!", \ - "You perform CPR on [H.name].") + visible_message("[src] performs CPR on [H.name]!", "You perform CPR on [H.name].") to_chat(H, "You feel a breath of fresh air enter your lungs. It feels good.") - to_chat(src, "Repeat at least every 7 seconds.") + H.receiving_cpr = FALSE add_attack_logs(src, H, "CPRed", ATKLOG_ALL) - return 1 + return TRUE else + H.receiving_cpr = FALSE to_chat(src, "You need to stay still while performing CPR!") /mob/living/carbon/human/canBeHandcuffed() @@ -1696,7 +1703,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X return FALSE /mob/living/carbon/human/InCritical() - return (health <= config.health_threshold_crit && stat == UNCONSCIOUS) + return (health <= HEALTH_THRESHOLD_CRIT && stat == UNCONSCIOUS) /mob/living/carbon/human/IsAdvancedToolUser() @@ -2000,4 +2007,4 @@ Eyes need to have significantly high darksight to shine unless the mob has the X var/obj/item/organ/internal/lantern/O = get_int_organ(/obj/item/organ/internal/lantern) if(O && O.glowing) O.toggle_biolum(TRUE) - visible_message("[src] is engulfed in shadows and fades into the darkness.", "A sense of dread washes over you as you suddenly dim dark.") + visible_message("[src] is engulfed in shadows and fades into the darkness.", "A sense of dread washes over you as you suddenly dim dark.") \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index b858cca130a..b4cb92af01e 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -15,7 +15,7 @@ health = maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute //TODO: fix husking - if(((maxHealth - total_burn) < config.health_threshold_dead) && stat == DEAD) + if(((maxHealth - total_burn) < HEALTH_THRESHOLD_DEAD) && stat == DEAD) ChangeToHusk() update_stat("updatehealth([reason])") med_hud_set_health() @@ -171,11 +171,15 @@ // Defined here solely to take species flags into account without having to recast at mob/living level. /mob/living/carbon/human/adjustOxyLoss(amount) + if(NO_BREATHE in dna.species.species_traits) + return FALSE if(dna.species && amount > 0) amount = amount * dna.species.oxy_mod . = ..() /mob/living/carbon/human/setOxyLoss(amount) + if(NO_BREATHE in dna.species.species_traits) + return FALSE if(dna.species && amount > 0) amount = amount * dna.species.oxy_mod . = ..() diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 965a2c81ab2..84764bfddaa 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -513,3 +513,12 @@ emp_act return TRUE if(check_mask && wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH)) return TRUE + +/mob/living/carbon/human/proc/reagent_safety_check(hot = TRUE) + if(wear_mask) + to_chat(src, "Your [wear_mask.name] protects you from the [hot ? "hot" : "cold"] liquid!") + return FALSE + if(head) + to_chat(src, "Your [head.name] protects you from the [hot ? "hot" : "cold"] liquid!") + return FALSE + return TRUE \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 22a9d40f6fd..9bd463b73bc 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -64,6 +64,7 @@ var/global/default_martial_art = new/datum/martial_art var/check_mutations=0 // Check mutations on next life tick var/heartbeat = 0 + var/receiving_cpr = FALSE var/fire_dmi = 'icons/mob/OnFire.dmi' var/fire_sprite = "Standing" diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 8d0261528ed..81e4fe703d5 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -10,10 +10,8 @@ update_mutations() check_mutations=0 - handle_shock() handle_pain() handle_heartbeat() - handle_heartattack() handle_drunk() dna.species.handle_life(src) @@ -141,15 +139,6 @@ if(3) emote("drool") - if(getBrainLoss() >= 100 && stat != DEAD) //you lapse into a coma and die without immediate aid; RIP. -Fox - Weaken(20) - AdjustLoseBreath(10) - AdjustSilence(2) - - if(getBrainLoss() >= 120 && stat != DEAD) //they died from stupidity--literally. -Fox - visible_message("[src] goes limp, [p_their()] facial expression utterly blank.") - death() - /mob/living/carbon/human/handle_mutations_and_radiation() for(var/datum/dna/gene/gene in dna_genes) if(!gene.block) @@ -242,12 +231,10 @@ var/obj/item/organ/internal/L = get_organ_slot("lungs") if(!L || L && (L.status & ORGAN_DEAD)) - if(health >= config.health_threshold_crit) + if(health >= HEALTH_THRESHOLD_CRIT) adjustOxyLoss(HUMAN_MAX_OXYLOSS + 1) else if(!(NOCRITDAMAGE in dna.species.species_traits)) - adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS) - - failed_last_breath = TRUE + adjustOxyLoss(HUMAN_MAX_OXYLOSS) if(dna.species) var/datum/species/S = dna.species @@ -270,7 +257,7 @@ // USED IN DEATHWHISPERS /mob/living/carbon/human/proc/isInCrit() // Health is in deep shit and we're not already dead - return health <= 0 && stat != 2 + return health <= HEALTH_THRESHOLD_CRIT && stat != DEAD /mob/living/carbon/human/get_breath_from_internal(volume_needed) //making this call the parent would be far too complicated @@ -791,6 +778,70 @@ handle_organs() + if(getBrainLoss() >= 120 || (health + (getOxyLoss() / 2)) <= -500) + visible_message("[src] goes limp, their facial expression utterly blank.") + death() + return + + if(getBrainLoss() >= 100) // braindeath + AdjustLoseBreath(10, bound_lower = 0, bound_upper = 25) + Weaken(30) + + if(!check_death_method()) + if(health <= HEALTH_THRESHOLD_DEAD) + var/deathchance = min(99, ((getBrainLoss() * -5) + (health + (getOxyLoss() / 2))) * -0.01) + if(prob(deathchance)) + death() + return + + if(health <= HEALTH_THRESHOLD_CRIT) + if(prob(5)) + emote(pick("faint", "collapse", "cry", "moan", "gasp", "shudder", "shiver")) + AdjustStuttering(5, bound_lower = 0, bound_upper = 5) + EyeBlurry(5) + if(prob(7)) + AdjustConfused(2) + if(prob(5)) + Paralyse(2) + switch(health) + if(-INFINITY to -100) + adjustOxyLoss(1) + if(prob(health * -0.1)) + if(ishuman(src)) + var/mob/living/carbon/human/H = src + H.set_heartattack(TRUE) + if(prob(health * -0.2)) + var/datum/disease/D = new /datum/disease/critical/heart_failure + ForceContractDisease(D) + Paralyse(5) + if(-99 to -80) + adjustOxyLoss(1) + if(prob(4)) + to_chat(src, "Your chest hurts...") + Paralyse(2) + var/datum/disease/D = new /datum/disease/critical/heart_failure + ForceContractDisease(D) + if(-79 to -50) + adjustOxyLoss(1) + if(prob(10)) + var/datum/disease/D = new /datum/disease/critical/shock + ForceContractDisease(D) + if(prob(health * -0.08)) + var/datum/disease/D = new /datum/disease/critical/heart_failure + ForceContractDisease(D) + if(prob(6)) + to_chat(src, "You feel [pick("horrible pain", "awful", "like shit", "absolutely awful", "like death", "like you are dying", "nothing", "warm", "sweaty", "tingly", "really, really bad", "horrible")]!") + Weaken(3) + if(prob(3)) + Paralyse(2) + if(-49 to 0) + adjustOxyLoss(1) + if(prob(3)) + var/datum/disease/D = new /datum/disease/critical/shock + ForceContractDisease(D) + if(prob(5)) + to_chat(src, "You feel [pick("terrible", "awful", "like shit", "sick", "numb", "cold", "sweaty", "tingly", "horrible")]!") + Weaken(3) else //dead SetSilence(0) @@ -962,7 +1013,7 @@ return if(H.is_robotic()) //Handle robotic hearts specially with a wuuuubb. This also applies to machine-people. - if(shock_stage >= 10 || istype(get_turf(src), /turf/space)) + if(isinspace()) //PULSE_THREADY - maximum value for pulse, currently it 5. //High pulse value corresponds to a fast rate of heartbeat. //Divided by 2, otherwise it is too slow. @@ -980,7 +1031,7 @@ if(pulse == PULSE_NONE) return - if(pulse >= PULSE_2FAST || shock_stage >= 10 || istype(get_turf(src), /turf/space)) + if(pulse >= PULSE_2FAST || isinspace()) //PULSE_THREADY - maximum value for pulse, currently it 5. //High pulse value corresponds to a fast rate of heartbeat. //Divided by 2, otherwise it is too slow. @@ -999,7 +1050,7 @@ */ /mob/living/carbon/human/proc/can_heartattack() - if(NO_BLOOD in dna.species.species_traits) + if((NO_BLOOD in dna.species.species_traits) && !dna.species.forced_heartattack) return FALSE if(NO_INTORGANS in dna.species.species_traits) return FALSE @@ -1026,16 +1077,19 @@ heart.beating = !status -/mob/living/carbon/human/proc/handle_heartattack() +/mob/living/carbon/human/handle_heartattack() if(!can_heartattack() || !undergoing_cardiac_arrest() || reagents.has_reagent("corazone")) return - AdjustLoseBreath(2, bound_lower = 0, bound_upper = 3) - adjustOxyLoss(5) - Paralyse(4) - adjustBruteLoss(2) + if(getOxyLoss()) + adjustBrainLoss(3) + else if(prob(10)) + adjustBrainLoss(1) + Weaken(5) + AdjustLoseBreath(20, bound_lower = 0, bound_upper = 25) + adjustOxyLoss(20) // Need this in species. //#undef HUMAN_MAX_OXYLOSS -//#undef HUMAN_CRIT_MAX_OXYLOSS +//#undef HUMAN_CRIT_MAX_OXYLOSS \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/logout.dm b/code/modules/mob/living/carbon/human/logout.dm index c7e76343c38..2dae7ea5b9a 100644 --- a/code/modules/mob/living/carbon/human/logout.dm +++ b/code/modules/mob/living/carbon/human/logout.dm @@ -1,4 +1,4 @@ /mob/living/carbon/human/Logout() ..() - if(mind.active && stat != DEAD) + if(mind && mind.active && stat != DEAD) overlays += image('icons/effects/effects.dmi', icon_state = "zzz_glow") \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index ff8083f8093..1be6fc60a25 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -91,7 +91,7 @@ var/obj/item/organ/internal/L = get_organ_slot("lungs") if((breathes && !L) || breathes && L && (L.status & ORGAN_DEAD)) return FALSE - if(oxyloss > 10 || losebreath >= 4) + if(getOxyLoss() > 10 || losebreath >= 4) emote("gasp") return FALSE if(mind) diff --git a/code/modules/mob/living/carbon/human/shock.dm b/code/modules/mob/living/carbon/human/shock.dm deleted file mode 100644 index e2d5dd79cec..00000000000 --- a/code/modules/mob/living/carbon/human/shock.dm +++ /dev/null @@ -1,75 +0,0 @@ -/mob/living/carbon/human/var/traumatic_shock = 0 -/mob/living/carbon/human/var/shock_stage = 0 - -// proc to find out in how much pain the mob is at the moment -/mob/living/carbon/human/proc/updateshock() - traumatic_shock = getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss() - - // broken or ripped off organs will add quite a bit of pain - for(var/thing in bodyparts) - var/obj/item/organ/external/BP = thing - if(BP.status & ORGAN_BROKEN && !(BP.status & ORGAN_SPLINTED) || BP.open) - traumatic_shock += 15 - - if(reagents) - for(var/datum/reagent/R in reagents.reagent_list) - if(R.shock_reduction) - traumatic_shock = max(0, traumatic_shock - R.shock_reduction) // now you too can varedit cyanide to reduce shock by 1000 - Iamgoofball - if(drunk) - traumatic_shock = max(0, traumatic_shock - 10) - - return traumatic_shock - -/mob/living/carbon/human/proc/handle_shock() - if(status_flags & GODMODE) //godmode - return - if(NO_PAIN in dna.species.species_traits) - return - - updateshock() - - if(health <= config.health_threshold_softcrit)// health 0 makes you immediately collapse - shock_stage = max(shock_stage, 61) - - if(traumatic_shock >= 100) - shock_stage += 1 - else - shock_stage = min(shock_stage, 160) - shock_stage = max(shock_stage-1, 0) - return - - if(shock_stage == 10) - to_chat(src, ""+pick("It hurts so much!", "You really need some painkillers..", "Dear god, the pain!")) - - if(shock_stage >= 30) - if(shock_stage == 30) - custom_emote(1,"is having trouble keeping [p_their()] eyes open.") - EyeBlurry(2) - Stuttering(5) - - if(shock_stage == 40) - to_chat(src, ""+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!")) - - if(shock_stage >=60) - if(shock_stage == 60) - custom_emote(1,"falls limp.") - if(prob(2)) - to_chat(src, ""+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!")) - Weaken(20) - - if(shock_stage >= 80) - if(prob(5)) - to_chat(src, ""+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!")) - Weaken(20) - - if(shock_stage >= 120) - if(prob(2)) - to_chat(src, ""+pick("You black out!", "You feel like you could die any moment now.", "You're about to lose consciousness.")) - Paralyse(5) - - if(shock_stage == 150) - custom_emote(1,"can no longer stand, collapsing!") - Weaken(20) - - if(shock_stage >= 150) - Weaken(20) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 1335c8e2d57..e9a88fdb033 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -91,6 +91,8 @@ var/is_small var/show_ssd = 1 + var/forced_heartattack = FALSE //Some species have blood, but we still want them to have heart attacks + var/dies_at_threshold = FALSE // Do they die or get knocked out at specific thresholds, or do they go through complex crit? var/can_revive_by_healing // Determines whether or not this species can be revived by simply healing them var/has_gender = TRUE var/blacklisted = FALSE @@ -255,8 +257,6 @@ . += (health_deficiency / 75) else . += (health_deficiency / 25) - if(H.shock_stage >= 10) - . += 3 . += 2 * H.stance_damage //damaged/missing feet or legs is slow if((hungry >= 70) && !flight) @@ -298,11 +298,8 @@ // (Slime People changing color based on the reagents they consume) /datum/species/proc/handle_life(mob/living/carbon/human/H) if((NO_BREATHE in species_traits) || (BREATHLESS in H.mutations)) - H.setOxyLoss(0) - H.SetLoseBreath(0) - var/takes_crit_damage = (!(NOCRITDAMAGE in species_traits)) - if((H.health <= config.health_threshold_crit) && takes_crit_damage) + if((H.health <= HEALTH_THRESHOLD_CRIT) && takes_crit_damage) H.adjustBruteLoss(1) return @@ -315,7 +312,7 @@ /datum/species/proc/help(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) if(attacker_style && attacker_style.help_act(user, target))//adminfu only... return TRUE - if(target.health >= config.health_threshold_crit && !(target.status_flags & FAKEDEATH)) + if(target.health >= HEALTH_THRESHOLD_CRIT && !(target.status_flags & FAKEDEATH)) target.help_shake_act(user) return TRUE else @@ -539,7 +536,7 @@ return FALSE /datum/species/proc/get_perceived_trauma(mob/living/carbon/human/H) - return 100 - ((NO_PAIN in species_traits) ? 0 : H.traumatic_shock) - H.getStaminaLoss() + return H.health - H.getStaminaLoss() /datum/species/proc/handle_hud_icons(mob/living/carbon/human/H) if(!H.client) diff --git a/code/modules/mob/living/carbon/human/species/abductor.dm b/code/modules/mob/living/carbon/human/species/abductor.dm index cf1492e8408..64c5a4aa0b3 100644 --- a/code/modules/mob/living/carbon/human/species/abductor.dm +++ b/code/modules/mob/living/carbon/human/species/abductor.dm @@ -16,8 +16,7 @@ ) species_traits = list(NO_BLOOD, NO_BREATHE, VIRUSIMMUNE, NOGUNS, NO_EXAMINE) - - oxy_mod = 0 + dies_at_threshold = TRUE clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS dietflags = DIET_OMNI diff --git a/code/modules/mob/living/carbon/human/species/diona.dm b/code/modules/mob/living/carbon/human/species/diona.dm index 82def809a4b..bccbeb6c5a7 100644 --- a/code/modules/mob/living/carbon/human/species/diona.dm +++ b/code/modules/mob/living/carbon/human/species/diona.dm @@ -32,6 +32,7 @@ water and other radiation." species_traits = list(NO_BREATHE, RADIMMUNE, IS_PLANT, NO_BLOOD, NO_PAIN) + dies_at_threshold = TRUE clothing_flags = HAS_SOCKS default_hair_colour = "#000000" has_gender = FALSE @@ -39,8 +40,6 @@ taste_sensitivity = TASTE_SENSITIVITY_NO_TASTE skinned_type = /obj/item/stack/sheet/wood - oxy_mod = 0 - body_temperature = T0C + 15 //make the plant people have a bit lower body temperature, why not blood_color = "#004400" flesh_color = "#907E4A" diff --git a/code/modules/mob/living/carbon/human/species/golem.dm b/code/modules/mob/living/carbon/human/species/golem.dm index 032af8ea3b9..54b896cc557 100644 --- a/code/modules/mob/living/carbon/human/species/golem.dm +++ b/code/modules/mob/living/carbon/human/species/golem.dm @@ -6,10 +6,10 @@ deform = 'icons/mob/human_races/r_golem.dmi' species_traits = list(NO_BREATHE, NO_BLOOD, NO_PAIN, RADIMMUNE, VIRUSIMMUNE, NOGUNS) + dies_at_threshold = TRUE brute_mod = 0.45 //55% damage reduction burn_mod = 0.45 tox_mod = 0.45 - oxy_mod = 0 dietflags = DIET_OMNI //golems can eat anything because they are magic or something reagent_tag = PROCESS_ORG @@ -163,6 +163,8 @@ if(H.bodytemperature > 850 && H.on_fire && prob(25)) explosion(get_turf(H), 1, 2, 4, flame_range = 5) + msg_admin_attack("Plasma Golem ([H.name]) exploded with radius 1, 2, 4 (flame_range: 5) at ([H.x],[H.y],[H.z]). User Ckey: [key_name_admin(H)]", ATKLOG_FEW) + log_game("Plasma Golem ([H.name]) exploded with radius 1, 2, 4 (flame_range: 5) at ([H.x],[H.y],[H.z]). User Ckey: [key_name_admin(H)]", ATKLOG_FEW) if(H) H.gib() if(H.fire_stacks < 2) //flammable diff --git a/code/modules/mob/living/carbon/human/species/machine.dm b/code/modules/mob/living/carbon/human/species/machine.dm index 88ed0a626cb..4f5a65c82a2 100644 --- a/code/modules/mob/living/carbon/human/species/machine.dm +++ b/code/modules/mob/living/carbon/human/species/machine.dm @@ -19,7 +19,6 @@ burn_mod = 2.28 // So they take 50% extra damage from brute/burn overall tox_mod = 0 clone_mod = 0 - oxy_mod = 0 death_message = "gives one shrill beep before falling limp, their monitor flashing blue before completely shutting off..." species_traits = list(IS_WHITELISTED, NO_BREATHE, NO_SCAN, NO_INTORGANS, NO_PAIN, NO_DNA, RADIMMUNE, VIRUSIMMUNE, NOTRANSSTING) @@ -36,6 +35,7 @@ //Default styles for created mobs. default_hair = "Blue IPC Screen" + dies_at_threshold = TRUE can_revive_by_healing = 1 has_gender = FALSE reagent_tag = PROCESS_SYN diff --git a/code/modules/mob/living/carbon/human/species/nucleation.dm b/code/modules/mob/living/carbon/human/species/nucleation.dm index 21d8a5c0012..fe8a5587017 100644 --- a/code/modules/mob/living/carbon/human/species/nucleation.dm +++ b/code/modules/mob/living/carbon/human/species/nucleation.dm @@ -13,8 +13,8 @@ language = "Sol Common" burn_mod = 4 // holy shite, poor guys wont survive half a second cooking smores brute_mod = 2 // damn, double wham, double dam - oxy_mod = 0 species_traits = list(LIPS, IS_WHITELISTED, NO_BREATHE, NO_BLOOD, NO_PAIN, NO_SCAN, RADIMMUNE) + dies_at_threshold = TRUE dietflags = DIET_OMNI //still human at their core, so they maintain their eating habits and diet //Default styles for created mobs. diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm index a8fd532a3f1..ba249edb5a8 100644 --- a/code/modules/mob/living/carbon/human/species/plasmaman.dm +++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm @@ -7,6 +7,7 @@ //language = "Clatter" species_traits = list(IS_WHITELISTED, NO_BLOOD, NOTRANSSTING) + forced_heartattack = TRUE // Plasmamen have no blood, but they should still get heart-attacks skinned_type = /obj/item/stack/sheet/mineral/plasma // We're low on plasma, R&D! *eyes plasmaman co-worker intently* dietflags = DIET_OMNI reagent_tag = PROCESS_ORG diff --git a/code/modules/mob/living/carbon/human/species/shadow.dm b/code/modules/mob/living/carbon/human/species/shadow.dm index df1ecd61484..fb7fd2ebda1 100644 --- a/code/modules/mob/living/carbon/human/species/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/shadow.dm @@ -18,8 +18,7 @@ ) species_traits = list(NO_BREATHE, NO_BLOOD, RADIMMUNE, VIRUSIMMUNE) - - oxy_mod = 0 + dies_at_threshold = TRUE dietflags = DIET_OMNI //the mutation process allowed you to now digest all foods regardless of initial race reagent_tag = PROCESS_ORG diff --git a/code/modules/mob/living/carbon/human/species/shadowling.dm b/code/modules/mob/living/carbon/human/species/shadowling.dm index 1ce7b5cd0e0..f65aedb530b 100644 --- a/code/modules/mob/living/carbon/human/species/shadowling.dm +++ b/code/modules/mob/living/carbon/human/species/shadowling.dm @@ -11,7 +11,6 @@ species_traits = list(NO_BLOOD, NO_BREATHE, RADIMMUNE, NOGUNS, NO_EXAMINE) //Can't use guns due to muzzle flash burn_mod = 1.5 //1.5x burn damage, 2x is excessive - oxy_mod = 0 heatmod = 1.5 silent_steps = 1 @@ -63,7 +62,6 @@ species_traits = list(NO_BLOOD, NO_BREATHE, RADIMMUNE, NO_EXAMINE) burn_mod = 1.1 - oxy_mod = 0 heatmod = 1.1 /datum/species/shadow/ling/lesser/handle_life(mob/living/carbon/human/H) diff --git a/code/modules/mob/living/carbon/human/species/skeleton.dm b/code/modules/mob/living/carbon/human/species/skeleton.dm index 6a2b74fb671..50920798d70 100644 --- a/code/modules/mob/living/carbon/human/species/skeleton.dm +++ b/code/modules/mob/living/carbon/human/species/skeleton.dm @@ -11,10 +11,9 @@ flesh_color = "#E6E6C6" species_traits = list(NO_BREATHE, NO_BLOOD, RADIMMUNE, VIRUSIMMUNE) + dies_at_threshold = TRUE skinned_type = /obj/item/stack/sheet/bone - oxy_mod = 0 - dietflags = DIET_OMNI reagent_tag = PROCESS_ORG diff --git a/code/modules/mob/living/carbon/human/species/slime.dm b/code/modules/mob/living/carbon/human/species/slime.dm index 5631f600afc..b33ebc1f048 100644 --- a/code/modules/mob/living/carbon/human/species/slime.dm +++ b/code/modules/mob/living/carbon/human/species/slime.dm @@ -20,13 +20,13 @@ cold_level_3 = 200 coldmod = 3 - oxy_mod = 0 brain_mod = 2.5 male_cough_sounds = list('sound/effects/slime_squish.ogg') female_cough_sounds = list('sound/effects/slime_squish.ogg') species_traits = list(LIPS, IS_WHITELISTED, NO_BREATHE, NO_INTORGANS, NO_SCAN) + dies_at_threshold = TRUE clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS bodyflags = HAS_SKIN_COLOR | NO_EYES dietflags = DIET_CARN @@ -83,7 +83,7 @@ H.update_body() ..() -/datum/species/slime/can_hear() // fucking snowflakes +/datum/species/slime/can_hear() // fucking snowflakes . = TRUE /datum/action/innate/slimecolor diff --git a/code/modules/mob/living/carbon/human/species/vox.dm b/code/modules/mob/living/carbon/human/species/vox.dm index bc21dd1ee5f..436c3d32b3b 100644 --- a/code/modules/mob/living/carbon/human/species/vox.dm +++ b/code/modules/mob/living/carbon/human/species/vox.dm @@ -173,6 +173,7 @@ eyes = "blank_eyes" species_traits = list(NO_SCAN, NO_BLOOD, NO_PAIN, IS_WHITELISTED) + dies_at_threshold = TRUE bodyflags = HAS_TAIL dietflags = DIET_OMNI //should inherit this from vox, this is here just in case diff --git a/code/modules/mob/living/carbon/human/species/wryn.dm b/code/modules/mob/living/carbon/human/species/wryn.dm index 8c576f9e30e..6069da28f84 100644 --- a/code/modules/mob/living/carbon/human/species/wryn.dm +++ b/code/modules/mob/living/carbon/human/species/wryn.dm @@ -39,7 +39,7 @@ clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS dietflags = DIET_HERB //bees feed off nectar, so bee people feed off plants too - oxy_mod = 0 + dies_at_threshold = TRUE reagent_tag = PROCESS_ORG base_color = "#704300" diff --git a/code/modules/mob/living/carbon/human/status_procs.dm b/code/modules/mob/living/carbon/human/status_procs.dm index e7a65129017..9a1c7a5bbd6 100644 --- a/code/modules/mob/living/carbon/human/status_procs.dm +++ b/code/modules/mob/living/carbon/human/status_procs.dm @@ -1,3 +1,8 @@ +/mob/living/carbon/human/SetLoseBreath(amount) + if(NO_BREATHE in dna.species.species_traits) + return FALSE + . = ..() + /mob/living/carbon/human/SetStunned(amount, updating = 1, force = 0) if(dna.species) amount = amount * dna.species.stun_mod diff --git a/code/modules/mob/living/carbon/human/update_stat.dm b/code/modules/mob/living/carbon/human/update_stat.dm index d8c26a91964..5dfd98c0b63 100644 --- a/code/modules/mob/living/carbon/human/update_stat.dm +++ b/code/modules/mob/living/carbon/human/update_stat.dm @@ -15,7 +15,7 @@ if(dna.species && dna.species.can_revive_by_healing) var/obj/item/organ/internal/brain/B = get_int_organ(/obj/item/organ/internal/brain) if(B) - if((health >= (config.health_threshold_dead + config.health_threshold_crit) * 0.5) && getBrainLoss()<120) + if((health >= (HEALTH_THRESHOLD_DEAD + HEALTH_THRESHOLD_CRIT) * 0.5) && getBrainLoss() < 120) update_revive() create_debug_log("revived from healing, trigger reason: [reason]") @@ -30,4 +30,7 @@ /mob/living/carbon/human/can_hear() . = TRUE // Fallback if we don't have a species if(dna.species) - . = dna.species.can_hear(src) \ No newline at end of file + . = dna.species.can_hear(src) + +/mob/living/carbon/human/check_death_method() + return dna.species.dies_at_threshold \ No newline at end of file diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 18e42c98d08..48d8137092a 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -27,8 +27,8 @@ //Start of a breath chain, calls breathe() /mob/living/carbon/handle_breathing(times_fired) - if(times_fired % 4 == 2 || failed_last_breath) - breathe() //Breathe per 4 ticks, unless suffocating + if(times_fired % 2 == 1) + breathe() //Breathe every other tick, unless suffocating else if(istype(loc, /obj/)) var/obj/location_as_object = loc @@ -47,13 +47,13 @@ var/datum/gas_mixture/breath - if(health <= config.health_threshold_crit) + if(health <= HEALTH_THRESHOLD_CRIT && check_death_method()) AdjustLoseBreath(1) //Suffocate if(losebreath > 0) AdjustLoseBreath(-1) - if(prob(10)) + if(prob(75)) emote("gasp") if(istype(loc, /obj/)) var/obj/loc_as_obj = loc @@ -97,7 +97,6 @@ //CRIT if(!breath || (breath.total_moles() == 0) || !lungs) adjustOxyLoss(1) - failed_last_breath = TRUE throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy) return FALSE @@ -121,15 +120,12 @@ if(O2_partialpressure > 0) var/ratio = 1 - O2_partialpressure/safe_oxy_min adjustOxyLoss(min(5*ratio, 3)) - failed_last_breath = TRUE oxygen_used = breath.oxygen*ratio else adjustOxyLoss(3) - failed_last_breath = TRUE throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy) else //Enough oxygen - failed_last_breath = FALSE adjustOxyLoss(-5) oxygen_used = breath.oxygen clear_alert("not_enough_oxy") @@ -406,35 +402,54 @@ handle_hud_icons_health_overlay() /mob/living/carbon/proc/handle_hud_icons_health_overlay() - if(stat == UNCONSCIOUS && health <= config.health_threshold_crit) - var/severity = 0 - switch(health) - if(-20 to -10) severity = 1 - if(-30 to -20) severity = 2 - if(-40 to -30) severity = 3 - if(-50 to -40) severity = 4 - if(-60 to -50) severity = 5 - if(-70 to -60) severity = 6 - if(-80 to -70) severity = 7 - if(-90 to -80) severity = 8 - if(-95 to -90) severity = 9 - if(-INFINITY to -95) severity = 10 - overlay_fullscreen("crit", /obj/screen/fullscreen/crit, severity) - else if(stat == CONSCIOUS) - clear_fullscreen("crit") - if(oxyloss) + if(stat == UNCONSCIOUS && health <= HEALTH_THRESHOLD_CRIT) + if(check_death_method()) var/severity = 0 - switch(oxyloss) - if(10 to 20) severity = 1 - if(20 to 25) severity = 2 - if(25 to 30) severity = 3 - if(30 to 35) severity = 4 - if(35 to 40) severity = 5 - if(40 to 45) severity = 6 - if(45 to INFINITY) severity = 7 - overlay_fullscreen("oxy", /obj/screen/fullscreen/oxy, severity) - else - clear_fullscreen("oxy") + switch(health) + if(-20 to -10) + severity = 1 + if(-30 to -20) + severity = 2 + if(-40 to -30) + severity = 3 + if(-50 to -40) + severity = 4 + if(-60 to -50) + severity = 5 + if(-70 to -60) + severity = 6 + if(-80 to -70) + severity = 7 + if(-90 to -80) + severity = 8 + if(-95 to -90) + severity = 9 + if(-INFINITY to -95) + severity = 10 + overlay_fullscreen("crit", /obj/screen/fullscreen/crit, severity) + else if(stat == CONSCIOUS) + if(check_death_method()) + clear_fullscreen("crit") + if(getOxyLoss()) + var/severity = 0 + switch(getOxyLoss()) + if(10 to 20) + severity = 1 + if(20 to 25) + severity = 2 + if(25 to 30) + severity = 3 + if(30 to 35) + severity = 4 + if(35 to 40) + severity = 5 + if(40 to 45) + severity = 6 + if(45 to INFINITY) + severity = 7 + overlay_fullscreen("oxy", /obj/screen/fullscreen/oxy, severity) + else + clear_fullscreen("oxy") //Fire and Brute damage overlay (BSSR) var/hurtdamage = getBruteLoss() + getFireLoss() + damageoverlaytemp @@ -450,4 +465,4 @@ if(85 to INFINITY) severity = 6 overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity) else - clear_fullscreen("brute") + clear_fullscreen("brute") \ No newline at end of file diff --git a/code/modules/mob/living/carbon/slime/life.dm b/code/modules/mob/living/carbon/slime/life.dm index 649ec7b3f00..e3bfcb74431 100644 --- a/code/modules/mob/living/carbon/slime/life.dm +++ b/code/modules/mob/living/carbon/slime/life.dm @@ -174,11 +174,11 @@ else health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss()) - if(health < config.health_threshold_dead && stat != 2) + if(health < HEALTH_THRESHOLD_DEAD && check_death_method() && stat != DEAD) death() return - else if(src.health <= config.health_threshold_crit) + else if(src.health <= HEALTH_THRESHOLD_CRIT && check_death_method()) if(!src.reagents.has_reagent("epinephrine")) src.adjustOxyLoss(10) diff --git a/code/modules/mob/living/carbon/update_status.dm b/code/modules/mob/living/carbon/update_status.dm index 22030c78f4b..58c6e09764b 100644 --- a/code/modules/mob/living/carbon/update_status.dm +++ b/code/modules/mob/living/carbon/update_status.dm @@ -3,12 +3,12 @@ return if(stat != DEAD) // if(health <= min_health) - if(health <= config.health_threshold_dead) + if(health <= HEALTH_THRESHOLD_DEAD && check_death_method()) death() create_debug_log("died of damage, trigger reason: [reason]") return // if(paralysis || sleeping || getOxyLoss() > low_oxy_ko || (status_flags & FAKEDEATH) || health <= crit_health) - if(paralysis || sleeping || getOxyLoss() > 50 || (status_flags & FAKEDEATH) || health <= config.health_threshold_crit) + if(paralysis || sleeping || (check_death_method() && getOxyLoss() > 50) || (status_flags & FAKEDEATH) || health <= HEALTH_THRESHOLD_CRIT && check_death_method()) if(stat == CONSCIOUS) KnockOut() create_debug_log("fell unconscious, trigger reason: [reason]") @@ -21,7 +21,7 @@ ..() if(staminaloss) var/total_health = (health - staminaloss) - if(total_health <= config.health_threshold_softcrit && !stat) + if(total_health <= HEALTH_THRESHOLD_CRIT && !stat) to_chat(src, "You're too exhausted to keep going...") Weaken(5) setStaminaLoss(health - 2) diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index 734dd556b48..e3005292c95 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -104,11 +104,11 @@ /mob/living/proc/getBruteLoss() return bruteloss -/mob/living/proc/adjustBruteLoss(var/amount, updating_health = TRUE) +/mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE) if(status_flags & GODMODE) return FALSE //godmode var/old_bruteloss = bruteloss - bruteloss = min(max(bruteloss + amount, 0),(maxHealth*2)) + bruteloss = max(bruteloss + amount, 0) if(old_bruteloss == bruteloss) updating_health = FALSE . = STATUS_UPDATE_NONE @@ -120,11 +120,13 @@ /mob/living/proc/getOxyLoss() return oxyloss -/mob/living/proc/adjustOxyLoss(var/amount, updating_health = TRUE) +/mob/living/proc/adjustOxyLoss(amount, updating_health = TRUE) if(status_flags & GODMODE) return FALSE //godmode + if(BREATHLESS in mutations) + return FALSE var/old_oxyloss = oxyloss - oxyloss = min(max(oxyloss + amount, 0),(maxHealth*2)) + oxyloss = max(oxyloss + amount, 0) if(old_oxyloss == oxyloss) updating_health = FALSE . = STATUS_UPDATE_NONE @@ -136,6 +138,8 @@ /mob/living/proc/setOxyLoss(amount, updating_health = TRUE) if(status_flags & GODMODE) return FALSE //godmode + if(BREATHLESS in mutations) + return FALSE var/old_oxyloss = oxyloss oxyloss = amount if(old_oxyloss == oxyloss) @@ -149,11 +153,11 @@ /mob/living/proc/getToxLoss() return toxloss -/mob/living/proc/adjustToxLoss(var/amount, updating_health = TRUE) +/mob/living/proc/adjustToxLoss(amount, updating_health = TRUE) if(status_flags & GODMODE) return FALSE //godmode var/old_toxloss = toxloss - toxloss = min(max(toxloss + amount, 0),(maxHealth*2)) + toxloss = max(toxloss + amount, 0) if(old_toxloss == toxloss) updating_health = FALSE . = STATUS_UPDATE_NONE @@ -162,7 +166,7 @@ if(updating_health) updatehealth("adjustToxLoss") -/mob/living/proc/setToxLoss(var/amount, updating_health = TRUE) +/mob/living/proc/setToxLoss(amount, updating_health = TRUE) if(status_flags & GODMODE) return FALSE //godmode var/old_toxloss = toxloss @@ -178,11 +182,11 @@ /mob/living/proc/getFireLoss() return fireloss -/mob/living/proc/adjustFireLoss(var/amount, updating_health = TRUE) +/mob/living/proc/adjustFireLoss(amount, updating_health = TRUE) if(status_flags & GODMODE) return FALSE //godmode var/old_fireloss = fireloss - fireloss = min(max(fireloss + amount, 0),(maxHealth*2)) + fireloss = max(fireloss + amount, 0) if(old_fireloss == fireloss) updating_health = FALSE . = STATUS_UPDATE_NONE @@ -194,11 +198,11 @@ /mob/living/proc/getCloneLoss() return cloneloss -/mob/living/proc/adjustCloneLoss(var/amount, updating_health = TRUE) +/mob/living/proc/adjustCloneLoss(amount, updating_health = TRUE) if(status_flags & GODMODE) return FALSE //godmode var/old_cloneloss = cloneloss - cloneloss = min(max(cloneloss + amount, 0),(maxHealth*2)) + cloneloss = max(cloneloss + amount, 0) if(old_cloneloss == cloneloss) updating_health = FALSE . = STATUS_UPDATE_NONE @@ -207,8 +211,9 @@ if(updating_health) updatehealth("adjustCloneLoss") -/mob/living/proc/setCloneLoss(var/amount, updating_health = TRUE) - if(status_flags & GODMODE) return 0 //godmode +/mob/living/proc/setCloneLoss(amount, updating_health = TRUE) + if(status_flags & GODMODE) + return FALSE //godmode var/old_cloneloss = cloneloss cloneloss = amount if(old_cloneloss == cloneloss) @@ -235,7 +240,7 @@ if(status_flags & GODMODE) return FALSE var/old_stamloss = staminaloss - staminaloss = min(max(staminaloss + amount, 0),(maxHealth*2)) + staminaloss = max(staminaloss + amount, 0) if(old_stamloss == staminaloss) updating = FALSE . = STATUS_UPDATE_NONE @@ -300,4 +305,4 @@ updatehealth("take overall damage") /mob/living/proc/has_organic_damage() - return (maxHealth - health) + return (maxHealth - health) \ No newline at end of file diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm index 43a811dc3a3..a5897666916 100644 --- a/code/modules/mob/living/death.dm +++ b/code/modules/mob/living/death.dm @@ -59,7 +59,7 @@ if(!gibbed && deathgasp_on_death) emote("deathgasp") - if(suiciding) + if(mind && suiciding) mind.suicided = TRUE clear_fullscreens() update_sight() diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 66f3eec1683..0569c944382 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -25,6 +25,10 @@ handle_diseases() + //Heart Attack, if applicable + if(stat != DEAD) + handle_heartattack() + //Handle temperature/pressure differences between body and environment if(environment) handle_environment(environment) @@ -56,6 +60,9 @@ /mob/living/proc/handle_breathing(times_fired) return +/mob/living/proc/handle_heartattack() + return + /mob/living/proc/handle_mutations_and_radiation() radiation = 0 //so radiation don't accumulate in simple animals return diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index bf933f568d4..3c5fb59aea8 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -246,17 +246,18 @@ set hidden = 1 if(InCritical()) create_attack_log("[src] has ["succumbed to death"] with [round(health, 0.1)] points of health!") - adjustOxyLoss(health - config.health_threshold_dead) + adjustOxyLoss(health - HEALTH_THRESHOLD_DEAD) // super check for weird mobs, including ones that adjust hp // we don't want to go overboard and gib them, though for(var/i = 1 to 5) - if(health < config.health_threshold_dead) + if(health < HEALTH_THRESHOLD_DEAD) break - take_overall_damage(max(5, health - config.health_threshold_dead), 0) + take_overall_damage(max(5, health - HEALTH_THRESHOLD_DEAD), 0) + death() to_chat(src, "You have given up life and succumbed to death.") /mob/living/proc/InCritical() - return (health < 0 && health > -95.0 && stat == UNCONSCIOUS) + return (health < HEALTH_THRESHOLD_CRIT && health > HEALTH_THRESHOLD_DEAD && stat == UNCONSCIOUS) /mob/living/ex_act(severity) ..() @@ -462,7 +463,6 @@ human_mob = src human_mob.set_heartattack(FALSE) human_mob.restore_blood() - human_mob.shock_stage = 0 human_mob.decaylevel = 0 human_mob.remove_all_embedded_objects() diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index f65faaba70d..0641ce380f5 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -179,7 +179,8 @@ var/turf/location = get_turf(src) location.hotspot_expose(700, 50, 1) -/mob/living/fire_act() +/mob/living/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + ..() adjust_fire_stacks(3) IgniteMob() diff --git a/code/modules/mob/living/silicon/ai/update_status.dm b/code/modules/mob/living/silicon/ai/update_status.dm index 18a35534db8..fd001956c67 100644 --- a/code/modules/mob/living/silicon/ai/update_status.dm +++ b/code/modules/mob/living/silicon/ai/update_status.dm @@ -2,7 +2,7 @@ if(status_flags & GODMODE) return if(stat != DEAD) - if(health <= config.health_threshold_dead) + if(health <= HEALTH_THRESHOLD_DEAD && check_death_method()) death() create_debug_log("died of damage, trigger reason: [reason]") return diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 752cdc0f631..5f37177f674 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -230,7 +230,7 @@ if(on_fire) overlays += image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning") -/mob/living/silicon/robot/fire_act() +/mob/living/silicon/robot/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) if(!on_fire) //Silicons don't gain stacks from hotspots, but hotspots can ignite them IgniteMob() diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index c37b54938ac..9532daabab8 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -11,6 +11,7 @@ speak_emote = list("purrs", "meows") emote_hear = list("meows", "mews") emote_see = list("shakes its head", "shivers") + var/meow_sound = 'sound/creatures/cat_meow.ogg' //Used in emote. speak_chance = 1 turns_per_move = 5 see_in_dark = 6 @@ -146,6 +147,40 @@ stop_automated_movement = 1 walk_to(src,movement_target,0,3) +/mob/living/simple_animal/pet/cat/emote(act, m_type=1, message = null) + if(stat != CONSCIOUS) + return + + var/on_CD = 0 + act = lowertext(act) + switch(act) + if("meow") + on_CD = handle_emote_CD() + if("hiss") + on_CD = handle_emote_CD() + if("purr") + on_CD = handle_emote_CD() + else + on_CD = 0 + + if(on_CD == 1) + return + + switch(act) + if("meow") + message = "[src] [pick(emote_hear)]!" + m_type = 2 //audible + playsound(src, meow_sound, 50, 0.75) + if("hiss") + message = "[src] hisses!" + m_type = 2 + if("purr") + message = "[src] purrs." + m_type = 2 + if("help") + to_chat(src, "scream, meow, hiss, purr") + + ..() /mob/living/simple_animal/pet/cat/Proc name = "Proc" @@ -168,6 +203,7 @@ icon_living = "Syndicat" icon_dead = "Syndicat_dead" icon_resting = "Syndicat_rest" + meow_sound = null //Need robo-meow. gender = FEMALE mutations = list(BREATHLESS) faction = list("syndicate") diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 4d7ff459563..832d92c9d8f 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -13,6 +13,8 @@ speak_emote = list("barks", "woofs") emote_hear = list("barks", "woofs", "yaps","pants") emote_see = list("shakes its head", "shivers") + var/bark_sound = list('sound/creatures/dog_bark1.ogg','sound/creatures/dog_bark2.ogg') //Used in emote. + var/yelp_sound = 'sound/creatures/dog_yelp.ogg' //Used on death. speak_chance = 1 turns_per_move = 10 butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/corgi = 3) @@ -401,6 +403,40 @@ return valid +/mob/living/simple_animal/pet/corgi/death(gibbed) + playsound(src, yelp_sound, 75, 1) + ..() + +/mob/living/simple_animal/pet/corgi/emote(act, m_type=1, message = null) + if(stat != CONSCIOUS) + return + + var/on_CD = 0 + act = lowertext(act) + switch(act) + if("bark") + on_CD = handle_emote_CD() + if("growl") + on_CD = handle_emote_CD() + else + on_CD = 0 + + if(on_CD == 1) + return + + switch(act) + if("bark") + message = "[src] [pick(src.speak_emote)]!" + m_type = 2 //audible + playsound(src, pick(src.bark_sound), 50, 0.85) + if("growl") + message = "[src] growls!" + m_type = 2 //audible + if("help") + to_chat(src, "scream, bark, growl") + + ..() + //IAN! SQUEEEEEEEEE~ /mob/living/simple_animal/pet/corgi/Ian @@ -574,6 +610,8 @@ desc = "It's a borgi." icon_state = "borgi" icon_living = "borgi" + bark_sound = null //No robo-bjork... + yelp_sound = null //Or robo-Yelp. var/emagged = 0 atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) minbodytemp = 0 diff --git a/code/modules/mob/living/simple_animal/friendly/diona.dm b/code/modules/mob/living/simple_animal/friendly/diona.dm index 89dc02d54b9..07a5fcf0131 100644 --- a/code/modules/mob/living/simple_animal/friendly/diona.dm +++ b/code/modules/mob/living/simple_animal/friendly/diona.dm @@ -32,7 +32,7 @@ melee_damage_upper = 8 attacktext = "bites" attack_sound = 'sound/weapons/bite.ogg' - var/chirp_sound = 'sound/misc/nymphchirp.ogg' //used in emote + var/chirp_sound = 'sound/creatures/nymphchirp.ogg' //used in emote speed = 0 stop_automated_movement = 0 @@ -109,6 +109,8 @@ forceMove(M) else get_scooped(M) + else + ..() /mob/living/simple_animal/diona/proc/merge() if(stat != CONSCIOUS) diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 28dfe0520ea..c84947c7363 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -10,7 +10,7 @@ speak_emote = list("squeeks","squeaks","squiks") emote_hear = list("squeeks","squeaks","squiks") emote_see = list("runs in a circle", "shakes", "scritches at something") - var/squeak_sound = 'sound/effects/mousesqueek.ogg' + var/squeak_sound = 'sound/creatures/mousesqueak.ogg' speak_chance = 1 turns_per_move = 5 see_in_dark = 6 @@ -74,7 +74,6 @@ desc = "It's a small [mouse_color] rodent, often seen hiding in maintenance areas and making a nuisance of itself." /mob/living/simple_animal/mouse/proc/splat() - playsound(src, squeak_sound, 40, 1) src.health = 0 src.stat = DEAD src.icon_dead = "mouse_[mouse_color]_splat" @@ -102,6 +101,7 @@ /mob/living/simple_animal/mouse/death(gibbed) // Only execute the below if we successfully died + playsound(src, squeak_sound, 40, 1) . = ..(gibbed) if(!.) return FALSE @@ -126,7 +126,7 @@ switch(act) if("squeak") - message = "\The [src] squeaks!" + message = "\The [src] [pick(emote_hear)]!" m_type = 2 //audible playsound(src, squeak_sound, 40, 1) if("help") diff --git a/code/modules/mob/living/simple_animal/hostile/hellhound.dm b/code/modules/mob/living/simple_animal/hostile/hellhound.dm index 450f6767892..f3e110d0099 100644 --- a/code/modules/mob/living/simple_animal/hostile/hellhound.dm +++ b/code/modules/mob/living/simple_animal/hostile/hellhound.dm @@ -71,7 +71,7 @@ else if(health > (maxHealth*0.25)) msgs += "It is covered in wounds!" if(resting) - if(bruteloss > 0 || fireloss > 0) + if(getBruteLoss() || getFireLoss()) msgs += "It is currently licking its wounds, regenerating the damage to its body!" else msgs += "It is currently resting." @@ -79,7 +79,7 @@ /mob/living/simple_animal/hostile/hellhound/Life(seconds, times_fired) . = ..() - if(stat != DEAD && resting && (bruteloss > 0) || (fireloss > 0)) + if(stat != DEAD && resting && (getBruteLoss() || getFireLoss())) if(life_regen_cycles >= life_regen_cycle_trigger) life_regen_cycles = 0 to_chat(src, "You lick your wounds, helping them close.") @@ -91,7 +91,7 @@ /mob/living/simple_animal/hostile/hellhound/proc/wants_to_rest() if(target) return FALSE - if(bruteloss > 0 || fireloss > 0) + if(getBruteLoss() || getFireLoss()) return TRUE return FALSE diff --git a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm index 4041e95c6c7..74a28c58c3f 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm @@ -98,7 +98,7 @@ /obj/item/organ/internal/hivelord_core/on_life() ..() - if(owner.health < config.health_threshold_crit) + if(owner.health < HEALTH_THRESHOLD_CRIT) ui_action_click() /obj/item/organ/internal/hivelord_core/afterattack(atom/target, mob/user, proximity_flag) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index 562c90588f8..39c03feb928 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -71,6 +71,9 @@ var/global/list/ts_spiderling_list = list() speak_emote = list("hisses") emote_hear = list("hisses") + // Sentience Type + sentience_type = SENTIENCE_OTHER + // Languages are handled in terror_spider/New() // Interaction keywords @@ -313,12 +316,12 @@ var/global/list/ts_spiderling_list = list() adjustToxLoss(rand(1,10)) if(regen_points < regen_points_max) regen_points += regen_points_per_tick - if((bruteloss > 0) || (fireloss > 0)) + if(getBruteLoss() || getFireLoss()) if(regen_points > regen_points_per_hp) - if(bruteloss > 0) + if(getBruteLoss()) adjustBruteLoss(-1) regen_points -= regen_points_per_hp - else if(fireloss > 0) + else if(getFireLoss()) adjustFireLoss(-1) regen_points -= regen_points_per_hp if(prob(5)) diff --git a/code/modules/mob/living/stat_states.dm b/code/modules/mob/living/stat_states.dm index fa5530091c9..70cced62aab 100644 --- a/code/modules/mob/living/stat_states.dm +++ b/code/modules/mob/living/stat_states.dm @@ -33,7 +33,7 @@ /mob/living/proc/can_be_revived() . = TRUE // if(health <= min_health) - if(health <= config.health_threshold_dead) + if(health <= HEALTH_THRESHOLD_DEAD) return FALSE // death() is used to make a mob die @@ -71,3 +71,6 @@ spell.updateButtonIcon() return 1 + +/mob/living/proc/check_death_method() + return TRUE \ No newline at end of file diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 4e5c778b7fb..2eea5755293 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -297,6 +297,8 @@ SetLoseBreath(max(losebreath, amount)) /mob/living/SetLoseBreath(amount) + if(BREATHLESS in mutations) + return FALSE losebreath = max(amount, 0) /mob/living/AdjustLoseBreath(amount, bound_lower = 0, bound_upper = INFINITY) diff --git a/code/modules/mob/living/update_status.dm b/code/modules/mob/living/update_status.dm index daf058bb41b..bec41f68698 100644 --- a/code/modules/mob/living/update_status.dm +++ b/code/modules/mob/living/update_status.dm @@ -110,7 +110,7 @@ if(status_flags & GODMODE) return if(stat != DEAD) - if(health <= config.health_threshold_dead) + if(health <= HEALTH_THRESHOLD_DEAD && check_death_method()) death() create_debug_log("died of damage, trigger reason: [reason]") else if(paralysis || status_flags & FAKEDEATH) diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm index 6e2c8e6b521..c1124bee744 100644 --- a/code/modules/paperwork/contract.dm +++ b/code/modules/paperwork/contract.dm @@ -104,7 +104,7 @@ H.visible_message("[H] holds up a contract claiming his soul, then immediately catches fire. It looks like \he's trying to commit suicide!") H.adjust_fire_stacks(20) H.IgniteMob() - return(FIRELOSS) + return FIRELOSS else ..() diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 8e176a19131..d5ca6b0b0f8 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -401,7 +401,7 @@ add_fingerprint(user) -/obj/item/paper/fire_act() +/obj/item/paper/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) ..() if(burn_state >= FLAMMABLE) //Only render paper that's burnable to be hard to read. info = "[stars(info)]" diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index a3f41c0ac25..e8643c97cff 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -12,7 +12,7 @@ var/amount = 30 //How much paper is in the bin. var/list/papers = list() //List of papers put in the bin for reference. -/obj/item/paper_bin/fire_act() +/obj/item/paper_bin/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) if(!amount) return ..() diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 83897e5cbd3..302f2e02342 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -26,7 +26,7 @@ /obj/item/pen/suicide_act(mob/user) to_chat(viewers(user), "[user] starts scribbling numbers over [user.p_them()]self with the [name]! It looks like [user.p_theyre()] trying to commit sudoku.") - return (BRUTELOSS) + return BRUTELOSS /obj/item/pen/blue name = "blue-ink pen" diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm index 9bb3a09ebb0..8e78f0ce230 100644 --- a/code/modules/paperwork/stamps.dm +++ b/code/modules/paperwork/stamps.dm @@ -15,7 +15,7 @@ /obj/item/stamp/suicide_act(mob/user) user.visible_message("[user] stamps 'VOID' on [user.p_their()] forehead, then promptly falls over, dead.") - return (OXYLOSS) + return OXYLOSS /obj/item/stamp/qm name = "Quartermaster's rubber stamp" diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 410b91bdf48..238d2e43599 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -504,7 +504,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( user.visible_message("[user] is making a noose with the [name]! It looks like [user.p_theyre()] trying to commit suicide.") else user.visible_message("[user] is strangling [user.p_them()]self with the [name]! It looks like [user.p_theyre()] trying to commit suicide.") - return(OXYLOSS) + return OXYLOSS /obj/item/stack/cable_coil/New(loc, length = MAXCOIL, paramcolor = null) ..() diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 3bc2b5bc39b..192ef9d792e 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -90,7 +90,7 @@ /obj/item/stock_parts/cell/suicide_act(mob/user) to_chat(viewers(user), "[user] is licking the electrodes of the [src]! It looks like [user.p_theyre()] trying to commit suicide.") - return (FIRELOSS) + return FIRELOSS /obj/item/stock_parts/cell/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/reagent_containers/syringe)) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index dcd884da879..8dda1ed8731 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -586,6 +586,7 @@ // called when on fire /obj/machinery/light/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() if(prob(max(0, exposed_temperature - 673))) //0% at <400C, 100% at >500C broken() diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 795b5942845..8c9b0cf66f8 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -154,14 +154,14 @@ var/obj/item/ammo_casing/energy/shot = ammo_type[select] power_supply.use(shot.e_cost) update_icon() - return(FIRELOSS) + return FIRELOSS else user.visible_message("[user] panics and starts choking to death!") - return(OXYLOSS) + return OXYLOSS else user.visible_message("[user] is pretending to blow [user.p_their()] brains out with the [name]! It looks like [user.p_theyre()] trying to commit suicide!") playsound(loc, 'sound/weapons/empty.ogg', 50, 1, -1) - return (OXYLOSS) + return OXYLOSS /obj/item/gun/energy/vv_edit_var(var_name, var_value) switch(var_name) diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 74ab90fcbc4..623986f5837 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -137,7 +137,7 @@ playsound(loc, 'sound/weapons/kenetic_reload.ogg', 60, 1) user.visible_message("[user] cocks the [name] and pretends to blow [user.p_their()] brains out! It looks like [user.p_theyre()] trying to commit suicide!") shoot_live_shot() - return (OXYLOSS) + return OXYLOSS // Plasma Cutters // /obj/item/gun/energy/plasmacutter diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 6e558dedbd1..9defe7637d4 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -55,7 +55,7 @@ /obj/item/gun/projectile/proc/can_reload() return !magazine -/obj/item/gun/projectile/proc/reload(obj/item/ammo_box/magazine/AM, mob/user as mob) +/obj/item/gun/projectile/proc/reload(obj/item/ammo_box/magazine/AM, mob/user as mob) user.remove_from_mob(AM) magazine = AM magazine.loc = src @@ -81,7 +81,7 @@ to_chat(user, "You perform a tactical reload on \the [src], replacing the magazine.") magazine.loc = get_turf(loc) magazine.update_icon() - magazine = null + magazine = null reload(AM, user) return TRUE else @@ -165,14 +165,14 @@ if(user.l_hand == src || user.r_hand == src) process_fire(user, user, 0, zone_override = "head") user.visible_message("[user] blows [user.p_their()] brains out with the [name]!") - return(BRUTELOSS) + return BRUTELOSS else user.visible_message("[user] panics and starts choking to death!") - return(OXYLOSS) + return OXYLOSS else user.visible_message("[user] is pretending to blow [user.p_their()] brains out with the [name]! It looks like [user.p_theyre()] trying to commit suicide!") playsound(loc, 'sound/weapons/empty.ogg', 50, 1, -1) - return (OXYLOSS) + return OXYLOSS /obj/item/gun/projectile/proc/sawoff(mob/user) if(sawn_state == SAWN_OFF) diff --git a/code/modules/reagents/chem_splash.dm b/code/modules/reagents/chem_splash.dm index e586e6f806b..c73ffc72ced 100644 --- a/code/modules/reagents/chem_splash.dm +++ b/code/modules/reagents/chem_splash.dm @@ -25,8 +25,7 @@ for(var/datum/reagents/R in reactants) R.trans_to(splash_holder, R.total_volume, threatscale, 1, 1) total_temp += R.chem_temp - splash_holder.chem_temp = (total_temp/reactants.len) + extra_heat // Average temperature of reagents + extra heat. - splash_holder.handle_reactions() // React them now. + splash_holder.set_reagent_temp((total_temp / reactants.len) + extra_heat) // Average temperature of reagents + extra heat. if(splash_holder.total_volume && affected_range >= 0) //The possible reactions didnt use up all reagents, so we spread it around. var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread() diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index fa2a8d71a9a..6e4379d1fc9 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -9,7 +9,7 @@ var/const/INGEST = 2 var/total_volume = 0 var/maximum_volume = 100 var/atom/my_atom = null - var/chem_temp = 300 + var/chem_temp = T20C var/list/datum/reagent/addiction_list = new/list() var/flags @@ -166,6 +166,30 @@ var/const/INGEST = 2 handle_reactions() return amount +/datum/reagents/proc/set_reagent_temp(new_temp = T0C, react = TRUE) + chem_temp = new_temp + if(react) + temperature_react() + handle_reactions() + +/datum/reagents/proc/temperature_react() //Calls the temperature reaction procs without changing the temp. + for(var/datum/reagent/current_reagent in reagent_list) + current_reagent.reaction_temperature(chem_temp, 100) + +/datum/reagents/proc/temperature_reagents(exposed_temperature, divisor = 35, change_cap = 15) //This is what you use to change the temp of a reagent holder. + //Do not manually change the reagent unless you know what youre doing. + var/difference = abs(chem_temp - exposed_temperature) + var/change = min(max((difference / divisor), 1), change_cap) + if(exposed_temperature > chem_temp) + chem_temp += change + else if(exposed_temperature < chem_temp) + chem_temp -= change + + chem_temp = max(min(chem_temp, 10000), 0) //Cap for the moment. + temperature_react() + + handle_reactions() + /datum/reagents/proc/trans_id_to(obj/target, reagent, amount=1, preserve_data=1)//Not sure why this proc didn't exist before. It does now! /N if(!target) return @@ -194,8 +218,7 @@ var/const/INGEST = 2 /datum/reagents/proc/metabolize(mob/living/M) if(M) - chem_temp = M.bodytemperature - handle_reactions() + set_reagent_temp(M.bodytemperature) // a bitfield filled in by each reagent's `on_mob_life` to find out which states to update var/update_flags = STATUS_UPDATE_NONE @@ -269,6 +292,8 @@ var/const/INGEST = 2 if(prob(20) && (world.timeofday > (R.last_addiction_dose + ADDICTION_TIME))) //Each addiction lasts 8 minutes before it can end to_chat(M, "You no longer feel reliant on [R.name]!") addiction_list.Remove(R) + qdel(R) + if(update_flags & STATUS_UPDATE_HEALTH) M.updatehealth("reagent metabolism") else if(update_flags & STATUS_UPDATE_STAT) @@ -531,6 +556,35 @@ var/const/INGEST = 2 react_type = "OBJ" else return + + if(react_type == "LIVING" && ishuman(A)) + var/mob/living/carbon/human/H = A + if(method == TOUCH) + var/obj/item/organ/external/head/affecting = H.get_organ("head") + if(affecting) + if(chem_temp > H.dna.species.heat_level_1) + if(H.reagent_safety_check()) + to_chat(H, "You are scalded by the hot chemicals!") + affecting.receive_damage(0, round(log(chem_temp / 50) * 10)) + H.emote("scream") + H.adjust_bodytemperature(min(max((chem_temp - T0C) - 20, 5), 500)) + else if(chem_temp < H.dna.species.cold_level_1) + if(H.reagent_safety_check(FALSE)) + to_chat(H, "You are frostbitten by the freezing cold chemicals!") + affecting.receive_damage(0, round(log(T0C - chem_temp / 50) * 10)) + H.emote("scream") + H.adjust_bodytemperature(- min(max(T0C - chem_temp - 20, 5), 500)) + + if(method == INGEST) + if(chem_temp > H.dna.species.heat_level_1) + to_chat(H, "You scald yourself trying to consume the boiling hot substance!") + H.adjustFireLoss(7) + H.adjust_bodytemperature(min(max((chem_temp - T0C) - 20, 5), 700)) + else if(chem_temp < H.dna.species.cold_level_1) + to_chat(H, "You frostburn yourself trying to consume the freezing cold substance!") + H.adjustFireLoss(7) + H.adjust_bodytemperature(- min(max((T0C - chem_temp) - 20, 5), 700)) + for(var/datum/reagent/R in reagent_list) switch(react_type) if("LIVING") @@ -548,14 +602,14 @@ var/const/INGEST = 2 var/amt = list_reagents[r_id] add_reagent(r_id, amt, data) -/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, no_react = 0) +/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = T20C, no_react = 0) if(!isnum(amount)) return 1 update_total() if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen. if(amount <= 0) return 0 - chem_temp = round(((amount * reagtemp) + (total_volume * chem_temp)) / (total_volume + amount)) //equalize with new chems + chem_temp = (chem_temp * total_volume + reagtemp * amount) / (total_volume + amount) //equalize with new chems for(var/A in reagent_list) @@ -567,6 +621,7 @@ var/const/INGEST = 2 my_atom.on_reagent_change() R.on_merge(data) if(!no_react) + temperature_react() handle_reactions() return 0 @@ -585,6 +640,7 @@ var/const/INGEST = 2 if(my_atom) my_atom.on_reagent_change() if(!no_react) + temperature_react() handle_reactions() return 0 else diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index e827d282e21..258237f0ddd 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -1,38 +1,80 @@ /obj/machinery/chem_dispenser name = "chem dispenser" - density = 1 - anchored = 1 + density = TRUE + anchored = TRUE icon = 'icons/obj/chemical.dmi' icon_state = "dispenser" - use_power = NO_POWER_USE + use_power = IDLE_POWER_USE idle_power_usage = 40 var/ui_title = "Chem Dispenser 5000" - var/energy = 100 - var/max_energy = 100 - var/amount = 30 + var/cell_type = /obj/item/stock_parts/cell/high + var/obj/item/stock_parts/cell/cell + var/powerefficiency = 0.1 + var/amount = 10 + var/recharge_amount = 100 + var/recharge_counter = 0 + var/hackedcheck = FALSE var/obj/item/reagent_containers/beaker = null - var/recharged = 0 - var/hackedcheck = 0 + var/image/icon_beaker = null //cached overlay var/list/dispensable_reagents = list("hydrogen", "lithium", "carbon", "nitrogen", "oxygen", "fluorine", "sodium", "aluminum", "silicon", "phosphorus", "sulfur", "chlorine", "potassium", "iron", "copper", "mercury", "plasma", "radium", "water", "ethanol", "sugar", "iodine", "bromine", "silver") + var/list/upgrade_reagents = list("oil", "ash", "acetone", "saltpetre", "ammonia", "diethylamine", "fuel") var/list/hacked_reagents = list("toxin") var/hack_message = "You disable the safety safeguards, enabling the \"Mad Scientist\" mode." var/unhack_message = "You re-enable the safety safeguards, enabling the \"NT Standard\" mode." - var/list/broken_requirements = list() - var/broken_on_spawn = 0 - var/recharge_delay = 5 - var/image/icon_beaker = null //cached overlay + +/obj/machinery/chem_dispenser/New() + ..() + component_parts = list() + component_parts += new /obj/item/circuitboard/chem_dispenser(null) + component_parts += new /obj/item/stock_parts/matter_bin(null) + component_parts += new /obj/item/stock_parts/matter_bin(null) + component_parts += new /obj/item/stock_parts/capacitor(null) + component_parts += new /obj/item/stock_parts/manipulator(null) + component_parts += new /obj/item/stock_parts/console_screen(null) + component_parts += new cell_type(null) + RefreshParts() + dispensable_reagents = sortList(dispensable_reagents) + +/obj/machinery/chem_dispenser/RefreshParts() + recharge_amount = initial(recharge_amount) + var/newpowereff = 0.0666666 + for(var/obj/item/stock_parts/cell/P in component_parts) + cell = P + for(var/obj/item/stock_parts/matter_bin/M in component_parts) + newpowereff += 0.0166666666 * M.rating + for(var/obj/item/stock_parts/capacitor/C in component_parts) + recharge_amount *= C.rating + for(var/obj/item/stock_parts/manipulator/M in component_parts) + if(M.rating > 3) + dispensable_reagents |= upgrade_reagents + powerefficiency = round(newpowereff, 0.01) + +/obj/machinery/chem_dispenser/Destroy() + QDEL_NULL(beaker) + QDEL_NULL(cell) + return ..() + +/obj/machinery/chem_dispenser/examine(mob/user) + ..() + if(panel_open) + to_chat(user, "[src]'s maintenance hatch is open!") + if(in_range(user, src) || isobserver(user)) + to_chat(user, "The status display reads:
Recharging [recharge_amount] power units per interval.
Power efficiency increased by [round((powerefficiency * 1000) - 100, 1)]%.") -/obj/machinery/chem_dispenser/proc/recharge() - if(stat & (BROKEN|NOPOWER)) return - var/addenergy = 1 - var/oldenergy = energy - energy = min(energy + addenergy, max_energy) - if(energy != oldenergy) - use_power(1500) // This thing uses up alot of power (this is still low as shit for creating reagents from thin air) - SSnanoui.update_uis(src) // update all UIs attached to src +/obj/machinery/chem_dispenser/process() + if(recharge_counter >= 4) + if(!is_operational()) + return + var/usedpower = cell.give(recharge_amount) + if(usedpower) + use_power(15 * recharge_amount) + SSnanoui.update_uis(src) // update all UIs attached to src + recharge_counter = 0 + return + recharge_counter++ /obj/machinery/chem_dispenser/power_change() if(powered()) @@ -42,72 +84,19 @@ stat |= NOPOWER SSnanoui.update_uis(src) // update all UIs attached to src -/obj/machinery/chem_dispenser/process() - - if(recharged < 0) - recharge() - recharged = recharge_delay - else - recharged -= 1 - -/obj/machinery/chem_dispenser/New() - ..() - recharge() - dispensable_reagents = sortList(dispensable_reagents) - - if(broken_on_spawn) - overlays.Cut() - var/amount = pick(3,3,4) - var/list/options = list() - options[/obj/item/stock_parts/capacitor/adv] = "Add an advanced capacitor to fix it." - options[/obj/item/stock_parts/console_screen] = "Replace the console screen to fix it." - options[/obj/item/stock_parts/manipulator/pico] = "Upgrade to a pico manipulator to fix it." - options[/obj/item/stock_parts/matter_bin/super] = "Give it a super matter bin to fix it." - options[/obj/item/stock_parts/cell/super] = "Replace the reagent synthesizer with a super capacity cell to fix it." - options[/obj/item/reagent_scanner/adv] = "Replace the reagent scanner with an advanced reagent scanner to fix it" - options[/obj/item/stock_parts/micro_laser/high] = "Repair the reagent synthesizer with an high-power micro-laser to fix it" - options[/obj/item/reagent_scanner/adv] = "Replace the reagent scanner with an advanced reagent scanner to fix it" - options[/obj/item/stack/nanopaste] = "Apply some nanopaste to the broken nozzles to fix it." - options[/obj/item/stack/sheet/plasteel] = "Surround the outside with a plasteel cover to fix it." - options[/obj/item/stack/sheet/rglass] = "Insert a pane of reinforced glass to fix it." - - while(amount > 0) - amount -= 1 - - var/index = pick(options) - broken_requirements[index] = options[index] - options -= index - - /obj/machinery/chem_dispenser/ex_act(severity) switch(severity) - if(1.0) + if(1) qdel(src) - return - if(2.0) + if(2) if(prob(50)) qdel(src) - return /obj/machinery/chem_dispenser/blob_act() if(prob(50)) qdel(src) - /** - * The ui_interact proc is used to open and update Nano UIs - * If ui_interact is not used then the UI will not update correctly - * ui_interact is currently defined for /atom/movable - * - * @param user /mob The mob who is interacting with this ui - * @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main") - * - * @return nothing - */ /obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) - if(broken_requirements.len) - to_chat(user, "[src] is broken. [broken_requirements[broken_requirements[1]]]") - return - // update the ui if it exists, returns null if no ui is passed/found ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) @@ -121,8 +110,8 @@ var/data[0] data["amount"] = amount - data["energy"] = round(energy) - data["maxEnergy"] = round(max_energy) + data["energy"] = cell.charge ? cell.charge * powerefficiency : "0" //To prevent NaN in the UI. + data["maxEnergy"] = cell.maxcharge * powerefficiency data["isBeakerLoaded"] = beaker ? 1 : 0 var/beakerContents[0] @@ -151,26 +140,32 @@ /obj/machinery/chem_dispenser/Topic(href, href_list) if(..()) - return 1 + return TRUE if(href_list["amount"]) - amount = round(text2num(href_list["amount"]), 5) // round to nearest 5 + amount = round(text2num(href_list["amount"]), 1) // round to nearest 1 if(amount < 0) // Since the user can actually type the commands himself, some sanity checking amount = 0 if(amount > 100) amount = 100 if(href_list["dispense"]) - if(dispensable_reagents.Find(href_list["dispense"]) && beaker != null) - var/obj/item/reagent_containers/glass/B = beaker - var/datum/reagents/R = B.reagents - var/space = R.maximum_volume - R.total_volume + if(!is_operational() || QDELETED(cell)) + return + if(beaker && dispensable_reagents.Find(href_list["dispense"])) + var/datum/reagents/R = beaker.reagents + var/free = R.maximum_volume - R.total_volume + var/actual = min(amount, (cell.charge * powerefficiency) * 10, free) - R.add_reagent(href_list["dispense"], min(amount, energy * 10, space)) - energy = max(energy - min(amount, energy * 10, space) / 10, 0) + if(!cell.use(actual / powerefficiency)) + atom_say("Not enough energy to complete operation!") + return + + R.add_reagent(href_list["dispense"], actual) overlays.Cut() - icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. - icon_beaker.pixel_x = rand(-10,5) + if(!icon_beaker) + icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. + icon_beaker.pixel_x = rand(-10, 5) overlays += icon_beaker if(href_list["remove"]) @@ -178,75 +173,96 @@ if(href_list["removeamount"]) var/amount = text2num(href_list["removeamount"]) if(isnum(amount) && (amount > 0)) - var/obj/item/reagent_containers/glass/B = beaker - var/datum/reagents/R = B.reagents + var/datum/reagents/R = beaker.reagents var/id = href_list["remove"] R.remove_reagent(id, amount) + else if(isnum(amount) && (amount == -1)) //Isolate instead + var/datum/reagents/R = beaker.reagents + var/id = href_list["remove"] + R.isolate_reagent(id) if(href_list["ejectBeaker"]) if(beaker) - var/obj/item/reagent_containers/glass/B = beaker - B.forceMove(loc) + beaker.forceMove(loc) beaker = null overlays.Cut() - add_fingerprint(usr) - return 1 // update UIs attached to this object -/obj/machinery/chem_dispenser/attackby(obj/item/reagent_containers/B, mob/user, params) - if(isrobot(user)) + add_fingerprint(usr) + return TRUE // update UIs attached to this object + +/obj/machinery/chem_dispenser/attackby(obj/item/I, mob/user, params) + if(ismultitool(I)) + if(!hackedcheck) + to_chat(user, hack_message) + dispensable_reagents += hacked_reagents + hackedcheck = TRUE + else + to_chat(user, unhack_message) + dispensable_reagents -= hacked_reagents + hackedcheck = FALSE + SSnanoui.update_uis(src) return - if(broken_requirements.len && B.type == broken_requirements[1]) - if(istype(B,/obj/item/stack)) - var/obj/item/stack/S = B - S.use(1) - else - if(!user.drop_item()) - to_chat(user, "[B] is stuck to you!") - return - qdel(B) - broken_requirements -= broken_requirements[1] - to_chat(user, "You fix [src].") + if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-o", "[initial(icon_state)]", I)) + return + + if(exchange_parts(user, I)) + SSnanoui.update_uis(src) + return + + if(iswrench(I)) + playsound(src, I.usesound, 50, 1) + if(anchored) + anchored = FALSE + to_chat(user, "[src] can now be moved.") + else if(!anchored) + anchored = TRUE + to_chat(user, "[src] is now secured.") + return + + if(panel_open) + if(iscrowbar(I)) + if(beaker) + beaker.forceMove(loc) + beaker = null + if(cell) + cell.forceMove(loc) + cell = null + default_deconstruction_crowbar(I) + return TRUE + + if(isrobot(user)) return if(beaker) to_chat(user, "Something is already loaded into the machine.") return - if(istype(B, /obj/item/reagent_containers/glass) || istype(B, /obj/item/reagent_containers/food/drinks)) - beaker = B - if(!user.drop_item()) - to_chat(user, "[B] is stuck to you!") + if(istype(I, /obj/item/reagent_containers/glass) || istype(I, /obj/item/reagent_containers/food/drinks)) + if(panel_open) + to_chat(user, "Close the maintenance panel first.") return - B.forceMove(src) - to_chat(user, "You set [B] on the machine.") + if(!user.drop_item()) + to_chat(user, "[I] is stuck to you!") + return + beaker = I + I.forceMove(src) + to_chat(user, "You set [I] on the machine.") SSnanoui.update_uis(src) // update all UIs attached to src if(!icon_beaker) icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. - icon_beaker.pixel_x = rand(-10,5) + icon_beaker.pixel_x = rand(-10, 5) overlays += icon_beaker return + return ..() -/obj/machinery/chem_dispenser/attackby(obj/item/B, mob/user, params) - ..() - if(istype(B, /obj/item/multitool)) - if(hackedcheck == 0) - to_chat(user, hack_message) - dispensable_reagents += hacked_reagents - hackedcheck = 1 - return - - else - to_chat(user, unhack_message) - dispensable_reagents -= hacked_reagents - hackedcheck = 0 - return /obj/machinery/chem_dispenser/attack_ai(mob/user) return attack_hand(user) /obj/machinery/chem_dispenser/attack_ghost(mob/user) - return attack_hand(user) + if(user.can_admin_interact()) + return attack_hand(user) /obj/machinery/chem_dispenser/attack_hand(mob/user) if(stat & BROKEN) @@ -259,245 +275,45 @@ name = "soda fountain" desc = "A drink fabricating machine, capable of producing many sugary drinks with just one touch." ui_title = "Soda Dispens-o-matic" - energy = 100 - max_energy = 100 dispensable_reagents = list("water", "ice", "milk", "soymilk", "coffee", "tea", "hot_coco", "cola", "spacemountainwind", "dr_gibb", "space_up", "tonic", "sodawater", "lemon_lime", "grapejuice", "sugar", "orangejuice", "lemonjuice", "limejuice", "tomatojuice", "banana", "watermelonjuice", "carrotjuice", "potato", "berryjuice") - var/list/special_reagents2 = list(list(""), - list("bananahonk", "milkshake", "cafe_latte", "cafe_mocha"), - list("triple_citrus", "icecoffe","icetea")) + upgrade_reagents = list("bananahonk", "milkshake", "cafe_latte", "cafe_mocha", "triple_citrus", "icecoffe","icetea") + hacked_reagents = list("thirteenloko") hack_message = "You change the mode from 'McNano' to 'Pizza King'." unhack_message = "You change the mode from 'Pizza King' to 'McNano'." - hacked_reagents = list("thirteenloko") /obj/machinery/chem_dispenser/soda/New() ..() - component_parts = list() - component_parts += new /obj/item/circuitboard/soda(null) + QDEL_LIST(component_parts) + component_parts += new /obj/item/circuitboard/chem_dispenser/soda(null) component_parts += new /obj/item/stock_parts/matter_bin(null) component_parts += new /obj/item/stock_parts/matter_bin(null) component_parts += new /obj/item/stock_parts/manipulator(null) component_parts += new /obj/item/stock_parts/capacitor(null) component_parts += new /obj/item/stock_parts/console_screen(null) - component_parts += new /obj/item/stock_parts/cell/super(null) + component_parts += new cell_type(null) RefreshParts() -/obj/machinery/chem_dispenser/soda/upgraded/New() - ..() - component_parts = list() - component_parts += new /obj/item/circuitboard/soda(null) - component_parts += new /obj/item/stock_parts/matter_bin/super(null) - component_parts += new /obj/item/stock_parts/matter_bin/super(null) - component_parts += new /obj/item/stock_parts/manipulator/pico(null) - component_parts += new /obj/item/stock_parts/capacitor/super(null) - component_parts += new /obj/item/stock_parts/console_screen(null) - component_parts += new /obj/item/stock_parts/cell/hyper(null) - RefreshParts() - -/obj/machinery/chem_dispenser/soda/RefreshParts() - for(var/obj/item/stock_parts/manipulator/M in component_parts) - for(var/i in 1 to M.rating) - dispensable_reagents = sortList(dispensable_reagents | special_reagents2[i]) - -/obj/machinery/chem_dispenser/soda/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/reagent_containers/glass)) - if(panel_open) - to_chat(user, "Close the maintenance panel first.") - return - return ..() - else - ..() - - if(default_deconstruction_screwdriver(user, "minidispenser-o", "minidispenser", I)) - return - - if(exchange_parts(user, I)) - return - - if(iswrench(I)) - playsound(src, I.usesound, 50, 1) - if(anchored) - anchored = FALSE - to_chat(user, "[src] can now be moved.") - else if(!anchored) - anchored = TRUE - to_chat(user, "[src] is now secured.") - - if(panel_open) - if(iscrowbar(I)) - if(beaker) - var/obj/item/reagent_containers/glass/B = beaker - B.forceMove(loc) - beaker = null - default_deconstruction_crowbar(I) - return TRUE - - /obj/machinery/chem_dispenser/beer icon_state = "booze_dispenser" name = "booze dispenser" ui_title = "Booze Portal 9001" - energy = 100 - max_energy = 100 desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one." dispensable_reagents = list("ice", "cream", "cider", "beer", "kahlua", "whiskey", "wine", "vodka", "gin", "rum", "tequila", "vermouth", "cognac", "ale", "mead", "synthanol") - var/list/special_reagents3 = list(list("iced_beer"), - list("irishcream", "manhattan",), - list("antihol", "synthignon", "bravebull")) + upgrade_reagents = list("iced_beer", "irishcream", "manhattan", "antihol", "synthignon", "bravebull") + hacked_reagents = list("goldschlager", "patron", "absinthe", "ethanol", "nothing", "sake") hack_message = "You disable the 'nanotrasen-are-cheap-bastards' lock, enabling hidden and very expensive boozes." unhack_message = "You re-enable the 'nanotrasen-are-cheap-bastards' lock, disabling hidden and very expensive boozes." - hacked_reagents = list("goldschlager", "patron", "absinthe", "ethanol", "nothing", "sake") /obj/machinery/chem_dispenser/beer/New() ..() - component_parts = list() - component_parts += new /obj/item/circuitboard/beer(null) + QDEL_LIST(component_parts) + component_parts += new /obj/item/circuitboard/chem_dispenser/beer(null) component_parts += new /obj/item/stock_parts/matter_bin(null) component_parts += new /obj/item/stock_parts/matter_bin(null) - component_parts += new /obj/item/stock_parts/manipulator(null) component_parts += new /obj/item/stock_parts/capacitor(null) - component_parts += new /obj/item/stock_parts/console_screen(null) - component_parts += new /obj/item/stock_parts/cell/super(null) - RefreshParts() - -/obj/machinery/chem_dispenser/beer/upgraded/New() - ..() - component_parts = list() - component_parts += new /obj/item/circuitboard/beer(null) - component_parts += new /obj/item/stock_parts/matter_bin/super(null) - component_parts += new /obj/item/stock_parts/matter_bin/super(null) - component_parts += new /obj/item/stock_parts/manipulator/pico(null) - component_parts += new /obj/item/stock_parts/capacitor/super(null) - component_parts += new /obj/item/stock_parts/console_screen(null) - component_parts += new /obj/item/stock_parts/cell/hyper(null) - RefreshParts() - -/obj/machinery/chem_dispenser/beer/RefreshParts() - for(var/obj/item/stock_parts/manipulator/M in component_parts) - for(var/i in 1 to M.rating) - dispensable_reagents = sortList(dispensable_reagents | special_reagents3[i]) - -/obj/machinery/chem_dispenser/beer/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/reagent_containers/glass)) - if(panel_open) - to_chat(user, "Close the maintenance panel first.") - return - return ..() - else - ..() - - if(default_deconstruction_screwdriver(user, "minidispenser-o", "minidispenser", I)) - return - - if(exchange_parts(user, I)) - return - - if(iswrench(I)) - playsound(src, I.usesound, 50, 1) - if(anchored) - anchored = FALSE - to_chat(user, "[src] can now be moved.") - else if(!anchored) - anchored = TRUE - to_chat(user, "[src] is now secured.") - - if(panel_open) - if(iscrowbar(I)) - if(beaker) - var/obj/item/reagent_containers/glass/B = beaker - B.forceMove(loc) - beaker = null - default_deconstruction_crowbar(I) - return TRUE - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/obj/machinery/chem_dispenser/constructable - name = "portable chem dispenser" - icon = 'icons/obj/chemical.dmi' - icon_state = "minidispenser" - energy = 5 - max_energy = 5 - amount = 5 - recharge_delay = 10 - dispensable_reagents = list() - var/list/special_reagents = list(list("hydrogen", "oxygen", "silicon", "phosphorus", "sulfur", "carbon", "nitrogen", "water"), - list("lithium", "sugar", "copper", "mercury", "sodium","iodine","bromine"), - list("ethanol", "chlorine", "potassium", "aluminum","plasma", "radium", "fluorine", "iron", "silver"), - list("oil", "ash", "acetone", "saltpetre", "ammonia", "diethylamine", "fuel")) - -/obj/machinery/chem_dispenser/constructable/New() - ..() - component_parts = list() - component_parts += new /obj/item/circuitboard/chem_dispenser(null) - component_parts += new /obj/item/stock_parts/matter_bin(null) - component_parts += new /obj/item/stock_parts/matter_bin(null) component_parts += new /obj/item/stock_parts/manipulator(null) - component_parts += new /obj/item/stock_parts/capacitor(null) component_parts += new /obj/item/stock_parts/console_screen(null) - component_parts += new /obj/item/stock_parts/cell/super(null) - RefreshParts() - -/obj/machinery/chem_dispenser/constructable/upgraded/New() - ..() - component_parts = list() - component_parts += new /obj/item/circuitboard/chem_dispenser(null) - component_parts += new /obj/item/stock_parts/matter_bin/super(null) - component_parts += new /obj/item/stock_parts/matter_bin/super(null) - component_parts += new /obj/item/stock_parts/manipulator/pico(null) - component_parts += new /obj/item/stock_parts/capacitor/super(null) - component_parts += new /obj/item/stock_parts/console_screen(null) - component_parts += new /obj/item/stock_parts/cell/hyper(null) - RefreshParts() - -/obj/machinery/chem_dispenser/constructable/RefreshParts() - var/time = 0 - var/temp_energy = 0 - var/i - for(var/obj/item/stock_parts/matter_bin/M in component_parts) - temp_energy += M.rating - temp_energy-- - max_energy = temp_energy * 5 //max energy = (bin1.rating + bin2.rating - 1) * 5, 5 on lowest 25 on highest - for(var/obj/item/stock_parts/capacitor/C in component_parts) - time += C.rating - for(var/obj/item/stock_parts/cell/P in component_parts) - time += round(P.maxcharge, 10000) / 10000 - recharge_delay = 10 / (time/2) //delay between recharges, double the usual time on lowest 33% less than usual on highest - for(var/obj/item/stock_parts/manipulator/M in component_parts) - for(i=1, i<=M.rating, i++) - dispensable_reagents = sortList(dispensable_reagents | special_reagents[i]) - -/obj/machinery/chem_dispenser/constructable/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/reagent_containers/glass)) - if(panel_open) - to_chat(user, "Close the maintenance panel first.") - return - ..() - else - ..() - - if(default_deconstruction_screwdriver(user, "minidispenser-o", "minidispenser", I)) - return - - if(exchange_parts(user, I)) - return - - if(istype(I, /obj/item/wrench)) - playsound(src, I.usesound, 50, 1) - if(anchored) - anchored = 0 - to_chat(user, "[src] can now be moved.") - else if(!anchored) - anchored = 1 - to_chat(user, "[src] is now secured.") - - if(panel_open) - if(istype(I, /obj/item/crowbar)) - if(beaker) - var/obj/item/reagent_containers/glass/B = beaker - B.forceMove(loc) - beaker = null - default_deconstruction_crowbar(I) - return 1 + component_parts += new cell_type(null) + RefreshParts() \ No newline at end of file diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index 1b84afb3d74..2db474b39c4 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -7,8 +7,7 @@ use_power = IDLE_POWER_USE idle_power_usage = 40 var/obj/item/reagent_containers/beaker = null - var/desired_temp = 300 - var/heater_coefficient = 0.03 + var/desired_temp = T0C var/on = FALSE /obj/machinery/chem_heater/New() @@ -19,34 +18,22 @@ component_parts += new /obj/item/stock_parts/console_screen(null) RefreshParts() -/obj/machinery/chem_heater/upgraded/New() - ..() - component_parts = list() - component_parts += new /obj/item/circuitboard/chem_heater(null) - component_parts += new /obj/item/stock_parts/micro_laser/ultra(null) - component_parts += new /obj/item/stock_parts/console_screen(null) - RefreshParts() - -/obj/machinery/chem_heater/RefreshParts() - heater_coefficient = 0.03 - for(var/obj/item/stock_parts/micro_laser/M in component_parts) - heater_coefficient *= M.rating - /obj/machinery/chem_heater/process() ..() if(stat & NOPOWER) return - var/state_change = 0 + var/state_change = FALSE if(on) if(beaker) - if(beaker.reagents.chem_temp > desired_temp) - beaker.reagents.chem_temp += min(-1, max((desired_temp - beaker.reagents.chem_temp) * heater_coefficient, -15)) - if(beaker.reagents.chem_temp < desired_temp) - beaker.reagents.chem_temp += max(1, min((desired_temp - beaker.reagents.chem_temp) * heater_coefficient, 15)) - beaker.reagents.chem_temp = round(beaker.reagents.chem_temp) //stops stuff like 456.12312312302 - - beaker.reagents.handle_reactions() - state_change = 1 + if(!beaker.reagents.total_volume) + on = FALSE + SSnanoui.update_uis(src) + return + beaker.reagents.temperature_reagents(desired_temp) + beaker.reagents.temperature_reagents(desired_temp) + if(abs(beaker.reagents.chem_temp - desired_temp) <= 3) + on = FALSE + state_change = TRUE if(state_change) SSnanoui.update_uis(src) @@ -54,7 +41,6 @@ /obj/machinery/chem_heater/proc/eject_beaker() if(beaker) beaker.forceMove(get_turf(src)) - beaker.reagents.handle_reactions() beaker = null icon_state = "mixer0b" on = FALSE @@ -108,9 +94,11 @@ /obj/machinery/chem_heater/Topic(href, href_list) if(..()) - return 0 + return FALSE if(href_list["toggle_on"]) + if(!beaker.reagents.total_volume) + return FALSE on = !on . = 1 @@ -122,7 +110,7 @@ var/target = input("Please input the target temperature", name) as num desired_temp = Clamp(target, 0, 1000) else - return 0 + return FALSE . = 1 if(href_list["eject_beaker"]) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 2bd9f6d4af8..707ead485ff 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -1,7 +1,7 @@ /obj/machinery/chem_master name = "\improper ChemMaster 3000" - density = 1 - anchored = 1 + density = TRUE + anchored = TRUE icon = 'icons/obj/chemical.dmi' icon_state = "mixer0" use_power = IDLE_POWER_USE @@ -9,28 +9,27 @@ var/obj/item/reagent_containers/beaker = null var/obj/item/storage/pill_bottle/loaded_pill_bottle = null var/mode = 0 - var/condi = 0 + var/condi = FALSE var/useramount = 30 // Last used amount var/pillamount = 10 var/patchamount = 10 var/bottlesprite = "bottle" var/pillsprite = "1" var/client/has_sprites = list() - var/printing = null + var/printing = FALSE /obj/machinery/chem_master/New() + ..() create_reagents(100) update_icon() /obj/machinery/chem_master/ex_act(severity) switch(severity) - if(1.0) + if(1) qdel(src) - return - if(2.0) + if(2) if(prob(50)) qdel(src) - return /obj/machinery/chem_master/update_icon() overlays.Cut() @@ -50,43 +49,43 @@ stat |= NOPOWER update_icon() -/obj/machinery/chem_master/attackby(obj/item/B, mob/user, params) - if(default_unfasten_wrench(user, B)) +/obj/machinery/chem_master/attackby(obj/item/I, mob/user, params) + if(default_unfasten_wrench(user, I)) power_change() return - if(istype(B, /obj/item/reagent_containers/glass) || istype(B, /obj/item/reagent_containers/food/drinks/drinkingglass)) - + if(istype(I, /obj/item/reagent_containers/glass) || istype(I, /obj/item/reagent_containers/food/drinks/drinkingglass)) if(beaker) to_chat(user, "A beaker is already loaded into the machine.") return if(!user.drop_item()) - to_chat(user, "[B] is stuck to you!") + to_chat(user, "[I] is stuck to you!") return - beaker = B - B.forceMove(src) + beaker = I + I.forceMove(src) to_chat(user, "You add the beaker to the machine!") SSnanoui.update_uis(src) update_icon() - else if(istype(B, /obj/item/storage/pill_bottle)) - + else if(istype(I, /obj/item/storage/pill_bottle)) if(loaded_pill_bottle) - to_chat(user, "A pill bottle is already loaded into the machine.") + to_chat(user, "A [loaded_pill_bottle] is already loaded into the machine.") return if(!user.drop_item()) - to_chat(user, "[B] is stuck to you!") + to_chat(user, "[I] is stuck to you!") return - loaded_pill_bottle = B - B.forceMove(src) - to_chat(user, "You add the pill bottle into the dispenser slot!") + + loaded_pill_bottle = I + I.forceMove(src) + to_chat(user, "You add [I] into the dispenser slot!") SSnanoui.update_uis(src) - return + else + return ..() /obj/machinery/chem_master/Topic(href, href_list) if(..()) - return 1 + return TRUE add_fingerprint(usr) usr.set_machine(src) @@ -103,8 +102,8 @@ return if(href_list["print_p"]) - if(!(printing)) - printing = 1 + if(!printing) + printing = TRUE visible_message("[src] rattles and prints out a sheet of paper.") playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1) var/obj/item/paper/P = new /obj/item/paper(loc) @@ -125,7 +124,7 @@ P.info += "Description: [href_list["desc"]]" P.info += "

Notes:
" P.name = "Chemical Analysis - [href_list["name"]]" - printing = null + printing = FALSE if(beaker) var/datum/reagents/R = beaker.reagents @@ -203,10 +202,13 @@ if(count == null) return count = isgoodnumber(count) - if(count > 20) count = 20 //Pevent people from creating huge stacks of pills easily. Maybe move the number to defines? - if(count <= 0) return - var/amount_per_pill = reagents.total_volume/count - if(amount_per_pill > 50) amount_per_pill = 50 + if(count > 20) + count = 20 //Pevent people from creating huge stacks of pills easily. Maybe move the number to defines? + if(count <= 0) + return + var/amount_per_pill = reagents.total_volume / count + if(amount_per_pill > 100) + amount_per_pill = 100 var/name = input(usr,"Name:","Name your pill!","[reagents.get_master_reagent_name()] ([amount_per_pill]u)") as text|null if(!name) return @@ -216,18 +218,19 @@ to_chat(usr, "Not enough reagents to create these pills!") return var/obj/item/reagent_containers/food/pill/P = new/obj/item/reagent_containers/food/pill(loc) - if(!name) name = reagents.get_master_reagent_name() + if(!name) + name = reagents.get_master_reagent_name() P.name = "[name] pill" P.pixel_x = rand(-7, 7) //random position P.pixel_y = rand(-7, 7) P.icon_state = "pill"+pillsprite - reagents.trans_to(P,amount_per_pill) - if(loaded_pill_bottle) + reagents.trans_to(P, amount_per_pill) + if(loaded_pill_bottle && loaded_pill_bottle.type == /obj/item/storage/pill_bottle) if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots) P.forceMove(loaded_pill_bottle) updateUsrDialog() else - var/name = input(usr,"Name:","Name your bag!",reagents.get_master_reagent_name()) as text|null + var/name = input(usr, "Name:", "Name your bag!", reagents.get_master_reagent_name()) as text|null if(!name) return name = reject_bad_text(name) @@ -236,7 +239,7 @@ P.originalname = name P.name = "[name] pack" P.desc = "A small condiment pack. The label says it contains [name]." - reagents.trans_to(P,10) + reagents.trans_to(P, 10) else if(href_list["createpatch"] || href_list["createpatch_multiple"]) if(!condi) var/count = 1 @@ -247,10 +250,12 @@ count = isgoodnumber(count) if(!count || count <= 0) return - if(count > 20) count = 20 //Pevent people from creating huge stacks of patches easily. Maybe move the number to defines? + if(count > 20) + count = 20 //Pevent people from creating huge stacks of patches easily. Maybe move the number to defines? var/amount_per_patch = reagents.total_volume/count - if(amount_per_patch > 40) amount_per_patch = 40 - var/name = input(usr,"Name:","Name your patch!","[reagents.get_master_reagent_name()] ([amount_per_patch]u)") as text|null + if(amount_per_patch > 40) + amount_per_patch = 40 + var/name = input(usr, "Name:", "Name your patch!", "[reagents.get_master_reagent_name()] ([amount_per_patch]u)") as text|null if(!name) return name = reject_bad_text(name) @@ -263,24 +268,30 @@ P.pixel_y = rand(-7, 7) reagents.trans_to(P,amount_per_patch) if(is_medical_patch) - P.instant_application = 1 + P.instant_application = TRUE P.icon_state = "bandaid_med" + if(loaded_pill_bottle && loaded_pill_bottle.type == /obj/item/storage/pill_bottle/patch_pack) + if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots) + P.forceMove(loaded_pill_bottle) + updateUsrDialog() + else if(href_list["createbottle"]) if(!condi) - var/name = input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name()) as text|null + var/name = input(usr, "Name:", "Name your bottle!", reagents.get_master_reagent_name()) as text|null if(!name) return name = reject_bad_text(name) - var/obj/item/reagent_containers/glass/bottle/P = new/obj/item/reagent_containers/glass/bottle(loc) - if(!name) name = reagents.get_master_reagent_name() + var/obj/item/reagent_containers/glass/bottle/reagent/P = new/obj/item/reagent_containers/glass/bottle/reagent(loc) + if(!name) + name = reagents.get_master_reagent_name() P.name = "[name] bottle" P.pixel_x = rand(-7, 7) //random position P.pixel_y = rand(-7, 7) P.icon_state = bottlesprite - reagents.trans_to(P,30) + reagents.trans_to(P, 50) else var/obj/item/reagent_containers/food/condiment/P = new/obj/item/reagent_containers/food/condiment(loc) - reagents.trans_to(P,50) + reagents.trans_to(P, 50) else if(href_list["change_pill"]) #define MAX_PILL_SPRITE 20 //max icon state of the pill sprites var/dat = "" @@ -299,7 +310,7 @@ else if(href_list["change_bottle"]) var/dat = "
" var/j = 0 - for(var/i in list("bottle", "small_bottle", "wide_bottle", "round_bottle")) + for(var/i in list("bottle", "small_bottle", "wide_bottle", "round_bottle", "reagent_bottle")) j++ if(j == 1) dat += "" @@ -318,7 +329,6 @@ usr << browse(null, "window=chem_master_iconsel") SSnanoui.update_uis(src) - return /obj/machinery/chem_master/attack_ai(mob/user) return attack_hand(user) @@ -328,11 +338,10 @@ /obj/machinery/chem_master/attack_hand(mob/user) if(..()) - return 1 + return TRUE ui_interact(user) - return -/obj/machinery/chem_master/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) +/obj/machinery/chem_master/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = TRUE) var/datum/asset/chem_master/assets = get_asset_datum(/datum/asset/chem_master) assets.send(user) @@ -380,15 +389,15 @@ return 0 /obj/machinery/chem_master/proc/chemical_safety_check(datum/reagents/R) - var/all_safe = 1 + var/all_safe = TRUE for(var/datum/reagent/A in R.reagent_list) if(!GLOB.safe_chem_list.Find(A.id)) - all_safe = 0 + all_safe = FALSE return all_safe /obj/machinery/chem_master/condimaster name = "\improper CondiMaster 3000" - condi = 1 + condi = TRUE /obj/machinery/chem_master/constructable name = "ChemMaster 2999" @@ -403,9 +412,9 @@ component_parts += new /obj/item/reagent_containers/glass/beaker(null) component_parts += new /obj/item/reagent_containers/glass/beaker(null) -/obj/machinery/chem_master/constructable/attackby(obj/item/B, mob/user, params) +/obj/machinery/chem_master/constructable/attackby(obj/item/I, mob/user, params) - if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0", B)) + if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0", I)) if(beaker) beaker.forceMove(get_turf(src)) beaker = null @@ -415,15 +424,15 @@ loaded_pill_bottle = null return - if(exchange_parts(user, B)) + if(exchange_parts(user, I)) return if(panel_open) - if(istype(B, /obj/item/crowbar)) - default_deconstruction_crowbar(B) - return 1 + if(iscrowbar(I)) + default_deconstruction_crowbar(I) + return TRUE else to_chat(user, "You can't use the [name] while it's panel is opened!") - return 1 + return TRUE else - ..() + return ..() diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm index 7e76217fe15..a2ecc811e6a 100644 --- a/code/modules/reagents/chemistry/reagents.dm +++ b/code/modules/reagents/chemistry/reagents.dm @@ -32,6 +32,12 @@ /datum/reagent/Destroy() . = ..() holder = null + if(islist(data)) + data.Cut() + data = null + +/datum/reagent/proc/reaction_temperature(exposed_temperature, exposed_volume) //By default we do nothing. + return /datum/reagent/proc/reaction_mob(mob/living/M, method = TOUCH, volume) //Some reagents transfer on touch, others don't; dependent on if they penetrate the skin or not. if(holder) //for catching rare runtimes diff --git a/code/modules/reagents/chemistry/reagents/alcohol.dm b/code/modules/reagents/chemistry/reagents/alcohol.dm index 88e2d685f57..d2fb4eec567 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol.dm @@ -1126,7 +1126,7 @@ /datum/reagent/consumable/ethanol/dragons_breath/reaction_mob(mob/living/M, method=TOUCH, volume) if(method == INGEST && prob(20)) if(M.on_fire) - M.adjust_fire_stacks(3) + M.adjust_fire_stacks(6) /datum/reagent/consumable/ethanol/dragons_breath/on_mob_life(mob/living/M) var/update_flags = STATUS_UPDATE_NONE @@ -1148,7 +1148,7 @@ if(prob(2 * volume)) to_chat(M, "OH GOD OH GOD PLEASE NO!!") if(M.on_fire) - M.adjust_fire_stacks(5) + M.adjust_fire_stacks(20) if(prob(50)) to_chat(M, "IT BURNS!!!!") M.visible_message("[M] is consumed in flames!") diff --git a/code/modules/reagents/chemistry/reagents/blob.dm b/code/modules/reagents/chemistry/reagents/blob.dm index c7dd046664c..d06ab6443ad 100644 --- a/code/modules/reagents/chemistry/reagents/blob.dm +++ b/code/modules/reagents/chemistry/reagents/blob.dm @@ -2,6 +2,7 @@ // The 4 damage /datum/reagent/blob description = "" + var/complementary_color = "#000000" var/message = "The blob strikes you" //message sent to any mob hit by the blob var/message_living = null //extension to first mob sent to only living mobs i.e. silicons have no skin to be burnt can_synth = FALSE @@ -11,8 +12,10 @@ /datum/reagent/blob/ripping_tendrils //does brute and a little stamina damage name = "Ripping Tendrils" + description = "Deals High Brute damage, as well as Stamina damage." id = "ripping_tendrils" color = "#7F0000" + complementary_color = "#a15656" message_living = ", and you feel your skin ripping and tearing off" /datum/reagent/blob/ripping_tendrils/reaction_mob(mob/living/M, method=TOUCH, volume) @@ -25,8 +28,10 @@ /datum/reagent/blob/boiling_oil //sets you on fire, does burn damage name = "Boiling Oil" + description = "Deals High Burn damage, and sets the victim aflame." id = "boiling_oil" color = "#B68D00" + complementary_color = "#c0a856" message = "The blob splashes you with burning oil" message_living = ", and you feel your skin char and melt" @@ -40,8 +45,10 @@ /datum/reagent/blob/envenomed_filaments //toxin, hallucination, and some bonus spore toxin name = "Envenomed Filaments" + description = "Deals High Toxin damage, causes Hallucinations, and injects Spores into the bloodstream." id = "envenomed_filaments" color = "#9ACD32" + complementary_color = "#b0cd73" message_living = ", and you feel sick and nauseated" /datum/reagent/blob/envenomed_filaments/reaction_mob(mob/living/M, method=TOUCH, volume) @@ -53,8 +60,10 @@ /datum/reagent/blob/lexorin_jelly //does tons of oxygen damage and a little brute name = "Lexorin Jelly" + description = "Deals Medium Brute damage, but massive amounts of Respiration Damage." id = "lexorin_jelly" color = "#00FFC5" + complementary_color = "#56ebc9" message_living = ", and your lungs feel heavy and weak" /datum/reagent/blob/lexorin_jelly/reaction_mob(mob/living/M, method=TOUCH, volume) @@ -67,8 +76,10 @@ /datum/reagent/blob/kinetic //does semi-random brute damage name = "Kinetic Gelatin" + description = "Deals Randomized damage, between 0.33 to 2.33 times the standard amount." id = "kinetic" color = "#FFA500" + complementary_color = "#ebb756" message = "The blob pummels you" /datum/reagent/blob/kinetic/reaction_mob(mob/living/M, method=TOUCH, volume) @@ -79,8 +90,10 @@ /datum/reagent/blob/cryogenic_liquid //does low burn damage and stamina damage and cools targets down name = "Cryogenic Liquid" + description = "Deals Medium Brute damage, Stamina Damage, and injects Frost Oil into its victims, freezing them to death." id = "cryogenic_liquid" color = "#8BA6E9" + complementary_color = "#a8b7df" message = "The blob splashes you with an icy liquid" message_living = ", and you feel cold and tired" @@ -93,8 +106,10 @@ /datum/reagent/blob/dark_matter name = "Dark Matter" + description = "Deals High Brute damage and sucks everyone and everything closer, creating a vortex of death." id = "dark_matter" color = "#61407E" + complementary_color = "#8f7ca0" message = "You feel a thrum as the blob strikes you, and everything flies at you" /datum/reagent/blob/dark_matter/reaction_mob(mob/living/M, method=TOUCH, volume) @@ -106,8 +121,10 @@ /datum/reagent/blob/b_sorium name = "Sorium" + description = "Deals High Brute damage, and sends people flying away." id = "b_sorium" color = "#808000" + complementary_color = "#a2a256" message = "The blob slams into you, and sends you flying" /datum/reagent/blob/b_sorium/reaction_mob(mob/living/M, method=TOUCH, volume) diff --git a/code/modules/reagents/chemistry/reagents/disease.dm b/code/modules/reagents/chemistry/reagents/disease.dm index a9cbbe87691..9ce636b466a 100644 --- a/code/modules/reagents/chemistry/reagents/disease.dm +++ b/code/modules/reagents/chemistry/reagents/disease.dm @@ -114,6 +114,19 @@ M.ForceContractDisease(new /datum/disease/vampire(0)) return ..() +/datum/reagent/bacon_grease + name = "pure bacon grease" + id = "bacon_grease" + description = "Hook me up to an IV of that sweet, sweet stuff!" + reagent_state = LIQUID + color = "#F7E6B1" + can_synth = FALSE + +/datum/reagent/bacon_grease/on_mob_life(mob/living/carbon/M) + if(volume > 4.5) + M.ForceContractDisease(new /datum/disease/critical/heart_failure(0)) + return ..() + /datum/reagent/heartworms name = "Space heartworms" id = "heartworms" diff --git a/code/modules/reagents/chemistry/reagents/food.dm b/code/modules/reagents/chemistry/reagents/food.dm index c4434a92c5e..3f21593a44e 100644 --- a/code/modules/reagents/chemistry/reagents/food.dm +++ b/code/modules/reagents/chemistry/reagents/food.dm @@ -845,10 +845,7 @@ to_chat(M, "Your chest is burning with pain!") update_flags |= M.Stun(1, FALSE) update_flags |= M.Weaken(1, FALSE) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(!H.undergoing_cardiac_arrest()) - H.set_heartattack(TRUE) + M.ForceContractDisease(new /datum/disease/critical/heart_failure(0)) return ..() | update_flags /datum/reagent/fungus diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm index 804904723ea..df32715c846 100644 --- a/code/modules/reagents/chemistry/reagents/medicine.dm +++ b/code/modules/reagents/chemistry/reagents/medicine.dm @@ -16,13 +16,6 @@ shock_reduction = 200 taste_message = "numbness" -/datum/reagent/medicine/hydrocodone/on_mob_life(mob/living/M) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.traumatic_shock < 100) - H.shock_stage = 0 - return ..() - /datum/reagent/medicine/sterilizine name = "Sterilizine" id = "sterilizine" @@ -412,10 +405,6 @@ var/update_flags = STATUS_UPDATE_NONE if(prob(55)) update_flags |= M.adjustBruteLoss(-2*REAGENTS_EFFECT_MULTIPLIER, FALSE) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.traumatic_shock < 100) - H.shock_stage = 0 return ..() | update_flags /datum/reagent/medicine/salbutamol @@ -472,7 +461,7 @@ update_flags |= M.AdjustWeakened(-1, FALSE) update_flags |= M.adjustStaminaLoss(-1*REAGENTS_EFFECT_MULTIPLIER, FALSE) M.AdjustLoseBreath(-1, bound_lower = 5) - if(M.oxyloss > 75) + if(M.getOxyLoss() > 75) update_flags |= M.adjustOxyLoss(-1, FALSE) if(M.health < 0 || M.health > 0 && prob(33)) update_flags |= M.adjustToxLoss(-1, FALSE) @@ -547,10 +536,6 @@ if(36 to INFINITY) M.Paralyse(15) M.Drowsy(20) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.traumatic_shock < 100) - H.shock_stage = 0 ..() /datum/reagent/medicine/oculine @@ -600,7 +585,7 @@ if(prob(4)) M.emote("collapse") M.AdjustLoseBreath(-5, bound_lower = 5) - if(M.oxyloss > 65) + if(M.getOxyLoss() > 65) update_flags |= M.adjustOxyLoss(-10*REAGENTS_EFFECT_MULTIPLIER, FALSE) if(M.health < -25) update_flags |= M.adjustToxLoss(-1, FALSE) @@ -636,7 +621,7 @@ update_flags |= M.adjustBrainLoss(-1, FALSE) holder.remove_reagent("histamine", 15) M.AdjustLoseBreath(-1, bound_lower = 3) - if(M.oxyloss > 35) + if(M.getOxyLoss() > 35) update_flags |= M.adjustOxyLoss(-10*REAGENTS_EFFECT_MULTIPLIER, FALSE) if(M.health < -10 && M.health > -65) update_flags |= M.adjustToxLoss(-1*REAGENTS_EFFECT_MULTIPLIER, FALSE) @@ -789,7 +774,7 @@ M.SetSlur(0) M.AdjustDrunk(-4) M.reagents.remove_all_type(/datum/reagent/consumable/ethanol, 8, 0, 1) - if(M.toxloss <= 25) + if(M.getToxLoss() <= 25) update_flags |= M.adjustToxLoss(-2.0, FALSE) return ..() | update_flags diff --git a/code/modules/reagents/chemistry/reagents/misc.dm b/code/modules/reagents/chemistry/reagents/misc.dm index 7e015a006e8..9277ba33fd9 100644 --- a/code/modules/reagents/chemistry/reagents/misc.dm +++ b/code/modules/reagents/chemistry/reagents/misc.dm @@ -205,6 +205,18 @@ taste_message = "motor oil" process_flags = ORGANIC | SYNTHETIC +/datum/reagent/oil/reaction_temperature(exposed_temperature, exposed_volume) + if(exposed_temperature > T0C + 600) + var/turf/T = get_turf(holder.my_atom) + holder.my_atom.visible_message("The oil burns!") + fireflash(T, min(max(0, volume / 40), 8)) + var/datum/effect_system/smoke_spread/bad/BS = new + BS.set_up(1, 0, T) + BS.start() + if(holder) + holder.add_reagent("ash", round(volume * 0.5)) + holder.del_reagent(id) + /datum/reagent/oil/reaction_turf(turf/T, volume) if(volume >= 3 && !isspaceturf(T) && !locate(/obj/effect/decal/cleanable/blood/oil) in T) new /obj/effect/decal/cleanable/blood/oil(T) diff --git a/code/modules/reagents/chemistry/reagents/paradise_pop.dm b/code/modules/reagents/chemistry/reagents/paradise_pop.dm index 08f01bdd381..204848e1fe9 100644 --- a/code/modules/reagents/chemistry/reagents/paradise_pop.dm +++ b/code/modules/reagents/chemistry/reagents/paradise_pop.dm @@ -29,7 +29,7 @@ /datum/reagent/consumable/drink/apple_pocalypse/on_mob_life(mob/living/M) if(prob(1)) var/turf/simulated/T = get_turf(M) - goonchem_vortex(T, 0, 2, 1) + goonchem_vortex(T, 1, 0) to_chat(M, "You briefly feel super-massive, like a black hole. Probably just your imagination...") ..() @@ -119,7 +119,7 @@ /datum/reagent/consumable/drink/grape_granade/on_mob_life(mob/living/M) if(prob(1)) var/turf/simulated/T = get_turf(M) - goonchem_vortex(T, 1, 1, 2) + goonchem_vortex(T, 0, 0) M.emote("burp") to_chat(M, "You feel ready to burst! Oh wait, just a burp...") else if(prob(25)) diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm index 857b15330d4..fb58e351a03 100644 --- a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm @@ -1,3 +1,80 @@ +/datum/reagent/phlogiston + name = "phlogiston" + id = "phlogiston" + description = "It appears to be liquid fire." + reagent_state = LIQUID + color = "#FFAF00" + process_flags = ORGANIC | SYNTHETIC + var/temp_fire = 4000 + var/temp_deviance = 1000 + var/size_divisor = 40 + var/mob_burning = 6.6 // 33 + +/datum/reagent/phlogiston/reaction_turf(turf/T, volume) + if(holder.chem_temp <= T0C - 50) + return + var/radius = min(max(0, volume / size_divisor), 8) + fireflash_sm(T, radius, rand(temp_fire - temp_deviance, temp_fire + temp_deviance), 500) + +/datum/reagent/phlogiston/reaction_mob(mob/living/M, method = TOUCH, volume) + if(holder.chem_temp <= T0C - 50) + return + M.adjust_fire_stacks(mob_burning) + M.IgniteMob() + if(method == INGEST) + M.adjustFireLoss(min(max(15, volume * 3), 45)) + to_chat(M, "It burns!") + M.emote("scream") + +/datum/reagent/phlogiston/on_mob_life(mob/living/M) + if(holder.chem_temp <= T0C - 50) + return + M.adjust_fire_stacks(0.4) + M.IgniteMob() + return ..() + +/datum/reagent/phlogiston/firedust + name = "phlogiston dust" + id = "phlogiston_dust" + description = "And this is solid fire. However that works." + temp_fire = 1500 + temp_deviance = 500 + size_divisor = 80 + mob_burning = 3 // 15 + +/datum/reagent/napalm + name = "napalm" + id = "napalm" + description = "A highly flammable jellied fuel." + reagent_state = LIQUID + process_flags = ORGANIC | SYNTHETIC + color = "#C86432" + +/datum/reagent/napalm/reaction_temperature(exposed_temperature, exposed_volume) + if(exposed_temperature > T0C + 100) + var/radius = min(max(0, volume * 0.15), 8) + fireflash_sm(get_turf(holder.my_atom), radius, rand(3000, 6000), 500) + if(holder) + holder.del_reagent(id) + +/datum/reagent/napalm/reaction_turf(turf/T, volume) + if(isspaceturf(T)) + return + if(!T.reagents) + T.create_reagents(volume) + T.reagents.add_reagent("napalm", volume) + +/datum/reagent/napalm/reaction_mob(mob/living/M, method = TOUCH, volume) + if(method == TOUCH) + if(M.on_fire) + M.adjust_fire_stacks(14) + M.emote("scream") + +/datum/reagent/napalm/on_mob_life(mob/living/M) + if(M.on_fire) + M.adjust_fire_stacks(2) + return ..() + /datum/reagent/fuel name = "Welding fuel" id = "fuel" @@ -8,12 +85,54 @@ drink_name = "Glass of welder fuel" drink_desc = "Unless you are an industrial tool, this is probably not safe for consumption." taste_message = "mistakes" + process_flags = ORGANIC | SYNTHETIC + var/max_radius = 7 + var/min_radius = 0 + var/volume_radius_modifier = -0.15 + var/volume_radius_multiplier = 0.09 + var/explosion_threshold = 100 + var/min_explosion_radius = 0 + var/max_explosion_radius = 4 + var/volume_explosion_radius_multiplier = 0.005 + var/volume_explosion_radius_modifier = 0 + var/combustion_temp = T0C + 200 + +/datum/reagent/fuel/on_mob_life(mob/living/M) + if(M.on_fire) + M.adjust_fire_stacks(0.4) + return ..() + +/datum/reagent/fuel/reaction_temperature(exposed_temperature, exposed_volume) + if(exposed_temperature > combustion_temp) + if(volume < 1) + if(holder) + holder.del_reagent(id) + return + var/turf/T = get_turf(holder.my_atom) + var/radius = min(max(min_radius, volume * volume_radius_multiplier + volume_radius_modifier), max_radius) + fireflash_sm(T, radius, 2200 + radius * 250, radius * 50) + if(holder && volume >= explosion_threshold) + if(holder.my_atom) + holder.my_atom.visible_message("[holder.my_atom] explodes!") + message_admins("Fuel explosion ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].") + log_game("Fuel explosion ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].") + holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB) + var/boomrange = min(max(min_explosion_radius, round(volume * volume_explosion_radius_multiplier + volume_explosion_radius_modifier)), max_explosion_radius) + explosion(T, -1, -1, boomrange, 1) + if(holder) + holder.del_reagent(id) + +/datum/reagent/fuel/reaction_turf(turf/T, volume) //Don't spill the fuel, or you'll regret it + if(isspaceturf(T)) + return + if(!T.reagents) + T.create_reagents(50) + T.reagents.add_reagent("fuel", volume) /datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with welding fuel to make them easy to ignite! if(method == TOUCH) - M.adjust_fire_stacks(volume / 10) - return - ..() + if(M.on_fire) + M.adjust_fire_stacks(6) /datum/reagent/plasma name = "Plasma" @@ -23,6 +142,12 @@ color = "#7A2B94" taste_message = "corporate assets going to waste" +/datum/reagent/plasma/reaction_temperature(exposed_temperature, exposed_volume) + if(exposed_temperature >= T0C + 100) + fireflash(get_turf(holder.my_atom), min(max(0, volume / 10), 8)) + if(holder) + holder.del_reagent(id) + /datum/reagent/plasma/on_mob_life(mob/living/M) var/update_flags = STATUS_UPDATE_NONE update_flags |= M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER, FALSE) @@ -33,10 +158,10 @@ C.adjustPlasma(10) return ..() | update_flags -/datum/reagent/plasma/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma is stronger than fuel! +/datum/reagent/plasma/reaction_mob(mob/living/M, method = TOUCH, volume)//Splashing people with plasma is stronger than fuel! if(method == TOUCH) - M.adjust_fire_stacks(volume / 5) - ..() + if(M.on_fire) + M.adjust_fire_stacks(6) /datum/reagent/thermite @@ -48,11 +173,32 @@ process_flags = ORGANIC | SYNTHETIC taste_message = "rust" -/datum/reagent/thermite/reaction_turf(turf/simulated/wall/W, volume) - if(volume >= 5 && istype(W)) - W.thermite = 1 - W.overlays.Cut() - W.overlays = image('icons/effects/effects.dmi', icon_state = "thermite") +/datum/reagent/thermite/reaction_mob(mob/living/M, method= TOUCH, volume) + if(method == TOUCH) + if(M.on_fire) + M.adjust_fire_stacks(20) + +/datum/reagent/thermite/reaction_temperature(exposed_temperature, exposed_volume) + var/turf/simulated/S = holder.my_atom + if(!istype(S)) + return + + if(exposed_temperature >= T0C + 100) + var/datum/reagents/Holder = holder + var/Id = id + var/Volume = volume + Holder.del_reagent(Id) + fireflash_sm(S, 0, rand(20000, 25000) + Volume * 2500, 0, 0, 1) + +/datum/reagent/thermite/reaction_turf(turf/simulated/S, volume) + if(istype(S)) + if(!S.reagents) + S.create_reagents(volume) + S.reagents.add_reagent("thermite", volume) + S.overlays.Cut() + S.overlays = image('icons/effects/effects.dmi', icon_state = "thermite") + if(S.active_hotspot) + S.reagents.temperature_reagents(S.active_hotspot.temperature, 10, 300) /datum/reagent/glycerol name = "Glycerol" @@ -81,33 +227,24 @@ taste_message = null /datum/reagent/clf3/on_mob_life(mob/living/M) - var/update_flags = STATUS_UPDATE_NONE - M.adjust_fire_stacks(2) - var/burndmg = max(0.3*M.fire_stacks, 0.3) - update_flags |= M.adjustFireLoss(burndmg, FALSE) - return ..() | update_flags + if(M.on_fire) + M.adjust_fire_stacks(1) + return ..() -/datum/reagent/clf3/reaction_turf(turf/simulated/T, volume) - if(prob(1) && istype(T, /turf/simulated/floor/plating)) - var/turf/simulated/floor/plating/F = T - F.ChangeTurf(/turf/space) - if(istype(T, /turf/simulated/floor)) - var/turf/simulated/floor/F = T - if(prob(volume/10)) - F.make_plating() - if(istype(F, /turf/simulated/floor)) - new /obj/effect/hotspot(F) - if(prob(volume/10) && istype(T, /turf/simulated/wall)) - var/turf/simulated/wall/W = T - W.ChangeTurf(/turf/simulated/floor) - if(istype(T, /turf/simulated/shuttle)) - new /obj/effect/hotspot(T) +/datum/reagent/clf3/reaction_turf(turf/T, volume) + if(volume < 3) + return + var/radius = min((volume - 3) * 0.15, 3) + fireflash_sm(T, radius, 4500 + volume * 500, 350) -/datum/reagent/clf3/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - M.adjust_fire_stacks(min(volume/5, 10)) +/datum/reagent/clf3/reaction_mob(mob/living/M, method = TOUCH, volume) + if(method == TOUCH || method == INGEST) + M.adjust_fire_stacks(10) M.IgniteMob() - M.bodytemperature += 30 + if(method == INGEST) + M.adjustFireLoss(min(max(30, volume * 6), 90)) + to_chat(M, "It burns!") + M.emote("scream") /datum/reagent/sorium name = "Sorium" @@ -116,6 +253,15 @@ reagent_state = LIQUID color = "#FFA500" +/datum/reagent/sorium/reaction_turf(turf/T, volume) // oh no + if(prob(75)) + return + if(isspaceturf(T)) + return + if(!T.reagents) + T.create_reagents(50) + T.reagents.add_reagent("sorium", 5) + /datum/reagent/sorium_vortex name = "sorium_vortex" id = "sorium_vortex" @@ -130,6 +276,15 @@ color = "#800080" taste_message = "the end of the world" +/datum/reagent/liquid_dark_matter/reaction_turf(turf/T, volume) //Oh gosh, why + if(prob(75)) + return + if(isspaceturf(T)) + return + if(!T.reagents) + T.create_reagents(50) + T.reagents.add_reagent("liquid_dark_matter", 5) + /datum/reagent/ldm_vortex name = "LDM Vortex" id = "ldm_vortex" @@ -157,6 +312,7 @@ description = "Makes a very bright flash." reagent_state = LIQUID color = "#FFFF00" + penetrates_skin = TRUE /datum/reagent/smoke_powder name = "Smoke Powder" @@ -171,42 +327,7 @@ description = "Makes a deafening noise." reagent_state = LIQUID color = "#0000FF" - -/datum/reagent/phlogiston - name = "Phlogiston" - id = "phlogiston" - description = "Catches you on fire and makes you ignite." - reagent_state = LIQUID - color = "#FF9999" - process_flags = ORGANIC | SYNTHETIC - -/datum/reagent/phlogiston/on_mob_life(mob/living/M) - var/update_flags = STATUS_UPDATE_NONE - M.adjust_fire_stacks(1) - var/burndmg = max(0.3*M.fire_stacks, 0.3) - update_flags |= M.adjustFireLoss(burndmg, FALSE) - return ..() | update_flags - -/datum/reagent/phlogiston/reaction_mob(mob/living/M, method=TOUCH, volume) - M.adjust_fire_stacks(1) - M.IgniteMob() - ..() - -/datum/reagent/napalm - name = "Napalm" - id = "napalm" - description = "Very flammable." - reagent_state = LIQUID - color = "#FF9999" - process_flags = ORGANIC | SYNTHETIC - -/datum/reagent/napalm/on_mob_life(mob/living/M) - M.adjust_fire_stacks(1) - return ..() - -/datum/reagent/napalm/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - M.adjust_fire_stacks(min(volume/4, 20)) + penetrates_skin = TRUE /datum/reagent/cryostylane name = "Cryostylane" @@ -223,11 +344,16 @@ /datum/reagent/cryostylane/on_tick() if(holder.has_reagent("oxygen")) - holder.remove_reagent("oxygen", 1) - holder.chem_temp -= 10 - holder.handle_reactions() + holder.remove_reagent("oxygen", 2) + holder.remove_reagent("cryostylane", 2) + holder.temperature_reagents(holder.chem_temp - 200) + holder.temperature_reagents(holder.chem_temp - 200) ..() +/datum/reagent/cryostylane/reaction_mob(mob/living/M, method = TOUCH, volume) + if(method == TOUCH) + M.ExtinguishMob() + /datum/reagent/cryostylane/reaction_turf(turf/T, volume) if(volume >= 5) for(var/mob/living/carbon/slime/M in T) @@ -248,9 +374,10 @@ /datum/reagent/pyrosium/on_tick() if(holder.has_reagent("oxygen")) - holder.remove_reagent("oxygen", 1) - holder.chem_temp += 10 - holder.handle_reactions() + holder.remove_reagent("oxygen", 2) + holder.remove_reagent("pyrosium", 2) + holder.temperature_reagents(holder.chem_temp + 200) + holder.temperature_reagents(holder.chem_temp + 200) ..() /datum/reagent/firefighting_foam @@ -264,8 +391,7 @@ /datum/reagent/firefighting_foam/reaction_mob(mob/living/M, method=TOUCH, volume) // Put out fire if(method == TOUCH) - M.adjust_fire_stacks(-(volume / 5)) // more effective than water - M.ExtinguishMob() + M.adjust_fire_stacks(-10) // more effective than water /datum/reagent/firefighting_foam/reaction_obj(obj/O, volume) O.extinguish() @@ -290,6 +416,12 @@ color = "#500064" // rgb: 80, 0, 100 taste_message = "corporate assets going to waste" +/datum/reagent/plasma_dust/reaction_temperature(exposed_temperature, exposed_volume) + if(exposed_temperature >= T0C + 100) + fireflash(get_turf(holder.my_atom), min(max(0, volume / 10), 8)) + if(holder) + holder.del_reagent(id) + /datum/reagent/plasma_dust/on_mob_life(mob/living/M) var/update_flags = STATUS_UPDATE_NONE update_flags |= M.adjustToxLoss(3, FALSE) diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm index 6d8ea272cfe..5623023659b 100644 --- a/code/modules/reagents/chemistry/reagents/water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -23,8 +23,7 @@ /datum/reagent/water/reaction_mob(mob/living/M, method=TOUCH, volume) if(method == TOUCH) // Put out fire - M.adjust_fire_stacks(-(volume / 10)) - M.ExtinguishMob() + M.adjust_fire_stacks(-(volume * 0.2)) if(ishuman(M)) var/mob/living/carbon/human/H = M diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm index 3464b145f6a..288abeb5f4d 100644 --- a/code/modules/reagents/chemistry/recipes.dm +++ b/code/modules/reagents/chemistry/recipes.dm @@ -65,17 +65,18 @@ var/list/chemical_mob_spawn_nicecritters = list() // and possible friendly mobs for(var/j = 1, j <= rand(1, 3), j++) step(C, pick(NORTH,SOUTH,EAST,WEST)) -/proc/goonchem_vortex(turf/simulated/T, setting_type, range, pull_times) - for(var/atom/movable/X in orange(range, T)) +/proc/goonchem_vortex(turf/T, setting_type, volume) + if(setting_type) + new /obj/effect/temp_visual/implosion(T) + playsound(T, 'sound/effects/whoosh.ogg', 25, 1) //credit to Robinhood76 of Freesound.org for this. + else + new /obj/effect/temp_visual/shockwave(T) + playsound(T, 'sound/effects/bang.ogg', 25, 1) + for(var/atom/movable/X in view(2 + setting_type + (volume > 30 ? 1 : 0), T)) if(istype(X, /obj/effect)) continue //stop pulling smoke and hotspots please - if(istype(X, /atom/movable)) - if((X) && !X.anchored && X.move_resist <= MOVE_FORCE_DEFAULT) - if(setting_type) - playsound(T, 'sound/effects/bang.ogg', 25, 1) - for(var/i = 0, i < pull_times, i++) - step_away(X,T) - else - playsound(T, 'sound/effects/whoosh.ogg', 25, 1) //credit to Robinhood76 of Freesound.org for this. - for(var/i = 0, i < pull_times, i++) - step_towards(X,T) \ No newline at end of file + if(X && !X.anchored && X.move_resist <= MOVE_FORCE_DEFAULT) + if(setting_type) + X.throw_at(T, 20 + round(volume * 2), 1 + round(volume / 10)) + else + X.throw_at(get_edge_target_turf(T, get_dir(T, X)), 20 + round(volume * 2), 1 + round(volume / 10)) \ No newline at end of file diff --git a/code/modules/reagents/chemistry/recipes/drinks.dm b/code/modules/reagents/chemistry/recipes/drinks.dm index c348db060ff..2f3eda996b0 100644 --- a/code/modules/reagents/chemistry/recipes/drinks.dm +++ b/code/modules/reagents/chemistry/recipes/drinks.dm @@ -229,7 +229,7 @@ id = "flamingmoe" result = "flamingmoe" required_reagents = list("vodka" = 1, "gin" = 1, "cognac" = 1, "tequila" = 1, "salglu_solution" = 1) //Close enough - min_temp = 374 //Fire makes it good! + min_temp = T0C + 100 //Fire makes it good! result_amount = 5 mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' mix_message = "The concoction bursts into flame!" @@ -701,7 +701,7 @@ id = "applejack" result = "applejack" required_reagents = list("cider" = 2) - max_temp = 270 + max_temp = T0C result_amount = 1 mix_message = "The drink darkens as the water freezes, leaving the concentrated cider behind." mix_sound = null diff --git a/code/modules/reagents/chemistry/recipes/drugs.dm b/code/modules/reagents/chemistry/recipes/drugs.dm index e44ace8f511..d2499a06c54 100644 --- a/code/modules/reagents/chemistry/recipes/drugs.dm +++ b/code/modules/reagents/chemistry/recipes/drugs.dm @@ -15,13 +15,12 @@ result_amount = 5 mix_message = "The mixture violently reacts, leaving behind a few crystalline shards." mix_sound = 'sound/goonstation/effects/crystalshatter.ogg' - min_temp = 390 + min_temp = T0C + 100 /datum/chemical_reaction/crank/on_reaction(datum/reagents/holder, created_volume) var/turf/T = get_turf(holder.my_atom) - for(var/turf/turf in range(1,T)) - new /obj/effect/hotspot(turf) - explosion(T,0,0,2) + fireflash(holder.my_atom, 1) + explosion(T, 0, 0, 2) /datum/chemical_reaction/krokodil name = "Krokodil" @@ -30,7 +29,7 @@ required_reagents = list("diphenhydramine" = 1, "morphine" = 1, "cleaner" = 1, "potassium" = 1, "phosphorus" = 1, "fuel" = 1) result_amount = 6 mix_message = "The mixture dries into a pale blue powder." - min_temp = 380 + min_temp = T0C + 100 mix_sound = 'sound/goonstation/misc/fuse.ogg' /datum/chemical_reaction/methamphetamine @@ -39,7 +38,7 @@ result = "methamphetamine" required_reagents = list("ephedrine" = 1, "iodine" = 1, "phosphorus" = 1, "hydrogen" = 1) result_amount = 4 - min_temp = 374 + min_temp = T0C + 100 /datum/chemical_reaction/methamphetamine/on_reaction(datum/reagents/holder) var/turf/T = get_turf(holder.my_atom) @@ -57,7 +56,7 @@ result = "bath_salts" required_reagents = list("????" = 1, "saltpetre" = 1, "msg" = 1, "cleaner" = 1, "enzyme" = 1, "mugwort" = 1, "mercury" = 1) result_amount = 6 - min_temp = 374 + min_temp = T0C + 100 mix_message = "Tiny cubic crystals precipitate out of the mixture. Huh." mix_sound = 'sound/goonstation/misc/fuse.ogg' diff --git a/code/modules/reagents/chemistry/recipes/food.dm b/code/modules/reagents/chemistry/recipes/food.dm index ec732bba858..5b5efc105d6 100644 --- a/code/modules/reagents/chemistry/recipes/food.dm +++ b/code/modules/reagents/chemistry/recipes/food.dm @@ -124,7 +124,7 @@ result = "corn_syrup" required_reagents = list("corn_starch" = 1, "sacid" = 1) result_amount = 2 - min_temp = 374 + min_temp = T0C + 100 mix_message = "The mixture forms a viscous, clear fluid!" /datum/chemical_reaction/vhfcs @@ -176,7 +176,7 @@ result = "hydrogenated_soybeanoil" required_reagents = list("soybeanoil" = 1, "hydrogen" = 1) result_amount = 2 - min_temp = 520 + min_temp = T0C + 250 mix_message = "The mixture emits a burnt, oily smell." /datum/chemical_reaction/meatslurry @@ -194,7 +194,7 @@ result = "gravy" required_reagents = list("porktonium" = 1, "corn_starch" = 1, "milk" = 1) result_amount = 3 - min_temp = 374 + min_temp = T0C + 100 mix_message = "The substance thickens and takes on a meaty odor." /datum/chemical_reaction/beff @@ -221,7 +221,7 @@ result = "enzyme" required_reagents = list("vomit" = 1, "sugar" = 1) result_amount = 2 - min_temp = 750 + min_temp = T0C + 480 mix_message = "The mixture emits a horrible smell as you heat up the contents. Luckily, enzymes don't stink." mix_sound = 'sound/goonstation/misc/fuse.ogg' @@ -231,6 +231,6 @@ result = "enzyme" required_reagents = list("green_vomit" = 1, "sugar" = 1) result_amount = 2 - min_temp = 750 + min_temp = T0C + 480 mix_message = "The mixture emits a horrible smell as you heat up the contents. Luckily, enzymes don't stink." mix_sound = 'sound/goonstation/misc/fuse.ogg' diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index 864733f6555..b523bbafb45 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -50,7 +50,7 @@ required_reagents = list("ash" = 1, "sodiumchloride" = 1) result_amount = 2 mix_message = "The mixture yields a fine black powder." - min_temp = 380 + min_temp = T0C + 100 mix_sound = 'sound/goonstation/misc/fuse.ogg' /datum/chemical_reaction/silver_sulfadiazine @@ -92,7 +92,7 @@ result = "calomel" required_reagents = list("mercury" = 1, "chlorine" = 1) result_amount = 2 - min_temp = 374 + min_temp = T0C + 100 mix_message = "Stinging vapors rise from the solution." /datum/chemical_reaction/potass_iodide @@ -135,7 +135,7 @@ result = "perfluorodecalin" required_reagents = list("hydrogen" = 1, "fluorine" = 1, "oil" = 1) result_amount = 3 - min_temp = 370 + min_temp = T0C + 100 mix_message = "The mixture rapidly turns into a dense pink liquid." mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' @@ -195,7 +195,7 @@ result = null required_reagents = list("strange_reagent" = 1, "synthflesh" = 1, "blood" = 1) result_amount = 3 - min_temp = 374 + min_temp = T0C + 100 /datum/chemical_reaction/life/on_reaction(datum/reagents/holder, created_volume) chemical_mob_spawn(holder, 1, "Life") @@ -263,12 +263,5 @@ result = "liquid_solder" required_reagents = list("ethanol" = 1, "copper" = 1, "silver" = 1) result_amount = 3 - min_temp = 370 - mix_message = "The solution gently swirls with a metallic sheen." - -/datum/chemical_reaction/corazone - name = "Corazone" - id = "corazone" - result = "corazone" - result_amount = 3 - required_reagents = list("phenol" = 2, "lithium" = 1) + min_temp = T0C + 100 + mix_message = "The solution gently swirls with a metallic sheen." \ No newline at end of file diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm index 0259ed89e86..c40c1213793 100644 --- a/code/modules/reagents/chemistry/recipes/others.dm +++ b/code/modules/reagents/chemistry/recipes/others.dm @@ -74,7 +74,7 @@ result = "diethylamine" required_reagents = list ("ammonia" = 1, "ethanol" = 1) result_amount = 2 - min_temp = 374 + min_temp = T0C + 100 mix_message = "A horrible smell pours forth from the mixture." /datum/chemical_reaction/space_cleaner @@ -98,7 +98,7 @@ id = "plastic_polymers" result = null required_reagents = list("oil" = 5, "sacid" = 2, "ash" = 3) - min_temp = 374 + min_temp = T0C + 100 result_amount = 1 /datum/chemical_reaction/plastic_polymers/on_reaction(datum/reagents/holder, created_volume) @@ -171,16 +171,6 @@ mix_message = "The mixture bubbles and gives off an unpleasant medicinal odor." mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' -/datum/chemical_reaction/ash - name = "Ash" - id = "ash" - result = "ash" - required_reagents = list("oil" = 1) - result_amount = 0.5 - min_temp = 480 - mix_sound = null - no_message = 1 - /datum/chemical_reaction/colorful_reagent name = "colorful_reagent" id = "colorful_reagent" @@ -195,7 +185,7 @@ result = null required_reagents = list("nutriment" = 1, "colorful_reagent" = 1, "strange_reagent" = 1, "blood" = 1) result_amount = 3 - min_temp = 374 + min_temp = T0C + 100 /datum/chemical_reaction/corgium/on_reaction(datum/reagents/holder, created_volume) var/location = get_turf(holder.my_atom) @@ -208,7 +198,7 @@ result = null required_reagents = list("egg" = 1, "colorful_reagent" = 1, "chicken_soup" = 1, "strange_reagent" = 1, "blood" = 1) result_amount = 5 - min_temp = 374 + min_temp = T0C + 100 mix_message = "The substance turns an airy sky-blue and foams up into a new shape." /datum/chemical_reaction/flaptonium/on_reaction(datum/reagents/holder, created_volume) @@ -244,7 +234,7 @@ id = "soapification" result = null required_reagents = list("liquidgibs" = 10, "lye" = 10) // requires two scooped gib tiles - min_temp = 374 + min_temp = T0C + 100 result_amount = 1 @@ -257,7 +247,7 @@ id = "candlefication" result = null required_reagents = list("liquidgibs" = 5, "oxygen" = 5) // - min_temp = 374 + min_temp = T0C + 100 result_amount = 1 /datum/chemical_reaction/candlefication/on_reaction(datum/reagents/holder, created_volume) @@ -295,7 +285,7 @@ id = "jestosterone" result = "jestosterone" required_reagents = list("blood" = 1, "sodiumchloride" = 1, "banana" = 1, "lube" = 1, "space_drugs" = 1) //Or one freshly-squeezed clown - min_temp = 374 + min_temp = T0C + 100 result_amount = 5 mix_message = "The substance quickly shifts colour, cycling from red, to yellow, to green, to blue, and finally settles at a vibrant fuchsia." @@ -338,7 +328,7 @@ result = "ice" required_reagents = list("water" = 1) result_amount = 1 - max_temp = 273 + max_temp = T0C mix_message = "Ice forms as the water freezes." mix_sound = null @@ -348,7 +338,7 @@ result = "water" required_reagents = list("ice" = 1) result_amount = 1 - min_temp = 301 // In Space.....ice melts at 82F...don't ask + min_temp = T0C + 29 // In Space.....ice melts at 82F...don't ask mix_message = "Water pools as the ice melts." mix_sound = null diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index a83bf0f7989..5aca554ae03 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -80,12 +80,10 @@ result = "clf3" required_reagents = list("chlorine" = 1, "fluorine" = 3) result_amount = 2 - min_temp = 424 + min_temp = T0C + 150 /datum/chemical_reaction/clf3/on_reaction(datum/reagents/holder, created_volume) - var/turf/T = get_turf(holder.my_atom) - for(var/turf/turf in range(1,T)) - new /obj/effect/hotspot(turf) + fireflash(holder.my_atom, 1, 7000) /datum/chemical_reaction/sorium name = "Sorium" @@ -98,7 +96,7 @@ if(holder.has_reagent("stabilizing_agent")) return var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 1, min(10, created_volume), min(11, created_volume + 1)) + goonchem_vortex(T, 0, created_volume) holder.remove_reagent("sorium", created_volume) /datum/chemical_reaction/sorium_vortex @@ -107,11 +105,11 @@ result = "sorium_vortex" required_reagents = list("sorium" = 1) result_amount = 1 - min_temp = 474 + min_temp = T0C + 200 /datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, created_volume) var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 1, min(10, created_volume), min(11, created_volume + 1)) + goonchem_vortex(T, 0, created_volume) holder.remove_reagent("sorium_vortex", created_volume) /datum/chemical_reaction/liquid_dark_matter @@ -125,7 +123,7 @@ if(holder.has_reagent("stabilizing_agent")) return var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 0, min(10, created_volume), min(11, created_volume + 1)) + goonchem_vortex(T, 1, created_volume) holder.remove_reagent("liquid_dark_matter", created_volume) /datum/chemical_reaction/ldm_vortex @@ -134,11 +132,11 @@ result = "ldm_vortex" required_reagents = list("liquid_dark_matter" = 1) result_amount = 1 - min_temp = 474 + min_temp = T0C + 200 /datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, created_volume) var/turf/simulated/T = get_turf(holder.my_atom) - goonchem_vortex(T, 0, min(10, created_volume), min(11, created_volume + 1)) + goonchem_vortex(T, 1, created_volume) holder.remove_reagent("ldm_vortex", created_volume) /datum/chemical_reaction/blackpowder @@ -155,23 +153,23 @@ result = null required_reagents = list("blackpowder" = 1) result_amount = 1 - min_temp = 474 + min_temp = T0C + 200 no_message = 1 mix_sound = null /datum/chemical_reaction/blackpowder_explosion/on_reaction(datum/reagents/holder, created_volume) var/location = get_turf(holder.my_atom) do_sparks(2, 1, location) - sleep(rand(20,30)) - blackpowder_detonate(holder, created_volume) + spawn(rand(5, 15)) + blackpowder_detonate(holder, created_volume) /proc/blackpowder_detonate(datum/reagents/holder, created_volume) - var/turf/simulated/T = get_turf(holder.my_atom) + var/turf/T = get_turf(holder.my_atom) var/ex_severe = round(created_volume / 100) var/ex_heavy = round(created_volume / 42) var/ex_light = round(created_volume / 20) var/ex_flash = round(created_volume / 8) - explosion(T,ex_severe,ex_heavy,ex_light,ex_flash, 1) + explosion(T, ex_severe, ex_heavy,ex_light, ex_flash, 1) // If this black powder is in a decal, remove the decal, because it just exploded if(istype(holder.my_atom, /obj/effect/decal/cleanable/dirt/blackpowder)) spawn(0) @@ -202,7 +200,7 @@ datum/chemical_reaction/flash_powder id = "flash_powder_flash" result = null required_reagents = list("flash_powder" = 1) - min_temp = 374 + min_temp = T0C + 100 /datum/chemical_reaction/flash_powder_flash/on_reaction(datum/reagents/holder, created_volume) var/location = get_turf(holder.my_atom) @@ -214,6 +212,40 @@ datum/chemical_reaction/flash_powder continue C.Stun(5) +/datum/chemical_reaction/phlogiston + name = "Phlogiston" + id = "phlogiston" + result = "phlogiston" + required_reagents = list("phosphorus" = 1, "plasma" = 1, "sacid" = 1, "stabilizing_agent" = 1) + result_amount = 4 + mix_message = "The substance becomes sticky and extremely warm." + +/datum/chemical_reaction/phlogiston_dust + name = "Phlogiston Dust" + id = "phlogiston_dust" + result = "phlogiston_dust" + required_reagents = list("phlogiston" = 1, "charcoal" = 1, "phosphorus" = 1, "sulfur" = 1) + result_amount = 2 + mix_message = "The substance becomes a pile of burning dust." + +/datum/chemical_reaction/phlogiston_fire //This MUST be above the smoke recipe. + name = "Phlogiston Fire" + id = "phlogiston_fire" + result = "phlogiston" + required_reagents = list("phosphorus" = 1, "plasma" = 1, "sacid" = 1) + mix_message = "The substance erupts into wild flames." + +/datum/chemical_reaction/phlogiston_fire/on_reaction(datum/reagents/holder, created_volume) + fireflash(get_turf(holder.my_atom), min(max(2, round(created_volume / 10)), 8)) + +/datum/chemical_reaction/napalm + name = "Napalm" + id = "napalm" + result = "napalm" + required_reagents = list("fuel" = 1, "sugar" = 1, "ethanol" = 1) + result_amount = 3 + mix_message = "The mixture congeals into a sticky gel." + /datum/chemical_reaction/smoke_powder name = "smoke_powder" id = "smoke_powder" @@ -247,14 +279,12 @@ datum/chemical_reaction/flash_powder S.start(3) if(created_volume >=15) S.start(4) - if(holder && holder.my_atom) - holder.clear_reagents() /datum/chemical_reaction/smoke/smoke_powder name = "smoke_powder_smoke" id = "smoke_powder_smoke" required_reagents = list("smoke_powder" = 1) - min_temp = 374 + min_temp = T0C + 100 secondary = 1 result_amount = 1 forbidden_reagents = list("stimulants") @@ -305,7 +335,7 @@ datum/chemical_reaction/flash_powder id = "sonic_powder_deafen" result = null required_reagents = list("sonic_powder" = 1) - min_temp = 374 + min_temp = T0C + 100 /datum/chemical_reaction/sonic_powder_deafen/on_reaction(datum/reagents/holder, created_volume) var/location = get_turf(holder.my_atom) @@ -337,28 +367,6 @@ datum/chemical_reaction/flash_powder if(ears.ear_damage >= 5) to_chat(M, "Your ears start to ring!") - -/datum/chemical_reaction/phlogiston - name = "phlogiston" - id = "phlogiston" - result = "phlogiston" - required_reagents = list("phosphorus" = 1, "sacid" = 1, "plasma" = 1) - result_amount = 3 - -/datum/chemical_reaction/phlogiston/on_reaction(datum/reagents/holder, created_volume) - if(holder.has_reagent("stabilizing_agent")) - return - var/turf/simulated/T = get_turf(holder.my_atom) - for(var/turf/simulated/turf in range(min(created_volume/10,4),T)) - new /obj/effect/hotspot(turf) - -/datum/chemical_reaction/napalm - name = "Napalm" - id = "napalm" - result = "napalm" - required_reagents = list("sugar" = 1, "fuel" = 1, "ethanol" = 1 ) - result_amount = 1 - /datum/chemical_reaction/cryostylane name = "cryostylane" id = "cryostylane" diff --git a/code/modules/reagents/chemistry/recipes/toxins.dm b/code/modules/reagents/chemistry/recipes/toxins.dm index 1531c80542a..54e3ce4fdb8 100644 --- a/code/modules/reagents/chemistry/recipes/toxins.dm +++ b/code/modules/reagents/chemistry/recipes/toxins.dm @@ -4,7 +4,7 @@ result = "formaldehyde" required_reagents = list("ethanol" = 1, "oxygen" = 1, "silver" = 1) result_amount = 3 - min_temp = 420 + min_temp = T0C + 150 mix_message = "Ugh, it smells like the morgue in here." /datum/chemical_reaction/neurotoxin2 @@ -13,7 +13,7 @@ result = "neurotoxin2" required_reagents = list("space_drugs" = 1) result_amount = 1 - min_temp = 674 + min_temp = T0C + 400 mix_sound = null no_message = 1 @@ -23,7 +23,7 @@ result = "cyanide" required_reagents = list("oil" = 1, "ammonia" = 1, "oxygen" = 1) result_amount = 3 - min_temp = 380 + min_temp = T0C + 100 mix_message = "The mixture gives off a faint scent of almonds." mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' @@ -49,7 +49,7 @@ result = "facid" required_reagents = list("sacid" = 1, "fluorine" = 1, "hydrogen" = 1, "potassium" = 1) result_amount = 4 - min_temp = 380 + min_temp = T0C + 100 mix_message = "The mixture deepens to a dark blue, and slowly begins to corrode its container." /datum/chemical_reaction/initropidril @@ -83,7 +83,7 @@ required_reagents = list("chlorine" = 1, "fuel" = 1, "oxygen" = 1, "phosphorus" = 1, "fluorine" = 1, "hydrogen" = 1, "acetone" = 1, "atrazine" = 1) result_amount = 3 mix_message = "The mixture yields a colorless, odorless liquid." - min_temp = 374 + min_temp = T0C + 100 mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' /datum/chemical_reaction/sarin/on_reaction(datum/reagents/holder) @@ -139,7 +139,7 @@ required_reagents = list("plasma" = 1, "silver" = 1, "blackpowder" = 1) result_amount = 3 mix_message = "A jet of sparks flies from the mixture as it merges into a flickering slurry." - min_temp = 400 + min_temp = T0C + 130 mix_sound = null /datum/chemical_reaction/teslium/on_reaction(datum/reagents/holder, created_volume) diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 6d58e42d539..a350d75a4b4 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -44,11 +44,6 @@ R.on_ex_act() ..() -/obj/item/reagent_containers/fire_act() - reagents.chem_temp += 30 - reagents.handle_reactions() - ..() - /obj/item/reagent_containers/attack_self(mob/user) if(has_lid) if(is_open_container()) diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index 3a9ee271ab5..6aeafd92cf0 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -44,10 +44,28 @@ /obj/item/reagent_containers/glass/bottle/toxin name = "toxin bottle" - desc = "A small bottle of toxins. Do not drink, it is poisonous." + desc = "A small bottle containing toxic compounds." icon_state = "small_bottle" list_reagents = list("toxin" = 30) +/obj/item/reagent_containers/glass/bottle/atropine + name = "atropine bottle" + desc = "A small bottle containing atropine, used for cardiac emergencies." + icon_state = "small_bottle" + list_reagents = list("atropine" = 30) + +/obj/item/reagent_containers/glass/bottle/saline + name = "saline-glucose bottle" + desc = "A small bottle containing saline-glucose solution." + icon_state = "small_bottle" + list_reagents = list("salglu_solution" = 30) + +/obj/item/reagent_containers/glass/bottle/salicylic + name = "salicylic acid bottle" + desc = "A small bottle containing medicine for pain and fevers." + icon_state = "small_bottle" + list_reagents = list("sal_acid" = 30) + /obj/item/reagent_containers/glass/bottle/cyanide name = "cyanide bottle" desc = "A small bottle of cyanide. Bitter almonds?" @@ -99,25 +117,25 @@ /obj/item/reagent_containers/glass/bottle/morphine name = "Morphine Bottle" - desc = "A small bottle. Contains morphine." - icon_state = "round_bottle" + desc = "A small bottle of morphine, a powerful painkiller." + icon_state = "bottle" list_reagents = list("morphine" = 30) /obj/item/reagent_containers/glass/bottle/ether name = "Ether Bottle" - desc = "A small bottle. Contains ether." + desc = "A small bottle of an ether, a strong anesthetic and sedative." icon_state = "round_bottle" list_reagents = list("ether" = 30) /obj/item/reagent_containers/glass/bottle/charcoal name = "Charcoal Bottle" desc = "A small bottle. Contains charcoal." - icon_state = "round_bottle" + icon_state = "wide_bottle" list_reagents = list("charcoal" = 30) /obj/item/reagent_containers/glass/bottle/epinephrine name = "Epinephrine Bottle" - desc = "A small bottle. Contains epinephrine." + desc = "A small bottle. Contains epinephrine - used to stabilize patients." icon_state = "round_bottle" list_reagents = list("epinephrine" = 30) @@ -236,9 +254,21 @@ /obj/item/reagent_containers/glass/bottle/diphenhydramine name = "diphenhydramine bottle" desc = "A small bottle of diphenhydramine." - icon_state = "bottle" + icon_state = "round_bottle" list_reagents = list("diphenhydramine" = 30) +/obj/item/reagent_containers/glass/bottle/oculine + name = "oculine bottle" + desc = "A small bottle of combined eye and ear medication." + icon_state = "round_bottle" + list_reagents = list("oculine" = 30) + +/obj/item/reagent_containers/glass/bottle/potassium_iodide + name = "potassium iodide bottle" + desc = "A small bottle of potassium iodide." + icon_state = "wide_bottle" + list_reagents = list("potass_iodide" = 30) + /obj/item/reagent_containers/glass/bottle/flu_virion name = "Flu virion culture bottle" desc = "A small bottle. Contains H13N1 flu virion culture in synthblood medium." diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index 23ec5f5cadb..cc866f7a2c7 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -124,13 +124,6 @@ /obj/item/reagent_containers/glass/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/clothing/mask/cigarette)) //ciggies are weird - return - if(is_hot(I)) - if(reagents) - reagents.chem_temp += 15 - to_chat(user, "You heat [src] with [I].") - reagents.handle_reactions() if(istype(I, /obj/item/pen) || istype(I, /obj/item/flashlight/pen)) var/tmp_label = sanitize(input(user, "Enter a label for [name]","Label",label_text)) if(length(tmp_label) > MAX_NAME_LEN) @@ -210,8 +203,7 @@ /obj/item/reagent_containers/glass/beaker/proc/heat_beaker() if(reagents) - reagents.chem_temp += 30 - reagents.handle_reactions() + reagents.temperature_reagents(4000) /obj/item/reagent_containers/glass/beaker/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/assembly_holder) && can_assembly) diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 71b0532650b..54a9867be60 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -8,7 +8,7 @@ icon_state = null item_state = "pill" possible_transfer_amounts = null - volume = 50 + volume = 100 consume_sound = null taste = FALSE @@ -103,7 +103,7 @@ name = "Charcoal pill" desc = "Neutralizes many common toxins." icon_state = "pill17" - list_reagents = list("charcoal" = 25) + list_reagents = list("charcoal" = 50) /obj/item/reagent_containers/food/pill/salicylic name = "Salicylic Acid pill" @@ -121,4 +121,22 @@ name = "Hydrocodone pill" desc = "Used to treat extreme pain." icon_state = "pill6" - list_reagents = list("hydrocodone" = 15) \ No newline at end of file + list_reagents = list("hydrocodone" = 15) + +/obj/item/reagent_containers/food/pill/calomel + name = "calomel pill" + desc = "Can be used to purge impurities, but is highly toxic itself." + icon_state = "pill3" + list_reagents = list("calomel" = 15) + +/obj/item/reagent_containers/food/pill/mutadone + name = "mutadone pill" + desc = "Used to cure genetic abnormalities." + icon_state = "pill18" + list_reagents = list("mutadone" = 20) + +/obj/item/reagent_containers/food/pill/mannitol + name = "mannitol pill" + desc = "Used to treat cranial swelling." + icon_state = "pill19" + list_reagents = list("mannitol" = 20) \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index e75d5292be2..e28ec4c0cff 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -318,6 +318,11 @@ desc = "Contains insulin - used to treat diabetes." list_reagents = list("insulin" = 15) +/obj/item/reagent_containers/syringe/calomel + name = "Syringe (calomel)" + desc = "Contains calomel, which be used to purge impurities, but is highly toxic itself." + list_reagents = list("calomel" = 15) + /obj/item/reagent_containers/syringe/bioterror name = "bioterror syringe" desc = "Contains several paralyzing reagents." diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index da9f408a7c3..b3c98f82b54 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -22,6 +22,13 @@ reagents.add_reagent(reagent_id, tank_volume) ..() +/obj/structure/reagent_dispensers/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + ..() + if(reagents) + for(var/i in 1 to 8) + if(reagents) + reagents.temperature_reagents(exposed_temperature) + /obj/structure/reagent_dispensers/proc/boom() visible_message("[src] ruptures!") chem_splash(loc, 5, list(reagents)) @@ -68,6 +75,7 @@ desc = "A tank full of industrial welding fuel. Do not consume." icon_state = "fuel" reagent_id = "fuel" + tank_volume = 4000 var/obj/item/assembly_holder/rig = null var/accepts_rig = 1 @@ -84,14 +92,14 @@ investigate_log("[key_name(P.firer)] triggered a fueltank explosion with [P.name] at [COORD(loc)]", INVESTIGATE_BOMB) boom() -/obj/structure/reagent_dispensers/fueltank/boom(var/rigtrigger = FALSE) // Prevent case where someone who rigged the tank is blamed for the explosion when the rig isn't what triggered the explosion - if(reagents.has_reagent("fuel")) - if(rigtrigger == TRUE) // If the explosion is triggered by an assembly holder - message_admins("A fueltank, last rigged by [lastrigger], exploded at [COORD(loc)]") // Then admin is informed of the last person who rigged the fuel tank - log_game("A fueltank, last rigged by [lastrigger], exploded at [COORD(loc)]") - investigate_log("A fueltank, last rigged by [lastrigger], exploded at [COORD(loc)]", INVESTIGATE_BOMB) - explosion(loc, 0, 1, 5, 7, 10, flame_range = 5) - qdel(src) +/obj/structure/reagent_dispensers/fueltank/boom(rigtrigger = FALSE) // Prevent case where someone who rigged the tank is blamed for the explosion when the rig isn't what triggered the explosion + if(rigtrigger) // If the explosion is triggered by an assembly holder + message_admins("A fueltank, last rigged by [lastrigger], was triggered at [COORD(loc)]") // Then admin is informed of the last person who rigged the fuel tank + log_game("A fueltank, last rigged by [lastrigger], triggered at [COORD(loc)]") + investigate_log("A fueltank, last rigged by [lastrigger], triggered at [COORD(loc)]", INVESTIGATE_BOMB) + if(reagents) + reagents.set_reagent_temp(1000) //uh-oh + qdel(src) /obj/structure/reagent_dispensers/fueltank/blob_act() boom() @@ -99,7 +107,8 @@ /obj/structure/reagent_dispensers/fueltank/ex_act() boom() -/obj/structure/reagent_dispensers/fueltank/fire_act() +/obj/structure/reagent_dispensers/fueltank/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + ..() boom() /obj/structure/reagent_dispensers/fueltank/tesla_act() @@ -167,7 +176,7 @@ investigate_log("[key_name(user)] triggered a fueltank explosion at [COORD(loc)]", INVESTIGATE_BOMB) boom() else - ..() + return ..() /obj/structure/reagent_dispensers/fueltank/Move() ..() @@ -295,3 +304,4 @@ anchored = 1 density = 0 accepts_rig = 0 + tank_volume = 1000 diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm index cc6305319c7..cc2f12e6714 100644 --- a/code/modules/research/designs/machine_designs.dm +++ b/code/modules/research/designs/machine_designs.dm @@ -163,8 +163,8 @@ category = list("Medical Machinery") /datum/design/chem_dispenser - name = "Machine Board (Portable Chem Dispenser)" - desc = "The circuit board for a Portable Chem Dispenser." + name = "Machine Board (Chem Dispenser)" + desc = "The circuit board for a Chem Dispenser." id = "chem_dispenser" req_tech = list("programming" = 5, "biotech" = 3, "materials" = 4, "plasmatech" = 4) build_type = IMPRINTER diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index d5434765e30..d945722770e 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -52,6 +52,16 @@ build_path = /obj/item/healthupgrade category = list("Medical") +/datum/design/handheld_defib + name = "Handheld Defibrillator" + desc = "A smaller defibrillator only capable of treating cardiac arrest." + id = "handheld_defib" + req_tech = list("biotech" = 2, "magnets" = 3) + build_type = PROTOLATHE + materials = list(MAT_METAL = 20, MAT_GLASS = 20) + build_path = /obj/item/handheld_defibrillator + category = list("Medical") + /datum/design/defib name = "Defibrillator" desc = "A device that delivers powerful shocks to detachable paddles that resuscitate incapacitated patients." diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 0c67888b444..f60954a83a6 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -205,6 +205,7 @@ SM.faction = user.faction SM.master_commander = user SM.sentience_act() + SM.can_collar = 1 to_chat(SM, "All at once it makes sense: you know what you are and who you are! Self awareness is yours!") to_chat(SM, "You are grateful to be self aware and owe [user] a great debt. Serve [user], and assist [user.p_them()] in completing [user.p_their()] goals at any cost.") if(SM.flags_2 & HOLOGRAM_2) //Check to see if it's a holodeck creature @@ -254,6 +255,7 @@ SM.universal_speak = 1 SM.faction = user.faction SM.sentience_act() //Same deal here as with sentience + SM.can_collar = 1 user.death() to_chat(SM, "In a quick flash, you feel your consciousness flow into [SM]!") to_chat(SM, "You are now [SM]. Your allegiances, alliances, and roles are still the same as they were prior to consciousness transfer!") diff --git a/code/modules/response_team/ert_outfits.dm b/code/modules/response_team/ert_outfits.dm index 368868770c7..b287643901d 100644 --- a/code/modules/response_team/ert_outfits.dm +++ b/code/modules/response_team/ert_outfits.dm @@ -306,7 +306,8 @@ /obj/item/roller = 1, /obj/item/storage/pill_bottle/ert = 1, /obj/item/flashlight = 1, - /obj/item/healthupgrade = 1 + /obj/item/healthupgrade = 1, + /obj/item/handheld_defibrillator = 1 ) /datum/outfit/job/centcom/response_team/medic/red @@ -335,7 +336,8 @@ /obj/item/roller = 1, /obj/item/clothing/shoes/magboots = 1, /obj/item/bodyanalyzer = 1, - /obj/item/healthupgrade = 1 + /obj/item/healthupgrade = 1, + /obj/item/handheld_defibrillator = 1 ) /datum/outfit/job/centcom/response_team/medic/gamma @@ -357,7 +359,8 @@ /obj/item/bodyanalyzer/advanced = 1, /obj/item/extinguisher/mini = 1, /obj/item/roller = 1, - /obj/item/healthanalyzer/advanced = 1 + /obj/item/healthanalyzer/advanced = 1, + /obj/item/handheld_defibrillator = 1 ) diff --git a/code/modules/ruins/objects_and_mobs/gym.dm b/code/modules/ruins/objects_and_mobs/gym.dm index 1fb9befc671..c4831e8899d 100644 --- a/code/modules/ruins/objects_and_mobs/gym.dm +++ b/code/modules/ruins/objects_and_mobs/gym.dm @@ -50,7 +50,6 @@ obj_flags &= ~IN_USE user.pixel_y = 0 var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!") - SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "exercise", /datum/mood_event/exercise) icon_state = initial(icon_state) to_chat(user, finishmessage) user.apply_status_effect(STATUS_EFFECT_EXERCISED) diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 04626864b94..512de9de9e9 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -160,6 +160,7 @@ /obj/item/organ/internal/heart/cybernetic/upgraded/on_life() if(!ishuman(owner)) return + if(!(status & ORGAN_DEAD) && !attempted_restart && !beating) to_chat(owner, "Your [name] detects a cardiac event and attempts to return to its normal rhythm!") if(prob(20) && emagged) @@ -180,6 +181,28 @@ addtimer(CALLBACK(src, .proc/recharge), 300) addtimer(CALLBACK(src, .proc/message_to_owner, owner, "Your [name] fails to return to its normal rhythm!"), 30) + if(!(status & ORGAN_DEAD) && !attempted_restart && owner.HasDisease(new /datum/disease/critical/heart_failure(0))) + to_chat(owner, "Your [name] detects a cardiac event and attempts to return to its normal rhythm!") + if(prob(40) && emagged) + attempted_restart = TRUE + for(var/datum/disease/critical/heart_failure/HF in owner.viruses) + HF.cure() + addtimer(CALLBACK(src, .proc/message_to_owner, owner, "Your [name] returns to its normal rhythm!"), 30) + addtimer(CALLBACK(src, .proc/recharge), 200) + else if(prob(25)) + attempted_restart = TRUE + for(var/datum/disease/critical/heart_failure/HF in owner.viruses) + HF.cure() + addtimer(CALLBACK(src, .proc/message_to_owner, owner, "Your [name] returns to its normal rhythm!"), 30) + addtimer(CALLBACK(src, .proc/recharge), 200) + else + attempted_restart = TRUE + if(emagged) + addtimer(CALLBACK(src, .proc/recharge), 200) + else + addtimer(CALLBACK(src, .proc/recharge), 300) + addtimer(CALLBACK(src, .proc/message_to_owner, owner, "Your [name] fails to return to its normal rhythm!"), 30) + if(!(status & ORGAN_DEAD)) var/boost = emagged ? 2 : 1 owner.AdjustDrowsy(-4 * boost) @@ -230,7 +253,7 @@ owner.adjustFireLoss(numHigh) if(prob(numMid)) to_chat(owner, "Your [name] lurches awkwardly!") - Stop() + owner.ForceContractDisease(new /datum/disease/critical/heart_failure(0)) if(prob(numMid)) to_chat(owner, "Your [name] stops beating!") Stop() @@ -246,4 +269,4 @@ owner.adjustFireLoss(numMid) if(prob(numLow)) to_chat(owner, "Your [name] lurches awkwardly!") - Stop() \ No newline at end of file + owner.ForceContractDisease(new /datum/disease/critical/heart_failure(0)) \ No newline at end of file diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index 3026da6f66a..47fa74969d0 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -19,20 +19,16 @@ var/safe_toxins_max = 0.05 var/SA_para_min = 1 //Sleeping agent var/SA_sleep_min = 5 //Sleeping agent - var/gas_toxicity_multiplier = 100 - var/oxy_breath_dam_min = MIN_TOXIC_GAS_DAMAGE - var/oxy_breath_dam_max = MAX_TOXIC_GAS_DAMAGE + var/oxy_damage_type = OXY - var/nitro_breath_dam_min = MIN_TOXIC_GAS_DAMAGE - var/nitro_breath_dam_max = MAX_TOXIC_GAS_DAMAGE + var/oxy_breath_dam_multiplier = 1 var/nitro_damage_type = OXY - var/co2_breath_dam_min = MIN_TOXIC_GAS_DAMAGE - var/co2_breath_dam_max = MAX_TOXIC_GAS_DAMAGE + var/nitro_breath_dam_multiplier = 1 var/co2_damage_type = OXY - var/tox_breath_dam_min = MIN_TOXIC_GAS_DAMAGE - var/tox_breath_dam_max = MAX_TOXIC_GAS_DAMAGE + var/co2_breath_dam_multiplier = 1 var/tox_damage_type = TOX + var/tox_breath_dam_multiplier = 1 var/cold_message = "your face freezing and an icicle forming" var/cold_level_1_threshold = 260 @@ -88,12 +84,11 @@ return if(!breath || (breath.total_moles() == 0)) - if(H.health >= config.health_threshold_crit) - H.adjustOxyLoss(HUMAN_MAX_OXYLOSS) - else if(!(NOCRITDAMAGE in H.dna.species.species_traits)) - H.adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS) + if(isspaceturf(loc)) + H.adjustOxyLoss(10) + else + H.adjustOxyLoss(5) - H.failed_last_breath = TRUE if(safe_oxygen_min) H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy) else if(safe_toxins_min) @@ -104,6 +99,10 @@ H.throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro) return FALSE + + if(H.health < HEALTH_THRESHOLD_CRIT) + return FALSE + var/gas_breathed = 0 //Partial pressures in our breath @@ -118,8 +117,8 @@ //Too much oxygen! //Yes, some species may not like it. if(safe_oxygen_max) if(O2_pp > safe_oxygen_max) - var/ratio = (breath.oxygen/safe_oxygen_max) * gas_toxicity_multiplier - H.apply_damage_type(Clamp(ratio, oxy_breath_dam_min, oxy_breath_dam_max), oxy_damage_type) + var/ratio = breath.oxygen/safe_oxygen_max + H.apply_damage_type(ratio * 325 * oxy_breath_dam_multiplier, oxy_damage_type) H.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy) else H.clear_alert("too_much_oxy") @@ -130,8 +129,7 @@ gas_breathed = handle_too_little_breath(H, O2_pp, safe_oxygen_min, breath.oxygen) H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy) else - H.failed_last_breath = FALSE - H.adjustOxyLoss(-5) + H.adjustOxyLoss(-HUMAN_MAX_OXYLOSS) gas_breathed = breath.oxygen H.clear_alert("not_enough_oxy") @@ -145,8 +143,8 @@ //Too much nitrogen! if(safe_nitro_max) if(N2_pp > safe_nitro_max) - var/ratio = (breath.nitrogen/safe_nitro_max) * gas_toxicity_multiplier - H.apply_damage_type(Clamp(ratio, nitro_breath_dam_min, nitro_breath_dam_max), nitro_damage_type) + var/ratio = breath.nitrogen/safe_nitro_max + H.apply_damage_type(ratio * 325 * nitro_breath_dam_multiplier, nitro_damage_type) H.throw_alert("too_much_nitro", /obj/screen/alert/too_much_nitro) else H.clear_alert("too_much_nitro") @@ -157,8 +155,7 @@ gas_breathed = handle_too_little_breath(H, N2_pp, safe_nitro_min, breath.nitrogen) H.throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro) else - H.failed_last_breath = FALSE - H.adjustOxyLoss(-5) + H.adjustOxyLoss(-HUMAN_MAX_OXYLOSS) gas_breathed = breath.nitrogen H.clear_alert("not_enough_nitro") @@ -176,9 +173,9 @@ H.co2overloadtime = world.time else if(world.time - H.co2overloadtime > 120) H.Paralyse(3) - H.apply_damage_type(3, co2_damage_type) // Lets hurt em a little, let them know we mean business + H.apply_damage_type(HUMAN_MAX_OXYLOSS * co2_breath_dam_multiplier, co2_damage_type) // Lets hurt em a little, let them know we mean business if(world.time - H.co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good! - H.apply_damage_type(8, co2_damage_type) + H.apply_damage_type(15 * co2_breath_dam_multiplier, co2_damage_type) H.throw_alert("too_much_co2", /obj/screen/alert/too_much_co2) if(prob(20)) // Lets give them some chance to know somethings not right though I guess. H.emote("cough") @@ -193,8 +190,7 @@ gas_breathed = handle_too_little_breath(H, CO2_pp, safe_co2_min, breath.carbon_dioxide) H.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2) else - H.failed_last_breath = FALSE - H.adjustOxyLoss(-5) + H.adjustOxyLoss(-HUMAN_MAX_OXYLOSS) gas_breathed = breath.carbon_dioxide H.clear_alert("not_enough_co2") @@ -209,8 +205,8 @@ //Too much toxins! if(safe_toxins_max) if(Toxins_pp > safe_toxins_max) - var/ratio = (breath.toxins/safe_toxins_max) * gas_toxicity_multiplier - H.apply_damage_type(Clamp(ratio, tox_breath_dam_min, tox_breath_dam_max), tox_damage_type) + var/ratio = breath.toxins/safe_toxins_max + H.apply_damage_type(ratio * 325 * tox_breath_dam_multiplier, tox_damage_type) H.throw_alert("too_much_tox", /obj/screen/alert/too_much_tox) else H.clear_alert("too_much_tox") @@ -222,8 +218,7 @@ gas_breathed = handle_too_little_breath(H, Toxins_pp, safe_toxins_min, breath.toxins) H.throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox) else - H.failed_last_breath = FALSE - H.adjustOxyLoss(-5) + H.adjustOxyLoss(-HUMAN_MAX_OXYLOSS) gas_breathed = breath.toxins H.clear_alert("not_enough_tox") @@ -261,11 +256,9 @@ if(breath_pp > 0) var/ratio = safe_breath_min/breath_pp H.adjustOxyLoss(min(5*ratio, HUMAN_MAX_OXYLOSS)) // Don't fuck them up too fast (space only does HUMAN_MAX_OXYLOSS after all! - H.failed_last_breath = TRUE . = true_pp*ratio/6 else H.adjustOxyLoss(HUMAN_MAX_OXYLOSS) - H.failed_last_breath = TRUE /obj/item/organ/internal/lungs/proc/handle_breath_temperature(datum/gas_mixture/breath, mob/living/carbon/human/H) // called by human/life, handles temperatures @@ -332,6 +325,7 @@ safe_oxygen_max = 0.05 //This is toxic to us safe_nitro_min = 16 //We breathe THIS! oxy_damage_type = TOX //And it poisons us + oxy_breath_dam_multiplier = 0.16 /obj/item/organ/internal/lungs/drask icon = 'icons/obj/species_organs/drask.dmi' @@ -341,7 +335,7 @@ cold_level_1_damage = -COLD_GAS_DAMAGE_LEVEL_1 //They heal when the air is cold cold_level_2_damage = -COLD_GAS_DAMAGE_LEVEL_2 cold_level_3_damage = -COLD_GAS_DAMAGE_LEVEL_3 - cold_damage_types = list(BRUTE = 1, BURN = 0.5) + cold_damage_types = list(BRUTE = 0.5, BURN = 0.25) /obj/item/organ/internal/lungs/cybernetic name = "cybernetic lungs" diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index 53691dd0264..46e4ee0c18b 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -57,10 +57,10 @@ origin_tech = "materials=1;biotech=1" attack_verb = list("drilled") - suicide_act(mob/user) - to_chat(viewers(user), pick("[user] is pressing [src] to [user.p_their()] temple and activating it! It looks like [user.p_theyre()] trying to commit suicide.", - "[user] is pressing [src] to [user.p_their()] chest and activating it! It looks like [user.p_theyre()] trying to commit suicide.")) - return (BRUTELOSS) +/obj/item/surgicaldrill/suicide_act(mob/user) + to_chat(viewers(user), pick("[user] is pressing [src] to [user.p_their()] temple and activating it! It looks like [user.p_theyre()] trying to commit suicide.", + "[user] is pressing [src] to [user.p_their()] chest and activating it! It looks like [user.p_theyre()] trying to commit suicide.")) + return BRUTELOSS /obj/item/surgicaldrill/augment desc = "Effectively a small power drill contained within your arm, edges dulled to prevent tissue damage. May or may not pierce the heavens." @@ -87,11 +87,11 @@ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") hitsound = 'sound/weapons/bladeslice.ogg' - suicide_act(mob/user) - to_chat(viewers(user), pick("[user] is slitting [user.p_their()] wrists with [src]! It looks like [user.p_theyre()] trying to commit suicide.", - "[user] is slitting [user.p_their()] throat with [src]! It looks like [user.p_theyre()] trying to commit suicide.", - "[user] is slitting [user.p_their()] stomach open with [src]! It looks like [user.p_theyre()] trying to commit seppuku.")) - return (BRUTELOSS) +/obj/item/scalpel/suicide_act(mob/user) + to_chat(viewers(user), pick("[user] is slitting [user.p_their()] wrists with [src]! It looks like [user.p_theyre()] trying to commit suicide.", + "[user] is slitting [user.p_their()] throat with [src]! It looks like [user.p_theyre()] trying to commit suicide.", + "[user] is slitting [user.p_their()] stomach open with [src]! It looks like [user.p_theyre()] trying to commit seppuku.")) + return BRUTELOSS /obj/item/scalpel/augment diff --git a/config/example/game_options.txt b/config/example/game_options.txt index a48bd912bd1..31ee950243a 100644 --- a/config/example/game_options.txt +++ b/config/example/game_options.txt @@ -1,10 +1,4 @@ ### HEALTH ### -## level of health at which a mob becomes unconscious (crit) -HEALTH_THRESHOLD_CRIT -50 - -## level of health at which a mob becomes dead -HEALTH_THRESHOLD_DEAD -100 - ## Determines whether bones can be broken through excessive damage to the organ ## 0 means bones can't break, 1 means they can BONES_CAN_BREAK 1 diff --git a/html/changelog.html b/html/changelog.html index db8890e9e97..a4a7b149258 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,151 @@ -->
+

30 March 2019

+

Fox McCloud updated:

+
    +
  • Fixes a runtime involving decapitation
  • +
  • playing sounds performs better
  • +
+

Ty-Omaha updated:

+
    +
  • Removes SSD sleep bubbles from ghosts
  • +
+ +

29 March 2019

+

Arkatos updated:

+
    +
  • Fixes #11087 - Swarmers are now locked to their default action intent
  • +
  • Swarmers are now able to open airlocks and windoors (access restrictions still apply)
  • +
  • Added new Wizard item - Bottle of Ooze! This powerful item awakens all-consuming Morph, ready to eat everyone and everything on the station! Be careful though, as Morph diet also includes Wizards.. Costs 1 point in the spellbook.
  • +
  • Added custom icon for Bottle of Ooze
  • +
  • Morph introduction is now properly formatted
  • +
  • Added new Blob UI and icons, ported from /tg/station13
  • +
  • Added new *Blob Help* verb, designated to help out new players playing as Blob
  • +
  • Added descriptions for each Blob reagent
  • +
  • Added complementary colors for each Blob reagent
  • +
  • Blob marker now uses complementary color of Blob reagent as it's own color
  • +
  • Blob shortcuts updated. Blob shortcuts are now: Click = Expand Blob | CTRL Click = Create Shield Blob | Middle Mouse Click = Rally Spores | Alt Click = Remove Blob
  • +
+

Fox McCloud updated:

+
    +
  • Crit has been dramatically overhauled. Treating patients now requires a broader range of medicine. Recommend checking out a guide for how to treat using the new system!
  • +
  • Medical vendors now have styptic and silver sulfadiazine, saline, atropine, mannitol, mutadone, calomel, diphenhydramine, oculine, insulin, morphine, and potassium iodide for helping treat new patients. Amount of Gauze, Advanced Trauma, and Burn packs has also been increased.
  • +
  • Adds new handheld defibs. Utilize these for treating patients with cardiac arrest. Note: these do not revive people from the dead!
  • +
  • Doctors lockers now have a handheld defib in addition to a regular defib.
  • +
  • Medical borgs now have a handheld defib
  • +
  • CPR dramatically buffed. Heavily lowers O2 damage and resets losebreath to 0
  • +
  • Cryoxadone tuned down a little
  • +
  • Health analyzer UI altered ever so slightly for cardiac arerest, so it's easier to find
  • +
  • Added bacon grease reagent to traitor poison bottles; induces immediate cardiac failure
  • +
  • Upgraded Robotic Hearts now attempt to correct both cardiac failure and cardiac arrest tweak; Upgraded Robotic Hearts now do not punish you quite as severely for receiving a shock while having one (EMPs will still destroy you though)
  • +
  • Corazone recipe removed
  • +
  • hotspot sprites updated; fire will also now appear over top of things, rather than underneath it
  • +
  • Roundstart chem dispensers are now construcable/deconstrucable and can be moved
  • +
  • Energy ratio for chem dispensers increased by x10 (how many reagents you can dispense before running out and how quickly it recharges is all the same, however)
  • +
  • Adds the ability to add a single unit of reagent in the chem dispenser
  • +
  • Adds the ability to isolate reagents in the chem dispenser
  • +
  • Portable chem dispenser removed (the circuit board for them now makes full dispensers)
  • +
  • Fixes some suicides dealing damage and gibbing you at the same time
  • +
  • Allows you to suicide with more object types. Currently the only new object type you can suicide with is the gibber
  • +
+

Kyep updated:

+
    +
  • Blob mobs can no longer be spawned in xenobio.
  • +
  • Blob mobs spawned by blob cores can no longer have sentience potions used on them, which would allow whoever controls them to kill the blob with no countermeasure.
  • +
+

Mitchs98 updated:

+
    +
  • Adds in Shrimp & Fish Skewers as well as Cheeseburgers. Shrimp Skewer(Grill): 4 Shrimp(uncooked) + 1 Metal Rod, Fish Skewer(Grill): 2 Salmon Meat + Metal Rod + 10u Flour, Cheese Burger(Microwave): Burger + Cheese Wedge.
  • +
+

farie82 updated:

+
    +
  • Borgs can now only cuff people with two hands. Just like humanoids
  • +
  • You can cuff people with at least one hand now
  • +
+

ingles98 updated:

+
    +
  • Plasma Golems will now report their suicide acts to the Admins.
  • +
+ +

25 March 2019

+

Fox McCloud updated:

+
    +
  • Fixes some reagent performance edges cases
  • +
  • Fixes chem smoke lagging under some circumstances
  • +
  • Fixes smoke not wanting to garbage collect
  • +
  • Fixes flares not returning a qdel hint
  • +
  • Fixes hotspots being slow to ignite turfs around them
  • +
  • Fixes LINDA not conducting temperature through things.
  • +
+

Mitchs98 updated:

+
    +
  • Chitinous Mass is no longer weaponized lag if examined.
  • +
+

farie82 updated:

+
    +
  • Diona nymphs are grabbable and punchable again
  • +
+ +

24 March 2019

+

AffectedArc07 updated:

+
    +
  • Preferences are now in alphabetical order
  • +
+

AzuleUtama updated:

+
    +
  • Added Syndicate MMI for Roboticist Traitors, priced at 2TC. balance: Removed Syndicate MMI from the traitor surgery duffelbag. Price reduced to 2TC.
  • +
+

EmanTheAlmighty updated:

+
    +
  • Can no longer offer Gateway Terror Spiders sentience potions. ( They literally exploded if you did, and that could have been used to effortlessly clear out hordes of them. )
  • +
  • Using the Shadowling ability "Hatch" as a monkey will change your HUD to be the human one.
  • +
  • It is now possible to put a collar on any animal that has gained sentience.
  • +
+

Fox McCloud updated:

+
    +
  • Pills maximum size increased from 50 to 100
  • +
  • Chem Master bottle size increased from 30 to 50
  • +
  • Pill bottles can now hold 50 pills instead of 14
  • +
  • Pill bottles can no longer hold patches
  • +
  • Adds Patch Boxes, which can hold patches, but not pills
  • +
  • Can now use a pill bottle or patch box on someone to apply a pill/patch from the bottle/box to a mob. Usual delays will still apply
  • +
  • Can down an entire pill bottle at once!
  • +
  • Cryostylane and pyrosium reactions now consume 2 of themselves when exposed to oxygen
  • +
  • fires, temperature, and hotspots can heat anything that contains reagents
  • +
  • Having hot/cold chemicals dumped on you or ingesting them will hurt you. Wear a mask or hat to protect from having someone dump the hot/cold things on you.
  • +
  • Chem Heater temperature adjustment tweaked; can no longer set temperature on empty containers.
  • +
  • Chem Heater generally heats faster, but cannot be upgraded
  • +
  • Chem Heater automatically stops around target temperature
  • +
  • Adjusts fire stacks and how they're applied with a few chems. Naplam, Phlogiston, fuel, thermite, and a few others have all received changes. Most direct fire damage removed.
  • +
  • Adds phlogiston dust; a safer, cooler burning Phlogiston.
  • +
  • Water and Firefighting foam will no longer automagically put out mob based fires; they'll reduce fire stacks (when fire stacks hit 0 they put the mob out)
  • +
  • cryostylane puts out mobs instantly
  • +
  • Heating fuel can set it off. Be careful when heating it now
  • +
  • Increased welding fuel tank size from 1000 to 4000 (wall mounted are still 1000)
  • +
  • Sorium and Dark matter now actually throw things
  • +
  • Thermite now gets applied to turfs. You'll have to heat the turf up to ignite it. Anything that can heat can now ignite thermite on walls
  • +
  • Adds fake hotspots. They don't do anything except set you on fire when you cross into them. Chemistry's pyrotechnics use these, for the most part; anything that causes a fireball that's chemistry related uses these
  • +
  • Sorium and Liquid dark matter now have visual effects
  • +
  • Fixes chem smoke being on the wrong layer.
  • +
  • Adds in unidentified tank filled with an unknown experimental gas in deep space. Find it and experiment!
  • +
+

Tails2091 updated:

+
    +
  • New emotes to Cats and Corgis.
  • +
  • Change directories for some creature sounds to be in the creature sound folder.
  • +
  • Two bark sounds, a yelp, and a meow.
  • +
+

farie82 updated:

+
    +
  • Holo firedoors now update atmos correctly after being destroyed
  • +
  • Inflatable walls/doors now update atmos correctly after being destroyed
  • +
  • Alien resin walls now update atmos correctly after being destroyed
  • +
  • Foamed metal walls now update atmos correctly after being destroyed
  • +
  • Pod doors (shouldn't ever happen) now update atmos correctly after being destroyed
  • +
  • Mining flaps now update atmos correctly after being destroyed
  • +
+

23 March 2019

Arkatos updated:

    @@ -77,6 +222,7 @@

    farie82 updated:

    • When disarming a bomb from a guardian you now don't pickup an empty object.
    • +
    • no more organ: spam sorry admins

    22 March 2019

    diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index e784dbd014a..44f24dfeb34 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -9425,3 +9425,157 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. - bugfix: Lockboxes actually close when locked now. farie82: - bugfix: When disarming a bomb from a guardian you now don't pickup an empty object. + - bugfix: 'no more organ: spam sorry admins' +2019-03-24: + AffectedArc07: + - tweak: Preferences are now in alphabetical order + AzuleUtama: + - rscadd: 'Added Syndicate MMI for Roboticist Traitors, priced at 2TC. balance: + Removed Syndicate MMI from the traitor surgery duffelbag. Price reduced to 2TC.' + EmanTheAlmighty: + - tweak: Can no longer offer Gateway Terror Spiders sentience potions. ( They literally + exploded if you did, and that could have been used to effortlessly clear out + hordes of them. ) + - tweak: Using the Shadowling ability "Hatch" as a monkey will change your HUD to + be the human one. + - tweak: It is now possible to put a collar on any animal that has gained sentience. + Fox McCloud: + - tweak: Pills maximum size increased from 50 to 100 + - tweak: Chem Master bottle size increased from 30 to 50 + - tweak: Pill bottles can now hold 50 pills instead of 14 + - rscdel: Pill bottles can no longer hold patches + - rscadd: Adds Patch Boxes, which can hold patches, but not pills + - rscadd: Can now use a pill bottle or patch box on someone to apply a pill/patch + from the bottle/box to a mob. Usual delays will still apply + - rscadd: Can down an entire pill bottle at once! + - tweak: Cryostylane and pyrosium reactions now consume 2 of themselves when exposed + to oxygen + - rscadd: fires, temperature, and hotspots can heat anything that contains reagents + - rscadd: Having hot/cold chemicals dumped on you or ingesting them will hurt you. + Wear a mask or hat to protect from having someone dump the hot/cold things on + you. + - tweak: Chem Heater temperature adjustment tweaked; can no longer set temperature + on empty containers. + - tweak: Chem Heater generally heats faster, but cannot be upgraded + - tweak: Chem Heater automatically stops around target temperature + - tweak: Adjusts fire stacks and how they're applied with a few chems. Naplam, Phlogiston, + fuel, thermite, and a few others have all received changes. Most direct fire + damage removed. + - rscadd: Adds phlogiston dust; a safer, cooler burning Phlogiston. + - tweak: Water and Firefighting foam will no longer automagically put out mob based + fires; they'll reduce fire stacks (when fire stacks hit 0 they put the mob out) + - tweak: cryostylane puts out mobs instantly + - tweak: Heating fuel can set it off. Be careful when heating it now + - tweak: Increased welding fuel tank size from 1000 to 4000 (wall mounted are still + 1000) + - tweak: Sorium and Dark matter now actually throw things + - tweak: Thermite now gets applied to turfs. You'll have to heat the turf up to + ignite it. Anything that can heat can now ignite thermite on walls + - rscadd: Adds fake hotspots. They don't do anything except set you on fire when + you cross into them. Chemistry's pyrotechnics use these, for the most part; + anything that causes a fireball that's chemistry related uses these + - rscadd: Sorium and Liquid dark matter now have visual effects + - bugfix: Fixes chem smoke being on the wrong layer. + - rscadd: Adds in unidentified tank filled with an unknown experimental gas in deep + space. Find it and experiment! + Tails2091: + - rscadd: New emotes to Cats and Corgis. + - tweak: Change directories for some creature sounds to be in the creature sound + folder. + - soundadd: Two bark sounds, a yelp, and a meow. + farie82: + - bugfix: Holo firedoors now update atmos correctly after being destroyed + - bugfix: Inflatable walls/doors now update atmos correctly after being destroyed + - bugfix: Alien resin walls now update atmos correctly after being destroyed + - bugfix: Foamed metal walls now update atmos correctly after being destroyed + - bugfix: Pod doors (shouldn't ever happen) now update atmos correctly after being + destroyed + - bugfix: Mining flaps now update atmos correctly after being destroyed +2019-03-25: + Fox McCloud: + - bugfix: Fixes some reagent performance edges cases + - bugfix: Fixes chem smoke lagging under some circumstances + - bugfix: Fixes smoke not wanting to garbage collect + - bugfix: Fixes flares not returning a qdel hint + - bugfix: Fixes hotspots being slow to ignite turfs around them + - bugfix: Fixes LINDA not conducting temperature through things. + Mitchs98: + - bugfix: Chitinous Mass is no longer weaponized lag if examined. + farie82: + - bugfix: Diona nymphs are grabbable and punchable again +2019-03-29: + Arkatos: + - bugfix: 'Fixes #11087 - Swarmers are now locked to their default action intent' + - tweak: Swarmers are now able to open airlocks and windoors (access restrictions + still apply) + - rscadd: Added new Wizard item - Bottle of Ooze! This powerful item awakens all-consuming + Morph, ready to eat everyone and everything on the station! Be careful though, + as Morph diet also includes Wizards.. Costs 1 point in the spellbook. + - imageadd: Added custom icon for Bottle of Ooze + - tweak: Morph introduction is now properly formatted + - rscadd: Added new Blob UI and icons, ported from /tg/station13 + - rscadd: Added new *Blob Help* verb, designated to help out new players playing + as Blob + - rscadd: Added descriptions for each Blob reagent + - rscadd: Added complementary colors for each Blob reagent + - tweak: Blob marker now uses complementary color of Blob reagent as it's own color + - tweak: 'Blob shortcuts updated. Blob shortcuts are now: Click = Expand Blob | + CTRL Click = Create Shield Blob | Middle Mouse Click = Rally Spores | Alt Click + = Remove Blob' + Fox McCloud: + - rscadd: Crit has been dramatically overhauled. Treating patients now requires + a broader range of medicine. Recommend checking out a guide for how to treat + using the new system! + - rscadd: Medical vendors now have styptic and silver sulfadiazine, saline, atropine, + mannitol, mutadone, calomel, diphenhydramine, oculine, insulin, morphine, and + potassium iodide for helping treat new patients. Amount of Gauze, Advanced Trauma, + and Burn packs has also been increased. + - rscadd: 'Adds new handheld defibs. Utilize these for treating patients with cardiac + arrest. Note: these do not revive people from the dead!' + - rscadd: Doctors lockers now have a handheld defib in addition to a regular defib. + - rscadd: Medical borgs now have a handheld defib + - tweak: CPR dramatically buffed. Heavily lowers O2 damage and resets losebreath + to 0 + - tweak: Cryoxadone tuned down a little + - tweak: Health analyzer UI altered ever so slightly for cardiac arerest, so it's + easier to find + - rscadd: Added bacon grease reagent to traitor poison bottles; induces immediate + cardiac failure + - tweak: Upgraded Robotic Hearts now attempt to correct both cardiac failure and + cardiac arrest tweak; Upgraded Robotic Hearts now do not punish you quite as + severely for receiving a shock while having one (EMPs will still destroy you + though) + - rscdel: Corazone recipe removed + - tweak: hotspot sprites updated; fire will also now appear over top of things, + rather than underneath it + - rscadd: Roundstart chem dispensers are now construcable/deconstrucable and can + be moved + - tweak: Energy ratio for chem dispensers increased by x10 (how many reagents you + can dispense before running out and how quickly it recharges is all the same, + however) + - rscadd: Adds the ability to add a single unit of reagent in the chem dispenser + - rscadd: Adds the ability to isolate reagents in the chem dispenser + - rscdel: Portable chem dispenser removed (the circuit board for them now makes + full dispensers) + - bugfix: Fixes some suicides dealing damage and gibbing you at the same time + - rscadd: Allows you to suicide with more object types. Currently the only new object + type you can suicide with is the gibber + Kyep: + - tweak: Blob mobs can no longer be spawned in xenobio. + - tweak: Blob mobs spawned by blob cores can no longer have sentience potions used + on them, which would allow whoever controls them to kill the blob with no countermeasure. + Mitchs98: + - rscadd: 'Adds in Shrimp & Fish Skewers as well as Cheeseburgers. Shrimp Skewer(Grill): + 4 Shrimp(uncooked) + 1 Metal Rod, Fish Skewer(Grill): 2 Salmon Meat + Metal + Rod + 10u Flour, Cheese Burger(Microwave): Burger + Cheese Wedge.' + farie82: + - bugfix: Borgs can now only cuff people with two hands. Just like humanoids + - tweak: You can cuff people with at least one hand now + ingles98: + - bugfix: Plasma Golems will now report their suicide acts to the Admins. +2019-03-30: + Fox McCloud: + - bugfix: Fixes a runtime involving decapitation + - tweak: playing sounds performs better + Ty-Omaha: + - tweak: Removes SSD sleep bubbles from ghosts diff --git a/html/changelogs/AutoChangeLog-pr-11104.yml b/html/changelogs/AutoChangeLog-pr-11104.yml deleted file mode 100644 index ef19d356477..00000000000 --- a/html/changelogs/AutoChangeLog-pr-11104.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "farie82" -delete-after: True -changes: - - bugfix: "no more organ: spam sorry admins" diff --git a/icons/atmos/tank.dmi b/icons/atmos/tank.dmi index bf98899fb8e..3a6e2031cbc 100644 Binary files a/icons/atmos/tank.dmi and b/icons/atmos/tank.dmi differ diff --git a/icons/goonstation/effects/64x64.dmi b/icons/goonstation/effects/64x64.dmi index e1b168bbc11..17910cfdfb1 100644 Binary files a/icons/goonstation/effects/64x64.dmi and b/icons/goonstation/effects/64x64.dmi differ diff --git a/icons/goonstation/effects/fire.dmi b/icons/goonstation/effects/fire.dmi index 48a1f9b90e6..03d0de0e38d 100644 Binary files a/icons/goonstation/effects/fire.dmi and b/icons/goonstation/effects/fire.dmi differ diff --git a/icons/goonstation/mob/inhands/items_lefthand.dmi b/icons/goonstation/mob/inhands/items_lefthand.dmi index 042c15f279b..cb8d5d66284 100644 Binary files a/icons/goonstation/mob/inhands/items_lefthand.dmi and b/icons/goonstation/mob/inhands/items_lefthand.dmi differ diff --git a/icons/goonstation/mob/inhands/items_righthand.dmi b/icons/goonstation/mob/inhands/items_righthand.dmi index 051f205bac7..1698af9855e 100644 Binary files a/icons/goonstation/mob/inhands/items_righthand.dmi and b/icons/goonstation/mob/inhands/items_righthand.dmi differ diff --git a/icons/goonstation/objects/objects.dmi b/icons/goonstation/objects/objects.dmi index 8dadb400668..99ddeac3d10 100644 Binary files a/icons/goonstation/objects/objects.dmi and b/icons/goonstation/objects/objects.dmi differ diff --git a/icons/mob/blob.dmi b/icons/mob/blob.dmi index 56c39b9a75d..ef70ac3155e 100644 Binary files a/icons/mob/blob.dmi and b/icons/mob/blob.dmi differ diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi index f8f6ea63db1..68ebe9f6e91 100644 Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi index 3efddb08c4b..fe096499427 100644 Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ diff --git a/icons/obj/chemical.dmi b/icons/obj/chemical.dmi index f692814d18c..9c9f6d38e94 100644 Binary files a/icons/obj/chemical.dmi and b/icons/obj/chemical.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index 3004a130246..418f221c78f 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index 7a728d811c3..a3e93ba32af 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/obj/wizard.dmi b/icons/obj/wizard.dmi index 108e5603b25..07c8be38ed9 100644 Binary files a/icons/obj/wizard.dmi and b/icons/obj/wizard.dmi differ diff --git a/nano/templates/chem_dispenser.tmpl b/nano/templates/chem_dispenser.tmpl index f8988e35e43..74d694530c9 100644 --- a/nano/templates/chem_dispenser.tmpl +++ b/nano/templates/chem_dispenser.tmpl @@ -16,6 +16,7 @@ Used In File(s): \code\modules\reagents\Chemistry-Machinery.dm Dispense:
+ {{:helper.link('1', 'gear', {'amount' : 1}, (data.amount == 1) ? 'selected' : null)}} {{:helper.link('5', 'gear', {'amount' : 5}, (data.amount == 5) ? 'selected' : null)}} {{:helper.link('10', 'gear', {'amount' : 10}, (data.amount == 10) ? 'selected' : null)}} {{:helper.link('20', 'gear', {'amount' : 20}, (data.amount == 20) ? 'selected' : null)}} @@ -70,6 +71,7 @@ Used In File(s): \code\modules\reagents\Chemistry-Machinery.dm
+ {{:helper.link('Isolate', null, {'remove' : value.id, 'removeamount' : -1})}} {{:helper.link('1', null, {'remove' : value.id, 'removeamount' : 1})}} {{:helper.link('5', null, {'remove' : value.id, 'removeamount' : 5})}} {{:helper.link('10', null, {'remove' : value.id, 'removeamount' : 10})}} diff --git a/nano/templates/chem_master.tmpl b/nano/templates/chem_master.tmpl index 1ccfcadfe70..385237727db 100644 --- a/nano/templates/chem_master.tmpl +++ b/nano/templates/chem_master.tmpl @@ -42,7 +42,7 @@
- {{:helper.link('Create pill (50u max)', 'arrow-right', {'createpill': 1})}} + {{:helper.link('Create pill (100u max)', 'arrow-right', {'createpill': 1})}} {{:helper.link('Multiple', 'arrow-right', {'createpill_multiple': 1})}} @@ -64,7 +64,7 @@
- {{:helper.link('Create bottle (30u max)', 'arrow-right', {'createbottle': 1})}} + {{:helper.link('Create bottle (50u max)', 'arrow-right', {'createbottle': 1})}} {{:helper.link('Style', 'pencil', {'change_bottle': 1})}} diff --git a/paradise.dme b/paradise.dme index 3fbb2696d6d..5615013e367 100644 --- a/paradise.dme +++ b/paradise.dme @@ -2282,7 +2282,6 @@ #include "code\modules\response_team\ert.dm" #include "code\modules\response_team\ert_outfits.dm" #include "code\modules\ruins\ruin_areas.dm" -#include "code\modules\ruins\objects_and_mobs\gym.dm" #include "code\modules\ruins\objects_and_mobs\necropolis_gate.dm" #include "code\modules\security_levels\keycard authentication.dm" #include "code\modules\security_levels\security levels.dm" diff --git a/sound/Attributions.txt b/sound/Attributions.txt index 262699e9c3f..729562855ba 100644 --- a/sound/Attributions.txt +++ b/sound/Attributions.txt @@ -1 +1,5 @@ -items/thermal_drill.ogg was sampled from Builders Drilling.wav under a Sampling Plus 1.0 license. It was uploaded by Koops on 2010-05-10. Source (http://soundbible.com/1420-Builders-Drilling.html) \ No newline at end of file +items/thermal_drill.ogg was sampled from Builders Drilling.wav under a Sampling Plus 1.0 license. It was uploaded by Koops on 2010-05-10. Source (http://soundbible.com/1420-Builders-Drilling.html) + +ambience/aurora_caelus.ogg is Music for Manatees by Kevin Macleod. It is under a CC-BY 3.0 license. It has been cropped and fades out. + +creatures/dog_yelp.ogg is DogYelp.wav. It is under a CC-BY 3.0 license. It has been cropped, EQ'd, and compressed to .ogg. Source (https://freesound.org/people/TobiasKosmos/sounds/163280/) \ No newline at end of file diff --git a/sound/ambience/license.txt b/sound/ambience/license.txt deleted file mode 100644 index 5376422f21f..00000000000 --- a/sound/ambience/license.txt +++ /dev/null @@ -1,2 +0,0 @@ -aurora_caelus.ogg is Music for Manatees, by Kevin Macleod. It has been licensed under CC-BY 3.0 license. - It has been cropped for use ingame, and also fades out. \ No newline at end of file diff --git a/sound/creatures/cat_meow.ogg b/sound/creatures/cat_meow.ogg new file mode 100644 index 00000000000..f52cbd2a172 Binary files /dev/null and b/sound/creatures/cat_meow.ogg differ diff --git a/sound/misc/caw.ogg b/sound/creatures/caw.ogg similarity index 100% rename from sound/misc/caw.ogg rename to sound/creatures/caw.ogg diff --git a/sound/creatures/dog_bark1.ogg b/sound/creatures/dog_bark1.ogg new file mode 100644 index 00000000000..809f3897c88 Binary files /dev/null and b/sound/creatures/dog_bark1.ogg differ diff --git a/sound/creatures/dog_bark2.ogg b/sound/creatures/dog_bark2.ogg new file mode 100644 index 00000000000..e4e27b0f862 Binary files /dev/null and b/sound/creatures/dog_bark2.ogg differ diff --git a/sound/creatures/dog_yelp.ogg b/sound/creatures/dog_yelp.ogg new file mode 100644 index 00000000000..22f1586014d Binary files /dev/null and b/sound/creatures/dog_yelp.ogg differ diff --git a/sound/misc/hoot.ogg b/sound/creatures/hoot.ogg similarity index 100% rename from sound/misc/hoot.ogg rename to sound/creatures/hoot.ogg diff --git a/sound/effects/mousesqueek.ogg b/sound/creatures/mousesqueak.ogg similarity index 100% rename from sound/effects/mousesqueek.ogg rename to sound/creatures/mousesqueak.ogg diff --git a/sound/misc/nymphchirp.ogg b/sound/creatures/nymphchirp.ogg similarity index 100% rename from sound/misc/nymphchirp.ogg rename to sound/creatures/nymphchirp.ogg diff --git a/strings/chemistry_tools.json b/strings/chemistry_tools.json index 4a079102a69..5bf45fc6e58 100644 --- a/strings/chemistry_tools.json +++ b/strings/chemistry_tools.json @@ -468,6 +468,7 @@ "prions", "spidereggs", "concentrated_initro", - "heartworms" + "heartworms", + "bacon_grease" ] }