mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fixes issue 1040. Ability to give mechs all access and remove DNA locks from mechs and more.
(the fix is shitty, but then, so is mech code) Fixes issue 1043. Safe structure allows users to teleport any item in the game to them Increases the firefighter heat resistance to 4500. Removes firefighter.dm, as it was entirely commented out. Firefighters are in ripley.dm. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4968 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1436,14 +1436,16 @@
|
||||
/obj/mecha/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["update_content"])
|
||||
if(usr != src.occupant) return
|
||||
send_byjax(src.occupant,"exosuit.browser","content",src.get_stats_part())
|
||||
return
|
||||
if(href_list["close"])
|
||||
return
|
||||
if(usr.stat>0)
|
||||
if(usr.stat > 0)
|
||||
return
|
||||
var/datum/topic_input/filter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["select_equip"])
|
||||
if(usr != src.occupant) return
|
||||
var/obj/item/mecha_parts/mecha_equipment/equip = filter.getObj("select_equip")
|
||||
if(equip)
|
||||
src.selected = equip
|
||||
@@ -1451,24 +1453,30 @@
|
||||
src.visible_message("[src] raises [equip]")
|
||||
send_byjax(src.occupant,"exosuit.browser","eq_list",src.get_equipment_list())
|
||||
return
|
||||
if (href_list["eject"])
|
||||
if(href_list["eject"])
|
||||
if(usr != src.occupant) return
|
||||
src.eject()
|
||||
return
|
||||
if(href_list["toggle_lights"])
|
||||
if(usr != src.occupant) return
|
||||
src.toggle_lights()
|
||||
return
|
||||
if(href_list["toggle_airtank"])
|
||||
if(usr != src.occupant) return
|
||||
src.toggle_internal_tank()
|
||||
return
|
||||
if(href_list["rmictoggle"])
|
||||
if(usr != src.occupant) return
|
||||
radio.broadcasting = !radio.broadcasting
|
||||
send_byjax(src.occupant,"exosuit.browser","rmicstate",(radio.broadcasting?"Engaged":"Disengaged"))
|
||||
return
|
||||
if(href_list["rspktoggle"])
|
||||
if(usr != src.occupant) return
|
||||
radio.listening = !radio.listening
|
||||
send_byjax(src.occupant,"exosuit.browser","rspkstate",(radio.listening?"Engaged":"Disengaged"))
|
||||
return
|
||||
if(href_list["rfreq"])
|
||||
if(usr != src.occupant) return
|
||||
var/new_frequency = (radio.frequency + filter.getNum("rfreq"))
|
||||
if (!radio.freerange || (radio.frequency < 1200 || radio.frequency > 1600))
|
||||
new_frequency = sanitize_frequency(new_frequency)
|
||||
@@ -1476,16 +1484,20 @@
|
||||
send_byjax(src.occupant,"exosuit.browser","rfreq","[format_frequency(radio.frequency)]")
|
||||
return
|
||||
if(href_list["port_disconnect"])
|
||||
if(usr != src.occupant) return
|
||||
src.disconnect_from_port()
|
||||
return
|
||||
if (href_list["port_connect"])
|
||||
if(usr != src.occupant) return
|
||||
src.connect_to_port()
|
||||
return
|
||||
if (href_list["view_log"])
|
||||
if(usr != src.occupant) return
|
||||
src.occupant << browse(src.get_log_html(), "window=exosuit_log")
|
||||
onclose(occupant, "exosuit_log")
|
||||
return
|
||||
if (href_list["change_name"])
|
||||
if(usr != src.occupant) return
|
||||
var/newname = strip_html_simple(input(occupant,"Choose new exosuit name","Rename exosuit",initial(name)) as text)
|
||||
if(newname && trim(newname))
|
||||
name = newname
|
||||
@@ -1493,10 +1505,12 @@
|
||||
alert(occupant, "nope.avi")
|
||||
return
|
||||
if (href_list["toggle_id_upload"])
|
||||
if(usr != src.occupant) return
|
||||
add_req_access = !add_req_access
|
||||
send_byjax(src.occupant,"exosuit.browser","t_id_upload","[add_req_access?"L":"Unl"]ock ID upload panel")
|
||||
return
|
||||
if(href_list["toggle_maint_access"])
|
||||
if(usr != src.occupant) return
|
||||
if(state)
|
||||
occupant_message("<font color='red'>Maintenance protocols in effect</font>")
|
||||
return
|
||||
@@ -1504,9 +1518,11 @@
|
||||
send_byjax(src.occupant,"exosuit.browser","t_maint_access","[maint_access?"Forbid":"Permit"] maintenance protocols")
|
||||
return
|
||||
if(href_list["req_access"] && add_req_access)
|
||||
if(!in_range(src, usr)) return
|
||||
output_access_dialog(filter.getObj("id_card"),filter.getMob("user"))
|
||||
return
|
||||
if(href_list["maint_access"] && maint_access)
|
||||
if(!in_range(src, usr)) return
|
||||
var/mob/user = filter.getMob("user")
|
||||
if(user)
|
||||
if(state==0)
|
||||
@@ -1518,33 +1534,40 @@
|
||||
output_maintenance_dialog(filter.getObj("id_card"),user)
|
||||
return
|
||||
if(href_list["set_internal_tank_valve"] && state >=1)
|
||||
if(!in_range(src, usr)) return
|
||||
var/mob/user = filter.getMob("user")
|
||||
if(user)
|
||||
var/new_pressure = input(user,"Input new output pressure","Pressure setting",internal_tank_valve) as num
|
||||
if(new_pressure)
|
||||
internal_tank_valve = new_pressure
|
||||
user << "The internal pressure valve has been set to [internal_tank_valve]kPa."
|
||||
if (href_list["add_req_access"] && add_req_access)
|
||||
if(href_list["add_req_access"] && add_req_access && filter.getObj("id_card"))
|
||||
if(!in_range(src, usr)) return
|
||||
operation_req_access += filter.getNum("add_req_access")
|
||||
output_access_dialog(filter.getObj("id_card"),filter.getMob("user"))
|
||||
return
|
||||
if (href_list["del_req_access"] && add_req_access)
|
||||
if(href_list["del_req_access"] && add_req_access && filter.getObj("id_card"))
|
||||
if(!in_range(src, usr)) return
|
||||
operation_req_access -= filter.getNum("del_req_access")
|
||||
output_access_dialog(filter.getObj("id_card"),filter.getMob("user"))
|
||||
return
|
||||
if (href_list["finish_req_access"])
|
||||
if(href_list["finish_req_access"])
|
||||
if(!in_range(src, usr)) return
|
||||
add_req_access = 0
|
||||
var/mob/user = filter.getMob("user")
|
||||
user << browse(null,"window=exosuit_add_access")
|
||||
return
|
||||
if(href_list["dna_lock"])
|
||||
if(usr != src.occupant) return
|
||||
if(src.occupant)
|
||||
src.dna = src.occupant.dna.unique_enzymes
|
||||
src.occupant_message("You feel a prick as the needle takes your DNA sample.")
|
||||
return
|
||||
if(href_list["reset_dna"])
|
||||
if(usr != src.occupant) return
|
||||
src.dna = null
|
||||
if(href_list["repair_int_control_lost"])
|
||||
if(usr != src.occupant) return
|
||||
src.occupant_message("Recalibrating coordination system.")
|
||||
src.log_message("Recalibration of coordination system started.")
|
||||
var/T = src.loc
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
/*/obj/mecha/working/firefighter
|
||||
desc = "Standart APLU chassis was refitted with additional thermal protection and cistern."
|
||||
name = "Ripley-on-Fire"
|
||||
icon_state = "ripley"
|
||||
step_in = 6
|
||||
max_temperature = 6000
|
||||
health = 250
|
||||
internal_damage_threshold = 40
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/ripley
|
||||
infra_luminosity = 5
|
||||
|
||||
|
||||
/obj/mecha/working/firefighter/New()
|
||||
..()
|
||||
// tools += new /datum/mecha_tool/uni_interface(src)
|
||||
tools += new /datum/mecha_tool/extinguisher(src)
|
||||
tools += new /datum/mecha_tool/drill(src)
|
||||
|
||||
for(var/g_type in typesof(/datum/mecha_tool/gimmick))
|
||||
if(g_type!=/datum/mecha_tool/gimmick)
|
||||
tools += new g_type(src)
|
||||
|
||||
selected_tool = tools[1]
|
||||
return
|
||||
*/
|
||||
@@ -19,7 +19,7 @@
|
||||
desc = "Standart APLU chassis was refitted with additional thermal protection and cistern."
|
||||
name = "APLU \"Firefighter\""
|
||||
icon_state = "firefighter"
|
||||
max_temperature = 2500
|
||||
max_temperature = 4500
|
||||
health = 250
|
||||
lights_power = 8
|
||||
damage_absorption = list("fire"=0.5,"bullet"=0.8,"bomb"=0.5)
|
||||
|
||||
@@ -135,10 +135,11 @@ FLOOR SAFES
|
||||
if(href_list["retrieve"])
|
||||
user << browse("", "window=safe") // Close the menu
|
||||
|
||||
var/obj/item/P = locate(href_list["retrieve"])
|
||||
if(P && in_range(src, user))
|
||||
user.put_in_hands(P)
|
||||
updateUsrDialog()
|
||||
var/obj/item/P = locate(href_list["retrieve"]) in src
|
||||
if(open)
|
||||
if(P && in_range(src, user))
|
||||
user.put_in_hands(P)
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/structure/safe/attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
Reference in New Issue
Block a user