diff --git a/.github/workflows/autochangelog.yml b/.github/workflows/autochangelog.yml index 77324267187..7953929ce55 100644 --- a/.github/workflows/autochangelog.yml +++ b/.github/workflows/autochangelog.yml @@ -1,6 +1,6 @@ name: Autochangelog on: - pull_request: + pull_request_target: types: closed branches: - master @@ -15,6 +15,10 @@ jobs: if: github.event.pull_request.merged == true steps: - uses: /actions/checkout@v2 + with: + ref: master + - name: Update repository to master + run: git pull "origin" master - name: Ensure +x on CI directory run: | chmod -R +x ./tools/ci diff --git a/code/__defines/damage_organs.dm b/code/__defines/damage_organs.dm index c87b9942dfc..db1a71c77a6 100644 --- a/code/__defines/damage_organs.dm +++ b/code/__defines/damage_organs.dm @@ -61,4 +61,8 @@ #define INFECTION_LEVEL_ONE 100 #define INFECTION_LEVEL_TWO 500 #define INFECTION_LEVEL_THREE 1000 -#define INFECTION_LEVEL_MAX 1500 \ No newline at end of file +#define INFECTION_LEVEL_MAX 1500 + +#define MODULAR_BODYPART_INVALID 0 // Cannot be detached or reattached. +#define MODULAR_BODYPART_PROSTHETIC 1 // Can be detached or reattached freely. +#define MODULAR_BODYPART_CYBERNETIC 2 // Can be detached or reattached to compatible parent organs. diff --git a/code/__defines/species_languages.dm b/code/__defines/species_languages.dm index f6ca0ea5655..4c80db6450b 100644 --- a/code/__defines/species_languages.dm +++ b/code/__defines/species_languages.dm @@ -24,6 +24,29 @@ #define EMP_TOX_DMG 0x80 // EMPs inflict toxin damage #define EMP_OXY_DMG 0x100 // EMPs inflict oxy damage +// Species allergens +#define MEAT 0x1 // Skrell won't like this. +#define FISH 0x2 // Seperate for completion's sake. Still bad for skrell. +#define FRUIT 0x4 // An apple a day only keeps the doctor away if they're allergic. +#define VEGETABLE 0x8 // Taters 'n' carrots. Potato allergy is a thing, apparently. +#define GRAINS 0x10 // Wheat, oats, etc. +#define BEANS 0x20 // The musical fruit! Includes soy. +#define SEEDS 0x40 // Hope you don't have a nut allergy. +#define DAIRY 0x80 // Lactose intolerance, ho! Also bad for skrell. +#define FUNGI 0x100 // Delicious shrooms. +#define COFFEE 0x200 // Mostly here for tajara. +#define GENERIC 0x400 // Catchall for stuff that doesn't fall into the groups above. You shouldn't be allergic to this type, ever. +#define SUGARS 0x800 // For unathi-like reactions + +// Allergen reactions +#define AG_TOX_DMG 0x1 // the classic +#define AG_OXY_DMG 0x2 // intense airway reactions +#define AG_EMOTE 0x4 // general emote reactions based on affect type +#define AG_PAIN 0x8 // short-lived hurt +#define AG_WEAKEN 0x10 // too weak to move, oof +#define AG_BLURRY 0x20 // blurred vision! +#define AG_SLEEPY 0x40 // fatigue/exhaustion + // Species spawn flags #define SPECIES_IS_WHITELISTED 0x1 // Must be whitelisted to play. #define SPECIES_IS_RESTRICTED 0x2 // Is not a core/normally playable species. (castes, mutantraces) diff --git a/code/_helpers/_global_objects.dm b/code/_helpers/_global_objects.dm index 4cbbcf33147..adbd2785e85 100644 --- a/code/_helpers/_global_objects.dm +++ b/code/_helpers/_global_objects.dm @@ -1 +1,2 @@ -var/datum/gear_tweak/color/gear_tweak_free_color_choice = new() \ No newline at end of file +var/datum/gear_tweak/color/gear_tweak_free_color_choice = new() +var/datum/gear_tweak/implant_location/gear_tweak_implant_location = new() \ No newline at end of file diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index 855decff39a..0d10e33b492 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -94,13 +94,13 @@ var/global/list/string_slot_flags = list( "holster" = SLOT_HOLSTER ) -/proc/get_mannequin(var/ckey) - if(!mannequins_) - mannequins_ = new() - . = mannequins_[ckey] - if(!.) - . = new/mob/living/carbon/human/dummy/mannequin() - mannequins_[ckey] = . +GLOBAL_LIST_EMPTY(mannequins) +/proc/get_mannequin(var/ckey = "NULL") + var/mob/living/carbon/human/dummy/mannequin/M = GLOB.mannequins[ckey] + if(!istype(M)) + GLOB.mannequins[ckey] = new /mob/living/carbon/human/dummy/mannequin(null) + M = GLOB.mannequins[ckey] + return M ////////////////////////// /////Initial Building///// diff --git a/code/_helpers/global_lists_vr.dm b/code/_helpers/global_lists_vr.dm index f0787cec292..d45406225c1 100644 --- a/code/_helpers/global_lists_vr.dm +++ b/code/_helpers/global_lists_vr.dm @@ -537,4 +537,22 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN, for(var/species_name in whitelisted_icons) custom_species_bases += species_name + // Weaver recipe stuff + paths = typesof(/datum/weaver_recipe/structure) - /datum/weaver_recipe/structure + for(var/path in paths) + var/datum/weaver_recipe/instance = new path() + if(!instance.title) + continue //A prototype or something + weavable_structures[instance.title] = instance + + paths = typesof(/datum/weaver_recipe/item) - /datum/weaver_recipe/item + for(var/path in paths) + var/datum/weaver_recipe/instance = new path() + if(!instance.title) + continue //A prototype or something + weavable_items[instance.title] = instance + return 1 // Hooks must return 1 + +var/global/list/weavable_structures = list() +var/global/list/weavable_items = list() \ No newline at end of file diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index d63d49e8d76..213fe57b90e 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -60,6 +60,8 @@ // Cyborgs have no range-checking unless there is item use if(!W) + if(bolt && !bolt.malfunction && A.loc != module) + return A.add_hiddenprint(src) A.attack_robot(src) return @@ -120,35 +122,56 @@ /atom/proc/BorgCtrlShiftClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden CtrlShiftClick(user) -/obj/machinery/door/airlock/BorgCtrlShiftClick(mob/user) +/obj/machinery/door/airlock/BorgCtrlShiftClick(var/mob/living/silicon/robot/user) + if(user.bolt && !user.bolt.malfunction) + return + AICtrlShiftClick(user) /atom/proc/BorgShiftClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden ShiftClick(user) -/obj/machinery/door/airlock/BorgShiftClick(mob/user) // Opens and closes doors! Forwards to AI code. +/obj/machinery/door/airlock/BorgShiftClick(var/mob/living/silicon/robot/user) // Opens and closes doors! Forwards to AI code. + if(user.bolt && !user.bolt.malfunction) + return + AIShiftClick(user) /atom/proc/BorgCtrlClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden CtrlClick(user) -/obj/machinery/door/airlock/BorgCtrlClick(mob/user) // Bolts doors. Forwards to AI code. +/obj/machinery/door/airlock/BorgCtrlClick(var/mob/living/silicon/robot/user) // Bolts doors. Forwards to AI code. + if(user.bolt && !user.bolt.malfunction) + return + AICtrlClick(user) -/obj/machinery/power/apc/BorgCtrlClick(mob/user) // turns off/on APCs. Forwards to AI code. +/obj/machinery/power/apc/BorgCtrlClick(var/mob/living/silicon/robot/user) // turns off/on APCs. Forwards to AI code. + if(user.bolt && !user.bolt.malfunction) + return + AICtrlClick(user) -/obj/machinery/turretid/BorgCtrlClick(mob/user) //turret control on/off. Forwards to AI code. +/obj/machinery/turretid/BorgCtrlClick(var/mob/living/silicon/robot/user) //turret control on/off. Forwards to AI code. + if(user.bolt && !user.bolt.malfunction) + return + AICtrlClick(user) /atom/proc/BorgAltClick(var/mob/living/silicon/robot/user) AltClick(user) return -/obj/machinery/door/airlock/BorgAltClick(mob/user) // Eletrifies doors. Forwards to AI code. +/obj/machinery/door/airlock/BorgAltClick(var/mob/living/silicon/robot/user) // Eletrifies doors. Forwards to AI code. + if(user.bolt && !user.bolt.malfunction) + return + AIAltClick(user) -/obj/machinery/turretid/BorgAltClick(mob/user) //turret lethal on/off. Forwards to AI code. +/obj/machinery/turretid/BorgAltClick(var/mob/living/silicon/robot/user) //turret lethal on/off. Forwards to AI code. + if(user.bolt && !user.bolt.malfunction) + return + AIAltClick(user) /* diff --git a/code/controllers/subsystems/overlays.dm b/code/controllers/subsystems/overlays.dm index 60b08c71d2c..77c9d3ab94a 100644 --- a/code/controllers/subsystems/overlays.dm +++ b/code/controllers/subsystems/overlays.dm @@ -5,7 +5,6 @@ SUBSYSTEM_DEF(overlays) priority = FIRE_PRIORITY_OVERLAYS init_order = INIT_ORDER_OVERLAY - var/initialized = FALSE var/list/queue // Queue of atoms needing overlay compiling (TODO-VERIFY!) var/list/stats var/list/overlay_icon_state_caches // Cache thing @@ -22,7 +21,6 @@ var/global/image/appearance_bro = new() // Temporarily super-global because of B stats = list() /datum/controller/subsystem/overlays/Initialize() - initialized = TRUE fire(mc_check = FALSE) ..() diff --git a/code/controllers/subsystems/processing/chemistry.dm b/code/controllers/subsystems/processing/chemistry.dm index 7f4fd9c42b6..b4641ba7e00 100644 --- a/code/controllers/subsystems/processing/chemistry.dm +++ b/code/controllers/subsystems/processing/chemistry.dm @@ -22,6 +22,7 @@ PROCESSING_SUBSYSTEM_DEF(chemistry) /datum/controller/subsystem/processing/chemistry/Initialize() initialize_chemical_reactions() initialize_chemical_reagents() + ..() //Chemical Reactions - Initialises all /datum/chemical_reaction into a list // It is filtered into multiple lists within a list. diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index 0c626ec041b..750f6807cca 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -183,11 +183,6 @@ var/global/datum/controller/subsystem/ticker/ticker if(adm["total"] == 0) send2adminirc("A round has started with no admins online.") -/* supply_controller.process() //Start the supply shuttle regenerating points -- TLE // handled in scheduler - master_controller.process() //Start master_controller.process() - lighting_controller.process() //Start processing DynamicAreaLighting updates - */ - current_state = GAME_STATE_PLAYING Master.SetRunLevel(RUNLEVEL_GAME) diff --git a/code/datums/autolathe/engineering_vr.dm b/code/datums/autolathe/engineering_vr.dm index 08e1cf986bf..90970c6e481 100644 --- a/code/datums/autolathe/engineering_vr.dm +++ b/code/datums/autolathe/engineering_vr.dm @@ -4,4 +4,24 @@ /datum/category_item/autolathe/engineering/id_restorer name = "ID restoration console electronics" - path =/obj/item/weapon/circuitboard/id_restorer \ No newline at end of file + path =/obj/item/weapon/circuitboard/id_restorer + +/datum/category_item/autolathe/engineering/oven + name = "oven electronics" + path =/obj/item/weapon/circuitboard/oven + +/datum/category_item/autolathe/engineering/fryer + name = "fryer electronics" + path =/obj/item/weapon/circuitboard/fryer + +/datum/category_item/autolathe/engineering/grill + name = "grill electronics" + path =/obj/item/weapon/circuitboard/grill + +/datum/category_item/autolathe/engineering/cerealmaker + name = "cereal maker electronics" + path =/obj/item/weapon/circuitboard/cerealmaker + +/datum/category_item/autolathe/engineering/candymachine + name = "candy machine electronics" + path =/obj/item/weapon/circuitboard/candymachine \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 157a3f113ff..82e5f1f78bd 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -513,8 +513,9 @@ //HUMAN /mob/living/carbon/human/mind_initialize() - ..() - if(!mind.assigned_role) mind.assigned_role = USELESS_JOB //defualt //VOREStation Edit - Visitor not Assistant + . = ..() + if(!mind.assigned_role) + mind.assigned_role = USELESS_JOB //defualt //VOREStation Edit - Visitor not Assistant //slime /mob/living/simple_mob/slime/mind_initialize() diff --git a/code/datums/roundstats/_defines_local.dm b/code/datums/roundstats/_defines_local.dm new file mode 100644 index 00000000000..951d7118ff8 --- /dev/null +++ b/code/datums/roundstats/_defines_local.dm @@ -0,0 +1,7 @@ + +#define GOAL_GENERAL "Common Goal" +#define GOAL_MEDICAL "Medical Goal" +#define GOAL_SECURITY "Security Goal" +#define GOAL_ENGINEERING "Engineering Goal" +#define GOAL_CARGO "Cargo Goal" +#define GOAL_RESEARCH "Research Goal" diff --git a/code/datums/roundstats/departmentgoal.dm b/code/datums/roundstats/departmentgoal.dm new file mode 100644 index 00000000000..333e6c03963 --- /dev/null +++ b/code/datums/roundstats/departmentgoal.dm @@ -0,0 +1,101 @@ + +GLOBAL_LIST(department_goals) +GLOBAL_LIST(active_department_goals) + +/hook/startup/proc/initializeDepartmentGoals() + GLOB.department_goals = list(GOAL_GENERAL, GOAL_MEDICAL, GOAL_SECURITY, GOAL_ENGINEERING, GOAL_CARGO, GOAL_RESEARCH) + GLOB.active_department_goals = list(GOAL_GENERAL, GOAL_MEDICAL, GOAL_SECURITY, GOAL_ENGINEERING, GOAL_CARGO, GOAL_RESEARCH) + + for(var/category in GLOB.department_goals) + GLOB.department_goals[category] = list() + + for(var/subtype in subtypesof(/datum/goal)) + var/datum/goal/SG = new subtype() + + if(SG.name == "goal") + continue + + if(SG.category == category) + GLOB.department_goals[category] |= SG + + for(var/category in GLOB.active_department_goals) + GLOB.active_department_goals[category] = list() + var/list/cat_goals = GLOB.department_goals[category] + + var/goal_count = rand(2,4) + + for(var/count = 1 to goal_count) + var/datum/goal/G + + if(LAZYLEN(cat_goals)) + G = pick(cat_goals) + + if(G) + G.active_goal = TRUE + cat_goals -= G + + GLOB.active_department_goals[category] |= G + return 1 + +/hook/roundend/proc/checkDepartmentGoals() + for(var/category in GLOB.active_department_goals) + var/list/cat_goals = GLOB.active_department_goals[category] + + to_world("[category]") + + if(!LAZYLEN(cat_goals)) + to_world("There were no assigned goals!") + + else + for(var/datum/goal/G in cat_goals) + var/success = G.check_completion() + to_world("[success ? "[G.name]" : "[G.name]"]") + to_world("[G.goal_text]") + return 1 + +/datum/goal + var/name = "goal" + + var/goal_text = "Do nothing! Congratulations." + + var/active_goal = FALSE + + var/category = GOAL_GENERAL + +/datum/goal/proc/check_completion() + return FALSE + +/datum/goal/common + name = "goal" + + goal_text = "Congratulations, you still do nothing." + +/datum/goal/medical + name = "goal" + + goal_text = "Congratulations, you still do nothing." + category = GOAL_MEDICAL + +/datum/goal/security + name = "goal" + + goal_text = "Congratulations, you still do nothing." + category = GOAL_SECURITY + +/datum/goal/engineering + name = "goal" + + goal_text = "Congratulations, you still do nothing." + category = GOAL_ENGINEERING + +/datum/goal/cargo + name = "goal" + + goal_text = "Congratulations, you still do nothing." + category = GOAL_CARGO + +/datum/goal/research + name = "goal" + + goal_text = "Congratulations, you still do nothing." + category = GOAL_RESEARCH diff --git a/code/datums/roundstats/roundstats.dm b/code/datums/roundstats/roundstats.dm new file mode 100644 index 00000000000..c1453b18aff --- /dev/null +++ b/code/datums/roundstats/roundstats.dm @@ -0,0 +1,57 @@ + +/* + * lbnesquik - Github + * Provided massive components of this. Polaris PR #5720. + */ + +//This is for the round end stats system. + +//roundstat is used for easy finding of the variables, if you ever want to delete all of this, +//just search roundstat and you'll find everywhere this thing reaches into. +//It used to be bazinga but it only fly with microwaves. + +GLOBAL_VAR_INIT(cans_opened_roundstat, 0) +GLOBAL_VAR_INIT(lights_switched_on_roundstat, 0) +GLOBAL_VAR_INIT(turbo_lift_floors_moved_roundstat, 0) +GLOBAL_VAR_INIT(lost_limbs_shift_roundstat, 0) +GLOBAL_VAR_INIT(seed_planted_shift_roundstat, 0) +GLOBAL_VAR_INIT(step_taken_shift_roundstat, 0) +GLOBAL_VAR_INIT(destroyed_research_items_roundstat, 0) +GLOBAL_VAR_INIT(items_sold_shift_roundstat, 0) +GLOBAL_VAR_INIT(disposals_flush_shift_roundstat, 0) +GLOBAL_VAR_INIT(rocks_drilled_roundstat, 0) +GLOBAL_VAR_INIT(mech_destroyed_roundstat, 0) + +/hook/roundend/proc/RoundTrivia()//bazinga + var/list/valid_stats_list = list() //This is to be populated with the good shit + + if(GLOB.lost_limbs_shift_roundstat > 1) + valid_stats_list.Add("[GLOB.lost_limbs_shift_roundstat] limbs left their owners bodies this shift, oh no!") + else if(GLOB.destroyed_research_items_roundstat > 13) + valid_stats_list.Add("[GLOB.destroyed_research_items_roundstat] objects were destroyed in the name of Science! Keep it up!") + else if(GLOB.mech_destroyed_roundstat > 1) + valid_stats_list.Add("[GLOB.mech_destroyed_roundstat] mechs were destroyed this shift. What did you do?") + else if(GLOB.seed_planted_shift_roundstat > 20) + valid_stats_list.Add("[GLOB.seed_planted_shift_roundstat] seeds were planted according to our sensors this shift.") + + if(GLOB.rocks_drilled_roundstat > 80) + valid_stats_list.Add("Our strong miners pulverized a whole [GLOB.rocks_drilled_roundstat] piles of pathetic rubble.") + else if(GLOB.items_sold_shift_roundstat > 15) + valid_stats_list.Add("The vending machines sold [GLOB.items_sold_shift_roundstat] items today.") + else if(GLOB.step_taken_shift_roundstat > 900) + valid_stats_list.Add("The employees walked a total of [GLOB.step_taken_shift_roundstat] steps for this shift! It should put them on the road to fitness!") + + if(GLOB.cans_opened_roundstat > 0) + valid_stats_list.Add("[GLOB.cans_opened_roundstat] cans were drank today!") + else if(GLOB.lights_switched_on_roundstat > 0) + valid_stats_list.Add("[GLOB.lights_switched_on_roundstat] light switches were flipped today!") + else if(GLOB.turbo_lift_floors_moved_roundstat > 20) + valid_stats_list.Add("The elevator moved up [GLOB.turbo_lift_floors_moved_roundstat] floors today!") + else if(GLOB.disposals_flush_shift_roundstat > 40) + valid_stats_list.Add("The disposal system flushed a whole [GLOB.disposals_flush_shift_roundstat] times for this shift. We should really invest in waste treatement.") + + if(LAZYLEN(valid_stats_list)) + to_world("Shift trivia!") + + for(var/body in valid_stats_list) + to_world("[body]") diff --git a/code/datums/supplypacks/robotics.dm b/code/datums/supplypacks/robotics.dm index 5f8cf6337c8..1928ee7db68 100644 --- a/code/datums/supplypacks/robotics.dm +++ b/code/datums/supplypacks/robotics.dm @@ -189,6 +189,17 @@ containername = "Jumper kit crate" access = access_robotics +/datum/supply_pack/robotics/restrainingbolt + name = "Restraining bolt crate" + contains = list( + /obj/item/weapon/implanter = 1, + /obj/item/weapon/implantcase/restrainingbolt = 2 + ) + cost = 40 + containertype = /obj/structure/closet/crate/secure/cybersolutions + containername = "Restraining bolt crate" + access = access_robotics + /datum/supply_pack/robotics/bike name = "Spacebike Crate" contains = list() diff --git a/code/datums/supplypacks/security.dm b/code/datums/supplypacks/security.dm index 5fd24a473fe..32c847ece2e 100644 --- a/code/datums/supplypacks/security.dm +++ b/code/datums/supplypacks/security.dm @@ -281,10 +281,7 @@ name = "Armor - Riot plates" contains = list( /obj/item/clothing/head/helmet/riot, - /obj/item/clothing/suit/armor/pcarrier, - /obj/item/clothing/accessory/armor/armorplate/riot, - /obj/item/clothing/accessory/armor/armguards/riot, - /obj/item/clothing/accessory/armor/legguards/riot + /obj/item/clothing/suit/armor/pcarrier/riot/full ) cost = 40 containertype = /obj/structure/closet/crate/secure/lawson @@ -308,10 +305,7 @@ name = "Armor - Ablative plates" contains = list( /obj/item/clothing/head/helmet/laserproof, - /obj/item/clothing/suit/armor/pcarrier, - /obj/item/clothing/accessory/armor/armorplate/laserproof, - /obj/item/clothing/accessory/armor/armguards/laserproof, - /obj/item/clothing/accessory/armor/legguards/laserproof + /obj/item/clothing/suit/armor/pcarrier/laserproof/full ) cost = 50 containertype = /obj/structure/closet/crate/secure/lawson @@ -336,10 +330,7 @@ name = "Armor - Ballistic plates" contains = list( /obj/item/clothing/head/helmet/bulletproof, - /obj/item/clothing/suit/armor/pcarrier, - /obj/item/clothing/accessory/armor/armorplate/bulletproof, - /obj/item/clothing/accessory/armor/armguards/bulletproof, - /obj/item/clothing/accessory/armor/legguards/bulletproof + /obj/item/clothing/suit/armor/pcarrier/bulletproof/full ) cost = 50 containertype = /obj/structure/closet/crate/secure/heph diff --git a/code/datums/underwear/undershirts.dm b/code/datums/underwear/undershirts.dm index 7da82fa5801..6b2cc3d10f6 100644 --- a/code/datums/underwear/undershirts.dm +++ b/code/datums/underwear/undershirts.dm @@ -186,4 +186,14 @@ /datum/category_item/underwear/undershirt/pinkblack_tshirt name = "Pink and Black T-Shirt" - icon_state = "pinkblack_tshirt" \ No newline at end of file + icon_state = "pinkblack_tshirt" + +/datum/category_item/underwear/undershirt/turtle + name = "Turtleneck" + icon_state = "turtleneck" + has_color = TRUE + +/datum/category_item/underwear/undershirt/sleevelessturtle + name = "Turtleneck, Sleeveless" + icon_state = "sleevelessturtle" + has_color = TRUE \ No newline at end of file diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index b5f9ac3a2fb..9c8bbccc798 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -54,10 +54,8 @@ /area/Initialize() . = ..() - luminosity = !(dynamic_lighting) icon_state = "" - return INITIALIZE_HINT_LATELOAD // Areas tradiationally are initialized AFTER other atoms. /area/LateInitialize() @@ -68,7 +66,6 @@ power_change() // all machines set to current power level, also updates lighting icon if(no_spoilers) set_spoiler_obfuscation(TRUE) - return INITIALIZE_HINT_LATELOAD // Changes the area of T to A. Do not do this manually. // Area is expected to be a non-null instance. diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index bf5fc0ab18c..4bc8892273f 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -134,7 +134,7 @@ for(var/i in loc) var/atom/movable/thing = i // We don't call parent so we are calling this for byond - thing.Crossed(src) + thing.Crossed(src, oldloc) // We're a multi-tile object (multiple locs) else if(. && newloc) @@ -303,6 +303,8 @@ if(AM == src) continue AM.Uncrossed(src) + if(loc != destination) // Uncrossed() triggered a separate movement + return // Information about turf and z-levels for source and dest collected var/turf/oldturf = get_turf(oldloc) @@ -327,6 +329,8 @@ if(AM == src) continue AM.Crossed(src, oldloc) + if(loc != destination) // Crossed triggered a separate movement + return // Call our thingy to inform everyone we moved Moved(oldloc, NONE, TRUE) @@ -462,6 +466,8 @@ minor_dir = dx minor_dist = dist_x + range = min(dist_x + dist_y, range) + while(src && target && src.throwing && istype(src.loc, /turf) \ && ((abs(target.x - src.x)+abs(target.y - src.y) > 0 && dist_travelled < range) \ || (a && a.has_gravity == 0) \ diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm index fccf178af9c..ef0af0fab79 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -118,6 +118,10 @@ var/global/list/datum/dna/gene/dna_genes[0] var/base_species = "Human" var/list/species_traits = list() var/blood_color = "#A10808" + var/custom_say + var/custom_ask + var/custom_whisper + var/custom_exclaim // VOREStation // New stuff @@ -139,6 +143,10 @@ var/global/list/datum/dna/gene/dna_genes[0] new_dna.custom_species=custom_species //VOREStaton Edit new_dna.species_traits=species_traits.Copy() //VOREStation Edit new_dna.blood_color=blood_color //VOREStation Edit + new_dna.custom_say=custom_say //VOREStaton Edit + new_dna.custom_ask=custom_ask //VOREStaton Edit + new_dna.custom_whisper=custom_whisper //VOREStaton Edit + new_dna.custom_exclaim=custom_exclaim //VOREStaton Edit for(var/b=1;b<=DNA_SE_LENGTH;b++) new_dna.SE[b]=SE[b] if(b<=DNA_UI_LENGTH) @@ -205,6 +213,10 @@ var/global/list/datum/dna/gene/dna_genes[0] src.base_species = character.species.base_species src.blood_color = character.species.blood_color src.species_traits = character.species.traits.Copy() + src.custom_say = character.custom_say + src.custom_ask = character.custom_ask + src.custom_whisper = character.custom_whisper + src.custom_exclaim = character.custom_exclaim // +1 to account for the none-of-the-above possibility SetUIValueRange(DNA_UI_EAR_STYLE, ear_style + 1, ear_styles_list.len + 1, 1) diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index 758f74d8737..d250c441ad4 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -237,6 +237,10 @@ // Technically custom_species is not part of the UI, but this place avoids merge problems. H.custom_species = dna.custom_species + H.custom_say = dna.custom_say + H.custom_ask = dna.custom_ask + H.custom_whisper = dna.custom_whisper + H.custom_exclaim = dna.custom_exclaim H.species.blood_color = dna.blood_color var/datum/species/S = H.species S.produceCopy(dna.base_species,dna.species_traits,src) diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index bbf4bfb3437..241d6132756 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -34,7 +34,7 @@ var/last_activation = 0 /obj/structure/cult/pylon/Initialize() - ..() + . = ..() START_PROCESSING(SSobj, src) /obj/structure/cult/pylon/attack_hand(mob/M as mob) diff --git a/code/game/jobs/job/captain_vr.dm b/code/game/jobs/job/captain_vr.dm index 4062775846d..dd057fff7bf 100644 --- a/code/game/jobs/job/captain_vr.dm +++ b/code/game/jobs/job/captain_vr.dm @@ -26,13 +26,13 @@ access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue, access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station, - access_hop, access_RC_announce, access_clown, access_tomfoolery, access_mime, access_keycard_auth) + access_hop, access_RC_announce, access_clown, access_tomfoolery, access_mime, access_keycard_auth, access_gateway) minimal_access = list(access_security, access_sec_doors, access_brig, access_forensics_lockers, access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads, access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue, access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station, - access_hop, access_RC_announce, access_clown, access_tomfoolery, access_mime, access_keycard_auth) + access_hop, access_RC_announce, access_clown, access_tomfoolery, access_mime, access_keycard_auth, access_gateway) /datum/alt_title/deputy_manager title = "Deputy Manager" diff --git a/code/game/jobs/job/engineering_vr.dm b/code/game/jobs/job/engineering_vr.dm index 8799aa39058..39905f0bc85 100644 --- a/code/game/jobs/job/engineering_vr.dm +++ b/code/game/jobs/job/engineering_vr.dm @@ -6,12 +6,12 @@ access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva, access_heads, access_construction, - access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_ai_upload) + access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_ai_upload, access_gateway) minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_teleporter, access_external_airlocks, access_atmospherics, access_emergency_storage, access_eva, access_heads, access_construction, - access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_ai_upload) + access_ce, access_RC_announce, access_keycard_auth, access_tcomsat, access_ai_upload, access_gateway) alt_titles = list("Head Engineer" = /datum/alt_title/head_engineer, "Foreman" = /datum/alt_title/foreman, "Maintenance Manager" = /datum/alt_title/maintenance_manager) /datum/alt_title/head_engineer diff --git a/code/game/jobs/job/exploration_vr.dm b/code/game/jobs/job/exploration_vr.dm index 0e6e003f7db..5189ca39b0c 100644 --- a/code/game/jobs/job/exploration_vr.dm +++ b/code/game/jobs/job/exploration_vr.dm @@ -1,8 +1,3 @@ -var/const/PATHFINDER =(1<<11) -var/const/EXPLORER =(1<<12) -var/const/PILOT =(1<<13) -var/const/SAR =(1<<14) - /obj/item/weapon/card/id/medical/sar assignment = "Field Medic" rank = "Field Medic" @@ -64,13 +59,13 @@ var/const/SAR =(1<<14) /datum/job/pilot title = "Pilot" flag = PILOT - departments = list(DEPARTMENT_PLANET) - department_flag = MEDSCI + departments = list(DEPARTMENT_CIVILIAN) + department_flag = CIVILIAN faction = "Station" - total_positions = 4 - spawn_positions = 4 - supervisors = "the Pathfinder and the Head of Personnel" - selection_color = "#999440" + total_positions = 5 + spawn_positions = 5 + supervisors = "the Head of Personnel" + selection_color = "#515151" economic_modifier = 5 minimal_player_age = 3 pto_type = PTO_EXPLORATION diff --git a/code/game/jobs/job/medical_vr.dm b/code/game/jobs/job/medical_vr.dm index 2679137cf0f..6d5ee57c4e4 100644 --- a/code/game/jobs/job/medical_vr.dm +++ b/code/game/jobs/job/medical_vr.dm @@ -5,11 +5,11 @@ access = list(access_medical, access_medical_equip, access_morgue, access_genetics, access_heads, access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce, - access_keycard_auth, access_psychiatrist, access_eva, access_external_airlocks, access_maint_tunnels) + access_keycard_auth, access_psychiatrist, access_eva, access_external_airlocks, access_maint_tunnels, access_gateway) minimal_access = list(access_medical, access_medical_equip, access_morgue, access_genetics, access_heads, access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce, - access_keycard_auth, access_psychiatrist, access_eva, access_external_airlocks, access_maint_tunnels) + access_keycard_auth, access_psychiatrist, access_eva, access_external_airlocks, access_maint_tunnels, access_gateway) alt_titles = list("Chief Physician" = /datum/alt_title/chief_physician, "Medical Director" = /datum/alt_title/medical_director, "Healthcare Manager" = /datum/alt_title/healthcare_manager) /datum/alt_title/chief_physician diff --git a/code/game/jobs/job/science_vr.dm b/code/game/jobs/job/science_vr.dm index 0356656446b..52647422b4f 100644 --- a/code/game/jobs/job/science_vr.dm +++ b/code/game/jobs/job/science_vr.dm @@ -10,7 +10,7 @@ minimal_access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue, access_tox_storage, access_teleporter, access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage, - access_RC_announce, access_keycard_auth, access_tcomsat, access_xenoarch, access_eva, access_network, access_xenobotany) + access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_eva, access_network, access_xenobotany) alt_titles = list("Research Supervisor" = /datum/alt_title/research_supervisor, "Research Manager" = /datum/alt_title/research_manager, "Head of Development" = /datum/alt_title/head_of_development,"Head Scientist" = /datum/alt_title/head_scientist) diff --git a/code/game/jobs/job/security_vr.dm b/code/game/jobs/job/security_vr.dm index e9b9017d9af..082531d944e 100644 --- a/code/game/jobs/job/security_vr.dm +++ b/code/game/jobs/job/security_vr.dm @@ -6,11 +6,11 @@ access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers, access_construction, - access_heads, access_hos, access_RC_announce, access_keycard_auth, access_external_airlocks) + access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks) minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers, access_construction, - access_heads, access_hos, access_RC_announce, access_keycard_auth, access_external_airlocks) + access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks) alt_titles = list("Security Commander" = /datum/alt_title/sec_commander, "Chief of Security" = /datum/alt_title/sec_chief, "Security Manager" = /datum/alt_title/security_manager) /datum/alt_title/security_manager diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 4e53589c2ff..96dfbd31834 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -415,7 +415,7 @@ var/global/datum/controller/occupations/job_master // Implants get special treatment if(G.slot == "implant") - var/obj/item/weapon/implant/I = G.spawn_item(H) + var/obj/item/weapon/implant/I = G.spawn_item(H, H.client.prefs.gear[G.display_name]) I.invisibility = 100 I.implant_loadout(H) continue @@ -514,11 +514,12 @@ var/global/datum/controller/occupations/job_master var/obj/item/organ/external/l_foot = H.get_organ("l_foot") var/obj/item/organ/external/r_foot = H.get_organ("r_foot") var/obj/item/weapon/storage/S = locate() in H.contents - var/obj/item/wheelchair/R = null + var/obj/item/wheelchair/R if(S) R = locate() in S.contents if(!l_foot || !r_foot || R) - var/obj/structure/bed/chair/wheelchair/W = new /obj/structure/bed/chair/wheelchair(H.loc) + var/wheelchair_type = R?.unfolded_type || /obj/structure/bed/chair/wheelchair + var/obj/structure/bed/chair/wheelchair/W = new wheelchair_type(H.loc) W.buckle_mob(H) H.update_canmove() W.set_dir(H.dir) diff --git a/code/game/jobs/jobs.dm b/code/game/jobs/jobs.dm index 40f0fdb4a41..9312c84571d 100644 --- a/code/game/jobs/jobs.dm +++ b/code/game/jobs/jobs.dm @@ -26,7 +26,10 @@ var/const/PSYCHIATRIST =(1<<7) var/const/ROBOTICIST =(1<<8) var/const/XENOBIOLOGIST =(1<<9) var/const/PARAMEDIC =(1<<10) -var/const/XENOBOTANIST =(1<<15) //VOREStation Add +var/const/PATHFINDER =(1<<11) //VOREStation Add +var/const/EXPLORER =(1<<12) //VOREStation Add +var/const/SAR =(1<<13) //VOREStation Add +var/const/XENOBOTANIST =(1<<14) //VOREStation Add var/const/CIVILIAN =(1<<2) @@ -43,9 +46,10 @@ var/const/LAWYER =(1<<9) var/const/CHAPLAIN =(1<<10) var/const/ASSISTANT =(1<<11) var/const/BRIDGE =(1<<12) -var/const/CLOWN =(1<<13) //VOREStation Add -var/const/MIME =(1<<14) //VOREStation Add -var/const/ENTERTAINER =(1<<15) //VOREStation Add +var/const/PILOT =(1<<13) //VOREStation Add +var/const/CLOWN =(1<<14) //VOREStation Add +var/const/MIME =(1<<15) //VOREStation Add +var/const/ENTERTAINER =(1<<16) //VOREStation Add //VOREStation Add var/const/TALON =(1<<3) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index a97fbf986f7..e0ff3a6086c 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -529,5 +529,5 @@ stasis_level = 100 //Just one setting /obj/machinery/sleeper/survival_pod/Initialize() - ..() + . = ..() RefreshParts(1) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 3cde4792387..aa19f3e8ea7 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -270,6 +270,15 @@ //Create the desired item. var/obj/item/I = new making.path(src.loc) + + if(LAZYLEN(I.matter)) // Sadly we must obey the laws of equivalent exchange. + I.matter.Cut() + else + I.matter = list() + + for(var/material in making.resources) // Handle the datum's autoscaling for waste, so we're properly wasting material, but not so much if we have efficiency. + I.matter[material] = round(making.resources[material] / (making.no_scale ? 1 : 1.25)) * (making.no_scale ? 1 : mat_efficiency) + flick("[initial(icon_state)]_finish", src) if(multiplier > 1) if(istype(I, /obj/item/stack)) @@ -277,7 +286,16 @@ S.amount = multiplier else for(multiplier; multiplier > 1; --multiplier) // Create multiple items if it's not a stack. - new making.path(src.loc) + I = new making.path(src.loc) + // We've already deducted the cost of multiple items. Process the matter the same. + if(LAZYLEN(I.matter)) + I.matter.Cut() + + else + I.matter = list() + + for(var/material in making.resources) + I.matter[material] = round(making.resources[material] / (making.no_scale ? 1 : 1.25)) * (making.no_scale ? 1 : mat_efficiency) return TRUE return FALSE diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 7ff97c83e85..25299dcda8c 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -1,4 +1,4 @@ -/obj/machinery/computer/arcade/ +/obj/machinery/computer/arcade name = "random arcade" desc = "random arcade machine" icon_state = "arcade" @@ -25,15 +25,15 @@ /obj/item/toy/stickhorse = 2 ) -/obj/machinery/computer/arcade/New() - ..() +/obj/machinery/computer/arcade/Initialize() + . = ..() // If it's a generic arcade machine, pick a random arcade // circuit board for it and make the new machine if(!circuit) var/choice = pick(subtypesof(/obj/item/weapon/circuitboard/arcade) - /obj/item/weapon/circuitboard/arcade/clawmachine) var/obj/item/weapon/circuitboard/CB = new choice() new CB.build_path(loc, CB) - qdel(src) + return INITIALIZE_HINT_QDEL /obj/machinery/computer/arcade/proc/prizevend() if(!(contents-circuit).len) diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index cc05d632176..8d4202d4213 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -26,7 +26,7 @@ light_color = "#315ab4" /obj/machinery/computer/cloning/Initialize() - ..() + . = ..() pods = list() records = list() set_scan_temp("Scanner ready.", "good") diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index adf53c80a8e..680ce44345f 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -29,7 +29,7 @@ /obj/machinery/computer/med_data/Initialize() - ..() + . = ..() field_edit_questions = list( // General "sex" = "Please select new sex:", diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 1caa7b61a4d..430b42591cf 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -335,7 +335,7 @@ name = "Monitor Decryption Key" /obj/item/weapon/paper/monitorkey/Initialize() - ..() //Late init + ..() return INITIALIZE_HINT_LATELOAD /obj/item/weapon/paper/monitorkey/LateInitialize() diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index dbd5ba8383f..5eae5e82d08 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -13,7 +13,7 @@ var/title = "Mass Driver Controls" /obj/machinery/computer/pod/Initialize() - ..() //Not returning parent because lateload + ..() return INITIALIZE_HINT_LATELOAD /obj/machinery/computer/pod/LateInitialize() diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 1fbd897113d..40a4d594cbd 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -25,7 +25,7 @@ var/static/list/field_edit_choices /obj/machinery/computer/secure_data/Initialize() - ..() + . = ..() field_edit_questions = list( // General "name" = "Please enter new name:", diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 47b9e8ce256..e11f404b165 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -30,7 +30,7 @@ var/static/list/field_edit_choices /obj/machinery/computer/skills/Initialize() - ..() + . = ..() field_edit_questions = list( // General "name" = "Please input new name:", diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 014efcb5813..39d54ef96d5 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -862,14 +862,14 @@ About the new airlock wires panel: /obj/machinery/door/airlock/tgui_data(mob/user) var/list/data = list() - + var/list/power = list() power["main"] = main_power_lost_until > 0 ? 0 : 2 power["main_timeleft"] = round(main_power_lost_until > 0 ? max(main_power_lost_until - world.time, 0) / 10 : main_power_lost_until, 1) power["backup"] = backup_power_lost_until > 0 ? 0 : 2 power["backup_timeleft"] = round(backup_power_lost_until > 0 ? max(backup_power_lost_until - world.time, 0) / 10 : backup_power_lost_until, 1) data["power"] = power - + data["shock"] = (electrified_until == 0) ? 2 : 0 data["shock_timeleft"] = round(electrified_until > 0 ? max(electrified_until - world.time, 0) / 10 : electrified_until, 1) data["id_scanner"] = !aiDisabledIdScanner diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index f4d9c900ed3..fdd526039b3 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -40,7 +40,6 @@ /obj/machinery/door_timer/Initialize() ..() - //Doors need to go first, and can't rely on init order, so come back to me. return INITIALIZE_HINT_LATELOAD /obj/machinery/door_timer/LateInitialize() diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index a208e6eefd2..c078b854d0c 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -68,6 +68,7 @@ L.updateicon() area.power_change() + GLOB.lights_switched_on_roundstat++ /obj/machinery/light_switch/power_change() diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index c23d02f4d01..a1798ea5e42 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -164,7 +164,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) securityCaster = 1 /obj/machinery/newscaster/Initialize() - ..() //Not returning . because lateload below + ..() allCasters += src unit_no = ++unit_no_cur paper_remaining = 15 diff --git a/code/game/machinery/transportpod.dm b/code/game/machinery/transportpod.dm index 0b499096fea..4a43cb18904 100644 --- a/code/game/machinery/transportpod.dm +++ b/code/game/machinery/transportpod.dm @@ -32,7 +32,7 @@ sleep(2) go_out() sleep(2) - del(src) + qdel(src) /obj/machinery/transportpod/relaymove(mob/user as mob) if(user.stat) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 4f3d532c279..58107d9d0b4 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -572,7 +572,7 @@ GLOBAL_LIST_EMPTY(vending_products) vend_ready = 1 currently_vending = null SStgui.update_uis(src) - + GLOB.items_sold_shift_roundstat++ /obj/machinery/vending/proc/do_logging(datum/stored_item/vending_product/R, mob/user, var/vending = 0) if(user.GetIdCard()) diff --git a/code/game/mecha/combat/gorilla.dm b/code/game/mecha/combat/gorilla.dm index 4052afe8e6a..fecb361f1a2 100644 --- a/code/game/mecha/combat/gorilla.dm +++ b/code/game/mecha/combat/gorilla.dm @@ -31,7 +31,7 @@ thrusters_possible = 1 /obj/mecha/combat/gorilla/Initialize() - ..() + . = ..() var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src) // This thing basically cannot function without an external power supply. ME.attach(src) ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/cannon(src) diff --git a/code/game/mecha/combat/phazon.dm b/code/game/mecha/combat/phazon.dm index 3ae3e41e131..a1ea2ab4519 100644 --- a/code/game/mecha/combat/phazon.dm +++ b/code/game/mecha/combat/phazon.dm @@ -40,7 +40,7 @@ switch_dmg_type_possible = TRUE /obj/mecha/combat/phazon/equipped/Initialize() - ..() + . = ..() starting_equipment = list( /obj/item/mecha_parts/mecha_equipment/tool/rcd, /obj/item/mecha_parts/mecha_equipment/gravcatapult diff --git a/code/game/mecha/components/_component.dm b/code/game/mecha/components/_component.dm index aadf390c615..3d770e0dce0 100644 --- a/code/game/mecha/components/_component.dm +++ b/code/game/mecha/components/_component.dm @@ -43,7 +43,7 @@ . += "It is completely destroyed." /obj/item/mecha_parts/component/Initialize() - ..() + . = ..() integrity = max_integrity if(start_damaged) diff --git a/code/game/mecha/equipment/tools/inflatables.dm b/code/game/mecha/equipment/tools/inflatables.dm index b18ba2eae11..ff766577ded 100644 --- a/code/game/mecha/equipment/tools/inflatables.dm +++ b/code/game/mecha/equipment/tools/inflatables.dm @@ -14,7 +14,7 @@ var/obj/item/weapon/inflatable_dispenser/my_deployer = null /obj/item/mecha_parts/mecha_equipment/tool/powertool/inflatables/Initialize() - ..() + . = ..() my_deployer = my_tool /obj/item/mecha_parts/mecha_equipment/tool/powertool/inflatables/Topic(href, href_list) diff --git a/code/game/mecha/equipment/tools/syringe_gun.dm b/code/game/mecha/equipment/tools/syringe_gun.dm index 1658a01df6d..fd73d74fc2e 100644 --- a/code/game/mecha/equipment/tools/syringe_gun.dm +++ b/code/game/mecha/equipment/tools/syringe_gun.dm @@ -318,7 +318,7 @@ equip_type = EQUIP_HULL /obj/item/mecha_parts/mecha_equipment/crisis_drone/Initialize() - ..() + . = ..() drone_overlay = new(src.icon, icon_state = droid_state) /obj/item/mecha_parts/mecha_equipment/crisis_drone/Destroy() diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 2e68ca068d5..60bb48c5f6b 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -198,7 +198,7 @@ var/weapons_only_cycle = FALSE //So combat mechs don't switch to their equipment at times. /obj/mecha/Initialize() - ..() + . = ..() for(var/path in starting_components) var/obj/item/mecha_parts/component/C = new path(src) @@ -322,6 +322,8 @@ if(smoke_possible) //Just making sure nothing is running. qdel(smoke_system) + GLOB.mech_destroyed_roundstat++ + QDEL_NULL(pr_int_temp_processor) QDEL_NULL(pr_inertial_movement) QDEL_NULL(pr_give_air) diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm index 4db6332cb10..316d39bacee 100644 --- a/code/game/mecha/medical/odysseus.dm +++ b/code/game/mecha/medical/odysseus.dm @@ -127,7 +127,7 @@ C.images += holder */ /obj/mecha/medical/odysseus/loaded/Initialize() - ..() + . = ..() var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/sleeper ME.attach(src) ME = new /obj/item/mecha_parts/mecha_equipment/tool/sleeper diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index def044c9bbc..4e92f757d27 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -70,7 +70,7 @@ max_special_equip = 1 /obj/mecha/working/ripley/deathripley/Initialize() - ..() + . = ..() var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp/safety ME.attach(src) return @@ -80,7 +80,7 @@ name = "APLU \"Miner\"" /obj/mecha/working/ripley/mining/Initialize() - ..() + . = ..() //Attach drill if(prob(25)) //Possible diamond drill... Feeling lucky? var/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill/D = new /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 533414d50cc..088ed16440d 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -40,10 +40,7 @@ return TRUE /atom/movable/proc/has_buckled_mobs() - if(!buckled_mobs) - return FALSE - if(buckled_mobs.len) - return TRUE + return LAZYLEN(buckled_mobs) /atom/movable/Destroy() unbuckle_all_mobs() diff --git a/code/game/objects/effects/chem/coating.dm b/code/game/objects/effects/chem/coating.dm index a777bbe5e05..2e9ad26049c 100644 --- a/code/game/objects/effects/chem/coating.dm +++ b/code/game/objects/effects/chem/coating.dm @@ -11,7 +11,7 @@ create_reagents(100) /obj/effect/decal/cleanable/chemcoating/Initialize() - ..() + . = ..() var/turf/T = get_turf(src) if(T) for(var/obj/O in get_turf(src)) diff --git a/code/game/objects/effects/decals/warning_stripes.dm b/code/game/objects/effects/decals/warning_stripes.dm index db7c4bf74f1..0e3d12897d8 100644 --- a/code/game/objects/effects/decals/warning_stripes.dm +++ b/code/game/objects/effects/decals/warning_stripes.dm @@ -1,10 +1,10 @@ /obj/effect/decal/warning_stripes icon = 'icons/effects/warning_stripes.dmi' -/obj/effect/decal/warning_stripes/New() +/obj/effect/decal/warning_stripes/Initialize() . = ..() var/turf/T=get_turf(src) var/image/I=image(icon, icon_state = icon_state, dir = dir) I.color=color T.overlays += I - qdel(src) + return INITIALIZE_HINT_QDEL diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index c5e1f26c615..c49a4e06665 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -10,32 +10,37 @@ var/obj/item/weapon/mine/mineitemtype = /obj/item/weapon/mine var/panel_open = 0 var/datum/wires/mines/wires = null - register_as_dangerous_object = TRUE - var/camo_net = FALSE // Will the mine 'cloak' on deployment? // The trap item will be triggered in some manner when detonating. Default only checks for grenades. var/obj/item/trap = null -/obj/effect/mine/New() +/obj/effect/mine/Initialize() icon_state = "uglyminearmed" wires = new(src) - + . = ..() if(ispath(trap)) trap = new trap(src) - -/obj/effect/mine/Initialize() - ..() - + register_dangerous_to_step() if(camo_net) alpha = 50 /obj/effect/mine/Destroy() + unregister_dangerous_to_step() if(trap) QDEL_NULL(trap) qdel_null(wires) return ..() +/obj/effect/mine/Moved(atom/oldloc) + . = ..() + if(.) + var/turf/old_turf = get_turf(oldloc) + var/turf/new_turf = get_turf(src) + if(old_turf != new_turf) + old_turf.unregister_dangerous_object(src) + new_turf.register_dangerous_object(src) + /obj/effect/mine/proc/explode(var/mob/living/M) var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread() triggered = 1 diff --git a/code/game/objects/effects/prop/columnblast.dm b/code/game/objects/effects/prop/columnblast.dm index fc604235c82..ce0e4b2aadb 100644 --- a/code/game/objects/effects/prop/columnblast.dm +++ b/code/game/objects/effects/prop/columnblast.dm @@ -17,7 +17,7 @@ ..() /obj/effect/temporary_effect/eruption/Initialize() - ..() + . = ..() flick("[icon_state]_create",src) /obj/effect/temporary_effect/eruption/Destroy() diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm index c848a2f1dfe..eb025f9ba40 100644 --- a/code/game/objects/effects/spawners/bombspawner.dm +++ b/code/game/objects/effects/spawners/bombspawner.dm @@ -159,7 +159,6 @@ /obj/effect/spawner/newbomb/Initialize(newloc) ..(newloc) - var/obj/item/device/transfer_valve/V = new(src.loc) var/obj/item/weapon/tank/phoron/PT = new(V) var/obj/item/weapon/tank/oxygen/OT = new(V) @@ -183,19 +182,14 @@ OT.air_contents.temperature = PHORON_MINIMUM_BURN_TEMPERATURE+1 OT.air_contents.update_values() - var/obj/item/device/assembly/S = new assembly_type(V) - - V.attached_device = S S.holder = V S.toggle_secure() V.update_icon() - - qdel(src) - + return INITIALIZE_HINT_QDEL /////////////////////// diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 2247674f60c..facc87ae64a 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -33,7 +33,7 @@ var/cell_type = /obj/item/weapon/cell/device /obj/item/device/flash/Initialize() - ..() + . = ..() power_supply = new cell_type(src) /obj/item/device/flash/attackby(var/obj/item/W, var/mob/user) diff --git a/code/game/objects/items/devices/radio/headset_vr.dm b/code/game/objects/items/devices/radio/headset_vr.dm index 9204c81dd17..2682d9db97c 100644 --- a/code/game/objects/items/devices/radio/headset_vr.dm +++ b/code/game/objects/items/devices/radio/headset_vr.dm @@ -84,7 +84,6 @@ desc = "A headset used by pilots, has access to the explorer channel." icon_state = "pilot_headset" adhoc_fallback = TRUE - ks2type = /obj/item/device/encryptionkey/pilot /obj/item/device/radio/headset/pilot/alt name = "pilot's bowman headset" @@ -120,7 +119,7 @@ desc = "A headset used by volunteers to expedition teams, has access to the exploration channel." icon_state = "pilot_headset" adhoc_fallback = TRUE - ks2type = /obj/item/device/encryptionkey/pilot + ks2type = /obj/item/device/encryptionkey/explorer /obj/item/device/radio/headset/talon name = "talon headset" diff --git a/code/game/objects/items/stacks/fifty_spawner.dm b/code/game/objects/items/stacks/fifty_spawner.dm index 81dfce96913..e3ba667703a 100644 --- a/code/game/objects/items/stacks/fifty_spawner.dm +++ b/code/game/objects/items/stacks/fifty_spawner.dm @@ -7,15 +7,12 @@ var/obj/item/stack/type_to_spawn = null /obj/fiftyspawner/Initialize() - ..() //We're not returning . because we're going to ask to be deleted. - + ..() var/turf/T = get_turf(src) - var/obj/item/stack/M = new type_to_spawn(T) + var/obj/structure/closet/C = locate() in T + var/obj/item/stack/M = new type_to_spawn(C || T) M.amount = M.max_amount //some stuff spawns with 60, we're still calling it fifty M.update_icon() // Some stacks have different sprites depending on how full they are. - var/obj/structure/closet/C = locate() in T - if(C) - C.contents += M return INITIALIZE_HINT_QDEL //Bye! /obj/fiftyspawner/rods diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index 6ffa7100ca8..c88527608f2 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -24,8 +24,8 @@ stacktype = /obj/item/stack/rods no_variants = TRUE -/obj/item/stack/rods/New() - ..() +/obj/item/stack/rods/Initialize() + . = ..() recipes = rods_recipes update_icon() diff --git a/code/game/objects/items/stacks/sandbags.dm b/code/game/objects/items/stacks/sandbags.dm index c4e755c4852..6eff93bfc5f 100644 --- a/code/game/objects/items/stacks/sandbags.dm +++ b/code/game/objects/items/stacks/sandbags.dm @@ -32,19 +32,15 @@ bag_material = MAT_SYNCLOTH -/obj/item/stack/sandbags/New(var/newloc, var/amt, var/bag_mat) - ..() +/obj/item/stack/sandbags/Initialize(var/ml, var/amt, var/bag_mat) + . = ..(ml, amt) recipes = sandbag_recipes update_icon() - if(bag_mat) bag_material = bag_mat - var/datum/material/M = get_material_by_name("[bag_material]") if(!M) - qdel(src) - return - + return INITIALIZE_HINT_QDEL color = M.icon_colour /obj/item/stack/sandbags/update_icon() @@ -136,17 +132,13 @@ var/global/list/datum/stack_recipe/sandbag_recipes = list( \ var/bag_material = "cloth" -/obj/item/stack/emptysandbag/New(var/newloc, var/amt, var/bag_mat) - ..(newloc, amt) - +/obj/item/stack/emptysandbag/Initialize(var/ml, var/amt, var/bag_mat) + . = ..(ml, amt) if(bag_mat) bag_material = bag_mat - var/datum/material/M = get_material_by_name("[bag_material]") if(!M) - qdel(src) - return - + return INITIALIZE_HINT_QDEL color = M.icon_colour /obj/item/stack/emptysandbag/attack_self(var/mob/user) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index d42d6c0e563..f4b52f07aaf 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -29,14 +29,13 @@ var/pass_color = FALSE // Will the item pass its own color var to the created item? Dyed cloth, wood, etc. var/strict_color_stacking = FALSE // Will the stack merge with other stacks that are different colors? (Dyed cloth, wood, etc) -/obj/item/stack/New(var/loc, var/amount=null) - ..() - if (!stacktype) +/obj/item/stack/Initialize(var/ml, var/amount) + . = ..() + if(!stacktype) stacktype = type - if (amount) + if(amount) src.amount = amount update_icon() - return /obj/item/stack/Destroy() if(uses_charge) @@ -170,8 +169,37 @@ var/atom/O if(recipe.use_material) O = new recipe.result_type(user.loc, recipe.use_material) + + if(istype(O, /obj)) + var/obj/Ob = O + + if(LAZYLEN(Ob.matter)) // Law of equivalent exchange. + Ob.matter.Cut() + + else + Ob.matter = list() + + var/mattermult = istype(Ob, /obj/item) ? min(2000, 400 * Ob.w_class) : 2000 + + Ob.matter[recipe.use_material] = mattermult / produced * required + else O = new recipe.result_type(user.loc) + + if(recipe.matter_material) + if(istype(O, /obj)) + var/obj/Ob = O + + if(LAZYLEN(Ob.matter)) // Law of equivalent exchange. + Ob.matter.Cut() + + else + Ob.matter = list() + + var/mattermult = istype(Ob, /obj/item) ? min(2000, 400 * Ob.w_class) : 2000 + + Ob.matter[recipe.use_material] = mattermult / produced * required + O.set_dir(user.dir) O.add_fingerprint(user) @@ -379,8 +407,9 @@ var/on_floor = 0 var/use_material var/pass_color + var/matter_material // Material type used for recycling. Default, uses use_material. For non-material-based objects however, matter_material is needed. -/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0, supplied_material = null, pass_stack_color) +/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0, supplied_material = null, pass_stack_color, recycle_material = null) src.title = title src.result_type = result_type src.req_amount = req_amount @@ -392,6 +421,12 @@ src.use_material = supplied_material src.pass_color = pass_stack_color + if(!recycle_material && src.use_material) + src.matter_material = src.use_material + + else if(recycle_material) + src.matter_material = recycle_material + /* * Recipe list datum */ diff --git a/code/game/objects/items/stacks/tickets.dm b/code/game/objects/items/stacks/tickets.dm index 1d9cbf047ee..6681934f7ce 100644 --- a/code/game/objects/items/stacks/tickets.dm +++ b/code/game/objects/items/stacks/tickets.dm @@ -7,7 +7,7 @@ w_class = ITEMSIZE_TINY max_amount = 30 -/obj/item/stack/arcadeticket/New(loc, amount = null) +/obj/item/stack/arcadeticket/Initialize() . = ..() update_icon() diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index 5e5ac1a746d..aefe9a0cd0d 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -20,8 +20,8 @@ drop_sound = 'sound/items/drop/axe.ogg' pickup_sound = 'sound/items/pickup/axe.ogg' -/obj/item/stack/tile/New() - ..() +/obj/item/stack/tile/Initialize() + . = ..() randpixel_xy() /* diff --git a/code/game/objects/items/weapons/id cards/cards_vr.dm b/code/game/objects/items/weapons/id cards/cards_vr.dm new file mode 100644 index 00000000000..c7abd117d6e --- /dev/null +++ b/code/game/objects/items/weapons/id cards/cards_vr.dm @@ -0,0 +1,10 @@ +/obj/item/weapon/card/emag/examine(mob/user) + . = ..() + . += "[uses] uses remaining." + +/obj/item/weapon/card/emag/used + uses = 1 + +/obj/item/weapon/card/emag/used/Initialize() + . = ..() + uses = rand(1, 5) diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index c4040890283..9162be15eb5 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -299,3 +299,13 @@ src.imp = new /obj/item/weapon/implant/organ/limbaugment/wrist/blade( src ) ..() return + +/obj/item/weapon/implantcase/restrainingbolt + name = "glass case - 'Restraining Bolt'" + desc = "A case containing a restraining bolt." + icon_state = "implantcase-b" + +/obj/item/weapon/implantcase/restrainingbolt/New() + src.imp = new /obj/item/weapon/implant/restrainingbolt( src ) + ..() + return diff --git a/code/game/objects/items/weapons/implants/implantdud.dm b/code/game/objects/items/weapons/implants/implantdud.dm index 110051e58d6..cabf5bc9069 100644 --- a/code/game/objects/items/weapons/implants/implantdud.dm +++ b/code/game/objects/items/weapons/implants/implantdud.dm @@ -4,18 +4,6 @@ icon = 'icons/obj/device.dmi' icon_state = "implant" initialize_loc = BP_HEAD - var/roundstart = TRUE /obj/item/weapon/implant/dud/torso - name = "unknown implant" - desc = "A small device with small connector wires." - icon = 'icons/obj/device.dmi' - icon_state = "implant" initialize_loc = BP_TORSO - -/obj/item/weapon/implant/dud/old - name = "old implant" - desc = "A small device with small connector wires." - icon = 'icons/obj/device.dmi' - icon_state = "implant" - roundstart = FALSE diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index c1b0d5db8dd..adb79364dcd 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -150,3 +150,12 @@ S.remove_from_storage(A) A.loc.contents.Remove(A) update() + +/obj/item/weapon/implanter/restrainingbolt + name = "implanter (bolt)" + +/obj/item/weapon/implanter/restrainingbolt/New() + src.imp = new /obj/item/weapon/implant/restrainingbolt( src ) + ..() + update() + return diff --git a/code/game/objects/items/weapons/implants/implantrestrainingbolt.dm b/code/game/objects/items/weapons/implants/implantrestrainingbolt.dm new file mode 100644 index 00000000000..7f4a562297c --- /dev/null +++ b/code/game/objects/items/weapons/implants/implantrestrainingbolt.dm @@ -0,0 +1,5 @@ + +/obj/item/weapon/implant/restrainingbolt + name = "\improper restraining bolt" + icon = 'icons/obj/device.dmi' + icon_state = "implant" diff --git a/code/game/objects/items/weapons/manuals_vr.dm b/code/game/objects/items/weapons/manuals_vr.dm index a7753211d83..9eaaa56265f 100644 --- a/code/game/objects/items/weapons/manuals_vr.dm +++ b/code/game/objects/items/weapons/manuals_vr.dm @@ -75,61 +75,61 @@
Hello Newbie, congratz on deciding to make food! This guide assumes you know absolutely nothing, so fret not, the information here will help you prepare food for your hungry crewmates!
-Now that you know the fundamentals of how to make the base ingredients, here are some fairly easy recipes to put them together into something enjoyable for the crew.
-These recipes only scratch the surface, but it's all things that can be done with what is pre-provided. If you have a partner in Botany, feel free to request more meat or any other supplies to try new recipes!
+These recipes only scratch the surface, but it's all things that can be done with what is pre-provided. If you have a partner in Botany, feel free to request more meat or any other supplies to try new recipes!
The Fryer, CondiMaster3000, and other nearby devices have been deliberately left out of this guide; as you get more advanced feel free to experiment with them, though be careful with the Fryer especially as it's the #1 source of fires for learning chefs, myself included. The one other machine that is worth understanding is the Gibber in the freezer room. If you are delivered fish or such they can be gibbed for extra Meat, though you may need to butcher the parts with a Knife afterwards to get usable Meat! Though if the meat is purple or comes from Koi or Spacecarp do not directly serve it to crew! It contains toxins that are better taken care of by other departments.
Some wonderful websites share recipes and tips for learning chefs on the Extranet! Look on your PDA or preferred device at https://wiki.vore-station.net/Guide_to_Food_and_Drink and https://vore-station.net/infodump/recipes_food.html for further tips, though do note the latter is more accurate in regard to recipes. Happy cooking!