diff --git a/.gitignore b/.gitignore index 0dc17248d0..7daab15618 100644 --- a/.gitignore +++ b/.gitignore @@ -4,9 +4,3 @@ *.rsc *.dmb *.lk - -#ignore any files in config/, except those in subdirectories. -/config/* -!/config/*/* - -/baystation12.int diff --git a/baystation12.dme b/baystation12.dme index 2f11011c1f..0695839aea 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -16,6 +16,7 @@ #include "code\setup.dm" #include "code\stylesheet.dm" #include "code\world.dm" +#include "code\__HELPERS\bygex.dm" #include "code\__HELPERS\files.dm" #include "code\__HELPERS\game.dm" #include "code\__HELPERS\global_lists.dm" @@ -75,6 +76,7 @@ #include "code\ATMOSPHERICS\components\unary\vent_pump.dm" #include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm" #include "code\controllers\_DynamicAreaLighting_TG.dm" +#include "code\controllers\autotransfer.dm" #include "code\controllers\configuration.dm" #include "code\controllers\failsafe.dm" #include "code\controllers\hooks.dm" @@ -223,6 +225,7 @@ #include "code\game\gamemodes\malfunction\malfunction.dm" #include "code\game\gamemodes\meteor\meteor.dm" #include "code\game\gamemodes\meteor\meteors.dm" +#include "code\game\gamemodes\ninja\ninja.dm" #include "code\game\gamemodes\nuclear\nuclear.dm" #include "code\game\gamemodes\nuclear\nuclearbomb.dm" #include "code\game\gamemodes\nuclear\pinpointer.dm" @@ -819,6 +822,7 @@ #include "code\modules\maps\reader.dm" #include "code\modules\maps\swapmaps.dm" #include "code\modules\maps\writer.dm" +#include "code\modules\mining\abandonedcrates.dm" #include "code\modules\mining\machine_input_output_plates.dm" #include "code\modules\mining\machine_processing.dm" #include "code\modules\mining\machine_stacking.dm" @@ -1241,6 +1245,7 @@ #include "code\modules\surgery\ribcage.dm" #include "code\modules\surgery\robolimbs.dm" #include "code\modules\surgery\surgery.dm" +#include "code\modules\telesci\bscrystal.dm" #include "code\modules\telesci\gps.dm" #include "code\modules\telesci\telepad.dm" #include "code\modules\telesci\telesci_computer.dm" diff --git a/bygex.dll b/bygex.dll new file mode 100644 index 0000000000..e7bdd9f9a7 Binary files /dev/null and b/bygex.dll differ diff --git a/code/__HELPERS/bygex.dm b/code/__HELPERS/bygex.dm new file mode 100644 index 0000000000..0955b10750 --- /dev/null +++ b/code/__HELPERS/bygex.dm @@ -0,0 +1,107 @@ +#ifndef LIBREGEX_LIBRARY + #define LIBREGEX_LIBRARY "bygex" +#endif + +proc + regEx_compare(str, exp) + return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regEx_compare")(str, exp)) + + regex_compare(str, exp) + return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regex_compare")(str, exp)) + + regEx_find(str, exp) + return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regEx_find")(str, exp)) + + regex_find(str, exp) + return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regex_find")(str, exp)) + + regEx_replaceall(str, exp, fmt) + return call(LIBREGEX_LIBRARY, "regEx_replaceall")(str, exp, fmt) + + regex_replaceall(str, exp, fmt) + return call(LIBREGEX_LIBRARY, "regex_replaceall")(str, exp, fmt) + + replacetextEx(str, exp, fmt) + return call(LIBREGEX_LIBRARY, "regEx_replaceallliteral")(str, exp, fmt) + + replacetext(str, exp, fmt) + return call(LIBREGEX_LIBRARY, "regex_replaceallliteral")(str, exp, fmt) + + regEx_replace(str, exp, fmt) + return call(LIBREGEX_LIBRARY, "regEx_replace")(str, exp, fmt) + + regex_replace(str, exp, fmt) + return call(LIBREGEX_LIBRARY, "regex_replace")(str, exp, fmt) + + regEx_findall(str, exp) + return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regEx_findall")(str, exp)) + + regex_findall(str, exp) + return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regex_findall")(str, exp)) + + +//upon calling a regex match or search, a /datum/regex object is created with str(haystack) and exp(needle) variables set +//it also contains a list(matches) of /datum/match objects, each of which holds the position and length of the match +//matched strings are not returned from the dll, in order to save on memory allocation for large numbers of strings +//instead, you can use regex.str(matchnum) to fetch this string as needed. +//likewise you can also use regex.pos(matchnum) and regex.len(matchnum) as shorthands +/datum/regex + var/str + var/exp + var/error + var/anchors = 0 + var/list/matches = list() + + New(str, exp, results) + src.str = str + src.exp = exp + + if(findtext(results, "Err", 1, 4)) //error message + src.error = results + else + var/list/L = params2list(results) + var/list/M + var{i;j} + for(i in L) + M = L[i] + for(j=2, j<=M.len, j+=2) + matches += new /datum/match(text2num(M[j-1]),text2num(M[j])) + anchors = (j-2)/2 + return matches + + proc + str(i) + if(!i) return str + var/datum/match/M = matches[i] + return copytext(str, M.pos, M.pos+M.len) + + pos(i) + if(!i) return 1 + var/datum/match/M = matches[i] + return M.pos + + len(i) + if(!i) return length(str) + var/datum/match/M = matches[i] + return M.len + + end(i) + if(!i) return length(str) + var/datum/match/M = matches[i] + return M.pos + M.len + + report() //debug tool + . = ":: RESULTS ::\n:: str :: [html_encode(str)]\n:: exp :: [html_encode(exp)]\n:: anchors :: [anchors]" + if(error) + . += "\n[error]" + return + for(var/i=1, i<=matches.len, ++i) + . += "\nMatch[i]\n\t[html_encode(str(i))]\n\tpos=[pos(i)] len=[len(i)]" + +/datum/match + var/pos + var/len + + New(pos, len) + src.pos = pos + src.len = len diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 0b535a44c3..8da220bf67 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -327,3 +327,41 @@ proc/isInSight(var/atom/A, var/atom/B) spawn(delay) for(var/client/C in group) C.screen -= O + +datum/projectile_data + var/src_x + var/src_y + var/time + var/distance + var/power_x + var/power_y + var/dest_x + var/dest_y + +/datum/projectile_data/New(var/src_x, var/src_y, var/time, var/distance, \ + var/power_x, var/power_y, var/dest_x, var/dest_y) + src.src_x = src_x + src.src_y = src_y + src.time = time + src.distance = distance + src.power_x = power_x + src.power_y = power_y + src.dest_x = dest_x + src.dest_y = dest_y + +/proc/projectile_trajectory(var/src_x, var/src_y, var/rotation, var/angle, var/power) + + // returns the destination (Vx,y) that a projectile shot at [src_x], [src_y], with an angle of [angle], + // rotated at [rotation] and with the power of [power] + // Thanks to VistaPOWA for this function + + var/power_x = power * cos(angle) + var/power_y = power * sin(angle) + var/time = 2* power_y / 10 //10 = g + + var/distance = time * power_x + + var/dest_x = src_x + distance*sin(rotation); + var/dest_y = src_y + distance*cos(rotation); + + return new /datum/projectile_data(src_x, src_y, time, distance, power_x, power_y, dest_x, dest_y) diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index a493aa9d08..d33f976fe7 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -194,35 +194,7 @@ proc/checkhtml(var/t) /* * Text modification */ -/proc/replacetext(text, find, replacement) - var/find_len = length(find) - if(find_len < 1) return text - . = "" - var/last_found = 1 - while(1) - var/found = findtext(text, find, last_found, 0) - . += copytext(text, last_found, found) - if(found) - . += replacement - last_found = found + find_len - continue - return . - -/proc/replacetextEx(text, find, replacement) - var/find_len = length(find) - if(find_len < 1) return text - . = "" - var/last_found = 1 - while(1) - var/found = findtextEx(text, find, last_found, 0) - . += copytext(text, last_found, found) - if(found) - . += replacement - last_found = found + find_len - continue - return . - -//Adds 'u' number of zeros ahead of the text 't' + //Adds 'u' number of zeros ahead of the text 't' /proc/add_zero(t, u) while (length(t) < u) t = "0[t]" diff --git a/code/controllers/autotransfer.dm b/code/controllers/autotransfer.dm new file mode 100644 index 0000000000..f1240a1fae --- /dev/null +++ b/code/controllers/autotransfer.dm @@ -0,0 +1,17 @@ +var/datum/controller/transfer_controller/transfer_controller + +datum/controller/transfer_controller + var/timerbuffer = 0 //buffer for time check + var/currenttick = 0 +datum/controller/transfer_controller/New() + timerbuffer = config.vote_autotransfer_initial + processing_objects += src + +datum/controller/transfer_controller/Del() + processing_objects -= src + +datum/controller/transfer_controller/proc/process() + currenttick = currenttick + 1 + if (world.time >= timerbuffer - 600) + vote.autotransfer() + timerbuffer = timerbuffer + config.vote_autotransfer_interval \ No newline at end of file diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 42ac1cdc97..f2b5f01ce3 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -43,7 +43,8 @@ var/Tickcomp = 0 var/socket_talk = 0 // use socket_talk to communicate with other processes var/list/resource_urls = null - + var/antag_hud_allowed = 0 // Ghosts can turn on Antagovision to see a HUD of who is the bad guys this round. + var/antag_hud_restricted = 0 // Ghosts that turn on Antagovision cannot rejoin the round. var/list/mode_names = list() var/list/modes = list() // allowed modes var/list/votable_modes = list() // votable modes @@ -385,6 +386,11 @@ if("ticklag") Ticklag = text2num(value) + if("allow_antag_hud") + config.antag_hud_allowed = 1 + if("antag_hud_restricted") + config.antag_hud_restricted = 1 + if("socket_talk") socket_talk = text2num(value) diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index d3ddef9f37..5e7d308a9e 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -67,6 +67,8 @@ datum/controller/game_controller/proc/setup() setupfactions() setup_economy() + transfer_controller = new + for(var/i=0, iObjective #[obj_count]: [objective.explanation_text]" @@ -252,6 +245,28 @@ var/global/vox_kills = 0 //Used to check the Inviolate. feedback_add_details("traitor_objective","[objective.type]|FAIL") count++ + var/text = "The vox raiders were:" + + for(var/datum/mind/vox in raiders) + text += "
[vox.key] was [vox.name] (" + var/obj/stack = raiders[vox] + if(get_area(stack) != locate(/area/shuttle/vox/station)) + text += "left behind)" + continue + else if(vox.current) + if(vox.current.stat == DEAD) + text += "died" + else + text += "survived" + if(vox.current.real_name != vox.name) + text += " as [vox.current.real_name]" + else + text += "body destroyed" + text += ")" + + world << text + return 1 + ..() datum/game_mode/proc/auto_declare_completion_heist() diff --git a/code/game/gamemodes/ninja/ninja.dm b/code/game/gamemodes/ninja/ninja.dm index 8dd3c45e19..026253a73b 100644 --- a/code/game/gamemodes/ninja/ninja.dm +++ b/code/game/gamemodes/ninja/ninja.dm @@ -26,18 +26,22 @@ ninja.assigned_role = "MODE" //So they aren't chosen for other jobs. ninja.special_role = "Ninja" ninja.original = ninja.current - if(ninjastart.len == 0) + + /*if(ninjastart.len == 0) ninja.current << "\red A proper starting location for you could not be found, please report this bug!" - ninja.current << "\red Attempting to place at a carpspawn." - for(var/obj/effect/landmark/L in landmarks_list) - if(L.name == "carpspawn") - ninjastart.Add(L) - if(ninjastart.len == 0 && latejoin.len > 0) - ninja.current << "\red Still no spawneable locations could be found. Defaulting to latejoin." - return 1 - else if (ninjastart.len == 0) - ninja.current << "\red Still no spawneable locations could be found. Aborting." - return 0 + ninja.current << "\red Attempting to place at a carpspawn."*/ + + //Until such a time as people want to place ninja spawn points, carpspawn will do fine. + for(var/obj/effect/landmark/L in landmarks_list) + if(L.name == "carpspawn") + ninjastart.Add(L) + if(ninjastart.len == 0 && latejoin.len > 0) + ninja.current << "\red No spawneable locations could be found. Defaulting to latejoin." + return 1 + else if (ninjastart.len == 0) + ninja.current << "\red No spawneable locations could be found. Aborting." + return 0 + return 1 /datum/game_mode/ninja/pre_setup() @@ -50,7 +54,7 @@ /datum/game_mode/ninja/post_setup() for(var/datum/mind/ninja in ninjas) if(ninja.current && !(istype(ninja.current,/mob/living/carbon/human))) return 0 - //forge_ninja_objectives(ninja) + forge_ninja_objectives(ninja) var/mob/living/carbon/human/N = ninja.current N.internal = N.s_store N.internals.icon_state = "internal1" @@ -78,7 +82,8 @@ return 1 /datum/game_mode/ninja/proc/forge_ninja_objectives(var/datum/mind/ninja) - var/objective_list[] = list(1,2,3,4,5) + + var/objective_list = list(1,2,3,4,5) for(var/i=rand(2,4),i>0,i--) switch(pick(objective_list)) if(1)//Kill diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index b8faeeef97..24a3df847a 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -166,8 +166,13 @@ var/bomb_set /obj/machinery/nuclearbomb/attack_hand(mob/user as mob) if (src.extended) - if (src.opened) - nukehack_win(user,50) + if (!ishuman(user)) + usr << "\red You don't have the dexterity to do this!" + return 1 + + if (!ishuman(user)) + usr << "\red You don't have the dexterity to do this!" + return 1 user.set_machine(src) var/dat = text("Nuclear Fission Explosive
\nAuth. Disk: []
", src, (src.auth ? "++++++++++" : "----------")) if (src.auth) @@ -216,6 +221,12 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) set name = "Make Deployable" set src in oview(1) + if (!usr.canmove || usr.stat || usr.restrained()) + return + if (!ishuman(usr)) + usr << "\red You don't have the dexterity to do this!" + return 1 + if (src.deployable) usr << "\red You close several panels to make [src] undeployable." src.deployable = 0 diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm index c75cda5dba..5bb6f1559e 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/game/machinery/biogenerator.dm @@ -100,6 +100,7 @@ dat += "Botanical gloves (250)
" dat += "Utility belt (300)
" dat += "Leather Satchel (400)
" + dat += "Cash Bag (400)
" //dat += "Other
" //dat += "Monkey (500)
" else @@ -194,6 +195,8 @@ new/obj/item/weapon/storage/belt/utility(src.loc) if("satchel") new/obj/item/weapon/storage/backpack/satchel(src.loc) + if("cashbag") + new/obj/item/weapon/storage/bag/cash(src.loc) if("monkey") new/mob/living/carbon/monkey(src.loc) processing = 0 @@ -220,4 +223,4 @@ create_product(href_list["item"],text2num(href_list["cost"])) if("menu") menustat = "menu" - updateUsrDialog() \ No newline at end of file + updateUsrDialog() diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 406e5aab98..e66c7feb44 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -116,7 +116,7 @@ //Clonepod //Start growing a human clone in the pod! -/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/datum/species/mrace) +/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/datum/species/mrace, var/languages) if(mess || attempting) return 0 var/datum/mind/clonemind = locate(mindref) @@ -195,7 +195,8 @@ H.h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3") H.species = mrace - H.add_language(mrace.language) + for(var/datum/language/L in languages) + H.add_language(L.name) H.update_mutantrace() H.suiciding = 0 src.attempting = 0 @@ -437,4 +438,4 @@ /* EMP grenade/spell effect if(istype(A, /obj/machinery/clonepod)) A:malfunction() -*/ \ No newline at end of file +*/ diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 3adeccdf91..184cc8e867 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -313,7 +313,7 @@ else if(!config.revival_cloning) temp = "Error: Unable to initiate cloning cycle." - else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"])) + else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["languages"])) temp = "Initiating cloning cycle..." records.Remove(C) del(C) @@ -323,7 +323,7 @@ var/mob/selected = find_dead_player("[C.fields["ckey"]]") selected << 'sound/machines/chime.ogg' //probably not the best sound but I think it's reasonable var/answer = alert(selected,"Do you want to return to life?","Cloning","Yes","No") - if(answer != "No" && pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["interface"])) + if(answer != "No" && pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["languages"], C.fields["interface"])) temp = "Initiating cloning cycle..." records.Remove(C) del(C) @@ -370,6 +370,7 @@ R.fields["id"] = copytext(md5(subject.real_name), 2, 6) R.fields["UI"] = subject.dna.uni_identity R.fields["SE"] = subject.dna.struc_enzymes + R.fields["languages"] = subject.languages //Add an implant if needed var/obj/item/weapon/implant/health/imp = locate(/obj/item/weapon/implant/health, subject) diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index fd34b65baa..73c7f5bd84 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -439,8 +439,18 @@ var/atom/movable/locked var/mode = 1 //1 - gravsling 2 - gravpush + var/last_fired = 0 //Concept stolen from guns. + var/fire_delay = 10 //Used to prevent spam-brute against humans. action(atom/movable/target) + + if(world.time >= last_fired + fire_delay) + last_fired = world.time + else + if (world.time % 3) + occupant_message("[src] is not ready to fire again!") + return 0 + switch(mode) if(1) if(!action_checks(target) && !locked) return diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 1b47d6f9a9..65284a054d 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -115,6 +115,7 @@ cell = C return cell = new(src) + cell.name = "high-capacity power cell" cell.charge = 15000 cell.maxcharge = 15000 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 6c38442fec..16e5ef3a9a 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -38,6 +38,7 @@ var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) var/list/allowed = null //suit storage stuff. var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers. + var/icon_override = null //Used to override hardcoded clothing dmis in human clothing proc. /obj/item/device icon = 'icons/obj/device.dmi' diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 1cdd99d133..9123617f2a 100755 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -715,8 +715,12 @@ var/global/list/obj/item/device/pda/PDAs = list() U.show_message("\red Energy feeds back into your [src]!", 1) U << browse(null, "window=pda") explode() + log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up") + message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up", 1) else U.show_message("\blue Success!", 1) + log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge and succeded") + message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge and succeded", 1) P.explode() else U << "PDA not found." @@ -1193,4 +1197,4 @@ var/global/list/obj/item/device/pda/PDAs = list() // Pass along the pulse to atoms in contents, largely added so pAIs are vulnerable to EMP /obj/item/device/pda/emp_act(severity) for(var/atom/A in src) - A.emp_act(severity) \ No newline at end of file + A.emp_act(severity) diff --git a/code/game/objects/items/weapons/implants/implantfreedom.dm b/code/game/objects/items/weapons/implants/implantfreedom.dm index 0d31eb2e5c..58d73d835a 100644 --- a/code/game/objects/items/weapons/implants/implantfreedom.dm +++ b/code/game/objects/items/weapons/implants/implantfreedom.dm @@ -1,7 +1,7 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 /obj/item/weapon/implant/freedom - name = "freedom" + name = "freedom implant" desc = "Use this to escape from those evil Red Shirts." item_color = "r" var/activation_emote = "chuckle" diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index 27935c4f87..a3e71cd8cd 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -21,6 +21,7 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A) if(reagents.has_reagent("water", 1)) A.clean_blood() + A.dirt = 0 for(var/obj/effect/O in A) if(istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay)) del(O) diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 94d24a698e..2219619720 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -9,6 +9,7 @@ * Mining Satchel * Plant Bag * Sheet Snatcher + * Cash Bag * * -Sayu */ @@ -237,4 +238,19 @@ /obj/item/weapon/storage/bag/sheetsnatcher/borg name = "Sheet Snatcher 9000" desc = "" - capacity = 500//Borgs get more because >specialization \ No newline at end of file + capacity = 500//Borgs get more because >specialization + +// ----------------------------- +// Cash Bag +// ----------------------------- + +/obj/item/weapon/storage/bag/cash + icon = 'icons/obj/storage.dmi' + icon_state = "cashbag" + name = "Cash bag" + desc = "A bag for carrying lots of cash. It's got a big dollar sign printed on the front." + storage_slots = 50; //the number of cash pieces it can carry. + max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * cash.w_class + max_w_class = 3 + w_class = 1 + can_hold = list("/obj/item/weapon/coin","/obj/item/weapon/spacecash") diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 6432f1bac7..2598a63244 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -8,7 +8,7 @@ nitrogen = MOLES_N2STANDARD var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed var/max_fire_temperature_sustained = 0 //The max temperature of the fire which it was subjected to - + var/dirt = 0 /turf/simulated/New() ..() levelupdate() @@ -21,18 +21,13 @@ if (istype(A,/mob/living/carbon)) var/mob/living/carbon/M = A if(M.lying) return + dirt++ + if (dirt > 40) + dirt = 0 + if (!locate(/obj/effect/decal/cleanable/dirt, src)) + new/obj/effect/decal/cleanable/dirt(src) if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M - if(istype(H.shoes, /obj/item/clothing/shoes/clown_shoes)) - var/obj/item/clothing/shoes/clown_shoes/O = H.shoes - if(H.m_intent == "run") - if(O.footstep >= 2) - O.footstep = 0 - playsound(src, "clownstep", 50, 1) // this will get annoying very fast. - else - O.footstep++ - else - playsound(src, "clownstep", 20, 1) var/list/bloodDNA = null if(H.shoes) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 8a74a48317..1196f14ebd 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -70,6 +70,8 @@ var/list/admin_verbs_admin = list( /client/proc/man_up, /client/proc/global_man_up, /client/proc/response_team, // Response Teams admin verb + /client/proc/toggle_antagHUD_use, + /client/proc/toggle_antagHUD_restrictions, /client/proc/allow_character_respawn /* Allows a ghost to respawn */ ) var/list/admin_verbs_ban = list( diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 671908259c..cacf616392 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -510,12 +510,18 @@ if(counter >= 5) //So things dont get squiiiiished! jobs += "" counter = 0 + + if(jobban_isbanned(M, "Internal Affairs Agent")) + jobs += "Internal Affairs Agent" + else + jobs += "Internal Affairs Agent" + jobs += "" //Non-Human (Green) counter = 0 jobs += "" - jobs += "" + jobs += "" for(var/jobPos in nonhuman_positions) if(!jobPos) continue var/datum/job/job = job_master.GetJob(jobPos) @@ -533,11 +539,15 @@ counter = 0 //pAI isn't technically a job, but it goes in here. + if(jobban_isbanned(M, "pAI")) jobs += "" else jobs += "" - + if(jobban_isbanned(M, "AntagHUD")) + jobs += "" + else + jobs += "" jobs += "
Non-human Positions
Non-human Positions
pAIpAIAntagHUDAntagHUD
" //Antagonist (Orange) @@ -583,6 +593,13 @@ else jobs += "[replacetext("Wizard", " ", " ")]" + //ERT + if(jobban_isbanned(M, "Emergency Response Team") || isbanned_dept) + jobs += "Emergency Response Team" + else + jobs += "Emergency Response Team" + + /* //Malfunctioning AI //Removed Malf-bans because they're a pain to impliment if(jobban_isbanned(M, "malf AI") || isbanned_dept) jobs += "[replacetext("Malf AI", " ", " ")]" @@ -2581,4 +2598,4 @@ show_player_info(ckey) if("list") PlayerNotesPage(text2num(href_list["index"])) - return \ No newline at end of file + return diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 3447d70e67..1f5b3181bf 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -226,42 +226,120 @@ Allow admins to set players to be able to respawn/bypass 30 min wait, without th Ccomp's first proc. */ -/client/proc/allow_character_respawn() - set category = "Special Verbs" - set name = "Allow player to respawn" - set desc = "Let's the player bypass the 30 minute wait to respawn." - if(!holder) - src << "Only administrators may use this command." - var/any = 0 +/client/proc/get_ghosts(var/notify = 0,var/what = 2) + // what = 1, return ghosts ass list. + // what = 2, return mob list + var/list/mobs = list() var/list/ghosts = list() - var/list/sortmob = sortAtom(mob_list) // get the mob list. - for(var/mob/dead/observer/M in sortmob) - mobs.Add(M) //filter it where it's only ghosts - any = 1 //if no ghosts show up, any will just be 0 + var/list/sortmob = sortAtom(mob_list) // get the mob list. + /var/any=0 + for(var/mob/dead/observer/M in sortmob) + mobs.Add(M) //filter it where it's only ghosts + any = 1 //if no ghosts show up, any will just be 0 if(!any) - src << "There doesn't appear to be any ghosts for you to select." + if(notify) + src << "There doesn't appear to be any ghosts for you to select." return for(var/mob/M in mobs) var/name = M.name - ghosts[name] = M //get the name of the mob for the popup list + ghosts[name] = M //get the name of the mob for the popup list + if(what==1) + return ghosts + else + return mobs + + +/client/proc/allow_character_respawn() + set category = "Special Verbs" + set name = "Allow player to respawn" + set desc = "Let's the player bypass the 30 minute wait to respawn or allow them to re-enter their corpse." + if(!holder) + src << "Only administrators may use this command." + var/list/ghosts= get_ghosts(1,1) var/target = input("Please, select a ghost!", "COME BACK TO LIFE!", null, null) as null|anything in ghosts if(!target) src << "Hrm, appears you didn't select a ghost" // Sanity check, if no ghosts in the list we don't want to edit a null variable and cause a runtime error. return - var/mob/M = ghosts[target] - M.timeofdeath=-19999 /* time of death is checked in /mob/verb/abandon_mob() which is the Respawn verb. + var/mob/dead/observer/G = ghosts[target] + if(G.has_enabled_antagHUD && config.antag_hud_restricted) + var/response = alert(src, "Are you sure you wish to allow this individual to play?","Ghost has used AntagHUD","Yes","No") + if(response == "No") return + G.timeofdeath=-19999 /* time of death is checked in /mob/verb/abandon_mob() which is the Respawn verb. timeofdeath is used for bodies on autopsy but since we're messing with a ghost I'm pretty sure there won't be an autopsy. */ - M:show_message(text("\blue You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead."), 1) - log_admin("[key_name(usr)] allowed [key_name(M)] to bypass the 30 minute respawn limit") - message_admins("Admin [key_name_admin(usr)] allowed [key_name_admin(M)] to bypass the 30 minute respawn limit", 1) + G.has_enabled_antagHUD = 2 + G.can_reenter_corpse = 1 + + G:show_message(text("\blue You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead."), 1) + log_admin("[key_name(usr)] allowed [key_name(G)] to bypass the 30 minute respawn limit") + message_admins("Admin [key_name_admin(usr)] allowed [key_name_admin(G)] to bypass the 30 minute respawn limit", 1) +/client/proc/toggle_antagHUD_use() + set category = "Server" + set name = "Toggle antagHUD usage" + set desc = "Toggles antagHUD usage for observers" + + if(!holder) + src << "Only administrators may use this command." + var/action="" + if(config.antag_hud_allowed) + for(var/mob/dead/observer/g in get_ghosts()) + if(!g.client.holder) //Remove the verb from non-admin ghosts + g.verbs -= /mob/dead/observer/verb/toggle_antagHUD + if(g.antagHUD) + g.antagHUD = 0 // Disable it on those that have it enabled + g.has_enabled_antagHUD = 2 // We'll allow them to respawn + g << "\red The Administrator has disabled AntagHUD " + config.antag_hud_allowed = 0 + src << "\red AntagHUD usage has been disabled" + action = "disabled" + else + for(var/mob/dead/observer/g in get_ghosts()) + if(!g.client.holder) // Add the verb back for all non-admin ghosts + g.verbs += /mob/dead/observer/verb/toggle_antagHUD + g << "\blue The Administrator has enabled AntagHUD " // Notify all observers they can now use AntagHUD + config.antag_hud_allowed = 1 + action = "enabled" + src << "\blue AntagHUD usage has been enabled" + + + log_admin("[key_name(usr)] has [action] antagHUD usage for observers") + message_admins("Admin [key_name_admin(usr)] has [action] antagHUD usage for observers", 1) + + + +/client/proc/toggle_antagHUD_restrictions() + set category = "Server" + set name = "Toggle antagHUD Restrictions" + set desc = "Restricts players that have used antagHUD from being able to join this round." + if(!holder) + src << "Only administrators may use this command." + var/action="" + if(config.antag_hud_restricted) + for(var/mob/dead/observer/g in get_ghosts()) + g << "\blue The administrator has lifted restrictions on joining the round if you use AntagHUD" + action = "lifted restrictions" + config.antag_hud_restricted = 0 + src << "\blue AntagHUD restrictions have been lifted" + else + for(var/mob/dead/observer/g in get_ghosts()) + g << "\red The administrator has placed restrictions on joining the round if you use AntagHUD" + g << "\red Your AntagHUD has been disabled, you may choose to re-enabled it but will be under restrictions " + g.antagHUD = 0 + g.has_enabled_antagHUD = 0 + action = "placed restrictions" + config.antag_hud_restricted = 1 + src << "\red AntagHUD restrictions have been enabled" + + log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD") + message_admins("Admin [key_name_admin(usr)] has [action] on joining the round if they use AntagHUD", 1) + diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 3c76e6753d..3e40aeb5d5 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -22,7 +22,7 @@ if(H.species.name in species_restricted) wearable = 1 - if(!wearable) + if(!wearable && (slot != 15 && slot != 16)) //Pockets. M << "\red Your species cannot wear [src]." return 0 diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index be7a028f2a..607dd9d808 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -128,7 +128,7 @@ desc = "Covers the eyes, preventing sight." icon_state = "blindfold" item_state = "blindfold" - vision_flags = BLIND + //vision_flags = BLIND // This flag is only supposed to be used if it causes permanent blindness, not temporary because of glasses /obj/item/clothing/glasses/sunglasses/prescription name = "prescription sunglasses" @@ -193,4 +193,4 @@ name = "Optical Thermal Implants" desc = "A set of implantable lenses designed to augment your vision" icon_state = "thermalimplants" - item_state = "syringe_kit" \ No newline at end of file + item_state = "syringe_kit" diff --git a/code/modules/clothing/gloves/ninja.dm b/code/modules/clothing/gloves/ninja.dm index 15e7c40c3b..a3cb36e8b6 100644 --- a/code/modules/clothing/gloves/ninja.dm +++ b/code/modules/clothing/gloves/ninja.dm @@ -19,6 +19,7 @@ var/candrain = 0 var/mindrain = 200 var/maxdrain = 400 + species_restricted = null /* This runs the gamut of what ninja gloves can do diff --git a/code/modules/clothing/gloves/stungloves.dm b/code/modules/clothing/gloves/stungloves.dm index fde681a4ea..7b52f3e4c9 100644 --- a/code/modules/clothing/gloves/stungloves.dm +++ b/code/modules/clothing/gloves/stungloves.dm @@ -32,7 +32,7 @@ else user << "[src] already have a cell." - else if(istype(W, /obj/item/weapon/wirecutters)) + else if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/scalpel)) wired = null @@ -43,7 +43,7 @@ cell = null if(clipped == 0) playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) - user.visible_message("\red [user] snips the fingertips off [src].","\red You snip the fingertips off [src].") + user.visible_message("\red [user] cut the fingertips off [src].","\red You cut the fingertips off [src].") clipped = 1 if("exclude" in species_restricted) name = "mangled [name]" @@ -78,4 +78,4 @@ if(wired) overlays += "gloves_wire" if(cell) - overlays += "gloves_cell" \ No newline at end of file + overlays += "gloves_cell" diff --git a/code/modules/clothing/spacesuits/alien.dm b/code/modules/clothing/spacesuits/alien.dm index a6cdefafc4..f09f3b14e6 100644 --- a/code/modules/clothing/spacesuits/alien.dm +++ b/code/modules/clothing/spacesuits/alien.dm @@ -213,4 +213,50 @@ examine() set src in view() - ..() \ No newline at end of file + ..() + +//Species-specific Syndicate rigs. + +/obj/item/clothing/head/helmet/space/rig/syndi/tajara + icon_state = "rig0-syndie-taj" + item_state = "syndie_helm" + item_color = "syndie-taj" + species_restricted = list("Tajaran") + +/obj/item/clothing/suit/space/rig/syndi/tajara + item_state = "syndie_hardsuit" + icon_state = "rig-syndie-taj" + species_restricted = list("Tajaran") + +/obj/item/clothing/head/helmet/space/rig/syndi/unathi + icon_state = "rig0-syndie-unathi" + item_state = "syndie_helm" + item_color = "syndie-unathi" + species_restricted = list("Unathi") + +/obj/item/clothing/suit/space/rig/syndi/unathi + item_state = "syndie_hardsuit" + icon_state = "rig-syndie-unathi" + species_restricted = list("Unathi") + +/obj/item/clothing/head/helmet/space/rig/syndi/skrell + icon_state = "rig0-syndie-skrell" + item_state = "syndie_helm" + item_color = "syndie-skrell" + species_restricted = list("Skrell") + +/obj/item/clothing/suit/space/rig/syndi/skrell + item_state = "syndie_hardsuit" + icon_state = "rig-syndie-skrell" + species_restricted = list("Skrell") + +/obj/item/clothing/head/helmet/space/rig/syndi/human + icon_state = "rig0-syndie-human" + item_state = "syndie_helm" + item_color = "syndie-human" + species_restricted = list("Human") + +/obj/item/clothing/suit/space/rig/syndi/human + item_state = "syndie_hardsuit" + icon_state = "rig-syndie-human" + species_restricted = list("Human") diff --git a/code/modules/clothing/spacesuits/ninja.dm b/code/modules/clothing/spacesuits/ninja.dm index 8f49738fbf..9e071cae01 100644 --- a/code/modules/clothing/spacesuits/ninja.dm +++ b/code/modules/clothing/spacesuits/ninja.dm @@ -6,7 +6,7 @@ allowed = list(/obj/item/weapon/cell) armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 25) siemens_coefficient = 0.2 - + species_restricted = null /obj/item/clothing/suit/space/space_ninja name = "ninja suit" @@ -17,6 +17,7 @@ slowdown = 0 armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) siemens_coefficient = 0.2 + species_restricted = null //Workaround for spawning alien ninja without internals. //Important parts of the suit. var/mob/living/carbon/affecting = null//The wearer. diff --git a/code/modules/clothing/spacesuits/rig.dm b/code/modules/clothing/spacesuits/rig.dm index 027a2e3a57..05411337bc 100644 --- a/code/modules/clothing/spacesuits/rig.dm +++ b/code/modules/clothing/spacesuits/rig.dm @@ -13,7 +13,6 @@ heat_protection = HEAD max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE species_restricted = list("exclude","Unathi","Tajaran","Skrell","Diona","Vox") - attack_self(mob/user) if(!isturf(user.loc)) user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities. @@ -90,7 +89,7 @@ armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 60) siemens_coefficient = 0.6 var/obj/machinery/camera/camera - + species_restricted = list("exclude","Vox") /obj/item/clothing/head/helmet/space/rig/syndi/attack_self(mob/user) if(camera) ..(user) @@ -116,6 +115,7 @@ armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60) allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs) siemens_coefficient = 0.6 + species_restricted = list("exclude","Vox") //Wizard Rig diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 98331e8fcc..05bb2a30dd 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -921,3 +921,31 @@ if(istype(A, /obj/item/ammo_magazine)) flick("leamas-reloading",src) ..() + + +///// Custom Items coded by Iamgoofball are Below ///// +/obj/item/weapon/storage/belt/medical/fluff/nashi_belt + name = "rainbow medical belt" + desc = "A somewhat-worn, modified, rainbow belt." + icon = 'icons/obj/custom_items.dmi' + icon_state = "nashi_belt" + item_state = "fluff_rbelt" + + New() + ..() + new /obj/item/weapon/reagent_containers/glass/bottle/fluff/nashi_bottle(src, 14, "Bicaridine") + new /obj/item/weapon/reagent_containers/glass/bottle/fluff/nashi_bottle(src, 15, "Dermaline") + new /obj/item/weapon/reagent_containers/glass/bottle/fluff/nashi_bottle(src, 16, "Dylovene") + new /obj/item/weapon/reagent_containers/glass/bottle/fluff/nashi_bottle(src, 17, "Dexalin Plus") + new /obj/item/weapon/reagent_containers/glass/bottle/fluff/nashi_bottle(src, 18, "Tricordrazine") + new /obj/item/weapon/reagent_containers/syringe/(src) + new /obj/item/device/healthanalyzer(src) + +/obj/item/weapon/reagent_containers/glass/bottle/fluff/nashi_bottle + icon = 'icons/obj/chemical.dmi' + flags = FPRINT | TABLEPASS //Starting them with lids on them. Safety first! + New(loc, var/color, var/labeled) + ..() + name = "[labeled] bottle" + desc = "A small bottle. Contains [labeled]" + icon_state = "bottle[color]" diff --git a/code/modules/customitems/item_spawning.dm b/code/modules/customitems/item_spawning.dm index ffcc19b7b7..8682f6f69e 100644 --- a/code/modules/customitems/item_spawning.dm +++ b/code/modules/customitems/item_spawning.dm @@ -57,6 +57,23 @@ del(C) ok = M.equip_if_possible(I, slot_wear_id, 0) //if 1, last argument deletes on fail break + else if(istype(Item,/obj/item/weapon/storage/belt)) + if(M.ckey == "jakksergal" && M.real_name == "Nashi Ra'hal" && M.mind.role_alt_title && M.mind.role_alt_title != "Nurse" && M.mind.role_alt_title != "Chemist") + ok = 1 + del(Item) + goto skip + var/obj/item/weapon/storage/belt/medical/fluff/nashi_belt/I = Item + if(istype(M.belt,/obj/item/weapon/storage/belt)) + for(var/obj/item/weapon/storage/belt/B in M) + del(B) + M.belt=null + ok = M.equip_if_possible(I, slot_belt, 0) + break + if(istype(M.belt,/obj/item/device/pda)) + for(var/obj/item/device/pda/Pda in M) + M.belt=null + M.equip_if_possible(Pda, slot_l_store, 0) + ok = M.equip_if_possible(I, slot_belt, 0) else if(istype(M.back,/obj/item/weapon/storage) && M.back:contents.len < M.back:storage_slots) // Try to place it in something on the mob's back Item.loc = M.back ok = 1 @@ -70,4 +87,4 @@ skip: if (ok == 0) // Finally, since everything else failed, place it on the ground - Item.loc = get_turf(M.loc) \ No newline at end of file + Item.loc = get_turf(M.loc) diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index 32dc6cbc9d..59434f9e59 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -32,10 +32,14 @@ log transactions var/obj/item/weapon/card/held_card var/editing_security_level = 0 var/view_screen = NO_SCREEN + var/datum/effect/effect/system/spark_spread/spark_system /obj/machinery/atm/New() ..() machine_id = "[station_name()] RT #[num_financial_terminals++]" + spark_system = new /datum/effect/effect/system/spark_spread + spark_system.set_up(5, 0, src) + spark_system.attach(src) /obj/machinery/atm/process() if(stat & NOPOWER) @@ -60,6 +64,23 @@ log transactions /obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob) if(istype(I, /obj/item/weapon/card)) + if(emagged > 0) + //prevent inserting id into an emagged ATM + user << "\red \icon[src] CARD READER ERROR. This system has been compromised!" + return + else if(istype(I,/obj/item/weapon/card/emag)) + //short out the machine, shoot sparks, spew money! + emagged = 1 + spark_system.start() + spawn_money(rand(100,500),src.loc) + //we don't want to grief people by locking their id in an emagged ATM + release_held_id(user) + + //display a message to the user + var/response = pick("Initiating withdraw. Have a nice day!", "CRITICAL ERROR: Activating cash chamber panic siphon.","PIN Code accepted! Emptying account balance.", "Jackpot!") + user << "\red \icon[src] The [src] beeps: \"[response]\"" + return + var/obj/item/weapon/card/id/idcard = I if(!held_card) usr.drop_item() @@ -94,94 +115,96 @@ log transactions /obj/machinery/atm/attack_hand(mob/user as mob) if(istype(user, /mob/living/silicon)) - user << "\red Artificial unit recognized. Artificial units do not currently receive monetary compensation, as per NanoTrasen regulation #1005." + user << "\red \icon[src] Artificial unit recognized. Artificial units do not currently receive monetary compensation, as per NanoTrasen regulation #1005." return if(get_dist(src,user) <= 1) - //check to see if the user has low security enabled - scan_user(user) //js replicated from obj/machinery/computer/card var/dat = "

