mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-22 12:47:16 +01:00
Merge branch 'dev' into ofMechfabAndPanic
Conflicts: maps/exodus-1.dmm
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
icon_state = "x2"
|
||||
anchored = 1.0
|
||||
unacidable = 1
|
||||
simulated = 0
|
||||
|
||||
/obj/effect/landmark/New()
|
||||
..()
|
||||
|
||||
@@ -16,14 +16,9 @@
|
||||
|
||||
/obj/item/device/flashlight/initialize()
|
||||
..()
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
|
||||
/obj/item/device/flashlight/update_icon()
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-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.
|
||||
return 0
|
||||
on = !on
|
||||
update_brightness(user)
|
||||
update_icon()
|
||||
user.update_action_buttons()
|
||||
return 1
|
||||
|
||||
@@ -171,11 +166,7 @@
|
||||
on = 0
|
||||
src.force = initial(src.force)
|
||||
src.damtype = initial(src.damtype)
|
||||
if(ismob(loc))
|
||||
var/mob/U = loc
|
||||
update_brightness(U)
|
||||
else
|
||||
update_brightness(null)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/flare/attack_self(mob/user)
|
||||
|
||||
@@ -206,10 +197,11 @@
|
||||
on = 1 //Bio-luminesence has one setting, on.
|
||||
|
||||
/obj/item/device/flashlight/slime/New()
|
||||
..()
|
||||
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()
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/device/flashlight/slime/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/device/flashlight/slime/attack_self(mob/user)
|
||||
return //Bio-luminescence does not toggle.
|
||||
|
||||
@@ -365,10 +365,10 @@ datum/uplink_item/dd_SortValue()
|
||||
item_cost = 7
|
||||
path = /obj/item/weapon/aiModule/syndicate
|
||||
|
||||
/datum/uplink_item/item/tools/singularity_beacon
|
||||
name = "Singularity Beacon (DANGER!)"
|
||||
/datum/uplink_item/item/tools/supply_beacon
|
||||
name = "Hacked Supply Beacon (DANGER!)"
|
||||
item_cost = 7
|
||||
path = /obj/item/device/radio/beacon/syndicate
|
||||
path = /obj/item/supply_beacon
|
||||
|
||||
/datum/uplink_item/item/tools/teleporter
|
||||
name = "Teleporter Circuit Board"
|
||||
|
||||
@@ -129,6 +129,7 @@
|
||||
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/is_washing = 0
|
||||
var/list/temperature_settings = list("normal" = 310, "boiling" = T0C+100, "freezing" = T0C)
|
||||
|
||||
/obj/machinery/shower/New()
|
||||
..()
|
||||
@@ -150,7 +151,7 @@
|
||||
if(on)
|
||||
if (M.loc == loc)
|
||||
wash(M)
|
||||
check_heat(M)
|
||||
process_heat(M)
|
||||
for (var/atom/movable/G in src.loc)
|
||||
G.clean_blood()
|
||||
|
||||
@@ -158,15 +159,11 @@
|
||||
if(I.type == /obj/item/device/analyzer)
|
||||
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
|
||||
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>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
switch(watertemp)
|
||||
if("normal")
|
||||
watertemp = "freezing"
|
||||
if("freezing")
|
||||
watertemp = "boiling"
|
||||
if("boiling")
|
||||
watertemp = "normal"
|
||||
watertemp = newtemp
|
||||
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)
|
||||
|
||||
@@ -177,8 +174,8 @@
|
||||
|
||||
if(on)
|
||||
overlays += image('icons/obj/watercloset.dmi', src, "water", MOB_LAYER + 1, dir)
|
||||
if(watertemp == "freezing")
|
||||
return
|
||||
if(temperature_settings[watertemp] < T20C)
|
||||
return //no mist for cold water
|
||||
if(!ismist)
|
||||
spawn(50)
|
||||
if(src && on)
|
||||
@@ -200,7 +197,7 @@
|
||||
wash(O)
|
||||
if(ismob(O))
|
||||
mobpresent += 1
|
||||
check_heat(O)
|
||||
process_heat(O)
|
||||
|
||||
/obj/machinery/shower/Uncrossed(atom/movable/O)
|
||||
if(ismob(O))
|
||||
@@ -304,8 +301,8 @@
|
||||
if(!on) return
|
||||
wash_floor()
|
||||
if(!mobpresent) return
|
||||
for(var/mob/living/carbon/C in loc)
|
||||
check_heat(C)
|
||||
for(var/mob/living/L in loc)
|
||||
process_heat(L)
|
||||
|
||||
/obj/machinery/shower/proc/wash_floor()
|
||||
if(!ismist && is_washing)
|
||||
@@ -317,22 +314,19 @@
|
||||
spawn(100)
|
||||
is_washing = 0
|
||||
|
||||
/obj/machinery/shower/proc/check_heat(mob/M as mob)
|
||||
if(!on || watertemp == "normal") return
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
|
||||
if(watertemp == "freezing")
|
||||
C.bodytemperature = max(80, C.bodytemperature - 80)
|
||||
C << "<span class='warning'>The water is freezing!</span>"
|
||||
return
|
||||
if(watertemp == "boiling")
|
||||
C.bodytemperature = min(500, C.bodytemperature + 35)
|
||||
C.adjustFireLoss(5)
|
||||
C << "<span class='danger'>The water is searing!</span>"
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/shower/proc/process_heat(mob/living/M)
|
||||
if(!on || !istype(M)) return
|
||||
|
||||
var/temperature = temperature_settings[watertemp]
|
||||
var/temp_adj = between(BODYTEMP_COOLING_MAX, temperature - M.bodytemperature, BODYTEMP_HEATING_MAX)
|
||||
M.bodytemperature += temp_adj
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(temperature >= H.species.heat_level_1)
|
||||
H << "<span class='danger'>The water is searing hot!</span>"
|
||||
else if(temperature <= H.species.cold_level_1)
|
||||
H << "<span class='warning'>The water is freezing cold!</span>"
|
||||
|
||||
/obj/item/weapon/bikehorn/rubberducky
|
||||
name = "rubber ducky"
|
||||
|
||||
Reference in New Issue
Block a user