Merge branch 'master' of https://github.com/tgstation/tgstation into feels-like-i-didn't-even-try

This commit is contained in:
tralezab
2019-05-27 08:54:14 -07:00
249 changed files with 3575 additions and 2591 deletions
@@ -38,7 +38,6 @@
/obj/effect/decal/cleanable/trail_holder //not a child of blood on purpose
name = "blood"
icon = 'icons/effects/blood.dmi'
icon_state = "ltrails_1"
desc = "Your instincts say you shouldn't be following these."
var/list/existing_dirs = list()
@@ -20,6 +20,9 @@ would spawn and follow the beaker, even if it is carried or thrown.
GLOB.cameranet.updateVisibility(src)
return ..()
/obj/effect/particle_effect/newtonian_move() // Prevents effects from getting registered for SSspacedrift
return TRUE
/datum/effect_system
var/number = 3
var/cardinals = FALSE
@@ -5,19 +5,23 @@
anchored = TRUE
/obj/effect/particle_effect/expl_particles/Initialize()
. = ..()
QDEL_IN(src, 15)
..()
return INITIALIZE_HINT_LATELOAD
/obj/effect/particle_effect/expl_particles/LateInitialize()
var/direct = pick(GLOB.alldirs)
var/steps_amt = pick(1;25,2;50,3,4;200)
for(var/j in 1 to steps_amt)
step(src, direct)
sleep(1)
qdel(src)
/datum/effect_system/expl_particles
number = 10
/datum/effect_system/expl_particles/start()
for(var/i in 1 to number)
var/obj/effect/particle_effect/expl_particles/expl = new /obj/effect/particle_effect/expl_particles(location)
var/direct = pick(GLOB.alldirs)
var/steps_amt = pick(1;25,2;50,3,4;200)
for(var/j in 1 to steps_amt)
addtimer(CALLBACK(GLOBAL_PROC, .proc/_step, expl, direct), j)
new /obj/effect/particle_effect/expl_particles(location)
/obj/effect/explosion
name = "fire"
@@ -25,13 +25,17 @@
light_color = LIGHT_COLOR_FIRE
/obj/effect/particle_effect/sparks/Initialize()
. = ..()
..()
return INITIALIZE_HINT_LATELOAD
/obj/effect/particle_effect/sparks/LateInitialize()
flick("sparks", src) // replay the animation
playsound(src, "sparks", 100, TRUE)
var/turf/T = loc
if(isturf(T))
T.hotspot_expose(1000,100)
QDEL_IN(src, 20)
sleep(20)
qdel(src)
/obj/effect/particle_effect/sparks/Destroy()
var/turf/T = loc
@@ -46,9 +46,6 @@
for(var/j = 1, j<= gibamounts[i], j++)
var/gibType = gibtypes[i]
gib = new gibType(loc, diseases)
if(iscarbon(loc))
var/mob/living/carbon/digester = loc
digester.stomach_contents += gib
gib.add_blood_DNA(dna_to_add)
+1 -5
View File
@@ -94,9 +94,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
// non-clothing items
var/datum/dog_fashion/dog_fashion = null
var/datum/rpg_loot/rpg_loot = null
//Tooltip vars
var/force_string //string form of an item's force. Edit this var only to set a custom force string
var/last_force_string_check = 0
@@ -121,7 +118,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
actions_types = null
if(GLOB.rpg_loot_items)
rpg_loot = new(src)
AddComponent(/datum/component/fantasy)
if(force_string)
item_flags |= FORCE_STRING_OVERRIDE
@@ -146,7 +143,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
m.temporarilyRemoveItemFromInventory(src, TRUE)
for(var/X in actions)
qdel(X)
QDEL_NULL(rpg_loot)
return ..()
/obj/item/proc/check_allowed_items(atom/target, not_inside, target_self)
+1 -1
View File
@@ -278,7 +278,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
/obj/item/pipe_dispenser/ui_act(action, params)
if(..())
return
if(!usr.canUseTopic(src))
if(!usr.canUseTopic(src, BE_CLOSE))
return
var/playeffect = TRUE
switch(action)
+1 -1
View File
@@ -173,7 +173,7 @@ RSF
to_chat(user, "Fabricating Cookie..")
var/obj/item/reagent_containers/food/snacks/cookie/S = new /obj/item/reagent_containers/food/snacks/cookie(T)
if(toxin)
S.reagents.add_reagent("chloralhydratedelayed", 10)
S.reagents.add_reagent("chloralhydrate", 10)
if (iscyborg(user))
var/mob/living/silicon/robot/R = user
R.cell.charge -= 100
+5 -8
View File
@@ -59,7 +59,7 @@
/obj/item/areaeditor/blueprints/attack_self(mob/user)
. = ..()
if(!legend)
var/area/A = get_area()
var/area/A = get_area(user)
if(get_area_type() == AREA_STATION)
. += "<p>According to \the [src], you are now in <b>\"[html_encode(A.name)]\"</b>.</p>"
. += "<p><a href='?src=[REF(src)];edit_area=1'>Change area name</a></p>"
@@ -140,12 +140,9 @@
legend = FALSE
/obj/item/areaeditor/proc/get_area()
var/turf/T = get_turf(usr)
var/area/A = T.loc
return A
/obj/item/areaeditor/proc/get_area_type(area/A = get_area())
/obj/item/areaeditor/proc/get_area_type(area/A)
if (!A)
A = get_area(usr)
if(A.outdoors)
return AREA_SPACE
var/list/SPECIALS = list(
@@ -183,7 +180,7 @@
return ""
/obj/item/areaeditor/proc/edit_area()
var/area/A = get_area()
var/area/A = get_area(usr)
var/prevname = "[A.name]"
var/str = stripped_input(usr,"New area name:", "Area Creation", "", MAX_NAME_LEN)
if(!str || !length(str) || str==prevname) //cancel
+1 -1
View File
@@ -88,7 +88,7 @@
to_chat(user, "<span class='warning'>Take the cap off first!</span>")
return
var/new_appearance = input(user, "Choose a new appearance for [src].", "26th Century Deception") as null|anything in possible_appearances
if(!new_appearance || !crayon || !user.canUseTopic(src))
if(!new_appearance || !crayon || !user.canUseTopic(src, BE_CLOSE))
return
if(!do_after(user, 10, FALSE, src, TRUE))
return
+10 -3
View File
@@ -125,6 +125,13 @@
if(mapload && access_txt)
access = text2access(access_txt)
/obj/item/card/id/Destroy()
if (registered_account)
registered_account.bank_cards -= src
if (my_store && my_store.my_card == src)
my_store.my_card = null
return ..()
/obj/item/card/id/attack_self(mob/user)
if(Adjacent(user))
user.visible_message("<span class='notice'>[user] shows you: [icon2html(src, viewers(user))] [src.name].</span>", "<span class='notice'>You show \the [src.name].</span>")
@@ -175,7 +182,7 @@
return
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
return TRUE
/obj/item/card/id/AltClick(mob/living/user)
@@ -199,7 +206,7 @@
return
if (world.time < registered_account.withdrawDelay)
registered_account.bank_card_talk("<span class='warning'>ERROR: UNABLE TO LOGIN DUE TO SCHEDULED MAINTENANCE. MAINTENANCE IS SCHEDULED TO COMPLETE IN [(registered_account.withdrawDelay - world.time)/10] SECONDS.</span>", TRUE)
registered_account.bank_card_talk("<span class='warning'>ERROR: UNABLE TO LOGIN DUE TO SCHEDULED MAINTENANCE. MAINTENANCE IS SCHEDULED TO COMPLETE IN [(registered_account.withdrawDelay - world.time)/10] SECONDS.</span>", TRUE)
return
var/amount_to_remove = FLOOR(input(user, "How much do you want to withdraw? Current Balance: [registered_account.account_balance]", "Withdraw Funds", 5) as num, 1)
@@ -216,7 +223,7 @@
return
else
var/difference = amount_to_remove - registered_account.account_balance
registered_account.bank_card_talk("<span class='warning'>ERROR: The linked account requires [difference] more credit\s to perform that withdrawal.</span>", TRUE)
registered_account.bank_card_talk("<span class='warning'>ERROR: The linked account requires [difference] more credit\s to perform that withdrawal.</span>", TRUE)
/obj/item/card/id/examine(mob/user)
..()
@@ -185,6 +185,14 @@
/obj/item/stack/cable_coil = 1,
/obj/item/stock_parts/subspace/filter = 1)
/obj/item/circuitboard/machine/telecomms/message_server
name = "Messaging Server (Machine Board)"
build_path = /obj/machinery/telecomms/message_server
req_components = list(
/obj/item/stock_parts/manipulator = 2,
/obj/item/stack/cable_coil = 1,
/obj/item/stock_parts/subspace/filter = 3)
/obj/item/circuitboard/machine/teleporter_hub
name = "Teleporter Hub (Machine Board)"
build_path = /obj/machinery/teleport/hub
+10 -9
View File
@@ -17,7 +17,9 @@
if(alert(user, "Are you sure you want to crash this market with no survivors?", "Protocol CRAB-17", "Yes", "No") == "Yes")
if(dumped || QDELETED(src)) //Prevents fuckers from cheesing alert
return FALSE
var/turf/targetturf = get_random_station_turf()
var/turf/targetturf = get_safe_random_station_turf()
if (!targetturf)
return FALSE
new /obj/effect/dumpeetTarget(targetturf, user)
dumped = TRUE
@@ -31,7 +33,7 @@
density = TRUE
pixel_z = -8
layer = LARGE_MOB_LAYER
max_integrity = 3000
max_integrity = 600
var/list/accounts_to_rob
var/mob/living/carbon/human/bogdanoff
var/canwalk = FALSE
@@ -78,7 +80,7 @@
add_overlay("hatch")
add_overlay("legs_retracted")
addtimer(CALLBACK(src, .proc/startUp), 50)
START_PROCESSING(SSfastprocess, src)
/obj/structure/checkoutmachine/proc/startUp() //very VERY snowflake code that adds a neat animation when the pod lands.
start_dumping() //The machine doesnt move during this time, giving people close by a small window to grab their funds before it starts running around
@@ -141,11 +143,12 @@
cut_overlay("text")
add_overlay("text")
canwalk = TRUE
START_PROCESSING(SSfastprocess, src)
/obj/structure/checkoutmachine/Destroy()
stop_dumping()
STOP_PROCESSING(SSfastprocess, src)
priority_announce("The credit deposit machine at [get_area(src).name] has been destroyed. Station funds have stopped draining!", sender_override = "CRAB-17 Protocol")
priority_announce("The credit deposit machine at [get_area(src)] has been destroyed. Station funds have stopped draining!", sender_override = "CRAB-17 Protocol")
explosion(src, 0,0,1, flame_range = 2)
return ..()
@@ -167,12 +170,10 @@
var/datum/bank_account/account = bogdanoff.get_bank_account()
if (account) // get_bank_account() may return FALSE
account.transfer_money(B, amount)
B.bank_card_talk("You have lost [percentage_lost * 100]% of your funds! A spacecoin credit deposit machine is located at: [get_area(src).name].")
B.bank_card_talk("You have lost [percentage_lost * 100]% of your funds! A spacecoin credit deposit machine is located at: [get_area(src)].")
addtimer(CALLBACK(src, .proc/dump), 150) //Drain every 15 seconds
/obj/structure/checkoutmachine/process()
if(!canwalk)
return
var/anydir = pick(GLOB.cardinals)
if(Process_Spacemove(anydir))
Move(get_step(src, anydir), anydir)
@@ -208,13 +209,13 @@
. = ..()
bogdanoff = user
addtimer(CALLBACK(src, .proc/startLaunch), 100)
sound_to_playing_players('sound/items/dump_it.ogg', 50)
sound_to_playing_players('sound/items/dump_it.ogg', 20)
deadchat_broadcast("<span class='deadsay'>Protocol CRAB-17 has been activated. A space-coin market has been launched at the station!</span>", turf_target = get_turf(src))
/obj/effect/dumpeetTarget/proc/startLaunch()
DF = new /obj/effect/dumpeetFall(drop_location())
dump = new /obj/structure/checkoutmachine(null, bogdanoff)
priority_announce("The spacecoin bubble has popped! Get to the credit deposit machine at [get_area(src).name] and cash out before you lose all of your funds!", sender_override = "CRAB-17 Protocol")
priority_announce("The spacecoin bubble has popped! Get to the credit deposit machine at [get_area(src)] and cash out before you lose all of your funds!", sender_override = "CRAB-17 Protocol")
animate(DF, pixel_z = -8, time = 5, , easing = LINEAR_EASING)
playsound(src, 'sound/weapons/mortar_whistle.ogg', 70, 1, 6)
addtimer(CALLBACK(src, .proc/endLaunch), 5, TIMER_CLIENT_TIME) //Go onto the last step after a very short falling animation
+9 -9
View File
@@ -61,7 +61,6 @@ GLOBAL_LIST_EMPTY(PDAs)
var/note = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant!" //Current note in the notepad function
var/notehtml = ""
var/notescanned = FALSE // True if what is in the notekeeper was from a paper.
var/detonatable = TRUE // Can the PDA be blown up?
var/hidden = FALSE // Is the PDA hidden from the PDA list?
var/emped = FALSE
var/equipped = FALSE //used here to determine if this is the first time its been picked up
@@ -631,7 +630,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if (!string_targets.len)
return
var/datum/signal/subspace/pda/signal = new(src, list(
var/datum/signal/subspace/messaging/pda/signal = new(src, list(
"name" = "[owner]",
"job" = "[ownjob]",
"message" = message,
@@ -663,7 +662,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if (everyone)
last_everyone = world.time
/obj/item/pda/proc/receive_message(datum/signal/subspace/pda/signal)
/obj/item/pda/proc/receive_message(datum/signal/subspace/messaging/pda/signal)
tnote += "<i><b>&larr; From <a href='byond://?src=[REF(src)];choice=Message;target=[REF(signal.source)]'>[signal.data["name"]]</a> ([signal.data["job"]]):</b></i><br>[signal.format_message()]<br>"
if (!silent)
@@ -892,8 +891,6 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/pda/proc/explode() //This needs tuning.
if(!detonatable)
return
var/turf/T = get_turf(src)
if (ismob(loc))
@@ -925,7 +922,7 @@ GLOBAL_LIST_EMPTY(PDAs)
//AI verb and proc for sending PDA messages.
/mob/living/silicon/ai/proc/cmd_send_pdamesg(mob/user)
/mob/living/silicon/proc/cmd_send_pdamesg(mob/user)
var/list/plist = list()
var/list/namecounts = list()
@@ -960,7 +957,7 @@ GLOBAL_LIST_EMPTY(PDAs)
aiPDA.create_message(src, selected)
/mob/living/silicon/ai/verb/cmd_toggle_pda_receiver()
/mob/living/silicon/verb/cmd_toggle_pda_receiver()
set category = "AI Commands"
set name = "PDA - Toggle Sender/Receiver"
if(usr.stat == DEAD)
@@ -971,7 +968,7 @@ GLOBAL_LIST_EMPTY(PDAs)
else
to_chat(usr, "You do not have a PDA. You should make an issue report about this.")
/mob/living/silicon/ai/verb/cmd_toggle_pda_silent()
/mob/living/silicon/verb/cmd_toggle_pda_silent()
set category = "AI Commands"
set name = "PDA - Toggle Ringer"
if(usr.stat == DEAD)
@@ -983,7 +980,7 @@ GLOBAL_LIST_EMPTY(PDAs)
else
to_chat(usr, "You do not have a PDA. You should make an issue report about this.")
/mob/living/silicon/ai/proc/cmd_show_message_log(mob/user)
/mob/living/silicon/proc/cmd_show_message_log(mob/user)
if(incapacitated())
return
if(!isnull(aiPDA))
@@ -1012,6 +1009,9 @@ GLOBAL_LIST_EMPTY(PDAs)
continue
. += P
/obj/item/pda/proc/pda_no_detonate()
return COMPONENT_PDA_NO_DETONATE
#undef PDA_SCANNER_NONE
#undef PDA_SCANNER_MEDICAL
#undef PDA_SCANNER_FORENSICS
@@ -22,7 +22,6 @@
icon = null
ttone = "data"
fon = FALSE
detonatable = FALSE
/obj/item/pda/ai/attack_self(mob/user)
if ((honkamt > 0) && (prob(60)))//For clown virus.
@@ -33,7 +32,9 @@
/obj/item/pda/ai/pai
ttone = "assist"
/obj/item/pda/ai/Initialize()
. = ..()
RegisterSignal(src, COMSIG_PDA_CHECK_DETONATE, .proc/pda_no_detonate)
/obj/item/pda/medical
name = "medical PDA"
@@ -120,7 +121,10 @@
default_cartridge = /obj/item/cartridge/captain
inserted_item = /obj/item/pen/fountain/captain
icon_state = "pda-captain"
detonatable = FALSE
/obj/item/pda/captain/Initialize()
. = ..()
RegisterSignal(src, COMSIG_PDA_CHECK_DETONATE, .proc/pda_no_detonate)
/obj/item/pda/cargo
name = "cargo technician PDA"
@@ -71,8 +71,7 @@
difficulty++ //if cartridge has manifest access it has extra snowflake difficulty
else
difficulty += 2
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, target)
if(!target.detonatable || prob(difficulty * 15) || (hidden_uplink))
if(SEND_SIGNAL(target, COMSIG_PDA_CHECK_DETONATE) & COMPONENT_PDA_NO_DETONATE || prob(difficulty * 15))
U.show_message("<span class='danger'>An error flashes on your [src].</span>", 1)
else
log_bomber(U, "triggered a PDA explosion on", target, "[!is_special_character(U) ? "(TRIGGED BY NON-ANTAG)" : ""]")
+1 -1
View File
@@ -472,7 +472,7 @@ GENE SCANNER
/obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens
..()
if(user.canUseTopic(src))
if(user.canUseTopic(src, BE_CLOSE))
if(cooldown)
to_chat(user, "<span class='warning'>[src]'s barometer function is preparing itself.</span>")
@@ -99,7 +99,7 @@
/obj/item/transfer_valve/Topic(href, href_list)
..()
if(!usr.canUseTopic(src))
if(!usr.canUseTopic(src, BE_CLOSE))
return
if(tank_one && href_list["tankone"])
split_gases()
@@ -194,6 +194,7 @@
O.forceMove(drop_location())
beakers = list()
stage_change(EMPTY)
active = FALSE
return
if(nadeassembly)
+4
View File
@@ -165,6 +165,10 @@
attack_verb = list("shanked", "shivved")
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
/obj/item/kitchen/knife/carrotshiv/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] forcefully drives \the [src] into [user.p_their()] eye! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS
/obj/item/kitchen/rollingpin
name = "rolling pin"
desc = "Used to knock out the Bartender."
+1 -1
View File
@@ -66,7 +66,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning",
H << browse(dat, "window=editicon;can_close=0;can_minimize=0;size=250x650")
/obj/item/storage/book/bible/Topic(href, href_list)
if(!usr.canUseTopic(src))
if(!usr.canUseTopic(src, BE_CLOSE))
return
if(href_list["seticon"] && SSreligion && !SSreligion.bible_icon_state)
var/iconi = text2num(href_list["seticon"])
+1 -1
View File
@@ -324,7 +324,7 @@
/obj/item/storage/pill_bottle/penacid
name = "bottle of pentetic acid pills"
desc = "Contains pills to expunge radioation and toxins"
desc = "Contains pills to expunge radiation and toxins."
/obj/item/storage/pill_bottle/penacid/PopulateContents()
for(var/i in 1 to 3)
+2
View File
@@ -333,9 +333,11 @@ That prevents a few funky behaviors.
to_chat(AI, "You have been uploaded to a stationary terminal. Remote device connection restored.")
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
card.AI = null
AI.battery = circuit.battery
qdel(src)
else //If for some reason you use an empty card on an empty AI terminal.
to_chat(user, "There is no AI loaded on this terminal!")
/obj/item/circuitboard/aicore
name = "AI core (AI Core Board)" //Well, duh, but best to be consistent
var/battery = 200 //backup battery for when the AI loses power. Copied to/from AI mobs when carding, and placed here to avoid recharge via deconning the core
@@ -417,7 +417,7 @@
/obj/structure/closet/CtrlShiftClick(mob/living/user)
if(!HAS_TRAIT(user, TRAIT_SKITTISH))
return ..()
if(!user.canUseTopic(src) || !isturf(user.loc))
if(!user.canUseTopic(src, BE_CLOSE) || !isturf(user.loc))
return
dive_into(user)
+3 -12
View File
@@ -313,18 +313,9 @@
throw_speed = 2
throw_range = 4
/obj/item/twohanded/required/kirbyplants/equipped(mob/living/user)
var/image/I = image(icon = 'icons/obj/flora/plants.dmi' , icon_state = src.icon_state, loc = user)
I.copy_overlays(src)
I.override = 1
add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/everyone, "sneaking_mission", I)
I.layer = ABOVE_MOB_LAYER
..()
/obj/item/twohanded/required/kirbyplants/dropped(mob/living/user)
..()
user.remove_alt_appearance("sneaking_mission")
/obj/item/twohanded/required/kirbyplants/Initialize()
. = ..()
AddComponent(/datum/component/tactical)
/obj/item/twohanded/required/kirbyplants/random
icon = 'icons/obj/flora/_flora.dmi'
+1 -1
View File
@@ -96,7 +96,7 @@ FLOOR SAFES
return
var/mob/living/carbon/human/user = usr
if(!user.canUseTopic(src))
if(!user.canUseTopic(src, BE_CLOSE))
return
var/canhear = FALSE