NanoTrasen Automatic Teller Machine

" dat += "For all your monetary needs!
" dat += "This terminal is [machine_id]. Report this code when contacting NanoTrasen IT Support
" - dat += "Card: [held_card ? held_card.name : "------"]

" - if(ticks_left_locked_down > 0) - dat += "Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled." - else if(authenticated_account) - if(authenticated_account.suspended) - dat += "\redAccess to this account has been suspended, and the funds within frozen." - else - switch(view_screen) - if(CHANGE_SECURITY_LEVEL) - dat += "Select a new security level for this account:

" - var/text = "Zero - Either the account number or card is required to access this account. EFTPOS transactions will require a card and ask for a pin, but not verify the pin is correct." - if(authenticated_account.security_level != 0) - text = "[text]" - dat += "[text]
" - text = "One - An account number and pin must be manually entered to access this account and process transactions." - if(authenticated_account.security_level != 1) - text = "[text]" - dat += "[text]
" - text = "Two - In addition to account number and pin, a card is required to access this account and process transactions." - if(authenticated_account.security_level != 2) - text = "[text]" - dat += "[text]

" - dat += "Back" - if(VIEW_TRANSACTION_LOGS) - dat += "Transaction logs
" - dat += "Back" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - for(var/datum/transaction/T in authenticated_account.transaction_log) - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "
DateTimeTargetPurposeValueSource terminal ID
[T.date][T.time][T.target_name][T.purpose]$[T.amount][T.source_terminal]
" - if(TRANSFER_FUNDS) - dat += "Account balance: $[authenticated_account.money]
" - dat += "Back

