mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge remote-tracking branch 'upstream/master' into dev-freeze
Conflicts: code/game/objects/items/devices/flashlight.dm
This commit is contained in:
@@ -16,14 +16,9 @@
|
|||||||
|
|
||||||
/obj/item/device/flashlight/initialize()
|
/obj/item/device/flashlight/initialize()
|
||||||
..()
|
..()
|
||||||
if(on)
|
update_icon()
|
||||||
icon_state = "[initial(icon_state)]-on"
|
|
||||||
set_light(brightness_on)
|
|
||||||
else
|
|
||||||
icon_state = "[initial(icon_state)]"
|
|
||||||
set_light(0)
|
|
||||||
|
|
||||||
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
|
/obj/item/device/flashlight/update_icon()
|
||||||
if(on)
|
if(on)
|
||||||
icon_state = "[initial(icon_state)]-on"
|
icon_state = "[initial(icon_state)]-on"
|
||||||
set_light(brightness_on)
|
set_light(brightness_on)
|
||||||
@@ -36,7 +31,7 @@
|
|||||||
user << "You cannot turn the light on while in this [user.loc]." //To prevent some lighting anomalities.
|
user << "You cannot turn the light on while in this [user.loc]." //To prevent some lighting anomalities.
|
||||||
return 0
|
return 0
|
||||||
on = !on
|
on = !on
|
||||||
update_brightness(user)
|
update_icon()
|
||||||
user.update_action_buttons()
|
user.update_action_buttons()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -171,11 +166,7 @@
|
|||||||
on = 0
|
on = 0
|
||||||
src.force = initial(src.force)
|
src.force = initial(src.force)
|
||||||
src.damtype = initial(src.damtype)
|
src.damtype = initial(src.damtype)
|
||||||
if(ismob(loc))
|
update_icon()
|
||||||
var/mob/U = loc
|
|
||||||
update_brightness(U)
|
|
||||||
else
|
|
||||||
update_brightness(null)
|
|
||||||
|
|
||||||
/obj/item/device/flashlight/flare/attack_self(mob/user)
|
/obj/item/device/flashlight/flare/attack_self(mob/user)
|
||||||
|
|
||||||
@@ -206,10 +197,11 @@
|
|||||||
on = 1 //Bio-luminesence has one setting, on.
|
on = 1 //Bio-luminesence has one setting, on.
|
||||||
|
|
||||||
/obj/item/device/flashlight/slime/New()
|
/obj/item/device/flashlight/slime/New()
|
||||||
|
..()
|
||||||
set_light(brightness_on)
|
set_light(brightness_on)
|
||||||
spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
|
|
||||||
update_brightness()
|
/obj/item/device/flashlight/slime/update_icon()
|
||||||
icon_state = initial(icon_state)
|
return
|
||||||
|
|
||||||
/obj/item/device/flashlight/slime/attack_self(mob/user)
|
/obj/item/device/flashlight/slime/attack_self(mob/user)
|
||||||
return //Bio-luminescence does not toggle.
|
return //Bio-luminescence does not toggle.
|
||||||
|
|||||||
@@ -129,6 +129,7 @@
|
|||||||
var/watertemp = "normal" //freezing, normal, or boiling
|
var/watertemp = "normal" //freezing, normal, or boiling
|
||||||
var/mobpresent = 0 //true if there is a mob on the shower's loc, this is to ease process()
|
var/mobpresent = 0 //true if there is a mob on the shower's loc, this is to ease process()
|
||||||
var/is_washing = 0
|
var/is_washing = 0
|
||||||
|
var/list/temperature_settings = list("normal" = 310, "boiling" = T0C+100, "freezing" = T0C)
|
||||||
|
|
||||||
/obj/machinery/shower/New()
|
/obj/machinery/shower/New()
|
||||||
..()
|
..()
|
||||||
@@ -150,7 +151,7 @@
|
|||||||
if(on)
|
if(on)
|
||||||
if (M.loc == loc)
|
if (M.loc == loc)
|
||||||
wash(M)
|
wash(M)
|
||||||
check_heat(M)
|
process_heat(M)
|
||||||
for (var/atom/movable/G in src.loc)
|
for (var/atom/movable/G in src.loc)
|
||||||
G.clean_blood()
|
G.clean_blood()
|
||||||
|
|
||||||
@@ -158,15 +159,11 @@
|
|||||||
if(I.type == /obj/item/device/analyzer)
|
if(I.type == /obj/item/device/analyzer)
|
||||||
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
|
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
|
||||||
if(istype(I, /obj/item/weapon/wrench))
|
if(istype(I, /obj/item/weapon/wrench))
|
||||||
|
var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
|
||||||
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>"
|
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>"
|
||||||
|
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||||
if(do_after(user, 50))
|
if(do_after(user, 50))
|
||||||
switch(watertemp)
|
watertemp = newtemp
|
||||||
if("normal")
|
|
||||||
watertemp = "freezing"
|
|
||||||
if("freezing")
|
|
||||||
watertemp = "boiling"
|
|
||||||
if("boiling")
|
|
||||||
watertemp = "normal"
|
|
||||||
user.visible_message("<span class='notice'>[user] adjusts the shower with \the [I].</span>", "<span class='notice'>You adjust the shower with \the [I].</span>")
|
user.visible_message("<span class='notice'>[user] adjusts the shower with \the [I].</span>", "<span class='notice'>You adjust the shower with \the [I].</span>")
|
||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
|
|
||||||
@@ -177,8 +174,8 @@
|
|||||||
|
|
||||||
if(on)
|
if(on)
|
||||||
overlays += image('icons/obj/watercloset.dmi', src, "water", MOB_LAYER + 1, dir)
|
overlays += image('icons/obj/watercloset.dmi', src, "water", MOB_LAYER + 1, dir)
|
||||||
if(watertemp == "freezing")
|
if(temperature_settings[watertemp] < T20C)
|
||||||
return
|
return //no mist for cold water
|
||||||
if(!ismist)
|
if(!ismist)
|
||||||
spawn(50)
|
spawn(50)
|
||||||
if(src && on)
|
if(src && on)
|
||||||
@@ -200,7 +197,7 @@
|
|||||||
wash(O)
|
wash(O)
|
||||||
if(ismob(O))
|
if(ismob(O))
|
||||||
mobpresent += 1
|
mobpresent += 1
|
||||||
check_heat(O)
|
process_heat(O)
|
||||||
|
|
||||||
/obj/machinery/shower/Uncrossed(atom/movable/O)
|
/obj/machinery/shower/Uncrossed(atom/movable/O)
|
||||||
if(ismob(O))
|
if(ismob(O))
|
||||||
@@ -304,8 +301,8 @@
|
|||||||
if(!on) return
|
if(!on) return
|
||||||
wash_floor()
|
wash_floor()
|
||||||
if(!mobpresent) return
|
if(!mobpresent) return
|
||||||
for(var/mob/living/carbon/C in loc)
|
for(var/mob/living/L in loc)
|
||||||
check_heat(C)
|
process_heat(L)
|
||||||
|
|
||||||
/obj/machinery/shower/proc/wash_floor()
|
/obj/machinery/shower/proc/wash_floor()
|
||||||
if(!ismist && is_washing)
|
if(!ismist && is_washing)
|
||||||
@@ -317,22 +314,19 @@
|
|||||||
spawn(100)
|
spawn(100)
|
||||||
is_washing = 0
|
is_washing = 0
|
||||||
|
|
||||||
/obj/machinery/shower/proc/check_heat(mob/M as mob)
|
/obj/machinery/shower/proc/process_heat(mob/living/M)
|
||||||
if(!on || watertemp == "normal") return
|
if(!on || !istype(M)) return
|
||||||
if(iscarbon(M))
|
|
||||||
var/mob/living/carbon/C = M
|
var/temperature = temperature_settings[watertemp]
|
||||||
|
var/temp_adj = between(BODYTEMP_COOLING_MAX, temperature - M.bodytemperature, BODYTEMP_HEATING_MAX)
|
||||||
if(watertemp == "freezing")
|
M.bodytemperature += temp_adj
|
||||||
C.bodytemperature = max(80, C.bodytemperature - 80)
|
|
||||||
C << "<span class='warning'>The water is freezing!</span>"
|
if(ishuman(M))
|
||||||
return
|
var/mob/living/carbon/human/H = M
|
||||||
if(watertemp == "boiling")
|
if(temperature >= H.species.heat_level_1)
|
||||||
C.bodytemperature = min(500, C.bodytemperature + 35)
|
H << "<span class='danger'>The water is searing hot!</span>"
|
||||||
C.adjustFireLoss(5)
|
else if(temperature <= H.species.cold_level_1)
|
||||||
C << "<span class='danger'>The water is searing!</span>"
|
H << "<span class='warning'>The water is freezing cold!</span>"
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/bikehorn/rubberducky
|
/obj/item/weapon/bikehorn/rubberducky
|
||||||
name = "rubber ducky"
|
name = "rubber ducky"
|
||||||
|
|||||||
@@ -659,6 +659,26 @@ default behaviour is:
|
|||||||
resting = !resting
|
resting = !resting
|
||||||
src << "\blue You are now [resting ? "resting" : "getting up"]"
|
src << "\blue You are now [resting ? "resting" : "getting up"]"
|
||||||
|
|
||||||
|
/mob/living/proc/is_allowed_vent_crawl_item(var/obj/item/carried_item)
|
||||||
|
if(istype(carried_item, /obj/item/weapon/implant))
|
||||||
|
return 1
|
||||||
|
if(istype(carried_item, /obj/item/clothing/mask/facehugger))
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/mob/living/carbon/is_allowed_vent_crawl_item(var/obj/item/carried_item)
|
||||||
|
if(carried_item in internal_organs)
|
||||||
|
return 1
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/mob/living/carbon/human/is_allowed_vent_crawl_item(var/obj/item/carried_item)
|
||||||
|
if(carried_item in organs)
|
||||||
|
return 1
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/mob/living/simple_animal/spiderbot/is_allowed_vent_crawl_item(var/obj/item/carried_item)
|
||||||
|
return carried_item != held_item
|
||||||
|
|
||||||
/mob/living/proc/handle_ventcrawl(var/obj/machinery/atmospherics/unary/vent_pump/vent_found = null, var/ignore_items = 0) // -- TLE -- Merged by Carn
|
/mob/living/proc/handle_ventcrawl(var/obj/machinery/atmospherics/unary/vent_pump/vent_found = null, var/ignore_items = 0) // -- TLE -- Merged by Carn
|
||||||
if(stat)
|
if(stat)
|
||||||
src << "You must be conscious to do this!"
|
src << "You must be conscious to do this!"
|
||||||
@@ -721,9 +741,10 @@ default behaviour is:
|
|||||||
|
|
||||||
if(!ignore_items)
|
if(!ignore_items)
|
||||||
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
|
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
|
||||||
if( !istype(carried_item, /obj/item/weapon/implant) && !istype(carried_item, /obj/item/clothing/mask/facehugger) )//If it's not an implant or a facehugger
|
if(is_allowed_vent_crawl_item(carried_item))
|
||||||
src << "\red You can't be carrying items or have items equipped when vent crawling!"
|
continue
|
||||||
return
|
src << "<span class='warning'>You can't be carrying items or have items equipped when vent crawling!</span>"
|
||||||
|
return
|
||||||
|
|
||||||
if(isslime(src))
|
if(isslime(src))
|
||||||
var/mob/living/carbon/slime/S = src
|
var/mob/living/carbon/slime/S = src
|
||||||
|
|||||||
@@ -144,7 +144,7 @@
|
|||||||
/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||||
if(M.bodytemperature < 170)
|
if(M.bodytemperature < 170)
|
||||||
M.adjustCloneLoss(-30 * removed)
|
M.adjustCloneLoss(-30 * removed)
|
||||||
M.adjustOxyLoss(-3 * removed)
|
M.adjustOxyLoss(-30 * removed)
|
||||||
M.heal_organ_damage(30 * removed, 30 * removed)
|
M.heal_organ_damage(30 * removed, 30 * removed)
|
||||||
M.adjustToxLoss(-30 * removed)
|
M.adjustToxLoss(-30 * removed)
|
||||||
|
|
||||||
|
|||||||
@@ -97,15 +97,15 @@
|
|||||||
|
|
||||||
|
|
||||||
/datum/gas_mixture/proc/equalize(datum/gas_mixture/sharer)
|
/datum/gas_mixture/proc/equalize(datum/gas_mixture/sharer)
|
||||||
for(var/g in sharer.gas)
|
var/our_heatcap = heat_capacity()
|
||||||
|
var/share_heatcap = sharer.heat_capacity()
|
||||||
|
|
||||||
|
for(var/g in gas|sharer.gas)
|
||||||
var/comb = gas[g] + sharer.gas[g]
|
var/comb = gas[g] + sharer.gas[g]
|
||||||
comb /= volume + sharer.volume
|
comb /= volume + sharer.volume
|
||||||
gas[g] = comb * volume
|
gas[g] = comb * volume
|
||||||
sharer.gas[g] = comb * sharer.volume
|
sharer.gas[g] = comb * sharer.volume
|
||||||
|
|
||||||
var/our_heatcap = heat_capacity()
|
|
||||||
var/share_heatcap = sharer.heat_capacity()
|
|
||||||
|
|
||||||
if(our_heatcap + share_heatcap)
|
if(our_heatcap + share_heatcap)
|
||||||
temperature = ((temperature * our_heatcap) + (sharer.temperature * share_heatcap)) / (our_heatcap + share_heatcap)
|
temperature = ((temperature * our_heatcap) + (sharer.temperature * share_heatcap)) / (our_heatcap + share_heatcap)
|
||||||
sharer.temperature = temperature
|
sharer.temperature = temperature
|
||||||
|
|||||||
@@ -5101,7 +5101,7 @@
|
|||||||
"bUe" = (/obj/machinery/light{dir = 1},/obj/machinery/door/firedoor,/turf/simulated/floor{tag = "icon-whiteblue (NORTH)"; icon_state = "whiteblue"; dir = 1},/area/medical/medbay4)
|
"bUe" = (/obj/machinery/light{dir = 1},/obj/machinery/door/firedoor,/turf/simulated/floor{tag = "icon-whiteblue (NORTH)"; icon_state = "whiteblue"; dir = 1},/area/medical/medbay4)
|
||||||
"bUf" = (/obj/structure/sign/science{pixel_x = 32},/obj/machinery/atmospherics/unary/vent_pump/on{dir = 8},/turf/simulated/floor{icon_state = "white"},/area/rnd/research)
|
"bUf" = (/obj/structure/sign/science{pixel_x = 32},/obj/machinery/atmospherics/unary/vent_pump/on{dir = 8},/turf/simulated/floor{icon_state = "white"},/area/rnd/research)
|
||||||
"bUg" = (/turf/simulated/wall,/area/rnd/misc_lab)
|
"bUg" = (/turf/simulated/wall,/area/rnd/misc_lab)
|
||||||
"bUh" = (/obj/machinery/light_switch{pixel_y = -23},/obj/machinery/power/apc{dir = 8; name = "west bump"; pixel_x = -24},/obj/structure/cable/green{d2 = 4; icon_state = "0-4"},/turf/simulated/floor{icon_state = "floorgrime"},/area/rnd/storage)
|
"bUh" = (/obj/machinery/light_switch{pixel_y = -23},/obj/machinery/power/apc{dir = 8; name = "west bump"; pixel_x = -24},/obj/structure/cable/green{d2 = 4; icon_state = "0-4"},/obj/machinery/vending/cigarette{pixel_x = 0; pixel_y = 2},/turf/simulated/floor{icon_state = "floorgrime"},/area/rnd/storage)
|
||||||
"bUi" = (/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable/green{d1 = 2; d2 = 8; icon_state = "2-8"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor{icon_state = "warningcorner"; dir = 8},/area/rnd/storage)
|
"bUi" = (/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable/green{d1 = 2; d2 = 8; icon_state = "2-8"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor{icon_state = "warningcorner"; dir = 8},/area/rnd/storage)
|
||||||
"bUj" = (/obj/structure/sign/fire{pixel_x = 32; pixel_y = 0},/turf/simulated/floor{dir = 9; icon_state = "whitehall"},/area/rnd/research)
|
"bUj" = (/obj/structure/sign/fire{pixel_x = 32; pixel_y = 0},/turf/simulated/floor{dir = 9; icon_state = "whitehall"},/area/rnd/research)
|
||||||
"bUk" = (/obj/structure/ore_box,/obj/machinery/light{dir = 4},/turf/simulated/shuttle/floor,/area/shuttle/mining/station)
|
"bUk" = (/obj/structure/ore_box,/obj/machinery/light{dir = 4},/turf/simulated/shuttle/floor,/area/shuttle/mining/station)
|
||||||
@@ -5168,7 +5168,7 @@
|
|||||||
"bVt" = (/obj/structure/table/reinforced,/obj/item/clothing/mask/gas,/obj/item/clothing/mask/gas,/obj/item/clothing/mask/gas,/obj/item/clothing/mask/gas,/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor{icon_state = "white"},/area/rnd/misc_lab)
|
"bVt" = (/obj/structure/table/reinforced,/obj/item/clothing/mask/gas,/obj/item/clothing/mask/gas,/obj/item/clothing/mask/gas,/obj/item/clothing/mask/gas,/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor{icon_state = "white"},/area/rnd/misc_lab)
|
||||||
"bVu" = (/obj/machinery/computer/security/telescreen{desc = "Used to monitor the proceedings inside the test chamber."; name = "Test Chamber Monitor"; network = list("Miscellaneous Reseach"); pixel_x = 32; pixel_y = 0},/obj/structure/cable/green{d1 = 1; d2 = 8; icon_state = "1-8"},/turf/simulated/floor{icon_state = "white"},/area/rnd/misc_lab)
|
"bVu" = (/obj/machinery/computer/security/telescreen{desc = "Used to monitor the proceedings inside the test chamber."; name = "Test Chamber Monitor"; network = list("Miscellaneous Reseach"); pixel_x = 32; pixel_y = 0},/obj/structure/cable/green{d1 = 1; d2 = 8; icon_state = "1-8"},/turf/simulated/floor{icon_state = "white"},/area/rnd/misc_lab)
|
||||||
"bVv" = (/obj/machinery/atmospherics/portables_connector{dir = 4},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor,/area/rnd/mixing)
|
"bVv" = (/obj/machinery/atmospherics/portables_connector{dir = 4},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor,/area/rnd/mixing)
|
||||||
"bVw" = (/obj/machinery/vending/cigarette{pixel_x = 0; pixel_y = 2},/turf/simulated/floor{icon_state = "white"},/area/rnd/research)
|
"bVw" = (/obj/machinery/vending/coffee,/turf/simulated/floor{icon_state = "white"},/area/rnd/research)
|
||||||
"bVx" = (/obj/machinery/door/firedoor/border_only,/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/door/airlock/glass_engineering{name = "Engineering Break Room"; req_one_access = list(10)},/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor,/area/engineering/break_room)
|
"bVx" = (/obj/machinery/door/firedoor/border_only,/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/door/airlock/glass_engineering{name = "Engineering Break Room"; req_one_access = list(10)},/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor,/area/engineering/break_room)
|
||||||
"bVy" = (/obj/machinery/atmospherics/unary/heat_exchanger{dir = 8},/turf/simulated/floor{dir = 10; icon_state = "warning"},/area/rnd/mixing)
|
"bVy" = (/obj/machinery/atmospherics/unary/heat_exchanger{dir = 8},/turf/simulated/floor{dir = 10; icon_state = "warning"},/area/rnd/mixing)
|
||||||
"bVz" = (/obj/machinery/atmospherics/pipe/manifold/visible,/obj/machinery/meter,/turf/simulated/floor{icon_state = "white"},/area/rnd/mixing)
|
"bVz" = (/obj/machinery/atmospherics/pipe/manifold/visible,/obj/machinery/meter,/turf/simulated/floor{icon_state = "white"},/area/rnd/mixing)
|
||||||
|
|||||||
Reference in New Issue
Block a user