diff --git a/code/_helpers/time.dm b/code/_helpers/time.dm index 50de55b528e..689e191fb57 100644 --- a/code/_helpers/time.dm +++ b/code/_helpers/time.dm @@ -7,7 +7,7 @@ var/roundstart_hour = 0 //Returns the world time in english proc/worldtime2text(time = world.time, timeshift = 1) - if(!roundstart_hour) roundstart_hour = pick(2,7,12,17) + if(!roundstart_hour) roundstart_hour = rand(0, 23) return timeshift ? time2text(time+(36000*roundstart_hour), "hh:mm") : time2text(time, "hh:mm") proc/worldtime2ticks(time = world.time) diff --git a/code/controllers/Processes/night_lighting.dm b/code/controllers/Processes/night_lighting.dm index ed3f8ada71d..d7d360d739a 100644 --- a/code/controllers/Processes/night_lighting.dm +++ b/code/controllers/Processes/night_lighting.dm @@ -37,21 +37,21 @@ /datum/controller/process/night_lighting/preStart() switch (worldtime2ticks()) - if (0 to MORNING_LIGHT_RESET) + if (0 to config.nl_finish) deactivate() - if (NIGHT_LIGHT_ACTIVE to TICKS_IN_DAY) + if (config.nl_start to TICKS_IN_DAY) activate() /datum/controller/process/night_lighting/doWork() switch (worldtime2ticks()) - if (0 to MORNING_LIGHT_RESET) + if (0 to config.nl_finish) if (isactive) command_announcement.Announce("Good morning. The time is [worldtime2text()]. \n\nThe automated systems aboard the [station_name()] will now return the public hallway lighting levels to normal.", "Automated Lighting System", new_sound = 'sound/misc/bosuns_whistle.ogg') deactivate() - if (NIGHT_LIGHT_ACTIVE to TICKS_IN_DAY) + if (config.nl_start to TICKS_IN_DAY) if (!isactive) command_announcement.Announce("Good evening. The time is [worldtime2text()]. \n\nThe automated systems aboard the [station_name()] will now dim lighting in the public hallways in order to accommodate the circadian rhythm of some species.", "Automated Lighting System", new_sound = 'sound/misc/bosuns_whistle.ogg') activate() diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 1c7fd963d43..dfaa18affa1 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -176,6 +176,8 @@ var/list/gamemode_cache = list() var/ghost_interaction = 0 var/night_lighting = 0 + var/nl_start = 19 * TICKS_IN_HOUR + var/nl_finish = 8 * TICKS_IN_HOUR var/comms_password = "" @@ -622,6 +624,12 @@ var/list/gamemode_cache = list() if("night_lighting") config.night_lighting = 1 + if("nl_start_hour") + config.nl_start = text2num(value) * TICKS_IN_HOUR + + if("nl_finish_hour") + config.nl_finish = text2num(value) * TICKS_IN_HOUR + if("disable_player_mice") config.disable_player_mice = 1 diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index ee245363000..88196e5747b 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -1669,3 +1669,32 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee containername = "security magnetic locks" access = access_security group = "Security" + +/datum/supply_packs/randomised/glowsticks + name = "Glowsticks crate" + num_contained = 4 + contains = list(/obj/item/device/flashlight/glowstick, + /obj/item/device/flashlight/glowstick/red, + /obj/item/device/flashlight/glowstick/blue, + /obj/item/device/flashlight/glowstick/orange, + /obj/item/device/flashlight/glowstick/yellow) + cost = 25 + containertype = /obj/structure/closet/crate + containername = "glowsticks crate" + group = "Operations" + +/datum/supply_packs/randomised/illegalguns + name = "Illegal weapons crate" + num_contained = 2 + contains = list(/obj/item/weapon/gun/projectile/automatic/mini_uzi, + /obj/item/weapon/gun/projectile/boltaction, + /obj/item/weapon/gun/projectile/silenced, + /obj/item/weapon/gun/projectile/pirate, + /obj/item/weapon/gun/projectile/revolver/derringer, + /obj/item/weapon/gun/projectile/dragunov, + /obj/item/weapon/gun/energy/retro) + cost = 120 + containertype = /obj/structure/closet/crate + containername = "Unlabeled crate" + contraband = 1 + group = "Security" diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index ecd9caa8fd3..1d5ce8d272e 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -404,7 +404,7 @@ if(willing) - visible_message("[user] starts putting [G:affecting:name] into \the [src].", 3) + visible_message("[user] starts putting [G:affecting:name] into \the [name].", 3) if(do_after(user, 20)) if(!M || !G || !G:affecting) return @@ -444,7 +444,7 @@ var/mob/living/L = O if(L.stat == DEAD) - user << "Dead people can not be put into cryo." + user << "Dead people can not be put into stasis." return for(var/mob/living/carbon/slime/M in range(1,L)) @@ -455,7 +455,7 @@ var/willing = null //We don't want to allow people to be forced into despawning. if(L.client) - if(alert(L,"Would you like to enter cryosleep?",,"Yes","No") == "Yes") + if(alert(L,"Would you like to enter stasis?",,"Yes","No") == "Yes") if(!L) return willing = 1 else @@ -463,9 +463,9 @@ if(willing) if(L == user) - visible_message("[user] starts climbing into the cryo pod.", 3) + visible_message("[user] starts climbing into \the [name].", 3) else - visible_message("[user] starts putting [L] into the cryo pod.", 3) + visible_message("[user] starts putting [L] into \the [name].", 3) if(do_after(user, 20)) if(!L) return @@ -476,7 +476,7 @@ L.client.perspective = EYE_PERSPECTIVE L.client.eye = src else - user << "You stop [L == user ? "climbing into the cryo pod." : "putting [L] into the cryo pod."]" + user << "You stop [L == user ? "climbing into" : "putting [L] into"] \the [name]." return icon_state = occupied_icon_state diff --git a/code/game/objects/items/devices/magnetic_lock.dm b/code/game/objects/items/devices/magnetic_lock.dm index c6765569211..48bc3aafc19 100644 --- a/code/game/objects/items/devices/magnetic_lock.dm +++ b/code/game/objects/items/devices/magnetic_lock.dm @@ -13,7 +13,7 @@ //icon_state = "inactive" w_class = 3 req_access = list(access_cent_specops) - health = 90 + health = 150 var/department = "CENTCOM" var/status = 0 @@ -107,13 +107,17 @@ user << "You cannot swipe your [I] through [src] with it partially dismantled!" return - if (istype(I, /obj/item/weapon) && user.a_intent == "hurt") - if (I.force >= 8) + if (istype(I, /obj/item/weapon) && user.a_intent == "harm") + if (I.force >= 18) user.visible_message("[user] bashes [src] with [I]!", "You strike [src] with [I], damaging it!") takedamage(I.force) + playsound(loc, "sound/weapons/genhit[rand(1,3)].ogg", I.force*3, 1) + spawn(3) + playsound(loc, "sound/effects/sparks[rand(1,4)].ogg", 30, 1) return else - user.visible_message("[user] hits [src] with [I] to no visible effect.", "You hit [src] with [I], but it appears to have no effect.") + user.visible_message("[user] hits [src] with [I] but fails to damage it.", "You hit [src] with [I], [I.force >= 10 ? "and it almost makes a dent!" : "but it appears to have no visible effect."]") + playsound(loc, "sound/weapons/Genhit.ogg", I.force*2.5, 1) return switch (constructionstate) @@ -402,13 +406,14 @@ overlays += "overlay_deconstruct_[constructionstate]" /obj/item/device/magnetic_lock/proc/takedamage(var/damage) - health -= damage + health -= rand(damage/2, damage) if (damage >= 40 && prob(50)) health = 0 if (health <= 0) visible_message("[src] sparks[target ? " and falls off of \the [target]!" : "!"] It is now completely unusable!") + detach(0) status = STATUS_BROKEN update_icon() return diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 06925300da6..f620dddc8fb 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -10,9 +10,9 @@ var/heal_brute = 0 var/heal_burn = 0 -/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob) - if (!istype(M)) - user << "\The [src] cannot be applied to [M]!" +/obj/item/stack/medical/attack(mob/living/M as mob, mob/user as mob) + if (!istype(M) || istype(M, /mob/living/silicon)) + user << "\red \The [src] cannot be applied to [M]!" return 1 if ( ! (istype(user, /mob/living/carbon/human) || \ @@ -40,13 +40,21 @@ H.UpdateDamageIcon() else + if (!M.bruteloss && !M.fireloss) + user << " [M] seems healthy, there are no wounds to treat! " + return 1 - M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2)) user.visible_message( \ - "[M] has been applied with [src] by [user].", \ - "You apply \the [src] to [M]." \ - ) - use(1) + " [user] starts applying \the [src] to [M].", \ + " You start applying \the [src] to [M]." \ + ) + if (do_mob(user, M, 30)) + M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2)) + user.visible_message( \ + " [M] has been applied with [src] by [user].", \ + " You apply \the [src] to [M]." \ + ) + use(1) M.updatehealth() /obj/item/stack/medical/bruise_pack @@ -55,6 +63,7 @@ desc = "Some sterile gauze to wrap around bloody stumps." icon_state = "brutepack" origin_tech = list(TECH_BIO = 1) + heal_brute = 4 /obj/item/stack/medical/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob) if(..()) @@ -114,7 +123,7 @@ gender = PLURAL singular_name = "ointment" icon_state = "ointment" - heal_burn = 1 + heal_burn = 4 origin_tech = list(TECH_BIO = 1) /obj/item/stack/medical/ointment/attack(mob/living/carbon/M as mob, mob/user as mob) @@ -151,7 +160,7 @@ singular_name = "advanced trauma kit" desc = "An advanced trauma kit for severe injuries." icon_state = "traumakit" - heal_brute = 0 + heal_brute = 8 origin_tech = list(TECH_BIO = 1) /obj/item/stack/medical/advanced/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob) @@ -213,7 +222,7 @@ singular_name = "advanced burn kit" desc = "An advanced treatment kit for severe burns." icon_state = "burnkit" - heal_burn = 0 + heal_burn = 8 origin_tech = list(TECH_BIO = 1) diff --git a/code/game/objects/random/random.dm b/code/game/objects/random/random.dm index 3bad583fe4e..bf7fc43806f 100644 --- a/code/game/objects/random/random.dm +++ b/code/game/objects/random/random.dm @@ -510,10 +510,9 @@ /obj/random/coin/item_to_spawn() var/list/coin = list("/obj/item/weapon/coin/iron" = 5, "/obj/item/weapon/coin/silver" = 3, - "/obj/item/weapon/coin/gold" = 1, - "/obj/item/weapon/coin/silver" = 0.7, + "/obj/item/weapon/coin/gold" = 0.7, "/obj/item/weapon/coin/phoron" = 0.5, - "obj/item/weapon/coin/uranium" = 0.5, + "/obj/item/weapon/coin/uranium" = 0.5, "/obj/item/weapon/coin/platinum" = 0.2, "/obj/item/weapon/coin/diamond" = 0.1, ) @@ -581,7 +580,7 @@ "/obj/item/clothing/glasses/material" = 0.8, "/obj/item/clothing/glasses/sunglasses" = 1.5, "/obj/item/clothing/glasses/welding" = 1.2, - "/obj/item/clothing/under/captain_fly" = 0.7, + "/obj/item/clothing/under/captain_fly" = 0.5, "/obj/item/clothing/under/rank/mailman" = 0.6, "/obj/item/clothing/under/rank/vice" = 0.8, "/obj/item/clothing/under/assistantformal" = 1, @@ -591,9 +590,11 @@ "/obj/item/clothing/under/serviceoveralls" = 1, "/obj/item/clothing/under/psyche" = 0.5, "/obj/item/clothing/under/track" = 0.9, - "/obj/item/clothing/under/rank/dispatch" = 1, + "/obj/item/clothing/under/rank/dispatch" = 0.8, "/obj/item/clothing/under/syndicate/tacticool" = 1, "/obj/item/clothing/under/syndicate/tracksuit" = 0.2, + "/obj/item/clothing/under/rank/clown" = 0.1, + "/obj/item/clothing/under/mime" = 0.1, "/obj/item/clothing/accessory/badge" = 0.2, "/obj/item/clothing/accessory/badge/old" = 0.2, "/obj/item/clothing/accessory/storage/webbing" = 0.6, @@ -620,6 +621,8 @@ "/obj/item/clothing/mask/gas/syndicate" = 0.4, "/obj/item/clothing/mask/fakemoustache" = 0.4, "/obj/item/clothing/mask/horsehead" = 0.9, + "/obj/item/clothing/mask/gas/clown_hat" = 0.1, + "/obj/item/clothing/mask/gas/mime" = 0.1, "/obj/item/clothing/shoes/rainbow" = 1, "/obj/item/clothing/shoes/jackboots" = 1, "/obj/item/clothing/shoes/workboots" = 1, @@ -658,6 +661,7 @@ "/obj/item/device/flashlight/maglight" = 0.4, "/obj/item/device/flashlight/flare" = 0.5, "/obj/item/device/flashlight/lantern" = 0.4, + "/obj/item/device/taperecorder" = 0.6, "/obj/item/weapon/reagent_containers/food/drinks/teapot" = 0.4, "/obj/item/weapon/reagent_containers/food/drinks/flask/shiny" = 0.3, "/obj/item/weapon/reagent_containers/food/drinks/flask/lithium" = 0.3, @@ -679,7 +683,10 @@ "/obj/random/colored_jumpsuit" = 0.7, "/obj/random/booze" = 1.1, "/obj/random/belt" = 0.9, + "/obj/random/backpack" = 0.7, "/obj/random/contraband" = 0.9, + "/obj/random/firstaid" = 0.4, + "/obj/random/medical" = 0.4, "/obj/random/glowstick" = 0.7, "/obj/item/weapon/caution/cone" = 0.7, "/obj/item/weapon/staff/broom" = 0.5, @@ -688,6 +695,10 @@ "/obj/item/weapon/storage/box/donkpockets" = 0.6, "/obj/item/weapon/contraband/poster" = 1.3, "/obj/item/device/magnetic_lock/security" = 0.3, - "/obj/item/device/magnetic_lock/engineering" = 0.3 + "/obj/item/device/magnetic_lock/engineering" = 0.3, + "/obj/item/weapon/shovel" = 0.5, + "/obj/item/weapon/pickaxe" = 0.4, + "/obj/item/weapon/pickaxe" = 0.4, + "/obj/item/weapon/inflatable_duck" = 0.2 ) return pickweight(maint) diff --git a/code/global.dm b/code/global.dm index 9f8970407da..b916ed959a3 100644 --- a/code/global.dm +++ b/code/global.dm @@ -160,3 +160,7 @@ var/max_explosion_range = 14 var/global/obj/item/device/radio/intercom/global_announcer = new(null) var/list/station_departments = list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Civilian") + +var/global/const/TICKS_IN_DAY = 864000 +var/global/const/TICKS_IN_HOUR = 36000 +var/global/const/TICKS_IN_SECOND = 10 diff --git a/code/modules/cargo/randomstock.dm b/code/modules/cargo/randomstock.dm index 93bb53d98df..98850620b7f 100644 --- a/code/modules/cargo/randomstock.dm +++ b/code/modules/cargo/randomstock.dm @@ -32,6 +32,31 @@ more variety, and keeps the odds of any one specific item to be about the same */ + + +//Debugging verbs. Uncomment this block for some useful cargo debug commands +/* +var/global/stockname = "" + +/client/verb/set_stock_name() + stockname = input(usr, "Enter name", "Select stock by name") as text + +/client/verb/spawn_1() + spawn_stock(stockname, get_turf(mob)) + +/client/verb/spawn_10() + var/num = 10 + while (num > 0) + spawn_stock(stockname, get_turf(mob)) + num-- + +/client/verb/spawn_100() + var/num = 100 + while (num > 0) + spawn_stock(stockname, get_turf(mob)) + num-- +*/ + var/list/global/random_stock_common = list( "toolbox" = 4, "meds" = 5, @@ -90,15 +115,16 @@ var/list/global/random_stock_common = list( "cosmetic" = 2.2, "suitcooler" = 1.2, "officechair" = 1.2, - "booze" = 3, + "booze" = 3.5, "plant" = 3.5, "bag" = 2, "extinguish" = 2.2, "hailer" = 1.1, "target" = 2, - "snacks" = 3.5, - "oxytank" = 2.5, + "snacks" = 4, + "oxytank" = 2.5,// "signs" = 4, + "posters" = 3, "parts" = 6, "cane" = 2, "warning" = 2.2, @@ -120,7 +146,7 @@ var/list/global/random_stock_uncommon = list( "flare" = 2, "deathalarm" = 2, "trackimp" = 1, - "flashbang" = 1, + "flashbang" = 0.75, "cuffs" = 1, "monkey" = 2, "specialcrayon" = 1.5, @@ -136,8 +162,8 @@ var/list/global/random_stock_uncommon = list( "bible" = 1, "advwelder" = 2, "sord" = 1, - "policebaton" = 2, - "stunbaton" = 1,//batons spawn with no powercell + "policebaton" = 1.5, + "stunbaton" = 0.75,//batons spawn with no powercell "watches" = 3, "MMI" = 1.5, "voidsuit" = 2, @@ -153,21 +179,21 @@ var/list/global/random_stock_uncommon = list( "linenbin" = 1, "coatrack" = 1, "riotshield" = 2, - "fireaxe" = 1.5, + "fireaxe" = 1, "service" = 2, "robot" = 2, - "latexb" = 1.2, + "latexb" = 0.5, "taperoll" = 1, "headset" = 2, "bat" = 1.2, - "scythe" = 1, + "scythe" = 0.75, "manual" = 2, "jammer" = 2, "rped" = 2, "briefcase" = 2, - "blade" = 1.5, + "blade" = 1.2, "exoquip" = 2, - "laserscalpel" = 1.5, + "laserscalpel" = 1.3, "electropack" = 1, "nothing" = 0) @@ -175,30 +201,29 @@ var/list/global/random_stock_rare = list( "gold" = 2.5, "diamond" = 1.5, "uranium" = 3, - "EMP" = 1, + "EMP" = 0.75, "hypercell" = 3, "combatmeds" = 3, - "batterer" = 1, + "batterer" = 0.75, "posibrain" = 3, - "augmentvision" = 1.6, - "thermals" = 2, + "thermals" = 0.75, "bsbeaker" = 3, - "energyshield" = 3, + "energyshield" = 2, "hardsuit" = 0.75, "cluster" = 2.0, - "cloak" = 1, - "sword" = 1, + "cloak" = 0.75, + "sword" = 0.5, "ims" = 1.5, "exogear" = 1.5, "teleporter" = 1, - "voice" = 2, + "voice" = 1.5, "nothing" = 0) var/list/global/random_stock_large = list( "russian" = 1, "emergency" = 2, "firecloset" = 2, - "tacticool" = 0.4, + "tacticool" = 0.2, "radsuit" = 3, "exosuit" = 1.2,//A randomly generated exosuit in a very variable condition. "EOD" = 1.5, @@ -572,8 +597,12 @@ var/list/global/random_stock_large = list( if("circuitboard") //Spawns a random circuitboard //Allboards being a global list might be faster, but it didnt seem worth the extra memory - var/list/allboards = typesof(/obj/item/weapon/circuitboard) - allboards -= typesof(/obj/item/weapon/circuitboard/mecha) + var/list/allboards = subtypesof(/obj/item/weapon/circuitboard) + var/list/exclusion = list(/obj/item/weapon/circuitboard/unary_atmos, \ + /obj/item/weapon/circuitboard/telecomms, ) + exclusion += typesof(/obj/item/weapon/circuitboard/mecha) + + allboards -= exclusion var/type = pick(allboards) new type(L) @@ -629,14 +658,18 @@ var/list/global/random_stock_large = list( new /obj/item/weapon/grenade/chem_grenade/metalfoam(L) if ("gloves") var/list/allgloves = typesof(/obj/item/clothing/gloves) + + var/list/exclusion = list(/obj/item/clothing/gloves, + /obj/item/clothing/gloves/fluff, + /obj/item/clothing/gloves/swat/bst) + exclusion += typesof(/obj/item/clothing/gloves/rig) + exclusion += typesof(/obj/item/clothing/gloves/lightrig) + allgloves -= exclusion var/number = rand(1,5) while (number > 0) var/gtype = pick(allgloves) - var/thing = new gtype(L) - if (!istype(thing, /obj/item/clothing/gloves/rig))//Rig gloves would be buggy - number-- - else - qdel(thing) + new gtype(L) + number-- if ("insulated") new /obj/item/clothing/gloves/yellow(L) new /obj/item/clothing/gloves/yellow(L) @@ -650,7 +683,6 @@ var/list/global/random_stock_large = list( "/obj/item/device/slime_scanner" = 1, "/obj/item/weapon/autopsy_scanner" = 1, "/obj/item/device/robotanalyzer" = 4, - "/obj/machinery/disease2/diseaseanalyser" = 0.5, "/obj/item/weapon/mining_scanner" = 1, "/obj/item/device/ano_scanner" = 1, "/obj/item/device/reagent_scanner" = 2, @@ -756,7 +788,7 @@ var/list/global/random_stock_large = list( new /obj/structure/reagent_dispensers/beerkeg(T) else var/list/drinks = typesof(/obj/item/weapon/reagent_containers/food/drinks/bottle) - + drinks -= /obj/item/weapon/reagent_containers/food/drinks/bottle var/number = rand(1,3) while (number > 0) var/type = pick(drinks) @@ -884,8 +916,6 @@ var/list/global/random_stock_large = list( new /obj/item/weapon/cane/concealed(L) else if (prob(20)) new /obj/item/weapon/staff/broom(L) - else if (prob(30)) - new /obj/item/weapon/staff/stick(L) else new /obj/item/weapon/cane(L) @@ -905,7 +935,6 @@ var/list/global/random_stock_large = list( "/obj/item/clothing/mask/gas/mime" = 0.5, "/obj/item/clothing/mask/gas/monkeymask" = 0.5, "/obj/item/clothing/mask/gas/sexymime" = 0.5, - "/obj/item/clothing/mask/gas/death_commando" = 2, "/obj/item/clothing/mask/gas/cyborg" = 1, "/obj/item/clothing/mask/gas/owl_mask" = 1 ) @@ -933,6 +962,8 @@ var/list/global/random_stock_large = list( new /obj/item/device/flashlight/lantern(L) if (prob(50)) new /obj/item/weapon/mining_scanner(L) + if (prob(25)) + new /obj/item/weapon/storage/box/excavation(L) if ("paicard") new /obj/item/device/paicard(L) @@ -1066,15 +1097,18 @@ var/list/global/random_stock_large = list( //Can be slotted into any dispenser if("chempack") var/total = rand(2,6) + var/list/chems = chemical_reagents_list.Copy() + var/list/exclusion = list("drink", "reagent", "adminordrazine", "beer2") + chems -= exclusion for (var/i=0,i 0) var/type = pick(allboards) @@ -1138,8 +1177,10 @@ var/list/global/random_stock_large = list( new /obj/random/voidsuit(L,1) if ("signs") - var/list/allsigns = typesof(/obj/structure/sign) + var/list/allsigns = subtypesof(/obj/structure/sign) allsigns -= typesof(/obj/structure/sign/double) + allsigns -= typesof(/obj/structure/sign/poster) + allsigns -= /obj/structure/sign/directions var/number = rand(1,5) while (number > 0) @@ -1148,6 +1189,12 @@ var/list/global/random_stock_large = list( var/obj/structure/sign/S = new newsign(L) S.unfasten() number-- + if ("posters") + new /obj/item/weapon/contraband/poster(L) + if (prob(50)) + new /obj/item/weapon/contraband/poster(L) + if (prob(50)) + new /obj/item/weapon/contraband/poster(L) if ("violin") new /obj/item/device/violin(L) @@ -1415,8 +1462,6 @@ var/list/global/random_stock_large = list( new /obj/item/device/batterer(L) if("posibrain") new /obj/item/device/mmi/digital/posibrain(L) - if("augmentvision") - new /obj/item/clothing/glasses/hud/security/jensenshades(L) if("thermals") new /obj/item/clothing/glasses/thermal(L) if("bsbeaker") @@ -1448,30 +1493,30 @@ var/list/global/random_stock_large = list( //It will come with some screwy electronics and possibly need reprogramming var/list/rigs = list( "/obj/item/weapon/rig/unathi" = 2, - "/obj/item/weapon/rig/unathi/fancy" = 1, + "/obj/item/weapon/rig/unathi/fancy" = 0.75, "/obj/item/weapon/rig/combat" = 0.1, - "/obj/item/weapon/rig/ert" = 0.2, - "/obj/item/weapon/rig/ert/engineer" = 0.2, - "/obj/item/weapon/rig/ert/medical" = 0.3, - "/obj/item/weapon/rig/ert/security" = 0.15, - "/obj/item/weapon/rig/ert/assetprotection" = 0.1, + "/obj/item/weapon/rig/ert" = 0.1, + "/obj/item/weapon/rig/ert/engineer" = 0.1, + "/obj/item/weapon/rig/ert/medical" = 0.15, + "/obj/item/weapon/rig/ert/security" = 0.075, + "/obj/item/weapon/rig/ert/assetprotection" = 0.05, "/obj/item/weapon/rig/light" = 0.5, "/obj/item/weapon/rig/light/hacker" = 0.8, "/obj/item/weapon/rig/light/stealth" = 1.5, - "/obj/item/weapon/rig/merc" = 1, + "/obj/item/weapon/rig/merc" = 0.5, "/obj/item/weapon/rig/industrial" = 3, "/obj/item/weapon/rig/eva" = 3, "/obj/item/weapon/rig/ce" = 2, "/obj/item/weapon/rig/hazmat" = 4, "/obj/item/weapon/rig/medical" = 4, - "/obj/item/weapon/rig/hazard" = 4, + "/obj/item/weapon/rig/hazard" = 3, ) var/type = pickweight(rigs) var/obj/item/weapon/rig/module = new type(L) //screw it up a bit - var/cnd = rand(1,100) + var/cnd = rand(40,100) module.lose_modules(cnd) module.misconfigure(cnd) module.sabotage_cell() @@ -1506,6 +1551,7 @@ var/list/global/random_stock_large = list( while (number > 0) var/type = pickweight(equips) new type(L) + number-- if ("teleporter") new /obj/item/weapon/hand_tele(L) diff --git a/code/modules/cciaa/cciaa.dm b/code/modules/cciaa/cciaa.dm index 732b2d69131..a0db01f4afd 100644 --- a/code/modules/cciaa/cciaa.dm +++ b/code/modules/cciaa/cciaa.dm @@ -154,9 +154,8 @@ M.implant_loyalty(M, 1) - var/obj/item/weapon/card/id/W = new(M) + var/obj/item/weapon/card/id/centcom/W = new(M) W.name = "[M.real_name]'s ID Card" - W.icon_state = "centcom" W.item_state = "id_inv" W.access = get_all_accesses() + get_centcom_access("CCIA Agent") W.assignment = "Central Command Internal Affairs Agent" diff --git a/code/modules/client/preferences_gear.dm b/code/modules/client/preferences_gear.dm index 2d93e1db313..5974e08c743 100644 --- a/code/modules/client/preferences_gear.dm +++ b/code/modules/client/preferences_gear.dm @@ -1108,6 +1108,12 @@ var/global/list/gear_datums = list() path = /obj/item/clothing/gloves/white/tajara cost = 2 slot = slot_gloves + +/datum/gear/watch + display_name = "watch" + path = /obj/item/clothing/gloves/watch + cost = 2 + slot = slot_gloves // Shoelocker @@ -1116,21 +1122,21 @@ var/global/list/gear_datums = list() path = /obj/item/clothing/shoes/jackboots cost = 1 slot = slot_shoes - allowed_roles = list("Security Cadet","Security Officer","Head of Security","Warden","Detective","Internal Affairs Agent","Quartermaster","Head of Personnel","Captain") +// allowed_roles = list("Security Cadet","Security Officer","Head of Security","Warden","Detective","Internal Affairs Agent","Quartermaster","Head of Personnel","Captain") /datum/gear/toeless_jackboots display_name = "toe-less jackboots" path = /obj/item/clothing/shoes/jackboots/unathi cost = 1 slot = slot_shoes - allowed_roles = list("Security Cadet","Security Officer","Head of Security","Warden","Detective","Internal Affairs Agent","Quartermaster","Head of Personnel","Captain") +// allowed_roles = list("Security Cadet","Security Officer","Head of Security","Warden","Detective","Internal Affairs Agent","Quartermaster","Head of Personnel","Captain") /datum/gear/workboots display_name = "workboots" path = /obj/item/clothing/shoes/workboots cost = 1 slot = slot_shoes - allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer","Engineering Apprentice") +// allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer","Engineering Apprentice") /datum/gear/sandal display_name = "sandals" @@ -1558,4 +1564,4 @@ var/global/list/gear_datums = list() display_name = "neck bandanna, black" path = /obj/item/clothing/ears/bandanna/black cost = 1 - sort_category = "ears" \ No newline at end of file + sort_category = "ears" diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index faae9240827..c9fa2b486e4 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -573,10 +573,10 @@ All custom items with worn sprites must follow the contained sprite system: http last_special = world.time + 500 var/obj/item/organ/F = src.internal_organs_by_name["heart"] - + if(isnull(F)) return - + F.damage += 5 src << "You feel a stabbing pain in your chest!" playsound(user, 'sound/effects/Heart Beat.ogg', 20, 1) @@ -616,9 +616,56 @@ All custom items with worn sprites must follow the contained sprite system: http item_state = "poslan_jacket" contained_sprite = 1 + /obj/item/sign/fluff/alexis_degree //Xenonuerology Doctorate - Alexis Shaw - Tenenza - DONE name = "xenonuerology degree" desc = "Certification for a doctorate in Xenonuerology, made out to Alexis Shaw by the St. Grahelm University of Biesel, authenticated by watermarking." icon_state = "alexis_degree" sign_state = "alexis_degree" - w_class = 2 + w_class = 2 + + +/obj/item/clothing/mask/fluff/rur_collar //Tagging Collar - R.U.R - coalf - DONE + name = "tagging collar" + desc = "A steel tagging collar, a giant golden D is imprinted on the front." + icon = 'icons/obj/custom_items/rur_collar.dmi' + icon_state = "rur_collar" + item_state = "rur_collar" + contained_sprite = 1 + body_parts_covered = 0 + canremove = 0 + species_restricted = list("Machine") + var/emagged = 0 + +/obj/item/clothing/mask/fluff/rur_collar/attackby(obj/item/I, mob/user) + if(istype(I, /obj/item/weapon/card/emag) && !emagged) + user << "You short out \the [src]'s locking mechanism." + src.icon_state = "rur_collar_broken" + src.canremove = 1 + src.emagged = 1 + playsound(src.loc, 'sound/effects/sparks1.ogg', 100, 0) + return + + return + + +/obj/item/clothing/mask/bluescarf/fluff/simon_scarf //Fancy Scarf - Simon Greene - icydew - DONE + name = "fancy scarf" + desc = "A very smooth, dark blue scarf with a golden trim. It feels really new and clean." + icon = 'icons/obj/custom_items/simon_scarf.dmi' + icon_state = "simon_scarf" + item_state = "simon_scarf" + contained_sprite = 1 + + +/obj/item/clothing/head/soft/sec/corp/fluff/karson_cap //Karson's Cap - Eric Karson - dronzthewolf - DONE + name = "well-worn corporate security cap" + desc = "A well-worn corporate security cap. The name Karson is written on the underside of the brim, it is well-worn at the point where it has shaped to the owner's head." + + +/obj/item/sign/fluff/triaka_atimono //Framed Zatimono - Azkuyua Triaka - jackboot - DONE + name = "framed zatimono" + desc = "A framed Zatimono, a Unathi standard worn into battle similar to an old-Earth Sashimono. This one is slightly faded." + icon_state = "triaka_atimono" + sign_state = "triaka_atimono" + w_class = 2 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 5d4e7201d1b..6514c219323 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1743,13 +1743,18 @@ if (failed_last_breath || oxyloss > exhaust_threshold)//Can't catch our breath if we're suffocating return + if (nutrition <= 0) + if (prob(1.5)) + src << span("warning", "You feel hungry and exhausted, eat something to regain your energy!") + return + if (stamina != max_stamina) //Any suffocation damage slows stamina regen. //This includes oxyloss from low blood levels var/regen = stamina_recovery * (1 - min(((oxyloss*2) / exhaust_threshold), 1)) if (regen > 0) stamina = min(max_stamina, stamina+regen) - nutrition -= stamina_recovery*0.4 + nutrition = max(0, nutrition - stamina_recovery*0.18) hud_used.move_intent.update_move_icon(src) /mob/living/carbon/human/proc/update_health_display() diff --git a/code/modules/mob/living/carbon/human/species/outsider/vox.dm b/code/modules/mob/living/carbon/human/species/outsider/vox.dm index 6b2b9142123..566ca71e5e0 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/vox.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/vox.dm @@ -20,7 +20,7 @@ stamina = 120 // Vox are even faster than unathi and can go longer, but recover slowly sprint_speed_factor = 3 stamina_recovery = 1 - sprint_cost_factor = 1.7 + sprint_cost_factor = 1 speech_sounds = list('sound/voice/shriek1.ogg') speech_chance = 20 diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 78cecbec9d4..21fa847af3c 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -128,8 +128,8 @@ var/stamina = 100 // The maximum stamina this species has. Determines how long it can sprint var/stamina_recovery = 3 // Flat amount of stamina species recovers per proc - var/sprint_speed_factor = 0.65 // The percentage of bonus speed you get when sprinting. 0.4 = 40% - var/sprint_cost_factor = 1.0 // Multiplier on stamina cost for sprinting + var/sprint_speed_factor = 0.7 // The percentage of bonus speed you get when sprinting. 0.4 = 40% + var/sprint_cost_factor = 0.9 // Multiplier on stamina cost for sprinting var/exhaust_threshold = 50 // When stamina runs out, the mob takes oxyloss up til this value. Then collapses and drops to walk // Determines the organs that the species spawns with and diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index f4007d7f395..10fd669ade5 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -21,8 +21,8 @@ stamina = 130 // Humans can sprint for longer than any other species stamina_recovery = 5 - sprint_speed_factor = 0.8 - sprint_cost_factor = 0.7 + sprint_speed_factor = 0.9 + sprint_cost_factor = 0.5 /datum/species/unathi name = "Unathi" @@ -43,9 +43,10 @@ secondary_langs = list("Sinta'unathi") name_language = "Sinta'unathi" stamina = 120 // Unathi have the shortest but fastest sprint of all - sprint_speed_factor = 3 + sprint_speed_factor = 3.2 stamina_recovery = 5 - sprint_cost_factor = 1.8 + sprint_cost_factor = 1.45 + exhaust_threshold = 65 rarity_value = 3 blurb = "A heavily reptillian species, Unathi (or 'Sinta as they call themselves) hail from the \ @@ -116,8 +117,8 @@ stamina = 90 // Tajarans evolved to maintain a steady pace in the snow, sprinting wastes energy stamina_recovery = 4 - sprint_speed_factor = 0.55 - sprint_cost_factor = 1 + sprint_speed_factor = 0.65 + sprint_cost_factor = 0.75 blurb = "The Tajaran race is a species of feline-like bipeds hailing from the planet of Ahdomai in the \ @@ -184,7 +185,7 @@ ethanol_resistance = 0.5//gets drunk faster stamina = 90 - sprint_speed_factor = 1.1 //Evolved for rapid escapes from predators + sprint_speed_factor = 1.25 //Evolved for rapid escapes from predators /datum/species/diona @@ -263,8 +264,8 @@ reagent_tag = IS_DIONA stamina = -1 // Diona sprinting uses energy instead of stamina - sprint_speed_factor = 0.4 //Speed gained is minor - + sprint_speed_factor = 0.5 //Speed gained is minor + sprint_cost_factor = 0.8 /datum/species/diona/handle_sprint_cost(var/mob/living/carbon/human/H, var/cost) var/datum/dionastats/DS = H.get_dionastats() @@ -272,7 +273,7 @@ if (!DS) return 0 //Something is very wrong - var/remainder = cost + var/remainder = cost * sprint_cost_factor if (H.radiation) if (H.radiation > (cost*0.5))//Radiation counts as double energy @@ -402,13 +403,13 @@ "Your CPU temperature probes warn you that you are approaching critical heat levels!" ) stamina = -1 // Machines use power and generate heat, stamina is not a thing - sprint_speed_factor = 0.85 // About as capable of speed as a human + sprint_speed_factor = 1 // About as capable of speed as a human /datum/species/machine/handle_sprint_cost(var/mob/living/carbon/human/H, var/cost) if (H.stat == CONSCIOUS) - H.bodytemperature += cost*1.35 - H.nutrition -= cost*0.9 + H.bodytemperature += cost*1.15 + H.nutrition -= cost*0.65 if (H.nutrition > 0) return 1 else @@ -470,8 +471,8 @@ base_color = "#575757" stamina = 100 // Long period of sprinting, but relatively low speed gain - sprint_speed_factor = 0.5 - sprint_cost_factor = 0.27 + sprint_speed_factor = 0.55 + sprint_cost_factor = 0.20 stamina_recovery = 1//slow recovery diff --git a/code/modules/mob/living/living_powers.dm b/code/modules/mob/living/living_powers.dm index 1eb7c868f93..be9be13ad44 100644 --- a/code/modules/mob/living/living_powers.dm +++ b/code/modules/mob/living/living_powers.dm @@ -59,7 +59,7 @@ else newspeed = text2num(response) - if (!newspeed || newspeed >= speed || newspeed <= 0) + if (!newspeed || newspeed >= speed || newspeed <= 0.2) src << "Error, invalid value entered. Walk speed has not been changed" return diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index f8883fc302a..017076adbd1 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -142,6 +142,11 @@ user << "It looks hungry." else if ((reagents.total_volume > 0 && nutrition > max_nutrition *0.75) || nutrition > max_nutrition *0.9) user << "It looks full and contented." + if (health < maxHealth * 0.5) + user << "It looks badly wounded." + else if (health < maxHealth) + user << "It looks wounded." + /mob/living/simple_animal/Life() ..() @@ -293,7 +298,16 @@ if (istype(current, /datum/reagent/nutriment))//If its food, it feeds us var/datum/reagent/nutriment/N = current nutrition += removed*N.nutriment_factor - health = min(health+(removed*N.regen_factor), maxHealth) + var/heal_amount = removed*N.regen_factor + if (bruteloss > 0) + var/n = min(heal_amount, bruteloss) + adjustBruteLoss(-n) + heal_amount -= n + if (fireloss && heal_amount) + var/n = min(heal_amount, fireloss) + adjustFireLoss(-n) + heal_amount -= n + updatehealth() current.remove_self(removed)//If its not food, it just does nothing. no fancy effects /mob/living/simple_animal/can_eat() @@ -373,21 +387,7 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj) return /mob/living/simple_animal/attackby(var/obj/item/O, var/mob/user) - if(istype(O, /obj/item/stack/medical)) - if(stat != DEAD) - var/obj/item/stack/medical/MED = O - if(health < maxHealth) - if(MED.amount >= 1) - adjustBruteLoss(-MED.heal_brute) - MED.amount -= 1 - if(MED.amount <= 0) - qdel(MED) - for(var/mob/M in viewers(src, null)) - if ((M.client && !( M.blinded ))) - M.show_message("[user] applies the [MED] on [src].") - else - user << "\The [src] is dead, medical items won't bring \him back to life." - else if(istype(O, /obj/item/weapon/reagent_containers)) + if(istype(O, /obj/item/weapon/reagent_containers) || istype(O, /obj/item/stack/medical)) ..() else if(meat_type && (stat == DEAD)) //if the animal has a meat, and if it is dead. diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index b7a1e6927a3..aaf1b0cc4a2 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -192,7 +192,19 @@ if(moving) return 0 - if(world.time < move_delay) return + if(world.time < move_delay) + return + + +//This compensates for the inaccuracy of move ticks +//Whenever world.time overshoots the movedelay, due to it only ticking once per decisecond +//The overshoot value is subtracted from our next delay, farther down where move delay is set. +//This doesn't entirely remove the problem, but it keeps travel times accurate to within 0.1 seconds +//Over an infinite distance, and prevents the inaccuracy from compounding. Thus making it basically a non-issue + var/leftover = world.time - move_delay + if (leftover > 1) + leftover = 0 + if(locate(/obj/effect/stop/, mob.loc)) for(var/obj/effect/stop/S in mob.loc) @@ -266,9 +278,9 @@ src << "\blue You're pinned to a wall by [mob.pinned[1]]!" return 0 - move_delay = world.time //set move delay + move_delay = world.time - leftover//set move delay - if (mob.buckled || mob.pulledby) + if (mob.buckled) if(istype(mob.buckled, /obj/vehicle)) //manually set move_delay for vehicles so we don't inherit any mob movement penalties //specific vehicle move delays are set in code\modules\vehicles\vehicle.dm @@ -280,19 +292,22 @@ if(istype(mob.loc, /turf/space)) // Wheelchair driving! return // No wheelchair driving in space - if(istype(mob.pulledby, /obj/structure/bed/chair/wheelchair)) - return mob.pulledby.relaymove(mob, direct) + + //TODO: Fuck wheelchairs. + //Toss away all this snowflake code here, and rewrite wheelchairs as a vehicle. else if(istype(mob.buckled, /obj/structure/bed/chair/wheelchair)) + var/min_move_delay = 0 if(ishuman(mob.buckled)) var/mob/living/carbon/human/driver = mob.buckled var/obj/item/organ/external/l_hand = driver.get_organ("l_hand") var/obj/item/organ/external/r_hand = driver.get_organ("r_hand") if((!l_hand || l_hand.is_stump()) && (!r_hand || r_hand.is_stump())) return // No hands to drive your chair? Tough luck! + min_move_delay = driver.min_walk_delay //drunk wheelchair driving if(mob.confused && prob(20)) direct = pick(cardinal) - move_delay += 2 + move_delay += max((mob.movement_delay() + config.walk_speed) * config.walk_delay_multiplier, min_move_delay) return mob.buckled.relaymove(mob,direct) var/tally = mob.movement_delay() + config.walk_speed @@ -321,6 +336,13 @@ if(mob.machine.relaymove(mob,direct)) return + //Wheelchair pushing goes here for now. + //TODO: Fuck wheelchairs. + if(istype(mob.pulledby, /obj/structure/bed/chair/wheelchair)) + move_delay += 1 + return mob.pulledby.relaymove(mob, direct) + + //We are now going to move moving = 1 diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 1126f438742..242678f308c 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -756,7 +756,11 @@ Note that amputating the affected organ does in fact remove the infection from t switch(disintegrate) if(DROPLIMB_EDGE) + // compile_icon() used to be here, but it's causing issues, so RIP. add_blood(victim) + var/matrix/M = matrix() + M.Turn(rand(180)) + src.transform = M if(!clean) //Throw limb around. if(src && istype(loc,/turf)) diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 2aa8b23be0f..7429ebd93f4 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -1,9 +1,8 @@ var/list/obj/machinery/photocopier/faxmachine/allfaxes = list() -var/list/admin_departments = list("[boss_name]", "Sol Government", "Supply") -var/list/alldepartments = list() - var/list/arrived_faxes = list() //cache for faxes that have been sent to the admins var/list/sent_faxes = list() //cache for faxes that have been sent by the admins +var/list/alldepartments = list() +var/list/admin_departments = list("[boss_name]", "Sol Government", "Supply") /obj/machinery/photocopier/faxmachine name = "fax machine" @@ -16,9 +15,18 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins idle_power_usage = 30 active_power_usage = 200 + var/static/const/adminfax_cooldown = 1800 // in 1/10 seconds + var/static/const/normalfax_cooldown = 300 + var/static/const/broadcastfax_cooldown = 3000 + + var/static/const/broadcast_departments = "Stationwide broadcast (WARNING)" + var/static/list/admin_departments = list("Central Command", "Sol Government") + var/obj/item/weapon/card/id/scan = null // identification var/authenticated = 0 - var/sendcooldown = 0 // to avoid spamming fax messages + var/sendtime = 0 // Time when fax was sent + var/sendcooldown = 0 // Delay, before another fax can be sent (in 1/10 second). Used by set_cooldown() and get_remaining_cooldown() + var/department = "Unknown" // our department var/destination = null // the department we're sending to @@ -58,7 +66,7 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins dat += "Remove Item