" - dat += "
" - dat += "" - dat += "" - dat += "Target account number:
" - dat += "Funds to transfer:
" - dat += "Transaction purpose:
" - dat += "
" - dat += "
" - else - dat += "Welcome, [authenticated_account.owner_name].
" - dat += "Account balance: $[authenticated_account.money]" - dat += "
" - dat += "" - dat += "" - dat += "
" - dat += "
" - dat += "Change account security level
" - dat += "Make transfer
" - dat += "View transaction log
" - dat += "Print balance statement
" - dat += "Logout
" + if(emagged > 0) + dat += "Card: LOCKED

Unauthorized terminal access detected! This ATM has been locked. Please contact NanoTrasen IT Support." else - dat += "
" - dat += "" - dat += "" - dat += "Account:
" - dat += "PIN:
" - dat += "
" - dat += "
" + dat += "Card: [held_card ? held_card.name : "------"]

" + + if(ticks_left_locked_down > 0) + dat += "Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled." + else if(authenticated_account) + if(authenticated_account.suspended) + dat += "\redAccess to this account has been suspended, and the funds within frozen." + else + switch(view_screen) + if(CHANGE_SECURITY_LEVEL) + dat += "Select a new security level for this account:

" + var/text = "Zero - Either the account number or card is required to access this account. EFTPOS transactions will require a card and ask for a pin, but not verify the pin is correct." + if(authenticated_account.security_level != 0) + text = "[text]" + dat += "[text]
" + text = "One - An account number and pin must be manually entered to access this account and process transactions." + if(authenticated_account.security_level != 1) + text = "[text]" + dat += "[text]
" + text = "Two - In addition to account number and pin, a card is required to access this account and process transactions." + if(authenticated_account.security_level != 2) + text = "[text]" + dat += "[text]

