Tg 1 28 sync testing/confirmation (#5178)

* maps, tgui, tools

* defines and helpers

* onclick and controllers

* datums

fucking caught that hulk reversal too.

* game and shuttle modular

* module/admin

* oh god they fucking moved antag shit again

* haaaaate. Haaaaaaaaaate.

* enables moff wings

* more modules things

* tgstation.dme

before I forget something important

* some mob stuff

* s'more mob/living stuff

* some carbon stuff

* ayy lmaos and kitchen meat

* Human stuff

* species things

moff wings have a 'none' version too

* the rest of the module stuff.

* some strings

* misc

* mob icons

* some other icons.

* It compiles FUCK BORERS

FUCK BORERS
This commit is contained in:
Poojawa
2018-01-29 04:42:29 -06:00
committed by GitHub
parent 89fa4b0f28
commit 03086dfa91
666 changed files with 27177 additions and 35945 deletions
+8 -8
View File
@@ -104,7 +104,7 @@
return 0
return 1
/datum/action/proc/UpdateButtonIcon(status_only = FALSE)
/datum/action/proc/UpdateButtonIcon(status_only = FALSE, force = FALSE)
if(button)
if(!status_only)
button.name = name
@@ -121,7 +121,7 @@
if(button.icon_state != background_icon_state)
button.icon_state = background_icon_state
ApplyIcon(button)
ApplyIcon(button, force)
if(!IsAvailable())
button.color = rgb(128,0,0,128)
@@ -129,8 +129,8 @@
button.color = rgb(255,255,255,255)
return 1
/datum/action/proc/ApplyIcon(obj/screen/movable/action_button/current_button)
if(icon_icon && button_icon_state && current_button.button_icon_state != button_icon_state)
/datum/action/proc/ApplyIcon(obj/screen/movable/action_button/current_button, force = FALSE)
if(icon_icon && button_icon_state && ((current_button.button_icon_state != button_icon_state) || force))
current_button.cut_overlays(TRUE)
current_button.add_overlay(mutable_appearance(icon_icon, button_icon_state))
current_button.button_icon_state = button_icon_state
@@ -163,11 +163,11 @@
I.ui_action_click(owner, src)
return 1
/datum/action/item_action/ApplyIcon(obj/screen/movable/action_button/current_button)
/datum/action/item_action/ApplyIcon(obj/screen/movable/action_button/current_button, force)
if(button_icon && button_icon_state)
// If set, use the custom icon that we set instead
// of the item appearence
..(current_button)
..()
else if(target && current_button.appearance_cache != target.appearance) //replace with /ref comparison if this is not valid.
var/obj/item/I = target
var/old_layer = I.layer
@@ -215,7 +215,7 @@
/datum/action/item_action/set_internals
name = "Set Internals"
/datum/action/item_action/set_internals/UpdateButtonIcon(status_only = FALSE)
/datum/action/item_action/set_internals/UpdateButtonIcon(status_only = FALSE, force)
if(..()) //button available
if(iscarbon(owner))
var/mob/living/carbon/C = owner
@@ -253,7 +253,7 @@
if(..())
UpdateButtonIcon()
/datum/action/item_action/toggle_unfriendly_fire/UpdateButtonIcon(status_only = FALSE)
/datum/action/item_action/toggle_unfriendly_fire/UpdateButtonIcon(status_only = FALSE, force)
if(istype(target, /obj/item/hierophant_club))
var/obj/item/hierophant_club/H = target
if(H.friendly_fire_check)
+70
View File
@@ -0,0 +1,70 @@
#define ARMORID "armor-[melee]-[bullet]-[laser]-[energy]-[bomb]-[bio]-[rad]-[fire]-[acid]-[magic]"
/proc/getArmor(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0)
. = locate(ARMORID)
if (!.)
. = new /datum/armor(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic)
/datum/armor
datum_flags = DF_USE_TAG
var/melee
var/bullet
var/laser
var/energy
var/bomb
var/bio
var/rad
var/fire
var/acid
var/magic
/datum/armor/New(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0)
src.melee = melee
src.bullet = bullet
src.laser = laser
src.energy = energy
src.bomb = bomb
src.bio = bio
src.rad = rad
src.fire = fire
src.acid = acid
src.magic = magic
tag = ARMORID
/datum/armor/proc/modifyRating(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0)
return getArmor(src.melee+melee, src.bullet+bullet, src.laser+laser, src.energy+energy, src.bomb+bomb, src.bio+bio, src.rad+rad, src.fire+fire, src.acid+acid, src.magic+magic)
/datum/armor/proc/modifyAllRatings(modifier = 0)
return getArmor(melee+modifier, bullet+modifier, laser+modifier, energy+modifier, bomb+modifier, bio+modifier, rad+modifier, fire+modifier, acid+modifier, magic+modifier)
/datum/armor/proc/setRating(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic)
return getArmor((isnull(melee) ? src.melee : melee),\
(isnull(bullet) ? src.bullet : bullet),\
(isnull(laser) ? src.laser : laser),\
(isnull(energy) ? src.energy : energy),\
(isnull(bomb) ? src.bomb : bomb),\
(isnull(bio) ? src.bio : bio),\
(isnull(rad) ? src.rad : rad),\
(isnull(fire) ? src.fire : fire),\
(isnull(acid) ? src.acid : acid),\
(isnull(magic) ? src.magic : magic))
/datum/armor/proc/getRating(rating)
return vars[rating]
/datum/armor/proc/getList()
return list("melee" = melee, "bullet" = bullet, "laser" = laser, "energy" = energy, "bomb" = bomb, "bio" = bio, "rad" = rad, "fire" = fire, "acid" = acid, "magic" = magic)
/datum/armor/proc/attachArmor(datum/armor/AA)
return getArmor(melee+AA.melee, bullet+AA.bullet, laser+AA.laser, energy+AA.energy, bomb+AA.bomb, bio+AA.bio, rad+AA.rad, fire+AA.fire, acid+AA.acid, magic+AA.magic)
/datum/armor/proc/detachArmor(datum/armor/AA)
return getArmor(melee-AA.melee, bullet-AA.bullet, laser-AA.laser, energy-AA.energy, bomb-AA.bomb, bio-AA.bio, rad-AA.rad, fire-AA.fire, acid-AA.acid, magic-AA.magic)
/datum/armor/vv_edit_var(var_name, var_value)
if (var_name == NAMEOF(src, tag))
return FALSE
. = ..()
tag = ARMORID // update tag in case armor values were edited
#undef ARMORID
+2 -2
View File
@@ -42,7 +42,7 @@
lose_text = "<span class='notice'>You feel smart again.</span>"
/datum/brain_trauma/mild/dumbness/on_gain()
owner.add_disability(DISABILITY_DUMB, TRAUMA_DISABILITY)
owner.add_trait(TRAIT_DUMB, TRAUMA_TRAIT)
..()
/datum/brain_trauma/mild/dumbness/on_life()
@@ -54,7 +54,7 @@
..()
/datum/brain_trauma/mild/dumbness/on_lose()
owner.remove_disability(DISABILITY_DUMB, TRAUMA_DISABILITY)
owner.remove_trait(TRAIT_DUMB, TRAUMA_TRAIT)
owner.derpspeech = 0
..()
+1 -1
View File
@@ -68,7 +68,7 @@
return
/datum/brain_trauma/mild/phobia/on_hear(message, speaker, message_language, raw_message, radio_freq)
if(owner.has_disability(DISABILITY_DEAF) || world.time < next_scare) //words can't trigger you if you can't hear them *taps head*
if(owner.has_trait(TRAIT_DEAF) || world.time < next_scare) //words can't trigger you if you can't hear them *taps head*
return message
for(var/word in trigger_words)
if(findtext(message, word))
+9 -9
View File
@@ -12,11 +12,11 @@
lose_text = "<span class='notice'>You suddenly remember how to speak.</span>"
/datum/brain_trauma/severe/mute/on_gain()
owner.add_disability(DISABILITY_MUTE, TRAUMA_DISABILITY)
owner.add_trait(TRAIT_MUTE, TRAUMA_TRAIT)
..()
/datum/brain_trauma/severe/mute/on_lose()
owner.remove_disability(DISABILITY_MUTE, TRAUMA_DISABILITY)
owner.remove_trait(TRAIT_MUTE, TRAUMA_TRAIT)
..()
/datum/brain_trauma/severe/aphasia
@@ -50,11 +50,11 @@
lose_text = "<span class='notice'>Your vision returns.</span>"
/datum/brain_trauma/severe/blindness/on_gain()
owner.become_blind(TRAUMA_DISABILITY)
owner.become_blind(TRAUMA_TRAIT)
..()
/datum/brain_trauma/severe/blindness/on_lose()
owner.cure_blind(TRAUMA_DISABILITY)
owner.cure_blind(TRAUMA_TRAIT)
..()
/datum/brain_trauma/severe/paralysis
@@ -120,7 +120,7 @@
stress -= 4
/datum/brain_trauma/severe/monophobia/proc/check_alone()
if(owner.has_disability(DISABILITY_BLIND))
if(owner.has_trait(TRAIT_BLIND))
return TRUE
for(var/mob/M in oview(owner, 7))
if(!isliving(M)) //ghosts ain't people
@@ -182,11 +182,11 @@
lose_text = "<span class='notice'>You feel in control of your hands again.</span>"
/datum/brain_trauma/severe/discoordination/on_gain()
owner.add_disability(DISABILITY_MONKEYLIKE, TRAUMA_DISABILITY)
owner.add_trait(TRAIT_MONKEYLIKE, TRAUMA_TRAIT)
..()
/datum/brain_trauma/severe/discoordination/on_lose()
owner.remove_disability(DISABILITY_MONKEYLIKE, TRAUMA_DISABILITY)
owner.remove_trait(TRAIT_MONKEYLIKE, TRAUMA_TRAIT)
..()
/datum/brain_trauma/severe/pacifism
@@ -197,9 +197,9 @@
lose_text = "<span class='notice'>You no longer feel compelled to not harm.</span>"
/datum/brain_trauma/severe/pacifism/on_gain()
owner.add_disability(DISABILITY_PACIFISM, TRAUMA_DISABILITY)
owner.add_trait(TRAIT_PACIFISM, TRAUMA_TRAIT)
..()
/datum/brain_trauma/severe/pacifism/on_lose()
owner.remove_disability(DISABILITY_PACIFISM, TRAUMA_DISABILITY)
owner.remove_trait(TRAIT_PACIFISM, TRAUMA_TRAIT)
..()
@@ -192,7 +192,7 @@
return //no random switching
/datum/brain_trauma/severe/split_personality/brainwashing/on_hear(message, speaker, message_language, raw_message, radio_freq)
if(owner.has_disability(DISABILITY_DEAF) || owner == speaker)
if(owner.has_trait(TRAIT_DEAF) || owner == speaker)
return message
if(findtext(message, codeword))
message = replacetext(message, codeword, "<span class='warning'>[codeword]</span>")
+133 -44
View File
@@ -120,13 +120,7 @@
else
WARNING("Browser [title] tried to close with a null ID")
/datum/browser/alert
var/selectedbutton = 0
var/opentime = 0
var/timeout
var/stealfocus
/datum/browser/alert/New(User,Message,Title,Button1="Ok",Button2,Button3,StealFocus = 1,Timeout=6000)
/datum/browser/modal/alert/New(User,Message,Title,Button1="Ok",Button2,Button3,StealFocus = 1,Timeout=6000)
if (!User)
return
@@ -142,44 +136,10 @@
output += {"</div>"}
..(User, ckey("[User]-[Message]-[Title]-[world.time]-[rand(1,10000)]"), Title, 350, 150, src)
..(User, ckey("[User]-[Message]-[Title]-[world.time]-[rand(1,10000)]"), Title, 350, 150, src, StealFocus, Timeout)
set_content(output)
stealfocus = StealFocus
if (!StealFocus)
window_options += "focus=false;"
timeout = Timeout
/datum/browser/alert/open()
set waitfor = 0
opentime = world.time
if (stealfocus)
. = ..(use_onclose = 1)
else
var/focusedwindow = winget(user, null, "focus")
. = ..(use_onclose = 1)
//waits for the window to show up client side before attempting to un-focus it
//winexists sleeps until it gets a reply from the client, so we don't need to bother sleeping
for (var/i in 1 to 10)
if (user && winexists(user, window_id))
if (focusedwindow)
winset(user, focusedwindow, "focus=true")
else
winset(user, "mapwindow", "focus=true")
break
if (timeout)
addtimer(CALLBACK(src, .proc/close), timeout)
/datum/browser/alert/close()
.=..()
opentime = 0
/datum/browser/alert/proc/wait()
while (opentime && selectedbutton <= 0 && (!timeout || opentime+timeout > world.time))
stoplag(1)
/datum/browser/alert/Topic(href,href_list)
/datum/browser/modal/alert/Topic(href,href_list)
if (href_list["close"] || !user || !user.client)
opentime = 0
return
@@ -210,12 +170,141 @@
User = C.mob
else
return
var/datum/browser/alert/A = new(User, Message, Title, Button1, Button2, Button3, StealFocus, Timeout)
var/datum/browser/modal/alert/A = new(User, Message, Title, Button1, Button2, Button3, StealFocus, Timeout)
A.open()
A.wait()
if (A.selectedbutton)
return A.selectedbutton
/datum/browser/modal
var/opentime = 0
var/timeout
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)
..()
stealfocus = StealFocus
if (!StealFocus)
window_options += "focus=false;"
timeout = Timeout
/datum/browser/modal/close()
.=..()
opentime = 0
/datum/browser/modal/open()
set waitfor = 0
opentime = world.time
if (stealfocus)
. = ..(use_onclose = 1)
else
var/focusedwindow = winget(user, null, "focus")
. = ..(use_onclose = 1)
//waits for the window to show up client side before attempting to un-focus it
//winexists sleeps until it gets a reply from the client, so we don't need to bother sleeping
for (var/i in 1 to 10)
if (user && winexists(user, window_id))
if (focusedwindow)
winset(user, focusedwindow, "focus=true")
else
winset(user, "mapwindow", "focus=true")
break
if (timeout)
addtimer(CALLBACK(src, .proc/close), timeout)
/datum/browser/modal/proc/wait()
while (opentime && selectedbutton <= 0 && (!timeout || opentime+timeout > world.time))
stoplag(1)
/datum/browser/modal/listpicker
var/valueslist = list()
/datum/browser/modal/listpicker/New(User,Message,Title,Button1="Ok",Button2,Button3,StealFocus = 1, Timeout = FALSE,list/values,inputtype="checkbox")
if (!User)
return
var/output = {"<form><input type="hidden" name="src" value="[REF(src)]"><ul class="sparse">"}
if (inputtype == "checkbox" || inputtype == "radio")
for (var/i in values)
output += {"<li>
<label class="switch">
<input type="[inputtype]" value="1" name="[i["name"]]"[i["checked"] ? " checked" : ""]>
<div class="slider"></div>
<span>[i["name"]]</span>
</label>
</li>"}
else
for (var/i in values)
output += {"<li><input id="name="[i["name"]]"" style="width: 50px" type="[type]" name="[i["name"]]" value="[i["value"]]">
<label for="[i["name"]]">[i["name"]]</label></li>"}
output += {"</ul><div style="text-align:center">
<button type="submit" name="button" value="1" style="font-size:large;float:[( Button2 ? "left" : "right" )]">[Button1]</button>"}
if (Button2)
output += {"<button type="submit" name="button" value="2" style="font-size:large;[( Button3 ? "" : "float:right" )]">[Button2]</button>"}
if (Button3)
output += {"<button type="submit" name="button" value="3" style="font-size:large;float:right">[Button3]</button>"}
output += {"</form></div>"}
..(User, ckey("[User]-[Message]-[Title]-[world.time]-[rand(1,10000)]"), Title, 350, 350, src, StealFocus, Timeout)
set_content(output)
/datum/browser/modal/listpicker/Topic(href,href_list)
if (href_list["close"] || !user || !user.client)
opentime = 0
return
if (href_list["button"])
var/button = text2num(href_list["button"])
if (button <= 3 && button >= 1)
selectedbutton = button
for (var/item in href_list)
switch(item)
if ("close", "button", "src")
continue
else
valueslist[item] = href_list[item]
opentime = 0
close()
/proc/presentpicker(var/mob/User,Message, Title, Button1="Ok", Button2, Button3, StealFocus = 1,Timeout = 6000,list/values, inputtype = "checkbox")
if (!istype(User))
if (istype(User, /client/))
var/client/C = User
User = C.mob
else
return
var/datum/browser/modal/listpicker/A = new(User, Message, Title, Button1, Button2, Button3, StealFocus,Timeout, values, inputtype)
A.open()
A.wait()
if (A.selectedbutton)
return list("button" = A.selectedbutton, "values" = A.valueslist)
/proc/input_bitfield(var/mob/User, title, bitfield, current_value)
if (!User || !(bitfield in GLOB.bitfields))
return
var/list/pickerlist = list()
for (var/i in GLOB.bitfields[bitfield])
if (current_value & GLOB.bitfields[bitfield][i])
pickerlist += list(list("checked" = 1, "value" = GLOB.bitfields[bitfield][i], "name" = i))
else
pickerlist += list(list("checked" = 0, "value" = GLOB.bitfields[bitfield][i], "name" = i))
var/list/result = presentpicker(User, "", title, Button1="Save", Button2 = "Cancel", Timeout=FALSE, values = pickerlist)
if (islist(result))
if (result["button"] == 2) // If the user pressed the cancel button
return
. = 0
for (var/flag in result["values"])
. |= GLOB.bitfields[bitfield][flag]
else
return
// This will allow you to show an icon in the browse window
// This is added to mob so that it can be used without a reference to the browser object
// There is probably a better place for this...
+62 -22
View File
@@ -433,6 +433,12 @@
else
item = "<a href='?_src_=vars;[HrefToken()];Vars=[REF(value)]'>[VV_HTML_ENCODE(name)] = /list ([L.len])</a>"
else if (name in GLOB.bitfields)
var/list/flags = list()
for (var/i in GLOB.bitfields[name])
if (value & GLOB.bitfields[name][i])
flags += i
item = "[VV_HTML_ENCODE(name)] = [VV_HTML_ENCODE(jointext(flags, ", "))]"
else
item = "[VV_HTML_ENCODE(name)] = <span class='value'>[VV_HTML_ENCODE(value)]</span>"
@@ -453,7 +459,7 @@
src.debug_variables(DAT)
else if(href_list["mob_player_panel"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/mob/M = locate(href_list["mob_player_panel"]) in GLOB.mob_list
@@ -477,7 +483,7 @@
href_list["datumrefresh"] = href_list["godmode"]
else if(href_list["mark_object"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/datum/D = locate(href_list["mark_object"])
@@ -489,7 +495,7 @@
href_list["datumrefresh"] = href_list["mark_object"]
else if(href_list["proc_call"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/T = locate(href_list["proc_call"])
@@ -513,7 +519,7 @@
usr.client.object_say(locate(href_list["osay"]))
else if(href_list["regenerateicons"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/mob/M = locate(href_list["regenerateicons"]) in GLOB.mob_list
@@ -550,7 +556,7 @@
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
if(href_list["rename"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/mob/M = locate(href_list["rename"]) in GLOB.mob_list
@@ -567,7 +573,7 @@
href_list["datumrefresh"] = href_list["rename"]
else if(href_list["varnameedit"] && href_list["datumedit"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/D = locate(href_list["datumedit"])
@@ -578,7 +584,7 @@
modify_variables(D, href_list["varnameedit"], 1)
else if(href_list["varnamechange"] && href_list["datumchange"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/D = locate(href_list["datumchange"])
@@ -589,7 +595,7 @@
modify_variables(D, href_list["varnamechange"], 0)
else if(href_list["varnamemass"] && href_list["datummass"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/datum/D = locate(href_list["datummass"])
@@ -698,7 +704,7 @@
message_admins("[key_name_admin(src)] modified list's contents: SHUFFLE")
else if(href_list["give_spell"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/mob/M = locate(href_list["give_spell"]) in GLOB.mob_list
@@ -710,7 +716,7 @@
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["remove_spell"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/mob/M = locate(href_list["remove_spell"]) in GLOB.mob_list
@@ -722,7 +728,7 @@
href_list["datumrefresh"] = href_list["remove_spell"]
else if(href_list["give_disease"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/mob/M = locate(href_list["give_disease"]) in GLOB.mob_list
@@ -757,7 +763,7 @@
href_list["datumrefresh"] = href_list["build_mode"]
else if(href_list["drop_everything"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/mob/M = locate(href_list["drop_everything"]) in GLOB.mob_list
@@ -769,7 +775,7 @@
usr.client.cmd_admin_drop_everything(M)
else if(href_list["direct_control"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/mob/M = locate(href_list["direct_control"]) in GLOB.mob_list
@@ -781,7 +787,7 @@
usr.client.cmd_assume_direct_control(M)
else if(href_list["offer_control"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/mob/M = locate(href_list["offer_control"]) in GLOB.mob_list
@@ -790,6 +796,41 @@
return
offer_control(M)
else if (href_list["modarmor"])
if(!check_rights(NONE))
return
var/obj/O = locate(href_list["modarmor"])
if(!istype(O))
to_chat(usr, "This can only be used on instances of type /obj")
return
var/list/pickerlist = list()
var/list/armorlist = O.armor.getList()
for (var/i in armorlist)
pickerlist += list(list("value" = armorlist[i], "name" = i))
var/list/result = presentpicker(usr, "Modify armor", "Modify armor: [O]", Button1="Save", Button2 = "Cancel", Timeout=FALSE, Type = "text", values = pickerlist)
if (islist(result))
if (result["button"] == 2) // If the user pressed the cancel button
return
// text2num conveniently returns a null on invalid values
O.armor = O.armor.setRating(melee = text2num(result["values"]["melee"]),\
bullet = text2num(result["values"]["bullet"]),\
laser = text2num(result["values"]["laser"]),\
energy = text2num(result["values"]["energy"]),\
bomb = text2num(result["values"]["bomb"]),\
bio = text2num(result["values"]["bio"]),\
rad = text2num(result["values"]["rad"]),\
fire = text2num(result["values"]["fire"]),\
acid = text2num(result["values"]["acid"]))
log_admin("[key_name(usr)] modified the armor on [O] ([O.type]) to melee: [O.armor.melee], bullet: [O.armor.bullet], laser: [O.armor.laser], energy: [O.armor.energy], bomb: [O.armor.bomb], bio: [O.armor.bio], rad: [O.armor.rad], fire: [O.armor.fire], acid: [O.armor.acid]")
message_admins("<span class='notice'>[key_name_admin(usr)] modified the armor on [O] ([O.type]) to melee: [O.armor.melee], bullet: [O.armor.bullet], laser: [O.armor.laser], energy: [O.armor.energy], bomb: [O.armor.bomb], bio: [O.armor.bio], rad: [O.armor.rad], fire: [O.armor.fire], acid: [O.armor.acid]</span>")
else
return
else if(href_list["delall"])
if(!check_rights(R_DEBUG|R_SERVER))
return
@@ -837,7 +878,7 @@
message_admins("<span class='notice'>[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) </span>")
else if(href_list["addreagent"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/atom/A = locate(href_list["addreagent"])
@@ -927,7 +968,7 @@
href_list["datumrefresh"] = href_list["modtransform"]
else if(href_list["rotatedatum"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/atom/A = locate(href_list["rotatedatum"])
@@ -943,7 +984,7 @@
href_list["datumrefresh"] = href_list["rotatedatum"]
else if(href_list["editorgans"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/mob/living/carbon/C = locate(href_list["editorgans"]) in GLOB.mob_list
@@ -955,7 +996,7 @@
href_list["datumrefresh"] = href_list["editorgans"]
else if(href_list["givetrauma"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/mob/living/carbon/C = locate(href_list["givetrauma"]) in GLOB.mob_list
@@ -978,7 +1019,7 @@
href_list["datumrefresh"] = href_list["givetrauma"]
else if(href_list["curetraumas"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/mob/living/carbon/C = locate(href_list["curetraumas"]) in GLOB.mob_list
@@ -991,7 +1032,7 @@
href_list["datumrefresh"] = href_list["curetraumas"]
else if(href_list["hallucinate"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/mob/living/carbon/C = locate(href_list["hallucinate"]) in GLOB.mob_list
@@ -1204,7 +1245,7 @@
admin_ticket_log(H, msg)
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
if(!check_rights(0))
if(!check_rights(NONE))
return
var/mob/living/L = locate(href_list["mobToDamage"]) in GLOB.mob_list
@@ -1244,4 +1285,3 @@
message_admins(msg)
admin_ticket_log(L, msg)
href_list["datumrefresh"] = href_list["mobToDamage"]
@@ -10,7 +10,7 @@ DNA Saboteur
Fatal Level.
Bonus
Cleans the DNA of a person and then randomly gives them a disability.
Cleans the DNA of a person and then randomly gives them a trait.
//////////////////////////////////////
*/
@@ -233,7 +233,7 @@
/datum/symptom/heal/coma/CanHeal(datum/disease/advance/A)
var/mob/living/M = A.affected_mob
if(M.status_flags & FAKEDEATH)
if(M.has_trait(TRAIT_FAKEDEATH))
return power
else if(M.IsUnconscious() || M.stat == UNCONSCIOUS)
return power * 0.9
@@ -249,7 +249,7 @@
/datum/symptom/heal/coma/proc/coma(mob/living/M)
if(deathgasp)
M.emote("deathgasp")
M.status_flags |= FAKEDEATH
M.fakedeath("regenerative_coma")
M.update_stat()
M.update_canmove()
addtimer(CALLBACK(src, .proc/uncoma, M), 300)
@@ -258,7 +258,7 @@
if(!active_coma)
return
active_coma = FALSE
M.status_flags &= ~FAKEDEATH
M.cure_fakedeath("regenerative_coma")
M.update_stat()
M.update_canmove()
@@ -86,14 +86,14 @@
if(4, 5)
M.restoreEars()
if(M.has_disability(DISABILITY_BLIND, EYE_DAMAGE))
if(M.has_trait(TRAIT_BLIND, EYE_DAMAGE))
if(prob(20))
to_chat(M, "<span class='notice'>Your vision slowly returns...</span>")
M.cure_blind(EYE_DAMAGE)
M.cure_nearsighted(EYE_DAMAGE)
M.blur_eyes(35)
else if(M.has_disability(DISABILITY_NEARSIGHT, EYE_DAMAGE))
else if(M.has_trait(TRAIT_NEARSIGHT, EYE_DAMAGE))
to_chat(M, "<span class='notice'>You can finally focus your eyes on distant objects.</span>")
M.cure_nearsighted(EYE_DAMAGE)
M.blur_eyes(10)
@@ -61,7 +61,7 @@ Bonus
M.become_nearsighted(EYE_DAMAGE)
if(prob(eyes.eye_damage - 10 + 1))
if(!remove_eyes)
if(!M.has_disability(DISABILITY_BLIND))
if(!M.has_trait(TRAIT_BLIND))
to_chat(M, "<span class='userdanger'>You go blind!</span>")
M.become_blind(EYE_DAMAGE)
else
+4 -3
View File
@@ -204,12 +204,13 @@
..()
switch(stage)
if(1)
if(ishuman(affected_mob) && affected_mob.dna && affected_mob.dna.species.id == "slime")
stage = 5
if(ishuman(affected_mob) && affected_mob.dna)
if(affected_mob.dna.species.id == "slime" || affected_mob.dna.species.id == "stargazer" || affected_mob.dna.species.id == "lum")
stage = 5
if(3)
if(ishuman(affected_mob))
var/mob/living/carbon/human/human = affected_mob
if(human.dna.species.id != "slime")
if(human.dna.species.id != "slime" && affected_mob.dna.species.id != "stargazer" && affected_mob.dna.species.id != "lum")
human.set_species(/datum/species/jelly/slime)
/datum/disease/transformation/corgi
+53
View File
@@ -0,0 +1,53 @@
#define EMBEDID "embed-[embed_chance]-[embedded_fall_chance]-[embedded_pain_chance]-[embedded_pain_multiplier]-[embedded_fall_pain_multiplier]-[embedded_impact_pain_multiplier]-[embedded_unsafe_removal_pain_multiplier]-[embedded_unsafe_removal_time]"
/proc/getEmbeddingBehavior(embed_chance = EMBED_CHANCE,
embedded_fall_chance = EMBEDDED_ITEM_FALLOUT,
embedded_pain_chance = EMBEDDED_PAIN_CHANCE,
embedded_pain_multiplier = EMBEDDED_PAIN_MULTIPLIER,
embedded_fall_pain_multiplier = EMBEDDED_FALL_PAIN_MULTIPLIER,
embedded_impact_pain_multiplier = EMBEDDED_IMPACT_PAIN_MULTIPLIER,
embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER,
embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME)
. = locate(EMBEDID)
if (!.)
. = new /datum/embedding_behavior(embed_chance, embedded_fall_chance, embedded_pain_chance, embedded_pain_multiplier, embedded_fall_pain_multiplier, embedded_impact_pain_multiplier, embedded_unsafe_removal_pain_multiplier, embedded_unsafe_removal_time)
/datum/embedding_behavior
var/embed_chance
var/embedded_fall_chance
var/embedded_pain_chance
var/embedded_pain_multiplier //The coefficient of multiplication for the damage this item does while embedded (this*w_class)
var/embedded_fall_pain_multiplier //The coefficient of multiplication for the damage this item does when falling out of a limb (this*w_class)
var/embedded_impact_pain_multiplier //The coefficient of multiplication for the damage this item does when first embedded (this*w_class)
var/embedded_unsafe_removal_pain_multiplier //The coefficient of multiplication for the damage removing this without surgery causes (this*w_class)
var/embedded_unsafe_removal_time //A time in ticks, multiplied by the w_class.
/datum/embedding_behavior/New(embed_chance = EMBED_CHANCE,
embedded_fall_chance = EMBEDDED_ITEM_FALLOUT,
embedded_pain_chance = EMBEDDED_PAIN_CHANCE,
embedded_pain_multiplier = EMBEDDED_PAIN_MULTIPLIER,
embedded_fall_pain_multiplier = EMBEDDED_FALL_PAIN_MULTIPLIER,
embedded_impact_pain_multiplier = EMBEDDED_IMPACT_PAIN_MULTIPLIER,
embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER,
embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME)
src.embed_chance = embed_chance
src.embedded_fall_chance = embedded_fall_chance
src.embedded_pain_chance = embedded_pain_chance
src.embedded_pain_multiplier = embedded_pain_multiplier
src.embedded_fall_pain_multiplier = embedded_fall_pain_multiplier
src.embedded_impact_pain_multiplier = embedded_impact_pain_multiplier
src.embedded_unsafe_removal_pain_multiplier = embedded_unsafe_removal_pain_multiplier
src.embedded_unsafe_removal_time = embedded_unsafe_removal_time
tag = EMBEDID
/datum/embedding_behavior/proc/setRating(embed_chance, embedded_fall_chance, embedded_pain_chance, embedded_pain_multiplier, embedded_fall_pain_multiplier, embedded_impact_pain_multiplier, embedded_unsafe_removal_pain_multiplier, embedded_unsafe_removal_time)
return getEmbeddingBehavior((isnull(embed_chance) ? src.embed_chance : embed_chance),\
(isnull(embedded_fall_chance) ? src.embedded_fall_chance : embedded_fall_chance),\
(isnull(embedded_pain_chance) ? src.embedded_pain_chance : embedded_pain_chance),\
(isnull(embedded_pain_multiplier) ? src.embedded_pain_multiplier : embedded_pain_multiplier),\
(isnull(embedded_fall_pain_multiplier) ? src.embedded_fall_pain_multiplier : embedded_fall_pain_multiplier),\
(isnull(embedded_impact_pain_multiplier) ? src.embedded_impact_pain_multiplier : embedded_impact_pain_multiplier),\
(isnull(embedded_unsafe_removal_pain_multiplier) ? src.embedded_unsafe_removal_pain_multiplier : embedded_unsafe_removal_pain_multiplier),\
(isnull(embedded_unsafe_removal_time) ? src.embedded_unsafe_removal_time : embedded_unsafe_removal_time))
#undef EMBEDID
+1 -1
View File
@@ -101,7 +101,7 @@
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))
if(user.stat > stat_allowed || (user.status_flags & FAKEDEATH))
if(user.stat > stat_allowed)
to_chat(user, "<span class='notice'>You cannot [key] while unconscious.</span>")
return FALSE
if(restraint_check && (user.restrained() || user.buckled))
+7 -5
View File
@@ -12,9 +12,9 @@
logs = splittext(logs[logs.len - 1], " ")
date = unix2date(text2num(logs[5]))
commit = logs[2]
log_world("[date]")
log_world("[commit]: [date]")
logs = world.file2list(".git/logs/refs/remotes/origin/master")
if(logs)
if(logs.len)
originmastercommit = splittext(logs[logs.len - 1], " ")[2]
if(testmerge.len)
@@ -24,8 +24,9 @@
var/tmcommit = testmerge[line]["commit"]
log_world("Test merge active of PR #[line] commit [tmcommit]")
SSblackbox.record_feedback("nested tally", "testmerged_prs", 1, list("[line]", "[tmcommit]"))
log_world("Based off origin/master commit [originmastercommit]")
else
if(originmastercommit)
log_world("Based off origin/master commit [originmastercommit]")
else if(originmastercommit)
log_world(originmastercommit)
/datum/getrev/proc/GetTestMergeInfo(header = TRUE)
@@ -55,7 +56,8 @@
var/pc = GLOB.revdata.originmastercommit
to_chat(src, "[prefix]<a href=\"[CONFIG_GET(string/githuburl)]/commit/[pc]\">[copytext(pc, 1, min(length(pc), 7))]</a>")
else
to_chat(src, "Revision unknown")
to_chat(src, "Master revision unknown")
to_chat(src, "Revision: [GLOB.revdata.commit]")
if(SERVER_TOOLS_PRESENT)
to_chat(src, "Server tools version: [SERVER_TOOLS_VERSION]")
to_chat(src, "Server tools API version: [SERVER_TOOLS_API_VERSION]")
+18
View File
@@ -206,6 +206,8 @@
name = "holorecord disk"
desc = "Stores recorder holocalls."
icon_state = "holodisk"
obj_flags = UNIQUE_RENAME
materials = list(MAT_METAL = 100, MAT_GLASS = 100)
var/datum/holorecord/record
//Preset variables
var/preset_image_type
@@ -220,6 +222,22 @@
QDEL_NULL(record)
return ..()
/obj/item/disk/holodisk/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/disk/holodisk))
var/obj/item/disk/holodisk/holodiskOriginal = W
if (holodiskOriginal.record)
if (!record)
record = new
record.caller_name = holodiskOriginal.record.caller_name
record.caller_image = holodiskOriginal.record.caller_image
record.entries = holodiskOriginal.record.entries.Copy()
record.language = holodiskOriginal.record.language
to_chat(user, "You copy the record from [holodiskOriginal] to [src] by connecting the ports!")
name = holodiskOriginal.name
else
to_chat(user, "[holodiskOriginal] has no record on it!")
..()
/obj/item/disk/holodisk/proc/build_record()
record = new
var/list/lines = splittext(preset_record_text,"\n")
+17 -1
View File
@@ -11,6 +11,12 @@
var/minetype = "lavaland"
var/shuttles = list(
"cargo" = "cargo_box",
"ferry" = "ferry_fancy",
"whiteship" = "whiteship_box",
"emergency" = "emergency_box")
//Order matters here.
var/list/transition_config = list(CENTCOM = SELFLOOPING,
MAIN_STATION = CROSSLINKED,
@@ -69,6 +75,12 @@
map_path = json["map_path"]
map_file = json["map_file"]
if(islist(json["shuttles"]))
var/list/L = json["shuttles"]
for(var/key in L)
var/value = L[key]
shuttles[key] = value
minetype = json["minetype"] || minetype
allow_custom_shuttles = json["allow_custom_shuttles"] != FALSE
@@ -81,12 +93,16 @@
defaulted = FALSE
#define CHECK_EXISTS(X) if(!istext(json[X])) { log_world(X + "missing from json!"); return; }
#define CHECK_EXISTS(X) if(!istext(json[X])) { log_world("[##X] missing from json!"); return; }
/datum/map_config/proc/ValidateJSON(list/json)
CHECK_EXISTS("map_name")
CHECK_EXISTS("map_path")
CHECK_EXISTS("map_file")
var/shuttles = json["shuttles"]
if(shuttles && !islist(shuttles))
log_world("json\[shuttles\] is not a list!")
var/path = GetFullMapPath(json["map_path"], json["map_file"])
if(!fexists(path))
log_world("Map file ([path]) does not exist!")
+1 -1
View File
@@ -197,7 +197,7 @@
/obj/item/twohanded/bostaff/attack(mob/target, mob/living/user)
add_fingerprint(user)
if((user.has_disability(DISABILITY_CLUMSY)) && prob(50))
if((user.has_trait(TRAIT_CLUMSY)) && prob(50))
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
user.Knockdown(60)
if(ishuman(user))
+4 -4
View File
@@ -85,12 +85,12 @@
/datum/mutation/human/clumsy/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
owner.add_disability(DISABILITY_CLUMSY, GENETIC_MUTATION)
owner.add_trait(TRAIT_CLUMSY, GENETIC_MUTATION)
/datum/mutation/human/clumsy/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.remove_disability(DISABILITY_CLUMSY, GENETIC_MUTATION)
owner.remove_trait(TRAIT_CLUMSY, GENETIC_MUTATION)
//Tourettes causes you to randomly stand in place and shout.
@@ -124,12 +124,12 @@
/datum/mutation/human/deaf/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
owner.add_disability(DISABILITY_DEAF, GENETIC_MUTATION)
owner.add_trait(TRAIT_DEAF, GENETIC_MUTATION)
/datum/mutation/human/deaf/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.remove_disability(DISABILITY_DEAF, GENETIC_MUTATION)
owner.remove_trait(TRAIT_DEAF, GENETIC_MUTATION)
//Monified turns you into a monkey.
+5 -4
View File
@@ -5,14 +5,14 @@
get_chance = 15
lowest_value = 256 * 12
text_gain_indication = "<span class='notice'>Your muscles hurt!</span>"
species_allowed = list("human") //no skeleton/lizard hulk
species_allowed = list("fly") //no skeleton/lizard hulk
health_req = 25
/datum/mutation/human/hulk/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
var/status = CANSTUN | CANKNOCKDOWN | CANUNCONSCIOUS | CANPUSH
owner.status_flags &= ~status
owner.add_trait(TRAIT_STUNIMMUNE, TRAIT_HULK)
owner.add_trait(TRAIT_PUSHIMMUNE, TRAIT_HULK)
owner.update_body_parts()
/datum/mutation/human/hulk/on_attack_hand(mob/living/carbon/human/owner, atom/target, proximity)
@@ -27,7 +27,8 @@
/datum/mutation/human/hulk/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.status_flags |= CANSTUN | CANKNOCKDOWN | CANUNCONSCIOUS | CANPUSH
owner.remove_trait(TRAIT_STUNIMMUNE, TRAIT_HULK)
owner.remove_trait(TRAIT_PUSHIMMUNE, TRAIT_HULK)
owner.update_body_parts()
/datum/mutation/human/hulk/say_mod(message)
+2 -2
View File
@@ -30,12 +30,12 @@
/datum/mutation/human/mute/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
owner.add_disability(DISABILITY_MUTE, GENETIC_MUTATION)
owner.add_trait(TRAIT_MUTE, GENETIC_MUTATION)
/datum/mutation/human/mute/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.remove_disability(DISABILITY_MUTE, GENETIC_MUTATION)
owner.remove_trait(TRAIT_MUTE, GENETIC_MUTATION)
/datum/mutation/human/smile
+80 -2
View File
@@ -40,6 +40,28 @@
/datum/map_template/shuttle/whiteship
port_id = "whiteship"
/datum/map_template/shuttle/labour
port_id = "labour"
can_be_bought = FALSE
/datum/map_template/shuttle/mining
port_id = "mining"
can_be_bought = FALSE
/datum/map_template/shuttle/cargo
port_id = "cargo"
can_be_bought = FALSE
/datum/map_template/shuttle/arrival
port_id = "arrival"
can_be_bought = FALSE
/datum/map_template/shuttle/infiltrator
port_id = "infiltrator"
can_be_bought = FALSE
// Shuttles start here:
/datum/map_template/shuttle/emergency/airless
@@ -100,7 +122,7 @@
description = "The glorious results of centuries of plasma research done by Nanotrasen employees. This is the reason why you are here. Get on and dance like you're on fire, burn baby burn!"
admin_notes = "Flaming hot."
credit_cost = 10000
/datum/map_template/shuttle/emergency/arena
suffix = "arena"
name = "The Arena"
@@ -218,6 +240,12 @@
admin_notes = "If the crew can solve the puzzle, they will wake the wabbajack statue. It will likely not end well. There's a reason it's boarded up. Maybe they should have just left it alone."
credit_cost = 15000
/datum/map_template/shuttle/emergency/omega
suffix = "omega"
name = "Omegastation Emergency Shuttle"
description = "On the smaller size with a modern design, this shuttle is for the crew who like the cosier things, while still being able to stretch their legs."
credit_cost = 1000
/datum/map_template/shuttle/ferry/base
suffix = "base"
name = "transport ferry"
@@ -240,13 +268,18 @@
Fulfilling needs you didn't even know you had. We've got EVERYTHING, and something else!"
admin_notes = "Currently larger than ferry docking port on Box, will not hit anything, but must be force docked. Trader and ERT bodyguards are not included."
/datum/map_template/shuttle/ferry/fancy
suffix = "fancy"
name = "fancy transport ferry"
description = "At some point, someone upgraded the ferry to have fancier flooring... and less seats."
/datum/map_template/shuttle/whiteship/box
suffix = "box"
name = "NT Medical Ship"
/datum/map_template/shuttle/whiteship/meta
suffix = "meta"
name = "NT Recovery White-ship"
name = "NT Recovery Whiteship"
/datum/map_template/shuttle/whiteship/pubby
suffix = "pubby"
@@ -256,6 +289,11 @@
suffix = "cere"
name = "NT Construction Vessel"
/datum/map_template/shuttle/whiteship/delta
suffix = "delta"
name = "Unnamed NT Vessel"
admin_notes = "The Delta whiteship doesn't have a name, apparently."
/datum/map_template/shuttle/cargo/box
suffix = "box"
name = "supply shuttle (Box)"
@@ -277,3 +315,43 @@
description = "The CentCom Raven Battlecruiser is currently docked at the CentCom ship bay awaiting a mission, this Battlecruiser has been reassigned as an emergency escape shuttle for currently unknown reasons. The CentCom Raven Battlecruiser should comfortably fit a medium to large crew size crew and is complete with all required facitlities including a top of the range CentCom Medical Bay."
admin_notes = "The long way home"
credit_cost = 12500
/datum/map_template/shuttle/arrival/box
suffix = "box"
name = "arrival shuttle (Box)"
/datum/map_template/shuttle/cargo/box
suffix = "box"
name = "cargo ferry (Box)"
/datum/map_template/shuttle/mining/box
suffix = "box"
name = "mining shuttle (Box)"
/datum/map_template/shuttle/labour/box
suffix = "box"
name = "labour shuttle (Box)"
/datum/map_template/shuttle/infiltrator/basic
suffix = "basic"
name = "basic syndicate infiltrator"
/datum/map_template/shuttle/cargo/delta
suffix = "delta"
name = "cargo ferry (Delta)"
/datum/map_template/shuttle/mining/delta
suffix = "delta"
name = "mining shuttle (Delta)"
/datum/map_template/shuttle/labour/delta
suffix = "delta"
name = "labour shuttle (Delta)"
/datum/map_template/shuttle/arrival/delta
suffix = "delta"
name = "arrival shuttle (Delta)"
/datum/map_template/shuttle/arrival/pubby
suffix = "pubby"
name = "arrival shuttle (Pubby)"
+2 -2
View File
@@ -28,7 +28,7 @@
var/list/status = list()
status += "The door bolts [A.locked ? "have fallen!" : "look up."]"
status += "The test light is [A.hasPower() ? "on" : "off"]."
status += "The AI connection light is [A.aiControlDisabled || A.emagged ? "off" : "on"]."
status += "The AI connection light is [A.aiControlDisabled || (A.obj_flags & EMAGGED) ? "off" : "on"]."
status += "The check wiring light is [A.safe ? "off" : "on"]."
status += "The timer is powered [A.autoclose ? "on" : "off"]."
status += "The speed light is [A.normalspeed ? "on" : "off"]."
@@ -44,7 +44,7 @@
if(WIRE_BACKUP1, WIRE_BACKUP2) // Pulse to loose backup power.
A.loseBackupPower()
if(WIRE_OPEN) // Pulse to open door (only works not emagged and ID wire is cut or no access is required).
if(A.emagged)
if(A.obj_flags & EMAGGED)
return
if(!A.requiresID() || A.check_access(null))
if(A.density)