" if(sendcooldown) - dat += "Transmitter arrays realigning. Please stand by.
" + dat += "Transmitter arrays realigning. Please stand by. [round(get_remaining_cooldown() / 10)] seconds remaining.
" else @@ -69,7 +77,7 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins else if(sendcooldown) dat += "Please insert paper to send via secure connection.

" - dat += "Transmitter arrays realigning. Please stand by.
" + dat += "Transmitter arrays realigning. Please stand by. [round(get_remaining_cooldown() / 10)] seconds remaining.
" else dat += "Please insert paper to send via secure connection.

" @@ -89,19 +97,30 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins user << browse(dat, "window=copier") onclose(user, "copier") + + if (sendcooldown != 0) + spawn(50) + // Auto-refresh every 5 seconds, if cooldown is active + updateUsrDialog() + return /obj/machinery/photocopier/faxmachine/Topic(href, href_list) if(href_list["send"]) + if (sendcooldown > 0) + // Rate-limit sending faxes + usr << "The fax machine isn't ready, yet!" + updateUsrDialog() + return + if(copyitem) if (destination in admin_departments) send_admin_fax(usr, destination) + else if (destination == broadcast_departments) + send_broadcast_fax() else sendfax(destination) - - if (sendcooldown) - spawn(sendcooldown) // cooldown time - sendcooldown = 0 + updateUsrDialog() else if(href_list["remove"]) if(copyitem) @@ -133,7 +152,7 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins if(href_list["dept"]) var/lastdestination = destination - destination = input(usr, "Which department?", "Choose a department", "") as null|anything in (alldepartments + admin_departments) + destination = input(usr, "Which department?", "Choose a department", "") as null|anything in (alldepartments + admin_departments + broadcast_departments) if(!destination) destination = lastdestination if(href_list["auth"]) @@ -166,9 +185,44 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins updateUsrDialog() -/obj/machinery/photocopier/faxmachine/proc/sendfax(var/destination) +/obj/machinery/photocopier/faxmachine/process() + .=..() + /var/static/ui_update_delay = 0 + + var/current_time = world.time + if (current_time > sendtime + sendcooldown) + sendcooldown = 0 + +/* + * Set the send cooldown + * cooldown: duration in ~1/10s + */ +/obj/machinery/photocopier/faxmachine/proc/set_cooldown(var/cooldown) + // Reset send time + sendtime = world.time + + // Set cooldown length + sendcooldown = cooldown + +/* + * Get remaining cooldown duration in ~1/10s + */ +/obj/machinery/photocopier/faxmachine/proc/get_remaining_cooldown() + var/remaining_time = (sendtime + sendcooldown) - world.time + if ((remaining_time < 0) || (sendcooldown == 0)) + // Time is up, but Process() hasn't caught up, yet + // or no cooldown has been set + remaining_time = 0 + return remaining_time + +/* + * Send normal fax message to on-station fax machine + * destination: (string) from /allfaxes + * display_message: (bool) 1=display info text, 0="silent mode" + */ +/obj/machinery/photocopier/faxmachine/proc/sendfax(var/destination, var/display_message = 1) if(stat & (BROKEN|NOPOWER)) - return + return 0 use_power(200) @@ -177,11 +231,14 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins if( F.department == destination ) success = F.recievefax(copyitem) - if (success) - visible_message("[src] beeps, \"Message transmitted successfully.\"") - //sendcooldown = 600 - else - visible_message("[src] beeps, \"Error transmitting message.\"") + if (display_message) + // Normal fax + if (success) + visible_message("[src] beeps, \"Message transmitted successfully.\"") + sendcooldown = normalfax_cooldown + else + visible_message("[src] beeps, \"Error transmitting message.\"") + return success /obj/machinery/photocopier/faxmachine/proc/recievefax(var/obj/item/incoming) if(stat & (BROKEN|NOPOWER)) @@ -209,6 +266,22 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins return 1 +/obj/machinery/photocopier/faxmachine/proc/send_broadcast_fax() + var success = 1 + for (var/dest in (alldepartments - department)) + // Send to everyone except this department + delay(1) + success &= sendfax(dest, 0) // 0: don't display success/error messages + + if(!success)// Stop on first error + break + if (success) + visible_message("[src] beeps, \"Messages transmitted successfully.\"") + set_cooldown(broadcastfax_cooldown) + else + visible_message("[src] beeps, \"Error transmitting messages.\"") + set_cooldown(normalfax_cooldown) + /obj/machinery/photocopier/faxmachine/proc/send_admin_fax(var/mob/sender, var/destination) if(stat & (BROKEN|NOPOWER)) return @@ -237,9 +310,9 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins message_admins(sender, "SOL GOVERNMENT FAX", rcvdcopy, "CentcommFaxReply", "#1F66A0") //message_admins(sender, "SOL GOVERNMENT FAX", rcvdcopy, "SolGovFaxReply", "#1F66A0") - sendcooldown = 1800 - sleep(50) - visible_message("[src] beeps, \"Message transmitted successfully.\"") + set_cooldown(adminfax_cooldown) + spawn(50) + visible_message("[src] beeps, \"Message transmitted successfully.\"") /obj/machinery/photocopier/faxmachine/proc/message_admins(var/mob/sender, var/faxname, var/obj/item/sent, var/reply_type, font_colour="#006100") diff --git a/code/modules/reagents/reagent_containers/blood_pack.dm b/code/modules/reagents/reagent_containers/blood_pack.dm index 86476938e88..9514f78bdfe 100644 --- a/code/modules/reagents/reagent_containers/blood_pack.dm +++ b/code/modules/reagents/reagent_containers/blood_pack.dm @@ -66,9 +66,8 @@ ..() /obj/item/weapon/reagent_containers/blood/examine(mob/user, distance = 2) - ..() - if (vampire_marks) - user << "There are teeth marks on it." + if (..() && vampire_marks) + user << "There are teeth marks on it." return /obj/item/weapon/reagent_containers/blood/attackby(obj/item/weapon/P as obj, mob/user as mob) diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index d670e2a8d02..4186c997037 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -1677,7 +1677,7 @@ afterattack(obj/O as obj, var/mob/living/carbon/human/user as mob, proximity) if(!proximity) return - if(istype(O,/obj/structure/sink) && !wrapped) + if(( istype(O, /obj/structure/reagent_dispensers/watertank) || istype(O,/obj/structure/sink) ) && !wrapped) user << "You place \the [name] under a stream of water..." if(istype(user)) user.unEquip(src) diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index 46b0d1851d4..0c5987c3f36 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -6,7 +6,7 @@ on = 0 powered = 1 locked = 0 - move_speed = 3 + load_item_visible = 1 load_offset_x = 0 mob_offset_y = 7 @@ -29,7 +29,7 @@ anchored = 0 passenger_allowed = 0 locked = 0 - //move_speed = 3 + load_item_visible = 1 load_offset_x = 0 load_offset_y = 4 @@ -352,12 +352,15 @@ /obj/vehicle/train/cargo/engine/update_car(var/train_length, var/active_engines) src.train_length = train_length src.active_engines = active_engines - move_speed = initial(move_speed) //so that engines that have been turned off don't lag behind + //Update move delay - if(is_train_head() && on) - var/remainder = (car_limit * active_engines) - (train_length - active_engines) - if (remainder) - move_speed -= 0.25 * remainder //makes cargo trains 10% slower than running when not overweight + if(!is_train_head() || !on) + move_delay = initial(move_delay) //so that engines that have been turned off don't lag behind + else + move_delay = max(0, (-car_limit * active_engines) + train_length - active_engines) //limits base overweight so you cant overspeed trains + move_delay *= (1 / max(1, active_engines)) * 2 //overweight penalty (scaled by the number of engines) + move_delay += config.walk_speed //base reference speed + move_delay *= config.vehicle_delay_multiplier //makes cargo trains 10% slower than running when not overweight /obj/vehicle/train/cargo/trolley/update_car(var/train_length, var/active_engines) src.train_length = train_length diff --git a/code/modules/vehicles/train.dm b/code/modules/vehicles/train.dm index d3136822aca..d6c0b934e1c 100644 --- a/code/modules/vehicles/train.dm +++ b/code/modules/vehicles/train.dm @@ -2,6 +2,7 @@ name = "train" dir = 4 + move_delay = 1 health = 100 maxhealth = 100 @@ -28,19 +29,13 @@ var/old_loc = get_turf(src) if(..()) if(tow) - tow.forceMove(old_loc) + tow.Move(old_loc) return 1 else if(lead) unattach() return 0 -obj/vehicle/train/forceMove() - var/old_loc = get_turf(src) - ..() - if(tow) - tow.forceMove(old_loc) - /obj/vehicle/train/Bump(atom/Obstacle) if(!istype(Obstacle, /atom/movable)) return @@ -56,7 +51,7 @@ obj/vehicle/train/forceMove() var/mob/living/M = A visible_message("\red [src] knocks over [M]!") M.apply_effects(5, 5) //knock people down if you hit them - M.apply_damages(10 * move_speed) // and do damage according to how fast the train is going + M.apply_damages(22 / move_delay) // and do damage according to how fast the train is going if(istype(load, /mob/living/carbon/human)) var/mob/living/D = load D << "\red You hit [M]!" diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index da9d85aa0e7..b44b27582fe 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -28,10 +28,7 @@ var/stat = 0 var/emagged = 0 var/powered = 0 //set if vehicle is powered and should use fuel when moving - - move_speed = 2//Expressed in tiles per second. This is used to control how fast the vehicle moves - - var/move_delay//DO NOT MANUALLY SET THIS. For internal use only + var/move_delay = 1 //set this to limit the speed of the vehicle var/obj/item/weapon/cell/cell var/charge_use = 5 //set this to adjust the amount of power the vehicle uses per move @@ -48,22 +45,8 @@ /obj/vehicle/New() ..() //spawn the cell you want in each vehicle - calc_delay() - -/obj/vehicle/proc/calc_delay() - if (!move_speed || move_speed < 0)//Shouldn't happen - move_speed = 0 - move_delay = 999999999 - return 0 - - move_delay = (1 / move_speed) * 10 * config.vehicle_delay_multiplier - return 1 - /obj/vehicle/Move() - if (!move_speed) - return 0 - if(world.time > l_move_time + move_delay) var/old_loc = get_turf(src) if(on && powered && cell.charge < charge_use) @@ -188,7 +171,6 @@ // Vehicle procs //------------------------------------------- /obj/vehicle/proc/turn_on() - calc_delay() if(stat) return 0 if(powered && cell.charge < charge_use) @@ -318,7 +300,6 @@ if(ismob(C)) buckle_mob(C) - calc_delay() return 1 /obj/vehicle/user_unbuckle_mob(var/mob/user) @@ -366,9 +347,15 @@ unbuckle_mob(load) load = null - calc_delay() + return 1 +// This exists to stop a weird jumping motion when you disembark. +// It essentially makes disembarkation count as a movement. +// Yes, it's not the full calculation. But it's relatively close, and will make it seamless. +/obj/vehicle/post_buckle_mob(var/mob/M) + if (M.client) + M.client.move_delay = M.movement_delay() + config.walk_speed //------------------------------------------------------- // Stat update procs diff --git a/code/modules/ventcrawl/ventcrawl.dm b/code/modules/ventcrawl/ventcrawl.dm index 84d5b1d30cd..3366340ea8d 100644 --- a/code/modules/ventcrawl/ventcrawl.dm +++ b/code/modules/ventcrawl/ventcrawl.dm @@ -5,6 +5,7 @@ var/list/ventcrawl_machinery = list( // Vent crawling whitelisted items, whoo /mob/living/var/list/can_enter_vent_with = list( + /obj/item/device/mmi, /obj/item/weapon/implant, /obj/item/device/radio/borg, /obj/item/weapon/holder, diff --git a/code/modules/ventcrawl/ventcrawl_atmospherics.dm b/code/modules/ventcrawl/ventcrawl_atmospherics.dm index 4a9901952c6..32f32452381 100644 --- a/code/modules/ventcrawl/ventcrawl_atmospherics.dm +++ b/code/modules/ventcrawl/ventcrawl_atmospherics.dm @@ -51,10 +51,10 @@ else if((direction & initialize_directions) || is_type_in_list(src, ventcrawl_machinery) && src.can_crawl_through()) //if we move in a way the pipe can connect, but doesn't - or we're in a vent user.remove_ventcrawl() - user.forceMove(src.loc) + user.forceMove(check_neighbor_density(get_turf(src.loc), direction) ? src.loc : get_step(src, direction)) user.sight &= ~(SEE_TURFS|BLIND) user.visible_message("You hear something squeezing through the pipes.", "You climb out the ventilation system.") - user.vent_trap_check("arriving", target_move) + user.vent_trap_check("arriving", user.loc) user.canmove = 0 spawn(1) user.canmove = 1 diff --git a/code/setup.dm.back b/code/setup.dm.back index 7ed113467e4..2b443cdae5c 100644 --- a/code/setup.dm.back +++ b/code/setup.dm.back @@ -1091,11 +1091,6 @@ var/list/be_special_flags = list( #define RESPAWN_ANIMAL 3000 #define RESPAWN_MINISYNTH 6000 -// Night lighting controller times -// The time (in ticks based on worldtime2ticks()) that various actions trigger -#define MORNING_LIGHT_RESET 252000 // 7am or 07:00 - lighting restores to normal in morning -#define NIGHT_LIGHT_ACTIVE 648000 // 6pm or 18:00 - night lighting mode activates - //Cargo random stock vars //These are used in randomstock.dm //And also for generating random loot crates in crates.dm @@ -1105,7 +1100,7 @@ var/list/be_special_flags = list( #define STOCK_UNCOMMON_PROB 23 //The probability, as a percentage for each item, that we'll choose from the uncommon spawns list -#define STOCK_RARE_PROB 2.8 +#define STOCK_RARE_PROB 2.4 //The probability, as a percentage for each item, that we'll choose from the rare spawns list //If an item is not rare or uncommon, it will be chosen from the common spawns list. diff --git a/config/example/config.txt b/config/example/config.txt index b9638ee7fd6..dab0413e199 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -263,6 +263,12 @@ USEALIENWHITELIST ## Comment this to disable automated station night lighting NIGHT_LIGHTING +## Hour when the station night lighting is disabled (if above is enabled) +NL_FINISH_HOUR 8 + +## Hour when the station night lighting is enabled (if above is enabled) +NL_START_HOUR 19 + ## Comment this to unrestrict the number of alien players allowed in the round. The number represents the number of alien players for every human player. #ALIEN_PLAYER_RATIO 0.2 ##Remove the # to let ghosts spin chairs diff --git a/html/changelog.html b/html/changelog.html index 37505b579e0..4a5912a659d 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,47 @@ -->
+