" + dat += "Back" + if(VIEW_TRANSACTION_LOGS) + dat += "Transaction logs
" + dat += "Back" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + for(var/datum/transaction/T in authenticated_account.transaction_log) + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "
DateTimeTargetPurposeValueSource terminal ID
[T.date][T.time][T.target_name][T.purpose]$[T.amount][T.source_terminal]
" + if(TRANSFER_FUNDS) + dat += "Account balance: $[authenticated_account.money]
" + dat += "Back

" + dat += "
" + dat += "" + dat += "" + dat += "Target account number:
" + dat += "Funds to transfer:
" + dat += "Transaction purpose:
" + dat += "
" + dat += "
" + else + dat += "Welcome, [authenticated_account.owner_name].
" + dat += "Account balance: $[authenticated_account.money]" + dat += "
" + dat += "" + dat += "" + dat += "
" + dat += "
" + dat += "Change account security level
" + dat += "Make transfer
" + dat += "View transaction log
" + dat += "Print balance statement
" + dat += "Logout
" + else + dat += "
" + dat += "" + dat += "" + dat += "Account:
" + dat += "PIN:
" + dat += "
" + dat += "
" user << browse(dat,"window=atm;size=550x650") else @@ -223,7 +246,11 @@ log transactions var/new_sec_level = max( min(text2num(href_list["new_security_level"]), 2), 0) authenticated_account.security_level = new_sec_level if("attempt_auth") - if(!ticks_left_locked_down) + + // check if they have low security enabled + scan_user(usr) + + if(!ticks_left_locked_down && held_card) var/tried_account_num = text2num(href_list["account_num"]) if(!tried_account_num) tried_account_num = held_card.associated_account_number @@ -320,20 +347,18 @@ log transactions else playsound(loc, 'sound/items/polaroid2.ogg', 50, 1) if("insert_card") - if(held_card) - held_card.loc = src.loc - authenticated_account = null - - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(held_card) - held_card = null - + if(!held_card) + //this might happen if the user had the browser window open when somebody emagged it + if(emagged > 0) + usr << "\red \icon[src] The ATM card reader rejected your ID because this machine has been sabotaged!" + else + var/obj/item/I = usr.get_active_hand() + if (istype(I, /obj/item/weapon/card/id)) + usr.drop_item() + I.loc = src + held_card = I else - var/obj/item/I = usr.get_active_hand() - if (istype(I, /obj/item/weapon/card/id)) - usr.drop_item() - I.loc = src - held_card = I + release_held_id(usr) if("logout") authenticated_account = null //usr << browse(null,"window=atm") @@ -363,3 +388,17 @@ log transactions T.date = current_date_string T.time = worldtime2text() authenticated_account.transaction_log.Add(T) + + view_screen = NO_SCREEN + +// put the currently held id on the ground or in the hand of the user +/obj/machinery/atm/proc/release_held_id(mob/living/carbon/human/human_user as mob) + if(!held_card) + return + + held_card.loc = src.loc + authenticated_account = null + + if(ishuman(human_user) && !human_user.get_active_hand()) + human_user.put_in_hands(held_card) + held_card = null diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index 93142e0261..8a5b3b61b2 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -44,39 +44,39 @@ var/list/event_last_fired = list() //see: // Code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events.dm // Code/WorkInProgress/Cael_Aislinn/Economy/Economy_Events_Mundane.dm - possibleEvents[/datum/event/economic_event] = 200 - possibleEvents[/datum/event/trivial_news] = 300 - possibleEvents[/datum/event/mundane_news] = 200 + possibleEvents[/datum/event/economic_event] = 300 + possibleEvents[/datum/event/trivial_news] = 400 + possibleEvents[/datum/event/mundane_news] = 300 possibleEvents[/datum/event/pda_spam] = max(min(25, player_list.len) * 4, 200) possibleEvents[/datum/event/money_lotto] = max(min(5, player_list.len), 50) if(account_hack_attempted) possibleEvents[/datum/event/money_hacker] = max(min(25, player_list.len) * 4, 200) - possibleEvents[/datum/event/carp_migration] = 50 + 50 * active_with_role["Engineer"] - possibleEvents[/datum/event/brand_intelligence] = 50 + 25 * active_with_role["Janitor"] + possibleEvents[/datum/event/carp_migration] = 20 + 10 * active_with_role["Engineer"] + possibleEvents[/datum/event/brand_intelligence] = 20 + 25 * active_with_role["Janitor"] - possibleEvents[/datum/event/rogue_drone] = 25 + 25 * active_with_role["Engineer"] + 25 * active_with_role["Security"] - possibleEvents[/datum/event/infestation] = 50 + 25 * active_with_role["Janitor"] + possibleEvents[/datum/event/rogue_drone] = 5 + 25 * active_with_role["Engineer"] + 25 * active_with_role["Security"] + possibleEvents[/datum/event/infestation] = 100 + 100 * active_with_role["Janitor"] possibleEvents[/datum/event/communications_blackout] = 50 + 25 * active_with_role["AI"] + active_with_role["Scientist"] * 25 possibleEvents[/datum/event/ionstorm] = active_with_role["AI"] * 25 + active_with_role["Cyborg"] * 25 + active_with_role["Engineer"] * 10 + active_with_role["Scientist"] * 5 - possibleEvents[/datum/event/grid_check] = 25 + 20 * active_with_role["Engineer"] - possibleEvents[/datum/event/electrical_storm] = 10 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"] + possibleEvents[/datum/event/grid_check] = 25 + 10 * active_with_role["Engineer"] + possibleEvents[/datum/event/electrical_storm] = 15 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"] possibleEvents[/datum/event/wallrot] = 30 * active_with_role["Engineer"] + 50 * active_with_role["Botanist"] if(!spacevines_spawned) - possibleEvents[/datum/event/spacevine] = 5 + 5 * active_with_role["Engineer"] + possibleEvents[/datum/event/spacevine] = 10 + 5 * active_with_role["Engineer"] if(minutes_passed >= 30) // Give engineers time to set up engine possibleEvents[/datum/event/meteor_wave] = 10 * active_with_role["Engineer"] - possibleEvents[/datum/event/meteor_shower] = 40 * active_with_role["Engineer"] + possibleEvents[/datum/event/meteor_shower] = 20 * active_with_role["Engineer"] possibleEvents[/datum/event/blob] = 20 * active_with_role["Engineer"] - possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 100 + possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 15 if(active_with_role["Medical"] > 0) - possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 50 - possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 150 - possibleEvents[/datum/event/viral_infection] = active_with_role["Medical"] * 10 + possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 10 + possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 10 + possibleEvents[/datum/event/viral_infection] = active_with_role["Medical"] * 20 possibleEvents[/datum/event/organ_failure] = active_with_role["Medical"] * 50 possibleEvents[/datum/event/prison_break] = active_with_role["Security"] * 50 diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm index 89347a299d..52fbc8220a 100644 --- a/code/modules/events/event_manager.dm +++ b/code/modules/events/event_manager.dm @@ -2,8 +2,8 @@ var/list/allEvents = typesof(/datum/event) - /datum/event var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event //var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event - /datum/event/spider_infestation - /datum/event/alien_infestation -var/eventTimeLower = 9000 //15 minutes -var/eventTimeUpper = 15000 //25 minutes +var/eventTimeLower = 12000 //20 minutes +var/eventTimeUpper = 24000 //40 minutes var/scheduledEvent = null diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm new file mode 100644 index 0000000000..d55c7e329a --- /dev/null +++ b/code/modules/mining/abandonedcrates.dm @@ -0,0 +1,134 @@ +/obj/structure/closet/crate/secure/loot + name = "abandoned crate" + desc = "What could be inside?" + icon_state = "securecrate" + icon_opened = "securecrateopen" + icon_closed = "securecrate" + var/code = null + var/lastattempt = null + var/attempts = 3 + locked = 1 + var/min = 1 + var/max = 10 + +/obj/structure/closet/crate/secure/loot/New() + ..() + code = rand(min,max) + var/loot = rand(1,30) + switch(loot) + if(1) + new/obj/item/weapon/reagent_containers/food/drinks/bottle/rum(src) + new/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus(src) + new/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey(src) + new/obj/item/weapon/lighter/zippo(src) + if(2) + new/obj/item/weapon/pickaxe/drill(src) + new/obj/item/device/taperecorder(src) + new/obj/item/clothing/suit/space/rig(src) + new/obj/item/clothing/head/helmet/space/rig(src) + if(3) + for(var/i = 0, i < 12, i++) + new/obj/item/weapon/coin/diamond(src) + if(4) + new/obj/item/weapon/bananapeel(src) + if(5) + for(var/i = 0, i < 6, i++) + new/obj/item/weapon/reagent_containers/food/snacks/sliceable/birthdaycake(src) + new/obj/item/weapon/lighter/zippo(src) + if(7) + new/obj/item/weapon/reagent_containers/glass/beaker/bluespace(src) + if(9 to 10) + for(var/i = 0, i < 10, i++) + new/obj/item/weapon/ore/diamond(src) + if(11) + return + if(12) + new/obj/item/seeds/deathberryseed(src) + new/obj/item/seeds/deathnettleseed(src) + if(13) + new/obj/machinery/hydroponics(src) + if(14) + new/obj/item/seeds/cashseed(src) + if(15) + for(var/i = 0, i < 3, i++) + new/obj/item/weapon/reagent_containers/glass/beaker/noreact(src) + if(16 to 17) + for(var/i = 0, i < 9, i++) + new/obj/item/bluespace_crystal(src) + if(19) + for(var/i = 0, i < 4, i++) + new/obj/item/weapon/melee/classic_baton(src) + if(20) + new/obj/item/weapon/storage/lockbox/clusterbang(src) + if(21) + new/obj/item/weapon/aiModule/robocop(src) + if(22) + new/obj/item/clothing/under/chameleon(src) + for(var/i = 0, i < 7, i++) + new/obj/item/clothing/tie/horrible(src) + if(23) + new/obj/item/clothing/under/shorts(src) + new/obj/item/clothing/under/shorts/red(src) + new/obj/item/clothing/under/shorts/blue(src) + //Dummy crates start here. + if(24 to 29) + return + if(8) + return + if(6) + return + if(18) + return + //Dummy crates end here. + if(30) + for(var/i = 0, i < 4, i++) + new/obj/item/weapon/melee/baton(src) + +/obj/structure/closet/crate/secure/loot/attack_hand(mob/user as mob) + if(locked) + user << "The crate is locked with a Deca-code lock." + var/input = input(usr, "Enter digit from [min] to [max].", "Deca-Code Lock", "") as num + if(in_range(src, user)) + input = Clamp(input, 0, 10) + if (input == code) + user << "The crate unlocks!" + locked = 0 + else if (input == null || input > max || input < min) + user << "You leave the crate alone." + else + user << "A red light flashes." + lastattempt = input + attempts-- + if (attempts == 0) + user << "The crate's anti-tamper system activates!" + var/turf/T = get_turf(src.loc) + explosion(T, 0, 1, 2, 1) + del(src) + return + else + user << "You attempt to interact with the device using a hand gesture, but it appears this crate is from before the DECANECT came out." + return + else + return ..() + +/obj/structure/closet/crate/secure/loot/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(locked) + if (istype(W, /obj/item/weapon/card/emag)) + user << "The crate unlocks!" + locked = 0 + if (istype(W, /obj/item/device/multitool)) + user << "DECA-CODE LOCK REPORT:" + if (attempts == 1) + user << "* Anti-Tamper Bomb will activate on next failed access attempt." + else + user << "* Anti-Tamper Bomb will activate after [src.attempts] failed access attempts." + if (lastattempt == null) + user << " has been made to open the crate thus far." + return + // hot and cold + if (code > lastattempt) + user << "* Last access attempt lower than expected code." + else + user << "* Last access attempt higher than expected code." + else ..() + else ..() diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 83077154a8..c410a51c00 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -486,7 +486,11 @@ commented out in r5061, I left it because of the shroom thingies var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid) N.fullUpdateMineralOverlays() - + var/crate = rand(1,30) + switch(crate) + if(1) + visible_message("After digging, you find an old dusty crate buried within!") + new/obj/structure/closet/crate/secure/loot(src) return /turf/simulated/mineral/proc/excavate_find(var/prob_clean = 0, var/datum/find/F) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index ae544c43d5..aad87026b2 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -16,6 +16,8 @@ var/started_as_observer //This variable is set to 1 when you enter the game as an observer. //If you died in the game and are a ghsot - this will remain as null. //Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot. + var/has_enabled_antagHUD = 0 + var/antagHUD = 0 universal_speak = 1 var/atom/movable/following = null /mob/dead/observer/New(mob/body) @@ -23,6 +25,7 @@ see_invisible = SEE_INVISIBLE_OBSERVER see_in_dark = 100 verbs += /mob/dead/observer/proc/dead_tele + stat = DEAD var/turf/T @@ -63,6 +66,23 @@ real_name = name ..() + +/mob/dead/attackby(obj/item/W, mob/user) + if(istype(W,/obj/item/weapon/tome)) + var/mob/dead/M = src + if(src.invisibility != 0) + M.invisibility = 0 + user.visible_message( \ + "\red [user] drags ghost, [M], to our plan of reality!", \ + "\red You drag [M] to our plan of reality!" \ + ) + else + user.visible_message ( \ + "\red [user] just tried to smash his book into that ghost! It's not very effective", \ + "\red You get the feeling that the ghost can't become any more visible." \ + ) + + /mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) return 1 /* @@ -70,12 +90,68 @@ Transfer_mind is there to check if mob is being deleted/not going to have a body Works together with spawning an observer, noted above. */ +/mob/dead/observer/Life() + ..() + if(!loc) return + if(!client) return 0 + + + if(client.images.len) + for(var/image/hud in client.images) + if(copytext(hud.icon_state,1,4) == "hud") + client.images.Remove(hud) + if(antagHUD) + var/list/target_list = list() + for(var/mob/living/target in oview(src)) + if( target.mind&&(target.mind.special_role||issilicon(target)) ) + target_list += target + if(target_list.len) + assess_targets(target_list, src) + + + +/mob/dead/proc/assess_targets(list/target_list, mob/dead/observer/U) + var/icon/tempHud = 'icons/mob/hud.dmi' + for(var/mob/living/target in target_list) + if(iscarbon(target)) + switch(target.mind.special_role) + if("traitor","Syndicate") + U.client.images += image(tempHud,target,"hudsyndicate") + if("Revolutionary") + U.client.images += image(tempHud,target,"hudrevolutionary") + if("Head Revolutionary") + U.client.images += image(tempHud,target,"hudheadrevolutionary") + if("Cultist") + U.client.images += image(tempHud,target,"hudcultist") + if("Changeling") + U.client.images += image(tempHud,target,"hudchangeling") + if("Wizard","Fake Wizard") + U.client.images += image(tempHud,target,"hudwizard") + if("Hunter","Sentinel","Drone","Queen") + U.client.images += image(tempHud,target,"hudalien") + if("Death Commando") + U.client.images += image(tempHud,target,"huddeathsquad") + if("Ninja") + U.client.images += image(tempHud,target,"hudninja") + else//If we don't know what role they have but they have one. + U.client.images += image(tempHud,target,"hudunknown1") + else//If the silicon mob has no law datum, no inherent laws, or a law zero, add them to the hud. + var/mob/living/silicon/silicon_target = target + if(!silicon_target.laws||(silicon_target.laws&&(silicon_target.laws.zeroth||!silicon_target.laws.inherent.len))||silicon_target.mind.special_role=="traitor") + if(isrobot(silicon_target))//Different icons for robutts and AI. + U.client.images += image(tempHud,silicon_target,"hudmalborg") + else + U.client.images += image(tempHud,silicon_target,"hudmalai") + return 1 + /mob/proc/ghostize(var/can_reenter_corpse = 1) if(key) var/mob/dead/observer/ghost = new(src) //Transfer safety to observer spawning proc. ghost.can_reenter_corpse = can_reenter_corpse ghost.timeofdeath = src.timeofdeath //BS12 EDIT ghost.key = key + if(!ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed. + ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing! return ghost /* @@ -153,7 +229,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients usr << "Another consciousness is in your body...It is resisting you." return - if(mind.current.ajourn && mind.current.stat != DEAD) //check if the corpse is astral-journeying (it's client ghosted using a cultist rune). + if(mind.current.ajourn && mind.current.stat != DEAD) //check if the corpse is astral-journeying (it's client ghosted using a cultist rune). var/obj/effect/rune/R = locate() in mind.current.loc //whilst corpse is alive, we can only reenter the body if it's on the rune if(!(R && R.word1 == cultwords["hell"] && R.word2 == cultwords["travel"] && R.word3 == cultwords["self"])) //astral journeying rune usr << "The astral cord that ties your body and your spirit has been severed. You are likely to wander the realm beyond until your body is finally dead and thus reunited with you." @@ -162,6 +238,32 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp mind.current.key = key return 1 +/mob/dead/observer/verb/toggle_antagHUD() + set category = "Ghost" + set name = "Toggle AntagHUD" + set desc = "Toggles AntagHUD allowing you to see who is the antagonist" + if(!config.antag_hud_allowed && !client.holder) + src << "\red Admins have disabled this for this round." + return + if(!client) + return + var/mob/dead/observer/M = src + if(jobban_isbanned(M, "AntagHUD")) + src << "\red You have been banned from using this feature" + return + if(config.antag_hud_restricted && !M.has_enabled_antagHUD &&!client.holder) + var/response = alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?","Yes","No") + if(response == "No") return + M.can_reenter_corpse = 0 + if(!M.has_enabled_antagHUD && !client.holder) + M.has_enabled_antagHUD = 1 + if(M.antagHUD) + M.antagHUD = 0 + src << "\blue AntagHUD Disabled" + else + M.antagHUD = 1 + src << "\blue AntagHUD Enabled" + /mob/dead/observer/proc/dead_tele() set category = "Ghost" set name = "Teleport" diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index f8c014278c..fa02150ab3 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -27,6 +27,8 @@ proc/request_player() for(var/mob/dead/observer/O in player_list) + if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + continue if(jobban_isbanned(O, "pAI")) continue if(O.client) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 6b597920ff..40db476eba 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -251,15 +251,4 @@ This function restores all organs. H.drop_item() W.loc = src - else if(istype(used_weapon,/obj/item/projectile)) //We don't want to use the actual projectile item, so we spawn some shrapnel. - - var/obj/item/projectile/P = used_weapon - if(prob(75) && P.embed) - var/obj/item/weapon/shard/shrapnel/S = new() - S.name = "[P.name] shrapnel" - S.desc = "[S.desc] It looks like it was fired from [P.shot_from]." - S.loc = src - organ.implants += S - visible_message("The projectile sticks in the wound!") - S.add_blood(src) return 1 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 2d06c5fee7..16a4733b27 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -88,6 +88,18 @@ emp_act return //END TASER NERF + var/datum/organ/external/organ = get_organ(check_zone(def_zone)) + + var/armor = checkarmor(organ, "bullet") + + if((P.embed && prob(20 + max(P.damage - armor, -10))) && P.damage_type == BRUTE) + var/obj/item/weapon/shard/shrapnel/SP = new() + (SP.name) = "[P.name] shrapnel" + (SP.desc) = "[SP.desc] It looks like it was fired from [P.shot_from]." + (SP.loc) = organ + organ.implants += SP + visible_message("The projectile sticks in the wound!") + SP.add_blood(src) return (..(P , def_zone)) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index d9354dccd6..957ed014d4 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -242,7 +242,7 @@ var/rads = radiation/25 radiation -= rads nutrition += rads - heal_overall_damage(rads,rads) + adjustBruteLoss(-(rads)) adjustOxyLoss(-(rads)) adjustToxLoss(-(rads)) updatehealth() @@ -887,8 +887,8 @@ if(nutrition > 500) nutrition = 500 - if(light_amount > 2) //if there's enough light, heal - heal_overall_damage(1,1) + if(light_amount > 5) //if there's enough light, heal + adjustBruteLoss(-1) adjustToxLoss(-1) adjustOxyLoss(-1) if(dna && dna.mutantrace == "shadow") diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index ebca69ecca..15b96ec4a8 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -467,7 +467,7 @@ proc/get_damage_icon_part(damage_state, body_part) if(!t_color) t_color = icon_state var/image/standing = image("icon_state" = "[t_color]_s") - standing.icon = 'icons/mob/uniform.dmi' + standing.icon = ((w_uniform.icon_override) ? w_uniform.icon_override : 'icons/mob/uniform.dmi') if(w_uniform.blood_DNA) standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "uniformblood") @@ -508,7 +508,7 @@ proc/get_damage_icon_part(damage_state, body_part) if(gloves) var/t_state = gloves.item_state if(!t_state) t_state = gloves.icon_state - var/image/standing = image("icon" = 'icons/mob/hands.dmi', "icon_state" = "[t_state]") + var/image/standing = image("icon" = ((gloves.icon_override) ? gloves.icon_override : 'icons/mob/hands.dmi'), "icon_state" = "[t_state]") if(gloves.blood_DNA) standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands") gloves.screen_loc = ui_gloves @@ -523,7 +523,7 @@ proc/get_damage_icon_part(damage_state, body_part) /mob/living/carbon/human/update_inv_glasses(var/update_icons=1) if(glasses) - overlays_standing[GLASSES_LAYER] = image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]") + overlays_standing[GLASSES_LAYER] = image("icon" = ((glasses.icon_override) ? glasses.icon_override : 'icons/mob/eyes.dmi'), "icon_state" = "[glasses.icon_state]") else overlays_standing[GLASSES_LAYER] = null if(update_icons) update_icons() @@ -531,16 +531,16 @@ proc/get_damage_icon_part(damage_state, body_part) /mob/living/carbon/human/update_inv_ears(var/update_icons=1) if(l_ear || r_ear) if(l_ear) - overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[l_ear.icon_state]") + overlays_standing[EARS_LAYER] = image("icon" = ((l_ear.icon_override) ? l_ear.icon_override : 'icons/mob/ears.dmi'), "icon_state" = "[l_ear.icon_state]") if(r_ear) - overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[r_ear.icon_state]") + overlays_standing[EARS_LAYER] = image("icon" = ((r_ear.icon_override) ? r_ear.icon_override : 'icons/mob/ears.dmi'), "icon_state" = "[r_ear.icon_state]") else overlays_standing[EARS_LAYER] = null if(update_icons) update_icons() /mob/living/carbon/human/update_inv_shoes(var/update_icons=1) if(shoes) - var/image/standing = image("icon" = 'icons/mob/feet.dmi', "icon_state" = "[shoes.icon_state]") + var/image/standing = image("icon" = ((shoes.icon_override) ? shoes.icon_override : 'icons/mob/feet.dmi'), "icon_state" = "[shoes.icon_state]") if(shoes.blood_DNA) standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "shoeblood") overlays_standing[SHOES_LAYER] = standing @@ -566,7 +566,7 @@ proc/get_damage_icon_part(damage_state, body_part) if(istype(head,/obj/item/clothing/head/kitty)) standing = image("icon" = head:mob) else - standing = image("icon" = 'icons/mob/head.dmi', "icon_state" = "[head.icon_state]") + standing = image("icon" = ((head.icon_override) ? head.icon_override : 'icons/mob/head.dmi'), "icon_state" = "[head.icon_state]") if(head.blood_DNA) standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood") overlays_standing[HEAD_LAYER] = standing @@ -579,7 +579,7 @@ proc/get_damage_icon_part(damage_state, body_part) belt.screen_loc = ui_belt //TODO var/t_state = belt.item_state if(!t_state) t_state = belt.icon_state - overlays_standing[BELT_LAYER] = image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[t_state]") + overlays_standing[BELT_LAYER] = image("icon" = ((belt.icon_override) ? belt.icon_override : 'icons/mob/belt.dmi'), "icon_state" = "[t_state]") else overlays_standing[BELT_LAYER] = null if(update_icons) update_icons() @@ -588,7 +588,7 @@ proc/get_damage_icon_part(damage_state, body_part) /mob/living/carbon/human/update_inv_wear_suit(var/update_icons=1) if( wear_suit && istype(wear_suit, /obj/item/clothing/suit) ) //TODO check this wear_suit.screen_loc = ui_oclothing //TODO - var/image/standing = image("icon" = 'icons/mob/suit.dmi', "icon_state" = "[wear_suit.icon_state]") + var/image/standing = image("icon" = ((wear_suit.icon_override) ? wear_suit.icon_override : 'icons/mob/suit.dmi'), "icon_state" = "[wear_suit.icon_state]") if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) ) drop_from_inventory(handcuffed) @@ -619,7 +619,7 @@ proc/get_damage_icon_part(damage_state, body_part) /mob/living/carbon/human/update_inv_wear_mask(var/update_icons=1) if( wear_mask && ( istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/tie) ) ) wear_mask.screen_loc = ui_mask //TODO - var/image/standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]") + var/image/standing = image("icon" = ((wear_mask.icon_override) ? wear_mask.icon_override : 'icons/mob/mask.dmi'), "icon_state" = "[wear_mask.icon_state]") if( !istype(wear_mask, /obj/item/clothing/mask/cigarette) && wear_mask.blood_DNA ) standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood") overlays_standing[FACEMASK_LAYER] = standing @@ -631,7 +631,7 @@ proc/get_damage_icon_part(damage_state, body_part) /mob/living/carbon/human/update_inv_back(var/update_icons=1) if(back) back.screen_loc = ui_back //TODO - overlays_standing[BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]") + overlays_standing[BACK_LAYER] = image("icon" = ((back.icon_override) ? back.icon_override : 'icons/mob/back.dmi'), "icon_state" = "[back.icon_state]") else overlays_standing[BACK_LAYER] = null if(update_icons) update_icons() diff --git a/code/modules/mob/living/carbon/monkey/diona.dm b/code/modules/mob/living/carbon/monkey/diona.dm index 1d80763fdc..442d33e2ac 100644 --- a/code/modules/mob/living/carbon/monkey/diona.dm +++ b/code/modules/mob/living/carbon/monkey/diona.dm @@ -68,7 +68,7 @@ src << "You are not yet ready for your growth..." return - if(reagents.get_reagent_amount("nutriment") < 5) + if(nutrition < 400) src << "You have not yet consumed enough to grow..." return diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm index 87d6a169b6..399a94c039 100644 --- a/code/modules/mob/living/silicon/pai/recruit.dm +++ b/code/modules/mob/living/silicon/pai/recruit.dm @@ -195,6 +195,8 @@ var/datum/paiController/paiController // Global handler for pAI candidates proc/requestRecruits() for(var/mob/dead/observer/O in player_list) + if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + continue if(jobban_isbanned(O, "pAI")) continue if(asked.Find(O.key)) diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 54431d86f7..0141d9c5c1 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -27,7 +27,6 @@ regenerate_icons() /mob/living/simple_animal/corgi/show_inv(mob/user as mob) - /* If you're turning this back on, scroll down and uncomment target_updated user.set_machine(src) if(user.stat) return @@ -43,7 +42,6 @@ user << browse(dat, text("window=mob[];size=325x500", name)) onclose(user, "mob[real_name]") - */ return /mob/living/simple_animal/corgi/attackby(var/obj/item/O as obj, var/mob/user as mob) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 8f9623565f..c82489cf35 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -348,6 +348,10 @@ var/list/slot_equipment_priority = list( \ return else var/deathtime = world.time - src.timeofdeath + var/mob/dead/observer/G = src + if(G.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + usr << "\blue Upon using the antagHUD you forfeighted the ability to join the round." + return var/deathtimeminutes = round(deathtime / 600) var/pluralcheck = "minute" if(deathtimeminutes == 0) @@ -358,6 +362,7 @@ var/list/slot_equipment_priority = list( \ pluralcheck = " [deathtimeminutes] minutes and" var/deathtimeseconds = round((deathtime - deathtimeminutes * 600) / 10,1) usr << "You have been dead for[pluralcheck] [deathtimeseconds] seconds." + if (deathtime < 18000) usr << "You must wait 30 minutes to respawn!" return diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 77b4dbd884..6237803638 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -114,6 +114,7 @@ spawning = 1 src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo + observer.started_as_observer = 1 close_spawn_windows() var/obj/O = locate("landmark*Observer-Start") @@ -129,8 +130,11 @@ client.prefs.real_name = random_name(client.prefs.gender) observer.real_name = client.prefs.real_name observer.name = observer.real_name + if(!client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed. + observer.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing! observer.key = key del(src) + return 1 if(href_list["late_join"]) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 97fa5b1dbd..d8ff676708 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -49,7 +49,6 @@ var/eyeblur = 0 var/drowsy = 0 var/agony = 0 - var/embed = 0 // whether or not the projectile can embed itself in the mob proc/on_hit(var/atom/target, var/blocked = 0) @@ -87,15 +86,14 @@ loc = A.loc return 0// nope.avi - //Lower accurancy/longer range tradeoff. Distance matters a lot here, so at - // close distance, actually RAISE the chance to hit. var/distance = get_dist(starting,loc) var/miss_modifier = -30 + if (istype(shot_from,/obj/item/weapon/gun)) //If you aim at someone beforehead, it'll hit more often. var/obj/item/weapon/gun/daddy = shot_from //Kinda balanced by fact you need like 2 seconds to aim if (daddy.target && original in daddy.target) //As opposed to no-delay pew pew miss_modifier += -30 - def_zone = get_zone_with_miss_chance(def_zone, M, -30 + 8*distance) + def_zone = get_zone_with_miss_chance(def_zone, M, miss_modifier + 15*distance) if(!def_zone) visible_message("\blue \The [src] misses [M] narrowly!") diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index bf29dc863f..e512da7d59 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -1681,7 +1681,7 @@ datum var/mob/living/carbon/human/H = M if(H.dna) if(H.species.flags & IS_PLANT) //plantmen take a LOT of damage - H.adjustToxLoss(10) + H.adjustToxLoss(50) toxin/stoxin name = "Sleep Toxin" @@ -2177,12 +2177,13 @@ datum on_mob_life(var/mob/living/M as mob) M.nutrition += nutriment_factor - if(istype(M, /mob/living/carbon/human) && M.job in list("Security Officer", "Head of Security", "Detective", "Warden")) + /*if(istype(M, /mob/living/carbon/human) && M.job in list("Security Officer", "Head of Security", "Detective", "Warden")) if(!M) M = holder.my_atom M.heal_organ_damage(1,1) M.nutrition += nutriment_factor ..() return + */ ..() /* //removed because of meta bullshit. this is why we can't have nice things. diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index e861826e0f..b9d25c2677 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -1341,6 +1341,43 @@ datum/design/nanopaste materials = list("$metal" = 7000, "$glass" = 7000) build_path = "/obj/item/stack/nanopaste" +datum/design/implant_loyal + name = "loyalty implant" + desc = "Makes you loyal or such." + id = "implant_loyal" + req_tech = list("materials" = 2, "biotech" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 7000, "$glass" = 7000) + build_path = "/obj/item/weapon/implant/loyalty" + +datum/design/implant_chem + name = "chemical implant" + desc = "Injects things." + id = "implant_chem" + req_tech = list("materials" = 2, "biotech" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/implant/chem" + +datum/design/implant_free + name = "freedom implant" + desc = "Use this to escape from those evil Red Shirts." + id = "implant_free" + req_tech = list("syndicate" = 2, "biotech" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/implant/freedom" + +datum/design/chameleon + name = "Chameleon Jumpsuit" + desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist." + id = "chameleon" + req_tech = list("syndicate" = 2) + build_type = PROTOLATHE + materials = list("$metal" = 500) + build_path = "/obj/item/clothing/under/chameleon" + + datum/design/bluespacebeaker name = "bluespace beaker" desc = "A bluespace beaker, powered by experimental bluespace technology and Element Cuban combined with the Compound Pete. Can hold up to 300 units." @@ -1350,7 +1387,6 @@ datum/design/bluespacebeaker materials = list("$metal" = 3000, "$plasma" = 3000, "$diamond" = 500) reliability_base = 76 build_path = "/obj/item/weapon/reagent_containers/glass/beaker/bluespace" - category = "Misc" datum/design/noreactbeaker name = "cryostasis beaker" @@ -1406,17 +1442,17 @@ datum/design/decloner materials = list("$gold" = 5000,"$uranium" = 10000, "mutagen" = 40) build_path = "/obj/item/weapon/gun/energy/decloner" locked = 1 -/* + datum/design/chemsprayer name = "Chem Sprayer" desc = "An advanced chem spraying device." id = "chemsprayer" - req_tech = list("combat" = 3, "materials" = 3, "engineering" = 3, "biotech" = 2) + req_tech = list("materials" = 3, "engineering" = 3, "biotech" = 2) build_type = PROTOLATHE materials = list("$metal" = 5000, "$glass" = 1000) reliability_base = 100 build_path = "/obj/item/weapon/chemsprayer" -*/ + datum/design/rapidsyringe name = "Rapid Syringe Gun" desc = "A gun that fires many syringes." @@ -1575,6 +1611,16 @@ datum/design/bag_holding reliability_base = 80 build_path = "/obj/item/weapon/storage/backpack/holding" +datum/design/bluespace_crystal + name = "Artificial Bluespace Crystal" + desc = "A small blue crystal with mystical properties." + id = "bluespace_crystal" + req_tech = list("bluespace" = 5, "materials" = 7) + build_type = PROTOLATHE + materials = list("$gold" = 1500, "$diamond" = 3000, "$plasma" = 1500) + reliability_base = 100 + build_path = "/obj/item/bluespace_crystal/artificial" + ///////////////////////////////////////// /////////////////HUDs//////////////////// ///////////////////////////////////////// @@ -1642,3 +1688,167 @@ datum/design/borg_syndicate_module req_tech = list("combat" = 4, "syndicate" = 3) build_path = "/obj/item/borg/upgrade/syndicate" category = "Cyborg Upgrade Modules" + +///////////////////////////////////////// +/////////////PDA and Radio stuff///////// +///////////////////////////////////////// +datum/design/binaryencrypt + name = "Binary Encrpytion Key" + desc = "An encyption key for a radio headset. Contains cypherkeys." + id = "binaryencrypt" + req_tech = list("syndicate" = 2) + build_type = PROTOLATHE + materials = list("$metal" = 300, "$glass" = 300) + build_path = "/obj/item/device/encryptionkey/binary" +datum/design/pda + name = "PDA" + desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge." + id = "pda" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/device/pda" +datum/design/cart_basic + name = "Generic Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_basic" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge" +datum/design/cart_engineering + name = "Power-ON Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_engineering" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/engineering" +datum/design/cart_atmos + name = "BreatheDeep Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_atmos" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/atmos" +datum/design/cart_medical + name = "Med-U Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_medical" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/medical" +datum/design/cart_chemistry + name = "ChemWhiz Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_chemistry" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/chemistry" +datum/design/cart_security + name = "R.O.B.U.S.T. Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_security" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/security" + locked = 1 +datum/design/cart_janitor + name = "CustodiPRO Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_janitor" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/janitor" +datum/design/cart_clown + name = "Honkworks 5.0 Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_clown" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/clown" +datum/design/cart_mime + name = "Gestur-O 1000 Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_mime" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/mime" +datum/design/cart_toxins + name = "Signal Ace 2 Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_toxins" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/toxins" +datum/design/cart_quartermaster + name = "Space Parts & Space Vendors Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_quartermaster" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/quartermaster" + locked = 1 +datum/design/cart_hop + name = "Human Resources 9001 Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_hop" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/hop" + locked = 1 +datum/design/cart_hos + name = "R.O.B.U.S.T. DELUXE Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_hos" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/hos" + locked = 1 +datum/design/cart_ce + name = "Power-On DELUXE Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_ce" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/ce" + locked = 1 +datum/design/cart_cmo + name = "Med-U DELUXE Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_cmo" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/cmo" + locked = 1 +datum/design/cart_rd + name = "Signal Ace DELUXE Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_rd" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/rd" + locked = 1 +datum/design/cart_captain + name = "Value-PAK Cartridge" + desc = "A data cartridge for portable microcomputers." + id = "cart_captain" + req_tech = list("engineering" = 2, "powerstorage" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 50, "$glass" = 50) + build_path = "/obj/item/weapon/cartridge/captain" + locked = 1 diff --git a/code/modules/telesci/bscrystal.dm b/code/modules/telesci/bscrystal.dm new file mode 100644 index 0000000000..d9e968f4da --- /dev/null +++ b/code/modules/telesci/bscrystal.dm @@ -0,0 +1,38 @@ +// Bluespace crystals, used in telescience and when crushed it will blink you to a random turf. + +/obj/item/bluespace_crystal + name = "bluespace crystal" + desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate." + icon = 'icons/obj/telescience.dmi' + icon_state = "bluespace_crystal" + w_class = 1 + origin_tech = "bluespace=4;materials=3" + var/blink_range = 8 // The teleport range when crushed/thrown at someone. + +/obj/item/bluespace_crystal/New() + ..() + pixel_x = rand(-5, 5) + pixel_y = rand(-5, 5) + +/obj/item/bluespace_crystal/attack_self(var/mob/user) + blink_mob(user) + user.drop_item() + user.visible_message("[user] crushes the [src]!") + del(src) + +/obj/item/bluespace_crystal/proc/blink_mob(var/mob/living/L) + do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg') + +/obj/item/bluespace_crystal/throw_impact(atom/hit_atom) + ..() + if(isliving(hit_atom)) + blink_mob(hit_atom) + del(src) + +// Artifical bluespace crystal, doesn't give you much research. + +/obj/item/bluespace_crystal/artificial + name = "artificial bluespace crystal" + desc = "An artificially made bluespace crystal, it looks delicate." + origin_tech = "bluespace=2" + blink_range = 4 // Not as good as the organic stuff! \ No newline at end of file diff --git a/code/modules/telesci/gps.dm b/code/modules/telesci/gps.dm index 79897c7e6e..3850d439d2 100644 --- a/code/modules/telesci/gps.dm +++ b/code/modules/telesci/gps.dm @@ -1,5 +1,6 @@ +var/list/GPS_list = list() /obj/item/device/gps - name = "Global Positioning System" + name = "global positioning system" desc = "Helping lost spacemen find their way through the planets since 2016." icon = 'icons/obj/telescience.dmi' icon_state = "gps-c" @@ -11,9 +12,15 @@ var/emped = 0 /obj/item/device/gps/New() - name = "Global Positioning System ([gpstag])" + ..() + GPS_list.Add(src) + name = "global positioning system ([gpstag])" overlays += "working" +/obj/item/device/gps/Del() + GPS_list.Remove(src) + ..() + /obj/item/device/gps/emp_act(severity) emped = 1 overlays -= "working" @@ -24,6 +31,7 @@ overlays += "working" /obj/item/device/gps/attack_self(mob/user as mob) + var/obj/item/device/gps/t = "" if(emped) t += "ERROR" @@ -31,7 +39,7 @@ t += "
Set Tag " t += "
Tag: [gpstag]" - for(var/obj/item/device/gps/G in world) + for(var/obj/item/device/gps/G in GPS_list) var/turf/pos = get_turf(G) var/area/gps_area = get_area(G) var/tracked_gpstag = G.gpstag @@ -46,16 +54,14 @@ popup.open() /obj/item/device/gps/Topic(href, href_list) + ..() if(href_list["tag"] ) var/a = input("Please enter desired tag.", name, gpstag) as text - a = copytext(sanitize(a), 1, 20) - if(length(a) != 4) - usr << "\blue The tag must be four letters long!" - return - else + a = uppertext(copytext(sanitize(a), 1, 5)) + if(src.loc == usr) gpstag = a - name = "Global Positioning System ([gpstag])" - return + name = "global positioning system ([gpstag])" + attack_self(usr) /obj/item/device/gps/science icon_state = "gps-s" diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index 1ebc1a3572..c54d079afd 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -8,10 +8,6 @@ use_power = 1 idle_power_usage = 200 active_power_usage = 5000 -/obj/machinery/telepad/New() - ..() -/obj/machinery/telepad/Del() - ..() //CARGO TELEPAD// /obj/machinery/telepad_cargo name = "cargo telepad" @@ -23,39 +19,35 @@ idle_power_usage = 20 active_power_usage = 500 var/stage = 0 -/obj/machinery/telepad_cargo/New() - ..() -/obj/machinery/telepad_cargo/Del() - ..() /obj/machinery/telepad_cargo/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/wrench)) anchored = 0 playsound(src, 'sound/items/Ratchet.ogg', 50, 1) if(anchored) anchored = 0 - user << "\blue The [src] can now be moved." + user << " The [src] can now be moved." else if(!anchored) anchored = 1 - user << "\blue The [src] is now secured." + user << " The [src] is now secured." if(istype(W, /obj/item/weapon/screwdriver)) if(stage == 0) playsound(src, 'sound/items/Screwdriver.ogg', 50, 1) - user << "\blue You unscrew the telepad's tracking beacon." + user << " You unscrew the telepad's tracking beacon." stage = 1 else if(stage == 1) playsound(src, 'sound/items/Screwdriver.ogg', 50, 1) - user << "\blue You screw in the telepad's tracking beacon." + user << " You screw in the telepad's tracking beacon." stage = 0 if(istype(W, /obj/item/weapon/weldingtool) && stage == 1) playsound(src, 'sound/items/Welder.ogg', 50, 1) - user << "\blue You disassemble the telepad." + user << " You disassemble the telepad." new /obj/item/stack/sheet/metal(get_turf(src)) new /obj/item/stack/sheet/glass(get_turf(src)) del(src) ///TELEPAD CALLER/// /obj/item/device/telepad_beacon - name = "Telepad Beacon" + name = "telepad beacon" desc = "Use to warp in a cargo telepad." icon = 'icons/obj/radio.dmi' icon_state = "beacon" @@ -64,7 +56,7 @@ /obj/item/device/telepad_beacon/attack_self(mob/user as mob) if(user) - user << "\blue Locked In" + user << " Locked In" new /obj/machinery/telepad_cargo(user.loc) playsound(src, 'sound/effects/pop.ogg', 100, 1, 1) del(src) @@ -76,9 +68,6 @@ desc = "Use this to send crates and closets to cargo telepads." icon = 'icons/obj/telescience.dmi' icon_state = "rcs" - opacity = 0 - density = 0 - anchored = 0.0 flags = FPRINT | TABLEPASS| CONDUCT force = 10.0 throwforce = 10.0 @@ -94,18 +83,20 @@ var/teleporting = 0 /obj/item/weapon/rcs/New() + ..() processing_objects.Add(src) +/obj/item/weapon/rcs/examine() desc = "Use this to send crates and closets to cargo telepads. There are [rcharges] charges left." + ..() /obj/item/weapon/rcs/Del() processing_objects.Remove(src) - + ..() /obj/item/weapon/rcs/process() if(rcharges > 10) rcharges = 10 if(last_charge == 0) rcharges++ - desc = "Use this to send crates and closets to cargo telepads. There are [rcharges] charges left." last_charge = 30 else last_charge-- @@ -115,11 +106,11 @@ if(mode == 0) mode = 1 playsound(src.loc, 'sound/effects/pop.ogg', 50, 0) - user << "\red The telepad locator has become uncalibrated." + user << " The telepad locator has become uncalibrated." else mode = 0 playsound(src.loc, 'sound/effects/pop.ogg', 50, 0) - user << "\blue You calibrate the telepad locator." + user << " You calibrate the telepad locator." /obj/item/weapon/rcs/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/weapon/card/emag) && emagged == 0) @@ -127,5 +118,5 @@ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(5, 1, src) s.start() - user << "\red You emag the RCS. Click on it to toggle between modes." + user << " You emag the RCS. Click on it to toggle between modes." return \ No newline at end of file diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index 471473ed2e..85232a4106 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -1,20 +1,52 @@ /obj/machinery/computer/telescience - name = "Telepad Control Console" + name = "\improper Telepad Control Console" desc = "Used to teleport objects to and from the telescience telepad." icon_state = "teleport" + var/sending = 1 + var/obj/machinery/telepad/telepad = null + var/temp_msg = "Telescience control console initialized.
Welcome." // VARIABLES // var/teles_left // How many teleports left until it becomes uncalibrated - var/x_off // X offset - var/y_off // Y offset - var/x_co // X coordinate - var/y_co // Y coordinate - var/z_co // Z coordinate + var/datum/projectile_data/last_tele_data = null + var/z_co = 1 + var/power_off + var/rotation_off + var/angle_off + + var/rotation = 0 + var/angle = 45 + var/power + + // Based on the power used + var/teleport_cooldown = 0 + var/list/power_options = list(5, 10, 20, 25, 30, 40, 50, 80, 100) // every index requires a bluespace crystal + var/teleporting = 0 + var/starting_crystals = 3 + var/list/crystals = list() /obj/machinery/computer/telescience/New() - teles_left = rand(8,12) - x_off = rand(-10,10) - y_off = rand(-10,10) + ..() + link_telepad() + recalibrate() + +/obj/machinery/computer/telescience/Del() + eject() + ..() + +/obj/machinery/computer/telescience/examine() + ..() + usr << "There are [crystals.len] bluespace crystals in the crystal ports." + +/obj/machinery/computer/telescience/initialize() + ..() + link_telepad() + for(var/i = 1; i <= starting_crystals; i++) + crystals += new /obj/item/bluespace_crystal/artificial(null) // starting crystals + power = power_options[1] + +/obj/machinery/computer/telescience/proc/link_telepad() + telepad = locate() in range(src, 7) /obj/machinery/computer/telescience/update_icon() if(stat & BROKEN) @@ -28,267 +60,250 @@ stat &= ~NOPOWER /obj/machinery/computer/telescience/attack_paw(mob/user) - usr << "You are too primitive to use this computer." + user << "You are too primitive to use this computer." return +/obj/machinery/computer/telescience/attackby(obj/item/W, mob/user) + if(istype(W, /obj/item/bluespace_crystal)) + if(crystals.len >= power_options.len) + user << "There are not enough crystal ports." + return + user.drop_item() + crystals += W + W.loc = null + user.visible_message("[user] inserts a [W] into the [src]'s crystal port.") + else + ..() + /obj/machinery/computer/telescience/attack_ai(mob/user) - src.attack_hand() + src.attack_hand(user) /obj/machinery/computer/telescience/attack_hand(mob/user) if(..()) return - if(stat & (NOPOWER|BROKEN)) - return - var/t = "" - t += "Set X" - t += "Set Y" - t += "Set Z" - t += "

