Skip to content

Commit

Permalink
Removes dna lock from mechs (#9825)
Browse files Browse the repository at this point in the history
* Removes DNA locking

* Update mecha_topic.dm
  • Loading branch information
PowerfulBacon authored Sep 20, 2023
1 parent 2539203 commit 8e345c3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 39 deletions.
1 change: 0 additions & 1 deletion code/game/mecha/combat/honker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<b>HONK pressure: </b>[cabin_pressure>WARNING_HIGH_PRESSURE ? "<font color='red'>[cabin_pressure]</font>": cabin_pressure]kPa<br>
<b>HONK temperature: </b> [return_temperature()]&deg;K|[return_temperature() - T0C]&deg;C<br>
<b>Lights: </b>[lights?"on":"off"]<br>
[dna_lock?"<b>DNA-locked:</b><br> <span style='font-size:10px;letter-spacing:-1px;'>[dna_lock]</span> \[<a href='?src=[REF(src)];reset_dna=1'>Reset</a>\]<br>":null]
"}
return output

Expand Down
1 change: 0 additions & 1 deletion code/game/mecha/equipment/tools/work_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@
E.detach()
E.attach(N)
M.equipment -= E
N.dna_lock = M.dna_lock
N.maint_access = M.maint_access
N.strafe = M.strafe
N.obj_integrity = M.obj_integrity //This is not a repair tool
Expand Down
18 changes: 1 addition & 17 deletions code/game/mecha/mecha.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
var/last_message = 0
var/add_req_access = 1
var/maint_access = 0
var/dna_lock //dna-locking the mech
var/list/proc_res = list() //stores proc owners, like proc_res["functionname"] = owner reference
var/datum/effect_system/spark_spread/spark_system = new
var/lights = FALSE
Expand Down Expand Up @@ -456,7 +455,6 @@
..()
playsound(src, "sparks", 100, 1)
to_chat(user, "<span class='warning'>You short out the mech suit's internal controls.</span>")
dna_lock = null
equipment_disabled = TRUE
log_message("System emagged detected", LOG_MECHA, color="red")
addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/mecha, restore_equipment)), 15 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
Expand Down Expand Up @@ -810,7 +808,7 @@
if(AI.stat || !AI.client)
to_chat(user, "<span class='warning'>[AI.name] is currently unresponsive, and cannot be uploaded.</span>")
return
if(occupant || dna_lock) //Normal AIs cannot steal mechs!
if(occupant) //Normal AIs cannot steal mechs!
to_chat(user, "<span class='warning'>Access denied. [name] is [occupant ? "currently occupied" : "secured with a DNA lock"].</span>")
return
AI.control_disabled = FALSE
Expand Down Expand Up @@ -913,16 +911,6 @@
to_chat(usr, "<span class='warning'>The [name] is already occupied!</span>")
log_message("Permission denied (Occupied).", LOG_MECHA)
return
if(dna_lock)
var/passed = FALSE
if(user.has_dna())
var/mob/living/carbon/C = user
if(C.dna.unique_enzymes==dna_lock)
passed = TRUE
if (!passed)
to_chat(user, "<span class='warning'>Access denied. [name] is secured with a DNA lock.</span>")
log_message("Permission denied (DNA LOCK).", LOG_MECHA)
return
if(!operation_allowed(user))
to_chat(user, "<span class='warning'>Access denied. Insufficient operation keycodes.</span>")
log_message("Permission denied (No keycode).", LOG_MECHA)
Expand Down Expand Up @@ -981,10 +969,6 @@
else if(occupant)
to_chat(user, "<span class='warning'>Occupant detected!</span>")
return FALSE
else if(dna_lock && (!mmi_as_oc.brainmob.stored_dna || (dna_lock != mmi_as_oc.brainmob.stored_dna.unique_enzymes)))
to_chat(user, "<span class='warning'>Access denied. [name] is secured with a DNA lock.</span>")
return FALSE

visible_message("<span class='notice'>[user] starts to insert an MMI into [name].</span>")

if(do_after(user, 40, target = src))
Expand Down
21 changes: 1 addition & 20 deletions code/game/mecha/mecha_topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@
<b>Air tank pressure: </b>[internal_tank?"[tank_pressure]kPa":"N/A"]<br>
<b>Air tank temperature: </b>[internal_tank?"[tank_temperature]&deg;K|[tank_temperature - T0C]&deg;C":"N/A"]<br>
<b>Cabin pressure: </b>[internal_tank?"[cabin_pressure>WARNING_HIGH_PRESSURE ? "<span class='danger'>[cabin_pressure]</span>": cabin_pressure]kPa":"N/A"]<br>
<b>Cabin temperature: </b> [internal_tank?"[return_temperature()]&deg;K|[return_temperature() - T0C]&deg;C":"N/A"]<br>
[dna_lock?"<b>DNA-locked:</b><br> <span style='font-size:10px;letter-spacing:-1px;'>[dna_lock]</span> \[<a href='?src=[REF(src)];reset_dna=1'>Reset</a>\]<br>":""]<br>"}
<b>Cabin temperature: </b> [internal_tank?"[return_temperature()]&deg;K|[return_temperature() - T0C]&deg;C":"N/A"]<br>"}
. += "[get_actions()]<br>"

///Returns HTML for mech actions. Ideally, this proc would be empty for the base mecha. Segmented for easy refactoring.
Expand Down Expand Up @@ -139,7 +138,6 @@
<a href='?src=[REF(src)];toggle_id_upload=1'><span id='t_id_upload'>[add_req_access?"L":"Unl"]ock ID upload panel</span></a><br>
<a href='?src=[REF(src)];toggle_maint_access=1'><span id='t_maint_access'>[maint_access?"Forbid":"Permit"] maintenance protocols</span></a><br>
[internal_tank?"<a href='?src=[REF(src)];toggle_port_connection=1'><span id='t_port_connection'>[internal_tank.connected_port?"Disconnect from":"Connect to"] gas port</span></a><br>":""]
<a href='?src=[REF(src)];dna_lock=1'>DNA-lock</a><br>
<a href='?src=[REF(src)];change_name=1'>Change exosuit name</a>
</div>
</div>"}
Expand Down Expand Up @@ -389,23 +387,6 @@
send_byjax(occupant,"exosuit.browser","t_port_connection","[internal_tank.connected_port?"Disconnect from":"Connect to"] gas port")
return

//Turns on the DNA lock
if(href_list["dna_lock"])
if(obj_flags & EMAGGED)
occupant_message("The control console lights up red, failing to bind to your DNA.")
return
if(!iscarbon(occupant) || !occupant.dna)
occupant_message("The controls console flashes brightly, binding to your DNA.")
return
dna_lock = occupant.dna.unique_enzymes
occupant_message("The controls console flashes brightly, binding to your DNA.")
return

//Resets the DNA lock
if(href_list["reset_dna"])
dna_lock = null
return

//Repairs internal damage
if(href_list["repair_int_control_lost"])
occupant_message("Recalibrating coordination system.")
Expand Down

0 comments on commit 8e345c3

Please sign in to comment.