Skip to content

Commit

Permalink
удаляем смешные ризоны для ревы (#13520)
Browse files Browse the repository at this point in the history
* no rp rev

* empty proc

* useless define
  • Loading branch information
NinjaPikachuska committed Sep 8, 2024
1 parent c9b4025 commit 0ddc238
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 81 deletions.
1 change: 0 additions & 1 deletion code/__DEFINES/messages.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#define MAX_BOOK_MESSAGE_LEN 27648
#define MAX_NAME_LEN 26
#define MAX_LNAME_LEN 64
#define MAX_REV_REASON_LEN 255
#define MAX_MEDAL_REASON_LEN 128

//#define SHOWMSG_SELF
Expand Down
81 changes: 2 additions & 79 deletions code/game/gamemodes/factions/revolution.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
var/last_command_report = 0
var/tried_to_add_revheads = 0

//associative
var/list/reasons = list()

/datum/faction/revolution/proc/get_all_heads()
var/list/heads = list()
for(var/mob/living/carbon/human/player as anything in human_list)
Expand Down Expand Up @@ -245,71 +242,13 @@

return dat

/datum/faction/revolution/GetScoreboard()
var/count = 1
var/score_results = ""
if(objective_holder.objectives.len > 0)
score_results += "<ul>"
var/custom_result = custom_result()
score_results += custom_result
score_results += "<br><br>"
for(var/datum/objective/objective in objective_holder.GetObjectives())
objective.extra_info()
score_results += "<B>Objective #[count]</B>: [objective.explanation_text] [objective.completion_to_string()]"
feedback_add_details("[ID]_objective","[objective.type]|[objective.completion_to_string(FALSE)]")
count++
if(count <= objective_holder.objectives.len)
score_results += "<br>"
score_results += "</ul>"
score_results += "<ul>"

var/have_objectives = FALSE
var/have_reason_string = FALSE
if(reasons.len)
have_reason_string = TRUE

var/list/name_by_members = list()
score_results += "<FONT size = 2><B>Members:</B></FONT><br>"
for(var/datum/role/R in members)
if(!name_by_members[R.name])
name_by_members[R.name] = list()
name_by_members[R.name] += R

for(var/name in name_by_members)
score_results += "<b>[name]:</b><ul>"
for(var/datum/role/R in name_by_members[name])
var/results = R.GetScoreboard()
if(results)
score_results += results
score_results += "<br>"
if(R.objectives.objectives.len)
have_objectives = TRUE
if(have_reason_string)
var/reason_string = reasons[R.antag.key]
if(reason_string)
score_results += "<DD><B>Reason to join the revolution:</B> [reason_string]</DD><BR>"

score_results += "</ul>"

score_results += "</ul>"

if(!have_objectives)
score_results += "<br>"

return score_results

/datum/faction/revolution/proc/convert_revolutionare_by_invite(mob/possible_rev, mob/inviter)
if(!inviter)
return FALSE
var/datum/role/rev_leader/lead = get_member_by_mind(inviter.mind)
var/choice = tgui_alert(possible_rev, "Asked by [inviter]: Do you want to join the revolution?", "Join the Revolution!", list("No!","Yes!"))
if(choice == "Yes!")
var/reason_string = find_reason(possible_rev)
if(!reason_string)
to_chat(inviter, "<span class='bold warning'>[possible_rev] has no reason to support the revolution!</span>")
lead.rev_cooldown = world.time + 5 SECONDS
return FALSE
if(add_user_to_rev(possible_rev, reason_string))
if(add_user_to_rev(possible_rev))
to_chat(inviter, "<span class='bold_notice'>[possible_rev] has joined the revolution!</span>")
add_tc_to_headrev(inviter, lead)
return TRUE
Expand All @@ -321,24 +260,8 @@
lead.rev_cooldown = world.time + 5 SECONDS
return FALSE

/datum/faction/revolution/proc/convert_revolutionare(mob/possible_rev)
var/reason_string = find_reason(possible_rev)
if(!reason_string)
return FALSE
if(add_user_to_rev(possible_rev, reason_string))
return TRUE
return FALSE

/datum/faction/revolution/proc/find_reason(mob/user)
var/reason_string = sanitize_safe(input(user, "Please write the reason why you want to join the ranks of the revolution", "Write Reason") as null|message, MAX_REV_REASON_LEN)
if(!reason_string)
to_chat(user, "<span class='warning'>You have no reason to join the revolution!</span>")
return null
return reason_string

/datum/faction/revolution/proc/add_user_to_rev(mob/user, reason_string)
/datum/faction/revolution/proc/add_user_to_rev(mob/user)
if(add_faction_member(src, user, TRUE))
reasons[user.mind.key] = reason_string
to_chat(user, "<span class='notice'>You join the revolution!</span>")
return TRUE
return FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/decals/contraband.dm
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@
to_chat(user, "<span class='bold warning'>You can't overcome the guilt to join the revolutionaries. (You are banned.)</span>")
return
else if(!isrevhead(user) && !isrev(user))
rev.convert_revolutionare(user)
rev.add_user_to_rev(user)

/obj/structure/sign/poster/revolution/examine(mob/user)
. = ..()
Expand Down

0 comments on commit 0ddc238

Please sign in to comment.