Current set coordinates:" - t += "([x_co], [y_co], [z_co])" - t += "

Send" + interact(user) + +/obj/machinery/computer/telescience/interact(mob/user) + + var/t = "
[temp_msg]

" + t += "Set Bearing" + t += "
[rotation]°
" + t += "Set Elevation" + t += "
[angle]°
" + t += "Set Power" + t += "
" + + for(var/i = 1; i <= power_options.len; i++) + if(crystals.len < i) + t += "[power_options[i]]" + continue + if(power == power_options[i]) + t += "[power_options[i]]" + continue + t += "[power_options[i]]" + + t += "
" + t += "Set Sector" + t += "
[z_co ? z_co : "NULL"]
" + + t += "
Send" t += " Receive" - t += "

Recalibrate" - var/datum/browser/popup = new(user, "telesci", name, 640, 480) + t += "
Recalibrate Crystals Eject Crystals" + + // Information about the last teleport + t += "
" + if(!last_tele_data) + t += "No teleport data found." + else + t += "Source Location: ([last_tele_data.src_x], [last_tele_data.src_y])
" + //t += "Distance: [round(last_tele_data.distance, 0.1)]m
" + t += "Time: [round(last_tele_data.time, 0.1)] secs
" + t += "
" + + var/datum/browser/popup = new(user, "telesci", name, 300, 500) popup.set_content(t) popup.open() return + /obj/machinery/computer/telescience/proc/sparks() - for(var/obj/machinery/telepad/E in machines) - var/L = get_turf(E) + if(telepad) var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(5, 1, L) + s.set_up(5, 1, get_turf(telepad)) s.start() + else + return + /obj/machinery/computer/telescience/proc/telefail() - if(prob(95)) - sparks() - for(var/mob/O in hearers(src, null)) - O.show_message("\red The telepad weakly fizzles.", 2) + sparks() + visible_message("The telepad weakly fizzles.") + return + +/obj/machinery/computer/telescience/proc/doteleport(mob/user) + + if(teleport_cooldown > world.time) + temp_msg = "Telepad is recharging power.
Please wait [round((teleport_cooldown - world.time) / 10)] seconds." return - if(prob(5)) - // Irradiate everyone in telescience! - for(var/obj/machinery/telepad/E in machines) - var/L = get_turf(E) - sparks() - for(var/mob/living/carbon/human/M in viewers(L, null)) - M.apply_effect((rand(10, 20)), IRRADIATE, 0) - M << "\red You feel strange." + + if(teleporting) + temp_msg = "Telepad is in use.
Please wait." return - if(prob(1)) - // AI CALL SHUTTLE I SAW RUNE, SUPER LOW CHANCE, CAN HARDLY HAPPEN - for(var/mob/living/carbon/O in viewers(src, null)) - var/datum/game_mode/cult/temp = new - O.show_message("\red The telepad flashes with a strange light, and you have a sudden surge of allegiance toward the true dark one!", 2) - O.mind.make_Cultist() - temp.grant_runeword(O) - sparks() - return - if(prob(1)) - // VIVA LA FUCKING REVOLUTION BITCHES, SUPER LOW CHANCE, CAN HARDLY HAPPEN - for(var/mob/living/carbon/O in viewers(src, null)) - O.show_message("\red The telepad flashes with a strange light, and you see all kind of images flash through your mind, of murderous things Nanotrasen has done, and you decide to rebel!", 2) - O.mind.make_Rev() - sparks() - return - if(prob(1)) - // The OH SHIT FUCK GOD DAMN IT LYNCH THE SCIENTISTS event. - for(var/mob/living/carbon/O in viewers(src, null)) - O.show_message("\red The telepad changes colors rapidly, and opens a portal, and you see what your mind seems to think is the very threads that hold the pattern of the universe together, and a eerie sense of paranoia creeps into you.", 2) - spacevine_infestation() - sparks() - return - if(prob(5)) - // HOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONK - for(var/mob/living/carbon/M in hearers(src, null)) - M << sound('sound/items/AirHorn.ogg') - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs)) - continue - M << "HONK" - M.sleeping = 0 - M.stuttering += 20 - M.ear_deaf += 30 - M.Weaken(3) - if(prob(30)) - M.Stun(10) - M.Paralyse(4) + + if(telepad) + + var/truePower = Clamp(power + power_off, 1, 1000) + var/trueRotation = rotation + rotation_off + var/trueAngle = Clamp(angle + angle_off, 1, 90) + + var/datum/projectile_data/proj_data = projectile_trajectory(telepad.x, telepad.y, trueRotation, trueAngle, truePower) + last_tele_data = proj_data + + var/trueX = Clamp(round(proj_data.dest_x, 1), 1, world.maxx) + var/trueY = Clamp(round(proj_data.dest_y, 1), 1, world.maxy) + var/spawn_time = round(proj_data.time) * 10 + + var/turf/target = locate(trueX, trueY, z_co) + var/area/A = get_area(target) + flick("pad-beam", telepad) + + if(spawn_time > 15) // 1.5 seconds + playsound(telepad.loc, 'sound/weapons/flash.ogg', 25, 1) + // Wait depending on the time the projectile took to get there + teleporting = 1 + temp_msg = "Powering up bluespace crystals.
Please wait." + + + spawn(round(proj_data.time) * 10) // in seconds + if(!telepad) + return + if(telepad.stat & NOPOWER) + return + teleporting = 0 + teleport_cooldown = world.time + (power * 2) + teles_left -= 1 + + // use a lot of power + use_power(power * 10) + + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(5, 1, get_turf(telepad)) + s.start() + + temp_msg = "Teleport successful.
" + if(teles_left < 10) + temp_msg += "
Calibration required soon." else - M.make_jittery(500) - sparks() - return - if(prob(1)) - // They did the mash! (They did the monster mash!) The monster mash! (It was a graveyard smash!) - sparks() - for(var/obj/machinery/telepad/E in machines) - var/L = get_turf(E) - var/blocked = list(/mob/living/simple_animal/hostile, - /mob/living/simple_animal/hostile/alien/queen/large, - /mob/living/simple_animal/hostile/retaliate, - /mob/living/simple_animal/hostile/retaliate/clown, - /mob/living/simple_animal/hostile/giant_spider/nurse) - var/list/hostiles = typesof(/mob/living/simple_animal/hostile) - blocked - playsound(L, 'sound/effects/phasein.ogg', 100, 1) - for(var/mob/living/carbon/human/M in viewers(L, null)) - flick("e_flash", M.flash) - var/chosen = pick(hostiles) - var/mob/living/simple_animal/hostile/H = new chosen - H.loc = L - return - return - return + temp_msg += "Data printed below." + investigate_log("[key_name(usr)]/[user] has teleported with Telescience at [trueX],[trueY],[z_co], in [A ? A.name : "null area"].","telesci") -/obj/machinery/computer/telescience/proc/dosend() - var/trueX = (x_co + x_off) - var/trueY = (y_co + y_off) - for(var/obj/machinery/telepad/E in machines) - var/L = get_turf(E) - var/target = locate(trueX, trueY, z_co) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(5, 1, L) - s.start() - flick("pad-beam", E) - usr << "\blue Teleport successful." - var/sparks = get_turf(target) - var/datum/effect/effect/system/spark_spread/y = new /datum/effect/effect/system/spark_spread - y.set_up(5, 1, sparks) - y.start() - for(var/obj/item/OI in L) - do_teleport(OI, target, 0) - for(var/obj/structure/closet/OC in L) - do_teleport(OC, target, 0) - for(var/mob/living/carbon/MO in L) - do_teleport(MO, target, 0) - for(var/mob/living/simple_animal/SA in L) - do_teleport(SA, target, 0) - return - return + var/sparks = get_turf(target) + var/datum/effect/effect/system/spark_spread/y = new /datum/effect/effect/system/spark_spread + y.set_up(5, 1, sparks) + y.start() -/obj/machinery/computer/telescience/proc/doreceive() - var/trueX = (x_co + x_off) - var/trueY = (y_co + y_off) - for(var/obj/machinery/telepad/E in machines) - var/L = get_turf(E) - var/T = locate(trueX, trueY, z_co) - var/G = get_turf(T) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(5, 1, L) - s.start() - flick("pad-beam", E) - usr << "\blue Teleport successful." - var/sparks = get_turf(T) - var/datum/effect/effect/system/spark_spread/y = new /datum/effect/effect/system/spark_spread - y.set_up(5, 1, sparks) - y.start() - for(var/obj/item/ROI in G) - do_teleport(ROI, E, 0) - for(var/obj/structure/closet/ROC in G) - do_teleport(ROC, E, 0) - for(var/mob/living/carbon/RMO in G) - do_teleport(RMO, E, 0) - for(var/mob/living/simple_animal/RSA in G) - do_teleport(RSA, E, 0) - return - return + var/turf/source = target + var/turf/dest = get_turf(telepad) + if(sending) + source = dest + dest = target -/obj/machinery/computer/telescience/proc/telesend() - if(x_co == "") - usr << "\red Error: set coordinates." + flick("pad-beam", telepad) + playsound(telepad.loc, 'sound/weapons/emitter2.ogg', 25, 1) + for(var/atom/movable/ROI in source) + // if is anchored, don't let through + if(ROI.anchored) + if(isliving(ROI)) + var/mob/living/L = ROI + if(L.buckled) + // TP people on office chairs + if(L.buckled.anchored) + continue + else + continue + else if(!isobserver(ROI)) + continue + do_teleport(ROI, dest) + updateDialog() + +/obj/machinery/computer/telescience/proc/teleport(mob/user) + if(rotation == null || angle == null || z_co == null) + temp_msg = "ERROR!
Set a angle, rotation and sector." return - if(y_co == "") - usr << "\red Error: set coordinates." - return - if(z_co == "") - usr << "\red Error: set coordinates." - return - if(x_co < 1 || x_co > 255) + if(power <= 0) telefail() - usr << "\red Error: X is less than 11 or greater than 245." + temp_msg = "ERROR!
No power selected!" return - if(y_co < 1 || y_co > 255) + if(angle < 1 || angle > 90) telefail() - usr << "\red Error: Y is less than 11 or greater than 245." + temp_msg = "ERROR!
Elevation is less than 1 or greater than 90." return if(z_co == 2 || z_co < 1 || z_co > 6) telefail() - usr << "\red Error: Z is less than 1, greater than 6, or equal to 2." + temp_msg = "ERROR! Sector is less than 1,
greater than 6, or equal to 2." return if(teles_left > 0) - teles_left -= 1 - dosend() + doteleport(user) else - dosend() + telefail() + temp_msg = "ERROR!
Calibration required." return return -/obj/machinery/computer/telescience/proc/telereceive() - // basically the same thing - if(x_co == "") - usr << "\red Error: set coordinates." - return - if(y_co == "") - usr << "\red Error: set coordinates." - return - if(z_co == "") - usr << "\red Error: set coordinates." - return - if(x_co < 1 || x_co > 255) - telefail() - usr << "\red Error: X is less than 11 or greater than 200." - return - if(y_co < 1 || y_co > 255) - telefail() - usr << "\red Error: Y is less than 11 or greater than 200." - return - if(z_co == 2 || z_co < 1 || z_co > 6) - telefail() - usr << "\red Error: Z is less than 1, greater than 6, or equal to 2." - return - if(teles_left > 0) - teles_left -= 1 - doreceive() - else - if(prob(35)) - doreceive() - else - telefail() - return - return +/obj/machinery/computer/telescience/proc/eject() + for(var/obj/item/I in crystals) + I.loc = src.loc + crystals -= I + power = 0 /obj/machinery/computer/telescience/Topic(href, href_list) if(..()) return - if(href_list["setx"]) - var/a = input("Please input desired X coordinate.", name, x_co) as num - a = copytext(sanitize(a), 1, 20) - x_co = a - x_co = text2num(x_co) - return - if(href_list["sety"]) - var/b = input("Please input desired Y coordinate.", name, y_co) as num - b = copytext(sanitize(b), 1, 20) - y_co = b - y_co = text2num(y_co) - return + if(href_list["setrotation"]) + var/new_rot = input("Please input desired bearing in degrees.", name, rotation) as num + if(..()) // Check after we input a value, as they could've moved after they entered something + return + rotation = Clamp(new_rot, -900, 900) + rotation = round(rotation, 0.01) + + if(href_list["setangle"]) + var/new_angle = input("Please input desired elevation in degrees.", name, angle) as num + if(..()) + return + angle = Clamp(round(new_angle, 0.1), 1, 9999) + + if(href_list["setpower"]) + var/index = href_list["setpower"] + index = text2num(index) + if(index != null && power_options[index]) + if(crystals.len >= index) + power = power_options[index] + if(href_list["setz"]) - var/c = input("Please input desired Z coordinate.", name, z_co) as num - c = copytext(sanitize(c), 1, 20) - z_co = c - z_co = text2num(z_co) - return + var/new_z = input("Please input desired sector.", name, z_co) as num + if(..()) + return + z_co = Clamp(round(new_z), 1, 10) + if(href_list["send"]) - telesend() - return + sending = 1 + teleport(usr) + if(href_list["receive"]) - telereceive() - return + sending = 0 + teleport(usr) + if(href_list["recal"]) - teles_left = rand(9,12) - x_off = rand(-10,10) - y_off = rand(-10,10) - for(var/obj/machinery/telepad/E in machines) - var/L = get_turf(E) - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(5, 1, L) - s.start() - usr << "\blue Calibration successful." - return \ No newline at end of file + recalibrate() + sparks() + temp_msg = "NOTICE:
Calibration successful." + + if(href_list["eject"]) + eject() + temp_msg = "NOTICE:
Bluespace crystals ejected." + + updateDialog() + +/obj/machinery/computer/telescience/proc/recalibrate() + teles_left = rand(30, 40) + angle_off = rand(-25, 25) + power_off = rand(-4, 0) + rotation_off = rand(-10, 10) \ No newline at end of file diff --git a/config/.gitignore b/config/.gitignore new file mode 100644 index 0000000000..ec7ed9b452 --- /dev/null +++ b/config/.gitignore @@ -0,0 +1,3 @@ +#ignore everything here, except subdirectories. +* +!*/ diff --git a/config/example/config.txt b/config/example/config.txt index db1702b67c..fb320da581 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -121,6 +121,12 @@ VOTE_AUTOTRANSFER_INTERVAL 36000 ## players' votes default to "No vote" (otherwise, default to "No change") DEFAULT_NO_VOTE +## Allow ghosts to see antagonist through AntagHUD +ALLOW_ANTAG_HUD + +## If ghosts use antagHUD they are no longer allowed to join the round. +ANTAG_HUD_RESTRICTED + ## allow AI job ALLOW_AI diff --git a/icons/mob/belt_mirror.dmi b/icons/mob/belt_mirror.dmi index 3639285555..9358ba3cd9 100644 Binary files a/icons/mob/belt_mirror.dmi and b/icons/mob/belt_mirror.dmi differ diff --git a/icons/mob/head.dmi b/icons/mob/head.dmi index 4985362077..0396dd6ce0 100644 Binary files a/icons/mob/head.dmi and b/icons/mob/head.dmi differ diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi index b13b296cf1..0502c01147 100644 Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi index 2b1a47ac9d..cafdb88f33 100644 Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index fdcee55193..7ec3f3ee2a 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index cb68bd46f3..6a72147f32 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/obj/custom_items.dmi b/icons/obj/custom_items.dmi index 0b82c58bcc..5cc07c12b3 100644 Binary files a/icons/obj/custom_items.dmi and b/icons/obj/custom_items.dmi differ diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi index 253cf851a8..941c984f1d 100644 Binary files a/icons/obj/storage.dmi and b/icons/obj/storage.dmi differ diff --git a/icons/obj/telescience.dmi b/icons/obj/telescience.dmi index 1f3344f2e4..4e8251beac 100644 Binary files a/icons/obj/telescience.dmi and b/icons/obj/telescience.dmi differ