18 November 2016

+

Bedshaped updated:

+
    +
  • Fixed bitten blood bag message displaying incorrectly.
  • +
+

Nanako updated:

+
    +
  • Fixed healing of animals with food, bandages, ointment, and trauma/burn kits. All of these things should work now.
  • +
  • Animals will now show if they're wounded upon examination.
  • +
+ +

11 November 2016

+

Bedshaped updated:

+
    +
  • Fixed Spider-bots unable to vent-crawl.
  • +
  • Fixed a runtime error when exiting through a pipe after vent-crawling.
  • +
  • Fixed incorrect message when putting robots in storage.
  • +
  • Fixed floor painters being able to be used on non-valid tiles.
  • +
  • Fixed magnetic locks unable to be damaged and increased their health.
  • +
  • Quietened Bosun's whistle.
  • +
+ +

09 November 2016

+

Nanako updated:

+
    +
  • Fixed a significant issue that caused many people to sprint slower than they should have.
  • +
  • Fixed being able to regenerate stamina while hungry and drive nutrition into infinite negative.
  • +
  • Fixed being able to set your walk speed so low you paralyse yourself almost forever.
  • +
  • Adjusted many values related to sprinting and stamina
  • +
+

Skull132 updated:

+
    +
  • Fixed the trolleys and trams by reverting code, and simply tweaking the values to reference the updated move system. All issues, including edgecases, should be resolved now.
  • +
