mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-23 03:56:27 +01:00
Merge remote-tracking branch 'upstream/master' into dev-freeze
Signed-off-by: Mloc-Hibernia <colmohici@gmail.com> Conflicts: code/modules/mob/living/silicon/robot/robot_modules.dm
This commit is contained in:
@@ -309,10 +309,18 @@
|
||||
if(e.open)
|
||||
open = "Open:"
|
||||
switch (e.germ_level)
|
||||
if (INFECTION_LEVEL_ONE + 50 to INFECTION_LEVEL_TWO)
|
||||
if (INFECTION_LEVEL_ONE to INFECTION_LEVEL_ONE + 200)
|
||||
infected = "Mild Infection:"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_THREE)
|
||||
if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300)
|
||||
infected = "Mild Infection+:"
|
||||
if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400)
|
||||
infected = "Mild Infection++:"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200)
|
||||
infected = "Acute Infection:"
|
||||
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
|
||||
infected = "Acute Infection+:"
|
||||
if (INFECTION_LEVEL_TWO + 300 to INFECTION_LEVEL_TWO + 400)
|
||||
infected = "Acute Infection++:"
|
||||
if (INFECTION_LEVEL_THREE to INFINITY)
|
||||
infected = "Septic:"
|
||||
|
||||
@@ -341,10 +349,18 @@
|
||||
|
||||
var/infection = "None"
|
||||
switch (i.germ_level)
|
||||
if (1 to INFECTION_LEVEL_TWO)
|
||||
if (1 to INFECTION_LEVEL_ONE + 200)
|
||||
infection = "Mild Infection:"
|
||||
if (INFECTION_LEVEL_TWO to INFINITY)
|
||||
if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300)
|
||||
infection = "Mild Infection+:"
|
||||
if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400)
|
||||
infection = "Mild Infection++:"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200)
|
||||
infection = "Acute Infection:"
|
||||
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
|
||||
infection = "Acute Infection+:"
|
||||
if (INFECTION_LEVEL_TWO + 300 to INFINITY)
|
||||
infection = "Acute Infection++:"
|
||||
|
||||
dat += "<tr>"
|
||||
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>[infection]:[mech]</td><td></td>"
|
||||
|
||||
@@ -108,7 +108,9 @@
|
||||
|
||||
//are we ready for undocking?
|
||||
/datum/computer/file/embedded_program/docking/airlock/ready_for_undocking()
|
||||
return airlock_program.check_doors_secured()
|
||||
var/ext_closed = airlock_program.check_exterior_door_secured()
|
||||
var/int_closed = airlock_program.check_interior_door_secured()
|
||||
return (ext_closed || int_closed)
|
||||
|
||||
//An airlock controller to be used by the airlock-based docking port controller.
|
||||
//Same as a regular airlock controller but allows disabling of the regular airlock functions when docking
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
|
||||
if (istype(M, /obj/machinery/embedded_controller/radio/airlock)) //if our controller is an airlock controller than we can auto-init our tags
|
||||
var/obj/machinery/embedded_controller/radio/airlock/controller = M
|
||||
tag_exterior_door = controller.tag_exterior_door
|
||||
tag_interior_door = controller.tag_interior_door
|
||||
tag_airpump = controller.tag_airpump
|
||||
tag_chamber_sensor = controller.tag_chamber_sensor
|
||||
tag_exterior_door = controller.tag_exterior_door? controller.tag_exterior_door : "[id_tag]_outer"
|
||||
tag_interior_door = controller.tag_interior_door? controller.tag_interior_door : "[id_tag]_inner"
|
||||
tag_airpump = controller.tag_airpump? controller.tag_airpump : "[id_tag]_pump"
|
||||
tag_chamber_sensor = controller.tag_chamber_sensor? controller.tag_chamber_sensor : "[id_tag]_sensor"
|
||||
tag_exterior_sensor = controller.tag_exterior_sensor
|
||||
tag_interior_sensor = controller.tag_interior_sensor
|
||||
memory["secure"] = controller.tag_secure
|
||||
@@ -248,9 +248,15 @@
|
||||
return (state == STATE_WAIT && target_state == TARGET_NONE)
|
||||
|
||||
//are the doors closed and locked?
|
||||
/datum/computer/file/embedded_program/airlock/proc/check_exterior_door_secured()
|
||||
return (memory["exterior_status"]["state"] == "closed" && memory["exterior_status"]["lock"] == "locked")
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/check_interior_door_secured()
|
||||
return (memory["interior_status"]["state"] == "closed" && memory["interior_status"]["lock"] == "locked")
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/check_doors_secured()
|
||||
var/ext_closed = (memory["exterior_status"]["state"] == "closed" && memory["exterior_status"]["lock"] == "locked")
|
||||
var/int_closed = (memory["interior_status"]["state"] == "closed" && memory["interior_status"]["lock"] == "locked")
|
||||
var/ext_closed = check_exterior_door_secured()
|
||||
var/int_closed = check_interior_door_secured()
|
||||
return (ext_closed && int_closed)
|
||||
|
||||
/datum/computer/file/embedded_program/airlock/proc/signalDoor(var/tag, var/command)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
//This controller goes on the escape pod itself
|
||||
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod
|
||||
name = "escape pod controller"
|
||||
var/datum/shuttle/ferry/escape_pod/pod
|
||||
|
||||
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
if (istype(M, /obj/machinery/embedded_controller/radio/simple_docking_controller))
|
||||
var/obj/machinery/embedded_controller/radio/simple_docking_controller/controller = M
|
||||
|
||||
tag_door = controller.tag_door
|
||||
tag_door = controller.tag_door? controller.tag_door : "[id_tag]_hatch"
|
||||
|
||||
spawn(10)
|
||||
signal_door("update") //signals connected doors to update their status
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
/obj/item/weapon/kitchen/utensil/New()
|
||||
if (prob(60))
|
||||
src.pixel_y = rand(0, 4)
|
||||
return
|
||||
|
||||
|
||||
create_reagents(5)
|
||||
return
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
|
||||
@@ -100,7 +100,6 @@ var/list/ai_list = list()
|
||||
add_language("Siik'maas", 0)
|
||||
add_language("Siik'tajr", 0)
|
||||
add_language("Skrellian", 0)
|
||||
add_language("Rootspeak", 0)
|
||||
add_language("Tradeband", 1)
|
||||
add_language("Gutter", 0)
|
||||
|
||||
|
||||
@@ -317,10 +317,10 @@
|
||||
if (!yes || ( \
|
||||
!istype(AM,/obj/machinery/door) && \
|
||||
!istype(AM,/obj/machinery/recharge_station) && \
|
||||
!istype(AM,/obj/machinery/disposal/deliveryChute && \
|
||||
!istype(AM,/obj/machinery/disposal/deliveryChute) && \
|
||||
!istype(AM,/obj/machinery/teleport/hub) && \
|
||||
!istype(AM,/obj/effect/portal)
|
||||
))) return
|
||||
)) return
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -56,8 +56,13 @@
|
||||
modules += O
|
||||
|
||||
/obj/item/weapon/robot_module/proc/add_languages(var/mob/living/silicon/robot/R)
|
||||
R.add_language("Tradeband", 1)
|
||||
//full set of languages
|
||||
R.add_language("Sol Common", 1)
|
||||
R.add_language("Tradeband", 1)
|
||||
R.add_language("Sinta'unathi", 0)
|
||||
R.add_language("Siik'maas", 0)
|
||||
R.add_language("Siik'tajr", 0)
|
||||
R.add_language("Skrellian", 0)
|
||||
R.add_language("Gutter", 0)
|
||||
|
||||
|
||||
|
||||
@@ -394,7 +394,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_ONE)
|
||||
//having an infection raises your body temperature
|
||||
var/fever_temperature = (owner.species.heat_level_1 - owner.species.body_temperature - 1)* min(germ_level/INFECTION_LEVEL_THREE, 1) + owner.species.body_temperature
|
||||
var/fever_temperature = (owner.species.heat_level_1 - owner.species.body_temperature - 1)* min(germ_level/(INFECTION_LEVEL_ONE+300), 1) + owner.species.body_temperature
|
||||
if (owner.bodytemperature < fever_temperature)
|
||||
//world << "fever: [owner.bodytemperature] < [fever_temperature], raising temperature."
|
||||
owner.bodytemperature++
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
harvesting = 0
|
||||
cur_artifact.anchored = 0
|
||||
cur_artifact.being_used = 0
|
||||
cur_artifact = null
|
||||
src.visible_message("<b>[name]</b> states, \"Battery is full.\"")
|
||||
icon_state = "incubator"
|
||||
|
||||
@@ -140,27 +141,13 @@
|
||||
src.visible_message("<b>[src]</b> states, \"Cannot harvest. Source already being harvested.\"")
|
||||
|
||||
else
|
||||
var/mundane = 0
|
||||
for(var/obj/O in get_turf(owned_scanner))
|
||||
if(O.invisibility)
|
||||
continue
|
||||
if(!istype(O, /obj/machinery/artifact) && !istype(O, /obj/machinery/artifact_scanpad))
|
||||
mundane++
|
||||
break
|
||||
for(var/mob/O in get_turf(owned_scanner))
|
||||
if(O.invisibility)
|
||||
continue
|
||||
mundane++
|
||||
break
|
||||
|
||||
if(articount > 1 || mundane)
|
||||
var/message = "<b>[src]</b> states, \"Cannot harvest. Too many artifacts on the pad.\""
|
||||
src.visible_message(message)
|
||||
else
|
||||
if(articount > 1)
|
||||
state("Cannot harvest. Too many artifacts on the pad.")
|
||||
else if(analysed)
|
||||
cur_artifact = analysed
|
||||
|
||||
//if both effects are active, we can't harvest either
|
||||
if(cur_artifact.my_effect.activated && cur_artifact.secondary_effect.activated)
|
||||
if(cur_artifact.my_effect && cur_artifact.my_effect.activated && cur_artifact.secondary_effect.activated)
|
||||
src.visible_message("<b>[src]</b> states, \"Cannot harvest. Source is emitting conflicting energy signatures.\"")
|
||||
else if(!cur_artifact.my_effect.activated && !cur_artifact.secondary_effect.activated)
|
||||
src.visible_message("<b>[src]</b> states, \"Cannot harvest. No energy emitting from source.\"")
|
||||
@@ -233,6 +220,7 @@
|
||||
harvesting = 0
|
||||
cur_artifact.anchored = 0
|
||||
cur_artifact.being_used = 0
|
||||
cur_artifact = null
|
||||
src.visible_message("<b>[name]</b> states, \"Energy harvesting interrupted.\"")
|
||||
icon_state = "incubator"
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
p = min(p, 100)
|
||||
icon_state = "anobattery[round(p,25)]"
|
||||
|
||||
/obj/item/weapon/anobattery/proc/use_power(var/amount)
|
||||
stored_charge = max(0, stored_charge - amount)
|
||||
|
||||
/obj/item/weapon/anodevice
|
||||
name = "Anomaly power utilizer"
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
@@ -78,7 +81,7 @@
|
||||
|
||||
/obj/item/weapon/anodevice/process()
|
||||
if(activated)
|
||||
if(inserted_battery && inserted_battery.battery_effect)
|
||||
if(inserted_battery && inserted_battery.battery_effect && (inserted_battery.stored_charge > 0) )
|
||||
//make sure the effect is active
|
||||
if(!inserted_battery.battery_effect.activated)
|
||||
inserted_battery.battery_effect.ToggleActivate(1)
|
||||
@@ -106,20 +109,20 @@
|
||||
inserted_battery.battery_effect.DoEffectTouch(holder)
|
||||
|
||||
//consume power
|
||||
inserted_battery.stored_charge -= energy_consumed_on_touch
|
||||
inserted_battery.use_power(energy_consumed_on_touch)
|
||||
else
|
||||
//consume power equal to time passed
|
||||
inserted_battery.stored_charge -= world.time - last_process
|
||||
inserted_battery.use_power(world.time - last_process)
|
||||
|
||||
else if(inserted_battery.battery_effect.effect == EFFECT_PULSE)
|
||||
inserted_battery.battery_effect.chargelevel = inserted_battery.battery_effect.chargelevelmax
|
||||
|
||||
//consume power relative to the time the artifact takes to charge and the effect range
|
||||
inserted_battery.stored_charge -= inserted_battery.battery_effect.effectrange * inserted_battery.battery_effect.effectrange * inserted_battery.battery_effect.chargelevelmax
|
||||
inserted_battery.use_power(inserted_battery.battery_effect.effectrange * inserted_battery.battery_effect.effectrange * inserted_battery.battery_effect.chargelevelmax)
|
||||
|
||||
else
|
||||
//consume power equal to time passed
|
||||
inserted_battery.stored_charge -= world.time - last_process
|
||||
inserted_battery.use_power(world.time - last_process)
|
||||
|
||||
last_activation = world.time
|
||||
|
||||
@@ -159,11 +162,12 @@
|
||||
//max 10 sec interval
|
||||
interval = min(max(interval, 0), 100)
|
||||
if(href_list["startup"])
|
||||
activated = 1
|
||||
src.visible_message("\blue \icon[src] [src] whirrs.", "\icon[src]\blue You hear something whirr.")
|
||||
if(!inserted_battery.battery_effect.activated)
|
||||
inserted_battery.battery_effect.ToggleActivate(1)
|
||||
time_end = world.time + duration
|
||||
if(inserted_battery && inserted_battery.battery_effect && (inserted_battery.stored_charge > 0) )
|
||||
activated = 1
|
||||
src.visible_message("\blue \icon[src] [src] whirrs.", "\icon[src]\blue You hear something whirr.")
|
||||
if(!inserted_battery.battery_effect.activated)
|
||||
inserted_battery.battery_effect.ToggleActivate(1)
|
||||
time_end = world.time + duration
|
||||
if(href_list["shutdown"])
|
||||
activated = 0
|
||||
if(href_list["ejectbattery"])
|
||||
@@ -196,7 +200,7 @@
|
||||
|
||||
if(activated && inserted_battery.battery_effect.effect == EFFECT_TOUCH && !isnull(inserted_battery))
|
||||
inserted_battery.battery_effect.DoEffectTouch(M)
|
||||
inserted_battery.stored_charge -= energy_consumed_on_touch
|
||||
inserted_battery.use_power(energy_consumed_on_touch)
|
||||
user.visible_message("\blue [user] taps [M] with [src], and it shudders on contact.")
|
||||
else
|
||||
user.visible_message("\blue [user] taps [M] with [src], but nothing happens.")
|
||||
|
||||
@@ -13,22 +13,23 @@
|
||||
var/last_scan_time = 0
|
||||
var/scan_delay = 25
|
||||
|
||||
/obj/item/device/ano_scanner/New()
|
||||
..()
|
||||
spawn(0)
|
||||
scan()
|
||||
/obj/item/device/ano_scanner/initialize()
|
||||
scan()
|
||||
|
||||
/obj/item/device/ano_scanner/attack_self(var/mob/user as mob)
|
||||
return src.interact(user)
|
||||
|
||||
/obj/item/device/ano_scanner/interact(var/mob/user as mob)
|
||||
var/message = "Background radiation levels detected."
|
||||
if(nearest_artifact_distance >= 0)
|
||||
message = "Exotic energy detected on wavelength '[nearest_artifact_id]' in a radius of [nearest_artifact_distance]m"
|
||||
user << "<span class='info'>[message]</span>"
|
||||
if(world.time - last_scan_time >= scan_delay)
|
||||
spawn(0)
|
||||
scan()
|
||||
if(nearest_artifact_distance >= 0)
|
||||
message = "Exotic energy detected on wavelength '[nearest_artifact_id]' in a radius of [nearest_artifact_distance]m"
|
||||
else
|
||||
message = "Scanning array is recharging."
|
||||
|
||||
user << "<span class='info'>[message]</span>"
|
||||
|
||||
/obj/item/device/ano_scanner/proc/scan()
|
||||
set background = 1
|
||||
|
||||
Reference in New Issue
Block a user