mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Back up to date.
This commit is contained in:
@@ -1,584 +0,0 @@
|
||||
/*******************************************************************************************************
|
||||
Emotes
|
||||
Remember, only 1 instance of each emote is made, and used by all mobs that can access it. As such, the
|
||||
ONLY place you can safely set object variables during runtime is in New(). Otherwise override the emote.
|
||||
The only exception to this is custom emotes, which are created as needed and only last until they are finished
|
||||
VampyrBytes
|
||||
|
||||
*******************************************************************************************************/
|
||||
#define EMOTE_COOLDOWN 20 //Time in deciseconds that the cooldown lasts
|
||||
#define HEARING_RANGE 7
|
||||
#define INVALID -1 //Using -1 as I can't see how a negative number could be a valid input
|
||||
|
||||
/datum/emote
|
||||
var/name = ""
|
||||
var/desc = ""
|
||||
var/list/commands[0] // list of commands that trigger the emote.
|
||||
var/text = ""
|
||||
var/selfText = "" // the version of text that you should see - eg, if text is screams, you want scream here, as You screams is bad grammer
|
||||
var/startText = "" // if you need to put something in before [user]
|
||||
var/selfStart = 1 // whether the start text is used in what you see
|
||||
|
||||
var/audible = 0
|
||||
var/mimeText = ""
|
||||
var/mimeSelf = "" //self version of mimeText
|
||||
var/sound // sound file
|
||||
var/vol = 50
|
||||
var/muzzleAffected = 0 // whether being muzzled affects this emote
|
||||
var/muzzledNoise = "" // if the emote is audible and you're muzzled, this is what type of noise you make (eg weak, loud).
|
||||
var/cooldown = 0 // How long the cooldown should be on this emote. Defaults to EMOTE_COOLDOWN if not set and the emote plays a sound
|
||||
|
||||
var/restrained = 0 // 1 if being restrained prevents this emote
|
||||
|
||||
var/canTarget = 0 // 1 if the emote accepts a target
|
||||
var/targetMob = 0 // 0 if target can be any atom, 1 if it has to be a mob,
|
||||
var/mustTarget = 0 // 1 if the emote needs a target to work (won't get None as an option)
|
||||
var/targetText = "at" // what goes inbetween user and target
|
||||
var/takesNumber = 0 // 1 if the emote uses a number parameter
|
||||
|
||||
var/emoteSpanClass = "notice"
|
||||
var/userSpanClass = "em"
|
||||
var/baseLevel = 1
|
||||
var/allowParent = 0 // 1 if you want the parent available as well as this one
|
||||
|
||||
|
||||
/datum/emote/New()
|
||||
var/pathString = "[type]"
|
||||
var/count = 0
|
||||
for(var/i in 1 to lentext(pathString))
|
||||
var/char = copytext(pathString, i, i+1)
|
||||
if(char == "/")
|
||||
count++
|
||||
if(count == 4)
|
||||
baseLevel = 0
|
||||
break
|
||||
|
||||
if(sound && !cooldown)
|
||||
cooldown = EMOTE_COOLDOWN
|
||||
|
||||
if(targetText)
|
||||
if(!findtextEx(targetText, " ", lentext(targetText)))
|
||||
targetText += " "
|
||||
|
||||
/datum/emote/proc/doEmote(var/mob/user, var/command = "")
|
||||
if(!istype(user))
|
||||
return
|
||||
if(cooldown)
|
||||
if(handle_emote_CD(user))
|
||||
return
|
||||
|
||||
var/message = ""
|
||||
var/list/params[0]
|
||||
|
||||
params = getParams(user)
|
||||
|
||||
for(var/p in params)
|
||||
if(params[p] == INVALID)
|
||||
return
|
||||
|
||||
if(text)
|
||||
message = createMessage(user, params)
|
||||
|
||||
if(message)
|
||||
message = addExtras(user, params, message)
|
||||
. = processMessage(user, params, message)
|
||||
|
||||
if(!doMime(user) && (!muzzleAffected || !isMuzzled(user)))
|
||||
if(playSound(user, params))
|
||||
. = 2
|
||||
|
||||
doAction(user, params)
|
||||
|
||||
for(var/obj/item/weapon/implant/I in user)
|
||||
if(I.implanted)
|
||||
I.trigger(command, user)
|
||||
|
||||
return
|
||||
|
||||
// for things that the emote does that aren't text or sound based
|
||||
/datum/emote/proc/doAction(var/mob/user, var/list/params)
|
||||
return
|
||||
|
||||
/datum/emote/proc/getParams(var/mob/user)
|
||||
var/list/params[0]
|
||||
|
||||
if(takesNumber)
|
||||
user.set_typing_indicator(1)
|
||||
user.hud_typing = 1
|
||||
params["num"] = getNumber(user)
|
||||
user.hud_typing = 0
|
||||
user.set_typing_indicator(0)
|
||||
|
||||
if(canTarget)
|
||||
user.set_typing_indicator(1)
|
||||
user.hud_typing = 1
|
||||
params["target"] = getTarget(user)
|
||||
user.hud_typing = 0
|
||||
user.set_typing_indicator(0)
|
||||
return params
|
||||
|
||||
// return INVALID from either of these getters if you've tested the input and it's failed
|
||||
/datum/emote/proc/getNumber(var/mob/user)
|
||||
var/number = input("How many?", "Enter number") as null|num
|
||||
return number
|
||||
|
||||
/datum/emote/proc/getTarget(var/mob/user)
|
||||
if(user.sdisabilities & BLIND || user.blinded || user.paralysis)
|
||||
return
|
||||
var/list/targets = list()
|
||||
if(!mustTarget)
|
||||
targets += "None"
|
||||
var/target
|
||||
if(targetMob)
|
||||
target = getMobTarget(user, targets)
|
||||
else
|
||||
target = getAtomTarget(user, targets)
|
||||
if(!target)
|
||||
return INVALID
|
||||
if(target == "None")
|
||||
return
|
||||
return target
|
||||
|
||||
/datum/emote/proc/getMobTarget(var/mob/user, var/list/targets)
|
||||
for(var/mob/M in view(getLoc(user)))
|
||||
targets += M
|
||||
var/mob/target = input("Select target", "Target Mob") as null|anything in targets
|
||||
return target
|
||||
|
||||
|
||||
/datum/emote/proc/getAtomTarget(var/mob/user, var/list/targets)
|
||||
for(var/A in oview(getLoc(user)))
|
||||
if(ismob(A) || isobj(A) || isturf(A))
|
||||
targets += A
|
||||
var/atom/target = input("Select target", "Target") as null|anything in targets
|
||||
return target
|
||||
|
||||
// returns the reason the user can't currently do the emote
|
||||
/datum/emote/proc/prevented(var/mob/user)
|
||||
if(user.stat == DEAD)
|
||||
return "you are dead"
|
||||
if(user.stat == UNCONSCIOUS)
|
||||
return "you are unconscious"
|
||||
if(restrained && user.restrained())
|
||||
return "you are restrained"
|
||||
if(isbrain(user))
|
||||
var/mob/living/carbon/brain/brain = user
|
||||
if(!(brain.container && istype(brain.container, /obj/item/device/mmi)))
|
||||
return "you need to be in an mmi to do this"
|
||||
|
||||
// return 1 if this emote can be used by this type of user
|
||||
/datum/emote/proc/available(var/mob/user)
|
||||
return
|
||||
|
||||
/datum/emote/proc/createMessage(var/mob/user, var/list/params)
|
||||
if(!text)
|
||||
return
|
||||
var/message = ""
|
||||
|
||||
if(doMime(user))
|
||||
message = mimeMessage(user, params)
|
||||
if(message)
|
||||
return message
|
||||
|
||||
if(muzzleAffected && isMuzzled(user))
|
||||
message = muzzleMessage(user, params)
|
||||
return message
|
||||
|
||||
if(checkForParams(params))
|
||||
message = paramMessage(user, params)
|
||||
return message
|
||||
|
||||
message = standardMessage(user, params)
|
||||
|
||||
return message
|
||||
|
||||
/datum/emote/proc/isMuzzled(var/mob/user)
|
||||
if(user.sdisabilities & MUTE || user.is_muzzled())
|
||||
return 1
|
||||
if(!isliving(user))
|
||||
return
|
||||
var/mob/living/L = user
|
||||
if(L.silent)
|
||||
return 1
|
||||
|
||||
/datum/emote/proc/checkForParams(var/list/params)
|
||||
for(var/p in params)
|
||||
if(p == "target")
|
||||
continue
|
||||
return 1
|
||||
|
||||
/datum/emote/proc/addExtras(var/mob/user, var/list/params, var/message = "")
|
||||
if(!message)
|
||||
return
|
||||
if(startText)
|
||||
message = "[startText] [message]"
|
||||
message = addPunc(message)
|
||||
message = "<span class='[emoteSpanClass]'>[message]</span>"
|
||||
return message
|
||||
|
||||
/datum/emote/proc/addPunc(var/message = "")
|
||||
var/regex/endingPunc = new("\[\\.!\\?\"]$")
|
||||
if(!endingPunc.Find(message))
|
||||
message += "."
|
||||
return message
|
||||
|
||||
/datum/emote/proc/standardMessage(var/mob/user, var/list/params)
|
||||
var/message = "<span class='[userSpanClass]'>\The [user]</span> [text]"
|
||||
if("target" in params)
|
||||
message = addTarget(user, params, message)
|
||||
return message
|
||||
|
||||
/datum/emote/proc/mimeMessage(var/mob/user, var/list/params)
|
||||
if(!mimeText)
|
||||
return
|
||||
if(checkForParams(params))
|
||||
return paramMimeMessage(user, params)
|
||||
var/message = "<span class='[userSpanClass]'>\The [user]</span> [mimeText]"
|
||||
if(message && "target" in params)
|
||||
message = addTarget(user, params, message)
|
||||
return message
|
||||
|
||||
/datum/emote/proc/muzzleMessage(var/mob/user, var/list/params)
|
||||
var/message = "<span class='[userSpanClass]'>\The [user]</span> makes a "
|
||||
if(muzzledNoise)
|
||||
message += "[muzzledNoise] "
|
||||
message += "noise"
|
||||
return message
|
||||
|
||||
// if the emote takes a non target parameter, set up and return the with parameter version in here
|
||||
/datum/emote/proc/paramMessage(var/mob/user, var/list/params)
|
||||
return
|
||||
|
||||
// as above, but for mimes when there is mimeText
|
||||
/datum/emote/proc/paramMimeMessage(var/mob/user, var/list/params)
|
||||
return
|
||||
|
||||
/datum/emote/proc/addTarget(var/mob/user, var/list/params, var/message = "")
|
||||
if(!canTarget)
|
||||
return message
|
||||
if(!params["target"])
|
||||
return message
|
||||
if(params["target"] == user)
|
||||
message += " [targetText][getHimself(user)]"
|
||||
return message
|
||||
message += " [targetText]\the [params["target"]]"
|
||||
return message
|
||||
|
||||
|
||||
// What you should see when you perform the emote
|
||||
/datum/emote/proc/createSelfMessage(var/mob/user, var/list/params, var/message = "")
|
||||
if(!selfText)
|
||||
return message
|
||||
|
||||
message = replacetext(message, text, selfText)
|
||||
message = changeTextMacros(user, message)
|
||||
|
||||
if(mimeSelf)
|
||||
message = replacetext(message, mimeText, mimeSelf)
|
||||
|
||||
if(startText && !selfStart)
|
||||
var/start = findtextEx(message, startText)
|
||||
var/end = start + lentext(startText) + 1
|
||||
message = copytext(message, 1, start) + copytext(message, end, lentext(message) + 1)
|
||||
|
||||
message = replaceMobWithYou(user, message)
|
||||
|
||||
return message
|
||||
|
||||
/datum/emote/proc/replaceMobWithYou(var/mob/M, var/message = "", var/mob/user) // user passed in in case an override needs to do something different if M != user (see johnny) VB
|
||||
|
||||
message = replacetext(message, "\The [M]", "You")
|
||||
message = replacetext(message, "\the [M]", "you")
|
||||
|
||||
return message
|
||||
|
||||
/datum/emote/proc/processMessage(var/mob/user, var/list/params, var/message = "")
|
||||
var/visualOrAudible = audible + 1
|
||||
if(doMime(user))
|
||||
visualOrAudible = 1
|
||||
|
||||
log_emote("[user.name]/[user.key] : [message]")
|
||||
sendToDead(message)
|
||||
for(var/mob/M in getRecipients(getLoc(user, message), visualOrAudible))
|
||||
var/msg = ""
|
||||
|
||||
if(M==user)
|
||||
msg = createSelfMessage(user, params, message)
|
||||
if(msg)
|
||||
outputMessage(M, msg)
|
||||
continue
|
||||
|
||||
if(M.stat == UNCONSCIOUS || (M.sleeping && M.stat != DEAD))
|
||||
if(!visualOrAudible == 2)
|
||||
continue
|
||||
msg = "<span class='italics'>... You can almost hear someone talking ...</span>"
|
||||
outputMessage(M, msg)
|
||||
continue
|
||||
|
||||
if(M.sdisabilities & DEAF || M.ear_deaf)
|
||||
if(M.sdisabilities & BLIND || M.blinded || M.paralysis)
|
||||
continue
|
||||
if(!(M in getRecipients(user, 1)) || M.see_invisible < user.invisibility)
|
||||
continue
|
||||
|
||||
msg = createDeafMessage(user, params, message)
|
||||
if(!msg && visualOrAudible == 2)
|
||||
continue
|
||||
if(msg)
|
||||
outputMessage(M, msg)
|
||||
continue
|
||||
|
||||
if(M.sdisabilities & BLIND || M.blinded || M.paralysis || (M.see_invisible < user.invisibility && visualOrAudible == 2))
|
||||
if(!(M in getRecipients(user, 2)))
|
||||
continue
|
||||
|
||||
msg = createBlindMessage(user, params, message)
|
||||
if(!msg && visualOrAudible == 1)
|
||||
continue
|
||||
if(msg)
|
||||
outputMessage(M, msg)
|
||||
continue
|
||||
|
||||
if(M.see_invisible < user.invisibility && visualOrAudible == 1)
|
||||
continue
|
||||
|
||||
msg = message
|
||||
outputMessage(M, msg, user)
|
||||
|
||||
if(visualOrAudible == 2)
|
||||
handleListeningObjects(user, message)
|
||||
|
||||
return visualOrAudible
|
||||
|
||||
/datum/emote/proc/outputMessage(var/mob/M, var/msg = "", var/mob/user)
|
||||
msg = replaceMobWithYou(M, msg, user)
|
||||
to_chat(M, msg)
|
||||
|
||||
/datum/emote/proc/getLoc(var/mob/user, var/message = "")
|
||||
var/loc = checkForHolopad(user, message)
|
||||
if(loc)
|
||||
return loc
|
||||
return user
|
||||
|
||||
/datum/emote/proc/checkForHolopad(var/mob/user, var/message = "")
|
||||
if(!isAI(user))
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = user
|
||||
var/obj/machinery/hologram/holopad/T = AI.holo
|
||||
if(!(T && T.hologram && T.master == AI))
|
||||
return
|
||||
if(message)
|
||||
to_chat(AI, "<span class='game say'>Holopad action relayed, <span class='message'>[message]</span></span>")
|
||||
return T
|
||||
|
||||
/datum/emote/proc/handleListeningObjects(var/mob/user, var/message = "")
|
||||
// based on say code
|
||||
var/omsg = replacetext(message, "<B>[user]</B> ", "")
|
||||
var/list/listening_obj = new
|
||||
for(var/atom/movable/A in view(HEARING_RANGE, user))
|
||||
if(istype(A, /mob))
|
||||
var/mob/M = A
|
||||
for(var/obj/O in M.contents)
|
||||
listening_obj |= O
|
||||
else if(istype(A, /obj))
|
||||
var/obj/O = A
|
||||
listening_obj |= O
|
||||
for(var/obj/O in listening_obj)
|
||||
O.hear_message(user, omsg)
|
||||
|
||||
/datum/emote/proc/getRecipients(var/location, var/visualOrAudible)
|
||||
if(visualOrAudible == 1)
|
||||
return viewers(location)
|
||||
return get_mobs_in_view(HEARING_RANGE, location)
|
||||
|
||||
// set up different messages for blind people here. Empty will mean no message for
|
||||
//non-audible emotes and the standard message for audible ones
|
||||
/datum/emote/proc/createBlindMessage(var/mob/user, var/list/params, var/message)
|
||||
if(audible && selfText)
|
||||
message = "<span class='[userSpanClass]'>You</span> hear someone [selfText]"
|
||||
message = addExtras(message)
|
||||
return message
|
||||
|
||||
// set up different messages for deaf people here. Empty will mean no message for
|
||||
// audible emotes and standard for non-audible ones
|
||||
/datum/emote/proc/createDeafMessage(var/mob/user, var/list/params, var/message)
|
||||
message = mimeMessage(user, params)
|
||||
message = addExtras(message)
|
||||
return message
|
||||
|
||||
/datum/emote/proc/sendToDead(var/message = "")
|
||||
for(var/mob/M in dead_mob_list)
|
||||
if(!M.client || istype(M, /mob/new_player))
|
||||
continue //skip monkeys, leavers and new players
|
||||
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
|
||||
M.show_message(message)
|
||||
|
||||
/datum/emote/proc/playSound(var/mob/user, var/list/params)
|
||||
if(!sound)
|
||||
return
|
||||
playsound(user, sound, vol)
|
||||
return 1
|
||||
|
||||
/datum/emote/proc/doMime(var/mob/user)
|
||||
if(mimeText && user.mind && user.mind.miming)
|
||||
return 1
|
||||
|
||||
//Emote Cooldown System (it's so simple!)
|
||||
/datum/emote/proc/handle_emote_CD(var/mob/user)
|
||||
if(user.emote_cd == 2) return 1 // Cooldown emotes were disabled by an admin, prevent use
|
||||
if(user.emote_cd == 1) return 1 // Already on CD, prevent use
|
||||
|
||||
user.emote_cd = 1 // Starting cooldown
|
||||
|
||||
spawn(cooldown)
|
||||
if(user.emote_cd == 2) return 1 // Don't reset if cooldown emotes were disabled by an admin during the cooldown
|
||||
user.emote_cd = 0 // Cooldown complete, ready for more!
|
||||
|
||||
return 0 // Proceed with emote
|
||||
//--FalseIncarnate
|
||||
|
||||
/datum/emote/proc/changeTextMacros(var/mob/user, var/message = "")
|
||||
message = swapHisToYour(user, message)
|
||||
message = swapHimselfToYourself(user, message)
|
||||
return message
|
||||
|
||||
/datum/emote/proc/getHis(var/mob/user)
|
||||
var/his = "[user]\his"
|
||||
his = copytext(his, lentext("[user]") + 1)
|
||||
return his
|
||||
|
||||
/datum/emote/proc/swapHisToYour(var/mob/user, var/message = "")
|
||||
var/his = getHis(user)
|
||||
message = replacetext(message, " [his] ", " your ")
|
||||
return message
|
||||
|
||||
/datum/emote/proc/getHimself(var/mob/user)
|
||||
var/himself = "[user]\himself"
|
||||
himself = copytext(himself, lentext("[user]") + 1)
|
||||
return himself
|
||||
|
||||
/datum/emote/proc/swapHimselfToYourself(var/mob/user, var/message)
|
||||
var/himself = getHimself(user)
|
||||
message = replacetext(message, "[himself]", "yourself")
|
||||
return message
|
||||
|
||||
/******************************************************************************************
|
||||
Emote Verbs
|
||||
******************************************************************************************/
|
||||
|
||||
/datum/emote/proc/addVerbs(var/mob/user)
|
||||
if(!istype(user))
|
||||
return
|
||||
new /obj/emoteVerb(user, src, commands)
|
||||
|
||||
// Dummy object to allow access to the verb, needed as verbs require a valid loc for setting the src
|
||||
/obj/emoteVerb
|
||||
var/datum/emote/emote
|
||||
var/mob/owner
|
||||
|
||||
/obj/emoteVerb/New(var/mob/user, var/datum/emote/toAccess)
|
||||
if(!(istype(user)))
|
||||
return
|
||||
if(!(istype(toAccess)))
|
||||
return
|
||||
if(!toAccess.commands)
|
||||
return
|
||||
owner = user
|
||||
emote = toAccess
|
||||
name = "[emote]"
|
||||
loc = user
|
||||
user.verbs += new/obj/emoteVerb/proc/runEmote(src, emote.commands[1], emote.desc)
|
||||
|
||||
/obj/emoteVerb/proc/runEmote()
|
||||
set src = usr.contents
|
||||
set category = "Emotes"
|
||||
return usr.emoteHandler.runEmote(emote.commands[1])
|
||||
|
||||
/obj/emoteVerb/Destroy()
|
||||
owner.verbs -= new/obj/emoteVerb/proc/runEmote(src, emote.commands[1])
|
||||
..()
|
||||
|
||||
/obj/emoteVerb/custom
|
||||
|
||||
obj/emoteVerb/custom/New(var/mob/user)
|
||||
if(!(istype(user)))
|
||||
return
|
||||
owner = user
|
||||
name = "custom"
|
||||
user.verbs += new/obj/emoteVerb/proc/runEmote(src, "custom", "Make your own emote")
|
||||
|
||||
/obj/emoteVerb/custom/runEmote()
|
||||
set src = usr.contents
|
||||
set category = "Emotes"
|
||||
return usr.emoteHandler.runEmote("me")
|
||||
|
||||
|
||||
|
||||
/**************************************************************************************************************************
|
||||
Custom Emotes
|
||||
As these are made as needed, they aren't searched for the appropriate one. As such, you need to specify conditions for which
|
||||
one is used in /datum/emote_handler/customEmote().
|
||||
|
||||
***************************************************************************************************************************/
|
||||
|
||||
/datum/emote/custom
|
||||
name = "Custom emote"
|
||||
baseLevel = 0
|
||||
|
||||
/datum/emote/custom/New(var/mob/user, var/message = "", var/isAudible)
|
||||
if(!message)
|
||||
message = getMessage(user)
|
||||
text = message
|
||||
audible = isAudible
|
||||
|
||||
/datum/emote/custom/proc/getMessage(var/mob/user)
|
||||
// user.set_typing_indicator(1)
|
||||
// user.hud_typing = 1
|
||||
var/input = sanitize(copytext(input(user,"What do you want to emote?.", "Custom emote") as text|null,1,MAX_MESSAGE_LEN))
|
||||
// user.hud_typing = 0
|
||||
// user.set_typing_indicator(0)
|
||||
input = strip_html_properly(input)
|
||||
return input
|
||||
|
||||
/datum/emote/custom/available(var/mob/user)
|
||||
return 1
|
||||
|
||||
/datum/emote/custom/prevented(var/mob/user)
|
||||
if(!user.use_me)
|
||||
return "you are prevented from using custom emotes"
|
||||
|
||||
// Yeah, no
|
||||
/datum/emote/custom/createSelfMessage(var/mob/user, var/list/params, var/message = "")
|
||||
return
|
||||
|
||||
/datum/emote/custom/replaceMobWithYou(var/mob/M, var/message = "", var/mob/user)
|
||||
return message
|
||||
|
||||
/datum/emote/custom/ghost
|
||||
name = "Ghost emote"
|
||||
startText = "<span class='prefix'>DEAD: </span>"
|
||||
emoteSpanClass = "game deadsay"
|
||||
|
||||
/datum/emote/custom/ghost/prevented(var/mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(user.client.prefs.muted & MUTE_DEADCHAT)
|
||||
return "you are muted from deadchat"
|
||||
if(!(user.client.prefs.toggles & CHAT_DEAD))
|
||||
return "you have deadchat muted"
|
||||
if(!user.client.holder)
|
||||
if(!config.dsay_allowed)
|
||||
return "deadchat is globally muted"
|
||||
|
||||
/datum/emote/custom/ghost/getMessage(var/mob/user)
|
||||
var/input = sanitize(copytext(input(user,"What do you want to emote?.", "Custom emote") as text|null,1,MAX_MESSAGE_LEN))
|
||||
input = strip_html_properly(input)
|
||||
return input
|
||||
|
||||
/datum/emote/custom/ghost/processMessage(var/mob/user, var/list/params, var/message = "")
|
||||
if(!message)
|
||||
return
|
||||
log_emote("Ghost/[user.key] : [message]")
|
||||
sendToDead(message)
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
/datum/emoteHandler
|
||||
var/mob/owner
|
||||
var/list/commands
|
||||
|
||||
/datum/emoteHandler/New(var/mob/user)
|
||||
owner = user
|
||||
setupCommands()
|
||||
|
||||
/datum/emoteHandler/proc/setupCommands(var/reset = 0)
|
||||
spawn(0) // needed so at mob creation species is set before emotes are allocated
|
||||
if(reset)
|
||||
deleteEmoteVerbs()
|
||||
commands = new/list()
|
||||
for(var/e in emotes)
|
||||
var/datum/emote/emote = e
|
||||
if(emote.baseLevel || emote.allowParent)
|
||||
var/datum/emote/found = searchTree(emote)
|
||||
if(found)
|
||||
for(var/command in found.commands)
|
||||
commands[lowertext(command)] = found
|
||||
found.addVerbs(owner)
|
||||
|
||||
/datum/emoteHandler/proc/deleteEmoteVerbs()
|
||||
for(var/obj/emoteVerb/E in owner.contents)
|
||||
qdel(E)
|
||||
|
||||
/datum/emoteHandler/proc/runEmote(var/command = "", var/message = "", var/audible = 0) // message and audible only used in custom emotes
|
||||
if(!command)
|
||||
return 0
|
||||
if(command == "help")
|
||||
showCommands()
|
||||
return 1
|
||||
|
||||
var/datum/emote/emote
|
||||
|
||||
if(copytext(command, 1, 3) == "me" && !message && lentext(command) >= 4)
|
||||
message = copytext(command, 4)
|
||||
command = "me"
|
||||
|
||||
if(command == "me")
|
||||
emote = customEmote(message, audible)
|
||||
if(!emote)
|
||||
return 0
|
||||
|
||||
if(!commands[command] && !(command == "me"))
|
||||
to_chat(owner, "<span class='notice'>Unknown emote, please check *help for emotes available to your character</span>")
|
||||
return 0
|
||||
|
||||
if(!emote)
|
||||
emote = commands[command]
|
||||
|
||||
if(!emote.available(owner)) // something's changed, remake the commands list, then try again to see if they've got a different version
|
||||
setupCommands()
|
||||
return runEmote(command, message, audible)
|
||||
|
||||
var/prevented = emote.prevented(owner)
|
||||
if(prevented)
|
||||
to_chat(owner, "<span class='notice'>You can't do that because [prevented]!</span>")
|
||||
return 0
|
||||
return emote.doEmote(owner, command)
|
||||
|
||||
/datum/emoteHandler/proc/showCommands()
|
||||
var/emoteList = "Available emotes are "
|
||||
var/commandAdded = 0
|
||||
for(var/c in commands)
|
||||
if(commandAdded)
|
||||
emoteList += ", "
|
||||
emoteList += c
|
||||
commandAdded = 1
|
||||
|
||||
to_chat(owner, emoteList)
|
||||
|
||||
// recursive search of subtypes - starts checking at the lowest level and breaks out if it finds one that can be done
|
||||
/datum/emoteHandler/proc/searchTree(var/datum/emote/emote)
|
||||
var/list/subtypes = subtypesof(emote.type)
|
||||
var/datum/emote/found
|
||||
for(var/t in subtypes)
|
||||
var/datum/emote/em = new t
|
||||
if(em.allowParent)
|
||||
continue
|
||||
found = searchTree(em)
|
||||
if(found)
|
||||
return (found)
|
||||
if(emote.available(owner))
|
||||
return emote
|
||||
|
||||
/datum/emoteHandler/proc/customEmote(var/custom, var/audible)
|
||||
if(isobserver(owner))
|
||||
return new /datum/emote/custom/ghost(owner, custom, audible)
|
||||
return new /datum/emote/custom(owner, custom, audible)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -83,17 +83,17 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
|
||||
if(full_sync || supplied_laws.len)
|
||||
S.laws.clear_supplied_laws()
|
||||
|
||||
for (var/datum/ai_law/law in ion_laws)
|
||||
for(var/datum/ai_law/law in ion_laws)
|
||||
S.laws.add_ion_law(law.law)
|
||||
for (var/datum/ai_law/law in inherent_laws)
|
||||
for(var/datum/ai_law/law in inherent_laws)
|
||||
S.laws.add_inherent_law(law.law)
|
||||
for (var/datum/ai_law/law in supplied_laws)
|
||||
for(var/datum/ai_law/law in supplied_laws)
|
||||
if(law)
|
||||
S.laws.add_supplied_law(law.index, law.law)
|
||||
|
||||
|
||||
/mob/living/silicon/proc/sync_zeroth(var/datum/ai_law/zeroth_law, var/datum/ai_law/zeroth_law_borg)
|
||||
if (!is_special_character(src) || mind.original != src)
|
||||
if(!is_special_character(src) || mind.original != src)
|
||||
if(zeroth_law_borg)
|
||||
laws.set_zeroth_law(zeroth_law_borg.law)
|
||||
else if(zeroth_law)
|
||||
@@ -159,7 +159,7 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
|
||||
if(supplied_laws.len >= number && supplied_laws[number])
|
||||
delete_law(supplied_laws[number])
|
||||
|
||||
while (src.supplied_laws.len < number)
|
||||
while(src.supplied_laws.len < number)
|
||||
src.supplied_laws += ""
|
||||
if(state_supplied.len < supplied_laws.len)
|
||||
state_supplied += 1
|
||||
|
||||
+10
-10
@@ -20,13 +20,13 @@
|
||||
|
||||
user = nuser
|
||||
window_id = nwindow_id
|
||||
if (ntitle)
|
||||
if(ntitle)
|
||||
title = format_text(ntitle)
|
||||
if (nwidth)
|
||||
if(nwidth)
|
||||
width = nwidth
|
||||
if (nheight)
|
||||
if(nheight)
|
||||
height = nheight
|
||||
if (nref)
|
||||
if(nref)
|
||||
ref = nref
|
||||
add_stylesheet("common", 'html/browser/common.css') // this CSS sheet is common to all UIs
|
||||
|
||||
@@ -60,18 +60,18 @@
|
||||
/datum/browser/proc/get_header()
|
||||
var/key
|
||||
var/filename
|
||||
for (key in stylesheets)
|
||||
for(key in stylesheets)
|
||||
filename = "[ckey(key)].css"
|
||||
user << browse_rsc(stylesheets[key], filename)
|
||||
head_content += "<link rel='stylesheet' type='text/css' href='[filename]'>"
|
||||
|
||||
for (key in scripts)
|
||||
for(key in scripts)
|
||||
filename = "[ckey(key)].js"
|
||||
user << browse_rsc(scripts[key], filename)
|
||||
head_content += "<script type='text/javascript' src='[filename]'></script>"
|
||||
|
||||
var/title_attributes = "class='uiTitle'"
|
||||
if (title_image)
|
||||
if(title_image)
|
||||
title_attributes = "class='uiTitle icon' style='background-image: url([title_image]);'"
|
||||
|
||||
return {"<!DOCTYPE html>
|
||||
@@ -103,10 +103,10 @@
|
||||
|
||||
/datum/browser/proc/open(var/use_onclose = 1)
|
||||
var/window_size = ""
|
||||
if (width && height)
|
||||
if(width && height)
|
||||
window_size = "size=[width]x[height];"
|
||||
user << browse(get_content(), "window=[window_id];[window_size][window_options]")
|
||||
if (use_onclose)
|
||||
if(use_onclose)
|
||||
onclose(user, window_id, ref)
|
||||
|
||||
/datum/browser/proc/close()
|
||||
@@ -118,7 +118,7 @@
|
||||
/mob/proc/browse_rsc_icon(icon, icon_state, dir = -1)
|
||||
/*
|
||||
var/icon/I
|
||||
if (dir >= 0)
|
||||
if(dir >= 0)
|
||||
I = new /icon(icon, icon_state, dir)
|
||||
else
|
||||
I = new /icon(icon, icon_state)
|
||||
|
||||
Vendored
+1
-1
@@ -11,7 +11,7 @@ var/global/datum/repository/apc/apc_repository = new()
|
||||
if(world.time < cache_entry.timestamp)
|
||||
return cache_entry.data
|
||||
|
||||
if (powermonitor && !isnull(powermonitor.powernet))
|
||||
if(powermonitor && !isnull(powermonitor.powernet))
|
||||
var/list/L = list()
|
||||
for(var/obj/machinery/power/terminal/term in powermonitor.powernet.nodes)
|
||||
if(istype(term.master, /obj/machinery/power/apc))
|
||||
|
||||
Vendored
+1
-1
@@ -62,6 +62,6 @@ var/global/datum/repository/crew/crew_repository = new()
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
if(istype(H.w_uniform, /obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/C = H.w_uniform
|
||||
if (C.has_sensor)
|
||||
if(C.has_sensor)
|
||||
tracked |= C
|
||||
return tracked
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/real_title = assignment
|
||||
|
||||
for(var/datum/data/record/t in data_core.general)
|
||||
if (t)
|
||||
if(t)
|
||||
if(t.fields["name"] == name)
|
||||
foundrecord = t
|
||||
break
|
||||
@@ -66,6 +66,8 @@
|
||||
G.fields["sex"] = capitalize(H.gender)
|
||||
G.fields["species"] = H.get_species()
|
||||
G.fields["photo"] = get_id_photo(H)
|
||||
G.fields["photo-south"] = "'data:image/png;base64,[icon2base64(icon(G.fields["photo"], dir = SOUTH))]'"
|
||||
G.fields["photo-west"] = "'data:image/png;base64,[icon2base64(icon(G.fields["photo"], dir = WEST))]'"
|
||||
if(H.gen_record && !jobban_isbanned(H, "Records"))
|
||||
G.fields["notes"] = H.gen_record
|
||||
else
|
||||
@@ -129,7 +131,7 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
|
||||
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
|
||||
|
||||
var/g = "m"
|
||||
if (H.gender == FEMALE)
|
||||
if(H.gender == FEMALE)
|
||||
g = "f"
|
||||
|
||||
var/icon/icobase = H.species.icobase
|
||||
@@ -151,7 +153,7 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
|
||||
|
||||
// Skin tone
|
||||
if(H.species.bodyflags & HAS_SKIN_TONE)
|
||||
if (H.s_tone >= 0)
|
||||
if(H.s_tone >= 0)
|
||||
preview_icon.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD)
|
||||
else
|
||||
preview_icon.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
|
||||
|
||||
+24
-24
@@ -20,7 +20,7 @@
|
||||
title = "[A.name] (\ref[A]) = [A.type]"
|
||||
|
||||
#ifdef VARSICON
|
||||
if (A.icon)
|
||||
if(A.icon)
|
||||
body += debug_variable("icon", new/icon(A.icon, A.icon_state, A.dir), 0)
|
||||
#endif
|
||||
|
||||
@@ -43,11 +43,11 @@
|
||||
if(event.keyCode == 13){ //Enter / return
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
for( var i = 0; i < lis.length; ++i )
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.style.backgroundColor == "#ffee88" )
|
||||
if( li.style.backgroundColor == "#ffee88" )
|
||||
{
|
||||
alist = lis\[i\].getElementsByTagName("a")
|
||||
if(alist.length > 0){
|
||||
@@ -62,11 +62,11 @@
|
||||
if(event.keyCode == 38){ //Up arrow
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
for( var i = 0; i < lis.length; ++i )
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.style.backgroundColor == "#ffee88" )
|
||||
if( li.style.backgroundColor == "#ffee88" )
|
||||
{
|
||||
if( (i-1) >= 0){
|
||||
var li_new = lis\[i-1\];
|
||||
@@ -83,11 +83,11 @@
|
||||
if(event.keyCode == 40){ //Down arrow
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
for( var i = 0; i < lis.length; ++i )
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.style.backgroundColor == "#ffee88" )
|
||||
if( li.style.backgroundColor == "#ffee88" )
|
||||
{
|
||||
if( (i+1) < lis.length){
|
||||
var li_new = lis\[i+1\];
|
||||
@@ -113,11 +113,11 @@
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
for( var i = 0; i < lis.length; ++i )
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.innerText.toLowerCase().indexOf(filter) == -1 )
|
||||
if( li.innerText.toLowerCase().indexOf(filter) == -1 )
|
||||
{
|
||||
vars_ol.removeChild(li);
|
||||
i--;
|
||||
@@ -126,10 +126,10 @@
|
||||
}
|
||||
}
|
||||
var lis_new = vars_ol.getElementsByTagName("li");
|
||||
for ( var j = 0; j < lis_new.length; ++j )
|
||||
for( var j = 0; j < lis_new.length; ++j )
|
||||
{
|
||||
var li1 = lis\[j\];
|
||||
if (j == 0){
|
||||
if(j == 0){
|
||||
li1.style.backgroundColor = "#ffee88";
|
||||
}else{
|
||||
li1.style.backgroundColor = "white";
|
||||
@@ -293,18 +293,18 @@
|
||||
body += "<ol id='vars'>"
|
||||
|
||||
var/list/names = list()
|
||||
for (var/V in D.vars)
|
||||
for(var/V in D.vars)
|
||||
names += V
|
||||
|
||||
names = sortList(names)
|
||||
|
||||
for (var/V in names)
|
||||
for(var/V in names)
|
||||
body += debug_variable(V, D.vars[V], 0, D)
|
||||
|
||||
body += "</ol>"
|
||||
|
||||
var/html = "<html><head>"
|
||||
if (title)
|
||||
if(title)
|
||||
html += "<title>[title]</title>"
|
||||
html += {"<style>
|
||||
body
|
||||
@@ -342,13 +342,13 @@ body
|
||||
else
|
||||
html += "<li>"
|
||||
|
||||
if (isnull(value))
|
||||
if(isnull(value))
|
||||
html += "[name] = <span class='value'>null</span>"
|
||||
|
||||
else if (istext(value))
|
||||
else if(istext(value))
|
||||
html += "[name] = <span class='value'>\"[value]\"</span>"
|
||||
|
||||
else if (isicon(value))
|
||||
else if(isicon(value))
|
||||
#ifdef VARSICON
|
||||
var/icon/I = new/icon(value)
|
||||
var/rnd = rand(1,10000)
|
||||
@@ -359,7 +359,7 @@ body
|
||||
html += "[name] = /icon (<span class='value'>[value]</span>)"
|
||||
#endif
|
||||
|
||||
/* else if (istype(value, /image))
|
||||
/* else if(istype(value, /image))
|
||||
#ifdef VARSICON
|
||||
var/rnd = rand(1, 10000)
|
||||
var/image/I = value
|
||||
@@ -370,22 +370,22 @@ body
|
||||
html += "[name] = /image (<span class='value'>[value]</span>)"
|
||||
#endif
|
||||
*/
|
||||
else if (isfile(value))
|
||||
else if(isfile(value))
|
||||
html += "[name] = <span class='value'>'[value]'</span>"
|
||||
|
||||
else if (istype(value, /datum))
|
||||
else if(istype(value, /datum))
|
||||
var/datum/D = value
|
||||
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [D.type]"
|
||||
|
||||
else if (istype(value, /client))
|
||||
else if(istype(value, /client))
|
||||
var/client/C = value
|
||||
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [C] [C.type]"
|
||||
//
|
||||
else if (istype(value, /list))
|
||||
else if(istype(value, /list))
|
||||
var/list/L = value
|
||||
html += "[name] = /list ([L.len])"
|
||||
|
||||
if (L.len > 0 && !(name == "underlays" || name == "overlays" || name == "vars" || L.len > 500))
|
||||
if(L.len > 0 && !(name == "underlays" || name == "overlays" || name == "vars" || L.len > 500))
|
||||
// not sure if this is completely right...
|
||||
if(0) //(L.vars.len > 0)
|
||||
html += "<ol>"
|
||||
@@ -393,7 +393,7 @@ body
|
||||
else
|
||||
html += "<ul>"
|
||||
var/index = 1
|
||||
for (var/entry in L)
|
||||
for(var/entry in L)
|
||||
if(istext(entry))
|
||||
html += debug_variable(entry, L[entry], level + 1)
|
||||
//html += debug_variable("[index]", L[index], level + 1)
|
||||
|
||||
@@ -30,7 +30,7 @@ Bonus
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(4, 5)
|
||||
if (M.reagents.get_reagent_amount("salbutamol") < 20)
|
||||
if(M.reagents.get_reagent_amount("salbutamol") < 20)
|
||||
M.reagents.add_reagent("salbutamol", 20)
|
||||
else
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB * 5))
|
||||
|
||||
@@ -91,12 +91,12 @@ Bonus
|
||||
if(prob(15))
|
||||
M.reagents.add_reagent("morphine",rand(5,7))
|
||||
if(4)
|
||||
M.reagents.add_reagent_list(list("ethanol",rand(7,15),"lsd",rand(5,10)))
|
||||
M.reagents.add_reagent_list(list("ethanol"=rand(7,15),"lsd"=rand(5,10)))
|
||||
to_chat(M, "<span class='warning'><b>You try to focus on not dying.</b></span>")
|
||||
if(prob(20))
|
||||
M.reagents.add_reagent("morphine",rand(5,7))
|
||||
if(5)
|
||||
M.reagents.add_reagent_list(list("haloperidol",rand(5,15),"ethanol",rand(7,20),"lsd",rand(5,15)))
|
||||
M.reagents.add_reagent_list(list("haloperidol"=rand(5,15),"ethanol"=rand(7,20),"lsd"=rand(5,15)))
|
||||
to_chat(M, "<span class='warning'><b>u can count 2 potato!</b></span>")
|
||||
if(prob(25))
|
||||
M.reagents.add_reagent("morphine",rand(5,7))
|
||||
|
||||
@@ -30,7 +30,7 @@ Bonus
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(5)
|
||||
if (M.reagents.get_reagent_amount("ephedrine") < 10)
|
||||
if(M.reagents.get_reagent_amount("ephedrine") < 10)
|
||||
M.reagents.add_reagent("ephedrine", 10)
|
||||
else
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB * 5))
|
||||
|
||||
@@ -79,7 +79,7 @@ Bonus
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(4, 5)
|
||||
if (M.reagents.get_reagent_amount("oculine") < 20)
|
||||
if(M.reagents.get_reagent_amount("oculine") < 20)
|
||||
M.reagents.add_reagent("oculine", 20)
|
||||
else
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB * 5))
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
if(2)
|
||||
if(prob(5))
|
||||
affected_mob.emote(pick("twitch_s", "scream"))
|
||||
if (prob(5))
|
||||
if(prob(5))
|
||||
var/speak = pick("AAARRGGHHH!!!!", "GRR!!!", "FUCK!! FUUUUUUCK!!!", "FUCKING SHITCOCK!!", "WROOAAAGHHH!!")
|
||||
affected_mob.say(speak)
|
||||
if (prob(15))
|
||||
if(prob(15))
|
||||
affected_mob.visible_message("<span class='danger'>[affected_mob] twitches violently!</span>")
|
||||
affected_mob.drop_l_hand()
|
||||
affected_mob.drop_r_hand()
|
||||
if (prob(33))
|
||||
if(prob(33))
|
||||
if(affected_mob.incapacitated())
|
||||
affected_mob.visible_message("<span class='danger'>[affected_mob] spasms and twitches!</span>")
|
||||
return
|
||||
@@ -46,7 +46,7 @@
|
||||
if(M == affected_mob)
|
||||
continue
|
||||
var/damage = rand(1, 5)
|
||||
if (prob(80))
|
||||
if(prob(80))
|
||||
playsound(affected_mob.loc, "punch", 25, 1, -1)
|
||||
affected_mob.visible_message("<span class='danger'>[affected_mob] hits [M] with their thrashing!</span>")
|
||||
M.adjustBruteLoss(damage)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
return
|
||||
|
||||
/datum/disease/dnaspread/Destroy()
|
||||
if (original_dna && transformed && affected_mob)
|
||||
if(original_dna && transformed && affected_mob)
|
||||
original_dna.transfer_identity(affected_mob, transfer_SE = 1)
|
||||
affected_mob.real_name = affected_mob.dna.real_name
|
||||
affected_mob.updateappearance(mutcolor_update=1)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
if(prob(50))
|
||||
affected_mob.Jitter(25)
|
||||
if(2)
|
||||
if (prob(50))
|
||||
if(prob(50))
|
||||
affected_mob.visible_message("<span class='danger'>[affected_mob] laughs uncontrollably!</span>")
|
||||
affected_mob.Stun(10)
|
||||
affected_mob.Weaken(10)
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
if (prob(8))
|
||||
if(prob(8))
|
||||
to_chat(affected_mob, "<span class='danger'>Your head hurts.</span>")
|
||||
if (prob(9))
|
||||
if(prob(9))
|
||||
to_chat(affected_mob, "You feel a tingling sensation in your chest.")
|
||||
if (prob(9))
|
||||
if(prob(9))
|
||||
to_chat(affected_mob, "<span class='danger'>You feel angry.</span>")
|
||||
if(2)
|
||||
if(restcure)
|
||||
@@ -46,14 +46,14 @@
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
if (prob(8))
|
||||
if(prob(8))
|
||||
to_chat(affected_mob, "<span class='danger'>Your skin feels loose.</span>")
|
||||
if (prob(10))
|
||||
if(prob(10))
|
||||
to_chat(affected_mob, "You feel very strange.")
|
||||
if (prob(4))
|
||||
if(prob(4))
|
||||
to_chat(affected_mob, "<span class='danger'>You feel a stabbing pain in your head!</span>")
|
||||
affected_mob.Paralyse(2)
|
||||
if (prob(4))
|
||||
if(prob(4))
|
||||
to_chat(affected_mob, "<span class='danger'>Your stomach churns.</span>")
|
||||
if(3)
|
||||
if(restcure)
|
||||
@@ -61,10 +61,10 @@
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
if (prob(10))
|
||||
if(prob(10))
|
||||
to_chat(affected_mob, "<span class='danger'>Your entire body vibrates.</span>")
|
||||
|
||||
if (prob(35))
|
||||
if(prob(35))
|
||||
if(prob(50))
|
||||
scramble(1, affected_mob, rand(15, 45))
|
||||
else
|
||||
@@ -76,7 +76,7 @@
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
if (prob(60))
|
||||
if(prob(60))
|
||||
if(prob(50))
|
||||
scramble(1, affected_mob, rand(15, 45))
|
||||
else
|
||||
|
||||
@@ -21,16 +21,16 @@
|
||||
..()
|
||||
switch(stage)
|
||||
if(1)
|
||||
if (prob(stage_prob) && stage1)
|
||||
if(prob(stage_prob) && stage1)
|
||||
to_chat(affected_mob, pick(stage1))
|
||||
if(2)
|
||||
if (prob(stage_prob) && stage2)
|
||||
if(prob(stage_prob) && stage2)
|
||||
to_chat(affected_mob, pick(stage2))
|
||||
if(3)
|
||||
if (prob(stage_prob*2) && stage3)
|
||||
if(prob(stage_prob*2) && stage3)
|
||||
to_chat(affected_mob, pick(stage3))
|
||||
if(4)
|
||||
if (prob(stage_prob*2) && stage4)
|
||||
if(prob(stage_prob*2) && stage4)
|
||||
to_chat(affected_mob, pick(stage4))
|
||||
if(5)
|
||||
do_disease_transformation(affected_mob)
|
||||
@@ -134,13 +134,13 @@
|
||||
..()
|
||||
switch(stage)
|
||||
if(3)
|
||||
if (prob(8))
|
||||
if(prob(8))
|
||||
affected_mob.say(pick("Beep, boop", "beep, beep!", "Boop...bop"))
|
||||
if (prob(4))
|
||||
if(prob(4))
|
||||
to_chat(affected_mob, "<span class='danger'>You feel a stabbing pain in your head.</span>")
|
||||
affected_mob.Paralyse(2)
|
||||
if(4)
|
||||
if (prob(20))
|
||||
if(prob(20))
|
||||
affected_mob.say(pick("beep, beep!", "Boop bop boop beep.", "kkkiiiill mmme", "I wwwaaannntt tttoo dddiiieeee..."))
|
||||
|
||||
|
||||
@@ -165,11 +165,11 @@
|
||||
..()
|
||||
switch(stage)
|
||||
if(3)
|
||||
if (prob(4))
|
||||
if(prob(4))
|
||||
to_chat(affected_mob, "<span class='danger'>You feel a stabbing pain in your head.</span>")
|
||||
affected_mob.Paralyse(2)
|
||||
if(4)
|
||||
if (prob(20))
|
||||
if(prob(20))
|
||||
affected_mob.say(pick("You look delicious.", "Going to... devour you...", "Hsssshhhhh!"))
|
||||
|
||||
|
||||
@@ -221,10 +221,10 @@
|
||||
..()
|
||||
switch(stage)
|
||||
if(3)
|
||||
if (prob(8))
|
||||
if(prob(8))
|
||||
affected_mob.say(pick("YAP", "Woof!"))
|
||||
if(4)
|
||||
if (prob(20))
|
||||
if(prob(20))
|
||||
affected_mob.say(pick("Bark!", "AUUUUUU"))
|
||||
|
||||
/datum/disease/transformation/morph
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
proc/custom_action(step, used_atom, user)
|
||||
if(istype(used_atom, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = used_atom
|
||||
if (W.remove_fuel(0, user))
|
||||
if(W.remove_fuel(0, user))
|
||||
playsound(holder, 'sound/items/Welder2.ogg', 50, 1)
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
|
||||
/proc/preloadTemplates(path = "_maps/map_files/templates/") //see master controller setup
|
||||
var/list/filelist = flist(path)
|
||||
for(var/map in filelist)
|
||||
var/datum/map_template/T = new(path = "[path][map]", rename = "[map]")
|
||||
map_templates[T.name] = T
|
||||
for(var/map in flist(path))
|
||||
if(cmptext(copytext(map, length(map) - 3), ".dmm"))
|
||||
var/datum/map_template/T = new(path = "[path][map]", rename = "[map]")
|
||||
map_templates[T.name] = T
|
||||
+166
-149
@@ -147,27 +147,27 @@
|
||||
)
|
||||
var/text = ""
|
||||
var/mob/living/carbon/human/H = current
|
||||
if (istype(current, /mob/living/carbon/human))
|
||||
if(istype(current, /mob/living/carbon/human))
|
||||
/** Impanted**/
|
||||
if(isloyal(H))
|
||||
text = "Loyalty Implant:<a href='?src=\ref[src];implant=remove'>Remove</a>|<b>Implanted</b></br>"
|
||||
text = "Mindshield Implant:<a href='?src=\ref[src];implant=remove'>Remove</a>|<b>Implanted</b></br>"
|
||||
else
|
||||
text = "Loyalty Implant:<b>No Implant</b>|<a href='?src=\ref[src];implant=add'>Implant him!</a></br>"
|
||||
text = "Mindshield Implant:<b>No Implant</b>|<a href='?src=\ref[src];implant=add'>Implant him!</a></br>"
|
||||
sections["implant"] = text
|
||||
/** REVOLUTION ***/
|
||||
text = "revolution"
|
||||
if (ticker.mode.config_tag=="revolution")
|
||||
if(ticker.mode.config_tag=="revolution")
|
||||
text += uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (isloyal(H))
|
||||
if(isloyal(H))
|
||||
text += "<b>LOYAL EMPLOYEE</b>|headrev|rev"
|
||||
else if (src in ticker.mode.head_revolutionaries)
|
||||
else if(src in ticker.mode.head_revolutionaries)
|
||||
text = "<a href='?src=\ref[src];revolution=clear'>employee</a>|<b>HEADREV</b>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
|
||||
text += "<br>Flash: <a href='?src=\ref[src];revolution=flash'>give</a>"
|
||||
|
||||
var/list/L = current.get_contents()
|
||||
var/obj/item/device/flash/flash = locate() in L
|
||||
if (flash)
|
||||
if(flash)
|
||||
if(!flash.broken)
|
||||
text += "|<a href='?src=\ref[src];revolution=takeflash'>take</a>."
|
||||
else
|
||||
@@ -176,9 +176,9 @@
|
||||
text += "."
|
||||
|
||||
text += " <a href='?src=\ref[src];revolution=reequip'>Reequip</a> (gives traitor uplink)."
|
||||
if (objectives.len==0)
|
||||
if(objectives.len==0)
|
||||
text += "<br>Objectives are empty! <a href='?src=\ref[src];revolution=autoobjectives'>Set to kill all heads</a>."
|
||||
else if (src in ticker.mode.revolutionaries)
|
||||
else if(src in ticker.mode.revolutionaries)
|
||||
text += "<a href='?src=\ref[src];revolution=clear'>employee</a>|<a href='?src=\ref[src];revolution=headrev'>headrev</a>|<b>REV</b>"
|
||||
else
|
||||
text += "<b>EMPLOYEE</b>|<a href='?src=\ref[src];revolution=headrev'>headrev</a>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
|
||||
@@ -192,16 +192,16 @@
|
||||
|
||||
/** CULT ***/
|
||||
text = "cult"
|
||||
if (ticker.mode.config_tag=="cult")
|
||||
if(ticker.mode.config_tag=="cult")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (isloyal(H))
|
||||
if(isloyal(H))
|
||||
text += "<B>LOYAL EMPLOYEE</B>|cultist"
|
||||
else if (src in ticker.mode.cult)
|
||||
else if(src in ticker.mode.cult)
|
||||
text += "<a href='?src=\ref[src];cult=clear'>employee</a>|<b>CULTIST</b>"
|
||||
text += "<br>Give <a href='?src=\ref[src];cult=tome'>tome</a>|<a href='?src=\ref[src];cult=equip'>equip</a>."
|
||||
/*
|
||||
if (objectives.len==0)
|
||||
if(objectives.len==0)
|
||||
text += "<br>Objectives are empty! Set to sacrifice and <a href='?src=\ref[src];cult=escape'>escape</a> or <a href='?src=\ref[src];cult=summon'>summon</a>."
|
||||
*/
|
||||
else
|
||||
@@ -217,13 +217,13 @@
|
||||
|
||||
/** WIZARD ***/
|
||||
text = "wizard"
|
||||
if (ticker.mode.config_tag=="wizard")
|
||||
if(ticker.mode.config_tag=="wizard")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (src in ticker.mode.wizards)
|
||||
if(src in ticker.mode.wizards)
|
||||
text += "<b>YES</b>|<a href='?src=\ref[src];wizard=clear'>no</a>"
|
||||
text += "<br><a href='?src=\ref[src];wizard=lair'>To lair</a>, <a href='?src=\ref[src];common=undress'>undress</a>, <a href='?src=\ref[src];wizard=dressup'>dress up</a>, <a href='?src=\ref[src];wizard=name'>let choose name</a>."
|
||||
if (objectives.len==0)
|
||||
if(objectives.len==0)
|
||||
text += "<br>Objectives are empty! <a href='?src=\ref[src];wizard=autoobjectives'>Randomize!</a>"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];wizard=wizard'>yes</a>|<b>NO</b>"
|
||||
@@ -237,12 +237,12 @@
|
||||
|
||||
/** CHANGELING ***/
|
||||
text = "changeling"
|
||||
if (ticker.mode.config_tag=="changeling" || ticker.mode.config_tag=="traitorchan")
|
||||
if(ticker.mode.config_tag=="changeling" || ticker.mode.config_tag=="traitorchan")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (src in ticker.mode.changelings)
|
||||
if(src in ticker.mode.changelings)
|
||||
text += "<b>YES</b>|<a href='?src=\ref[src];changeling=clear'>no</a>"
|
||||
if (objectives.len==0)
|
||||
if(objectives.len==0)
|
||||
text += "<br>Objectives are empty! <a href='?src=\ref[src];changeling=autoobjectives'>Randomize!</a>"
|
||||
if( changeling && changeling.absorbed_dna.len && (current.real_name != changeling.absorbed_dna[1]) )
|
||||
text += "<br><a href='?src=\ref[src];changeling=initialdna'>Transform to initial appearance.</a>"
|
||||
@@ -258,16 +258,20 @@
|
||||
|
||||
/** VAMPIRE ***/
|
||||
text = "vampire"
|
||||
if (ticker.mode.config_tag=="vampire" || ticker.mode.config_tag=="traitorvamp")
|
||||
if(ticker.mode.config_tag=="vampire" || ticker.mode.config_tag=="traitorvamp")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (src in ticker.mode.vampires)
|
||||
if(src in ticker.mode.vampires)
|
||||
text += "<b>YES</b>|<a href='?src=\ref[src];vampire=clear'>no</a>"
|
||||
if (objectives.len==0)
|
||||
if(objectives.len==0)
|
||||
text += "<br>Objectives are empty! <a href='?src=\ref[src];vampire=autoobjectives'>Randomize!</a>"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];vampire=vampire'>yes</a>|<b>NO</b>"
|
||||
|
||||
if(current && current.client && (ROLE_VAMPIRE in current.client.prefs.be_special))
|
||||
text += "</b></i>|Enabled in Prefs<i><b>"
|
||||
else
|
||||
text += "</b></i>|Disabled in Prefs<i><b>"
|
||||
/** Enthralled ***/
|
||||
text += "<br><b>enthralled</b>"
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
@@ -282,18 +286,18 @@
|
||||
|
||||
/** NUCLEAR ***/
|
||||
text = "nuclear"
|
||||
if (ticker.mode.config_tag=="nuclear")
|
||||
if(ticker.mode.config_tag=="nuclear")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (src in ticker.mode.syndicates)
|
||||
if(src in ticker.mode.syndicates)
|
||||
text += "<b>OPERATIVE</b>|<a href='?src=\ref[src];nuclear=clear'>nanotrasen</a>"
|
||||
text += "<br><a href='?src=\ref[src];nuclear=lair'>To shuttle</a>, <a href='?src=\ref[src];common=undress'>undress</a>, <a href='?src=\ref[src];nuclear=dressup'>dress up</a>."
|
||||
var/code
|
||||
for (var/obj/machinery/nuclearbomb/bombue in machines)
|
||||
if (length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN")
|
||||
for(var/obj/machinery/nuclearbomb/bombue in machines)
|
||||
if(length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN")
|
||||
code = bombue.r_code
|
||||
break
|
||||
if (code)
|
||||
if(code)
|
||||
text += " Code is [code]. <a href='?src=\ref[src];nuclear=tellcode'>tell the code.</a>"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];nuclear=nuclear'>operative</a>|<b>NANOTRASEN</b>"
|
||||
@@ -307,15 +311,15 @@
|
||||
|
||||
/** TRAITOR ***/
|
||||
text = "traitor"
|
||||
if (ticker.mode.config_tag=="traitor" || ticker.mode.config_tag=="traitorchan" || ticker.mode.config_tag=="traitorvamp")
|
||||
if(ticker.mode.config_tag=="traitor" || ticker.mode.config_tag=="traitorchan" || ticker.mode.config_tag=="traitorvamp")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (isloyal(H))
|
||||
if(isloyal(H))
|
||||
text +="traitor|<b>LOYAL EMPLOYEE</b>"
|
||||
else
|
||||
if (src in ticker.mode.traitors)
|
||||
if(src in ticker.mode.traitors)
|
||||
text += "<b>TRAITOR</b>|<a href='?src=\ref[src];traitor=clear'>EMPLOYEE</a>"
|
||||
if (objectives.len==0)
|
||||
if(objectives.len==0)
|
||||
text += "<br>Objectives are empty! <a href='?src=\ref[src];traitor=autoobjectives'>Randomize</a>!"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];traitor=traitor'>traitor</a>|<b>EMPLOYEE</b>"
|
||||
@@ -368,53 +372,53 @@
|
||||
|
||||
/** SILICON ***/
|
||||
|
||||
if (istype(current, /mob/living/silicon))
|
||||
if(istype(current, /mob/living/silicon))
|
||||
text = "silicon"
|
||||
if (ticker.mode.config_tag=="malfunction")
|
||||
if(ticker.mode.config_tag=="malfunction")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (istype(current, /mob/living/silicon/ai))
|
||||
if (src in ticker.mode.malf_ai)
|
||||
if(istype(current, /mob/living/silicon/ai))
|
||||
if(src in ticker.mode.malf_ai)
|
||||
text += "<b>MALF</b>|<a href='?src=\ref[src];silicon=unmalf'>not malf</a>"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];silicon=malf'>malf</a>|<b>NOT MALF</b>"
|
||||
var/mob/living/silicon/robot/robot = current
|
||||
if (istype(robot) && robot.emagged)
|
||||
if(istype(robot) && robot.emagged)
|
||||
text += "<br>Cyborg: Is emagged! <a href='?src=\ref[src];silicon=unemag'>Unemag!</a><br>0th law: [robot.laws.zeroth_law]"
|
||||
var/mob/living/silicon/ai/ai = current
|
||||
if (istype(ai) && ai.connected_robots.len)
|
||||
if(istype(ai) && ai.connected_robots.len)
|
||||
var/n_e_robots = 0
|
||||
for (var/mob/living/silicon/robot/R in ai.connected_robots)
|
||||
if (R.emagged)
|
||||
for(var/mob/living/silicon/robot/R in ai.connected_robots)
|
||||
if(R.emagged)
|
||||
n_e_robots++
|
||||
text += "<br>[n_e_robots] of [ai.connected_robots.len] slaved cyborgs are emagged. <a href='?src=\ref[src];silicon=unemagcyborgs'>Unemag</a>"
|
||||
sections["malfunction"] = text
|
||||
|
||||
if (ticker.mode.config_tag == "traitorchan")
|
||||
if (sections["traitor"])
|
||||
if(ticker.mode.config_tag == "traitorchan")
|
||||
if(sections["traitor"])
|
||||
out += sections["traitor"]+"<br>"
|
||||
if (sections["changeling"])
|
||||
if(sections["changeling"])
|
||||
out += sections["changeling"]+"<br>"
|
||||
sections -= "traitor"
|
||||
sections -= "changeling"
|
||||
|
||||
if (ticker.mode.config_tag == "traitorvamp")
|
||||
if (sections["traitor"])
|
||||
if(ticker.mode.config_tag == "traitorvamp")
|
||||
if(sections["traitor"])
|
||||
out += sections["traitor"]+"<br>"
|
||||
if (sections["vampire"])
|
||||
if(sections["vampire"])
|
||||
out += sections["vampire"]+"<br>"
|
||||
sections -= "traitor"
|
||||
sections -= "vampire"
|
||||
else
|
||||
if (sections[ticker.mode.config_tag])
|
||||
if(sections[ticker.mode.config_tag])
|
||||
out += sections[ticker.mode.config_tag]+"<br>"
|
||||
sections -= ticker.mode.config_tag
|
||||
for (var/i in sections)
|
||||
if (sections[i])
|
||||
for(var/i in sections)
|
||||
if(sections[i])
|
||||
out += sections[i]+"<br>"
|
||||
|
||||
|
||||
if (((src in ticker.mode.head_revolutionaries) || \
|
||||
if(((src in ticker.mode.head_revolutionaries) || \
|
||||
(src in ticker.mode.traitors) || \
|
||||
(src in ticker.mode.syndicates)) && \
|
||||
istype(current,/mob/living/carbon/human) )
|
||||
@@ -422,11 +426,11 @@
|
||||
text = "Uplink: <a href='?src=\ref[src];common=uplink'>give</a>"
|
||||
var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink()
|
||||
var/crystals
|
||||
if (suplink)
|
||||
if(suplink)
|
||||
crystals = suplink.uses
|
||||
if (suplink)
|
||||
if(suplink)
|
||||
text += "|<a href='?src=\ref[src];common=takeuplink'>take</a>"
|
||||
if (usr.client.holder.rights & (R_SERVER|R_EVENT))
|
||||
if(usr.client.holder.rights & (R_SERVER|R_EVENT))
|
||||
text += ", <a href='?src=\ref[src];common=crystals'>[crystals]</a> crystals"
|
||||
else
|
||||
text += ", [crystals] crystals"
|
||||
@@ -439,7 +443,7 @@
|
||||
out += memory
|
||||
out += "<br><a href='?src=\ref[src];memory_edit=1'>Edit memory</a><br>"
|
||||
out += "Objectives:<br>"
|
||||
if (objectives.len == 0)
|
||||
if(objectives.len == 0)
|
||||
out += "EMPTY<br>"
|
||||
else
|
||||
var/obj_count = 1
|
||||
@@ -455,28 +459,28 @@
|
||||
/datum/mind/Topic(href, href_list)
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
if (href_list["role_edit"])
|
||||
if(href_list["role_edit"])
|
||||
var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in joblist
|
||||
if (!new_role) return
|
||||
if(!new_role) return
|
||||
assigned_role = new_role
|
||||
log_admin("[key_name(usr)] has changed [key_name(current)]'s assigned role to [assigned_role]")
|
||||
message_admins("[key_name_admin(usr)] has changed [key_name_admin(current)]'s assigned role to [assigned_role]")
|
||||
|
||||
else if (href_list["memory_edit"])
|
||||
else if(href_list["memory_edit"])
|
||||
var/new_memo = copytext(input("Write new memory", "Memory", memory) as null|message,1,MAX_MESSAGE_LEN)
|
||||
if (isnull(new_memo)) return
|
||||
if(isnull(new_memo)) return
|
||||
memory = new_memo
|
||||
log_admin("[key_name(usr)] has edited [key_name(current)]'s memory")
|
||||
message_admins("[key_name_admin(usr)] has edited [key_name_admin(current)]'s memory")
|
||||
|
||||
else if (href_list["obj_edit"] || href_list["obj_add"])
|
||||
else if(href_list["obj_edit"] || href_list["obj_add"])
|
||||
var/datum/objective/objective
|
||||
var/objective_pos
|
||||
var/def_value
|
||||
|
||||
if (href_list["obj_edit"])
|
||||
if(href_list["obj_edit"])
|
||||
objective = locate(href_list["obj_edit"])
|
||||
if (!objective) return
|
||||
if(!objective) return
|
||||
objective_pos = objectives.Find(objective)
|
||||
|
||||
//Text strings are easy to manipulate. Revised for simplicity.
|
||||
@@ -486,12 +490,12 @@
|
||||
def_value = "custom"
|
||||
|
||||
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "blood", "debrain", "protect", "prevent", "brig", "hijack", "escape", "survive", "steal", "download", "nuclear", "capture", "absorb", "destroy", "maroon", "identity theft", "custom")
|
||||
if (!new_obj_type) return
|
||||
if(!new_obj_type) return
|
||||
|
||||
var/datum/objective/new_objective = null
|
||||
|
||||
switch (new_obj_type)
|
||||
if ("assassinate","protect","debrain", "brig", "maroon")
|
||||
switch(new_obj_type)
|
||||
if("assassinate","protect","debrain", "brig", "maroon")
|
||||
//To determine what to name the objective in explanation text.
|
||||
var/objective_type_capital = uppertext(copytext(new_obj_type, 1,2))//Capitalize first letter.
|
||||
var/objective_type_text = copytext(new_obj_type, 2)//Leave the rest of the text.
|
||||
@@ -499,19 +503,19 @@
|
||||
|
||||
var/list/possible_targets = list("Free objective")
|
||||
for(var/datum/mind/possible_target in ticker.minds)
|
||||
if ((possible_target != src) && istype(possible_target.current, /mob/living/carbon/human))
|
||||
if((possible_target != src) && istype(possible_target.current, /mob/living/carbon/human))
|
||||
possible_targets += possible_target.current
|
||||
|
||||
var/mob/def_target = null
|
||||
var/objective_list[] = list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain)
|
||||
if (objective&&(objective.type in objective_list) && objective:target)
|
||||
if(objective&&(objective.type in objective_list) && objective:target)
|
||||
def_target = objective:target.current
|
||||
|
||||
var/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
|
||||
if (!new_target) return
|
||||
if(!new_target) return
|
||||
|
||||
var/objective_path = text2path("/datum/objective/[new_obj_type]")
|
||||
if (new_target == "Free objective")
|
||||
if(new_target == "Free objective")
|
||||
new_objective = new objective_path
|
||||
new_objective.owner = src
|
||||
new_objective:target = null
|
||||
@@ -523,7 +527,7 @@
|
||||
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
|
||||
new_objective.explanation_text = "[objective_type] [new_target:real_name], the [new_target:mind:assigned_role=="MODE" ? (new_target:mind:special_role) : (new_target:mind:assigned_role)]."
|
||||
|
||||
if ("destroy")
|
||||
if("destroy")
|
||||
var/list/possible_targets = active_ais(1)
|
||||
if(possible_targets.len)
|
||||
var/mob/new_target = input("Select target:", "Objective target") as null|anything in possible_targets
|
||||
@@ -534,38 +538,38 @@
|
||||
else
|
||||
to_chat(usr, "No active AIs with minds")
|
||||
|
||||
if ("prevent")
|
||||
if("prevent")
|
||||
new_objective = new /datum/objective/block
|
||||
new_objective.owner = src
|
||||
|
||||
if ("hijack")
|
||||
if("hijack")
|
||||
new_objective = new /datum/objective/hijack
|
||||
new_objective.owner = src
|
||||
|
||||
if ("escape")
|
||||
if("escape")
|
||||
new_objective = new /datum/objective/escape
|
||||
new_objective.owner = src
|
||||
|
||||
if ("survive")
|
||||
if("survive")
|
||||
new_objective = new /datum/objective/survive
|
||||
new_objective.owner = src
|
||||
|
||||
if ("die")
|
||||
if("die")
|
||||
new_objective = new /datum/objective/die
|
||||
new_objective.owner = src
|
||||
|
||||
if ("nuclear")
|
||||
if("nuclear")
|
||||
new_objective = new /datum/objective/nuclear
|
||||
new_objective.owner = src
|
||||
|
||||
if ("steal")
|
||||
if (!istype(objective, /datum/objective/steal))
|
||||
if("steal")
|
||||
if(!istype(objective, /datum/objective/steal))
|
||||
new_objective = new /datum/objective/steal
|
||||
new_objective.owner = src
|
||||
else
|
||||
new_objective = objective
|
||||
var/datum/objective/steal/steal = new_objective
|
||||
if (!steal.select_target())
|
||||
if(!steal.select_target())
|
||||
return
|
||||
|
||||
if("download","capture","absorb", "blood")
|
||||
@@ -574,7 +578,7 @@
|
||||
def_num = objective.target_amount
|
||||
|
||||
var/target_number = input("Input target number:", "Objective", def_num) as num|null
|
||||
if (isnull(target_number))//Ordinarily, you wouldn't need isnull. In this case, the value may already exist.
|
||||
if(isnull(target_number))//Ordinarily, you wouldn't need isnull. In this case, the value may already exist.
|
||||
return
|
||||
|
||||
switch(new_obj_type)
|
||||
@@ -596,11 +600,11 @@
|
||||
if("identity theft")
|
||||
var/list/possible_targets = list("Free objective")
|
||||
for(var/datum/mind/possible_target in ticker.minds)
|
||||
if ((possible_target != src) && istype(possible_target.current, /mob/living/carbon/human))
|
||||
if((possible_target != src) && istype(possible_target.current, /mob/living/carbon/human))
|
||||
possible_targets += possible_target.current
|
||||
|
||||
var/new_target = input("Select target:", "Objective target") as null|anything in possible_targets
|
||||
if (!new_target)
|
||||
if(!new_target)
|
||||
return
|
||||
var/datum/mind/targ = new_target
|
||||
if(!istype(targ))
|
||||
@@ -610,16 +614,16 @@
|
||||
new_objective.owner = src
|
||||
new_objective.target = new_target
|
||||
new_objective.explanation_text = "Escape on the shuttle or an escape pod with the identity of [targ.current.real_name], the [targ.assigned_role] while wearing their identification card."
|
||||
if ("custom")
|
||||
if("custom")
|
||||
var/expl = sanitize(copytext(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null,1,MAX_MESSAGE_LEN))
|
||||
if (!expl) return
|
||||
if(!expl) return
|
||||
new_objective = new /datum/objective
|
||||
new_objective.owner = src
|
||||
new_objective.explanation_text = expl
|
||||
|
||||
if (!new_objective) return
|
||||
if(!new_objective) return
|
||||
|
||||
if (objective)
|
||||
if(objective)
|
||||
objectives -= objective
|
||||
objectives.Insert(objective_pos, new_objective)
|
||||
else
|
||||
@@ -628,7 +632,7 @@
|
||||
log_admin("[key_name(usr)] has updated [key_name(current)]'s objectives: [new_objective]")
|
||||
message_admins("[key_name_admin(usr)] has updated [key_name_admin(current)]'s objectives: [new_objective]")
|
||||
|
||||
else if (href_list["obj_delete"])
|
||||
else if(href_list["obj_delete"])
|
||||
var/datum/objective/objective = locate(href_list["obj_delete"])
|
||||
if(!istype(objective)) return
|
||||
objectives -= objective
|
||||
@@ -653,38 +657,38 @@
|
||||
if(I && I.implanted)
|
||||
I.removed(H)
|
||||
qdel(I)
|
||||
to_chat(H, "\blue <Font size =3><B>Your loyalty implant has been deactivated.</B></FONT>")
|
||||
log_admin("[key_name(usr)] has deactivated [key_name(current)]'s loyalty implant")
|
||||
message_admins("[key_name_admin(usr)] has deactivated [key_name_admin(current)]'s loyalty implant")
|
||||
to_chat(H, "\blue <Font size =3><B>Your mindshield implant has been deactivated.</B></FONT>")
|
||||
log_admin("[key_name(usr)] has deactivated [key_name(current)]'s mindshield implant")
|
||||
message_admins("[key_name_admin(usr)] has deactivated [key_name_admin(current)]'s mindshield implant")
|
||||
if("add")
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
H.sec_hud_set_implants()
|
||||
|
||||
log_admin("[key_name(usr)] has given [key_name(current)] a loyalty implant")
|
||||
message_admins("[key_name_admin(usr)] has given [key_name_admin(current)] a loyalty implant")
|
||||
log_admin("[key_name(usr)] has given [key_name(current)] a mindshield implant")
|
||||
message_admins("[key_name_admin(usr)] has given [key_name_admin(current)] a mindshield implant")
|
||||
|
||||
to_chat(H, "\red <Font size =3><B>You somehow have become the recepient of a loyalty transplant, and it just activated!</B></FONT>")
|
||||
to_chat(H, "\red <Font size =3><B>You somehow have become the recepient of a mindshield transplant, and it just activated!</B></FONT>")
|
||||
if(src in ticker.mode.revolutionaries)
|
||||
special_role = null
|
||||
ticker.mode.revolutionaries -= src
|
||||
to_chat(src, "\red <Font size = 3><B>The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!</B></Font>")
|
||||
to_chat(src, "\red <Font size = 3><B>The nanobots in the mindshield implant remove all thoughts about being a revolutionary. Get back to work!</B></Font>")
|
||||
if(src in ticker.mode.head_revolutionaries)
|
||||
special_role = null
|
||||
ticker.mode.head_revolutionaries -=src
|
||||
to_chat(src, "\red <Font size = 3><B>The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!</B></Font>")
|
||||
to_chat(src, "\red <Font size = 3><B>The nanobots in the mindshield implant remove all thoughts about being a revolutionary. Get back to work!</B></Font>")
|
||||
if(src in ticker.mode.cult)
|
||||
ticker.mode.cult -= src
|
||||
ticker.mode.update_cult_icons_removed(src)
|
||||
special_role = null
|
||||
var/datum/game_mode/cult/cult = ticker.mode
|
||||
if (istype(cult))
|
||||
if(istype(cult))
|
||||
cult.memorize_cult_objectives(src)
|
||||
to_chat(current, "\red <FONT size = 3><B>The nanobots in the loyalty implant remove all thoughts about being in a cult. Have a productive day!</B></FONT>")
|
||||
to_chat(current, "\red <FONT size = 3><B>The nanobots in the mindshield implant remove all thoughts about being in a cult. Have a productive day!</B></FONT>")
|
||||
memory = ""
|
||||
|
||||
else if (href_list["revolution"])
|
||||
else if(href_list["revolution"])
|
||||
|
||||
switch(href_list["revolution"])
|
||||
if("clear")
|
||||
@@ -725,11 +729,11 @@
|
||||
to_chat(current, "\blue You are a member of the revolutionaries' leadership now!")
|
||||
else
|
||||
return
|
||||
if (ticker.mode.head_revolutionaries.len>0)
|
||||
if(ticker.mode.head_revolutionaries.len>0)
|
||||
// copy targets
|
||||
var/datum/mind/valid_head = locate() in ticker.mode.head_revolutionaries
|
||||
if (valid_head)
|
||||
for (var/datum/objective/mutiny/O in valid_head.objectives)
|
||||
if(valid_head)
|
||||
for(var/datum/objective/mutiny/O in valid_head.objectives)
|
||||
var/datum/objective/mutiny/rev_obj = new
|
||||
rev_obj.owner = src
|
||||
rev_obj.target = O.target
|
||||
@@ -749,7 +753,7 @@
|
||||
message_admins("[key_name_admin(usr)] has automatically forged revolutionary objectives for [key_name_admin(current)]")
|
||||
|
||||
if("flash")
|
||||
if (!ticker.mode.equip_revolutionary(current))
|
||||
if(!ticker.mode.equip_revolutionary(current))
|
||||
to_chat(usr, "\red Spawning flash failed!")
|
||||
log_admin("[key_name(usr)] has given [key_name(current)] a flash")
|
||||
message_admins("[key_name_admin(usr)] has given [key_name_admin(current)] a flash")
|
||||
@@ -757,7 +761,7 @@
|
||||
if("takeflash")
|
||||
var/list/L = current.get_contents()
|
||||
var/obj/item/device/flash/flash = locate() in L
|
||||
if (!flash)
|
||||
if(!flash)
|
||||
to_chat(usr, "\red Deleting flash failed!")
|
||||
qdel(flash)
|
||||
log_admin("[key_name(usr)] has taken [key_name(current)]'s flash")
|
||||
@@ -766,7 +770,7 @@
|
||||
if("repairflash")
|
||||
var/list/L = current.get_contents()
|
||||
var/obj/item/device/flash/flash = locate() in L
|
||||
if (!flash)
|
||||
if(!flash)
|
||||
to_chat(usr, "\red Repairing flash failed!")
|
||||
else
|
||||
flash.broken = 0
|
||||
@@ -781,13 +785,13 @@
|
||||
var/fail = 0
|
||||
fail |= !ticker.mode.equip_traitor(current, 1)
|
||||
fail |= !ticker.mode.equip_revolutionary(current)
|
||||
if (fail)
|
||||
if(fail)
|
||||
to_chat(usr, "\red Reequipping revolutionary goes wrong!")
|
||||
return
|
||||
log_admin("[key_name(usr)] has equipped [key_name(current)] as a revolutionary")
|
||||
message_admins("[key_name_admin(usr)] has equipped [key_name_admin(current)] as a revolutionary")
|
||||
|
||||
else if (href_list["cult"])
|
||||
else if(href_list["cult"])
|
||||
switch(href_list["cult"])
|
||||
if("clear")
|
||||
if(src in ticker.mode.cult)
|
||||
@@ -805,7 +809,7 @@
|
||||
message_admins("[key_name_admin(usr)] has culted [key_name_admin(current)]")
|
||||
if("tome")
|
||||
var/mob/living/carbon/human/H = current
|
||||
if (istype(H))
|
||||
if(istype(H))
|
||||
var/obj/item/weapon/tome/T = new(H)
|
||||
|
||||
var/list/slots = list (
|
||||
@@ -816,7 +820,7 @@
|
||||
"right hand" = slot_r_hand,
|
||||
)
|
||||
var/where = H.equip_in_one_of_slots(T, slots)
|
||||
if (!where)
|
||||
if(!where)
|
||||
to_chat(usr, "\red Spawning tome failed!")
|
||||
qdel(T)
|
||||
else
|
||||
@@ -825,12 +829,12 @@
|
||||
message_admins("[key_name_admin(usr)] has spawned a tome for [key_name_admin(current)]")
|
||||
|
||||
if("equip")
|
||||
if (!ticker.mode.equip_cultist(current))
|
||||
if(!ticker.mode.equip_cultist(current))
|
||||
to_chat(usr, "\red Spawning equipment failed!")
|
||||
log_admin("[key_name(usr)] has equipped [key_name(current)] as a cultist")
|
||||
message_admins("[key_name_admin(usr)] has equipped [key_name_admin(current)] as a cultist")
|
||||
|
||||
else if (href_list["wizard"])
|
||||
else if(href_list["wizard"])
|
||||
|
||||
switch(href_list["wizard"])
|
||||
if("clear")
|
||||
@@ -872,7 +876,7 @@
|
||||
message_admins("[key_name_admin(usr)] has automatically forged wizard objectives for [key_name_admin(current)]")
|
||||
|
||||
|
||||
else if (href_list["changeling"])
|
||||
else if(href_list["changeling"])
|
||||
switch(href_list["changeling"])
|
||||
if("clear")
|
||||
if(src in ticker.mode.changelings)
|
||||
@@ -911,7 +915,7 @@
|
||||
log_admin("[key_name(usr)] has reset [key_name(current)]'s DNA")
|
||||
message_admins("[key_name_admin(usr)] has reset [key_name_admin(current)]'s DNA")
|
||||
|
||||
else if (href_list["vampire"])
|
||||
else if(href_list["vampire"])
|
||||
switch(href_list["vampire"])
|
||||
if("clear")
|
||||
if(src in ticker.mode.vampires)
|
||||
@@ -945,7 +949,7 @@
|
||||
message_admins("[key_name_admin(usr)] has automatically forged objectives for [key_name_admin(current)]")
|
||||
|
||||
|
||||
else if (href_list["nuclear"])
|
||||
else if(href_list["nuclear"])
|
||||
var/mob/living/carbon/human/H = current
|
||||
|
||||
switch(href_list["nuclear"])
|
||||
@@ -954,7 +958,7 @@
|
||||
ticker.mode.syndicates -= src
|
||||
ticker.mode.update_synd_icons_removed(src)
|
||||
special_role = null
|
||||
for (var/datum/objective/nuclear/O in objectives)
|
||||
for(var/datum/objective/nuclear/O in objectives)
|
||||
objectives-=O
|
||||
to_chat(current, "\red <FONT size = 3><B>You have been brainwashed! You are no longer a syndicate operative!</B></FONT>")
|
||||
log_admin("[key_name(usr)] has de-nuke op'd [key_name(current)]")
|
||||
@@ -963,7 +967,7 @@
|
||||
if(!(src in ticker.mode.syndicates))
|
||||
ticker.mode.syndicates += src
|
||||
ticker.mode.update_synd_icons_added(src)
|
||||
if (ticker.mode.syndicates.len==1)
|
||||
if(ticker.mode.syndicates.len==1)
|
||||
ticker.mode.prepare_syndicate_leader(src)
|
||||
else
|
||||
current.real_name = "[syndicate_name()] Operative #[ticker.mode.syndicates.len-1]"
|
||||
@@ -990,7 +994,7 @@
|
||||
qdel(H.wear_suit)
|
||||
qdel(H.w_uniform)
|
||||
|
||||
if (!ticker.mode.equip_syndicate(current))
|
||||
if(!ticker.mode.equip_syndicate(current))
|
||||
to_chat(usr, "\red Equipping a syndicate failed!")
|
||||
return
|
||||
log_admin("[key_name(usr)] has equipped [key_name(current)] as a nuclear operative")
|
||||
@@ -998,11 +1002,11 @@
|
||||
|
||||
if("tellcode")
|
||||
var/code
|
||||
for (var/obj/machinery/nuclearbomb/bombue in machines)
|
||||
if (length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN")
|
||||
for(var/obj/machinery/nuclearbomb/bombue in machines)
|
||||
if(length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN")
|
||||
code = bombue.r_code
|
||||
break
|
||||
if (code)
|
||||
if(code)
|
||||
store_memory("<B>Syndicate Nuclear Bomb Code</B>: [code]", 0, 0)
|
||||
to_chat(current, "The nuclear authorization code is: <B>[code]</B>")
|
||||
log_admin("[key_name(usr)] has given [key_name(current)] the nuclear authorization code")
|
||||
@@ -1010,7 +1014,7 @@
|
||||
else
|
||||
to_chat(usr, "\red No valid nuke found!")
|
||||
|
||||
else if (href_list["traitor"])
|
||||
else if(href_list["traitor"])
|
||||
switch(href_list["traitor"])
|
||||
if("clear")
|
||||
if(src in ticker.mode.traitors)
|
||||
@@ -1113,7 +1117,7 @@
|
||||
else
|
||||
temp.equip_scientist(current)
|
||||
|
||||
else if (href_list["silicon"])
|
||||
else if(href_list["silicon"])
|
||||
switch(href_list["silicon"])
|
||||
if("unmalf")
|
||||
if(src in ticker.mode.malf_ai)
|
||||
@@ -1144,9 +1148,9 @@
|
||||
|
||||
if("unemag")
|
||||
var/mob/living/silicon/robot/R = current
|
||||
if (istype(R))
|
||||
if(istype(R))
|
||||
R.emagged = 0
|
||||
if (R.activated(R.module.emag))
|
||||
if(R.activated(R.module.emag))
|
||||
R.module_active = null
|
||||
if(R.module_state_1 == R.module.emag)
|
||||
R.module_state_1 = null
|
||||
@@ -1161,12 +1165,12 @@
|
||||
message_admins("[key_name_admin(usr)] has un-emagged [key_name_admin(current)]")
|
||||
|
||||
if("unemagcyborgs")
|
||||
if (istype(current, /mob/living/silicon/ai))
|
||||
if(istype(current, /mob/living/silicon/ai))
|
||||
var/mob/living/silicon/ai/ai = current
|
||||
for (var/mob/living/silicon/robot/R in ai.connected_robots)
|
||||
for(var/mob/living/silicon/robot/R in ai.connected_robots)
|
||||
R.emagged = 0
|
||||
if (R.module)
|
||||
if (R.activated(R.module.emag))
|
||||
if(R.module)
|
||||
if(R.activated(R.module.emag))
|
||||
R.module_active = null
|
||||
if(R.module_state_1 == R.module.emag)
|
||||
R.module_state_1 = null
|
||||
@@ -1180,7 +1184,7 @@
|
||||
log_admin("[key_name(usr)] has unemagged [key_name(ai)]'s cyborgs")
|
||||
message_admins("[key_name_admin(usr)] has unemagged [key_name_admin(ai)]'s cyborgs")
|
||||
|
||||
else if (href_list["common"])
|
||||
else if(href_list["common"])
|
||||
switch(href_list["common"])
|
||||
if("undress")
|
||||
if(ishuman(current))
|
||||
@@ -1199,25 +1203,25 @@
|
||||
log_admin("[key_name(usr)] has taken [key_name(current)]'s uplink")
|
||||
message_admins("[key_name_admin(usr)] has taken [key_name_admin(current)]'s uplink")
|
||||
if("crystals")
|
||||
if (usr.client.holder.rights & (R_SERVER|R_EVENT))
|
||||
if(usr.client.holder.rights & (R_SERVER|R_EVENT))
|
||||
var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink()
|
||||
var/crystals
|
||||
if (suplink)
|
||||
if(suplink)
|
||||
crystals = suplink.uses
|
||||
crystals = input("Amount of telecrystals for [key]","Syndicate uplink", crystals) as null|num
|
||||
if (!isnull(crystals))
|
||||
if (suplink)
|
||||
if(!isnull(crystals))
|
||||
if(suplink)
|
||||
suplink.uses = crystals
|
||||
log_admin("[key_name(usr)] has set [key_name(current)]'s telecrystals to [crystals]")
|
||||
message_admins("[key_name_admin(usr)] has set [key_name_admin(current)]'s telecrystals to [crystals]")
|
||||
if("uplink")
|
||||
if (!ticker.mode.equip_traitor(current, !(src in ticker.mode.traitors)))
|
||||
if(!ticker.mode.equip_traitor(current, !(src in ticker.mode.traitors)))
|
||||
to_chat(usr, "\red Equipping a syndicate failed!")
|
||||
return
|
||||
log_admin("[key_name(usr)] has given [key_name(current)] an uplink")
|
||||
message_admins("[key_name_admin(usr)] has given [key_name_admin(current)] an uplink")
|
||||
|
||||
else if (href_list["obj_announce"])
|
||||
else if(href_list["obj_announce"])
|
||||
var/obj_count = 1
|
||||
to_chat(current, "\blue Your current objectives:")
|
||||
for(var/datum/objective/objective in objectives)
|
||||
@@ -1233,16 +1237,16 @@
|
||||
|
||||
// remove traitor uplinks
|
||||
var/list/L = current.get_contents()
|
||||
for (var/t in L)
|
||||
if (istype(t, /obj/item/device/pda))
|
||||
if (t:uplink) qdel(t:uplink)
|
||||
for(var/t in L)
|
||||
if(istype(t, /obj/item/device/pda))
|
||||
if(t:uplink) qdel(t:uplink)
|
||||
t:uplink = null
|
||||
else if (istype(t, /obj/item/device/radio))
|
||||
if (t:traitorradio) qdel(t:traitorradio)
|
||||
else if(istype(t, /obj/item/device/radio))
|
||||
if(t:traitorradio) qdel(t:traitorradio)
|
||||
t:traitorradio = null
|
||||
t:traitor_frequency = 0.0
|
||||
else if (istype(t, /obj/item/weapon/SWF_uplink) || istype(t, /obj/item/weapon/syndicate_uplink))
|
||||
if (t:origradio)
|
||||
else if(istype(t, /obj/item/weapon/SWF_uplink) || istype(t, /obj/item/weapon/syndicate_uplink))
|
||||
if(t:origradio)
|
||||
var/obj/item/device/radio/R = t:origradio
|
||||
R.loc = current.loc
|
||||
R.traitorradio = null
|
||||
@@ -1261,8 +1265,8 @@
|
||||
|
||||
/datum/mind/proc/find_syndicate_uplink()
|
||||
var/list/L = current.get_contents()
|
||||
for (var/obj/item/I in L)
|
||||
if (I.hidden_uplink)
|
||||
for(var/obj/item/I in L)
|
||||
if(I.hidden_uplink)
|
||||
return I.hidden_uplink
|
||||
return null
|
||||
|
||||
@@ -1297,7 +1301,7 @@
|
||||
if(!(src in ticker.mode.syndicates))
|
||||
ticker.mode.syndicates += src
|
||||
ticker.mode.update_synd_icons_added(src)
|
||||
if (ticker.mode.syndicates.len==1)
|
||||
if(ticker.mode.syndicates.len==1)
|
||||
ticker.mode.prepare_syndicate_leader(src)
|
||||
else
|
||||
current.real_name = "[syndicate_name()] Operative #[ticker.mode.syndicates.len-1]"
|
||||
@@ -1362,7 +1366,7 @@
|
||||
to_chat(current, "<font color=\"purple\"><b><i>You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie.</b></i></font>")
|
||||
to_chat(current, "<font color=\"purple\"><b><i>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.</b></i></font>")
|
||||
var/datum/game_mode/cult/cult = ticker.mode
|
||||
if (istype(cult))
|
||||
if(istype(cult))
|
||||
cult.memorize_cult_objectives(src)
|
||||
else
|
||||
var/explanation = "Summon Nar-Sie via the use of the appropriate rune (Hell join self). It will only work if nine cultists stand on and around it."
|
||||
@@ -1372,7 +1376,7 @@
|
||||
current.memory += "The convert rune is join blood self<BR>"
|
||||
|
||||
var/mob/living/carbon/human/H = current
|
||||
if (istype(H))
|
||||
if(istype(H))
|
||||
var/obj/item/weapon/tome/T = new(H)
|
||||
|
||||
var/list/slots = list (
|
||||
@@ -1383,19 +1387,19 @@
|
||||
"right hand" = slot_r_hand,
|
||||
)
|
||||
var/where = H.equip_in_one_of_slots(T, slots)
|
||||
if (!where)
|
||||
if(!where)
|
||||
else
|
||||
to_chat(H, "A tome, a message from your new master, appears in your [where].")
|
||||
|
||||
if (!ticker.mode.equip_cultist(current))
|
||||
if(!ticker.mode.equip_cultist(current))
|
||||
to_chat(H, "Spawning an amulet from your Master failed.")
|
||||
|
||||
/datum/mind/proc/make_Rev()
|
||||
if (ticker.mode.head_revolutionaries.len>0)
|
||||
if(ticker.mode.head_revolutionaries.len>0)
|
||||
// copy targets
|
||||
var/datum/mind/valid_head = locate() in ticker.mode.head_revolutionaries
|
||||
if (valid_head)
|
||||
for (var/datum/objective/mutiny/O in valid_head.objectives)
|
||||
if(valid_head)
|
||||
for(var/datum/objective/mutiny/O in valid_head.objectives)
|
||||
var/datum/objective/mutiny/rev_obj = new
|
||||
rev_obj.owner = src
|
||||
rev_obj.target = O.target
|
||||
@@ -1516,6 +1520,19 @@
|
||||
spell.action.Grant(new_character)
|
||||
return
|
||||
|
||||
/datum/mind/proc/get_ghost(even_if_they_cant_reenter)
|
||||
for(var/mob/dead/observer/G in dead_mob_list)
|
||||
if(G.mind == src)
|
||||
if(G.can_reenter_corpse || even_if_they_cant_reenter)
|
||||
return G
|
||||
break
|
||||
|
||||
/datum/mind/proc/grab_ghost(force)
|
||||
var/mob/dead/observer/G = get_ghost(even_if_they_cant_reenter = force)
|
||||
. = G
|
||||
if(G)
|
||||
G.reenter_corpse()
|
||||
|
||||
//Initialisation procs
|
||||
/mob/proc/mind_initialize()
|
||||
if(mind)
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
|
||||
/datum/progressbar/New(mob/User, goal_number, atom/target)
|
||||
. = ..()
|
||||
if (!istype(target))
|
||||
if(!istype(target))
|
||||
EXCEPTION("Invalid target given")
|
||||
if (goal_number)
|
||||
if(goal_number)
|
||||
goal = goal_number
|
||||
bar = image('icons/effects/progessbar.dmi', target, "prog_bar_0")
|
||||
bar.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
||||
@@ -20,23 +20,23 @@
|
||||
|
||||
/datum/progressbar/proc/update(progress)
|
||||
// to_chat(world, "Update [progress] - [goal] - [(progress / goal)] - [((progress / goal) * 100)] - [round(((progress / goal) * 100), 5)]")
|
||||
if (!user || !user.client)
|
||||
if(!user || !user.client)
|
||||
shown = 0
|
||||
return
|
||||
if (user.client != client)
|
||||
if (client)
|
||||
if(user.client != client)
|
||||
if(client)
|
||||
client.images -= bar
|
||||
if (user.client)
|
||||
if(user.client)
|
||||
user.client.images += bar
|
||||
|
||||
progress = Clamp(progress, 0, goal)
|
||||
bar.icon_state = "prog_bar_[round(((progress / goal) * 100), 5)]"
|
||||
if (!shown)
|
||||
if(!shown)
|
||||
user.client.images += bar
|
||||
shown = 1
|
||||
|
||||
/datum/progressbar/Destroy()
|
||||
if (client)
|
||||
if(client)
|
||||
client.images -= bar
|
||||
qdel(bar)
|
||||
. = ..()
|
||||
+18
-18
@@ -44,14 +44,14 @@
|
||||
|
||||
/datum/recipe/proc/check_reagents(var/datum/reagents/avail_reagents) //1=precisely, 0=insufficiently, -1=superfluous
|
||||
. = 1
|
||||
for (var/r_r in reagents)
|
||||
for(var/r_r in reagents)
|
||||
var/aval_r_amnt = avail_reagents.get_reagent_amount(r_r)
|
||||
if (!(abs(aval_r_amnt - reagents[r_r])<0.5)) //if NOT equals
|
||||
if (aval_r_amnt>reagents[r_r])
|
||||
if(!(abs(aval_r_amnt - reagents[r_r])<0.5)) //if NOT equals
|
||||
if(aval_r_amnt>reagents[r_r])
|
||||
. = -1
|
||||
else
|
||||
return 0
|
||||
if ((reagents?(reagents.len):(0)) < avail_reagents.reagent_list.len)
|
||||
if((reagents?(reagents.len):(0)) < avail_reagents.reagent_list.len)
|
||||
return -1
|
||||
return .
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
/datum/recipe/proc/check_items(var/obj/container as obj)
|
||||
. = 1
|
||||
if (items && items.len)
|
||||
if(items && items.len)
|
||||
var/list/checklist = list()
|
||||
checklist = items.Copy() // You should really trust Copy
|
||||
for(var/obj/O in container)
|
||||
@@ -85,20 +85,20 @@
|
||||
var/found = 0
|
||||
for(var/i = 1; i < checklist.len+1; i++)
|
||||
var/item_type = checklist[i]
|
||||
if (istype(O,item_type))
|
||||
if(istype(O,item_type))
|
||||
checklist.Cut(i, i+1)
|
||||
found = 1
|
||||
break
|
||||
if (!found)
|
||||
if(!found)
|
||||
. = 0
|
||||
if (checklist.len)
|
||||
if(checklist.len)
|
||||
. = -1
|
||||
return .
|
||||
|
||||
//general version
|
||||
/datum/recipe/proc/make(var/obj/container as obj)
|
||||
var/obj/result_obj = new result(container)
|
||||
for (var/obj/O in (container.contents-result_obj))
|
||||
for(var/obj/O in (container.contents-result_obj))
|
||||
O.reagents.trans_to(result_obj, O.reagents.total_volume)
|
||||
qdel(O)
|
||||
container.reagents.clear_reagents()
|
||||
@@ -108,8 +108,8 @@
|
||||
// food-related
|
||||
/datum/recipe/proc/make_food(var/obj/container as obj)
|
||||
var/obj/result_obj = new result(container)
|
||||
for (var/obj/O in (container.contents-result_obj))
|
||||
if (O.reagents)
|
||||
for(var/obj/O in (container.contents-result_obj))
|
||||
if(O.reagents)
|
||||
O.reagents.del_reagent("nutriment")
|
||||
O.reagents.update_total()
|
||||
O.reagents.trans_to(result_obj, O.reagents.total_volume)
|
||||
@@ -119,22 +119,22 @@
|
||||
return result_obj
|
||||
|
||||
/proc/select_recipe(var/list/datum/recipe/avaiable_recipes, var/obj/obj as obj, var/exact = 1 as num)
|
||||
if (!exact)
|
||||
if(!exact)
|
||||
exact = -1
|
||||
var/list/datum/recipe/possible_recipes = new
|
||||
for (var/datum/recipe/recipe in avaiable_recipes)
|
||||
if (recipe.check_reagents(obj.reagents)==exact && recipe.check_items(obj)==exact && recipe.check_fruit(obj)==exact)
|
||||
for(var/datum/recipe/recipe in avaiable_recipes)
|
||||
if(recipe.check_reagents(obj.reagents)==exact && recipe.check_items(obj)==exact && recipe.check_fruit(obj)==exact)
|
||||
possible_recipes+=recipe
|
||||
if (possible_recipes.len==0)
|
||||
if(possible_recipes.len==0)
|
||||
return null
|
||||
else if (possible_recipes.len==1)
|
||||
else if(possible_recipes.len==1)
|
||||
return possible_recipes[1]
|
||||
else //okay, let's select the most complicated recipe
|
||||
var/highest_count = 0
|
||||
. = possible_recipes[1]
|
||||
for (var/datum/recipe/recipe in possible_recipes)
|
||||
for(var/datum/recipe/recipe in possible_recipes)
|
||||
var/count = ((recipe.items)?(recipe.items.len):0) + ((recipe.reagents)?(recipe.reagents.len):0) + ((recipe.fruit)?(recipe.fruit.len):0)
|
||||
if (count >= highest_count)
|
||||
if(count >= highest_count)
|
||||
highest_count = count
|
||||
. = recipe
|
||||
return .
|
||||
|
||||
@@ -60,7 +60,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.spell_list))
|
||||
to_chat(user, "<span class='warning'>You shouldn't have this spell! Something's wrong.</span>")
|
||||
return 0
|
||||
if (istype(user, /mob/living/carbon/human))
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/caster = user
|
||||
if(caster.remoteview_target)
|
||||
caster.remoteview_target = null
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/obj/effect/proc_holder/spell/targeted/touch/cluwne
|
||||
name = "Curse of the Cluwne"
|
||||
desc = "Turns the target into a fat and cursed monstrosity of a clown."
|
||||
hand_path = /obj/item/weapon/melee/touch_attack/cluwne
|
||||
|
||||
school = "transmutation"
|
||||
|
||||
charge_max = 600
|
||||
clothes_req = 1
|
||||
cooldown_min = 200 //100 deciseconds reduction per rank
|
||||
|
||||
action_icon_state = "clown"
|
||||
|
||||
/mob/living/carbon/human/proc/makeCluwne()
|
||||
to_chat(src, "<span class='danger'>You feel funny.</span>")
|
||||
adjustBrainLoss(80)
|
||||
nutrition = 9000
|
||||
overeatduration = 9000
|
||||
confused = 30
|
||||
if(mind)
|
||||
mind.assigned_role = "Cluwne"
|
||||
|
||||
var/obj/item/organ/internal/honktumor/cursed/tumor = new
|
||||
tumor.insert(src)
|
||||
mutations.Add(NERVOUS)
|
||||
dna.SetSEState(NERVOUSBLOCK, 1, 1)
|
||||
genemutcheck(src, NERVOUSBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
animate_clownspell(src)
|
||||
|
||||
unEquip(w_uniform, 1)
|
||||
unEquip(shoes, 1)
|
||||
unEquip(gloves, 1)
|
||||
if(!istype(wear_mask, /obj/item/clothing/mask/cursedclown)) //Infinite loops otherwise
|
||||
unEquip(wear_mask, 1)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/under/cursedclown, slot_w_uniform, 1, 1, 1)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/gloves/cursedclown, slot_gloves, 1, 1, 1)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/mask/cursedclown, slot_wear_mask, 1, 1, 1)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/shoes/cursedclown, slot_shoes, 1, 1, 1)
|
||||
real_name = "cluwne"
|
||||
|
||||
/mob/living/carbon/human/proc/makeAntiCluwne()
|
||||
to_chat(src, "<span class='danger'>You don't feel very funny.</span>")
|
||||
adjustBrainLoss(-120)
|
||||
nutrition = NUTRITION_LEVEL_STARVING
|
||||
overeatduration = 0
|
||||
confused = 0
|
||||
jitteriness = 0
|
||||
if(mind)
|
||||
mind.assigned_role = "Lawyer"
|
||||
|
||||
var/obj/item/organ/internal/honktumor/cursed/tumor = get_int_organ(/obj/item/organ/internal/honktumor/cursed)
|
||||
if(tumor)
|
||||
tumor.remove(src, clean_remove = 1)
|
||||
qdel(tumor)
|
||||
else
|
||||
mutations.Remove(CLUMSY)
|
||||
mutations.Remove(COMICBLOCK)
|
||||
dna.SetSEState(CLUMSYBLOCK,0)
|
||||
dna.SetSEState(COMICBLOCK,0)
|
||||
genemutcheck(src, CLUMSYBLOCK, null, MUTCHK_FORCED)
|
||||
genemutcheck(src, COMICBLOCK, null, MUTCHK_FORCED)
|
||||
mutations.Remove(NERVOUS)
|
||||
dna.SetSEState(NERVOUSBLOCK, 0)
|
||||
genemutcheck(src, NERVOUSBLOCK, null, MUTCHK_FORCED)
|
||||
|
||||
animate_clownspell(src)
|
||||
|
||||
var/obj/item/clothing/under/U = w_uniform
|
||||
unEquip(w_uniform, 1)
|
||||
if(U)
|
||||
qdel(U)
|
||||
|
||||
var/obj/item/clothing/shoes/S = shoes
|
||||
unEquip(shoes, 1)
|
||||
if(S)
|
||||
qdel(S)
|
||||
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/cursedclown))
|
||||
unEquip(wear_mask, 1)
|
||||
|
||||
if(istype(gloves, /obj/item/clothing/gloves/cursedclown))
|
||||
var/obj/item/clothing/gloves/G = gloves
|
||||
unEquip(gloves, 1)
|
||||
qdel(G)
|
||||
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/under/lawyer/black, slot_w_uniform, 1, 1, 1)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/shoes/black, slot_shoes, 1, 1, 1)
|
||||
@@ -106,7 +106,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/effect/dummy/spell_jaunt/relaymove(var/mob/user, direction)
|
||||
if (!src.canmove) return
|
||||
if(!src.canmove) return
|
||||
var/turf/newLoc = get_step(src,direction)
|
||||
if(!(newLoc.flags & NOJAUNT))
|
||||
loc = newLoc
|
||||
|
||||
@@ -24,9 +24,14 @@
|
||||
target:hulk_time=world.time + duration */
|
||||
target.sdisabilities |= sdisabilities
|
||||
target.update_mutations() //update target's mutation overlays
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(ishuman(target))
|
||||
H.update_body()
|
||||
spawn(duration)
|
||||
target.mutations.Remove(mutations)
|
||||
target.sdisabilities &= ~sdisabilities
|
||||
target.update_mutations()
|
||||
if(ishuman(target))
|
||||
H.update_body()
|
||||
|
||||
return
|
||||
@@ -34,14 +34,14 @@
|
||||
if(amt_dam_brute > 0)
|
||||
if(amt_dam_fire >= 0)
|
||||
target.take_overall_damage(amt_dam_brute,amt_dam_fire)
|
||||
else if (amt_dam_fire < 0)
|
||||
else if(amt_dam_fire < 0)
|
||||
target.take_overall_damage(amt_dam_brute,0)
|
||||
target.heal_overall_damage(0,amt_dam_fire)
|
||||
else if(amt_dam_brute < 0)
|
||||
if(amt_dam_fire > 0)
|
||||
target.take_overall_damage(0,amt_dam_fire)
|
||||
target.heal_overall_damage(amt_dam_brute,0)
|
||||
else if (amt_dam_fire <= 0)
|
||||
else if(amt_dam_fire <= 0)
|
||||
target.heal_overall_damage(amt_dam_brute,amt_dam_fire)
|
||||
target.adjustToxLoss(amt_dam_tox)
|
||||
target.oxyloss += amt_dam_oxy
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/obj/effect/proc_holder/spell/targeted/rathens
|
||||
name = "Rathen's Secret"
|
||||
desc = "Summons a powerful shockwave around you that tears the appendix and limbs off of enemies."
|
||||
charge_max = 500
|
||||
clothes_req = 1
|
||||
invocation = "ARSE NATH!"
|
||||
invocation_type = "shout"
|
||||
max_targets = 0
|
||||
range = 7
|
||||
cooldown_min = 200
|
||||
selection_type = "view"
|
||||
action_icon_state = "superfart"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/rathens/cast(list/targets, mob/user = usr)
|
||||
playsound(get_turf(user), 'sound/goonstation/effects/superfart.ogg', 25, 1)
|
||||
for(var/mob/living/carbon/human/H in targets)
|
||||
var/datum/effect/system/harmless_smoke_spread/s = new /datum/effect/system/harmless_smoke_spread
|
||||
s.set_up(5, 0, H)
|
||||
s.start()
|
||||
var/obj/item/organ/internal/appendix/A = H.get_int_organ(/obj/item/organ/internal/appendix)
|
||||
if(A)
|
||||
A.remove(H)
|
||||
A.forceMove(get_turf(H))
|
||||
spawn()
|
||||
A.throw_at(get_edge_target_turf(H, pick(alldirs)), rand(1, 10), 5)
|
||||
H.visible_message("<span class='danger'>[H]'s [A.name] flies out of their body in a magical explosion!</span>",\
|
||||
"<span class='danger'>Your [A.name] flies out of your body in a magical explosion!</span>")
|
||||
H.Weaken(2)
|
||||
else
|
||||
var/obj/effect/decal/cleanable/blood/gibs/G = new/obj/effect/decal/cleanable/blood/gibs(get_turf(H))
|
||||
spawn()
|
||||
G.throw_at(get_edge_target_turf(H, pick(alldirs)), rand(1, 10), 5)
|
||||
H.apply_damage(10, BRUTE, "chest")
|
||||
to_chat(H, "<span class='userdanger'>You have no appendix, but something had to give! Holy shit, what was that?</span>")
|
||||
H.Weaken(3)
|
||||
for(var/obj/item/organ/external/E in H.organs)
|
||||
if(istype(E, /obj/item/organ/external/head))
|
||||
continue
|
||||
if(istype(E, /obj/item/organ/external/chest))
|
||||
continue
|
||||
if(istype(E, /obj/item/organ/external/groin))
|
||||
continue
|
||||
if(prob(7))
|
||||
to_chat(H, "<span class='userdanger'>Your [E] was severed by the explosion!</span>")
|
||||
E.droplimb(1, DROPLIMB_EDGE, 0, 1)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/effect/proc_holder/spell/targeted/touch/
|
||||
var/hand_path = "/obj/item/weapon/melee/touch_attack"
|
||||
/obj/effect/proc_holder/spell/targeted/touch
|
||||
var/hand_path = /obj/item/weapon/melee/touch_attack
|
||||
var/obj/item/weapon/melee/touch_attack/attached_hand = null
|
||||
invocation_type = "none" //you scream on connecting, not summoning
|
||||
include_user = 1
|
||||
@@ -47,7 +47,7 @@
|
||||
/obj/effect/proc_holder/spell/targeted/touch/disintegrate
|
||||
name = "Disintegrate"
|
||||
desc = "This spell charges your hand with vile energy that can be used to violently explode victims."
|
||||
hand_path = "/obj/item/weapon/melee/touch_attack/disintegrate"
|
||||
hand_path = /obj/item/weapon/melee/touch_attack/disintegrate
|
||||
|
||||
school = "evocation"
|
||||
charge_max = 600
|
||||
@@ -59,11 +59,11 @@
|
||||
/obj/effect/proc_holder/spell/targeted/touch/flesh_to_stone
|
||||
name = "Flesh to Stone"
|
||||
desc = "This spell charges your hand with the power to turn victims into inert statues for a long period of time."
|
||||
hand_path = "/obj/item/weapon/melee/touch_attack/fleshtostone"
|
||||
hand_path = /obj/item/weapon/melee/touch_attack/fleshtostone
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 600
|
||||
clothes_req = 1
|
||||
cooldown_min = 200 //100 deciseconds reduction per rank
|
||||
|
||||
action_icon_state = "statue"
|
||||
action_icon_state = "statue"
|
||||
|
||||
@@ -53,6 +53,15 @@
|
||||
|
||||
action_icon_state = "mutate"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/genetic/mutate/cast(list/targets)
|
||||
for(var/mob/living/target in targets)
|
||||
target.dna.SetSEState(HULKBLOCK, 1)
|
||||
genemutcheck(target, HULKBLOCK, null, MUTCHK_FORCED)
|
||||
spawn(duration)
|
||||
target.dna.SetSEState(HULKBLOCK, 0)
|
||||
genemutcheck(target, HULKBLOCK, null, MUTCHK_FORCED)
|
||||
..()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/smoke
|
||||
name = "Smoke"
|
||||
desc = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
|
||||
|
||||
@@ -375,10 +375,10 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
|
||||
/////// Implants & etc
|
||||
|
||||
/datum/supply_packs/security/armory/loyalty
|
||||
name = "Loyalty Implants Crate"
|
||||
name = "Mindshield Implants Crate"
|
||||
contains = list (/obj/item/weapon/storage/lockbox/loyalty)
|
||||
cost = 40
|
||||
containername = "loyalty implant crate"
|
||||
containername = "mindshield implant crate"
|
||||
|
||||
/datum/supply_packs/security/armory/trackingimp
|
||||
name = "Tracking Implants Crate"
|
||||
@@ -1083,6 +1083,14 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
|
||||
cost = 10
|
||||
containername = "beekeeper suits"
|
||||
|
||||
//Bottler
|
||||
/datum/supply_packs/organic/bottler
|
||||
name = "Brewing Buddy Bottler Unit"
|
||||
contains = list(/obj/machinery/bottler,
|
||||
/obj/item/weapon/wrench)
|
||||
cost = 35
|
||||
containername = "bottler crate"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////// Materials ///////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -80,14 +80,14 @@ var/list/uplink_items = list()
|
||||
if(!istype(U))
|
||||
return 0
|
||||
|
||||
if (user.stat || user.restrained())
|
||||
if(user.stat || user.restrained())
|
||||
return 0
|
||||
|
||||
if (!(istype(user, /mob/living/carbon/human)))
|
||||
if(!(istype(user, /mob/living/carbon/human)))
|
||||
return 0
|
||||
|
||||
// If the uplink's holder is in the user's contents
|
||||
if ((U.loc in user.contents || (in_range(U.loc, user) && istype(U.loc.loc, /turf))))
|
||||
if((U.loc in user.contents || (in_range(U.loc, user) && istype(U.loc.loc, /turf))))
|
||||
user.set_machine(U)
|
||||
if(cost > U.uses)
|
||||
return 0
|
||||
@@ -101,9 +101,9 @@ var/list/uplink_items = list()
|
||||
|
||||
if(istype(I,/obj/item/weapon/storage/box/) && I.contents.len>0)
|
||||
for(var/atom/o in I)
|
||||
U.purchase_log += "<BIG>\icon[o]</BIG>"
|
||||
U.purchase_log += "<BIG>[bicon(o)]</BIG>"
|
||||
else
|
||||
U.purchase_log += "<BIG>\icon[I]</BIG>"
|
||||
U.purchase_log += "<BIG>[bicon(I)]</BIG>"
|
||||
|
||||
//U.interact(user)
|
||||
return 1
|
||||
@@ -378,6 +378,15 @@ var/list/uplink_items = list()
|
||||
gamemodes = list(/datum/game_mode/nuclear)
|
||||
surplus = 0
|
||||
|
||||
/datum/uplink_item/dangerous/sniper
|
||||
name = "Sniper Rifle"
|
||||
desc = "Ranged fury, Syndicate style. guaranteed to cause shock and awe or your TC back!"
|
||||
reference = "SSR"
|
||||
item = /obj/item/weapon/gun/projectile/automatic/sniper_rifle/syndicate
|
||||
cost = 16
|
||||
surplus = 25
|
||||
gamemodes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/dangerous/crossbow
|
||||
name = "Energy Crossbow"
|
||||
desc = "A miniature energy crossbow that is small enough both to fit into a pocket and to slip into a backpack unnoticed by observers. Fires bolts tipped with toxin, a poisonous substance that is the product of a living organism. Stuns enemies for a short period of time. Recharges automatically."
|
||||
@@ -620,6 +629,38 @@ var/list/uplink_items = list()
|
||||
gamemodes = list(/datum/game_mode/nuclear)
|
||||
surplus = 0
|
||||
|
||||
/datum/uplink_item/ammo/sniper
|
||||
cost = 4
|
||||
gamemodes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/ammo/sniper/basic
|
||||
name = ".50 Magazine"
|
||||
desc = "An additional standard 6-round magazine for use with .50 sniper rifles."
|
||||
reference = "50M"
|
||||
item = /obj/item/ammo_box/magazine/sniper_rounds
|
||||
|
||||
/datum/uplink_item/ammo/sniper/soporific
|
||||
name = ".50 Soporific Magazine"
|
||||
desc = "A 3-round magazine of soporific ammo designed for use with .50 sniper rifles. Put your enemies to sleep today!"
|
||||
reference = "50S"
|
||||
item = /obj/item/ammo_box/magazine/sniper_rounds/soporific
|
||||
cost = 6
|
||||
|
||||
/datum/uplink_item/ammo/sniper/haemorrhage
|
||||
name = ".50 Haemorrhage Magazine"
|
||||
desc = "A 5-round magazine of haemorrhage ammo designed for use with .50 sniper rifles; causes heavy bleeding \
|
||||
in the target."
|
||||
reference = "50B"
|
||||
item = /obj/item/ammo_box/magazine/sniper_rounds/haemorrhage
|
||||
|
||||
/datum/uplink_item/ammo/sniper/penetrator
|
||||
name = ".50 Penetrator Magazine"
|
||||
desc = "A 5-round magazine of penetrator ammo designed for use with .50 sniper rifles. \
|
||||
Can pierce walls and multiple enemies."
|
||||
reference = "50P"
|
||||
item = /obj/item/ammo_box/magazine/sniper_rounds/penetrator
|
||||
cost = 5
|
||||
|
||||
// STEALTHY WEAPONS
|
||||
|
||||
/datum/uplink_item/stealthy_weapons
|
||||
@@ -1220,7 +1261,7 @@ var/list/uplink_items = list()
|
||||
bought_items += I.item
|
||||
remaining_TC -= I.cost
|
||||
|
||||
U.purchase_log += "<BIG>\icon[C]</BIG>"
|
||||
U.purchase_log += "<BIG>[bicon(C)]</BIG>"
|
||||
for(var/item in bought_items)
|
||||
new item(C)
|
||||
U.purchase_log += "<BIG>\icon[item]</BIG>"
|
||||
U.purchase_log += "<BIG>[bicon(item)]</BIG>"
|
||||
|
||||
@@ -100,14 +100,15 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
|
||||
A.electrify(0)
|
||||
return // Don't update the dialog.
|
||||
|
||||
if (AIRLOCK_WIRE_SAFETY)
|
||||
if(AIRLOCK_WIRE_SAFETY)
|
||||
A.safe = mended
|
||||
|
||||
if(AIRLOCK_WIRE_SPEED)
|
||||
A.autoclose = mended
|
||||
if(mended)
|
||||
if(!A.density)
|
||||
A.close()
|
||||
spawn(0)
|
||||
A.close()
|
||||
|
||||
if(AIRLOCK_WIRE_LIGHT)
|
||||
A.lights = mended
|
||||
@@ -159,12 +160,16 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
|
||||
//will succeed only if the ID wire is cut or the door requires no access and it's not emagged
|
||||
if(A.emagged) return
|
||||
if(!A.requiresID() || A.check_access(null))
|
||||
if(A.density) A.open()
|
||||
else A.close()
|
||||
spawn(0)
|
||||
if(A.density)
|
||||
A.open()
|
||||
else
|
||||
A.close()
|
||||
if(AIRLOCK_WIRE_SAFETY)
|
||||
A.safe = !A.safe
|
||||
if(!A.density)
|
||||
A.close()
|
||||
spawn(0)
|
||||
A.close()
|
||||
|
||||
if(AIRLOCK_WIRE_SPEED)
|
||||
A.normalspeed = !A.normalspeed
|
||||
|
||||
@@ -35,8 +35,8 @@ var/const/AALARM_WIRE_AALARM = 16
|
||||
A.update_icon()
|
||||
// to_chat(world, "Power wire cut")
|
||||
|
||||
if (AALARM_WIRE_AI_CONTROL)
|
||||
if (A.aidisabled == !mended)
|
||||
if(AALARM_WIRE_AI_CONTROL)
|
||||
if(A.aidisabled == !mended)
|
||||
A.aidisabled = mended
|
||||
// to_chat(world, "AI Control Wire Cut")
|
||||
|
||||
@@ -47,7 +47,7 @@ var/const/AALARM_WIRE_AALARM = 16
|
||||
// to_chat(world, "Syphon Wire Cut")
|
||||
|
||||
if(AALARM_WIRE_AALARM)
|
||||
if (A.alarm_area.atmosalert(2, A))
|
||||
if(A.alarm_area.atmosalert(2, A))
|
||||
A.post_alert(2)
|
||||
A.update_icon()
|
||||
|
||||
@@ -58,7 +58,7 @@ var/const/AALARM_WIRE_AALARM = 16
|
||||
A.locked = !A.locked
|
||||
// to_chat(world, "Idscan wire pulsed")
|
||||
|
||||
if (AALARM_WIRE_POWER)
|
||||
if(AALARM_WIRE_POWER)
|
||||
// to_chat(world, "Power wire pulsed")
|
||||
if(A.shorted == 0)
|
||||
A.shorted = 1
|
||||
@@ -70,13 +70,13 @@ var/const/AALARM_WIRE_AALARM = 16
|
||||
A.update_icon()
|
||||
|
||||
|
||||
if (AALARM_WIRE_AI_CONTROL)
|
||||
if(AALARM_WIRE_AI_CONTROL)
|
||||
// to_chat(world, "AI Control wire pulsed")
|
||||
if (A.aidisabled == 0)
|
||||
if(A.aidisabled == 0)
|
||||
A.aidisabled = 1
|
||||
A.updateDialog()
|
||||
spawn(100)
|
||||
if (A.aidisabled == 1)
|
||||
if(A.aidisabled == 1)
|
||||
A.aidisabled = 0
|
||||
|
||||
if(AALARM_WIRE_SYPHON)
|
||||
@@ -89,6 +89,6 @@ var/const/AALARM_WIRE_AALARM = 16
|
||||
|
||||
if(AALARM_WIRE_AALARM)
|
||||
// to_chat(world, "Aalarm wire pulsed")
|
||||
if (A.alarm_area.atmosalert(0, A))
|
||||
if(A.alarm_area.atmosalert(0, A))
|
||||
A.post_alert(0)
|
||||
A.update_icon()
|
||||
|
||||
@@ -33,7 +33,7 @@ var/const/APC_WIRE_AI_CONTROL = 8
|
||||
A.locked = 1
|
||||
A.updateDialog()
|
||||
|
||||
if (APC_WIRE_MAIN_POWER1, APC_WIRE_MAIN_POWER2)
|
||||
if(APC_WIRE_MAIN_POWER1, APC_WIRE_MAIN_POWER2)
|
||||
if(A.shorted == 0)
|
||||
A.shorted = 1
|
||||
|
||||
@@ -42,8 +42,8 @@ var/const/APC_WIRE_AI_CONTROL = 8
|
||||
A.shorted = 0
|
||||
A.updateDialog()
|
||||
|
||||
if (APC_WIRE_AI_CONTROL)
|
||||
if (A.aidisabled == 0)
|
||||
if(APC_WIRE_AI_CONTROL)
|
||||
if(A.aidisabled == 0)
|
||||
A.aidisabled = 1
|
||||
|
||||
spawn(10)
|
||||
@@ -70,9 +70,9 @@ var/const/APC_WIRE_AI_CONTROL = 8
|
||||
if(APC_WIRE_AI_CONTROL)
|
||||
|
||||
if(!mended)
|
||||
if (A.aidisabled == 0)
|
||||
if(A.aidisabled == 0)
|
||||
A.aidisabled = 1
|
||||
else
|
||||
if (A.aidisabled == 1)
|
||||
if(A.aidisabled == 1)
|
||||
A.aidisabled = 0
|
||||
A.updateDialog()
|
||||
@@ -66,7 +66,7 @@ var/const/CAMERA_WIRE_NOTHING2 = 32
|
||||
C.light_disabled = !C.light_disabled
|
||||
|
||||
if(CAMERA_WIRE_ALARM)
|
||||
C.visible_message("\icon[C] *beep*", "\icon[C] *beep*")
|
||||
C.visible_message("[bicon(C)] *beep*", "[bicon(C)] *beep*")
|
||||
return
|
||||
|
||||
/datum/wires/camera/proc/CanDeconstruct()
|
||||
|
||||
@@ -28,15 +28,15 @@ var/const/WIRE_BEACON_RX = 256 // beacon ping recv
|
||||
/datum/wires/mulebot/UpdatePulsed(var/index)
|
||||
switch(index)
|
||||
if(WIRE_POWER1, WIRE_POWER2)
|
||||
holder.visible_message("\blue \icon[holder] The charge light flickers.")
|
||||
holder.visible_message("\blue [bicon(holder)] The charge light flickers.")
|
||||
if(WIRE_AVOIDANCE)
|
||||
holder.visible_message("\blue \icon[holder] The external warning lights flash briefly.")
|
||||
holder.visible_message("\blue [bicon(holder)] The external warning lights flash briefly.")
|
||||
if(WIRE_LOADCHECK)
|
||||
holder.visible_message("\blue \icon[holder] The load platform clunks.")
|
||||
holder.visible_message("\blue [bicon(holder)] The load platform clunks.")
|
||||
if(WIRE_MOTOR1, WIRE_MOTOR2)
|
||||
holder.visible_message("\blue \icon[holder] The drive motor whines briefly.")
|
||||
holder.visible_message("\blue [bicon(holder)] The drive motor whines briefly.")
|
||||
else
|
||||
holder.visible_message("\blue \icon[holder] You hear a radio crackle.")
|
||||
holder.visible_message("\blue [bicon(holder)] You hear a radio crackle.")
|
||||
|
||||
// HELPER PROCS
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ var/const/NUCLEARBOMB_WIRE_SAFETY = 4
|
||||
set_security_level(N.previous_level)
|
||||
N.visible_message("\blue The [N] quiets down.")
|
||||
if(!N.lighthack)
|
||||
if (N.icon_state == "nuclearbomb2")
|
||||
if(N.icon_state == "nuclearbomb2")
|
||||
N.icon_state = "nuclearbomb1"
|
||||
else
|
||||
N.visible_message("\blue The [N] emits a quiet whirling noise!")
|
||||
@@ -56,7 +56,7 @@ var/const/NUCLEARBOMB_WIRE_SAFETY = 4
|
||||
N.explode()
|
||||
if(NUCLEARBOMB_WIRE_TIMING)
|
||||
if(!N.lighthack)
|
||||
if (N.icon_state == "nuclearbomb2")
|
||||
if(N.icon_state == "nuclearbomb2")
|
||||
N.icon_state = "nuclearbomb1"
|
||||
N.timing = 0
|
||||
bomb_set = 0
|
||||
|
||||
@@ -28,7 +28,7 @@ var/const/PARTICLE_LIMIT_POWER_WIRE = 8 // Determines how strong the PA can be.
|
||||
C.interface_control = !C.interface_control
|
||||
|
||||
if(PARTICLE_LIMIT_POWER_WIRE)
|
||||
C.visible_message("\icon[C]<b>[C]</b> makes a large whirring noise.")
|
||||
C.visible_message("[bicon(C)]<b>[C]</b> makes a large whirring noise.")
|
||||
|
||||
/datum/wires/particle_acc/control_box/UpdateCut(var/index, var/mended)
|
||||
var/obj/machinery/particle_accelerator/control_box/C = holder
|
||||
|
||||
@@ -34,25 +34,25 @@ var/const/BORG_WIRE_LAWCHECK = 16 // Not used on MoMMIs
|
||||
switch(index)
|
||||
if(BORG_WIRE_LAWCHECK) //Cut the law wire, and the borg will no longer receive law updates from its AI
|
||||
if(!mended)
|
||||
if (R.lawupdate == 1)
|
||||
if(R.lawupdate == 1)
|
||||
to_chat(R, "LawSync protocol engaged.")
|
||||
R.show_laws()
|
||||
else
|
||||
if (R.lawupdate == 0 && !R.emagged)
|
||||
if(R.lawupdate == 0 && !R.emagged)
|
||||
R.lawupdate = 1
|
||||
|
||||
if (BORG_WIRE_AI_CONTROL) //Cut the AI wire to reset AI control
|
||||
if(BORG_WIRE_AI_CONTROL) //Cut the AI wire to reset AI control
|
||||
if(!mended)
|
||||
if (R.connected_ai)
|
||||
if(R.connected_ai)
|
||||
R.connected_ai = null
|
||||
|
||||
if (BORG_WIRE_CAMERA)
|
||||
if(BORG_WIRE_CAMERA)
|
||||
if(!isnull(R.camera) && !R.scrambledcodes)
|
||||
R.camera.status = mended
|
||||
R.camera.toggle_cam(usr, 0) // Will kick anyone who is watching the Cyborg's camera.
|
||||
|
||||
if(BORG_WIRE_LAWCHECK) //Forces a law update if the borg is set to receive them. Since an update would happen when the borg checks its laws anyway, not much use, but eh
|
||||
if (R.lawupdate)
|
||||
if(R.lawupdate)
|
||||
R.lawsync()
|
||||
|
||||
if(BORG_WIRE_LOCKED_DOWN)
|
||||
@@ -63,12 +63,12 @@ var/const/BORG_WIRE_LAWCHECK = 16 // Not used on MoMMIs
|
||||
|
||||
var/mob/living/silicon/robot/R = holder
|
||||
switch(index)
|
||||
if (BORG_WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI
|
||||
if(BORG_WIRE_AI_CONTROL) //pulse the AI wire to make the borg reselect an AI
|
||||
if(!R.emagged)
|
||||
R.connected_ai = select_active_ai()
|
||||
R.notify_ai(1)
|
||||
|
||||
if (BORG_WIRE_CAMERA)
|
||||
if(BORG_WIRE_CAMERA)
|
||||
if(!isnull(R.camera) && R.camera.can_use() && !R.scrambledcodes)
|
||||
R.camera.toggle_cam(usr, 0) // Kick anyone watching the Cyborg's camera, doesn't display you disconnecting the camera.
|
||||
R.visible_message("[R]'s camera lense focuses loudly.")
|
||||
|
||||
@@ -20,32 +20,32 @@ var/const/WIRE_ACTIVATE = 16 // Will start a bombs timer if pulsed, will hint if
|
||||
var/obj/machinery/syndicatebomb/P = holder
|
||||
switch(index)
|
||||
if(WIRE_BOOM)
|
||||
if (P.active)
|
||||
P.loc.visible_message("<span class='danger'>\icon[holder] An alarm sounds! It's go-</span>")
|
||||
if(P.active)
|
||||
P.loc.visible_message("<span class='danger'>[bicon(holder)] An alarm sounds! It's go-</span>")
|
||||
P.timer = 0
|
||||
if(WIRE_UNBOLT)
|
||||
P.loc.visible_message("<span class='notice'>\icon[holder] The bolts spin in place for a moment.</span>")
|
||||
P.loc.visible_message("<span class='notice'>[bicon(holder)] The bolts spin in place for a moment.</span>")
|
||||
if(WIRE_DELAY)
|
||||
playsound(P.loc, 'sound/machines/chime.ogg', 30, 1)
|
||||
P.loc.visible_message("<span class='notice'>\icon[holder] The bomb chirps.</span>")
|
||||
P.loc.visible_message("<span class='notice'>[bicon(holder)] The bomb chirps.</span>")
|
||||
P.timer += 10
|
||||
if(WIRE_PROCEED)
|
||||
playsound(P.loc, 'sound/machines/buzz-sigh.ogg', 30, 1)
|
||||
P.loc.visible_message("<span class='danger'>\icon[holder] The bomb buzzes ominously!</span>")
|
||||
if (P.timer >= 61) //Long fuse bombs can suddenly become more dangerous if you tinker with them
|
||||
P.loc.visible_message("<span class='danger'>[bicon(holder)] The bomb buzzes ominously!</span>")
|
||||
if(P.timer >= 61) //Long fuse bombs can suddenly become more dangerous if you tinker with them
|
||||
P.timer = 60
|
||||
if (P.timer >= 21)
|
||||
if(P.timer >= 21)
|
||||
P.timer -= 10
|
||||
else if (P.timer >= 11) //both to prevent negative timers and to have a little mercy
|
||||
else if(P.timer >= 11) //both to prevent negative timers and to have a little mercy
|
||||
P.timer = 10
|
||||
if(WIRE_ACTIVATE)
|
||||
if(!P.active && !P.defused)
|
||||
playsound(P.loc, 'sound/machines/click.ogg', 30, 1)
|
||||
P.loc.visible_message("<span class='danger'>\icon[holder] You hear the bomb start ticking!</span>")
|
||||
P.loc.visible_message("<span class='danger'>[bicon(holder)] You hear the bomb start ticking!</span>")
|
||||
P.active = 1
|
||||
P.icon_state = "[initial(P.icon_state)]-active[P.open_panel ? "-wires" : ""]"
|
||||
else
|
||||
P.loc.visible_message("<span class='notice'>\icon[holder] The bomb seems to hesitate for a moment.</span>")
|
||||
P.loc.visible_message("<span class='notice'>[bicon(holder)] The bomb seems to hesitate for a moment.</span>")
|
||||
P.timer += 5
|
||||
|
||||
/datum/wires/syndicatebomb/UpdateCut(var/index, var/mended)
|
||||
@@ -54,24 +54,24 @@ var/const/WIRE_ACTIVATE = 16 // Will start a bombs timer if pulsed, will hint if
|
||||
if(WIRE_EXPLODE)
|
||||
if(!mended)
|
||||
if(P.active)
|
||||
P.loc.visible_message("<span class='danger'>\icon[holder] An alarm sounds! It's go-</span>")
|
||||
P.loc.visible_message("<span class='danger'>[bicon(holder)] An alarm sounds! It's go-</span>")
|
||||
P.timer = 0
|
||||
else
|
||||
P.defused = 1
|
||||
if(mended)
|
||||
P.defused = 0 //cutting and mending all the wires of an inactive bomb will thus cure any sabotage
|
||||
if(WIRE_UNBOLT)
|
||||
if (!mended && P.anchored)
|
||||
if(!mended && P.anchored)
|
||||
playsound(P.loc, 'sound/effects/stealthoff.ogg', 30, 1)
|
||||
P.loc.visible_message("<span class='notice'>\icon[holder] The bolts lift out of the ground!</span>")
|
||||
P.loc.visible_message("<span class='notice'>[bicon(holder)] The bolts lift out of the ground!</span>")
|
||||
P.anchored = 0
|
||||
if(WIRE_PROCEED)
|
||||
if(!mended && P.active)
|
||||
P.loc.visible_message("<span class='danger'>\icon[holder] An alarm sounds! It's go-</span>")
|
||||
P.loc.visible_message("<span class='danger'>[bicon(holder)] An alarm sounds! It's go-</span>")
|
||||
P.timer = 0
|
||||
if(WIRE_ACTIVATE)
|
||||
if (!mended && P.active)
|
||||
P.loc.visible_message("<span class='notice'>\icon[holder] The timer stops! The bomb has been defused!</span>")
|
||||
if(!mended && P.active)
|
||||
P.loc.visible_message("<span class='notice'>[bicon(holder)] The timer stops! The bomb has been defused!</span>")
|
||||
P.icon_state = "[initial(P.icon_state)]-inactive[P.open_panel ? "-wires" : ""]"
|
||||
P.active = 0
|
||||
P.defused = 1
|
||||
Reference in New Issue
Block a user