Merge remote-tracking branch 'upstream/master' into cool-ipcs
This commit is contained in:
106
code/datums/accents.dm
Normal file
106
code/datums/accents.dm
Normal file
@@ -0,0 +1,106 @@
|
||||
/datum/accent
|
||||
|
||||
/datum/accent/proc/modify_speech(list/speech_args, datum/source, mob/living/carbon/owner) //transforms the message in some way
|
||||
return speech_args
|
||||
|
||||
/datum/accent/lizard/modify_speech(list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
var/static/regex/lizard_hiss = new("s+", "g")
|
||||
var/static/regex/lizard_hiSS = new("S+", "g")
|
||||
if(message[1] != "*")
|
||||
message = lizard_hiss.Replace(message, "sss")
|
||||
message = lizard_hiSS.Replace(message, "SSS")
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
return speech_args
|
||||
|
||||
/datum/accent/fly/modify_speech(list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
var/static/regex/fly_buzz = new("z+", "g")
|
||||
var/static/regex/fly_buZZ = new("Z+", "g")
|
||||
if(message[1] != "*")
|
||||
message = fly_buzz.Replace(message, "zzz")
|
||||
message = fly_buZZ.Replace(message, "ZZZ")
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
return speech_args
|
||||
|
||||
/datum/accent/abductor/modify_speech(list/speech_args, datum/source)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
var/mob/living/carbon/human/user = source
|
||||
var/rendered = "<span class='abductor'><b>[user.name]:</b> [message]</span>"
|
||||
user.log_talk(message, LOG_SAY, tag="abductor")
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
var/obj/item/organ/tongue/T = H.getorganslot(ORGAN_SLOT_TONGUE)
|
||||
if(!T || T.type != type)
|
||||
continue
|
||||
if(H.dna && H.dna.species.id == "abductor" && user.dna && user.dna.species.id == "abductor")
|
||||
var/datum/antagonist/abductor/A = user.mind.has_antag_datum(/datum/antagonist/abductor)
|
||||
if(!A || !(H.mind in A.team.members))
|
||||
continue
|
||||
to_chat(H, rendered)
|
||||
for(var/mob/M in GLOB.dead_mob_list)
|
||||
var/link = FOLLOW_LINK(M, user)
|
||||
to_chat(M, "[link] [rendered]")
|
||||
speech_args[SPEECH_MESSAGE] = ""
|
||||
return speech_args
|
||||
|
||||
/datum/accent/zombie/modify_speech(list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
var/list/message_list = splittext(message, " ")
|
||||
var/maxchanges = max(round(message_list.len / 1.5), 2)
|
||||
|
||||
for(var/i = rand(maxchanges / 2, maxchanges), i > 0, i--)
|
||||
var/insertpos = rand(1, message_list.len - 1)
|
||||
var/inserttext = message_list[insertpos]
|
||||
|
||||
if(!(copytext(inserttext, -3) == "..."))//3 == length("...")
|
||||
message_list[insertpos] = inserttext + "..."
|
||||
|
||||
if(prob(20) && message_list.len > 3)
|
||||
message_list.Insert(insertpos, "[pick("BRAINS", "Brains", "Braaaiinnnsss", "BRAAAIIINNSSS")]...")
|
||||
|
||||
speech_args[SPEECH_MESSAGE] = jointext(message_list, " ")
|
||||
return speech_args
|
||||
|
||||
/datum/accent/alien/modify_speech(list/speech_args, datum/source)
|
||||
playsound(source, "hiss", 25, 1, 1)
|
||||
return speech_args
|
||||
|
||||
/datum/accent/fluffy/modify_speech(list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
message = replacetext(message, "ne", "nye")
|
||||
message = replacetext(message, "nu", "nyu")
|
||||
message = replacetext(message, "na", "nya")
|
||||
message = replacetext(message, "no", "nyo")
|
||||
message = replacetext(message, "ove", "uv")
|
||||
message = replacetext(message, "l", "w")
|
||||
message = replacetext(message, "r", "w")
|
||||
speech_args[SPEECH_MESSAGE] = lowertext(message)
|
||||
return speech_args
|
||||
|
||||
/datum/accent/span
|
||||
var/span_flag
|
||||
|
||||
/datum/accent/span/modify_speech(list/speech_args)
|
||||
speech_args[SPEECH_SPANS] |= span_flag
|
||||
return speech_args
|
||||
|
||||
//bone tongues either have the sans accent or the papyrus accent
|
||||
/datum/accent/span/sans
|
||||
span_flag = SPAN_SANS
|
||||
|
||||
/datum/accent/span/papyrus
|
||||
span_flag = SPAN_PAPYRUS
|
||||
|
||||
/datum/accent/span/robot
|
||||
span_flag = SPAN_ROBOT
|
||||
|
||||
/datum/accent/dullahan/modify_speech(list/speech_args, datum/source, mob/living/carbon/owner)
|
||||
if(owner)
|
||||
if(isdullahan(owner))
|
||||
var/datum/species/dullahan/D = owner.dna.species
|
||||
if(isobj(D.myhead.loc))
|
||||
var/obj/O = D.myhead.loc
|
||||
O.say(speech_args[SPEECH_MESSAGE])
|
||||
speech_args[SPEECH_MESSAGE] = ""
|
||||
return speech_args
|
||||
@@ -8,14 +8,14 @@
|
||||
var/window_options = "can_close=1;can_minimize=1;can_maximize=0;can_resize=1;titlebar=1;" // window option is set using window_id
|
||||
var/stylesheets[0]
|
||||
var/scripts[0]
|
||||
var/title_image
|
||||
var/head_elements
|
||||
var/body_elements
|
||||
var/head_content = ""
|
||||
var/content = ""
|
||||
var/static/datum/asset/simple/namespaced/common/common_asset = get_asset_datum(/datum/asset/simple/namespaced/common)
|
||||
|
||||
|
||||
/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null)
|
||||
/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, atom/nref = null)
|
||||
|
||||
user = nuser
|
||||
window_id = nwindow_id
|
||||
@@ -27,7 +27,6 @@
|
||||
height = nheight
|
||||
if (nref)
|
||||
ref = nref
|
||||
add_stylesheet("common", 'html/browser/common.css') // this CSS sheet is common to all UIs
|
||||
|
||||
/datum/browser/proc/add_head_content(nhead_content)
|
||||
head_content = nhead_content
|
||||
@@ -35,22 +34,21 @@
|
||||
/datum/browser/proc/set_window_options(nwindow_options)
|
||||
window_options = nwindow_options
|
||||
|
||||
/datum/browser/proc/set_title_image(ntitle_image)
|
||||
//title_image = ntitle_image
|
||||
|
||||
/datum/browser/proc/add_stylesheet(name, file)
|
||||
if(istype(name, /datum/asset/spritesheet))
|
||||
var/datum/asset/spritesheet/sheet = name
|
||||
stylesheets["spritesheet_[sheet.name].css"] = "data/spritesheets/[sheet.name]"
|
||||
else
|
||||
var/asset_name = "[name].css"
|
||||
|
||||
stylesheets[asset_name] = file
|
||||
if(!SSassets.cache[asset_name])
|
||||
register_asset(asset_name, file)
|
||||
|
||||
if (!SSassets.cache[asset_name])
|
||||
SSassets.transport.register_asset(asset_name, file)
|
||||
|
||||
/datum/browser/proc/add_script(name, file)
|
||||
scripts["[ckey(name)].js"] = file
|
||||
register_asset("[ckey(name)].js", file)
|
||||
SSassets.transport.register_asset("[ckey(name)].js", file)
|
||||
|
||||
/datum/browser/proc/set_content(ncontent)
|
||||
content = ncontent
|
||||
@@ -60,15 +58,13 @@
|
||||
|
||||
/datum/browser/proc/get_header()
|
||||
var/file
|
||||
head_content += "<link rel='stylesheet' type='text/css' href='[common_asset.get_url_mappings()["common.css"]]'>"
|
||||
for (file in stylesheets)
|
||||
head_content += "<link rel='stylesheet' type='text/css' href='[file]'>"
|
||||
head_content += "<link rel='stylesheet' type='text/css' href='[SSassets.transport.get_asset_url(file)]'>"
|
||||
|
||||
|
||||
for (file in scripts)
|
||||
head_content += "<script type='text/javascript' src='[file]'></script>"
|
||||
|
||||
var/title_attributes = "class='uiTitle'"
|
||||
if (title_image)
|
||||
title_attributes = "class='uiTitle icon' style='background-image: url([title_image]);'"
|
||||
head_content += "<script type='text/javascript' src='[SSassets.transport.get_asset_url(file)]'></script>"
|
||||
|
||||
return {"<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
@@ -79,7 +75,7 @@
|
||||
</head>
|
||||
<body scroll=auto>
|
||||
<div class='uiWrapper'>
|
||||
[title ? "<div class='uiTitleWrapper'><div [title_attributes]><tt>[title]</tt></div></div>" : ""]
|
||||
[title ? "<div class='uiTitleWrapper'><div class='uiTitle'><tt>[title]</tt></div></div>" : ""]
|
||||
<div class='uiContent'>
|
||||
"}
|
||||
//" This is here because else the rest of the file looks like a string in notepad++.
|
||||
@@ -105,10 +101,11 @@
|
||||
var/window_size = ""
|
||||
if(width && height)
|
||||
window_size = "size=[width]x[height];"
|
||||
common_asset.send(user)
|
||||
if(stylesheets.len)
|
||||
send_asset_list(user, stylesheets)
|
||||
SSassets.transport.send_assets(user, stylesheets)
|
||||
if(scripts.len)
|
||||
send_asset_list(user, scripts)
|
||||
SSassets.transport.send_assets(user, scripts)
|
||||
user << browse(get_content(), "window=[window_id];[window_size][window_options]")
|
||||
if(use_onclose)
|
||||
setup_onclose()
|
||||
@@ -169,7 +166,7 @@
|
||||
return Button3
|
||||
|
||||
//Same shit, but it returns the button number, could at some point support unlimited button amounts.
|
||||
/proc/askuser(var/mob/User,Message, Title, Button1="Ok", Button2, Button3, StealFocus = 1, Timeout = 6000)
|
||||
/proc/askuser(mob/User,Message, Title, Button1="Ok", Button2, Button3, StealFocus = 1, Timeout = 6000)
|
||||
if (!istype(User))
|
||||
if (istype(User, /client/))
|
||||
var/client/C = User
|
||||
@@ -188,7 +185,7 @@
|
||||
var/selectedbutton = 0
|
||||
var/stealfocus
|
||||
|
||||
/datum/browser/modal/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null, StealFocus = 1, Timeout = 6000)
|
||||
/datum/browser/modal/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, atom/nref = null, StealFocus = 1, Timeout = 6000)
|
||||
..()
|
||||
stealfocus = StealFocus
|
||||
if (!StealFocus)
|
||||
|
||||
@@ -76,19 +76,11 @@
|
||||
return FALSE
|
||||
if(M.is_flying())
|
||||
return FALSE
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(istype(H.belt, /obj/item/wormhole_jaunter))
|
||||
var/obj/item/wormhole_jaunter/J = H.belt
|
||||
//To freak out any bystanders
|
||||
H.visible_message("<span class='boldwarning'>[H] falls into [parent]!</span>")
|
||||
J.chasm_react(H)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/component/chasm/proc/drop(atom/movable/AM)
|
||||
//Make sure the item is still there after our sleep
|
||||
if(!AM || QDELETED(AM))
|
||||
if(!AM || QDELETED(AM) || SEND_SIGNAL(AM, COMSIG_MOVABLE_CHASM_DROP, src))
|
||||
return
|
||||
falling_atoms[AM] = (falling_atoms[AM] || 0) + 1
|
||||
var/turf/T = target_turf
|
||||
|
||||
@@ -273,6 +273,16 @@
|
||||
time = 30
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/twinsheath
|
||||
name = "Twin Sword Sheath"
|
||||
result = /obj/item/storage/belt/sabre/twin
|
||||
reqs = list(/obj/item/stack/sheet/mineral/wood = 3,
|
||||
/obj/item/stack/sheet/leather = 8)
|
||||
tools = list(TOOL_WIRECUTTER)
|
||||
time = 70
|
||||
category = CAT_CLOTHING
|
||||
|
||||
|
||||
/datum/crafting_recipe/durathread_reinforcement_kit
|
||||
name = "Durathread Reinforcement Kit"
|
||||
result = /obj/item/armorkit
|
||||
|
||||
@@ -120,6 +120,53 @@
|
||||
category = CAT_MISC
|
||||
always_availible = FALSE // Disabled til learned
|
||||
|
||||
/datum/crafting_recipe/furnace
|
||||
name = "Sandstone Furnace"
|
||||
result = /obj/structure/furnace
|
||||
time = 300
|
||||
reqs = list(/obj/item/stack/sheet/mineral/sandstone = 15,
|
||||
/obj/item/stack/sheet/metal = 4,
|
||||
/obj/item/stack/rods = 2)
|
||||
tools = list(TOOL_CROWBAR)
|
||||
subcategory = CAT_MISCELLANEOUS
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/tableanvil
|
||||
name = "Table Anvil"
|
||||
result = /obj/structure/anvil/obtainable/table
|
||||
time = 300
|
||||
reqs = list(/obj/item/stack/sheet/metal = 4,
|
||||
/obj/item/stack/rods = 2)
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WRENCH, TOOL_WELDER)
|
||||
subcategory = CAT_MISCELLANEOUS
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/sandvil
|
||||
name = "Sandstone Anvil"
|
||||
result = /obj/structure/anvil/obtainable/sandstone
|
||||
time = 300
|
||||
reqs = list(/obj/item/stack/sheet/mineral/sandstone = 24)
|
||||
tools = list(TOOL_CROWBAR)
|
||||
subcategory = CAT_MISCELLANEOUS
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/basaltblock
|
||||
name = "Sintered Basalt Block"
|
||||
result = /obj/item/basaltblock
|
||||
time = 200
|
||||
reqs = list(/obj/item/stack/ore/glass/basalt = 50)
|
||||
tools = list(TOOL_WELDER)
|
||||
subcategory = CAT_MISCELLANEOUS
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/basaltanvil
|
||||
name = "Basalt Anvil"
|
||||
result = /obj/structure/anvil/obtainable/basalt
|
||||
time = 200
|
||||
reqs = list(/obj/item/basaltblock = 5)
|
||||
tools = list(TOOL_CROWBAR)
|
||||
subcategory = CAT_MISCELLANEOUS
|
||||
category = CAT_MISC
|
||||
///////////////////
|
||||
//Tools & Storage//
|
||||
///////////////////
|
||||
@@ -175,6 +222,17 @@
|
||||
subcategory = CAT_TOOL
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/toolboxhammer
|
||||
name = "Toolbox Hammer"
|
||||
result = /obj/item/melee/smith/hammer/toolbox
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WRENCH, TOOL_WELDER)
|
||||
reqs = list(/obj/item/storage/toolbox = 1,
|
||||
/obj/item/stack/sheet/metal = 4,
|
||||
/obj/item/stack/rods = 2)
|
||||
time = 40
|
||||
subcategory = CAT_TOOL
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/papersack
|
||||
name = "Paper Sack"
|
||||
result = /obj/item/storage/box/papersack
|
||||
@@ -358,6 +416,25 @@
|
||||
//Unsorted//
|
||||
////////////
|
||||
|
||||
|
||||
|
||||
/datum/crafting_recipe/stick
|
||||
name = "Stick"
|
||||
time = 30
|
||||
reqs = list(/obj/item/stack/sheet/mineral/wood = 1)
|
||||
result = /obj/item/stick
|
||||
subcategory = CAT_MISCELLANEOUS
|
||||
category = CAT_MISC
|
||||
|
||||
|
||||
/datum/crafting_recipe/swordhilt
|
||||
name = "Sword Hilt"
|
||||
time = 30
|
||||
reqs = list(/obj/item/stack/sheet/mineral/wood = 2)
|
||||
result = /obj/item/swordhandle
|
||||
subcategory = CAT_MISCELLANEOUS
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/blackcarpet
|
||||
name = "Black Carpet"
|
||||
reqs = list(/obj/item/stack/tile/carpet = 50, /obj/item/toy/crayon/black = 1)
|
||||
|
||||
@@ -45,8 +45,9 @@
|
||||
|
||||
/datum/fantasy_affix/tactical/apply(datum/component/fantasy/comp, newName)
|
||||
var/obj/item/master = comp.parent
|
||||
master.AddElement(/datum/element/tactical)
|
||||
comp.appliedElements += list(/datum/element/tactical)
|
||||
var/list/dat = list(/datum/element/tactical)
|
||||
master._AddElement(dat)
|
||||
comp.appliedElements += list(dat)
|
||||
return "tactical [newName]"
|
||||
|
||||
/datum/fantasy_affix/pyromantic
|
||||
|
||||
22
code/datums/components/honkspam.dm
Normal file
22
code/datums/components/honkspam.dm
Normal file
@@ -0,0 +1,22 @@
|
||||
// This used to be in paper.dm, it was some snowflake code that was
|
||||
// used ONLY on april's fool. I moved it to a component so it could be
|
||||
// used in other places
|
||||
|
||||
/datum/component/honkspam
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
var/spam_flag = FALSE
|
||||
|
||||
/datum/component/honkspam/Initialize()
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, .proc/interact)
|
||||
|
||||
/datum/component/honkspam/proc/reset_spamflag()
|
||||
spam_flag = FALSE
|
||||
|
||||
/datum/component/honkspam/proc/interact(mob/user)
|
||||
if(!spam_flag)
|
||||
spam_flag = TRUE
|
||||
var/obj/item/parent_item = parent
|
||||
playsound(parent_item.loc, 'sound/items/bikehorn.ogg', 50, TRUE)
|
||||
addtimer(CALLBACK(src, .proc/reset_spamflag), 2 SECONDS)
|
||||
87
code/datums/components/label.dm
Normal file
87
code/datums/components/label.dm
Normal file
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
The label component.
|
||||
|
||||
This component is used to manage labels applied by the hand labeler.
|
||||
|
||||
Atoms can only have one instance of this component, and therefore only one label at a time.
|
||||
This is to avoid having names like "Backpack (label1) (label2) (label3)". This is annoying and abnoxious to read.
|
||||
|
||||
When a player clicks the atom with a hand labeler to apply a label, this component gets applied to it.
|
||||
If the labeler is off, the component will be removed from it, and the label will be removed from its name.
|
||||
*/
|
||||
/datum/component/label
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
/// The name of the label the player is applying to the parent.
|
||||
var/label_name
|
||||
|
||||
/datum/component/label/Initialize(_label_name)
|
||||
if(!isatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
label_name = _label_name
|
||||
apply_label()
|
||||
|
||||
/datum/component/label/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/OnAttackby)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/Examine)
|
||||
|
||||
/datum/component/label/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_PARENT_ATTACKBY, COMSIG_PARENT_EXAMINE))
|
||||
|
||||
/**
|
||||
This proc will fire after the parent is hit by a hand labeler which is trying to apply another label.
|
||||
Since the parent already has a label, it will remove the old one from the parent's name, and apply the new one.
|
||||
*/
|
||||
/datum/component/label/InheritComponent(datum/component/label/new_comp , i_am_original, _label_name)
|
||||
remove_label()
|
||||
if(new_comp)
|
||||
label_name = new_comp.label_name
|
||||
else
|
||||
label_name = _label_name
|
||||
apply_label()
|
||||
|
||||
/**
|
||||
This proc will trigger when any object is used to attack the parent.
|
||||
|
||||
If the attacking object is not a hand labeler, it will return.
|
||||
If the attacking object is a hand labeler it will restore the name of the parent to what it was before this component was added to it, and the component will be deleted.
|
||||
|
||||
Arguments:
|
||||
* source: The parent.
|
||||
* attacker: The object that is hitting the parent.
|
||||
* user: The mob who is wielding the attacking object.
|
||||
*/
|
||||
/datum/component/label/proc/OnAttackby(datum/source, obj/item/attacker, mob/user)
|
||||
// If the attacking object is not a hand labeler or its mode is 1 (has a label ready to apply), return.
|
||||
// The hand labeler should be off (mode is 0), in order to remove a label.
|
||||
var/obj/item/hand_labeler/labeler = attacker
|
||||
if(!istype(labeler) || labeler.mode)
|
||||
return
|
||||
|
||||
remove_label()
|
||||
playsound(parent, 'sound/items/poster_ripped.ogg', 20, TRUE)
|
||||
to_chat(user, "<span class='warning'>You remove the label from [parent].</span>")
|
||||
qdel(src) // Remove the component from the object.
|
||||
|
||||
/**
|
||||
This proc will trigger when someone examines the parent.
|
||||
It will attach the text found in the body of the proc to the `examine_list` and display it to the player examining the parent.
|
||||
|
||||
Arguments:
|
||||
* source: The parent.
|
||||
* user: The mob exmaining the parent.
|
||||
* examine_list: The current list of text getting passed from the parent's normal examine() proc.
|
||||
*/
|
||||
/datum/component/label/proc/Examine(datum/source, mob/user, list/examine_list)
|
||||
examine_list += "<span class='notice'>It has a label with some words written on it. Use a hand labeler to remove it.</span>"
|
||||
|
||||
/// Applies a label to the name of the parent in the format of: "parent_name (label)"
|
||||
/datum/component/label/proc/apply_label()
|
||||
var/atom/owner = parent
|
||||
owner.name += " ([label_name])"
|
||||
|
||||
/// Removes the label from the parent's name
|
||||
/datum/component/label/proc/remove_label()
|
||||
var/atom/owner = parent
|
||||
owner.name = replacetext(owner.name, "([label_name])", "") // Remove the label text from the parent's name, wherever it's located.
|
||||
owner.name = trim(owner.name) // Shave off any white space from the beginning or end of the parent's name.
|
||||
@@ -1,4 +1,4 @@
|
||||
//Thing meant for allowing datums and objects to access a NTnet network datum.
|
||||
//Thing meant for allowing datums and objects to access an NTnet network datum.
|
||||
/datum/proc/ntnet_receive(datum/netdata/data)
|
||||
return
|
||||
|
||||
|
||||
@@ -113,9 +113,9 @@ Bonus
|
||||
symptom_delay_max = 90
|
||||
var/chems = FALSE
|
||||
var/explosion_power = 1
|
||||
threshold_desc = "<b>Resistance 9:</b> Doubles the intensity of the effect, but reduces its frequency.<br>\
|
||||
<b>Stage Speed 8:</b> Increases explosion radius when the host is wet.<br>\
|
||||
<b>Transmission 8:</b> Additionally synthesizes chlorine trifluoride and napalm inside the host."
|
||||
threshold_desc = list("Resistance 9" = "Doubles the intensity of the effect, but reduces its frequency.",
|
||||
"Stage Speed 8" = "Increases explosion radius when the host is wet.",
|
||||
"Transmission 8" = "Additionally synthesizes chlorine trifluoride and napalm inside the host.")
|
||||
|
||||
/datum/symptom/alkali/Start(datum/disease/advance/A)
|
||||
if(!..())
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
RegisterSignal(A, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_react)
|
||||
if(description)
|
||||
RegisterSignal(A, COMSIG_PARENT_EXAMINE, .proc/examine)
|
||||
RegisterSignal(A, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/apply_overlay, TRUE)
|
||||
|
||||
num_decals_per_atom[A]++
|
||||
apply(A)
|
||||
@@ -39,21 +40,28 @@
|
||||
/datum/element/decal/Detach(datum/target)
|
||||
var/atom/A = target
|
||||
num_decals_per_atom[A]--
|
||||
apply(A, TRUE)
|
||||
if(!num_decals_per_atom[A])
|
||||
UnregisterSignal(A, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_COMPONENT_CLEAN_ACT, COMSIG_PARENT_EXAMINE, COMSIG_ATOM_UPDATE_OVERLAYS))
|
||||
UnregisterSignal(A, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE,
|
||||
COMSIG_COMPONENT_CLEAN_ACT, COMSIG_PARENT_EXAMINE, COMSIG_ATOM_UPDATE_OVERLAYS))
|
||||
LAZYREMOVE(num_decals_per_atom, A)
|
||||
apply(A)
|
||||
return ..()
|
||||
|
||||
/datum/element/decal/proc/apply(atom/target, removing = FALSE)
|
||||
if(num_decals_per_atom[target] == 1 && !removing)
|
||||
RegisterSignal(target, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/apply_overlay, TRUE)
|
||||
target.update_icon()
|
||||
/datum/element/decal/proc/apply(atom/target)
|
||||
if(target.flags_1 & INITIALIZED_1)
|
||||
target.update_icon() //could use some queuing here now maybe.
|
||||
else if(!QDELETED(target) && num_decals_per_atom[target] == 1)
|
||||
RegisterSignal(target, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE, .proc/late_update_icon)
|
||||
if(isitem(target))
|
||||
addtimer(CALLBACK(target, /obj/item/.proc/update_slot_icon), 0, TIMER_UNIQUE)
|
||||
|
||||
/datum/element/decal/proc/late_update_icon(atom/source)
|
||||
source.update_icon()
|
||||
UnregisterSignal(source,COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE)
|
||||
|
||||
/datum/element/decal/proc/apply_overlay(atom/source, list/overlay_list)
|
||||
pic.dir = first_dir == NORTH ? source.dir : turn(first_dir, dir2angle(source.dir))
|
||||
if(first_dir)
|
||||
pic.dir = first_dir == SOUTH ? source.dir : turn(first_dir, dir2angle(source.dir)-180) //Never turn a dir by 0.
|
||||
for(var/i in 1 to num_decals_per_atom[source])
|
||||
overlay_list += pic
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
A.AddElement(/datum/element/update_icon_updates_onmob)
|
||||
RegisterSignal(A, COMSIG_ITEM_WORN_OVERLAYS, .proc/apply_worn_overlays)
|
||||
if(suits_with_helmet_typecache[A.type])
|
||||
RegisterSignal(A, COMSIG_SUIT_MADE_HELMET, .proc/register_helmet)
|
||||
RegisterSignal(A, COMSIG_SUIT_MADE_HELMET, .proc/register_helmet) //you better work now you slut
|
||||
else if(_flags & POLYCHROMIC_ACTION && ismob(A)) //in the event mob update icon procs are ever standarized.
|
||||
var/datum/action/polychromic/P = new(A)
|
||||
RegisterSignal(P, COMSIG_ACTION_TRIGGER, .proc/activate_action)
|
||||
@@ -166,6 +166,15 @@
|
||||
examine_list += "<span class='notice'>Alt-click to recolor it.</span>"
|
||||
|
||||
/datum/element/polychromic/proc/register_helmet(atom/source, obj/item/clothing/head/H)
|
||||
if(!isitem(H)) //backup in case if it messes up somehow
|
||||
if(istype(source,/obj/item/clothing/suit/hooded)) //so how come it be like this, where toggleable headslots are named separately (helmet/hood) anyways?
|
||||
var/obj/item/clothing/suit/hooded/sourcesuit = source
|
||||
H = sourcesuit.hood
|
||||
else if(istype(source,/obj/item/clothing/suit/space/hardsuit))
|
||||
var/obj/item/clothing/suit/space/hardsuit/sourcesuit = source
|
||||
H = sourcesuit.helmet
|
||||
else
|
||||
return
|
||||
suit_by_helmet[H] = source
|
||||
helmet_by_suit[source] = H
|
||||
colors_by_atom[H] = colors_by_atom[source]
|
||||
|
||||
@@ -102,8 +102,9 @@
|
||||
|
||||
/datum/emote/proc/can_run_emote(mob/user, status_check = TRUE, intentional = FALSE)
|
||||
. = TRUE
|
||||
if(!is_type_in_typecache(user, mob_type_allowed_typecache))
|
||||
return FALSE
|
||||
if(mob_type_allowed_typecache) //empty list = anyone can use it unless specifically blacklisted
|
||||
if(!is_type_in_typecache(user, mob_type_allowed_typecache))
|
||||
return FALSE
|
||||
if(is_type_in_typecache(user, mob_type_blacklist_typecache))
|
||||
return FALSE
|
||||
if(status_check && !is_type_in_typecache(user, mob_type_ignore_stat_typecache))
|
||||
|
||||
@@ -35,23 +35,24 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
value_per_unit = 0.025
|
||||
beauty_modifier = 0.075
|
||||
|
||||
///Slight force increase
|
||||
///Slight force decrease. It's gold, it's soft as fuck.
|
||||
/datum/material/gold
|
||||
name = "gold"
|
||||
desc = "Gold"
|
||||
color = list(340/255, 240/255, 50/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0) //gold is shiny, but not as bright as bananium
|
||||
strength_modifier = 1.2
|
||||
strength_modifier = 0.8
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/gold
|
||||
value_per_unit = 0.0625
|
||||
beauty_modifier = 0.15
|
||||
armor_modifiers = list("melee" = 1.1, "bullet" = 1.1, "laser" = 1.15, "energy" = 1.15, "bomb" = 1, "bio" = 1, "rad" = 1, "fire" = 0.7, "acid" = 1.1)
|
||||
|
||||
///Has no special properties
|
||||
///Small force increase, for diamond swords
|
||||
/datum/material/diamond
|
||||
name = "diamond"
|
||||
desc = "Highly pressurized carbon"
|
||||
color = list(48/255, 272/255, 301/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
|
||||
strength_modifier = 1.1
|
||||
alpha = 132
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/diamond
|
||||
@@ -106,6 +107,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
name = "bluespace crystal"
|
||||
desc = "Crystals with bluespace properties"
|
||||
color = list(119/255, 217/255, 396/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
|
||||
integrity_modifier = 0.2 //these things shatter when thrown.
|
||||
alpha = 200
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE)
|
||||
beauty_modifier = 0.5
|
||||
@@ -139,7 +141,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
name = "titanium"
|
||||
desc = "Titanium"
|
||||
color = "#b3c0c7"
|
||||
strength_modifier = 1.3
|
||||
strength_modifier = 1.1
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/titanium
|
||||
value_per_unit = 0.0625
|
||||
@@ -203,7 +205,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
name = "adamantine"
|
||||
desc = "A powerful material made out of magic, I mean science!"
|
||||
color = "#6d7e8e"
|
||||
strength_modifier = 1.5
|
||||
strength_modifier = 1.3
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/adamantine
|
||||
value_per_unit = 0.25
|
||||
@@ -276,16 +278,29 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
desc = "Mir'ntrath barhah Nar'sie."
|
||||
color = "#3C3434"
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
strength_modifier = 1.2
|
||||
sheet_type = /obj/item/stack/sheet/runed_metal
|
||||
value_per_unit = 0.75
|
||||
armor_modifiers = list("melee" = 1.2, "bullet" = 1.2, "laser" = 1, "energy" = 1, "bomb" = 1.2, "bio" = 1.2, "rad" = 1.5, "fire" = 1.5, "acid" = 1.5)
|
||||
beauty_modifier = -0.15
|
||||
texture_layer_icon_state = "runed"
|
||||
|
||||
/datum/material/brass
|
||||
name = "brass"
|
||||
desc = "Tybel gb-Ratvar"
|
||||
color = "#917010"
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
strength_modifier = 1.3 // Replicant Alloy is very good for skull beatings..
|
||||
sheet_type = /obj/item/stack/tile/brass
|
||||
value_per_unit = 0.75
|
||||
armor_modifiers = list("melee" = 1.4, "bullet" = 1.4, "laser" = 0, "energy" = 0, "bomb" = 1.4, "bio" = 1.2, "rad" = 1.5, "fire" = 1.5, "acid" = 1.5) //But it has.. a few problems that can't easily be compensated for.
|
||||
beauty_modifier = 0.3 //It really beats the cold plain plating of the station, doesn't it?
|
||||
|
||||
/datum/material/bronze
|
||||
name = "bronze"
|
||||
desc = "Clock Cult? Never heard of it."
|
||||
color = "#92661A"
|
||||
strength_modifier = 1.1
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/bronze
|
||||
value_per_unit = 0.025
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
var/special_role
|
||||
var/list/restricted_roles = list()
|
||||
|
||||
var/hide_ckey = FALSE //hide ckey from round-end report
|
||||
|
||||
var/list/spell_list = list() // Wizard mode & "Give Spell" badmin button.
|
||||
|
||||
var/linglink
|
||||
@@ -69,6 +71,7 @@
|
||||
///What character we spawned in as- either at roundstart or latejoin, so we know for persistent scars if we ended as the same person or not
|
||||
var/mob/original_character
|
||||
|
||||
|
||||
/datum/mind/New(var/key)
|
||||
skill_holder = new(src)
|
||||
src.key = key
|
||||
@@ -137,6 +140,8 @@
|
||||
if(L.client?.prefs && L.client.prefs.auto_ooc && L.client.prefs.chat_toggles & CHAT_OOC)
|
||||
DISABLE_BITFIELD(L.client.prefs.chat_toggles,CHAT_OOC)
|
||||
|
||||
hide_ckey = current.client?.prefs?.hide_ckey
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_MIND_TRANSFER, new_character, old_character)
|
||||
SEND_SIGNAL(new_character, COMSIG_MOB_ON_NEW_MIND)
|
||||
|
||||
@@ -780,6 +785,7 @@
|
||||
if(!mind.name)
|
||||
mind.name = real_name
|
||||
mind.current = src
|
||||
mind.hide_ckey = client?.prefs?.hide_ckey
|
||||
|
||||
/mob/living/carbon/mind_initialize()
|
||||
..()
|
||||
|
||||
@@ -204,6 +204,11 @@
|
||||
mood_change = -1
|
||||
timeout = 2 MINUTES
|
||||
|
||||
/datum/mood_event/plush_bite
|
||||
description = "<span class='warning'>IT BIT ME!! OW!</span>\n"
|
||||
mood_change = -3
|
||||
timeout = 2 MINUTES
|
||||
|
||||
//Cursed stuff below
|
||||
|
||||
/datum/mood_event/emptypred
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
/**
|
||||
* Automatic skill increase, multiplied by skill affinity if existing.
|
||||
* Only works if skill is numerical.
|
||||
* Only works if skill is numerical or levelled..
|
||||
*/
|
||||
/datum/mind/proc/auto_gain_experience(skill, value, maximum, silent = FALSE)
|
||||
if(!ispath(skill, /datum/skill))
|
||||
|
||||
6
code/datums/skills/blacksmithing.dm
Normal file
6
code/datums/skills/blacksmithing.dm
Normal file
@@ -0,0 +1,6 @@
|
||||
/datum/skill/level/dorfy/blacksmithing
|
||||
name = "Blacksmithing"
|
||||
desc = "Making metal into fancy shapes using heat and force. Higher levels increase both your working speed at an anvil as well as the quality of your works."
|
||||
name_color = COLOR_FLOORTILE_GRAY
|
||||
skill_traits = list(SKILL_SANITY, SKILL_INTELLIGENCE, SKILL_USE_TOOL, SKILL_TRAINING_TOOL)
|
||||
ui_category = SKILL_UI_CAT_MISC
|
||||
@@ -580,4 +580,63 @@
|
||||
/datum/status_effect/regenerative_core/on_remove()
|
||||
. = ..()
|
||||
REMOVE_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, "regenerative_core")
|
||||
owner.updatehealth()
|
||||
owner.updatehealth()
|
||||
|
||||
/datum/status_effect/panacea
|
||||
id = "Anatomic Panacea"
|
||||
duration = 100
|
||||
tick_interval = 10
|
||||
alert_type = /obj/screen/alert/status_effect/panacea
|
||||
|
||||
/obj/screen/alert/status_effect/panacea
|
||||
name = "Panacea"
|
||||
desc = "We purge the impurities from our body."
|
||||
icon_state = "panacea"
|
||||
|
||||
// Changeling's anatomic panacea now in buff form. Directly fixes issues instead of injecting chems
|
||||
/datum/status_effect/panacea/tick()
|
||||
var/mob/living/carbon/M = owner
|
||||
|
||||
//Heal brain damage and toxyloss, alongside trauma
|
||||
owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, -8)
|
||||
owner.adjustToxLoss(-6, forced = TRUE)
|
||||
M.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC)
|
||||
//Purges 50 rads per tick
|
||||
if(owner.radiation > 0)
|
||||
owner.radiation -= min(owner.radiation, 50)
|
||||
//Mutadone effects
|
||||
owner.jitteriness = 0
|
||||
if(owner.has_dna())
|
||||
M.dna.remove_all_mutations(mutadone = TRUE)
|
||||
if(!QDELETED(owner)) //We were a monkey, now a human
|
||||
..()
|
||||
// Purges toxins
|
||||
for(var/datum/reagent/toxin/R in owner.reagents.reagent_list)
|
||||
owner.reagents.remove_reagent(R.type, 5)
|
||||
//Antihol effects
|
||||
M.reagents.remove_all_type(/datum/reagent/consumable/ethanol, 10, 0, 1)
|
||||
M.drunkenness = max(M.drunkenness - 10, 0)
|
||||
owner.dizziness = 0
|
||||
owner.drowsyness = 0
|
||||
owner.slurring = 0
|
||||
owner.confused = 0
|
||||
//Organ and disease cure moved from panacea.dm to buff proc
|
||||
var/list/bad_organs = list(
|
||||
owner.getorgan(/obj/item/organ/body_egg),
|
||||
owner.getorgan(/obj/item/organ/zombie_infection))
|
||||
for(var/o in bad_organs)
|
||||
var/obj/item/organ/O = o
|
||||
if(!istype(O))
|
||||
continue
|
||||
O.Remove()
|
||||
if(iscarbon(owner))
|
||||
var/mob/living/carbon/C = owner
|
||||
C.vomit(0, toxic = TRUE)
|
||||
O.forceMove(get_turf(owner))
|
||||
if(isliving(owner))
|
||||
var/mob/living/L = owner
|
||||
for(var/thing in L.diseases)
|
||||
var/datum/disease/D = thing
|
||||
if(D.severity == DISEASE_SEVERITY_POSITIVE)
|
||||
continue
|
||||
D.cure()
|
||||
|
||||
@@ -536,6 +536,38 @@
|
||||
if(100)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_BRAIN,20)
|
||||
|
||||
/datum/status_effect/corrosion_curse/lesser
|
||||
id = "corrosion_curse_lesser"
|
||||
duration = 20 SECONDS
|
||||
|
||||
/datum/status_effect/corrosion_curse/lesser/tick()
|
||||
. = ..()
|
||||
if(!ishuman(owner))
|
||||
return
|
||||
var/mob/living/carbon/human/H = owner
|
||||
var/chance = rand(0,100)
|
||||
switch(chance)
|
||||
if(0 to 19)
|
||||
H.adjustBruteLoss(6)
|
||||
if(20 to 29)
|
||||
H.Dizzy(10)
|
||||
if(30 to 39)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_LIVER,2)
|
||||
if(40 to 49)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_HEART,2)
|
||||
if(50 to 59)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_STOMACH,2)
|
||||
if(60 to 69)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_EYES,5)
|
||||
if(70 to 79)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_EARS,5)
|
||||
if(80 to 89)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_LUNGS,5)
|
||||
if(90 to 99)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_TONGUE,5)
|
||||
if(100)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_BRAIN,10)
|
||||
|
||||
/datum/status_effect/amok
|
||||
id = "amok"
|
||||
status_type = STATUS_EFFECT_REPLACE
|
||||
|
||||
Reference in New Issue
Block a user