+ +

07 November 2016

+

Skull132 updated:

+
    +
  • Reverted the changes done to limb removal. They now flip again. Also no longer lose hair while doing so.
  • +
+

06 November 2016

Alberyk updated:

    @@ -80,6 +121,8 @@
  • Added new poster designs.
  • Added magboots and insulated gauntlets to the chief engineer hardsuit.
  • Selecting the combat module as cyborgs now requires an event to be activated via the keycard authentication device, an upgrade from roboticis or code delta also triggers also allows it.
  • +
  • Added a glowstick crate and another contraband crate to cargo.
  • +
  • Removed job restriction from jackboots on the custom loadout.

Bedshaped updated:

    @@ -139,6 +182,11 @@
    • Updated PDA Power Monitor UI.
    • Sleeper Console now uses fancy NanoUI. Added printout feature. Added sanity checks.
    • +
    • Removed animation on emagging robotic limbs.
    • +
    • Fixed CCIAA turret whitelist.
    • +
    • Fixed fax machine cooldown.
    • +
    • Added ability to expand monkey cubes at water tanks.
    • +
    • Added stationwide fax broadcast.

    30 October 2016

    diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index b72a3578e69..2ae0b9e5b5c 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -3414,6 +3414,8 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. - tweak: Selecting the combat module as cyborgs now requires an event to be activated via the keycard authentication device, an upgrade from roboticis or code delta also triggers also allows it. + - rscadd: Added a glowstick crate and another contraband crate to cargo. + - tweak: Removed job restriction from jackboots on the custom loadout. Bedshaped: - rscadd: Added a button on APCs to set the area lights to a 'night-mode' which is dimmer and saves energy. @@ -3492,3 +3494,40 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. - tweak: Updated PDA Power Monitor UI. - tweak: Sleeper Console now uses fancy NanoUI. Added printout feature. Added sanity checks. + - bugfix: Removed animation on emagging robotic limbs. + - bugfix: Fixed CCIAA turret whitelist. + - bugfix: Fixed fax machine cooldown. + - rscadd: Added ability to expand monkey cubes at water tanks. + - rscadd: Added stationwide fax broadcast. +2016-11-07: + Skull132: + - tweak: Reverted the changes done to limb removal. They now flip again. Also no + longer lose hair while doing so. +2016-11-09: + Nanako: + - bugfix: Fixed a significant issue that caused many people to sprint slower than + they should have. + - bugfix: Fixed being able to regenerate stamina while hungry and drive nutrition + into infinite negative. + - bugfix: Fixed being able to set your walk speed so low you paralyse yourself almost + forever. + - tweak: Adjusted many values related to sprinting and stamina + Skull132: + - bugfix: Fixed the trolleys and trams by reverting code, and simply tweaking the + values to reference the updated move system. All issues, including edgecases, + should be resolved now. +2016-11-11: + Bedshaped: + - bugfix: Fixed Spider-bots unable to vent-crawl. + - bugfix: Fixed a runtime error when exiting through a pipe after vent-crawling. + - bugfix: Fixed incorrect message when putting robots in storage. + - bugfix: Fixed floor painters being able to be used on non-valid tiles. + - bugfix: Fixed magnetic locks unable to be damaged and increased their health. + - tweak: Quietened Bosun's whistle. +2016-11-18: + Bedshaped: + - bugfix: Fixed bitten blood bag message displaying incorrectly. + Nanako: + - bugfix: Fixed healing of animals with food, bandages, ointment, and trauma/burn + kits. All of these things should work now. + - rscadd: Animals will now show if they're wounded upon examination. diff --git a/icons/obj/custom_items/rur_collar.dmi b/icons/obj/custom_items/rur_collar.dmi new file mode 100644 index 00000000000..1d95eb76d30 Binary files /dev/null and b/icons/obj/custom_items/rur_collar.dmi differ diff --git a/icons/obj/custom_items/simon_scarf.dmi b/icons/obj/custom_items/simon_scarf.dmi new file mode 100644 index 00000000000..44ce2f881a9 Binary files /dev/null and b/icons/obj/custom_items/simon_scarf.dmi differ diff --git a/icons/obj/decals.dmi b/icons/obj/decals.dmi index acf4b0ffdac..8e8066fcd54 100644 Binary files a/icons/obj/decals.dmi and b/icons/obj/decals.dmi differ diff --git a/sound/misc/bosuns_whistle.ogg b/sound/misc/bosuns_whistle.ogg index c767cb6fde4..1cc7bce4417 100644 Binary files a/sound/misc/bosuns_whistle.ogg and b/sound/misc/bosuns_whistle.ogg differ