Skip to content

Commit

Permalink
button fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brndd committed Dec 13, 2024
1 parent b68d205 commit f4368b5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions code/datums/gamemode/role/divergentclone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -271,17 +271,16 @@
- <a href='?src=\ref[src]&mind=\ref[antag]&role_speak=\ref[M]'>(Message as:</a><a href='?src=\ref[src]&mind=\ref[antag]&role_set_speaker=\ref[M]'>\[[voice_per_admin[user.ckey]]\])</a>"}

/datum/role/divergentclone/extraPanelButtons()
var/dat = ""
var/dat = "<br>"
if(!has_spawned_in)
dat += "<b>Evil (will be traitor): </b> [evil ? "Yes" : "No"] <a href='?src=\ref[antag];mind=\ref[antag];role=\ref[src];toggleEvil=1;'>(Toggle)</a><br>"

dat += "<b>Amnesia level: </b>"
switch(amnesia)
if(0)
dat += "0 (Excellent memory)"
if(1)
if(amnesia == 0)
dat += "0 (Excellent memory)"
else if(amnesia == 1)

Check failure on line 281 in code/datums/gamemode/role/divergentclone.dm

View workflow job for this annotation

GitHub Actions / Run linters

got '{', expected one of: '}', ';', if, while, do, for, spawn, switch, try, set, break, continue, del, var, return, CRASH, throw, goto, operator, term
dat += "1 (Normal memory)"

Check failure on line 282 in code/datums/gamemode/role/divergentclone.dm

View workflow job for this annotation

GitHub Actions / Run linters

inconsistent multiple indentation: 2 > 1
if(2)
else if(amnesia == 2)
dat += "2 (Hazy memory)"

Check failure on line 284 in code/datums/gamemode/role/divergentclone.dm

View workflow job for this annotation

GitHub Actions / Run linters

inconsistent multiple indentation: 2 > 1
if(amnesia != 0)
dat += " <a href='?src=\ref[antag];mind=\ref[antag];role=\ref[src];setAmnesia=0;'>(Set to Excellent)</a>"
Expand All @@ -298,7 +297,7 @@
var/uplink_name = P ? P.name : "unknown PDA"
dat += "<b>Uplink found:</b> [uplink_name] [uplink_pw_revealed ? "(knows the passcode)" : "(does not know passcode)"]<br>"
dat += " - <a href='?src=\ref[antag];mind=\ref[antag];role=\ref[src];revealUplinkPW=1;'>(Reveal passcode)</a><br>"
dat += " - <a href='?src=\ref[antag];mind=\ref[antag];role=\ref[src];telecrystalsSet=1;'>Telecrystals: [uplink.telecrystals](Set telecrystals)</a><br>"
dat += " - <a href='?src=\ref[antag];mind=\ref[antag];role=\ref[src];telecrystalsSet=1;'>Telecrystals: [uplink.telecrystals] (Set telecrystals)</a><br>"
dat += " - <a href='?src=\ref[antag];mind=\ref[antag];role=\ref[src];removeuplink=1;'>(Remove uplink)</a><br>"
dat += " - <a href='?src=\ref[antag];mind=\ref[antag];role=\ref[src];jumpToUplink=1;'>(Jump to uplink's position)</a><br>"
else
Expand All @@ -311,7 +310,9 @@
evil = !evil
to_chat(usr, "<span class='notice'>The clone will now reincarnate as [evil ? "a traitor" : "a neutral clone"].</span>")
if(href_list["setAmnesia"])
amnesia = href_list["setAmnesia"]
var/new_amnesia = text2num(href_list["setAmnesia"])
if(new_amnesia < 0 || new_amnesia > 2)
return
to_chat(usr, "<span class='notice'>The clone's amnesia level has been set to [amnesia].</span>")
if(href_list["jumpToUplink"])
if(uplink)
Expand Down

0 comments on commit f4368b5

Please sign in to comment.