mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 17:52:36 +00:00
[MIRROR] Fully removes devil and affiliated shitcode (#922)
* Fully removes devil and affiliated shitcode (#53612) Its all over the place, messy, and overall a bad enough gamemode to be removed from rotation. A rework would have to tear out everything as is so there is no reason to allow the shitcode to live beyond tripping up everything. * Fully removes devil and affiliated shitcode * weh Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com> Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
@@ -16,89 +16,3 @@
|
||||
author = "Forces beyond your comprehension"
|
||||
unique = 1
|
||||
title = "the Codex Gigas"
|
||||
var/inUse = 0
|
||||
var/currentName = ""
|
||||
var/currentSection = PRE_TITLE
|
||||
|
||||
/obj/item/book/codex_gigas/attack_self(mob/user)
|
||||
if(!user.can_read(src))
|
||||
return FALSE
|
||||
if(inUse)
|
||||
to_chat(user, "<span class='notice'>Someone else is reading it.</span>")
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/U = user
|
||||
if(U.check_acedia())
|
||||
to_chat(user, "<span class='notice'>None of this matters, why are you reading this? You put [title] down.</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] opens [title] and begins reading intently.</span>")
|
||||
ask_name(user)
|
||||
|
||||
|
||||
/obj/item/book/codex_gigas/proc/perform_research(mob/user, devilName)
|
||||
if(!devilName)
|
||||
user.visible_message("<span class='notice'>[user] closes [title] without looking anything up.</span>")
|
||||
return
|
||||
inUse = TRUE
|
||||
var/speed = 300
|
||||
var/correctness = 85
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/U = user
|
||||
if(U.job in list("Curator")) // the curator is both faster, and more accurate than normal crew members at research
|
||||
speed = 100
|
||||
correctness = 100
|
||||
correctness -= U.getOrganLoss(ORGAN_SLOT_BRAIN) * 0.5 //Brain damage makes researching hard.
|
||||
speed += U.getOrganLoss(ORGAN_SLOT_BRAIN) * 3
|
||||
if(do_after(user, speed, 0, user))
|
||||
var/usedName = devilName
|
||||
if(!prob(correctness))
|
||||
usedName += "x"
|
||||
var/datum/antagonist/devil/devil = devilInfo(usedName)
|
||||
display_devil(devil, user, usedName)
|
||||
sleep(10)
|
||||
onclose(user, "book")
|
||||
inUse = FALSE
|
||||
|
||||
/obj/item/book/codex_gigas/proc/display_devil(datum/antagonist/devil/devil, mob/reader, devilName)
|
||||
reader << browse("Information on [devilName]<br><br><br>[GLOB.lawlorify[LORE][devil.ban]]<br>[GLOB.lawlorify[LORE][devil.bane]]<br>[GLOB.lawlorify[LORE][devil.obligation]]<br>[GLOB.lawlorify[LORE][devil.banish]]<br>[devil.ascendable?"This devil may ascend given enough souls.":""]", "window=book[window_size != null ? ";size=[window_size]" : ""]")
|
||||
|
||||
/obj/item/book/codex_gigas/proc/ask_name(mob/reader)
|
||||
ui_interact(reader)
|
||||
|
||||
/obj/item/book/codex_gigas/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
if(!action)
|
||||
return FALSE
|
||||
if(action == "search")
|
||||
SStgui.close_uis(src)
|
||||
INVOKE_ASYNC(src, .proc/perform_research, usr, currentName)
|
||||
currentName = ""
|
||||
currentSection = PRE_TITLE
|
||||
return FALSE
|
||||
else
|
||||
currentName += action
|
||||
var/oldSection = currentSection
|
||||
if(GLOB.devil_pre_title.Find(action))
|
||||
currentSection = TITLE
|
||||
else if(GLOB.devil_title.Find(action))
|
||||
currentSection = SYLLABLE
|
||||
else if(GLOB.devil_syllable.Find(action))
|
||||
if (currentSection>=SYLLABLE)
|
||||
currentSection = MULTIPLE_SYLLABLE
|
||||
else
|
||||
currentSection = SYLLABLE
|
||||
else if(GLOB.devil_suffix.Find(action))
|
||||
currentSection = SUFFIX
|
||||
return currentSection != oldSection
|
||||
|
||||
/obj/item/book/codex_gigas/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "CodexGigas", name)
|
||||
ui.open()
|
||||
|
||||
/obj/item/book/codex_gigas/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["name"]=currentName
|
||||
data["currentSection"]=currentSection
|
||||
return data
|
||||
|
||||
Reference in New Issue
Block a user