diff --git a/1.6/Assemblies/FCP.Core.Laser.dll b/1.6/Assemblies/FCP.Core.Laser.dll deleted file mode 100644 index 66274cc..0000000 Binary files a/1.6/Assemblies/FCP.Core.Laser.dll and /dev/null differ diff --git a/1.6/Assemblies/FCP_Core.dll b/1.6/Assemblies/FCP_Core.dll index a59176f..21e3a07 100644 Binary files a/1.6/Assemblies/FCP_Core.dll and b/1.6/Assemblies/FCP_Core.dll differ diff --git a/1.6/Assemblies/FCP_Enlist.dll b/1.6/Assemblies/FCP_Enlist.dll deleted file mode 100644 index 25a0156..0000000 Binary files a/1.6/Assemblies/FCP_Enlist.dll and /dev/null differ diff --git a/1.6/Assemblies/FCP_PresettablePocketMap.dll b/1.6/Assemblies/FCP_PresettablePocketMap.dll deleted file mode 100644 index b712123..0000000 Binary files a/1.6/Assemblies/FCP_PresettablePocketMap.dll and /dev/null differ diff --git a/1.6/Defs/BackstoryDefs/BackstoryDefs_Wastelander.xml b/1.6/Defs/BackstoryDefs/BackstoryDefs_Wastelander.xml index 39860a6..8604f55 100644 --- a/1.6/Defs/BackstoryDefs/BackstoryDefs_Wastelander.xml +++ b/1.6/Defs/BackstoryDefs/BackstoryDefs_Wastelander.xml @@ -123,6 +123,8 @@ FCP_Backstory_Wastelander_Trader_Angela_Staley_Child + Male + Female FCP_Backstory_Wastelander_Trader_Angela_Staley_Child Childhood Helpful Scavenger @@ -171,6 +173,8 @@ FCP_Backstory_Wastelander_Trader_Banon_Child + Male + Female FCP_Backstory_Wastelander_Trader_Banon_Child Childhood Resourceful Youth @@ -271,6 +275,8 @@ FCP_Backstory_Wastelander_Trader_Crow_Child + Male + Female FCP_Backstory_Wastelander_Trader_Crow_Child Childhood Crows' Childhood @@ -320,6 +326,8 @@ FCP_Backstory_Wastelander_Trader_Crazy_Wolfgang_Child + Male + Female FCP_Backstory_Wastelander_Trader_Crazy_Wolfgang_Child Childhood Crazy Wolfgangs' Childhood @@ -369,6 +377,8 @@ FCP_Backstory_Wastelander_Trader_Doc_Hoff_Child + Male + Female FCP_Backstory_Wastelander_Trader_Doc_Hoff_Child Childhood Curious Tinkerer @@ -417,6 +427,8 @@ FCP_Backstory_Wastelander_Trader_Lucky_Harith_Child + Male + Female FCP_Backstory_Wastelander_Trader_Lucky_Harith_Child Childhood Wasteland Gambler @@ -1651,6 +1663,8 @@ FCP_Backstory_Wastelander_Child_Entrepreneur + Male + Female FCP_Backstory_Wastelander_Child_Entrepreneur Childhood Child Entrepreneur @@ -1672,6 +1686,8 @@ FCP_Backstory_Wastelander_Curious_Child + Male + Female FCP_Backstory_Wastelander_Curious_Child Childhood Curious Child @@ -1694,6 +1710,8 @@ FCP_Backstory_Wastelander_Bully + Male + Female FCP_Backstory_Wastelander_Bully Childhood Bully @@ -1715,6 +1733,8 @@ FCP_Backstory_Wastelander_Apprentice + Male + Female FCP_Backstory_Wastelander_Apprentice Childhood Apprentice @@ -1740,6 +1760,8 @@ FCP_Backstory_Wastelander_BB_Gun_Crack_shot + Male + Female FCP_Backstory_Wastelander_BB_Gun_Crack_shot Childhood BB Gun Crack shot @@ -1761,6 +1783,8 @@ FCP_Backstory_Wastelander_Ruin_Dweller + Male + Female FCP_Backstory_Wastelander_Ruin_Dweller Childhood Ruin Dweller @@ -1785,6 +1809,8 @@ FCP_Backstory_Wastelander_Gas_Station_Inhabitant + Male + Female FCP_Backstory_Wastelander_Gas_Station_Inhabitant Childhood Gas Station Inhabitant @@ -1807,6 +1833,8 @@ FCP_Backstory_Wastelander_Caravan_Child + Male + Female FCP_Backstory_Wastelander_Caravan_Child Childhood Caravan Child @@ -1828,6 +1856,8 @@ FCP_Backstory_Wastelander_Street_Kid + Male + Female FCP_Backstory_Wastelander_Street_Kid Childhood Street Kid @@ -1850,6 +1880,8 @@ FCP_Backstory_Wastelander_Cannibalistic_Youth + Male + Female FCP_Backstory_Wastelander_Cannibalistic_Youth Childhood Cannibalistic Youth @@ -1872,6 +1904,8 @@ FCP_Backstory_Wastelander_Cryostasis_Child + Male + Female FCP_Backstory_Wastelander_Cryostasis_Child Childhood Cryostasis Child @@ -1896,6 +1930,8 @@ FCP_Backstory_Wastelander_Wild_Child + Male + Female FCP_Backstory_Wastelander_Wild_Child Childhood Wild Child @@ -1920,6 +1956,8 @@ FCP_Backstory_Wastelander_Stung_by_Radscorpion + Male + Female FCP_Backstory_Wastelander_Stung_by_Radscorpion Childhood Stung by Radscorpion @@ -1943,6 +1981,8 @@ FCP_Backstory_Wastelander_Eco_Cultist + Male + Female FCP_Backstory_Wastelander_Eco_Cultist Childhood Eco-Cultist @@ -1966,6 +2006,8 @@ FCP_Backstory_Wastelander_Whorehouse_Kid + Male + Female FCP_Backstory_Wastelander_Whorehouse_Kid Childhood Whorehouse Kid @@ -1988,6 +2030,8 @@ FCP_Backstory_Wastelander_Gamblers_Kid + Male + Female FCP_Backstory_Wastelander_Gamblers_Kid Childhood Gambler’s Kid @@ -2013,6 +2057,8 @@ FCP_Backstory_Wastelander_Child_Sheriff + Male + Female FCP_Backstory_Wastelander_Child_Sheriff Childhood Child Sheriff @@ -2035,6 +2081,8 @@ FCP_Backstory_Wastelander_Surviving_Mormon + Male + Female FCP_Backstory_Wastelander_Surviving_Mormon Childhood Surviving Mormon @@ -2059,6 +2107,8 @@ FCP_Backstory_Wastelander_Advanced_Student + Male + Female FCP_Backstory_Wastelander_Advanced_Student Childhood Advanced Student @@ -2083,6 +2133,8 @@ FCP_Backstory_Wastelander_Livestock_Herder + Male + Female FCP_Backstory_Wastelander_Livestock_Herder Childhood Livestock Herder @@ -2105,6 +2157,8 @@ FCP_Backstory_Wastelander_Nomad_Child + Male + Female FCP_Backstory_Wastelander_Nomad_Child Childhood Nomad Child @@ -2129,6 +2183,8 @@ FCP_Backstory_Wastelander_Abducted_by_Aliens + Male + Female FCP_Backstory_Wastelander_Abducted_by_Aliens Childhood Abducted by Aliens @@ -2152,6 +2208,8 @@ FCP_Backstory_Wastelander_Swamp_Dweller + Male + Female FCP_Backstory_Wastelander_Swamp_Dweller Childhood Swamp Dweller @@ -2175,6 +2233,8 @@ FCP_Backstory_Wastelander_Pit_Refugee + Male + Female FCP_Backstory_Wastelander_Pit_Refugee Childhood Pit Refugee @@ -2198,6 +2258,8 @@ FCP_Backstory_Wastelander_Greenhorn + Male + Female FCP_Backstory_Wastelander_Greenhorn Childhood Greenhorn @@ -2220,6 +2282,8 @@ FCP_Backstory_Wastelander_Megaton_Child + Male + Female FCP_Backstory_Wastelander_Megaton_Child Childhood Megaton Child @@ -2242,6 +2306,8 @@ FCP_Backstory_Wastelander_Rivet_City_Child + Male + Female FCP_Backstory_Wastelander_Rivet_City_Child Childhood Rivet City Child @@ -2267,6 +2333,8 @@ FCP_Backstory_Wastelander_Children_of_Atom_Novice + Male + Female FCP_Backstory_Wastelander_Children_of_Atom_Novice Childhood Children of Atom Novice @@ -2291,6 +2359,8 @@ FCP_Backstory_Wastelander_Diamond_City_Kid + Male + Female FCP_Backstory_Wastelander_Diamond_City_Kid Childhood Diamond City Kid @@ -2313,6 +2383,8 @@ FCP_Backstory_Wastelander_Novac_Kid + Male + Female FCP_Backstory_Wastelander_Novac_Kid Childhood Novac Kid @@ -2335,6 +2407,8 @@ FCP_Backstory_Wastelander_Westside_Child + Male + Female FCP_Backstory_Wastelander_Westside_Child Childhood Westside Child @@ -2357,6 +2431,8 @@ FCP_Backstory_Wastelander_Goodsprings_Child + Male + Female FCP_Backstory_Wastelander_Goodsprings_Child Childhood Goodsprings Child @@ -2379,6 +2455,8 @@ FCP_Backstory_Wastelander_Trapper_Offspring + Male + Female FCP_Backstory_Wastelander_Trapper_Offspring Childhood Trapper Offspring @@ -2401,6 +2479,8 @@ FCP_Backstory_Wastelander_Primm_Kid + Male + Female FCP_Backstory_Wastelander_Primm_Kid Childhood Primm Kid @@ -2423,6 +2503,8 @@ FCP_Backstory_Wastelander_Tribal_Child + Male + Female FCP_Backstory_Wastelander_Tribal_Child Childhood Tribal Child @@ -2446,6 +2528,8 @@ FCP_Backstory_Wastelander_Gunslinger_Juvie + Male + Female FCP_Backstory_Wastelander_Gunslinger_Juvie Childhood Gunslinger Juvie @@ -2468,6 +2552,8 @@ FCP_Backstory_Wastelander_Frontier_Kid + Male + Female FCP_Backstory_Wastelander_Frontier_Kid Childhood Frontier Kid @@ -2492,6 +2578,8 @@ FCP_Backstory_Wastelander_Displaced_Child + Male + Female FCP_Backstory_Wastelander_Displaced_Child Childhood Displaced Child @@ -2514,6 +2602,8 @@ FCP_Backstory_Wastelander_Born_Miner + Male + Female FCP_Backstory_Wastelander_Born_Miner Childhood Born Miner @@ -2536,6 +2626,8 @@ FCP_Backstory_Wastelander_Apothecarys_Apprentice + Male + Female FCP_Backstory_Wastelander_Apothecarys_Apprentice Childhood Apothecary’s Apprentice @@ -2558,6 +2650,8 @@ FCP_Backstory_Wastelander_Entitled_Youth + Male + Female FCP_Backstory_Wastelander_Entitled_Youth Childhood Entitled Youth @@ -2580,6 +2674,8 @@ FCP_Backstory_Wastelander_Drug_Courier + Male + Female FCP_Backstory_Wastelander_Drug_Courier Childhood Drug Courier @@ -2602,6 +2698,8 @@ FCP_Backstory_Wastelander_Junior_Mechanic + Male + Female FCP_Backstory_Wastelander_Junior_Mechanic Childhood Junior Mechanic @@ -2623,6 +2721,8 @@ FCP_Backstory_Wastelander_Little_Lamplight_Kid + Male + Female FCP_Backstory_Wastelander_Little_Lamplight_Kid Childhood Little Lamplight Kid @@ -2645,6 +2745,8 @@ FCP_Backstory_Wastelander_Goodneighbour_Juvie + Male + Female FCP_Backstory_Wastelander_Goodneighbour_Juvie Childhood Goodneighbour Juvie @@ -2667,6 +2769,8 @@ FCP_Backstory_Wastelander_Shopkeepers_Child + Male + Female FCP_Backstory_Wastelander_Shopkeepers_Child Childhood Shopkeeper’s Child @@ -2689,6 +2793,8 @@ FCP_Backstory_Wastelander_Aspiring_Treasure_Hunter + Male + Female FCP_Backstory_Wastelander_Aspiring_Treasure_Hunter Childhood Aspiring Treasure Hunter @@ -2712,6 +2818,8 @@ FCP_Backstory_Wastelander_Mercs_Kid + Male + Female FCP_Backstory_Wastelander_Mercs_Kid Childhood Merc’s Kid diff --git a/1.6/Defs/JobDefs/JobDefs_Core.xml b/1.6/Defs/JobDefs/JobDefs_Core.xml index eff4167..2f384dc 100644 --- a/1.6/Defs/JobDefs/JobDefs_Core.xml +++ b/1.6/Defs/JobDefs/JobDefs_Core.xml @@ -232,4 +232,37 @@ true + + + + FCP_RobotDock + FCP.Core.Robotics.JobDriver_RobotDock + waiting at TargetA. + false + + + + + + FCP_UpgradeRobot + FCP.Core.Robotics.JobDriver_UpgradeRobot + upgrading TargetB at TargetA. + + + + + + FCP_ControlRobots + FCP.Core.Robotics.JobDriver_ControlRobots + using TargetA. + + + + + + FCP_HackRobot + FCP.Core.Robotics.JobDriver_HackRobot + hacking TargetA. + + \ No newline at end of file diff --git a/1.6/Defs/SoundDefs/SoundDefs.xml b/1.6/Defs/SoundDefs/SoundDefs.xml index 27ede14..94cba21 100644 --- a/1.6/Defs/SoundDefs/SoundDefs.xml +++ b/1.6/Defs/SoundDefs/SoundDefs.xml @@ -902,7 +902,7 @@
  • - Weapon_Sounds/Ballistic_Weapon_Sounds/FCP_Sound_Shot_Assault_Carbine + Weapon_Sounds/Ballistic_Weapon_Sounds/FCP_Sound_Shot_MInigun
  • @@ -1704,4 +1704,428 @@ + + + + FCP_Sound_Shot_Gauss_Pistol + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Energy_Weapon_Sounds/Gauss_Weapon_Sounds/FCP_Sound_Shot_Gauss_Pistol_2D +
  • +
  • + Weapon_Sounds/Energy_Weapon_Sounds/Gauss_Weapon_Sounds/FCP_Sound_Shot_Gauss_Pistol_3D +
  • + + + 48 + 52 + + False + +
    +
    + + + FCP_Sound_Shot_Pulse + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Energy_Weapon_Sounds/Pulse_Weapon_Sounds/FCP_Sound_Shot_Pulse_2D +
  • +
  • + Weapon_Sounds/Energy_Weapon_Sounds/Pulse_Weapon_Sounds/FCP_Sound_Shot_Pulse_3D +
  • + + + 45 + 49 + + False + +
    +
    + + + FCP_Sound_Shot_Flamer + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Energy_Weapon_Sounds/Flame_Weapon_Sounds/FCP_Sound_Shot_Flamer_2D +
  • +
  • + Weapon_Sounds/Energy_Weapon_Sounds/Flame_Weapon_Sounds/FCP_Sound_Shot_Flamer_3D +
  • + + + 45 + 49 + + False + +
    +
    + + + + + FCP_Sound_Interact_Melee_Generic + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Generic/FCP_Sound_Interact_Melee_Equip +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Generic/FCP_Sound_Interact_Melee_Unequip +
  • + + + 50 + 55 + + False + +
    +
    + + + FCP_Sound_Interact_BaseballBat + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Baseball_Bat/FCP_Sound_Interact_BaseballBat_Equip +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Baseball_Bat/FCP_Sound_Interact_BaseballBat_Unequip +
  • + + + 50 + 55 + + False + +
    +
    + + + FCP_Sound_Interact_RollingPin + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Rolling_Pin/FCP_Sound_Interact_RollingPin_Equip +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Rolling_Pin/FCP_Sound_Interact_RollingPin_Unequip +
  • + + + 50 + 55 + + False + +
    +
    + + + FCP_Sound_Interact_Sword + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Interact_Sword_Equip +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Interact_Sword_Unequip +
  • + + + 50 + 55 + + False + +
    +
    + + + FCP_Sound_Hit_Sledge_Wood + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Sledgehammer/FCP_Sound_Hit_Sledge_Wood_01 +
  • + + + 55 + 60 + + False + +
    +
    + + + FCP_Sound_Hit_PoolCue + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Pool_Cue/FCP_Sound_Hit_PoolCue_Flesh_01 +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Pool_Cue/FCP_Sound_Hit_PoolCue_Metal_01 +
  • + + + 50 + 55 + + False + +
    +
    + + + FCP_Sound_Hit_GolfClub + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Golf_Club/FCP_Sound_Hit_GolfClub_01 +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Golf_Club/FCP_Sound_Hit_GolfClub_02 +
  • + + + 55 + 60 + + False + +
    +
    + + + FCP_Sound_Hit_RebarClub + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Rebar_Club/FCP_Sound_Hit_RebarClub_01 +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Rebar_Club/FCP_Sound_Hit_RebarClub_02 +
  • + + + 50 + 55 + + False + +
    +
    + + + FCP_Sound_Hit_Sledgehammer + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Sledgehammer/FCP_Sound_Hit_Sledge_Metal_01 +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Sledgehammer/FCP_Sound_Hit_Sledge_Metal_02 +
  • + + + 60 + 65 + + False + +
    +
    + + + FCP_Sound_Hit_SuperSledge + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Super_Sledge/FCP_Sound_Hit_SuperSledge_01 +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Super_Sledge/FCP_Sound_Hit_SuperSledge_02 +
  • + + + 65 + 70 + + False + +
    +
    + + + FCP_Sound_Hit_Sword + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Hit_Sword_Other_01 +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Hit_Sword_Flesh_01 +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Hit_Sword_Flesh_02 +
  • + + + 50 + 55 + + False + +
    +
    + + + FCP_Sound_Hit_Ripper + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Ripper/FCP_Sound_Hit_Ripper +
  • + + + 55 + 60 + + False + +
    +
    + + + FCP_Sound_Hit_Shishkebab + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Shishkebab/FCP_Sound_Hit_Shishkebab_01 +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Shishkebab/FCP_Sound_Hit_Shishkebab_02 +
  • + + + 55 + 60 + + False + +
    +
    + + + FCP_Sound_Hit_PowerFist + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Flesh_01 +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Flesh_02 +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Metal_01 +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Conc_01 +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Conc_02 +
  • + + + 55 + 60 + + False + +
    +
    + + + FCP_Sound_Hit_ZapGlove + MapOnly + 1 + +
  • + +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Zap_Glove/FCP_Sound_Hit_ZapGlove_01 +
  • +
  • + Weapon_Sounds/Melee_Weapon_Sounds/Zap_Glove/FCP_Sound_Hit_ZapGlove_02 +
  • + + + 55 + 60 + + False + +
    +
    + diff --git a/1.6/Defs/ThingDefs_Buildings/Production.xml b/1.6/Defs/ThingDefs_Buildings/Production.xml index 355cf08..984a25c 100644 --- a/1.6/Defs/ThingDefs_Buildings/Production.xml +++ b/1.6/Defs/ThingDefs_Buildings/Production.xml @@ -1017,6 +1017,7 @@ Things/Building/Production/FCP_Terminals/FCP_Table_Mounted_Terminal/FCP_Old_Terminal_Table_Off false +
  • @@ -1056,6 +1057,7 @@ Things/Building/Production/FCP_Terminals/FCP_Table_Mounted_Terminal/FCP_Clean_Terminal_Table_Off false
  • +
  • diff --git a/1.6/Defs/ThingDefs_Items/ThingDefs_Items_FusionCore.xml b/1.6/Defs/ThingDefs_Items/ThingDefs_Items_FusionCore.xml new file mode 100644 index 0000000..dcbb997 --- /dev/null +++ b/1.6/Defs/ThingDefs_Items/ThingDefs_Items_FusionCore.xml @@ -0,0 +1,41 @@ + + + + + + + + + FCP_Item_Fusion_Core + + A compact nuclear battery used to power pre-war technology, most notably power armor. These cylindrical power cells contain a highly efficient fusion reaction that can provide energy for extended periods. Extremely valuable and sought after by those who maintain pre-war equipment. Cannot be recharged with current technology. + + Things/Items/FusionCores + Graphic_StackCount + 0.65 + + (1,1) + Middle + Metal_Drop + Metal_Drop + 10 + true + + 450 + 80 + 2.5 + 0.0 + 0 + + +
  • ItemsMisc
  • + + true + All + Spacer + +
  • ExoticMisc
  • +
    + + + diff --git a/1.6/Defs/ThingDefs_Items/ThingDefs_Items_Lunchboxes.xml b/1.6/Defs/ThingDefs_Items/ThingDefs_Items_Lunchboxes.xml index ea26b97..7c0118f 100644 --- a/1.6/Defs/ThingDefs_Items/ThingDefs_Items_Lunchboxes.xml +++ b/1.6/Defs/ThingDefs_Items/ThingDefs_Items_Lunchboxes.xml @@ -294,7 +294,7 @@ 1 -
  • +
  • FCP_Apparel_Lab_Coat_Followers 1 @@ -647,6 +647,121 @@ FCP_Apparel_NCRCF_Inmate_Uniform 1
  • + +
  • + FCP_Melee_Bat + 1 +
  • +
  • + FCP_Melee_Pool_Cue + 1 +
  • +
  • + FCP_Melee_Rolling_Pin + 1 +
  • + +
  • + FCP_Unarmed_Boxing_Glove + 1 +
  • + +
  • + FCP_Grenade_Fragmentation + 1~3 +
  • +
  • + FCP_Grenade_Molotov_Cocktail + 1~3 +
  • + +
  • + FCP_Chem_Stimpak + 1~3 +
  • +
  • + FCP_Chem_Radaway + 1~3 +
  • +
  • + FCP_Chem_Mentats + 1~2 +
  • + +
  • + FCP_Nuka_Cola_Classic + 1~4 +
  • +
  • + FCP_Nuka_Cola_Cherry + 1~4 +
  • + +
  • + FCP_Food_Meat_On_A_Stick + 1~3 +
  • +
  • + FCP_Food_Noodle_Cup + 1~3 +
  • +
  • + FCP_Food_Sausages + 1~3 +
  • + +
  • + FCP_Gun_BoS_Crusader_Pistol + 1 +
  • +
  • + FCP_Apparel_Legion_Recruit_Armor + 1 +
  • +
  • + FCP_Apparel_Legion_Tunic + 1 +
  • +
  • + FCP_Gun_Enclave_Plasma_SMG + 1 +
  • +
  • + FCP_Apparel_Enclave_Combat_Armor + 1 +
  • +
  • + FCP_Apparel_Great_Khan_Simple_Armor + 1 +
  • +
  • + FCP_Apparel_Minutemen_Militia_Uniform + 1 +
  • +
  • + FCP_Apparel_PRC_Jumpsuit + 1 +
  • +
  • + FCP_Apparel_PRC_Army_Cap + 1 +
  • +
  • + FCP_Gun_Alloy_Steel_10mm_Pistol + 1 +
  • +
  • + FCP_Apparel_USA_Army_Combat_Armor + 1 +
  • +
  • + FCP_Apparel_Robes_of_Atom + 1 +
  • +
  • + FCP_Apparel_Desert_Ranger_Uniform + 1 +
  • @@ -811,6 +926,31 @@ FCP_Apparel_NCR_Veteran_Ranger_Helmet 1
  • +
  • + FCP_Apparel_Marked_Trooper_Armor + 1 + 0.3 +
  • +
  • + FCP_Apparel_Marked_Patrol_Armor + 1 + 0.3 +
  • +
  • + FCP_Apparel_Marked_Scout_Armor + 1 + 0.3 +
  • +
  • + FCP_Apparel_Marked_Tribal_Armor + 1 + 0.15 +
  • +
  • + FCP_Apparel_Marked_Tribal_Helmet + 1 + 0.15 +
  • FCP_Gun_Power_Armor_Assault_Rifle 1 @@ -1103,6 +1243,143 @@ FCP_Gun_YK42B_Pulse_Rifle 1
  • + +
  • + FCP_Melee_Scrap_Machete + 1 +
  • +
  • + FCP_Melee_Sledgehammer + 1 +
  • + +
  • + FCP_Unarmed_Power_Fist + 1 +
  • +
  • + FCP_Unarmed_Ballistic_Fist + 1 +
  • + +
  • + FCP_Grenade_Dynamite + 1~2 +
  • +
  • + FCP_Gun_Missile_Launcher + 1 +
  • + +
  • + FCP_Chem_Jet + 1~3 +
  • +
  • + FCP_Chem_Psycho + 1~2 +
  • +
  • + FCP_Chem_Buffout + 1~2 +
  • +
  • + FCP_Chem_Super_Stimpak + 1~2 +
  • + +
  • + FCP_Nuka_Cola_Quantum + 1~3 +
  • +
  • + FCP_Nuka_Cola_Victory + 1~3 +
  • + +
  • + FCP_Food_Deathclaw_Steak_And_Eggs + 1 +
  • +
  • + FCP_Food_Brahmin_Pot_Pie + 1 +
  • + +
  • + FCP_Gun_BoS_M94_Plasma_Rifle + 1 +
  • +
  • + FCP_Melee_BoS_Super_Sledge + 1 +
  • +
  • + FCP_Apparel_BoS_T51_Power_Armor + 1 + 0.5 +
  • +
  • + FCP_Apparel_Legion_Veteran_Armor + 1 +
  • +
  • + FCP_Apparel_Legion_Prime_Armor + 1 +
  • +
  • + FCP_Gun_Enclave_Assault_Plasma_Rifle + 1 +
  • +
  • + FCP_Apparel_Enclave_Advanced_Power_Armor + 1 + 0.5 +
  • +
  • + FCP_Apparel_Great_Khan_Armored_Leathers + 1 +
  • +
  • + FCP_Apparel_Great_Khan_Soldier_Armor + 1 +
  • +
  • + FCP_Apparel_Minutemen_Combat_Armor_Light + 1 +
  • +
  • + FCP_Apparel_Minutemen_Combat_Helmet + 1 +
  • +
  • + FCP_Apparel_PRC_Stealth_Suit + 1 +
  • +
  • + FCP_Apparel_PRC_Stealth_Helmet + 1 +
  • +
  • + FCP_Gun_USA_Alloy_Steel_Assault_Rifle + 1 +
  • +
  • + FCP_Apparel_USA_Marine_Armor + 1 +
  • +
  • + FCP_Gun_Gamma + 1 +
  • +
  • + FCP_Apparel_Zealot_Armor + 1 +
  • +
  • + FCP_Apparel_Desert_Ranger_Duster + 1 +
  • @@ -1327,6 +1604,203 @@ FCP_Gun_ReservistsRifle 1
  • + +
  • + FCP_Melee_Super_Sledge + 1 + 0.4 +
  • +
  • + FCP_Melee_Ripper + 1 + 0.4 +
  • +
  • + FCP_Melee_Shishkebab + 1 + 0.3 +
  • +
  • + FCP_Melee_Chainsaw + 1 + 0.3 +
  • + +
  • + FCP_Unarmed_Zap_Glove + 1 + 0.3 +
  • +
  • + FCP_Unarmed_Displacer_Glove + 1 + 0.2 +
  • +
  • + FCP_Unarmed_Industrial_Fist + 1 + 0.2 +
  • + +
  • + FCP_Gun_Fatman + 1 + 0.1 +
  • +
  • + FCP_Grenade_Mininuke + 1~2 + 0.15 +
  • +
  • + FCP_Grenade_Nuka + 1~2 + 0.15 +
  • +
  • + FCP_Grenade_Holy_Hand_Grenade + 1 + 0.05 +
  • +
  • + FCP_Gun_Red_Glare + 1 + 0.05 +
  • +
  • + FCP_Gun_Broadsider + 1 + 0.05 +
  • + +
  • + FCP_Chem_X_Cell + 1~2 + 0.3 +
  • +
  • + FCP_Chem_Ultrajet + 1~2 + 0.3 +
  • +
  • + FCP_Chem_Dixons_Jet + 1 + 0.1 +
  • + +
  • + FCP_Nuka_Cola_Quartz + 1 + 0.2 +
  • +
  • + FCP_Nuka_Cola_Rum + 1 + 0.2 +
  • +
  • + FCP_Nukashine + 1 + 0.15 +
  • + +
  • + FCP_Food_Cook_Cooks_Fiend_Stew + 1 + 0.2 +
  • +
  • + FCP_Food_Happy_Birthday_Sweet_Roll + 1 + 0.1 +
  • + +
  • + FCP_Gun_BoS_Ultracite_Rifle + 1 + 0.2 +
  • +
  • + FCP_Apparel_BoS_T60_Power_Armor + 1 + 0.15 +
  • +
  • + FCP_Apparel_Legion_Centurion_Armor + 1 + 0.2 +
  • +
  • + FCP_Apparel_Caesar_Robes + 1 + 0.1 +
  • +
  • + FCP_Gun_Enclave_Plasma_Cannon + 1 + 0.15 +
  • +
  • + FCP_Apparel_Enclave_Hellfire_Power_Armor + 1 + 0.1 +
  • +
  • + FCP_Apparel_Enclave_X02_Tesla_Power_Armor + 1 + 0.1 +
  • +
  • + FCP_Apparel_Great_Khan_Suit_Armor + 1 + 0.2 +
  • +
  • + FCP_Apparel_Minutemen_General_Armor + 1 + 0.15 +
  • +
  • + FCP_Apparel_PRC_Jumpsuit_General + 1 + 0.15 +
  • +
  • + FCP_Apparel_USA_T65_Power_Armor + 1 + 0.1 +
  • +
  • + FCP_Apparel_USA_Presidents_Suit + 1 + 0.05 +
  • +
  • + FCP_Apparel_USA_Secret_Service_Armor + 1 + 0.1 +
  • +
  • + FCP_Gun_Radium_Rifle + 1 + 0.2 +
  • +
  • + FCP_Apparel_Inquisitor_Cowl + 1 + 0.1 +
  • +
  • + FCP_Apparel_Desert_Ranger_Armor + 1 + 0.15 +
  • +
  • + FCP_Apparel_Desert_Ranger_Helmet + 1 + 0.15 +
  • diff --git a/1.6/Patches/AddVertibirdRaid.xml b/1.6/Patches/AddVertibirdRaid.xml index 7716e78..4380d13 100644 --- a/1.6/Patches/AddVertibirdRaid.xml +++ b/1.6/Patches/AddVertibirdRaid.xml @@ -42,6 +42,15 @@
  • + +
  • + FCP_Faction_Enclave + + +
  • (0, 1)
  • + + + diff --git a/Common/Languages/English/Keyed/FCPToolsKeyed.xml b/Common/Languages/English/Keyed/FCPToolsKeyed.xml index 6d1972d..2f2c1db 100644 --- a/Common/Languages/English/Keyed/FCPToolsKeyed.xml +++ b/Common/Languages/English/Keyed/FCPToolsKeyed.xml @@ -215,4 +215,5 @@ This vertibird is designed for atmospheric flight only and cannot reach orbital altitudes. + \ No newline at end of file diff --git a/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Flame_Weapon_Sounds/FCP_Sound_Shot_Flamer_2D.wav b/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Flame_Weapon_Sounds/FCP_Sound_Shot_Flamer_2D.wav new file mode 100644 index 0000000..d1b03e8 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Flame_Weapon_Sounds/FCP_Sound_Shot_Flamer_2D.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Flame_Weapon_Sounds/FCP_Sound_Shot_Flamer_3D.wav b/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Flame_Weapon_Sounds/FCP_Sound_Shot_Flamer_3D.wav new file mode 100644 index 0000000..7a05e73 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Flame_Weapon_Sounds/FCP_Sound_Shot_Flamer_3D.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Gauss_Weapon_Sounds/FCP_Sound_Shot_Gauss_Pistol_2D.wav b/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Gauss_Weapon_Sounds/FCP_Sound_Shot_Gauss_Pistol_2D.wav new file mode 100644 index 0000000..a74caa2 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Gauss_Weapon_Sounds/FCP_Sound_Shot_Gauss_Pistol_2D.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Gauss_Weapon_Sounds/FCP_Sound_Shot_Gauss_Pistol_3D.wav b/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Gauss_Weapon_Sounds/FCP_Sound_Shot_Gauss_Pistol_3D.wav new file mode 100644 index 0000000..63116e6 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Gauss_Weapon_Sounds/FCP_Sound_Shot_Gauss_Pistol_3D.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Pulse_Weapon_Sounds/FCP_Sound_Shot_Pulse_2D.wav b/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Pulse_Weapon_Sounds/FCP_Sound_Shot_Pulse_2D.wav new file mode 100644 index 0000000..a980df6 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Pulse_Weapon_Sounds/FCP_Sound_Shot_Pulse_2D.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Pulse_Weapon_Sounds/FCP_Sound_Shot_Pulse_3D.wav b/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Pulse_Weapon_Sounds/FCP_Sound_Shot_Pulse_3D.wav new file mode 100644 index 0000000..ab182b6 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Energy_Weapon_Sounds/Pulse_Weapon_Sounds/FCP_Sound_Shot_Pulse_3D.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Baseball_Bat/FCP_Sound_Interact_BaseballBat_Equip.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Baseball_Bat/FCP_Sound_Interact_BaseballBat_Equip.wav new file mode 100644 index 0000000..056bc74 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Baseball_Bat/FCP_Sound_Interact_BaseballBat_Equip.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Baseball_Bat/FCP_Sound_Interact_BaseballBat_Unequip.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Baseball_Bat/FCP_Sound_Interact_BaseballBat_Unequip.wav new file mode 100644 index 0000000..2529dda Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Baseball_Bat/FCP_Sound_Interact_BaseballBat_Unequip.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Generic/FCP_Sound_Interact_Melee_Equip.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Generic/FCP_Sound_Interact_Melee_Equip.wav new file mode 100644 index 0000000..160d6a6 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Generic/FCP_Sound_Interact_Melee_Equip.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Generic/FCP_Sound_Interact_Melee_Unequip.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Generic/FCP_Sound_Interact_Melee_Unequip.wav new file mode 100644 index 0000000..e04a32c Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Generic/FCP_Sound_Interact_Melee_Unequip.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Golf_Club/FCP_Sound_Hit_GolfClub_01.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Golf_Club/FCP_Sound_Hit_GolfClub_01.wav new file mode 100644 index 0000000..264cbab Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Golf_Club/FCP_Sound_Hit_GolfClub_01.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Golf_Club/FCP_Sound_Hit_GolfClub_02.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Golf_Club/FCP_Sound_Hit_GolfClub_02.wav new file mode 100644 index 0000000..eca9e06 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Golf_Club/FCP_Sound_Hit_GolfClub_02.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Pool_Cue/FCP_Sound_Hit_PoolCue_Flesh_01.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Pool_Cue/FCP_Sound_Hit_PoolCue_Flesh_01.wav new file mode 100644 index 0000000..a887bc7 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Pool_Cue/FCP_Sound_Hit_PoolCue_Flesh_01.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Pool_Cue/FCP_Sound_Hit_PoolCue_Metal_01.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Pool_Cue/FCP_Sound_Hit_PoolCue_Metal_01.wav new file mode 100644 index 0000000..8866009 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Pool_Cue/FCP_Sound_Hit_PoolCue_Metal_01.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Conc_01.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Conc_01.wav new file mode 100644 index 0000000..4158532 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Conc_01.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Conc_02.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Conc_02.wav new file mode 100644 index 0000000..3b43661 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Conc_02.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Flesh_01.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Flesh_01.wav new file mode 100644 index 0000000..91773aa Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Flesh_01.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Flesh_02.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Flesh_02.wav new file mode 100644 index 0000000..6d5ecf7 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Flesh_02.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Metal_01.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Metal_01.wav new file mode 100644 index 0000000..0f886ac Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Power_Fist/FCP_Sound_Hit_PowerFist_Metal_01.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Rebar_Club/FCP_Sound_Hit_RebarClub_01.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Rebar_Club/FCP_Sound_Hit_RebarClub_01.wav new file mode 100644 index 0000000..d216b28 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Rebar_Club/FCP_Sound_Hit_RebarClub_01.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Rebar_Club/FCP_Sound_Hit_RebarClub_02.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Rebar_Club/FCP_Sound_Hit_RebarClub_02.wav new file mode 100644 index 0000000..04161d7 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Rebar_Club/FCP_Sound_Hit_RebarClub_02.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Ripper/FCP_Sound_Hit_Ripper.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Ripper/FCP_Sound_Hit_Ripper.wav new file mode 100644 index 0000000..f127d91 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Ripper/FCP_Sound_Hit_Ripper.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Rolling_Pin/FCP_Sound_Interact_RollingPin_Equip.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Rolling_Pin/FCP_Sound_Interact_RollingPin_Equip.wav new file mode 100644 index 0000000..143e57d Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Rolling_Pin/FCP_Sound_Interact_RollingPin_Equip.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Rolling_Pin/FCP_Sound_Interact_RollingPin_Unequip.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Rolling_Pin/FCP_Sound_Interact_RollingPin_Unequip.wav new file mode 100644 index 0000000..5d502ac Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Rolling_Pin/FCP_Sound_Interact_RollingPin_Unequip.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Shishkebab/FCP_Sound_Hit_Shishkebab_01.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Shishkebab/FCP_Sound_Hit_Shishkebab_01.wav new file mode 100644 index 0000000..c88356e Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Shishkebab/FCP_Sound_Hit_Shishkebab_01.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Shishkebab/FCP_Sound_Hit_Shishkebab_02.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Shishkebab/FCP_Sound_Hit_Shishkebab_02.wav new file mode 100644 index 0000000..a23abbd Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Shishkebab/FCP_Sound_Hit_Shishkebab_02.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sledgehammer/FCP_Sound_Hit_Sledge_Metal_01.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sledgehammer/FCP_Sound_Hit_Sledge_Metal_01.wav new file mode 100644 index 0000000..c96f784 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sledgehammer/FCP_Sound_Hit_Sledge_Metal_01.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sledgehammer/FCP_Sound_Hit_Sledge_Metal_02.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sledgehammer/FCP_Sound_Hit_Sledge_Metal_02.wav new file mode 100644 index 0000000..b928db6 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sledgehammer/FCP_Sound_Hit_Sledge_Metal_02.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sledgehammer/FCP_Sound_Hit_Sledge_Wood_01.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sledgehammer/FCP_Sound_Hit_Sledge_Wood_01.wav new file mode 100644 index 0000000..e04707c Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sledgehammer/FCP_Sound_Hit_Sledge_Wood_01.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Super_Sledge/FCP_Sound_Hit_SuperSledge_01.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Super_Sledge/FCP_Sound_Hit_SuperSledge_01.wav new file mode 100644 index 0000000..9007c07 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Super_Sledge/FCP_Sound_Hit_SuperSledge_01.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Super_Sledge/FCP_Sound_Hit_SuperSledge_02.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Super_Sledge/FCP_Sound_Hit_SuperSledge_02.wav new file mode 100644 index 0000000..5c8c889 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Super_Sledge/FCP_Sound_Hit_SuperSledge_02.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Hit_Sword_Flesh_01.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Hit_Sword_Flesh_01.wav new file mode 100644 index 0000000..7a1991e Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Hit_Sword_Flesh_01.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Hit_Sword_Flesh_02.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Hit_Sword_Flesh_02.wav new file mode 100644 index 0000000..dad16e1 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Hit_Sword_Flesh_02.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Hit_Sword_Other_01.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Hit_Sword_Other_01.wav new file mode 100644 index 0000000..0ce965a Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Hit_Sword_Other_01.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Interact_Sword_Equip.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Interact_Sword_Equip.wav new file mode 100644 index 0000000..78bdfe0 Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Interact_Sword_Equip.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Interact_Sword_Unequip.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Interact_Sword_Unequip.wav new file mode 100644 index 0000000..391042f Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Sword/FCP_Sound_Interact_Sword_Unequip.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Zap_Glove/FCP_Sound_Hit_ZapGlove_01.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Zap_Glove/FCP_Sound_Hit_ZapGlove_01.wav new file mode 100644 index 0000000..49598fe Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Zap_Glove/FCP_Sound_Hit_ZapGlove_01.wav differ diff --git a/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Zap_Glove/FCP_Sound_Hit_ZapGlove_02.wav b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Zap_Glove/FCP_Sound_Hit_ZapGlove_02.wav new file mode 100644 index 0000000..243c77d Binary files /dev/null and b/Common/Sounds/Weapon_Sounds/Melee_Weapon_Sounds/Zap_Glove/FCP_Sound_Hit_ZapGlove_02.wav differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Bunker_Hill_Monument_Site.png b/Common/Textures/MapIcons/Sites/FCP_Bunker_Hill_Monument_Site.png new file mode 100644 index 0000000..cd2bcaa Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Bunker_Hill_Monument_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Capitol_Building_Site.png b/Common/Textures/MapIcons/Sites/FCP_Capitol_Building_Site.png new file mode 100644 index 0000000..8644298 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Capitol_Building_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Caravan_Site.png b/Common/Textures/MapIcons/Sites/FCP_Caravan_Site.png index 4b15c4b..feb5acf 100644 Binary files a/Common/Textures/MapIcons/Sites/FCP_Caravan_Site.png and b/Common/Textures/MapIcons/Sites/FCP_Caravan_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Cave_Site.png b/Common/Textures/MapIcons/Sites/FCP_Cave_Site.png new file mode 100644 index 0000000..c1e1176 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Cave_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Cemetary_Site.png b/Common/Textures/MapIcons/Sites/FCP_Cemetary_Site.png new file mode 100644 index 0000000..94ad767 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Cemetary_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Church_Site.png b/Common/Textures/MapIcons/Sites/FCP_Church_Site.png new file mode 100644 index 0000000..9ff47db Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Church_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_City_Site.png b/Common/Textures/MapIcons/Sites/FCP_City_Site.png new file mode 100644 index 0000000..da6c84b Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_City_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Coastal_City_Site.png b/Common/Textures/MapIcons/Sites/FCP_Coastal_City_Site.png new file mode 100644 index 0000000..3ab2e42 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Coastal_City_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Diamond_City_Site.png b/Common/Textures/MapIcons/Sites/FCP_Diamond_City_Site.png new file mode 100644 index 0000000..6160c8e Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Diamond_City_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Farm_Site.png b/Common/Textures/MapIcons/Sites/FCP_Farm_Site.png new file mode 100644 index 0000000..ef59c32 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Farm_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Settlement_Site.png b/Common/Textures/MapIcons/Sites/FCP_Farmhouse_Site.png similarity index 100% rename from Common/Textures/MapIcons/Sites/FCP_Settlement_Site.png rename to Common/Textures/MapIcons/Sites/FCP_Farmhouse_Site.png diff --git a/Common/Textures/MapIcons/Sites/FCP_Forrester_Site.png b/Common/Textures/MapIcons/Sites/FCP_Forrester_Site.png new file mode 100644 index 0000000..88b005d Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Forrester_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Hospital_Site.png b/Common/Textures/MapIcons/Sites/FCP_Hospital_Site.png new file mode 100644 index 0000000..3b0b350 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Hospital_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Industiral_Building_Site.png b/Common/Textures/MapIcons/Sites/FCP_Industiral_Building_Site.png new file mode 100644 index 0000000..e2a2761 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Industiral_Building_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Large_Bunker_Site.png b/Common/Textures/MapIcons/Sites/FCP_Large_Bunker_Site.png new file mode 100644 index 0000000..a2c8b63 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Large_Bunker_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Large_Campsite.png b/Common/Textures/MapIcons/Sites/FCP_Large_Campsite.png new file mode 100644 index 0000000..e76e2c9 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Large_Campsite.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Large_Church_Site.png b/Common/Textures/MapIcons/Sites/FCP_Large_Church_Site.png new file mode 100644 index 0000000..9de164b Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Large_Church_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Large_Ruins_Site.png b/Common/Textures/MapIcons/Sites/FCP_Large_Ruins_Site.png new file mode 100644 index 0000000..aba3adb Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Large_Ruins_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Metro_Cite.png b/Common/Textures/MapIcons/Sites/FCP_Metro_Cite.png new file mode 100644 index 0000000..75f9cb5 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Metro_Cite.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Mine_Site.png b/Common/Textures/MapIcons/Sites/FCP_Mine_Site.png new file mode 100644 index 0000000..b557877 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Mine_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Minuteman_Site.png b/Common/Textures/MapIcons/Sites/FCP_Minuteman_Site.png new file mode 100644 index 0000000..1ed7a82 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Minuteman_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Old_North_Church_Site.png b/Common/Textures/MapIcons/Sites/FCP_Old_North_Church_Site.png new file mode 100644 index 0000000..d0700d6 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Old_North_Church_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Police_Site.png b/Common/Textures/MapIcons/Sites/FCP_Police_Site.png new file mode 100644 index 0000000..397dab1 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Police_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Radio_Tower_Site.png b/Common/Textures/MapIcons/Sites/FCP_Radio_Tower_Site.png new file mode 100644 index 0000000..3c6683d Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Radio_Tower_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Radioactive_Site.png b/Common/Textures/MapIcons/Sites/FCP_Radioactive_Site.png index 883d578..3949e6c 100644 Binary files a/Common/Textures/MapIcons/Sites/FCP_Radioactive_Site.png and b/Common/Textures/MapIcons/Sites/FCP_Radioactive_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Ruins_Site.png b/Common/Textures/MapIcons/Sites/FCP_Ruins_Site.png new file mode 100644 index 0000000..a530495 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Ruins_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Satallite_Site.png b/Common/Textures/MapIcons/Sites/FCP_Satallite_Site.png new file mode 100644 index 0000000..9b495f2 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Satallite_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Scrapyard_Site.png b/Common/Textures/MapIcons/Sites/FCP_Scrapyard_Site.png new file mode 100644 index 0000000..f0ac7f5 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Scrapyard_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Small_Building_Site.png b/Common/Textures/MapIcons/Sites/FCP_Small_Building_Site.png new file mode 100644 index 0000000..afe25d7 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Small_Building_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Small_Ruins_Site.png b/Common/Textures/MapIcons/Sites/FCP_Small_Ruins_Site.png new file mode 100644 index 0000000..0a27700 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Small_Ruins_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Small_Settlement_Site.png b/Common/Textures/MapIcons/Sites/FCP_Small_Settlement_Site.png new file mode 100644 index 0000000..e9f7b60 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Small_Settlement_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Star_Cinima_Site.png b/Common/Textures/MapIcons/Sites/FCP_Star_Cinima_Site.png new file mode 100644 index 0000000..9f79892 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Star_Cinima_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_US_Army_Site.png b/Common/Textures/MapIcons/Sites/FCP_US_Army_Site.png new file mode 100644 index 0000000..ac083f9 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_US_Army_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Vault_Site.png b/Common/Textures/MapIcons/Sites/FCP_Vault_Site.png new file mode 100644 index 0000000..f15ffe2 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Vault_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Warehouse_Site.png b/Common/Textures/MapIcons/Sites/FCP_Warehouse_Site.png new file mode 100644 index 0000000..e916f94 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Warehouse_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Washington_DC_Site.png b/Common/Textures/MapIcons/Sites/FCP_Washington_DC_Site.png new file mode 100644 index 0000000..3437fc3 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Washington_DC_Site.png differ diff --git a/Common/Textures/MapIcons/Sites/FCP_Water_Treatment_Site.png b/Common/Textures/MapIcons/Sites/FCP_Water_Treatment_Site.png new file mode 100644 index 0000000..5f27b75 Binary files /dev/null and b/Common/Textures/MapIcons/Sites/FCP_Water_Treatment_Site.png differ diff --git a/Common/Textures/Things/Items/FusionCores/FCP_Fusion_Core_a.png b/Common/Textures/Things/Items/FusionCores/FCP_Fusion_Core_a.png new file mode 100644 index 0000000..41abac2 Binary files /dev/null and b/Common/Textures/Things/Items/FusionCores/FCP_Fusion_Core_a.png differ diff --git a/Common/Textures/Things/Items/FusionCores/FCP_Fusion_Core_b.png b/Common/Textures/Things/Items/FusionCores/FCP_Fusion_Core_b.png new file mode 100644 index 0000000..190d98b Binary files /dev/null and b/Common/Textures/Things/Items/FusionCores/FCP_Fusion_Core_b.png differ diff --git a/Source/Enlist/Enlist.csproj b/Source/Enlist/Enlist.csproj deleted file mode 100644 index 2a1ad50..0000000 --- a/Source/Enlist/Enlist.csproj +++ /dev/null @@ -1,46 +0,0 @@ - - - - FCPEnlist - FCP_Enlist - Fallout Tents Module - Copyright © iforgotmysocks 2020 - 12 - enable - disable - - - - ../../1.6/Assemblies - - - - true - portable - false - DEBUG;TRACE - - - - portable - true - bin\Release\ - TRACE - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - ..\..\1.6\Assemblies\FCP_Core.dll - False - - - - \ No newline at end of file diff --git a/Source/Enlist/Enlist.csproj.lscache b/Source/Enlist/Enlist.csproj.lscache deleted file mode 100644 index 03cc716..0000000 --- a/Source/Enlist/Enlist.csproj.lscache +++ /dev/null @@ -1,308 +0,0 @@ -version=1 - -# This file caches language service data to improve the performance of C# Dev Kit. -# It is not intended for manual editing. It can safely be deleted and will be -# regenerated automatically. For more information, see https://aka.ms/lscache -# -# To control where cache files are stored, use the following VS Code setting: -# "dotnet.projectsystem.cacheInProjectFolder": true - -[project] -language=C# -primary -lastDtbSucceeded - -[properties] -AssemblyName=FCP_Enlist -CommandLineArgsForDesignTimeEvaluation=-langversion:12 -define:DEBUG;TRACE -CompilerGeneratedFilesOutputPath= -MaxSupportedLangVersion=7.3 -ProjectAssetsFile=obj/project.assets.json -RootNamespace=FCPEnlist -RunAnalyzers= -RunAnalyzersDuringLiveAnalysis= -SolutionPath=*Undefined* -TargetFrameworkIdentifier=.NETFramework -TargetPath=../../1.6/Assemblies/FCP_Enlist.dll -TargetRefPath= -TemporaryDependencyNodeTargetIdentifier=net472 - -[commandLineArguments] -/noconfig -/unsafe+ -/checked- -/nowarn:1701,1702,1701,1702 -/fullpaths -/nostdlib+ -/errorreport:prompt -/warn:4 -/define:DEBUG;TRACE;DEBUG;NETFRAMEWORK;NET472;NET20_OR_GREATER;NET30_OR_GREATER;NET35_OR_GREATER;NET40_OR_GREATER;NET45_OR_GREATER;NET451_OR_GREATER;NET452_OR_GREATER;NET46_OR_GREATER;NET461_OR_GREATER;NET462_OR_GREATER;NET47_OR_GREATER;NET471_OR_GREATER;NET472_OR_GREATER -/highentropyva+ -/nullable:disable -/debug+ -/debug:portable -/filealign:512 -/optimize- -/out:obj\Debug\FCP_Enlist.dll -/subsystemversion:6.00 -/target:library -/warnaserror- -/utf8output -/deterministic+ -/langversion:12 -/warnaserror+:NU1605 - -[sourceFiles] -/krafs.publicizer/2.3.0/contentfiles/cs/any/Publicizer/IgnoresAccessChecksToAttribute.cs - @folderNames=Publicizer -AbilityTrainingSession.cs -CaravanOptions.cs -DeliveryQuest.cs -Dialog_Missions.cs -Dialog_ResignConfirmation.cs -EnlistMod.cs -EnlistSettings.cs -EnlistUtils.cs -ExclusiveTrader.cs -FactionEnlistOptions.cs -FactionEnlistOptionsDef.cs -FactionEnlistWorker.cs -FactionOptions.cs -FactionState.cs -FactionStorage.cs -GUIHelper.cs -Harmony_Patches.cs -obj/Debug/ - .NETFramework,Version=v4.7.2.AssemblyAttributes.cs - Enlist.AssemblyInfo.cs - Enlist.GlobalUsings.g.cs -PawnTrader.cs -ProtocolOption.cs -ProvisionsInfo.cs -QuestContainer.cs -QuestsContainer.cs -SalaryInfo.cs -StatPart_CaravanImmunityGain.cs -StockGenerator_Pawns.cs -Window_Password.cs -WorldEnlistTracker.cs -WorldObjectCompEnlist.cs - -[metadataReferences] -../../1.6/Assemblies/FCP_Core.dll -/v4.7.2/Facades/ - Microsoft.Win32.Primitives.dll - System.AppContext.dll - System.Collections.Concurrent.dll - System.Collections.dll - System.Collections.NonGeneric.dll - System.Collections.Specialized.dll - System.ComponentModel.Annotations.dll - System.ComponentModel.dll - System.ComponentModel.EventBasedAsync.dll - System.ComponentModel.Primitives.dll - System.ComponentModel.TypeConverter.dll - System.Console.dll - System.Data.Common.dll - System.Diagnostics.Contracts.dll - System.Diagnostics.Debug.dll - System.Diagnostics.FileVersionInfo.dll - System.Diagnostics.Process.dll - System.Diagnostics.StackTrace.dll - System.Diagnostics.TextWriterTraceListener.dll - System.Diagnostics.Tools.dll - System.Diagnostics.TraceSource.dll - System.Drawing.Primitives.dll - System.Dynamic.Runtime.dll - System.Globalization.Calendars.dll - System.Globalization.dll - System.Globalization.Extensions.dll - System.IO.Compression.ZipFile.dll - System.IO.dll - System.IO.FileSystem.dll - System.IO.FileSystem.DriveInfo.dll - System.IO.FileSystem.Primitives.dll - System.IO.FileSystem.Watcher.dll - System.IO.IsolatedStorage.dll - System.IO.MemoryMappedFiles.dll - System.IO.Pipes.dll - System.IO.UnmanagedMemoryStream.dll - System.Linq.dll - System.Linq.Expressions.dll - System.Linq.Parallel.dll - System.Linq.Queryable.dll - System.Net.Http.Rtc.dll - System.Net.NameResolution.dll - System.Net.NetworkInformation.dll - System.Net.Ping.dll - System.Net.Primitives.dll - System.Net.Requests.dll - System.Net.Security.dll - System.Net.Sockets.dll - System.Net.WebHeaderCollection.dll - System.Net.WebSockets.Client.dll - System.Net.WebSockets.dll - System.ObjectModel.dll - System.Reflection.dll - System.Reflection.Emit.dll - System.Reflection.Emit.ILGeneration.dll - System.Reflection.Emit.Lightweight.dll - System.Reflection.Extensions.dll - System.Reflection.Primitives.dll - System.Resources.Reader.dll - System.Resources.ResourceManager.dll - System.Resources.Writer.dll - System.Runtime.CompilerServices.VisualC.dll - System.Runtime.dll - System.Runtime.Extensions.dll - System.Runtime.Handles.dll - System.Runtime.InteropServices.dll - System.Runtime.InteropServices.RuntimeInformation.dll - System.Runtime.InteropServices.WindowsRuntime.dll - System.Runtime.Numerics.dll - System.Runtime.Serialization.Formatters.dll - System.Runtime.Serialization.Json.dll - System.Runtime.Serialization.Primitives.dll - System.Runtime.Serialization.Xml.dll - System.Security.Claims.dll - System.Security.Cryptography.Algorithms.dll - System.Security.Cryptography.Csp.dll - System.Security.Cryptography.Encoding.dll - System.Security.Cryptography.Primitives.dll - System.Security.Cryptography.X509Certificates.dll - System.Security.Principal.dll - System.Security.SecureString.dll - System.ServiceModel.Duplex.dll - System.ServiceModel.Http.dll - System.ServiceModel.NetTcp.dll - System.ServiceModel.Primitives.dll - System.ServiceModel.Security.dll - System.Text.Encoding.dll - System.Text.Encoding.Extensions.dll - System.Text.RegularExpressions.dll - System.Threading.dll - System.Threading.Overlapped.dll - System.Threading.Tasks.dll - System.Threading.Tasks.Parallel.dll - System.Threading.Thread.dll - System.Threading.ThreadPool.dll - System.Threading.Timer.dll - System.ValueTuple.dll - System.Xml.ReaderWriter.dll - System.Xml.XDocument.dll - System.Xml.XmlDocument.dll - System.Xml.XmlSerializer.dll - System.Xml.XPath.dll - System.Xml.XPath.XDocument.dll -/v4.7.2/ - System.IO.Compression.dll - System.Net.Http.dll -/krafs.rimworld.ref/1.6.4759-beta/ref/net472/ - Assembly-CSharp-firstpass.dll - com.rlabrecque.steamworks.net.dll - ISharpZipLib.dll - Mono.Security.dll - mscorlib.dll - NAudio.dll - netstandard.dll - NVorbis.dll - System.ComponentModel.Composition.dll - System.Configuration.dll - System.Core.dll - System.Data.DataSetExtensions.dll - System.Data.dll - System.dll - System.Drawing.dll - System.EnterpriseServices.dll - System.IO.Compression.FileSystem.dll - System.Numerics.dll - System.Runtime.Serialization.dll - System.Security.dll - System.ServiceModel.Internals.dll - System.Transactions.dll - System.Xml.dll - System.Xml.Linq.dll - Unity.AI.Navigation.dll - Unity.Burst.dll - Unity.Burst.Unsafe.dll - Unity.Collections.dll - Unity.Collections.LowLevel.ILSupport.dll - Unity.Mathematics.dll - Unity.MemoryProfiler.dll - Unity.Profiling.Core.dll - Unity.TextMeshPro.dll - UnityEngine.AccessibilityModule.dll - UnityEngine.AIModule.dll - UnityEngine.AndroidJNIModule.dll - UnityEngine.AnimationModule.dll - UnityEngine.ARModule.dll - UnityEngine.AssetBundleModule.dll - UnityEngine.AudioModule.dll - UnityEngine.ClothModule.dll - UnityEngine.ClusterInputModule.dll - UnityEngine.ClusterRendererModule.dll - UnityEngine.ContentLoadModule.dll - UnityEngine.CoreModule.dll - UnityEngine.CrashReportingModule.dll - UnityEngine.DirectorModule.dll - UnityEngine.dll - UnityEngine.DSPGraphModule.dll - UnityEngine.GameCenterModule.dll - UnityEngine.GIModule.dll - UnityEngine.GridModule.dll - UnityEngine.HotReloadModule.dll - UnityEngine.ImageConversionModule.dll - UnityEngine.IMGUIModule.dll - UnityEngine.InputLegacyModule.dll - UnityEngine.InputModule.dll - UnityEngine.JSONSerializeModule.dll - UnityEngine.LocalizationModule.dll - UnityEngine.NVIDIAModule.dll - UnityEngine.ParticleSystemModule.dll - UnityEngine.PerformanceReportingModule.dll - UnityEngine.Physics2DModule.dll - UnityEngine.PhysicsModule.dll - UnityEngine.ProfilerModule.dll - UnityEngine.PropertiesModule.dll - UnityEngine.RuntimeInitializeOnLoadManagerInitializerModule.dll - UnityEngine.ScreenCaptureModule.dll - UnityEngine.SharedInternalsModule.dll - UnityEngine.SpriteMaskModule.dll - UnityEngine.SpriteShapeModule.dll - UnityEngine.StreamingModule.dll - UnityEngine.SubstanceModule.dll - UnityEngine.SubsystemsModule.dll - UnityEngine.TerrainModule.dll - UnityEngine.TerrainPhysicsModule.dll - UnityEngine.TextCoreFontEngineModule.dll - UnityEngine.TextCoreTextEngineModule.dll - UnityEngine.TextRenderingModule.dll - UnityEngine.TilemapModule.dll - UnityEngine.TLSModule.dll - UnityEngine.UI.dll - UnityEngine.UIElementsModule.dll - UnityEngine.UIModule.dll - UnityEngine.UmbraModule.dll - UnityEngine.UnityAnalyticsCommonModule.dll - UnityEngine.UnityAnalyticsModule.dll - UnityEngine.UnityConnectModule.dll - UnityEngine.UnityCurlModule.dll - UnityEngine.UnityTestProtocolModule.dll - UnityEngine.UnityWebRequestAssetBundleModule.dll - UnityEngine.UnityWebRequestAudioModule.dll - UnityEngine.UnityWebRequestModule.dll - UnityEngine.UnityWebRequestTextureModule.dll - UnityEngine.UnityWebRequestWWWModule.dll - UnityEngine.VehiclesModule.dll - UnityEngine.VFXModule.dll - UnityEngine.VideoModule.dll - UnityEngine.VirtualTexturingModule.dll - UnityEngine.VRModule.dll - UnityEngine.WindModule.dll - UnityEngine.XRModule.dll -/lib.harmony/2.3.6/lib/net472/0Harmony.dll -obj/Debug/PublicizedAssemblies/Assembly-CSharp.A10E035FF82E26E834AB73B28F90DC5D/Assembly-CSharp.dll - -[analyzerConfigFiles] -../.editorconfig -obj/Debug/Enlist.GeneratedMSBuildEditorConfig.editorconfig diff --git a/Source/Enlist/Enlist.sln b/Source/Enlist/Enlist.sln deleted file mode 100644 index e525790..0000000 --- a/Source/Enlist/Enlist.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.14.36109.1 d17.14 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Enlist", "Enlist.csproj", "{70F552C7-DEA4-4805-9647-F554F0D814ED}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {70F552C7-DEA4-4805-9647-F554F0D814ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {70F552C7-DEA4-4805-9647-F554F0D814ED}.Debug|Any CPU.Build.0 = Debug|Any CPU - {70F552C7-DEA4-4805-9647-F554F0D814ED}.Release|Any CPU.ActiveCfg = Release|Any CPU - {70F552C7-DEA4-4805-9647-F554F0D814ED}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {978E4279-696D-4571-A609-939327461E7A} - EndGlobalSection -EndGlobal diff --git a/Source/FCPTools/FalloutCore/Characters/Definitions/CharacterRobotNameDefinition.cs b/Source/FCPTools/FalloutCore/Characters/Definitions/CharacterRobotNameDefinition.cs new file mode 100644 index 0000000..ebaa77a --- /dev/null +++ b/Source/FCPTools/FalloutCore/Characters/Definitions/CharacterRobotNameDefinition.cs @@ -0,0 +1,15 @@ +namespace FCP.Core; + +[UsedImplicitly] +public class CharacterRobotNameDefinition : CharacterBaseDefinition +{ + public string name; + + public override bool AppliesPreGeneration => false; + public override bool AppliesPostGeneration => !name.NullOrEmpty(); + + public override void ApplyToPawn(Pawn pawn) + { + pawn.Name = new NameSingle(name); + } +} diff --git a/Source/FCPTools/FalloutCore/Characters/Patch_CharacterDescriptionFlavor.cs b/Source/FCPTools/FalloutCore/Characters/Patch_CharacterDescriptionFlavor.cs new file mode 100644 index 0000000..8042abe --- /dev/null +++ b/Source/FCPTools/FalloutCore/Characters/Patch_CharacterDescriptionFlavor.cs @@ -0,0 +1,20 @@ +using HarmonyLib; +using Verse; + +namespace FCP.Core +{ + [HarmonyPatch(typeof(Pawn), nameof(Pawn.DescriptionFlavor), MethodType.Getter)] + public static class Patch_CharacterDescriptionFlavor + { + public static void Postfix(Pawn __instance, ref string __result) + { + UniqueCharactersTracker tracker = UniqueCharactersTracker.Instance; + if (tracker != null + && tracker.TryGetPawnCharacter(__instance, out UniqueCharacter character) + && !character.def.description.NullOrEmpty()) + { + __result = character.def.description; + } + } + } +} diff --git a/Source/FCPTools/FalloutCore/Defs/FCPDefOf.cs b/Source/FCPTools/FalloutCore/Defs/FCPDefOf.cs index 68b1d16..75a6503 100644 --- a/Source/FCPTools/FalloutCore/Defs/FCPDefOf.cs +++ b/Source/FCPTools/FalloutCore/Defs/FCPDefOf.cs @@ -17,6 +17,9 @@ public class FCPDefOf public static PawnGroupKindDef FCP_PawnGroupKind_TaxCollector; public static LetterDef FCP_Letter_AcceptStoryteller; + + [MayRequire("Rick.FCP.Robotics")] + public static LetterDef FCP_Letter_AcceptRobotJoin; public static JobDef FCP_AICastAbilityAtTarget; public static JobDef FCP_VATS_AttackHybrid; diff --git a/Source/Enlist/AbilityTrainingSession.cs b/Source/FCPTools/FalloutCore/Enlist/AbilityTrainingSession.cs similarity index 100% rename from Source/Enlist/AbilityTrainingSession.cs rename to Source/FCPTools/FalloutCore/Enlist/AbilityTrainingSession.cs diff --git a/Source/Enlist/CaravanOptions.cs b/Source/FCPTools/FalloutCore/Enlist/CaravanOptions.cs similarity index 100% rename from Source/Enlist/CaravanOptions.cs rename to Source/FCPTools/FalloutCore/Enlist/CaravanOptions.cs diff --git a/Source/Enlist/DeliveryQuest.cs b/Source/FCPTools/FalloutCore/Enlist/DeliveryQuest.cs similarity index 100% rename from Source/Enlist/DeliveryQuest.cs rename to Source/FCPTools/FalloutCore/Enlist/DeliveryQuest.cs diff --git a/Source/Enlist/Dialog_Missions.cs b/Source/FCPTools/FalloutCore/Enlist/Dialog_Missions.cs similarity index 99% rename from Source/Enlist/Dialog_Missions.cs rename to Source/FCPTools/FalloutCore/Enlist/Dialog_Missions.cs index 5cebb62..192e917 100644 --- a/Source/Enlist/Dialog_Missions.cs +++ b/Source/FCPTools/FalloutCore/Enlist/Dialog_Missions.cs @@ -11,7 +11,7 @@ namespace FCP.Enlist; public class Dialog_Missions : Dialog_NodeTree { - public override float Margin => 0f; + protected override float Margin => 0f; public override Vector2 InitialSize => new Vector2(620f, Mathf.Min(480, UI.screenHeight)); private DiaOption cancelOption; diff --git a/Source/Enlist/Dialog_ResignConfirmation.cs b/Source/FCPTools/FalloutCore/Enlist/Dialog_ResignConfirmation.cs similarity index 98% rename from Source/Enlist/Dialog_ResignConfirmation.cs rename to Source/FCPTools/FalloutCore/Enlist/Dialog_ResignConfirmation.cs index db06d3f..9d89be1 100644 --- a/Source/Enlist/Dialog_ResignConfirmation.cs +++ b/Source/FCPTools/FalloutCore/Enlist/Dialog_ResignConfirmation.cs @@ -16,7 +16,7 @@ namespace FCP.Enlist; public class Dialog_ResignConfirmation : Dialog_NodeTree { - public override float Margin => 0f; + protected override float Margin => 0f; public override Vector2 InitialSize => new Vector2(620f, Mathf.Min(480, UI.screenHeight)); private DiaOption xOption; diff --git a/Source/Enlist/EnlistMod.cs b/Source/FCPTools/FalloutCore/Enlist/EnlistMod.cs similarity index 82% rename from Source/Enlist/EnlistMod.cs rename to Source/FCPTools/FalloutCore/Enlist/EnlistMod.cs index 8cc382e..ed25d23 100644 --- a/Source/Enlist/EnlistMod.cs +++ b/Source/FCPTools/FalloutCore/Enlist/EnlistMod.cs @@ -1,5 +1,4 @@ -using HarmonyLib; -using System; +using System; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -14,7 +13,6 @@ class EnlistMod : Mod public EnlistMod(ModContentPack pack) : base(pack) { settings = GetSettings(); - new Harmony("ChickenPlucker.Enlist").PatchAll(); } public override void WriteSettings() diff --git a/Source/Enlist/EnlistSettings.cs b/Source/FCPTools/FalloutCore/Enlist/EnlistSettings.cs similarity index 100% rename from Source/Enlist/EnlistSettings.cs rename to Source/FCPTools/FalloutCore/Enlist/EnlistSettings.cs diff --git a/Source/Enlist/EnlistUtils.cs b/Source/FCPTools/FalloutCore/Enlist/EnlistUtils.cs similarity index 100% rename from Source/Enlist/EnlistUtils.cs rename to Source/FCPTools/FalloutCore/Enlist/EnlistUtils.cs diff --git a/Source/Enlist/ExclusiveTrader.cs b/Source/FCPTools/FalloutCore/Enlist/ExclusiveTrader.cs similarity index 100% rename from Source/Enlist/ExclusiveTrader.cs rename to Source/FCPTools/FalloutCore/Enlist/ExclusiveTrader.cs diff --git a/Source/Enlist/FactionEnlistOptions.cs b/Source/FCPTools/FalloutCore/Enlist/FactionEnlistOptions.cs similarity index 100% rename from Source/Enlist/FactionEnlistOptions.cs rename to Source/FCPTools/FalloutCore/Enlist/FactionEnlistOptions.cs diff --git a/Source/Enlist/FactionEnlistOptionsDef.cs b/Source/FCPTools/FalloutCore/Enlist/FactionEnlistOptionsDef.cs similarity index 100% rename from Source/Enlist/FactionEnlistOptionsDef.cs rename to Source/FCPTools/FalloutCore/Enlist/FactionEnlistOptionsDef.cs diff --git a/Source/Enlist/FactionEnlistWorker.cs b/Source/FCPTools/FalloutCore/Enlist/FactionEnlistWorker.cs similarity index 95% rename from Source/Enlist/FactionEnlistWorker.cs rename to Source/FCPTools/FalloutCore/Enlist/FactionEnlistWorker.cs index 809a51e..4436997 100644 --- a/Source/Enlist/FactionEnlistWorker.cs +++ b/Source/FCPTools/FalloutCore/Enlist/FactionEnlistWorker.cs @@ -1,4 +1,5 @@ -using RimWorld; +using HarmonyLib; +using RimWorld; using RimWorld.Planet; using System.Collections.Generic; using UnityEngine; @@ -94,7 +95,8 @@ public class FactionEnlistWorker } var savedRelationships = new List(); - foreach (var rel in toBuy.relations) + var toBuyRelations = Traverse.Create(toBuy).Field("relations").GetValue>(); + foreach (var rel in toBuyRelations) { savedRelationships.Add(new FactionRelation { diff --git a/Source/Enlist/FactionOptions.cs b/Source/FCPTools/FalloutCore/Enlist/FactionOptions.cs similarity index 100% rename from Source/Enlist/FactionOptions.cs rename to Source/FCPTools/FalloutCore/Enlist/FactionOptions.cs diff --git a/Source/Enlist/FactionState.cs b/Source/FCPTools/FalloutCore/Enlist/FactionState.cs similarity index 100% rename from Source/Enlist/FactionState.cs rename to Source/FCPTools/FalloutCore/Enlist/FactionState.cs diff --git a/Source/Enlist/FactionStorage.cs b/Source/FCPTools/FalloutCore/Enlist/FactionStorage.cs similarity index 99% rename from Source/Enlist/FactionStorage.cs rename to Source/FCPTools/FalloutCore/Enlist/FactionStorage.cs index 8b3f03f..b1928fe 100644 --- a/Source/Enlist/FactionStorage.cs +++ b/Source/FCPTools/FalloutCore/Enlist/FactionStorage.cs @@ -13,7 +13,7 @@ namespace FCP.Enlist; public class Dialog_FactionStorage : Dialog_NodeTree { - public override float Margin => 0f; + protected override float Margin => 0f; public override Vector2 InitialSize => new Vector2(620f, Mathf.Min(480, UI.screenHeight)); private DiaOption xOption; diff --git a/Source/Enlist/GUIHelper.cs b/Source/FCPTools/FalloutCore/Enlist/GUIHelper.cs similarity index 63% rename from Source/Enlist/GUIHelper.cs rename to Source/FCPTools/FalloutCore/Enlist/GUIHelper.cs index 20d2316..002f678 100644 --- a/Source/Enlist/GUIHelper.cs +++ b/Source/FCPTools/FalloutCore/Enlist/GUIHelper.cs @@ -1,7 +1,9 @@ -using RimWorld; +using HarmonyLib; +using RimWorld; using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; using UnityEngine; using Verse; using Verse.Sound; @@ -11,13 +13,23 @@ namespace FCP.Enlist; public static class GUIHelper { + private static readonly FieldInfo diaOptionTextField = AccessTools.Field(typeof(DiaOption), "text"); + private static readonly FieldInfo diaOptionDisabledColorField = AccessTools.Field(typeof(DiaOption), "DisabledOptionColor"); + private static readonly MethodInfo diaOptionActivateMethod = AccessTools.Method(typeof(DiaOption), "Activate"); + private static readonly FieldInfo buttonBGAtlasMouseoverField = AccessTools.Field(typeof(Widgets), "ButtonBGAtlasMouseover"); + private static readonly FieldInfo dropdownPaintingField = AccessTools.Field(typeof(Widgets), "dropdownPainting"); + private static readonly FieldInfo dropdownPaintingPayloadField = AccessTools.Field(typeof(Widgets), "dropdownPainting_Payload"); + private static readonly FieldInfo dropdownPaintingTypeField = AccessTools.Field(typeof(Widgets), "dropdownPainting_Type"); + private static readonly FieldInfo dropdownPaintingTextField = AccessTools.Field(typeof(Widgets), "dropdownPainting_Text"); + private static readonly FieldInfo dropdownPaintingIconField = AccessTools.Field(typeof(Widgets), "dropdownPainting_Icon"); + public static float OptOnGUI(DiaOption option, Rect rect, bool active = true) { Color textColor = Widgets.NormalOptionColor; - string text = option.text; + string text = (string)diaOptionTextField.GetValue(option); if (option.disabled) { - textColor = option.DisabledOptionColor; + textColor = (Color)diaOptionDisabledColorField.GetValue(option); if (option.disabledReason != null) { text = text + " (" + option.disabledReason + ")"; @@ -30,7 +42,7 @@ public static class GUIHelper } else if (ButtonTextWorker(rect, text, drawBackground: false, !option.disabled, textColor, active && !option.disabled, false) == DraggableResult.Pressed) { - option.Activate(); + diaOptionActivateMethod.Invoke(option, null); } return rect.height; } @@ -44,7 +56,7 @@ public static class GUIHelper Texture2D atlas = ButtonBGAtlas; if (Mouse.IsOver(rect)) { - atlas = ButtonBGAtlasMouseover; + atlas = (Texture2D)buttonBGAtlasMouseoverField.GetValue(null); if (Input.GetMouseButton(0)) { atlas = ButtonBGAtlasClick; @@ -119,20 +131,23 @@ public static class GUIHelper } else if (paintable && draggableResult == DraggableResult.Dragged) { - Widgets.dropdownPainting = true; - dropdownPainting_Payload = getPayload(target); - dropdownPainting_Type = typeof(Payload); - dropdownPainting_Text = ((dragLabel != null) ? dragLabel : buttonLabel); - dropdownPainting_Icon = ((dragIcon != null) ? dragIcon : buttonIcon); + dropdownPaintingField.SetValue(null, true); + dropdownPaintingPayloadField.SetValue(null, getPayload(target)); + dropdownPaintingTypeField.SetValue(null, typeof(Payload)); + dropdownPaintingTextField.SetValue(null, (dragLabel != null) ? dragLabel : buttonLabel); + dropdownPaintingIconField.SetValue(null, (dragIcon != null) ? dragIcon : buttonIcon); } else { - if (!paintable || !dropdownPainting || !Mouse.IsOver(rect) || !(dropdownPainting_Type == typeof(Payload))) + bool isPainting = (bool)dropdownPaintingField.GetValue(null); + Type paintingType = (Type)dropdownPaintingTypeField.GetValue(null); + if (!paintable || !isPainting || !Mouse.IsOver(rect) || paintingType != typeof(Payload)) { return; } + object paintingPayload = dropdownPaintingPayloadField.GetValue(null); FloatMenuOption floatMenuOption = (from opt in menuGenerator(target) - where object.Equals(opt.payload, dropdownPainting_Payload) + where object.Equals(opt.payload, paintingPayload) select opt.option).FirstOrDefault(); if (floatMenuOption != null && !floatMenuOption.Disabled) { diff --git a/Source/Enlist/Harmony_Patches.cs b/Source/FCPTools/FalloutCore/Enlist/Harmony_Patches.cs similarity index 99% rename from Source/Enlist/Harmony_Patches.cs rename to Source/FCPTools/FalloutCore/Enlist/Harmony_Patches.cs index c364c29..97ae149 100644 --- a/Source/Enlist/Harmony_Patches.cs +++ b/Source/FCPTools/FalloutCore/Enlist/Harmony_Patches.cs @@ -135,7 +135,7 @@ public class Pawn_DraftController_GetGizmos_Patch defaultLabel = optionsDef.reinforcementsButtonLabelKey.Translate(enlistedFaction), defaultDesc = optionsDef.reinforcementsButtonDescKey.Translate(enlistedFaction), icon = ContentFinder.Get(optionsDef.reinforcementsButtonIconTexPath), - disabled = !tracker.CanCallReinforcementFrom(enlistedFaction, optionsDef), + Disabled = !tracker.CanCallReinforcementFrom(enlistedFaction, optionsDef), action = delegate { Find.Targeter.BeginTargeting(ForLoc(), delegate (LocalTargetInfo x) diff --git a/Source/Enlist/PawnTrader.cs b/Source/FCPTools/FalloutCore/Enlist/PawnTrader.cs similarity index 97% rename from Source/Enlist/PawnTrader.cs rename to Source/FCPTools/FalloutCore/Enlist/PawnTrader.cs index a1ddb1d..041c342 100644 --- a/Source/Enlist/PawnTrader.cs +++ b/Source/FCPTools/FalloutCore/Enlist/PawnTrader.cs @@ -4,6 +4,7 @@ using RimWorld.Planet; using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; using System.Text; using System.Threading.Tasks; using UnityEngine; @@ -15,6 +16,8 @@ namespace FCP.Enlist; public class PawnTrader : IExposable, ITrader, IThingHolder { + private static readonly MethodInfo pawnTickMethod = AccessTools.Method(typeof(Pawn), "Tick"); + private ThingOwner things; private List soldPrisoners = new List(); @@ -101,7 +104,7 @@ public class PawnTrader : IExposable, ITrader, IThingHolder Pawn pawn = things[num] as Pawn; if (pawn != null) { - pawn.Tick(); + pawnTickMethod.Invoke(pawn, null); if (pawn.Dead) { things.Remove(pawn); diff --git a/Source/Enlist/ProtocolOption.cs b/Source/FCPTools/FalloutCore/Enlist/ProtocolOption.cs similarity index 100% rename from Source/Enlist/ProtocolOption.cs rename to Source/FCPTools/FalloutCore/Enlist/ProtocolOption.cs diff --git a/Source/Enlist/ProvisionsInfo.cs b/Source/FCPTools/FalloutCore/Enlist/ProvisionsInfo.cs similarity index 100% rename from Source/Enlist/ProvisionsInfo.cs rename to Source/FCPTools/FalloutCore/Enlist/ProvisionsInfo.cs diff --git a/Source/Enlist/QuestContainer.cs b/Source/FCPTools/FalloutCore/Enlist/QuestContainer.cs similarity index 100% rename from Source/Enlist/QuestContainer.cs rename to Source/FCPTools/FalloutCore/Enlist/QuestContainer.cs diff --git a/Source/Enlist/QuestsContainer.cs b/Source/FCPTools/FalloutCore/Enlist/QuestsContainer.cs similarity index 100% rename from Source/Enlist/QuestsContainer.cs rename to Source/FCPTools/FalloutCore/Enlist/QuestsContainer.cs diff --git a/Source/Enlist/SalaryInfo.cs b/Source/FCPTools/FalloutCore/Enlist/SalaryInfo.cs similarity index 100% rename from Source/Enlist/SalaryInfo.cs rename to Source/FCPTools/FalloutCore/Enlist/SalaryInfo.cs diff --git a/Source/Enlist/StatPart_CaravanImmunityGain.cs b/Source/FCPTools/FalloutCore/Enlist/StatPart_CaravanImmunityGain.cs similarity index 94% rename from Source/Enlist/StatPart_CaravanImmunityGain.cs rename to Source/FCPTools/FalloutCore/Enlist/StatPart_CaravanImmunityGain.cs index 65a5c13..3eb95ec 100644 --- a/Source/Enlist/StatPart_CaravanImmunityGain.cs +++ b/Source/FCPTools/FalloutCore/Enlist/StatPart_CaravanImmunityGain.cs @@ -11,7 +11,7 @@ public class StatPart_CaravanImmunityGain : StatPart if (req.Thing is Pawn pawn) { var caravan = pawn.GetCaravan(); - if (caravan != null && !caravan.pather.moving && !caravan.NightResting) + if (caravan != null && !caravan.pather.Moving && !caravan.NightResting) { var settlement = Find.WorldObjects.SettlementAt(caravan.Tile); if (settlement != null) @@ -38,7 +38,7 @@ public class StatPart_CaravanImmunityGain : StatPart if (req.Thing is Pawn pawn) { var caravan = pawn.GetCaravan(); - if (caravan != null && !caravan.pather.moving && !caravan.NightResting) + if (caravan != null && !caravan.pather.Moving && !caravan.NightResting) { var settlement = Find.WorldObjects.SettlementAt(caravan.Tile); if (settlement != null) diff --git a/Source/Enlist/StockGenerator_Pawns.cs b/Source/FCPTools/FalloutCore/Enlist/StockGenerator_Pawns.cs similarity index 100% rename from Source/Enlist/StockGenerator_Pawns.cs rename to Source/FCPTools/FalloutCore/Enlist/StockGenerator_Pawns.cs diff --git a/Source/Enlist/Window_Password.cs b/Source/FCPTools/FalloutCore/Enlist/Window_Password.cs similarity index 100% rename from Source/Enlist/Window_Password.cs rename to Source/FCPTools/FalloutCore/Enlist/Window_Password.cs diff --git a/Source/Enlist/WorldEnlistTracker.cs b/Source/FCPTools/FalloutCore/Enlist/WorldEnlistTracker.cs similarity index 99% rename from Source/Enlist/WorldEnlistTracker.cs rename to Source/FCPTools/FalloutCore/Enlist/WorldEnlistTracker.cs index b6d2cce..856a5ad 100644 --- a/Source/Enlist/WorldEnlistTracker.cs +++ b/Source/FCPTools/FalloutCore/Enlist/WorldEnlistTracker.cs @@ -182,7 +182,7 @@ public class WorldEnlistTracker : WorldComponent FactionEnlistOptions extension = comp.parent.Faction?.def?.GetModExtension(); if (extension is null) { - worldObject.comps.Remove(comp); + worldObject.AllComps.Remove(comp); } } } diff --git a/Source/Enlist/WorldObjectCompEnlist.cs b/Source/FCPTools/FalloutCore/Enlist/WorldObjectCompEnlist.cs similarity index 98% rename from Source/Enlist/WorldObjectCompEnlist.cs rename to Source/FCPTools/FalloutCore/Enlist/WorldObjectCompEnlist.cs index 4bba08c..1ec4a28 100644 --- a/Source/Enlist/WorldObjectCompEnlist.cs +++ b/Source/FCPTools/FalloutCore/Enlist/WorldObjectCompEnlist.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Text; using UnityEngine; using Verse; +using HarmonyLib; using FCP.Core.Shuttles; namespace FCP.Enlist; @@ -85,7 +86,7 @@ public class WorldObjectCompEnlist : WorldObjectComp CaravanOptions caravanOptions = GetCaravanOptions(caravan); if (caravanOptions.curWorkOption != null) { - if (caravan.pather.moving || caravan.Destroyed || caravan.Tile != parent.Tile) + if (caravan.pather.Moving || caravan.Destroyed || caravan.Tile != parent.Tile) { caravanOptions.Reset(); } @@ -149,7 +150,7 @@ public class WorldObjectCompEnlist : WorldObjectComp if (pawn.needs?.joy != null) { pawn.needs.joy.CurLevel += optionDef.recreationGainPerTick; - pawn.needs.joy.lastGainTick = Find.TickManager.TicksGame; + Traverse.Create(pawn.needs.joy).Field("lastGainTick").SetValue(Find.TickManager.TicksGame); } } if (optionDef.autoFeedIsEnabled && caravanOpts.autoFeedEnabled && Find.TickManager.TicksGame % GenDate.TicksPerHour == 0) @@ -313,7 +314,7 @@ public class WorldObjectCompEnlist : WorldObjectComp { optionDef.Worker.Buy(faction, caravan); }, - order = order + Order = order }; if (!optionDef.Worker.CanBuy(faction, caravan, out string cannotBuyReason)) { @@ -334,7 +335,7 @@ public class WorldObjectCompEnlist : WorldObjectComp { optionDef.Worker.EnlistTo(faction); }, - order = order + Order = order }; if (!worldTracker.CanEnlist(faction, optionDef, out string cannotEnlistReason)) { @@ -369,7 +370,7 @@ public class WorldObjectCompEnlist : WorldObjectComp Pawn bestNegotiator = BestCaravanPawnUtility.FindBestNegotiator(caravan, faction, optionDef.bountyHunterTraderKind); Find.WindowStack.Add(new Dialog_Trade(bestNegotiator, bountyTrader)); }, - order = order + Order = order }; yield return command_Bounty; order++; @@ -390,7 +391,7 @@ public class WorldObjectCompEnlist : WorldObjectComp Dialog_Missions missionWindow = new Dialog_Missions(dianode, false, caravan, this, ContentFinder.Get(optionDef.missionsBackgroundMenuTexPath), optionDef); Find.WindowStack.Add(missionWindow); }, - order = order + Order = order }; yield return command_Mission; order++; @@ -407,7 +408,7 @@ public class WorldObjectCompEnlist : WorldObjectComp { worldTracker.factionOptionsContainer[faction].factionsSalaries[optionDef].GiveMoney(optionDef, caravan, faction); }, - order = order + Order = order }; if (!worldTracker.factionOptionsContainer[faction].factionsSalaries.TryGetValue(optionDef, out SalaryInfo salaryInfo) || !salaryInfo.CanPayMoney(optionDef)) { @@ -452,7 +453,7 @@ public class WorldObjectCompEnlist : WorldObjectComp Pawn bestNegotiator = BestCaravanPawnUtility.FindBestNegotiator(caravan, faction, optionDef.exclusiveTraderKind); Find.WindowStack.Add(new Dialog_Trade(bestNegotiator, exTrader)); }, - order = order + Order = order }; bool meetsGoodwill = faction.GoodwillWith(Faction.OfPlayer) >= optionDef.exclusiveTraderRequiredGoodwill; bool meetsTitle = optionDef.exclusiveTraderRequiredTitle == null || @@ -494,7 +495,7 @@ public class WorldObjectCompEnlist : WorldObjectComp Pawn bestNegotiator = BestCaravanPawnUtility.FindBestNegotiator(caravan, faction, optionDef.taxCollectorTraderKind); Find.WindowStack.Add(new Dialog_Trade(bestNegotiator, tcTrader)); }, - order = order + Order = order }; yield return command_TaxCollector; order++; @@ -513,7 +514,7 @@ public class WorldObjectCompEnlist : WorldObjectComp Dialog_FactionStorage storageWindow = new Dialog_FactionStorage(dianode, false, caravan, worldTracker.factionOptionsContainer[faction].factionsStorages[optionDef]); Find.WindowStack.Add(storageWindow); }, - order = order + Order = order }; yield return command_Storage; order++; @@ -555,7 +556,7 @@ public class WorldObjectCompEnlist : WorldObjectComp } if (pawn.Downed) { - pawn.health.MakeUndowned(null); + Traverse.Create(pawn.health).Method("MakeUndowned", new Type[] { typeof(Hediff) }, new object[] { null }).GetValue(); } pawn.health.hediffSet.DirtyCache(); } @@ -566,7 +567,7 @@ public class WorldObjectCompEnlist : WorldObjectComp { command_MechSerum.Disable(optionDef.mechSerumCostRequirementKey.Translate()); } - command_MechSerum.order = order; + command_MechSerum.Order = order; yield return command_MechSerum; order++; } @@ -599,7 +600,7 @@ public class WorldObjectCompEnlist : WorldObjectComp defaultLabel = workOption.workLabelKey.Translate(faction.Named("FACTION")), defaultDesc = workOption.workDescKey.Translate(faction.Named("FACTION")), icon = ContentFinder.Get(workOption.workButtonIconTexPath), - order = order + Order = order }; yield return command_Training; order++; @@ -619,7 +620,7 @@ public class WorldObjectCompEnlist : WorldObjectComp defaultLabel = optionDef.autoFeedLabelKey.Translate(faction.Named("FACTION")), defaultDesc = optionDef.autoFeedDescKey.Translate(faction.Named("FACTION")), icon = ContentFinder.Get(optionDef.autoFeedButtonIconTexPath), - order = order + Order = order }; yield return command_AutoFeed; order++; @@ -649,7 +650,7 @@ public class WorldObjectCompEnlist : WorldObjectComp Pawn bestPlayerNegotiator = BestCaravanPawnUtility.FindBestNegotiator(caravan, faction, optionDef.turnInTraderKind); Find.WindowStack.Add(new Dialog_Trade(bestPlayerNegotiator, pawnTrader)); }, - order = order + Order = order }; yield return command_TurnIn; order++; @@ -674,7 +675,7 @@ public class WorldObjectCompEnlist : WorldObjectComp command_DropPodService.Disable(optionDef.dropPodServiceCostRequirementKey.Translate()); } - command_DropPodService.order = order; + command_DropPodService.Order = order; yield return command_DropPodService; order++; } @@ -698,7 +699,7 @@ public class WorldObjectCompEnlist : WorldObjectComp command_ShuttleService.Disable(optionDef.shuttleServiceCostRequirementKey.Translate()); } - command_ShuttleService.order = order; + command_ShuttleService.Order = order; yield return command_ShuttleService; order++; } @@ -722,7 +723,7 @@ public class WorldObjectCompEnlist : WorldObjectComp { promotedByOptions[optionDef] = true; }, - order = order + Order = order }; if (optionDef.promoteSkillRequirements.NullOrEmpty() is false && caravan.PawnsListForReading .Where(x => x.IsColonist && EnlistUtils.PawnSatisfiesSkillRequirements(x, optionDef.promoteSkillRequirements)).Any() is false) @@ -757,7 +758,7 @@ public class WorldObjectCompEnlist : WorldObjectComp var dict = optionDef.protocolOptions.ToDictionary(x => x.protocolHashKey, x => x.action); Find.WindowStack.Add(new Window_Password(dict, optionDef.protocolEnterText, optionDef.protocolInvalidWarning)); }, - order = order + Order = order }; order++; } @@ -816,7 +817,7 @@ public class WorldObjectCompEnlist : WorldObjectComp } Find.WindowStack.Add(new FloatMenu(trainingOptions)); }, - order = order + Order = order }; if (activeTrainingSessions.ContainsKey(optionDef)) { @@ -871,7 +872,7 @@ public class WorldObjectCompEnlist : WorldObjectComp } Find.WindowStack.Add(new FloatMenu(questOptions)); }, - order = order + Order = order }; yield return command_DeliveryBoard; order++; @@ -897,7 +898,7 @@ public class WorldObjectCompEnlist : WorldObjectComp localTurnIn.TurnIn(caravan, optionDef); activeList.quests.Remove(localTurnIn); }, - order = order + Order = order }; if (!localTurnIn.CaravanCanTurnIn(caravan)) { @@ -922,7 +923,7 @@ public class WorldObjectCompEnlist : WorldObjectComp Dialog_ResignConfirmation resignWindow = new Dialog_ResignConfirmation(dianode, false, this, optionDef); Find.WindowStack.Add(resignWindow); }, - order = order + Order = order }; yield return command_Resign; } @@ -993,7 +994,7 @@ public class WorldObjectCompEnlist : WorldObjectComp { provisionInfo.GiveProvisions(provisionOption, caravan); }, - order = order + Order = order }; if (!provisionInfo.CanGiveProvisions(provisionOption)) { @@ -1104,7 +1105,7 @@ public class WorldObjectCompEnlist : WorldObjectComp { if (pawn.IsColonist && pawn.inventory != null) { - pawn.inventory.unloadEverything = true; + pawn.inventory.UnloadEverything = true; } } ExtractMoneyFromCaravan(caravan, curFactionEnlistOptionsDef.dropPodServiceCost, curFactionEnlistOptionsDef); @@ -1124,7 +1125,7 @@ public class WorldObjectCompEnlist : WorldObjectComp TravellingTransporters.destinationTile = destinationTile; TravellingTransporters.arrivalAction = arrivalAction; Find.WorldObjects.Add(TravellingTransporters); - TravellingTransporters.AddTransporter(ActiveTransporter.contents, true); + TravellingTransporters.AddTransporter(ActiveTransporter.Contents, true); caravan.Destroy(); } } @@ -1156,7 +1157,7 @@ public class WorldObjectCompEnlist : WorldObjectComp { if (pawn.IsColonist && pawn.inventory != null) { - pawn.inventory.unloadEverything = true; + pawn.inventory.UnloadEverything = true; } } ExtractMoneyFromCaravan(caravan, curFactionEnlistOptionsDef.shuttleServiceCost, curFactionEnlistOptionsDef); diff --git a/Source/FCPTools/FalloutCore/Factions/Extensions/BiomeRestrictedRaidExtension.cs b/Source/FCPTools/FalloutCore/Factions/Extensions/BiomeRestrictedRaidExtension.cs new file mode 100644 index 0000000..29b17e2 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Factions/Extensions/BiomeRestrictedRaidExtension.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; +using Verse; + +namespace FCP.Factions; + +public class BiomeRestrictedRaidExtension : DefModExtension +{ + public List allowedBiomes; + public string targetFaction; +} diff --git a/Source/FCPTools/FalloutCore/Factions/Harmony/TileFinder_RandomSettlementTileFor_Patch.cs b/Source/FCPTools/FalloutCore/Factions/Harmony/TileFinder_RandomSettlementTileFor_Patch.cs index 45b5262..88b0d83 100644 --- a/Source/FCPTools/FalloutCore/Factions/Harmony/TileFinder_RandomSettlementTileFor_Patch.cs +++ b/Source/FCPTools/FalloutCore/Factions/Harmony/TileFinder_RandomSettlementTileFor_Patch.cs @@ -23,8 +23,10 @@ public static class TileFinder_RandomSettlementTileFor_Patch Active = true; try { - __result = TileFinder.RandomSettlementTileFor(faction, mustBeAutoChoosable, - SpawnConfigHelper.MakePredicate(ext, hasBiomeFilter, anchors)); + Predicate predicate = SpawnConfigHelper.MakePredicate(ext, hasBiomeFilter, anchors); + __result = SpawnConfigHelper.AnyValidTile(Find.WorldGrid.Surface, predicate) + ? TileFinder.RandomSettlementTileFor(faction, mustBeAutoChoosable, predicate) + : TileFinder.RandomSettlementTileFor(faction, mustBeAutoChoosable); } finally { @@ -48,8 +50,10 @@ public static class TileFinder_RandomSettlementTileFor_LayerPatch TileFinder_RandomSettlementTileFor_Patch.Active = true; try { - __result = TileFinder.RandomSettlementTileFor(layer, faction, mustBeAutoChoosable, - SpawnConfigHelper.MakePredicate(ext, hasBiomeFilter, anchors)); + Predicate predicate = SpawnConfigHelper.MakePredicate(ext, hasBiomeFilter, anchors); + __result = SpawnConfigHelper.AnyValidTile(layer, predicate) + ? TileFinder.RandomSettlementTileFor(layer, faction, mustBeAutoChoosable, predicate) + : TileFinder.RandomSettlementTileFor(layer, faction, mustBeAutoChoosable); } finally { @@ -110,4 +114,19 @@ internal static class SpawnConfigHelper return true; }; } + + // Cheap existence check so we never invoke vanilla's real search (and its internal error log) + // against a predicate that can't possibly be satisfied anywhere on the map. + internal static bool AnyValidTile(PlanetLayer layer, Predicate predicate) + { + for (int i = 0; i < layer.TilesCount; i++) + { + Tile tile = layer[i]; + if (!tile.PrimaryBiome.canBuildBase || !tile.PrimaryBiome.implemented || tile.hilliness == Hilliness.Impassable) + continue; + if (predicate(tile.tile)) + return true; + } + return false; + } } diff --git a/Source/FCPTools/FalloutCore/Factions/Incidents/IncidentWorker_BiomeRestrictedFactionRaid.cs b/Source/FCPTools/FalloutCore/Factions/Incidents/IncidentWorker_BiomeRestrictedFactionRaid.cs new file mode 100644 index 0000000..0954d65 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Factions/Incidents/IncidentWorker_BiomeRestrictedFactionRaid.cs @@ -0,0 +1,31 @@ +using System.Linq; +using RimWorld; +using Verse; + +namespace FCP.Factions; + +public class IncidentWorker_BiomeRestrictedFactionRaid : IncidentWorker_RaidEnemy +{ + private BiomeRestrictedRaidExtension Extension => def.GetModExtension(); + + protected override bool CanFireNowSub(IncidentParms parms) + { + if (Extension?.allowedBiomes == null || Extension.targetFaction == null) + return false; + + if (parms.target is not Map map || !Extension.allowedBiomes.Contains(map.Biome.defName)) + return false; + + FactionDef factionDef = DefDatabase.GetNamed(Extension.targetFaction, false); + if (factionDef == null) + return false; + + Faction faction = Find.FactionManager.AllFactionsListForReading + .FirstOrDefault(f => f.def == factionDef && !f.defeated); + if (faction == null) + return false; + + parms.faction = faction; + return base.CanFireNowSub(parms); + } +} diff --git a/Source/FCPTools/FalloutCore/Ghouls/AI/MentalState_Feral.cs b/Source/FCPTools/FalloutCore/Ghouls/AI/MentalState_Feral.cs index a5fa9b3..370fb96 100644 --- a/Source/FCPTools/FalloutCore/Ghouls/AI/MentalState_Feral.cs +++ b/Source/FCPTools/FalloutCore/Ghouls/AI/MentalState_Feral.cs @@ -14,14 +14,17 @@ public class MentalState_Feral : MentalState_Berserk public override bool ForceHostileTo(Thing t) { + if (t.def.HasModExtension()) + return false; + if (t.def.race?.Humanlike != true || t.def.race.IsMechanoid || t.def.race.IsAnomalyEntity) return true; - + Pawn p = t as Pawn; - + if (p?.genes?.Xenotype?.HasModExtension() == true) return false; - + return base.ForceHostileTo(t); } diff --git a/Source/FCPTools/FalloutCore/Ghouls/Genes/Gene_GhoulBody.cs b/Source/FCPTools/FalloutCore/Ghouls/Genes/Gene_GhoulBody.cs index 5355872..23da4ac 100644 --- a/Source/FCPTools/FalloutCore/Ghouls/Genes/Gene_GhoulBody.cs +++ b/Source/FCPTools/FalloutCore/Ghouls/Genes/Gene_GhoulBody.cs @@ -22,8 +22,8 @@ public class Gene_GhoulBody : Gene public Graphic GetBodyOverlay(Pawn pawn) { - string bodyType = pawn.story.bodyType.defName; - Color skinColor = pawn.story.SkinColor; + string bodyType = (pawn.story?.bodyType ?? BodyTypeDefOf.Male).defName; + Color skinColor = pawn.story?.SkinColor ?? Color.white; if (cachedGraphic != null && cachedBodyType == bodyType && cachedSkinColor == skinColor) return cachedGraphic; diff --git a/Source/FCPTools/FalloutCore/Gooification/Pawn_Kill_Patch.cs b/Source/FCPTools/FalloutCore/Gooification/Pawn_Kill_Patch.cs index ab87087..f670980 100644 --- a/Source/FCPTools/FalloutCore/Gooification/Pawn_Kill_Patch.cs +++ b/Source/FCPTools/FalloutCore/Gooification/Pawn_Kill_Patch.cs @@ -2,10 +2,17 @@ using HarmonyLib; namespace FCP.Core; +public class GooificationState +{ + public List Drops; + public IntVec3 Position; + public Map Map; +} + [HarmonyPatch(typeof(Pawn), "Kill")] public static class Pawn_Kill_Patch { - public static void Prefix(Pawn __instance, DamageInfo? dinfo, Hediff exactCulprit, out List __state) + public static void Prefix(Pawn __instance, DamageInfo? dinfo, Hediff exactCulprit, out GooificationState __state) { __state = null; if (dinfo.HasValue is false && DamageWithFilth.curDinfo.TryGetValue(__instance, out var oldDinfo)) @@ -18,29 +25,31 @@ public static class Pawn_Kill_Patch if (weapon != null) { var extension = weapon.GetModExtension(); - if (extension != null && dinfo.Value.Def?.Worker is DamageWithFilth damage + if (extension != null && dinfo.Value.Def?.Worker is DamageWithFilth damage && Rand.Chance(extension.effectChance)) { - __state = new List(); var pawn = __instance; Thing thing = ThingMaker.MakeThing(ThingDef.Named(damage.FilthToSpawn)); GenSpawn.Spawn(thing, pawn.Position, pawn.Map, WipeMode.Vanish); - IntVec3 pos = pawn.PositionHeld; - __state.AddRange(pawn.equipment?.AllEquipmentListForReading ?? new List()); - __state.AddRange(pawn.apparel?.WornApparel ?? new List()); - __state.AddRange(pawn.inventory?.innerContainer.ToList() ?? new List()); + __state = new GooificationState + { + Position = pawn.PositionHeld, + Map = pawn.MapHeld, + Drops = new List() + }; + __state.Drops.AddRange(pawn.equipment?.AllEquipmentListForReading ?? new List()); + __state.Drops.AddRange(pawn.apparel?.WornApparel ?? new List()); + __state.Drops.AddRange(pawn.inventory?.innerContainer.ToList() ?? new List()); } } } } - public static void Postfix(Pawn __instance, List __state) + public static void Postfix(Pawn __instance, GooificationState __state) { - if (__state != null) + if (__state != null && __state.Map != null) { - var pos = __instance.Corpse.Position; - var map = __instance.Corpse.Map; - foreach (var drop in __state) + foreach (var drop in __state.Drops) { drop.holdingOwner?.Remove(drop); if (drop.Spawned) @@ -49,11 +58,11 @@ public static class Pawn_Kill_Patch } var old = drop.def.category; drop.def.category = ThingCategory.Mote; - GenSpawn.Spawn(drop, pos, map); + GenSpawn.Spawn(drop, __state.Position, __state.Map); drop.SetForbidden(true); drop.def.category = old; } - __instance.Corpse.Destroy(); + __instance.Corpse?.Destroy(); } } } diff --git a/Source/FCPTools/FalloutCore/Harmony/Patches.cs b/Source/FCPTools/FalloutCore/Harmony/Patches.cs index 4e7f979..6335271 100644 --- a/Source/FCPTools/FalloutCore/Harmony/Patches.cs +++ b/Source/FCPTools/FalloutCore/Harmony/Patches.cs @@ -559,29 +559,51 @@ public static class Patches #region Forced TraderKindDef for PawnGroupMaker - public static void PawnGroupKindWorker_Trader_GeneratePawns_Prefix(PawnGroupMakerParms parms, PawnGroupMaker groupMaker) + public static bool PawnGroupKindWorker_Trader_GeneratePawns_Prefix(PawnGroupMakerParms parms, PawnGroupMaker groupMaker) { - if (groupMaker is not GroupMakerWithTraderKind groupMakerWithTrader) return; + if (groupMaker is GroupMakerWithCustomTraderChar dedicatedTrader) + { + var tracker = UniqueCharactersTracker.Instance; + return dedicatedTrader.characterDefs.Any(c => !tracker.CharacterPawnDead(c)); + } + + if (groupMaker is not GroupMakerWithTraderKind groupMakerWithTrader) return true; if (groupMakerWithTrader.traderKinds.Empty()) { FCPLog.Warning("A GroupMakerWithTraderKind was defined without any traderKindDefs assigned"); - return; + return true; } - + parms.traderKind = groupMakerWithTrader.traderKinds.RandomElement(); + return true; } #endregion - + #region Custom NPC Traders public static bool PawnGroupKindWorker_Trader_GenerateTrader_Prefix(ref Pawn __result, PawnGroupMakerParms parms, PawnGroupMaker groupMaker, TraderKindDef traderKind) { + if (groupMaker is GroupMakerWithCustomTraderChar dedicatedTrader) + { + var tracker = UniqueCharactersTracker.Instance; + var dedicatedCharacter = dedicatedTrader.characterDefs.FirstOrDefault(c => !tracker.CharacterPawnDead(c) && !tracker.CharacterPawnSpawned(c)); + if (dedicatedCharacter == null) return false; + var dedicatedPawn = tracker.GetOrGenPawn(dedicatedCharacter, null, parms.faction); + dedicatedPawn.mindState.wantsToTradeWithColony = true; + PawnComponentsUtility.AddAndRemoveDynamicComponents(dedicatedPawn, true); + dedicatedPawn.trader.traderKind = dedicatedTrader.traderKind; + parms.points -= dedicatedPawn.kindDef.combatPower; + __result = dedicatedPawn; + return false; + } + if (groupMaker is not GroupMakerWithTraderKind groupMakerWithTrader || groupMakerWithTrader.characterDefs.Empty()) return true; if (!Rand.Chance(groupMakerWithTrader.characterChance)) return true; var list = groupMakerWithTrader.characterDefs.ToList(); var uniqueCharTracker = UniqueCharactersTracker.Instance; Pawn customPawn = null; + CharacterDef chosenCharacter = null; var faction = parms.faction; while (list.Count > 0) { @@ -590,14 +612,15 @@ public static class Patches if (!uniqueCharTracker.CharacterPawnDead(characterCustom) && !uniqueCharTracker.CharacterPawnSpawned(characterCustom)) { customPawn = uniqueCharTracker.GetOrGenPawn(characterCustom, null, faction); + chosenCharacter = characterCustom; break; - } + } list.RemoveAt(index); } if (customPawn == null) return true; customPawn.mindState.wantsToTradeWithColony = true; PawnComponentsUtility.AddAndRemoveDynamicComponents(customPawn, true); - customPawn.trader.traderKind = traderKind; + customPawn.trader.traderKind = groupMakerWithTrader.characterTraderKinds.TryGetValue(chosenCharacter, out var boundTraderKind) ? boundTraderKind : traderKind; parms.points -= customPawn.kindDef.combatPower; // Skip the original method __result = customPawn; diff --git a/Source/FCPTools/FalloutCore/Harmony/WorkGiver_Tame_JobOnThing_Patch.cs b/Source/FCPTools/FalloutCore/Harmony/WorkGiver_Tame_JobOnThing_Patch.cs new file mode 100644 index 0000000..b882257 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Harmony/WorkGiver_Tame_JobOnThing_Patch.cs @@ -0,0 +1,22 @@ +using HarmonyLib; +using RimWorld; +using Verse; +using Verse.AI; + +namespace FCP.Core; + +[HarmonyPatch(typeof(WorkGiver_Tame), "JobOnThing")] +public static class WorkGiver_Tame_JobOnThing_Patch +{ + public static void Postfix(Pawn pawn, Thing t, ref Job __result) + { + if (__result == null) + { + return; + } + if (!t.def.CanUseByXenotype(pawn.genes?.Xenotype)) + { + __result = null; + } + } +} diff --git a/Source/FCPTools/FalloutCore/JobDrivers/JobDriver_AICastAbilityAtTarget.cs b/Source/FCPTools/FalloutCore/JobDrivers/JobDriver_AICastAbilityAtTarget.cs index 804d868..e95464c 100644 --- a/Source/FCPTools/FalloutCore/JobDrivers/JobDriver_AICastAbilityAtTarget.cs +++ b/Source/FCPTools/FalloutCore/JobDrivers/JobDriver_AICastAbilityAtTarget.cs @@ -1,4 +1,5 @@ -using Verse.AI; +using UnityEngine; +using Verse.AI; namespace FCP.Core; @@ -35,7 +36,7 @@ public class JobDriver_AICastAbilityAtTarget : JobDriver initAction = () => { float maxRange = job.ability.verb.verbProps.range; - const float minRange = 4f; + float minRange = Mathf.Min(4f, Mathf.Max(0f, maxRange - 1f)); IntVec3 targetPos = TargetA.Cell; IntVec3 destination = GetValidPositionNearTarget(targetPos, maxRange, minRange); diff --git a/Source/FCPTools/FalloutCore/JobGivers/JobGiver_ReactToDistantThreat.cs b/Source/FCPTools/FalloutCore/JobGivers/JobGiver_ReactToDistantThreat.cs index d62eb27..bf355f1 100644 --- a/Source/FCPTools/FalloutCore/JobGivers/JobGiver_ReactToDistantThreat.cs +++ b/Source/FCPTools/FalloutCore/JobGivers/JobGiver_ReactToDistantThreat.cs @@ -45,7 +45,7 @@ public class JobGiver_ReactToDistantThreat : ThinkNode_JobGiver { return (Pawn)AttackTargetFinder.BestAttackTarget(pawn, TargetScanFlags.NeedThreat | TargetScanFlags.NeedLOSToPawns | TargetScanFlags.NeedAutoTargetable, - thing => thing is Pawn enemyPawn && enemyPawn.HostileTo(pawn), + thing => thing is Pawn enemyPawn && pawn.HostileTo(enemyPawn), minEnemySearchDist, maxEnemySearchDist, pawn.Position, maxTravelRadius, false, false); } diff --git a/Source/FCP_Lasers/HotSwappableAttribute.cs b/Source/FCPTools/FalloutCore/Laser/HotSwappableAttribute.cs similarity index 100% rename from Source/FCP_Lasers/HotSwappableAttribute.cs rename to Source/FCPTools/FalloutCore/Laser/HotSwappableAttribute.cs diff --git a/Source/FCP_Lasers/LaserProjectile.cs b/Source/FCPTools/FalloutCore/Laser/LaserProjectile.cs similarity index 94% rename from Source/FCP_Lasers/LaserProjectile.cs rename to Source/FCPTools/FalloutCore/Laser/LaserProjectile.cs index 1d271a1..ac0a3bd 100644 --- a/Source/FCP_Lasers/LaserProjectile.cs +++ b/Source/FCPTools/FalloutCore/Laser/LaserProjectile.cs @@ -1,6 +1,8 @@ -using RimWorld; +using HarmonyLib; +using RimWorld; using System.Collections.Generic; using System.Linq; +using System.Reflection; using UnityEngine; using Verse; using Verse.Sound; @@ -10,6 +12,8 @@ namespace FCP.Core.Laser [HotSwappable] public class LaserProjectile : Projectile { + private static readonly PropertyInfo arcHeightFactorProp = AccessTools.Property(typeof(Projectile), "ArcHeightFactor"); + public Vector3 originOld; public Vector3 launcherPosOld; public float launcherAngleOld; @@ -58,9 +62,9 @@ namespace FCP.Core.Laser private Vector2 textureScroll; - public override void DrawAt(Vector3 drawLoc, bool flip = false) + protected override void DrawAt(Vector3 drawLoc, bool flip = false) { - float arcHeight = ArcHeightFactor * GenMath.InverseParabola(DistanceCoveredFraction); + float arcHeight = (float)arcHeightFactorProp.GetValue(this) * GenMath.InverseParabola(DistanceCoveredFraction); Vector3 beamStart = origin; Vector3 beamEnd = drawLoc; float beamSize; @@ -99,7 +103,7 @@ namespace FCP.Core.Laser Graphics.DrawMesh(MeshPool.GridPlane(new Vector2(width, beamSize)), pos, ExactRotation, mat, 0); } - public override void Impact(Thing hitThing, bool blockedByShield = false) + protected override void Impact(Thing hitThing, bool blockedByShield = false) { if (LaserProperties.groundFleckDef != null) { @@ -164,7 +168,7 @@ namespace FCP.Core.Laser } } - public override void Tick() + protected override void Tick() { base.Tick(); LockOnCaster(); @@ -321,10 +325,15 @@ namespace FCP.Core.Laser foreach (var thing in targets) { - if (IsDamagable(thing)) + if (!IsDamagable(thing)) continue; + + if (thing != intendedTarget.Thing && + !Rand.Chance(VerbUtility.InterceptChanceFactorFromDistance(origin, thing.Position))) { - ImpactOverride(thing); + continue; } + + ImpactOverride(thing); } } diff --git a/Source/FCP_Lasers/LaserProperties.cs b/Source/FCPTools/FalloutCore/Laser/LaserProperties.cs similarity index 89% rename from Source/FCP_Lasers/LaserProperties.cs rename to Source/FCPTools/FalloutCore/Laser/LaserProperties.cs index 8aefafd..5242343 100644 --- a/Source/FCP_Lasers/LaserProperties.cs +++ b/Source/FCPTools/FalloutCore/Laser/LaserProperties.cs @@ -10,7 +10,7 @@ namespace FCP.Core.Laser { public float beamWidth; public float beamWidthDrawScale = 1f; - public float beamLength = -1f; // Visual length of beam. -1 = full stretch from origin to projectile + public float beamLength = -1f; public int damageTickRate; public int lifetimeTicks; public float sweepRatePerTick; diff --git a/Source/FCPTools/FalloutCore/Laser/Utilities.cs b/Source/FCPTools/FalloutCore/Laser/Utilities.cs new file mode 100644 index 0000000..18cfdf0 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Laser/Utilities.cs @@ -0,0 +1,15 @@ +using System.Linq; +using Verse; + +namespace FCP.Core.Laser +{ + [HotSwappable] + [StaticConstructorOnStartup] + public static class Utilities + { + public static float GetBodyAngle(Thing thing) + { + return thing.Rotation.AsAngle; + } + } +} diff --git a/Source/FCPTools/FalloutCore/PawnGen/GroupMakerWithCustomTraderChar.cs b/Source/FCPTools/FalloutCore/PawnGen/GroupMakerWithCustomTraderChar.cs new file mode 100644 index 0000000..80050b0 --- /dev/null +++ b/Source/FCPTools/FalloutCore/PawnGen/GroupMakerWithCustomTraderChar.cs @@ -0,0 +1,10 @@ +// ReSharper disable FieldCanBeMadeReadOnly.Global +// ReSharper disable ClassNeverInstantiated.Global + +namespace FCP.Core; + +public class GroupMakerWithCustomTraderChar : PawnGroupMaker +{ + public List characterDefs = []; + public TraderKindDef traderKind; +} diff --git a/Source/FCPTools/FalloutCore/PawnGen/GroupMakerWithTraderKind.cs b/Source/FCPTools/FalloutCore/PawnGen/GroupMakerWithTraderKind.cs index 24f1bdb..9663e2e 100644 --- a/Source/FCPTools/FalloutCore/PawnGen/GroupMakerWithTraderKind.cs +++ b/Source/FCPTools/FalloutCore/PawnGen/GroupMakerWithTraderKind.cs @@ -7,5 +7,6 @@ public class GroupMakerWithTraderKind : PawnGroupMaker { public List traderKinds = []; public List characterDefs = []; + public Dictionary characterTraderKinds = new(); public float characterChance = 1f; } diff --git a/Source/PresettablePocketMap/CompPocketMapControl.cs b/Source/FCPTools/FalloutCore/PocketMaps/CompPocketMapControl.cs similarity index 100% rename from Source/PresettablePocketMap/CompPocketMapControl.cs rename to Source/FCPTools/FalloutCore/PocketMaps/CompPocketMapControl.cs diff --git a/Source/PresettablePocketMap/GenStep_PresettableMapEntrance.cs b/Source/FCPTools/FalloutCore/PocketMaps/GenStep_PresettableMapEntrance.cs similarity index 100% rename from Source/PresettablePocketMap/GenStep_PresettableMapEntrance.cs rename to Source/FCPTools/FalloutCore/PocketMaps/GenStep_PresettableMapEntrance.cs diff --git a/Source/PresettablePocketMap/HarmonyPatches/JobGiver_ExitMapPortal_Patch.cs b/Source/FCPTools/FalloutCore/PocketMaps/HarmonyPatches/JobGiver_ExitMapPortal_Patch.cs similarity index 100% rename from Source/PresettablePocketMap/HarmonyPatches/JobGiver_ExitMapPortal_Patch.cs rename to Source/FCPTools/FalloutCore/PocketMaps/HarmonyPatches/JobGiver_ExitMapPortal_Patch.cs diff --git a/Source/PresettablePocketMap/MapComponent_PocketMapEntrance.cs b/Source/FCPTools/FalloutCore/PocketMaps/MapComponent_PocketMapEntrance.cs similarity index 100% rename from Source/PresettablePocketMap/MapComponent_PocketMapEntrance.cs rename to Source/FCPTools/FalloutCore/PocketMaps/MapComponent_PocketMapEntrance.cs diff --git a/Source/PresettablePocketMap/ModExtensionPresettablePocketMap.cs b/Source/FCPTools/FalloutCore/PocketMaps/ModExtensionPresettablePocketMap.cs similarity index 100% rename from Source/PresettablePocketMap/ModExtensionPresettablePocketMap.cs rename to Source/FCPTools/FalloutCore/PocketMaps/ModExtensionPresettablePocketMap.cs diff --git a/Source/PresettablePocketMap/PocketMapPrefabDef.cs b/Source/FCPTools/FalloutCore/PocketMaps/PocketMapPrefabDef.cs similarity index 100% rename from Source/PresettablePocketMap/PocketMapPrefabDef.cs rename to Source/FCPTools/FalloutCore/PocketMaps/PocketMapPrefabDef.cs diff --git a/Source/PresettablePocketMap/PresettableMapPortal.cs b/Source/FCPTools/FalloutCore/PocketMaps/PresettableMapPortal.cs similarity index 100% rename from Source/PresettablePocketMap/PresettableMapPortal.cs rename to Source/FCPTools/FalloutCore/PocketMaps/PresettableMapPortal.cs diff --git a/Source/FCPTools/FalloutCore/RadiantQuests/QuestPart_DefendCrashSite.cs b/Source/FCPTools/FalloutCore/RadiantQuests/QuestPart_DefendCrashSite.cs index 57d0132..a6fa8a7 100644 --- a/Source/FCPTools/FalloutCore/RadiantQuests/QuestPart_DefendCrashSite.cs +++ b/Source/FCPTools/FalloutCore/RadiantQuests/QuestPart_DefendCrashSite.cs @@ -31,7 +31,7 @@ public class QuestPart_DefendCrashSite : QuestPart public void SpawnWave(int waveNum) { - if (mapParent.Map == null) + if (mapParent?.Map == null) { return; } diff --git a/Source/FCPTools/FalloutCore/Robotics/CompAbilityEffect_LaunchProjectile.cs b/Source/FCPTools/FalloutCore/Robotics/CompAbilityEffect_LaunchProjectile.cs new file mode 100644 index 0000000..f4bb024 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompAbilityEffect_LaunchProjectile.cs @@ -0,0 +1,34 @@ +using RimWorld; +using Verse; + +namespace FCP.Core.Robotics +{ + public class CompProperties_AbilityLaunchProjectile : CompProperties_AbilityEffect + { + public ThingDef projectileDef; + + public CompProperties_AbilityLaunchProjectile() + { + compClass = typeof(CompAbilityEffect_LaunchProjectile); + } + } + + public class CompAbilityEffect_LaunchProjectile : CompAbilityEffect + { + public new CompProperties_AbilityLaunchProjectile Props => (CompProperties_AbilityLaunchProjectile)props; + + public override void Apply(LocalTargetInfo target, LocalTargetInfo dest) + { + base.Apply(target, dest); + + if (Props.projectileDef == null) + { + return; + } + + Pawn pawn = parent.pawn; + Projectile projectile = (Projectile)GenSpawn.Spawn(ThingMaker.MakeThing(Props.projectileDef), pawn.Position, pawn.Map); + projectile.Launch(pawn, pawn.DrawPos, target, target, ProjectileHitFlags.IntendedTarget); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompEyebotExplorer.cs b/Source/FCPTools/FalloutCore/Robotics/CompEyebotExplorer.cs new file mode 100644 index 0000000..f5c2699 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompEyebotExplorer.cs @@ -0,0 +1,59 @@ +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using RimWorld.Planet; +using Verse; + +namespace FCP.Core.Robotics +{ + public class CompProperties_EyebotExplorer : CompProperties + { + public CompProperties_EyebotExplorer() + { + compClass = typeof(CompEyebotExplorer); + } + } + + public class CompEyebotExplorer : ThingComp + { + private HashSet reportedTiles = new HashSet(); + + public int NextScanTick; + + public CompProperties_EyebotExplorer Props => (CompProperties_EyebotExplorer)props; + + public void ScanForSites(int radius) + { + Map map = parent.Map; + if (map?.Parent == null) + { + return; + } + + PlanetTile homeTile = map.Parent.Tile; + foreach (Site site in Find.WorldObjects.AllWorldObjects.OfType()) + { + int tileId = (int)site.Tile; + if (reportedTiles.Contains(tileId)) + { + continue; + } + if (Find.WorldGrid.TraversalDistanceBetween(homeTile, site.Tile, true, radius) > radius) + { + continue; + } + + reportedTiles.Add(tileId); + Messages.Message("FCP_EyebotFoundSite".Translate(parent.LabelShort, site.LabelCap), site, MessageTypeDefOf.PositiveEvent); + } + } + + public override void PostExposeData() + { + base.PostExposeData(); + Scribe_Collections.Look(ref reportedTiles, "reportedTiles", LookMode.Value); + Scribe_Values.Look(ref NextScanTick, "nextScanTick"); + reportedTiles ??= new HashSet(); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompEyebotMode.cs b/Source/FCPTools/FalloutCore/Robotics/CompEyebotMode.cs new file mode 100644 index 0000000..6f7f531 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompEyebotMode.cs @@ -0,0 +1,49 @@ +using Verse; + +namespace FCP.Core.Robotics +{ + public enum EyebotMode : byte + { + Defend, + Scavenge, + Explore, + Music + } + + public class CompProperties_EyebotMode : CompProperties + { + public CompProperties_EyebotMode() + { + compClass = typeof(CompEyebotMode); + } + } + + public class CompEyebotMode : ThingComp + { + private EyebotMode mode = EyebotMode.Defend; + + public CompProperties_EyebotMode Props => (CompProperties_EyebotMode)props; + public EyebotMode Mode => mode; + + public void SetMode(EyebotMode newMode) + { + mode = newMode; + } + + public override void PostExposeData() + { + base.PostExposeData(); + Scribe_Values.Look(ref mode, "eyebotMode", EyebotMode.Defend); + } + + public override string CompInspectStringExtra() + { + if ((parent as Pawn)?.Faction != RimWorld.Faction.OfPlayer) + { + return "FCP_EyebotMode_Inspect".Translate("FCP_RobotMode_Wandering".Translate()); + } + + return "FCP_EyebotMode_Inspect".Translate(mode.ToString()); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompEyebotMusicPlayer.cs b/Source/FCPTools/FalloutCore/Robotics/CompEyebotMusicPlayer.cs new file mode 100644 index 0000000..9c9db18 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompEyebotMusicPlayer.cs @@ -0,0 +1,171 @@ +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using UnityEngine; +using Verse; +using Verse.Sound; + +namespace FCP.Core.Robotics +{ + public class CompProperties_EyebotMusicPlayer : CompProperties + { + public CompProperties_EyebotMusicPlayer() + { + compClass = typeof(CompEyebotMusicPlayer); + } + } + + public class CompEyebotMusicPlayer : ThingComp + { + public ThingDef LoadedTapeDef; + public int NextJoyTick; + private Sustainer sustainer; + + public CompProperties_EyebotMusicPlayer Props => (CompProperties_EyebotMusicPlayer)props; + + public override void PostExposeData() + { + base.PostExposeData(); + Scribe_Defs.Look(ref LoadedTapeDef, "loadedMusicTapeDef"); + Scribe_Values.Look(ref NextJoyTick, "nextMusicJoyTick"); + } + + public override void PostSpawnSetup(bool respawningAfterLoad) + { + base.PostSpawnSetup(respawningAfterLoad); + if (respawningAfterLoad || LoadedTapeDef != null) + { + return; + } + + Pawn eyebot = parent as Pawn; + string factionDefName = eyebot?.Faction?.def.defName; + if (factionDefName == null) + { + return; + } + + ThingDef broadcastTape = DefDatabase.GetNamedSilentFail("FCP_Item_Music_Holotape_" + factionDefName + "_Broadcast"); + if (broadcastTape == null) + { + return; + } + + LoadedTapeDef = broadcastTape; + eyebot.GetComp()?.SetMode(EyebotMode.Music); + } + + public override void CompTickRare() + { + base.CompTickRare(); + UpdateSustainer(); + } + + private void UpdateSustainer() + { + SoundDef track = LoadedTapeDef?.GetCompProperties()?.trackToPlay; + bool shouldPlay = track != null && parent.Spawned + && parent is Pawn eyebot + && eyebot.GetComp()?.Mode == EyebotMode.Music + && (eyebot.GetComp()?.HasFuel ?? true); + + if (shouldPlay) + { + if (sustainer == null || sustainer.Ended || sustainer.def != track) + { + sustainer?.End(); + sustainer = track.TrySpawnSustainer(SoundInfo.InMap(parent, MaintenanceType.PerTickRare)); + } + else + { + sustainer.Maintain(); + } + } + else if (sustainer != null && !sustainer.Ended) + { + sustainer.End(); + } + } + + public override void PostDeSpawn(Map map, DestroyMode mode = DestroyMode.Vanish) + { + base.PostDeSpawn(map, mode); + if (sustainer != null && !sustainer.Ended) + { + sustainer.End(); + } + } + + public override string CompInspectStringExtra() + { + return LoadedTapeDef == null + ? "FCP_EyebotMusic_NoTape".Translate() + : "FCP_EyebotMusic_Loaded".Translate(LoadedTapeDef.LabelCap); + } + + public override IEnumerable CompGetGizmosExtra() + { + if (LoadedTapeDef == null) + { + yield return new Command_Action + { + defaultLabel = "FCP_LoadMusicHolotape_Gizmo".Translate(), + defaultDesc = "FCP_LoadMusicHolotape_GizmoDesc".Translate(), + icon = ContentFinder.Get("Things/Items/Techprints/FCP_Techprint_Holotape_Orange"), + action = OpenLoadTapeMenu, + }; + } + else + { + yield return new Command_Action + { + defaultLabel = "FCP_EjectMusicHolotape_Gizmo".Translate(), + defaultDesc = "FCP_EjectMusicHolotape_GizmoDesc".Translate(), + icon = ContentFinder.Get("Things/Items/Techprints/FCP_Techprint_Holotape_Orange"), + action = EjectTape, + }; + } + } + + private void OpenLoadTapeMenu() + { + if (parent.Map == null) + { + return; + } + + List tapes = parent.Map.listerThings.AllThings + .Where(t => t.def.HasComp(typeof(CompMusicHolotape))) + .ToList(); + + if (tapes.Count == 0) + { + Messages.Message("FCP_LoadMusicHolotape_None".Translate(), MessageTypeDefOf.RejectInput, historical: false); + return; + } + + List options = tapes + .Select(tape => new FloatMenuOption(tape.LabelCap, () => LoadTape(tape))) + .ToList(); + + Find.WindowStack.Add(new FloatMenu(options)); + } + + private void LoadTape(Thing tape) + { + LoadedTapeDef = tape.def; + tape.SplitOff(1).Destroy(); + } + + private void EjectTape() + { + if (LoadedTapeDef == null || parent.Map == null) + { + return; + } + + GenPlace.TryPlaceThing(ThingMaker.MakeThing(LoadedTapeDef), parent.Position, parent.Map, ThingPlaceMode.Near); + LoadedTapeDef = null; + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompHackable.cs b/Source/FCPTools/FalloutCore/Robotics/CompHackable.cs new file mode 100644 index 0000000..ee4b509 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompHackable.cs @@ -0,0 +1,94 @@ +using System.Collections.Generic; +using RimWorld; +using UnityEngine; +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class CompProperties_Hackable : CompProperties + { + public float baseSuccessChance = 0.5f; + public SimpleCurve skillFactorCurve = new SimpleCurve + { + new CurvePoint(0f, 0.5f), + new CurvePoint(20f, 1.5f), + }; + public int workTicks = 600; + + public CompProperties_Hackable() + { + compClass = typeof(CompHackable); + } + } + + public class CompHackable : ThingComp + { + public CompProperties_Hackable Props => (CompProperties_Hackable)props; + + public bool CanBeHacked + { + get + { + Pawn pawn = parent as Pawn; + if (pawn == null || pawn.Faction == Faction.OfPlayer) + { + return false; + } + CompRefuelable fuel = pawn.GetComp(); + return fuel != null && !fuel.HasFuel; + } + } + + public float GetSuccessChance(Pawn hacker) + { + float skillLevel = hacker.skills?.GetSkill(SkillDefOf.Intellectual).Level ?? 0f; + float factor = Props.skillFactorCurve.Evaluate(skillLevel); + return Mathf.Clamp01(Props.baseSuccessChance * factor); + } + + public void AttemptHack(Pawn hacker) + { + Pawn target = parent as Pawn; + if (target == null || !target.Spawned) + { + return; + } + + if (Rand.Chance(GetSuccessChance(hacker))) + { + target.SetFaction(Faction.OfPlayer, hacker); + target.GetComp()?.Notify_FactionChanged(); + Messages.Message("FCP_Hack_Success".Translate(target.LabelShort), target, MessageTypeDefOf.PositiveEvent); + } + else + { + target.SetFaction(Faction.OfMechanoids); + target.GetComp()?.Notify_FactionChanged(); + Messages.Message("FCP_Hack_Failure".Translate(target.LabelShort), target, MessageTypeDefOf.NegativeEvent); + } + } + + public override IEnumerable CompFloatMenuOptions(Pawn selPawn) + { + if (!CanBeHacked) + { + yield break; + } + + if (!selPawn.CanReach(parent, PathEndMode.Touch, Danger.Deadly)) + { + yield return new FloatMenuOption("FCP_HackRobot_Perform".Translate() + ": " + "NoPath".Translate(), null); + yield break; + } + + float chance = GetSuccessChance(selPawn); + string label = "FCP_HackRobot_Perform".Translate() + " (" + chance.ToStringPercent() + ")"; + yield return new FloatMenuOption(label, delegate + { + Job job = JobMaker.MakeJob(JobDefOf_Robotics.FCP_HackRobot, parent); + selPawn.jobs.TryTakeOrderedJob(job, JobTag.Misc); + }); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompMusicHolotape.cs b/Source/FCPTools/FalloutCore/Robotics/CompMusicHolotape.cs new file mode 100644 index 0000000..ddbc076 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompMusicHolotape.cs @@ -0,0 +1,19 @@ +using Verse; + +namespace FCP.Core.Robotics +{ + public class CompProperties_MusicHolotape : CompProperties + { + public SoundDef trackToPlay; + + public CompProperties_MusicHolotape() + { + compClass = typeof(CompMusicHolotape); + } + } + + public class CompMusicHolotape : ThingComp + { + public CompProperties_MusicHolotape Props => (CompProperties_MusicHolotape)props; + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompProtectronLoadout.cs b/Source/FCPTools/FalloutCore/Robotics/CompProtectronLoadout.cs new file mode 100644 index 0000000..c7d7493 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompProtectronLoadout.cs @@ -0,0 +1,266 @@ +using System.Collections.Generic; +using RimWorld; +using UnityEngine; +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class CompProperties_ProtectronLoadout : CompProperties + { + public List headSwapCost = new List(); + public List handSwapCost = new List(); + + public CompProperties_ProtectronLoadout() + { + compClass = typeof(CompProtectronLoadout); + } + } + + public class CompProtectronLoadout : ThingComp + { + private static readonly Color DefaultColor = new Color32(200, 200, 200, 255); + + private bool didInitialSetup; + + public CompProperties_ProtectronLoadout Props => (CompProperties_ProtectronLoadout)props; + + private Pawn Pawn => parent as Pawn; + + public static bool HasHead(Pawn pawn, ThingDef headDef) => HasApparel(pawn, headDef); + public static bool HasHand(Pawn pawn, ThingDef handDef) => HasApparel(pawn, handDef); + + private static bool HasApparel(Pawn pawn, ThingDef apparelDef) + { + if (pawn?.apparel == null) + { + return false; + } + foreach (Apparel apparel in pawn.apparel.WornApparel) + { + if (apparel.def == apparelDef) + { + return true; + } + } + return false; + } + + public override void PostSpawnSetup(bool respawningAfterLoad) + { + base.PostSpawnSetup(respawningAfterLoad); + if (respawningAfterLoad) + { + didInitialSetup = true; + } + } + + public override void CompTick() + { + base.CompTick(); + if (!didInitialSetup) + { + didInitialSetup = true; + DoInitialSetup(); + } + } + + public override void PostExposeData() + { + base.PostExposeData(); + Scribe_Values.Look(ref didInitialSetup, "protectronLoadoutInitialSetupDone"); + } + + private void DoInitialSetup() + { + Pawn pawn = Pawn; + if (pawn?.apparel == null) + { + return; + } + + ProtectronPresetExtension preset = pawn.kindDef.GetModExtension(); + bool wearHead = preset?.hasHead ?? true; + ThingDef headDef = preset?.head ?? ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Head_Default; + ThingDef handDef = preset?.hand ?? ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Hand_Default; + + if (wearHead && !HasApparel(pawn, headDef)) + { + Wear(pawn, headDef); + } + if (!HasApparel(pawn, handDef)) + { + Wear(pawn, handDef); + } + if (handDef == ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Hand_Gun) + { + EquipGun(pawn); + } + + pawn.SetColor(preset?.color ?? DefaultColor); + + RobotUtility.TouchBodyColor(pawn); + pawn.Drawer.renderer.SetAllGraphicsDirty(); + RetintApparel(pawn); + } + + public static void RetintApparel(Pawn pawn) + { + if (pawn == null) + { + return; + } + + Color color = RobotUtility.GetBodyColor(pawn); + + if (pawn.equipment?.Primary != null) + { + CompColorableUtility.SetColor(pawn.equipment.Primary, color, reportFailure: false); + RobotUtility.TouchGraphic(pawn.equipment.Primary); + } + + if (pawn.apparel == null) + { + return; + } + + foreach (Apparel apparel in pawn.apparel.WornApparel) + { + if (apparel.TryGetComp() != null) + { + CompColorableUtility.SetColor(apparel, color, reportFailure: false); + RobotUtility.TouchGraphic(apparel); + } + } + + pawn.Drawer.renderer.SetAllGraphicsDirty(); + } + + private static void Wear(Pawn pawn, ThingDef apparelDef) + { + Apparel newApparel = (Apparel)ThingMaker.MakeThing(apparelDef); + pawn.apparel.Wear(newApparel, dropReplacedApparel: false); + RobotUtility.TouchGraphic(newApparel); + } + + private static void EquipGun(Pawn pawn) + { + if (pawn?.equipment == null) + { + return; + } + + if (pawn.equipment.Primary != null) + { + pawn.equipment.DestroyEquipment(pawn.equipment.Primary); + } + + ThingWithComps gun = (ThingWithComps)ThingMaker.MakeThing(ThingDefOf_ProtectronLoadout.FCP_Gun_Protectron_Arm); + pawn.equipment.AddEquipment(gun); + RobotUtility.TouchGraphic(gun); + } + + private static void UnequipGun(Pawn pawn) + { + if (pawn?.equipment?.Primary != null) + { + pawn.equipment.DestroyEquipment(pawn.equipment.Primary); + } + } + + public override IEnumerable CompFloatMenuOptions(Pawn selPawn) + { + Pawn pawn = Pawn; + if (pawn == null || pawn.Faction != Faction.OfPlayer || pawn.CurJobDef != JobDefOf_Robotics.FCP_RobotDock) + { + yield break; + } + + if (!selPawn.CanReach(parent, PathEndMode.Touch, Danger.Deadly)) + { + yield break; + } + + foreach (FloatMenuOption option in HeadOptions(pawn)) + { + yield return option; + } + foreach (FloatMenuOption option in HandOptions(pawn)) + { + yield return option; + } + } + + private IEnumerable HeadOptions(Pawn pawn) + { + if (!HasHead(pawn, ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Head_Default)) + { + yield return InstallOption(pawn, "FCP_ProtectronLoadout_InstallDefaultHead", ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Head_Default, Props.headSwapCost); + } + if (!HasHead(pawn, ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Head_Construct)) + { + yield return InstallOption(pawn, "FCP_ProtectronLoadout_InstallConstructHead", ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Head_Construct, Props.headSwapCost); + } + } + + private IEnumerable HandOptions(Pawn pawn) + { + if (!HasHand(pawn, ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Hand_Default)) + { + yield return InstallHandOption(pawn, "FCP_ProtectronLoadout_InstallDefaultHand", ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Hand_Default); + } + if (!HasHand(pawn, ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Hand_Work)) + { + yield return InstallHandOption(pawn, "FCP_ProtectronLoadout_InstallWorkHand", ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Hand_Work); + } + if (!HasHand(pawn, ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Hand_Gun)) + { + yield return InstallHandOption(pawn, "FCP_ProtectronLoadout_InstallGunHand", ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Hand_Gun); + } + } + + private FloatMenuOption InstallOption(Pawn pawn, string labelKey, ThingDef apparelDef, List cost) + { + if (!RobotUpgradeUtility.CanAffordCost(parent.Map, cost)) + { + return new FloatMenuOption(labelKey.Translate() + ": " + "FCP_UpgradeRobot_MissingMaterials".Translate(), null); + } + + return new FloatMenuOption(labelKey.Translate(), delegate + { + if (RobotUpgradeUtility.TryConsumeCost(parent.Map, cost)) + { + Wear(pawn, apparelDef); + } + }); + } + + private FloatMenuOption InstallHandOption(Pawn pawn, string labelKey, ThingDef handDef) + { + List cost = Props.handSwapCost; + if (!RobotUpgradeUtility.CanAffordCost(parent.Map, cost)) + { + return new FloatMenuOption(labelKey.Translate() + ": " + "FCP_UpgradeRobot_MissingMaterials".Translate(), null); + } + + return new FloatMenuOption(labelKey.Translate(), delegate + { + if (!RobotUpgradeUtility.TryConsumeCost(parent.Map, cost)) + { + return; + } + + Wear(pawn, handDef); + if (handDef == ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Hand_Gun) + { + EquipGun(pawn); + } + else + { + UnequipGun(pawn); + } + RetintApparel(pawn); + }); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompProtectronMode.cs b/Source/FCPTools/FalloutCore/Robotics/CompProtectronMode.cs new file mode 100644 index 0000000..df50615 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompProtectronMode.cs @@ -0,0 +1,48 @@ +using Verse; + +namespace FCP.Core.Robotics +{ + public enum ProtectronMode : byte + { + Guard, + Construct, + Haul + } + + public class CompProperties_ProtectronMode : CompProperties + { + public CompProperties_ProtectronMode() + { + compClass = typeof(CompProtectronMode); + } + } + + public class CompProtectronMode : ThingComp + { + private ProtectronMode mode = ProtectronMode.Haul; + + public CompProperties_ProtectronMode Props => (CompProperties_ProtectronMode)props; + public ProtectronMode Mode => mode; + + public void SetMode(ProtectronMode newMode) + { + mode = newMode; + } + + public override void PostExposeData() + { + base.PostExposeData(); + Scribe_Values.Look(ref mode, "protectronMode", ProtectronMode.Haul); + } + + public override string CompInspectStringExtra() + { + if ((parent as Pawn)?.Faction != RimWorld.Faction.OfPlayer) + { + return "FCP_ProtectronMode_Inspect".Translate("FCP_RobotMode_Wandering".Translate()); + } + + return "FCP_ProtectronMode_Inspect".Translate(mode.ToString()); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompRefuelable_PostDraw_Patch.cs b/Source/FCPTools/FalloutCore/Robotics/CompRefuelable_PostDraw_Patch.cs new file mode 100644 index 0000000..d6c8197 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompRefuelable_PostDraw_Patch.cs @@ -0,0 +1,16 @@ +using HarmonyLib; +using RimWorld; +using Verse; + +namespace FCP.Core.Robotics +{ + [HarmonyPatch(typeof(CompRefuelable), nameof(CompRefuelable.PostDraw))] + public static class CompRefuelable_PostDraw_Patch + { + public static bool Prefix(CompRefuelable __instance) + { + Pawn pawn = __instance.parent as Pawn; + return pawn == null || !pawn.Dead; + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompRobotController.cs b/Source/FCPTools/FalloutCore/Robotics/CompRobotController.cs new file mode 100644 index 0000000..0a120e8 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompRobotController.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using RimWorld; +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class CompProperties_RobotController : CompProperties + { + public CompProperties_RobotController() + { + compClass = typeof(CompRobotController); + } + } + + public class CompRobotController : ThingComp + { + public CompProperties_RobotController Props => (CompProperties_RobotController)props; + + public override IEnumerable CompFloatMenuOptions(Pawn selPawn) + { + if (!selPawn.CanReach(parent, PathEndMode.InteractionCell, Danger.Deadly)) + { + yield return new FloatMenuOption("FCP_ControlRobots_Gizmo".Translate() + ": " + "NoPath".Translate(), null); + yield break; + } + + yield return new FloatMenuOption("FCP_ControlRobots_Gizmo".Translate(), delegate + { + Job job = JobMaker.MakeJob(JobDefOf_Robotics.FCP_ControlRobots, parent); + selPawn.jobs.TryTakeOrderedJob(job, JobTag.Misc); + }); + } + + public void OpenRobotSelectMenu() + { + Find.WindowStack.Add(new Dialog_RobotControl(parent.Map)); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompRobotFuelCutoff.cs b/Source/FCPTools/FalloutCore/Robotics/CompRobotFuelCutoff.cs new file mode 100644 index 0000000..977b329 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompRobotFuelCutoff.cs @@ -0,0 +1,30 @@ +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class CompProperties_RobotFuelCutoff : CompProperties + { + public CompProperties_RobotFuelCutoff() + { + compClass = typeof(CompRobotFuelCutoff); + } + } + + public class CompRobotFuelCutoff : ThingComp + { + public override void ReceiveCompSignal(string signal) + { + base.ReceiveCompSignal(signal); + if (signal != "RanOutOfFuel" && signal != "Refueled") + { + return; + } + + if (parent is Pawn pawn && pawn.jobs?.curJob != null) + { + pawn.jobs.EndCurrentJob(JobCondition.InterruptForced); + } + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompRobotUpgrade.cs b/Source/FCPTools/FalloutCore/Robotics/CompRobotUpgrade.cs new file mode 100644 index 0000000..12e85cf --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompRobotUpgrade.cs @@ -0,0 +1,25 @@ +using Verse; + +namespace FCP.Core.Robotics +{ + public class CompProperties_RobotUpgrade : CompProperties + { + public CompProperties_RobotUpgrade() + { + compClass = typeof(CompRobotUpgrade); + } + } + + public class CompRobotUpgrade : ThingComp + { + public Thing PendingBench; + + public CompProperties_RobotUpgrade Props => (CompProperties_RobotUpgrade)props; + + public override void PostExposeData() + { + base.PostExposeData(); + Scribe_References.Look(ref PendingBench, "pendingUpgradeBench"); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompRobotUpgradeBench.cs b/Source/FCPTools/FalloutCore/Robotics/CompRobotUpgradeBench.cs new file mode 100644 index 0000000..e2d700e --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompRobotUpgradeBench.cs @@ -0,0 +1,128 @@ +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using UnityEngine; +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class CompProperties_RobotUpgradeBench : CompProperties + { + public CompProperties_RobotUpgradeBench() + { + compClass = typeof(CompRobotUpgradeBench); + } + } + + public class CompRobotUpgradeBench : ThingComp + { + public CompProperties_RobotUpgradeBench Props => (CompProperties_RobotUpgradeBench)props; + + public override IEnumerable CompGetGizmosExtra() + { + yield return new Command_Action + { + defaultLabel = "FCP_UpgradeRobot_Gizmo".Translate(), + defaultDesc = "FCP_UpgradeRobot_GizmoDesc".Translate(), + icon = ContentFinder.Get("Things/Items/Techprints/FCP_Techprint_Holotape_Orange"), + action = OpenUpgradeSelectMenu, + }; + } + + private void OpenUpgradeSelectMenu() + { + List options = new List(); + IEnumerable robots = parent.Map.mapPawns.AllPawnsSpawned + .Where(p => p.Faction == Faction.OfPlayer && RobotUtility.IsAnyRobot(p)); + + foreach (Pawn robot in robots) + { + IRobotTierProvider provider = RobotUtility.GetProvider(robot); + PawnKindDef nextTier = provider?.GetNextTier(robot.kindDef); + if (nextTier == null) + { + continue; + } + + RobotTierExtension tierExt = nextTier.GetModExtension(); + if (tierExt?.researchPrerequisite != null && !tierExt.researchPrerequisite.IsFinished) + { + options.Add(new FloatMenuOption($"{robot.LabelShort}: {"FCP_UpgradeRobot_NeedsResearch".Translate(tierExt.researchPrerequisite.LabelCap)}", null)); + continue; + } + + options.Add(new FloatMenuOption(robot.LabelShort, () => CallToBench(robot))); + } + + if (options.Count == 0) + { + options.Add(new FloatMenuOption("FCP_UpgradeRobot_NoneAvailable".Translate(), null)); + } + + Find.WindowStack.Add(new FloatMenu(options)); + } + + private void CallToBench(Pawn robot) + { + CompRobotUpgrade upgradeComp = robot.GetComp(); + if (upgradeComp != null) + { + upgradeComp.PendingBench = parent; + } + } + + public override IEnumerable CompFloatMenuOptions(Pawn selPawn) + { + if (!selPawn.CanReach(parent, PathEndMode.InteractionCell, Danger.Deadly)) + { + yield return new FloatMenuOption("FCP_UpgradeRobot_Perform".Translate() + ": " + "NoPath".Translate(), null); + yield break; + } + + Pawn dockedRobot = FindDockedRobot(); + if (dockedRobot == null) + { + yield break; + } + + IRobotTierProvider provider = RobotUtility.GetProvider(dockedRobot); + if (provider == null) + { + yield break; + } + + PawnKindDef nextTier = provider.GetNextTier(dockedRobot.kindDef); + if (nextTier == null) + { + yield break; + } + + RobotTierExtension tierExt = nextTier.GetModExtension(); + if (tierExt != null && !RobotUpgradeUtility.CanAffordCost(parent.Map, tierExt.upgradeCost)) + { + yield return new FloatMenuOption("FCP_UpgradeRobot_Perform".Translate() + ": " + "FCP_UpgradeRobot_MissingMaterials".Translate(), null); + yield break; + } + + yield return new FloatMenuOption("FCP_UpgradeRobot_Perform".Translate(), delegate + { + Job job = JobMaker.MakeJob(JobDefOf_Robotics.FCP_UpgradeRobot, parent, dockedRobot); + selPawn.jobs.TryTakeOrderedJob(job, JobTag.Misc); + }); + } + + private Pawn FindDockedRobot() + { + foreach (Pawn p in parent.Map.mapPawns.AllPawnsSpawned) + { + if (RobotUtility.IsAnyRobot(p) && p.CurJobDef == JobDefOf_Robotics.FCP_RobotDock && + p.CurJob.GetTarget(TargetIndex.A).Thing == parent) + { + return p; + } + } + return null; + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompSecuritronFace.cs b/Source/FCPTools/FalloutCore/Robotics/CompSecuritronFace.cs new file mode 100644 index 0000000..75722e3 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompSecuritronFace.cs @@ -0,0 +1,167 @@ +using RimWorld; +using Verse; + +namespace FCP.Core.Robotics +{ + [DefOf] + public static class ThingDefOf_SecuritronFace + { + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Apparel_Securitron_Face_Empty; + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Apparel_Securitron_Face_Corrupt; + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Apparel_Securitron_Face_Army; + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Apparel_Securitron_Face_Cop; + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Apparel_Securitron_Face_Female; + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Apparel_Securitron_Face_Male; + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Apparel_Securitron_Face_Smily; + + static ThingDefOf_SecuritronFace() + { + DefOfHelper.EnsureInitializedInCtor(typeof(ThingDefOf_SecuritronFace)); + } + } + + public class CompProperties_SecuritronFace : CompProperties + { + public CompProperties_SecuritronFace() + { + compClass = typeof(CompSecuritronFace); + } + } + + public class CompSecuritronFace : ThingComp + { + private ThingDef chosenFace = ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Army; + private bool didInitialSetup; + + public CompProperties_SecuritronFace Props => (CompProperties_SecuritronFace)props; + + public static ThingDef[] AllFaces => new[] + { + ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Empty, + ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Corrupt, + ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Army, + ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Cop, + ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Female, + ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Male, + ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Smily, + }; + + public static ThingDef[] PlayerSelectableFaces => new[] + { + ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Army, + ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Cop, + ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Female, + ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Male, + ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Smily, + }; + + public override void PostSpawnSetup(bool respawningAfterLoad) + { + base.PostSpawnSetup(respawningAfterLoad); + if (respawningAfterLoad) + { + didInitialSetup = true; + } + } + + public override void CompTick() + { + base.CompTick(); + if (!didInitialSetup) + { + didInitialSetup = true; + + SecuritronPresetExtension preset = (parent as Pawn)?.kindDef.GetModExtension(); + if (preset?.face != null) + { + chosenFace = preset.face; + } + else + { + chosenFace = Rand.Bool + ? ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Male + : ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Female; + } + + RefreshFace(); + } + } + + public override void PostExposeData() + { + base.PostExposeData(); + Scribe_Defs.Look(ref chosenFace, "securitronChosenFace"); + Scribe_Values.Look(ref didInitialSetup, "securitronFaceInitialSetupDone"); + } + + public override void ReceiveCompSignal(string signal) + { + base.ReceiveCompSignal(signal); + if (signal == "RanOutOfFuel" || signal == "Refueled") + { + RefreshFace(); + } + } + + public ThingDef CurrentDisplayedFace(Pawn pawn) + { + foreach (Apparel apparel in pawn.apparel.WornApparel) + { + if (System.Array.IndexOf(AllFaces, apparel.def) >= 0) + { + return apparel.def; + } + } + return null; + } + + public void SetFace(ThingDef faceDef) + { + chosenFace = faceDef; + RefreshFace(); + } + + public void Notify_FactionChanged() + { + RefreshFace(); + } + + public void RefreshFace() + { + Pawn pawn = parent as Pawn; + if (pawn?.apparel == null) + { + return; + } + + ThingDef display; + if (pawn.Faction != null && pawn.Faction != Faction.OfPlayer) + { + display = ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Corrupt; + } + else + { + CompRefuelable fuel = pawn.GetComp(); + display = (fuel != null && !fuel.HasFuel) + ? ThingDefOf_SecuritronFace.FCP_Apparel_Securitron_Face_Empty + : chosenFace; + } + + if (CurrentDisplayedFace(pawn) == display) + { + return; + } + + Apparel newFace = (Apparel)ThingMaker.MakeThing(display); + pawn.apparel.Wear(newFace, dropReplacedApparel: false); + RobotUtility.TouchGraphic(newFace); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompSecuritronLoadout.cs b/Source/FCPTools/FalloutCore/Robotics/CompSecuritronLoadout.cs new file mode 100644 index 0000000..9968bb5 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompSecuritronLoadout.cs @@ -0,0 +1,204 @@ +using System.Collections.Generic; +using RimWorld; +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public enum SecuritronWeapon : byte + { + Gun, + GrenadeLauncher + } + + public class CompProperties_SecuritronLoadout : CompProperties + { + public ResearchProjectDef grenadeLauncherResearch; + public List grenadeLauncherCost = new List(); + public ResearchProjectDef rocketsResearch; + public List rocketsCost = new List(); + + public CompProperties_SecuritronLoadout() + { + compClass = typeof(CompSecuritronLoadout); + } + } + + public class CompSecuritronLoadout : ThingComp + { + private SecuritronWeapon weapon = SecuritronWeapon.Gun; + private bool hasRockets; + private bool didInitialSetup; + + public CompProperties_SecuritronLoadout Props => (CompProperties_SecuritronLoadout)props; + public SecuritronWeapon Weapon => weapon; + public bool HasRockets => hasRockets; + + private Pawn Pawn => parent as Pawn; + + public override void PostSpawnSetup(bool respawningAfterLoad) + { + base.PostSpawnSetup(respawningAfterLoad); + if (respawningAfterLoad) + { + didInitialSetup = true; + } + } + + public override void CompTick() + { + base.CompTick(); + if (!didInitialSetup) + { + didInitialSetup = true; + DoInitialSetup(); + } + } + + private void DoInitialSetup() + { + SecuritronPresetExtension preset = Pawn?.kindDef.GetModExtension(); + if (preset != null) + { + weapon = preset.weapon; + } + + EquipWeapon(Pawn, WeaponDefFor(weapon)); + + if (preset != null && Rand.Chance(preset.rocketsChance)) + { + InstallRockets(); + } + } + + public override void PostExposeData() + { + base.PostExposeData(); + Scribe_Values.Look(ref weapon, "securitronWeapon", SecuritronWeapon.Gun); + Scribe_Values.Look(ref hasRockets, "securitronHasRockets"); + Scribe_Values.Look(ref didInitialSetup, "securitronLoadoutInitialSetupDone"); + } + + private static ThingDef WeaponDefFor(SecuritronWeapon w) + { + return w == SecuritronWeapon.Gun + ? ThingDefOf_SecuritronLoadout.FCP_Gun_Securitron_Arm + : ThingDefOf_SecuritronLoadout.FCP_Gun_Securitron_GrenadeLauncher; + } + + private static void EquipWeapon(Pawn pawn, ThingDef weaponDef) + { + if (pawn?.equipment == null) + { + return; + } + + if (pawn.equipment.Primary != null) + { + pawn.equipment.DestroyEquipment(pawn.equipment.Primary); + } + + ThingWithComps newWeapon = (ThingWithComps)ThingMaker.MakeThing(weaponDef); + CompColorableUtility.SetColor(newWeapon, RobotUtility.GetBodyColor(pawn), reportFailure: false); + pawn.equipment.AddEquipment(newWeapon); + RobotUtility.TouchGraphic(newWeapon); + } + + private void SwitchWeapon(SecuritronWeapon newWeapon) + { + Pawn pawn = Pawn; + if (pawn?.equipment == null || newWeapon == weapon) + { + return; + } + + weapon = newWeapon; + EquipWeapon(pawn, WeaponDefFor(weapon)); + } + + private void InstallRockets() + { + Pawn pawn = Pawn; + if (pawn?.abilities == null || hasRockets) + { + return; + } + + hasRockets = true; + pawn.abilities.GainAbility(AbilityDefOf_Securitron.FCP_Ability_Securitron_Rockets); + if (pawn.apparel != null) + { + Apparel rocketPod = (Apparel)ThingMaker.MakeThing(ThingDefOf_SecuritronLoadout.FCP_Apparel_Securitron_RocketPod); + CompColorableUtility.SetColor(rocketPod, RobotUtility.GetBodyColor(pawn), reportFailure: false); + pawn.apparel.Wear(rocketPod, dropReplacedApparel: false); + RobotUtility.TouchGraphic(rocketPod); + } + } + + public override IEnumerable CompFloatMenuOptions(Pawn selPawn) + { + Pawn pawn = Pawn; + if (pawn == null || pawn.Faction != Faction.OfPlayer || pawn.CurJobDef != JobDefOf_Robotics.FCP_RobotDock) + { + yield break; + } + + if (!selPawn.CanReach(parent, PathEndMode.Touch, Danger.Deadly)) + { + yield break; + } + + if (weapon != SecuritronWeapon.Gun) + { + yield return new FloatMenuOption("FCP_SecuritronLoadout_InstallGun".Translate(), delegate + { + SwitchWeapon(SecuritronWeapon.Gun); + }); + } + + if (weapon != SecuritronWeapon.GrenadeLauncher) + { + if (Props.grenadeLauncherResearch != null && !Props.grenadeLauncherResearch.IsFinished) + { + yield return new FloatMenuOption($"{"FCP_SecuritronLoadout_InstallGrenadeLauncher".Translate()}: {"FCP_UpgradeRobot_NeedsResearch".Translate(Props.grenadeLauncherResearch.LabelCap)}", null); + } + else if (!RobotUpgradeUtility.CanAffordCost(parent.Map, Props.grenadeLauncherCost)) + { + yield return new FloatMenuOption("FCP_SecuritronLoadout_InstallGrenadeLauncher".Translate() + ": " + "FCP_UpgradeRobot_MissingMaterials".Translate(), null); + } + else + { + yield return new FloatMenuOption("FCP_SecuritronLoadout_InstallGrenadeLauncher".Translate(), delegate + { + if (RobotUpgradeUtility.TryConsumeCost(parent.Map, Props.grenadeLauncherCost)) + { + SwitchWeapon(SecuritronWeapon.GrenadeLauncher); + } + }); + } + } + + if (!hasRockets) + { + if (Props.rocketsResearch != null && !Props.rocketsResearch.IsFinished) + { + yield return new FloatMenuOption($"{"FCP_SecuritronLoadout_InstallRockets".Translate()}: {"FCP_UpgradeRobot_NeedsResearch".Translate(Props.rocketsResearch.LabelCap)}", null); + } + else if (!RobotUpgradeUtility.CanAffordCost(parent.Map, Props.rocketsCost)) + { + yield return new FloatMenuOption("FCP_SecuritronLoadout_InstallRockets".Translate() + ": " + "FCP_UpgradeRobot_MissingMaterials".Translate(), null); + } + else + { + yield return new FloatMenuOption("FCP_SecuritronLoadout_InstallRockets".Translate(), delegate + { + if (RobotUpgradeUtility.TryConsumeCost(parent.Map, Props.rocketsCost)) + { + InstallRockets(); + } + }); + } + } + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/CompSecuritronMode.cs b/Source/FCPTools/FalloutCore/Robotics/CompSecuritronMode.cs new file mode 100644 index 0000000..537be48 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/CompSecuritronMode.cs @@ -0,0 +1,59 @@ +using Verse; + +namespace FCP.Core.Robotics +{ + public enum SecuritronMode : byte + { + GuardHome, + GuardPawn + } + + public class CompProperties_SecuritronMode : CompProperties + { + public CompProperties_SecuritronMode() + { + compClass = typeof(CompSecuritronMode); + } + } + + public class CompSecuritronMode : ThingComp + { + private SecuritronMode mode = SecuritronMode.GuardHome; + private Pawn guardedPawn; + + public CompProperties_SecuritronMode Props => (CompProperties_SecuritronMode)props; + public SecuritronMode Mode => mode; + public Pawn GuardedPawn => guardedPawn; + + public void SetGuardHome() + { + mode = SecuritronMode.GuardHome; + guardedPawn = null; + } + + public void SetGuardPawn(Pawn pawn) + { + mode = SecuritronMode.GuardPawn; + guardedPawn = pawn; + } + + public override void PostExposeData() + { + base.PostExposeData(); + Scribe_Values.Look(ref mode, "securitronMode", SecuritronMode.GuardHome); + Scribe_References.Look(ref guardedPawn, "guardedPawn"); + } + + public override string CompInspectStringExtra() + { + if ((parent as Pawn)?.Faction != RimWorld.Faction.OfPlayer) + { + return "FCP_SecuritronMode_Inspect".Translate("FCP_RobotMode_Wandering".Translate()); + } + + return mode == SecuritronMode.GuardHome + ? "FCP_SecuritronMode_Inspect".Translate("FCP_SecuritronMode_GuardHome".Translate()) + : "FCP_SecuritronMode_Inspect".Translate("FCP_SecuritronMode_GuardPawn".Translate(guardedPawn?.LabelShort ?? "?")); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/Dialog_RobotControl.cs b/Source/FCPTools/FalloutCore/Robotics/Dialog_RobotControl.cs new file mode 100644 index 0000000..3c1d00d --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/Dialog_RobotControl.cs @@ -0,0 +1,209 @@ +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using UnityEngine; +using Verse; + +namespace FCP.Core.Robotics +{ + public class Dialog_RobotControl : Window + { + private readonly Map map; + private Vector2 scrollPosition; + + public override Vector2 InitialSize => new Vector2(500f, 500f); + + public Dialog_RobotControl(Map map) + { + this.map = map; + doCloseX = true; + forcePause = true; + absorbInputAroundWindow = true; + } + + private List Robots => map.mapPawns.AllPawnsSpawned + .Where(p => p.Faction == Faction.OfPlayer && RobotUtility.IsAnyRobot(p)) + .ToList(); + + public override void DoWindowContents(Rect inRect) + { + Text.Font = GameFont.Medium; + var titleRect = new Rect(0f, 0f, inRect.width, 35f); + GUI.color = TerminalColors.PrimaryColor; + Widgets.Label(titleRect, "FCP_ControlRobots_Gizmo".Translate()); + GUI.color = Color.white; + + Text.Font = GameFont.Small; + var listRect = new Rect(0f, 45f, inRect.width, inRect.height - 90f); + DrawRobotList(listRect); + + var closeRect = new Rect(inRect.width - 100f, inRect.height - 40f, 90f, 35f); + if (Widgets.ButtonText(closeRect, "Close")) + { + Close(); + } + } + + private void DrawRobotList(Rect rect) + { + List robots = Robots; + if (robots.Count == 0) + { + Text.Anchor = TextAnchor.MiddleCenter; + GUI.color = TerminalColors.PrimaryColor; + Widgets.Label(rect, "FCP_ControlRobots_None".Translate()); + GUI.color = Color.white; + Text.Anchor = TextAnchor.UpperLeft; + return; + } + + var viewRect = new Rect(0f, 0f, rect.width - 20f, robots.Count * 90f); + Widgets.BeginScrollView(rect, ref scrollPosition, viewRect); + + float y = 0f; + foreach (Pawn robot in robots) + { + var rowRect = new Rect(0f, y, viewRect.width, 85f); + DrawRobotRow(rowRect, robot); + y += 90f; + } + + Widgets.EndScrollView(); + } + + private void DrawRobotRow(Rect rect, Pawn robot) + { + if (Mouse.IsOver(rect)) + { + Widgets.DrawLightHighlight(rect); + } + + var iconRect = new Rect(rect.x + 5f, rect.y + 5f, 45f, 45f); + RenderTexture portrait = PortraitsCache.Get(robot, iconRect.size, Rot4.South); + GUI.DrawTexture(iconRect, portrait); + + var labelRect = new Rect(iconRect.xMax + 10f, rect.y + 2f, rect.width - 65f, 25f); + GUI.color = TerminalColors.PrimaryColor; + Text.Font = GameFont.Small; + Widgets.Label(labelRect, robot.LabelShort); + GUI.color = Color.white; + + var modeLabelRect = new Rect(labelRect.x, labelRect.yMax, labelRect.width, 20f); + var buttonsRect = new Rect(rect.x, rect.y + 55f, rect.width - 10f, 28f); + + CompEyebotMode eyebotMode = robot.GetComp(); + if (eyebotMode != null) + { + DrawModeLabel(modeLabelRect, eyebotMode.Mode.ToString()); + DrawEyebotButtons(buttonsRect, eyebotMode); + return; + } + + CompSecuritronMode securitronMode = robot.GetComp(); + if (securitronMode != null) + { + string modeLabel = securitronMode.Mode == SecuritronMode.GuardHome + ? "FCP_SecuritronMode_GuardHome".Translate() + : "FCP_SecuritronMode_GuardPawn".Translate(securitronMode.GuardedPawn?.LabelShort ?? "?"); + DrawModeLabel(modeLabelRect, modeLabel); + DrawSecuritronButtons(buttonsRect, securitronMode); + return; + } + + CompProtectronMode protectronMode = robot.GetComp(); + if (protectronMode != null) + { + DrawModeLabel(modeLabelRect, protectronMode.Mode.ToString()); + DrawProtectronButtons(buttonsRect, protectronMode); + } + } + + private static void DrawModeLabel(Rect rect, string mode) + { + GUI.color = TerminalColors.PrimaryColor * 0.7f; + Text.Font = GameFont.Tiny; + Widgets.Label(rect, "FCP_EyebotMode_Inspect".Translate(mode)); + Text.Font = GameFont.Small; + GUI.color = Color.white; + } + + private static void DrawEyebotButtons(Rect rect, CompEyebotMode modeComp) + { + float buttonWidth = rect.width / 3f; + var defendRect = new Rect(rect.x, rect.y, buttonWidth, rect.height); + var musicRect = new Rect(defendRect.xMax + 5f, rect.y, buttonWidth, rect.height); + var exploreRect = new Rect(musicRect.xMax + 5f, rect.y, buttonWidth, rect.height); + + if (Widgets.ButtonText(defendRect, "FCP_EyebotMode_Defend".Translate())) + { + modeComp.SetMode(EyebotMode.Defend); + } + if (Widgets.ButtonText(musicRect, "FCP_EyebotMode_Music".Translate())) + { + modeComp.SetMode(EyebotMode.Music); + } + if (Widgets.ButtonText(exploreRect, "FCP_EyebotMode_Explore".Translate())) + { + modeComp.SetMode(EyebotMode.Explore); + } + } + + private void DrawSecuritronButtons(Rect rect, CompSecuritronMode modeComp) + { + float buttonWidth = (rect.width - 10f) / 3f; + var guardHomeRect = new Rect(rect.x, rect.y, buttonWidth, rect.height); + var guardPawnRect = new Rect(guardHomeRect.xMax + 5f, rect.y, buttonWidth, rect.height); + var faceRect = new Rect(guardPawnRect.xMax + 5f, rect.y, buttonWidth, rect.height); + + if (Widgets.ButtonText(guardHomeRect, "FCP_SecuritronMode_GuardHome".Translate())) + { + modeComp.SetGuardHome(); + } + if (Widgets.ButtonText(guardPawnRect, "FCP_SecuritronMode_GuardPawn_Pick".Translate())) + { + List options = new List(); + foreach (Pawn colonist in map.mapPawns.FreeColonists) + { + options.Add(new FloatMenuOption(colonist.LabelShort, () => modeComp.SetGuardPawn(colonist))); + } + if (options.Count == 0) + { + options.Add(new FloatMenuOption("FCP_ControlRobots_None".Translate(), null)); + } + Find.WindowStack.Add(new FloatMenu(options)); + } + if (Widgets.ButtonText(faceRect, "FCP_SecuritronFace_Pick".Translate())) + { + Pawn securitron = (Pawn)modeComp.parent; + CompSecuritronFace faceComp = securitron.GetComp(); + List options = new List(); + foreach (ThingDef faceDef in CompSecuritronFace.PlayerSelectableFaces) + { + options.Add(new FloatMenuOption(faceDef.LabelCap, () => faceComp.SetFace(faceDef))); + } + Find.WindowStack.Add(new FloatMenu(options)); + } + } + + private static void DrawProtectronButtons(Rect rect, CompProtectronMode modeComp) + { + float buttonWidth = (rect.width - 10f) / 3f; + var guardRect = new Rect(rect.x, rect.y, buttonWidth, rect.height); + var constructRect = new Rect(guardRect.xMax + 5f, rect.y, buttonWidth, rect.height); + var haulRect = new Rect(constructRect.xMax + 5f, rect.y, buttonWidth, rect.height); + + if (Widgets.ButtonText(guardRect, "FCP_ProtectronMode_Guard".Translate())) + { + modeComp.SetMode(ProtectronMode.Guard); + } + if (Widgets.ButtonText(constructRect, "FCP_ProtectronMode_Construct".Translate())) + { + modeComp.SetMode(ProtectronMode.Construct); + } + if (Widgets.ButtonText(haulRect, "FCP_ProtectronMode_Haul".Translate())) + { + modeComp.SetMode(ProtectronMode.Haul); + } + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/EyebotTierUtility.cs b/Source/FCPTools/FalloutCore/Robotics/EyebotTierUtility.cs new file mode 100644 index 0000000..7ebef0c --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/EyebotTierUtility.cs @@ -0,0 +1,126 @@ +using RimWorld; +using Verse; + +namespace FCP.Core.Robotics +{ + [DefOf] + public static class PawnKindDefOf_Eyebot + { + [MayRequire("Rick.FCP.Robotics")] + public static PawnKindDef FCP_Pawnkind_Eyebot_Normal; + [MayRequire("Rick.FCP.Robotics")] + public static PawnKindDef FCP_Pawnkind_Eyebot_Improved; + [MayRequire("Rick.FCP.Robotics")] + public static PawnKindDef FCP_Pawnkind_Eyebot_LonesomeRoad; + + static PawnKindDefOf_Eyebot() + { + DefOfHelper.EnsureInitializedInCtor(typeof(PawnKindDefOf_Eyebot)); + } + } + + [DefOf] + public static class HediffDefOf_Eyebot + { + [MayRequire("Rick.FCP.Robotics")] + public static HediffDef FCP_Hediff_Eyebot_Tier_Normal; + [MayRequire("Rick.FCP.Robotics")] + public static HediffDef FCP_Hediff_Eyebot_Tier_Improved; + [MayRequire("Rick.FCP.Robotics")] + public static HediffDef FCP_Hediff_Eyebot_Tier_LonesomeRoad; + + static HediffDefOf_Eyebot() + { + DefOfHelper.EnsureInitializedInCtor(typeof(HediffDefOf_Eyebot)); + } + } + + [DefOf] + public static class AbilityDefOf_Eyebot + { + [MayRequire("Rick.FCP.Robotics")] + public static AbilityDef FCP_Ability_Eyebot_Laser_Normal; + [MayRequire("Rick.FCP.Robotics")] + public static AbilityDef FCP_Ability_Eyebot_Laser_Improved; + [MayRequire("Rick.FCP.Robotics")] + public static AbilityDef FCP_Ability_Eyebot_Laser_LonesomeRoad; + + static AbilityDefOf_Eyebot() + { + DefOfHelper.EnsureInitializedInCtor(typeof(AbilityDefOf_Eyebot)); + } + } + + public static class EyebotTierUtility + { + public static PawnKindDef[] TierOrder => new[] + { + PawnKindDefOf_Eyebot.FCP_Pawnkind_Eyebot_Normal, + PawnKindDefOf_Eyebot.FCP_Pawnkind_Eyebot_Improved, + PawnKindDefOf_Eyebot.FCP_Pawnkind_Eyebot_LonesomeRoad, + }; + + public static HediffDef[] HediffOrder => new[] + { + HediffDefOf_Eyebot.FCP_Hediff_Eyebot_Tier_Normal, + HediffDefOf_Eyebot.FCP_Hediff_Eyebot_Tier_Improved, + HediffDefOf_Eyebot.FCP_Hediff_Eyebot_Tier_LonesomeRoad, + }; + + public static AbilityDef[] AbilityOrder => new[] + { + AbilityDefOf_Eyebot.FCP_Ability_Eyebot_Laser_Normal, + AbilityDefOf_Eyebot.FCP_Ability_Eyebot_Laser_Improved, + AbilityDefOf_Eyebot.FCP_Ability_Eyebot_Laser_LonesomeRoad, + }; + + public static bool IsEyebot(Pawn pawn) + { + return pawn?.kindDef != null && System.Array.IndexOf(TierOrder, pawn.kindDef) >= 0; + } + + public static int TierIndex(PawnKindDef kind) + { + return System.Array.IndexOf(TierOrder, kind); + } + + public static PawnKindDef GetNextTier(PawnKindDef current) + { + int index = TierIndex(current); + if (index < 0 || index >= TierOrder.Length - 1) + { + return null; + } + return TierOrder[index + 1]; + } + + public static void UpgradeTo(Pawn eyebot, PawnKindDef nextTier) + { + int currentIndex = TierIndex(eyebot.kindDef); + if (currentIndex >= 0) + { + Hediff oldTierHediff = eyebot.health.hediffSet.hediffs.Find(h => h.def == HediffOrder[currentIndex]); + if (oldTierHediff != null) + { + eyebot.health.RemoveHediff(oldTierHediff); + } + } + + if (currentIndex >= 0 && eyebot.abilities != null) + { + eyebot.abilities.RemoveAbility(AbilityOrder[currentIndex]); + } + + eyebot.kindDef = nextTier; + + int nextIndex = TierIndex(nextTier); + if (nextIndex >= 0) + { + eyebot.health.AddHediff(HediffOrder[nextIndex]); + eyebot.abilities?.GainAbility(AbilityOrder[nextIndex]); + } + + eyebot.Drawer.renderer.SetAllGraphicsDirty(); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/GenStep_DerelictRobot.cs b/Source/FCPTools/FalloutCore/Robotics/GenStep_DerelictRobot.cs new file mode 100644 index 0000000..baf25c9 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/GenStep_DerelictRobot.cs @@ -0,0 +1,54 @@ +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using Verse; + +namespace FCP.Core.Robotics +{ + public class GenStep_DerelictRobot : GenStep + { + public float chancePerMap = 0.06f; + public List characters = new List(); + + public override int SeedPart => 1927481157; + + public override void Generate(Map map, GenStepParams parms) + { + if (characters.NullOrEmpty() || !Rand.Chance(chancePerMap)) + { + return; + } + + UniqueCharactersTracker tracker = UniqueCharactersTracker.Instance; + if (tracker == null) + { + return; + } + + List candidates = characters.Where(c => !tracker.CharacterPawnExists(c)).ToList(); + if (candidates.Count == 0) + { + return; + } + + Pawn pawn = tracker.GetOrGenPawn(candidates.RandomElement()); + if (pawn == null) + { + return; + } + + if (!CellFinder.TryFindRandomCellNear(map.Center, map, 50, c => c.Standable(map) && !c.Fogged(map), out IntVec3 cell)) + { + cell = CellFinder.RandomCell(map); + } + + GenSpawn.Spawn(pawn, cell, map); + + CompRefuelable fuel = pawn.GetComp(); + if (fuel != null && fuel.Fuel > 0f) + { + fuel.ConsumeFuel(fuel.Fuel); + } + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/JobDefOf_Robotics.cs b/Source/FCPTools/FalloutCore/Robotics/JobDefOf_Robotics.cs new file mode 100644 index 0000000..a13a3f5 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/JobDefOf_Robotics.cs @@ -0,0 +1,18 @@ +using Verse; + +namespace FCP.Core.Robotics +{ + [DefOf] + public static class JobDefOf_Robotics + { + public static JobDef FCP_RobotDock; + public static JobDef FCP_UpgradeRobot; + public static JobDef FCP_ControlRobots; + public static JobDef FCP_HackRobot; + + static JobDefOf_Robotics() + { + DefOfHelper.EnsureInitializedInCtor(typeof(JobDefOf_Robotics)); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/JobDriver_ControlRobots.cs b/Source/FCPTools/FalloutCore/Robotics/JobDriver_ControlRobots.cs new file mode 100644 index 0000000..440c0da --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/JobDriver_ControlRobots.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class JobDriver_ControlRobots : JobDriver + { + private Thing Terminal => job.GetTarget(TargetIndex.A).Thing; + + public override bool TryMakePreToilReservations(bool errorOnFailed) + { + return pawn.Reserve(Terminal, job, 1, -1, null, errorOnFailed); + } + + protected override IEnumerable MakeNewToils() + { + this.FailOnDestroyedOrNull(TargetIndex.A); + + yield return Toils_Goto.GotoThing(TargetIndex.A, PathEndMode.InteractionCell); + + yield return new Toil + { + initAction = () => Terminal.TryGetComp()?.OpenRobotSelectMenu(), + defaultCompleteMode = ToilCompleteMode.Instant, + }; + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/JobDriver_HackRobot.cs b/Source/FCPTools/FalloutCore/Robotics/JobDriver_HackRobot.cs new file mode 100644 index 0000000..97f3716 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/JobDriver_HackRobot.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class JobDriver_HackRobot : JobDriver + { + private Pawn Target => (Pawn)job.GetTarget(TargetIndex.A).Thing; + + public override bool TryMakePreToilReservations(bool errorOnFailed) + { + return pawn.Reserve(Target, job, 1, -1, null, errorOnFailed); + } + + protected override IEnumerable MakeNewToils() + { + this.FailOnDestroyedOrNull(TargetIndex.A); + this.FailOn(() => Target.GetComp()?.CanBeHacked != true); + + yield return Toils_Goto.GotoThing(TargetIndex.A, PathEndMode.Touch); + + CompHackable hackable = Target.GetComp(); + Toil work = Toils_General.Wait(hackable?.Props.workTicks ?? 600); + work.WithProgressBarToilDelay(TargetIndex.A); + work.FailOnCannotTouch(TargetIndex.A, PathEndMode.Touch); + yield return work; + + yield return new Toil + { + initAction = () => Target.GetComp()?.AttemptHack(pawn), + defaultCompleteMode = ToilCompleteMode.Instant, + }; + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/JobDriver_RobotDock.cs b/Source/FCPTools/FalloutCore/Robotics/JobDriver_RobotDock.cs new file mode 100644 index 0000000..4681399 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/JobDriver_RobotDock.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class JobDriver_RobotDock : JobDriver + { + private Thing Bench => job.GetTarget(TargetIndex.A).Thing; + + public override bool TryMakePreToilReservations(bool errorOnFailed) + { + return pawn.Reserve(Bench, job, 1, -1, null, errorOnFailed); + } + + protected override IEnumerable MakeNewToils() + { + this.FailOnDestroyedOrNull(TargetIndex.A); + this.FailOn(() => pawn.GetComp()?.PendingBench != Bench); + + yield return Toils_Goto.GotoCell(Bench.OccupiedRect().CenterCell, PathEndMode.OnCell); + + Toil hold = new Toil + { + defaultCompleteMode = ToilCompleteMode.Never, + }; + yield return hold; + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/JobDriver_UpgradeRobot.cs b/Source/FCPTools/FalloutCore/Robotics/JobDriver_UpgradeRobot.cs new file mode 100644 index 0000000..f9b2cfb --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/JobDriver_UpgradeRobot.cs @@ -0,0 +1,68 @@ +using System.Collections.Generic; +using RimWorld; +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class JobDriver_UpgradeRobot : JobDriver + { + private const int WorkTicks = 320; + + private Thing Bench => job.GetTarget(TargetIndex.A).Thing; + private Pawn Robot => (Pawn)job.GetTarget(TargetIndex.B).Thing; + + public override bool TryMakePreToilReservations(bool errorOnFailed) + { + return pawn.Reserve(Bench, job, 1, -1, null, errorOnFailed) && pawn.Reserve(Robot, job, 1, -1, null, errorOnFailed); + } + + protected override IEnumerable MakeNewToils() + { + this.FailOnDestroyedOrNull(TargetIndex.A); + this.FailOnDestroyedOrNull(TargetIndex.B); + this.FailOn(() => Robot.CurJobDef != JobDefOf_Robotics.FCP_RobotDock); + + yield return Toils_Goto.GotoThing(TargetIndex.A, PathEndMode.InteractionCell); + + Toil work = Toils_General.Wait(WorkTicks); + work.WithProgressBarToilDelay(TargetIndex.A); + work.FailOnCannotTouch(TargetIndex.A, PathEndMode.InteractionCell); + yield return work; + + yield return new Toil + { + initAction = FinishUpgrade, + defaultCompleteMode = ToilCompleteMode.Instant, + }; + } + + private void FinishUpgrade() + { + IRobotTierProvider provider = RobotUtility.GetProvider(Robot); + PawnKindDef nextTier = provider?.GetNextTier(Robot.kindDef); + if (nextTier == null) + { + return; + } + + RobotTierExtension tierExt = nextTier.GetModExtension(); + if (tierExt != null && !RobotUpgradeUtility.TryConsumeCost(pawn.Map, tierExt.upgradeCost)) + { + return; + } + + provider.UpgradeTo(Robot, nextTier); + + CompRobotUpgrade upgradeComp = Robot.GetComp(); + if (upgradeComp != null) + { + upgradeComp.PendingBench = null; + } + if (Robot.CurJobDef == JobDefOf_Robotics.FCP_RobotDock) + { + Robot.jobs.EndCurrentJob(JobCondition.InterruptForced); + } + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/JobGiver_EyebotMode.cs b/Source/FCPTools/FalloutCore/Robotics/JobGiver_EyebotMode.cs new file mode 100644 index 0000000..787d7f3 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/JobGiver_EyebotMode.cs @@ -0,0 +1,144 @@ +using System.Linq; +using RimWorld; +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class JobGiver_EyebotMode : JobGiver_AIFightEnemy + { + private const int ExploreScanIntervalTicks = 2500; + private const int ExploreScanRadius = 8; + private const int MusicJoyIntervalTicks = 2000; + private const float MusicJoyRadius = 12f; + private const float MusicJoyAmount = 0.03f; + + protected override Job TryGiveJob(Pawn pawn) + { + CompRobotUpgrade upgradeComp = pawn.GetComp(); + if (upgradeComp?.PendingBench != null) + { + if (!upgradeComp.PendingBench.Spawned) + { + upgradeComp.PendingBench = null; + } + else + { + return JobMaker.MakeJob(JobDefOf_Robotics.FCP_RobotDock, upgradeComp.PendingBench); + } + } + + CompRefuelable fuel = pawn.GetComp(); + if (fuel != null && !fuel.HasFuel) + { + return null; + } + + if (pawn.Faction == null) + { + return null; + } + + CompEyebotMode modeComp = pawn.GetComp(); + if (modeComp == null) + { + return null; + } + + return modeComp.Mode switch + { + EyebotMode.Defend => base.TryGiveJob(pawn), + EyebotMode.Scavenge => TryScavenge(pawn), + EyebotMode.Explore => TryExplore(pawn), + EyebotMode.Music => TryMusic(pawn), + _ => null, + }; + } + + protected override bool ExtraTargetValidator(Pawn pawn, Thing target) + { + if (!base.ExtraTargetValidator(pawn, target)) + { + return false; + } + return pawn.Map.areaManager.Home[target.Position]; + } + + protected override bool TryFindShootingPosition(Pawn pawn, out IntVec3 dest, Verb verbToUse = null) + { + Thing enemyTarget = pawn.mindState.enemyTarget; + Verb verb = verbToUse ?? pawn.TryGetAttackVerb(enemyTarget, !pawn.IsColonist); + if (verb == null) + { + dest = IntVec3.Invalid; + return false; + } + + return CastPositionFinder.TryFindCastPosition(new CastPositionRequest + { + caster = pawn, + target = enemyTarget, + verb = verb, + maxRangeFromTarget = 9999f, + locus = pawn.Position, + maxRangeFromLocus = 9999f, + wantCoverFromTarget = verb.EffectiveRange > 7f, + }, out dest); + } + + private static Job TryScavenge(Pawn pawn) + { + WorkGiver_HaulGeneral haulGiver = (WorkGiver_HaulGeneral)DefDatabase.GetNamed("HaulGeneral").Worker; + Thing haulable = GenClosest.ClosestThingReachable(pawn.Position, pawn.Map, + ThingRequest.ForGroup(ThingRequestGroup.HaulableEver), PathEndMode.ClosestTouch, + TraverseParms.For(pawn), 9999f, + thing => haulGiver.HasJobOnThing(pawn, thing)); + + return haulable == null ? null : haulGiver.JobOnThing(pawn, haulable); + } + + private static Job TryExplore(Pawn pawn) + { + CompEyebotExplorer explorer = pawn.GetComp(); + if (explorer != null && Find.TickManager.TicksGame >= explorer.NextScanTick) + { + explorer.NextScanTick = Find.TickManager.TicksGame + ExploreScanIntervalTicks; + explorer.ScanForSites(ExploreScanRadius); + } + + IntVec3 wanderRoot = pawn.Map.IsPlayerHome ? pawn.Map.Center : pawn.Position; + IntVec3 wanderCell = RCellFinder.RandomWanderDestFor(pawn, wanderRoot, 10f, null, Danger.None); + if (!wanderCell.IsValid) + { + return null; + } + + return JobMaker.MakeJob(JobDefOf.GotoWander, wanderCell); + } + + private static Job TryMusic(Pawn pawn) + { + CompEyebotMusicPlayer musicPlayer = pawn.GetComp(); + if (musicPlayer?.LoadedTapeDef != null && Find.TickManager.TicksGame >= musicPlayer.NextJoyTick) + { + musicPlayer.NextJoyTick = Find.TickManager.TicksGame + MusicJoyIntervalTicks; + foreach (Pawn nearby in GenRadial.RadialDistinctThingsAround(pawn.Position, pawn.Map, MusicJoyRadius, true).OfType()) + { + if (nearby.Faction == Faction.OfPlayer && nearby.needs?.joy != null) + { + nearby.needs.joy.GainJoy(MusicJoyAmount, JoyKindDefOf.Social); + } + } + } + + IntVec3 wanderRoot = pawn.Map.IsPlayerHome ? pawn.Map.Center : pawn.Position; + IntVec3 wanderCell = RCellFinder.RandomWanderDestFor(pawn, wanderRoot, 10f, null, Danger.None); + if (!wanderCell.IsValid) + { + return null; + } + + return JobMaker.MakeJob(JobDefOf.GotoWander, wanderCell); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/JobGiver_ProtectronMode.cs b/Source/FCPTools/FalloutCore/Robotics/JobGiver_ProtectronMode.cs new file mode 100644 index 0000000..5cc82aa --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/JobGiver_ProtectronMode.cs @@ -0,0 +1,112 @@ +using RimWorld; +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class JobGiver_ProtectronMode : JobGiver_AIFightEnemy + { + protected override Job TryGiveJob(Pawn pawn) + { + CompRefuelable fuel = pawn.GetComp(); + if (fuel != null && !fuel.HasFuel) + { + return null; + } + + if (pawn.Faction == null) + { + return null; + } + + CompProtectronMode modeComp = pawn.GetComp(); + if (modeComp == null) + { + return null; + } + + switch (modeComp.Mode) + { + case ProtectronMode.Guard: + return CompProtectronLoadout.HasHand(pawn, ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Hand_Gun) + ? base.TryGiveJob(pawn) + : null; + case ProtectronMode.Construct: + bool hasConstructHead = CompProtectronLoadout.HasHead(pawn, ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Head_Construct); + bool hasWorkHand = CompProtectronLoadout.HasHand(pawn, ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Hand_Work); + return hasConstructHead && hasWorkHand ? TryConstruct(pawn) : null; + case ProtectronMode.Haul: + return CompProtectronLoadout.HasHand(pawn, ThingDefOf_ProtectronLoadout.FCP_Apparel_Protectron_Hand_Default) + ? TryHaul(pawn) + : null; + default: + return null; + } + } + + protected override bool ExtraTargetValidator(Pawn pawn, Thing target) + { + if (!base.ExtraTargetValidator(pawn, target)) + { + return false; + } + return pawn.Map.areaManager.Home[target.Position]; + } + + protected override bool TryFindShootingPosition(Pawn pawn, out IntVec3 dest, Verb verbToUse = null) + { + Thing enemyTarget = pawn.mindState.enemyTarget; + Verb verb = verbToUse ?? pawn.TryGetAttackVerb(enemyTarget, !pawn.IsColonist); + if (verb == null) + { + dest = IntVec3.Invalid; + return false; + } + + return CastPositionFinder.TryFindCastPosition(new CastPositionRequest + { + caster = pawn, + target = enemyTarget, + verb = verb, + maxRangeFromTarget = 9999f, + locus = pawn.Position, + maxRangeFromLocus = 9999f, + wantCoverFromTarget = verb.EffectiveRange > 7f, + }, out dest); + } + + private static Job TryHaul(Pawn pawn) + { + WorkGiver_HaulGeneral haulGiver = (WorkGiver_HaulGeneral)DefDatabase.GetNamed("HaulGeneral").Worker; + Thing haulable = GenClosest.ClosestThingReachable(pawn.Position, pawn.Map, + ThingRequest.ForGroup(ThingRequestGroup.HaulableEver), PathEndMode.ClosestTouch, + TraverseParms.For(pawn), 9999f, + thing => haulGiver.HasJobOnThing(pawn, thing)); + + return haulable == null ? null : haulGiver.JobOnThing(pawn, haulable); + } + + private static Job TryConstruct(Pawn pawn) + { + return TryWorkGiver(pawn, "ConstructDeliverResourcesToBlueprints", ThingRequestGroup.Blueprint) + ?? TryWorkGiver(pawn, "ConstructDeliverResourcesToFrames", ThingRequestGroup.BuildingFrame) + ?? TryWorkGiver(pawn, "ConstructFinishFrames", ThingRequestGroup.BuildingFrame); + } + + private static Job TryWorkGiver(Pawn pawn, string workGiverDefName, ThingRequestGroup group) + { + WorkGiverDef def = DefDatabase.GetNamedSilentFail(workGiverDefName); + if (!(def?.Worker is WorkGiver_Scanner giver)) + { + return null; + } + + Thing target = GenClosest.ClosestThingReachable(pawn.Position, pawn.Map, + ThingRequest.ForGroup(group), PathEndMode.Touch, + TraverseParms.For(pawn), 9999f, + thing => giver.HasJobOnThing(pawn, thing)); + + return target == null ? null : giver.JobOnThing(pawn, target); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/JobGiver_RobotPoweredDown.cs b/Source/FCPTools/FalloutCore/Robotics/JobGiver_RobotPoweredDown.cs new file mode 100644 index 0000000..63654dd --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/JobGiver_RobotPoweredDown.cs @@ -0,0 +1,17 @@ +using RimWorld; +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class JobGiver_RobotPoweredDown : ThinkNode_JobGiver + { + protected override Job TryGiveJob(Pawn pawn) + { + Job job = JobMaker.MakeJob(JobDefOf.Wait_MaintainPosture); + job.expiryInterval = -1; + job.checkOverrideOnExpire = true; + return job; + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/JobGiver_SecuritronMode.cs b/Source/FCPTools/FalloutCore/Robotics/JobGiver_SecuritronMode.cs new file mode 100644 index 0000000..a9f0f31 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/JobGiver_SecuritronMode.cs @@ -0,0 +1,86 @@ +using RimWorld; +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class JobGiver_SecuritronMode : JobGiver_AIFightEnemy + { + private const float FollowRadius = 6f; + private const float GuardEngageRadius = 15f; + + protected override Job TryGiveJob(Pawn pawn) + { + CompRefuelable fuel = pawn.GetComp(); + if (fuel != null && !fuel.HasFuel) + { + return null; + } + + if (pawn.Faction == null) + { + return null; + } + + CompSecuritronMode modeComp = pawn.GetComp(); + if (modeComp == null) + { + return null; + } + + if (modeComp.Mode == SecuritronMode.GuardPawn && modeComp.GuardedPawn != null && modeComp.GuardedPawn.Spawned) + { + Job fightJob = base.TryGiveJob(pawn); + if (fightJob != null) + { + return fightJob; + } + if (!pawn.Position.InHorDistOf(modeComp.GuardedPawn.Position, FollowRadius)) + { + return JobMaker.MakeJob(JobDefOf.Goto, modeComp.GuardedPawn.Position); + } + return null; + } + + return base.TryGiveJob(pawn); + } + + protected override bool ExtraTargetValidator(Pawn pawn, Thing target) + { + if (!base.ExtraTargetValidator(pawn, target)) + { + return false; + } + + CompSecuritronMode modeComp = pawn.GetComp(); + if (modeComp?.Mode == SecuritronMode.GuardPawn && modeComp.GuardedPawn != null) + { + return target.Position.InHorDistOf(modeComp.GuardedPawn.Position, GuardEngageRadius); + } + + return pawn.Map.areaManager.Home[target.Position]; + } + + protected override bool TryFindShootingPosition(Pawn pawn, out IntVec3 dest, Verb verbToUse = null) + { + Thing enemyTarget = pawn.mindState.enemyTarget; + Verb verb = verbToUse ?? pawn.TryGetAttackVerb(enemyTarget, !pawn.IsColonist); + if (verb == null) + { + dest = IntVec3.Invalid; + return false; + } + + return CastPositionFinder.TryFindCastPosition(new CastPositionRequest + { + caster = pawn, + target = enemyTarget, + verb = verb, + maxRangeFromTarget = 9999f, + locus = pawn.Position, + maxRangeFromLocus = 9999f, + wantCoverFromTarget = verb.EffectiveRange > 7f, + }, out dest); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/PawnRenderNodeWorker_RobotBody.cs b/Source/FCPTools/FalloutCore/Robotics/PawnRenderNodeWorker_RobotBody.cs new file mode 100644 index 0000000..8184e02 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/PawnRenderNodeWorker_RobotBody.cs @@ -0,0 +1,18 @@ +using Verse; + +namespace FCP.Core.Robotics +{ + public class PawnRenderNodeWorker_RobotBody : PawnRenderNodeWorker_AnimalBody + { + protected override Graphic GetGraphic(PawnRenderNode node, PawnDrawParms parms) + { + Graphic baseGraphic = base.GetGraphic(node, parms); + CompColorable colorable = parms.pawn?.GetComp(); + if (baseGraphic != null && colorable != null && colorable.Active && colorable.Color != baseGraphic.Color) + { + return baseGraphic.GetColoredVersion(baseGraphic.Shader, colorable.Color, baseGraphic.ColorTwo); + } + return baseGraphic; + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/PawnRenderNode_RobotApparelOverlay.cs b/Source/FCPTools/FalloutCore/Robotics/PawnRenderNode_RobotApparelOverlay.cs new file mode 100644 index 0000000..e540415 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/PawnRenderNode_RobotApparelOverlay.cs @@ -0,0 +1,115 @@ +using System.Collections.Generic; +using RimWorld; +using UnityEngine; +using Verse; + +namespace FCP.Core.Robotics +{ + public class PawnRenderNodeProperties_RobotApparelOverlay : PawnRenderNodeProperties + { + public BodyPartGroupDef targetGroup; + public float overlayScale = 1f; + public bool hideOnNorth = false; + } + + public class RobotApparelEastTexture : DefModExtension + { + public string texPath; + } + + [StaticConstructorOnStartup] + public static class RobotApparelEastGraphicCache + { + private static readonly Dictionary Cache = new Dictionary(); + + static RobotApparelEastGraphicCache() + { + foreach (ThingDef def in DefDatabase.AllDefs) + { + string texPath = def.GetModExtension()?.texPath; + if (texPath != null && !Cache.ContainsKey(texPath)) + { + Cache[texPath] = GraphicDatabase.Get(texPath, ShaderDatabase.Cutout, Vector2.one, Color.white); + } + } + } + + public static Graphic GetFor(Apparel apparel) + { + string texPath = apparel.def.GetModExtension()?.texPath; + return texPath != null && Cache.TryGetValue(texPath, out Graphic graphic) ? graphic : null; + } + } + + public class PawnRenderNode_RobotApparelOverlay : PawnRenderNode + { + public PawnRenderNode_RobotApparelOverlay(Pawn pawn, PawnRenderNodeProperties props, PawnRenderTree tree) + : base(pawn, props, tree) + { + } + + private PawnRenderNodeProperties_RobotApparelOverlay OverlayProps => (PawnRenderNodeProperties_RobotApparelOverlay)props; + + public float OverlayScale => OverlayProps.overlayScale; + public bool HideOnNorth => OverlayProps.hideOnNorth; + + public Apparel CurrentApparel(Pawn pawn) + { + BodyPartGroupDef group = OverlayProps.targetGroup; + if (pawn?.apparel == null || group == null) + { + return null; + } + + foreach (Apparel apparel in pawn.apparel.WornApparel) + { + if (apparel.def.apparel.bodyPartGroups.Contains(group)) + { + return apparel; + } + } + return null; + } + } + + public class PawnRenderNodeWorker_RobotApparelOverlay : PawnRenderNodeWorker + { + protected override Graphic GetGraphic(PawnRenderNode node, PawnDrawParms parms) + { + PawnRenderNode_RobotApparelOverlay casted = (PawnRenderNode_RobotApparelOverlay)node; + if (casted.HideOnNorth && parms.facing == Rot4.North) + { + return null; + } + + Apparel apparel = casted.CurrentApparel(parms.pawn); + if (apparel == null) + { + return null; + } + + Graphic graphic = null; + if (parms.facing == Rot4.East || parms.facing == Rot4.West) + { + graphic = RobotApparelEastGraphicCache.GetFor(apparel); + } + if (graphic == null) + { + graphic = apparel.Graphic; + } + + CompColorable colorable = apparel.GetComp(); + if (graphic != null && colorable != null && colorable.Active && colorable.Color != graphic.Color) + { + return graphic.GetColoredVersion(graphic.Shader, colorable.Color, graphic.ColorTwo); + } + return graphic; + } + + public override Vector3 ScaleFor(PawnRenderNode node, PawnDrawParms parms) + { + float scale = ((PawnRenderNode_RobotApparelOverlay)node).OverlayScale; + return new Vector3(scale, 1f, scale); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/ProtectronDefOfs.cs b/Source/FCPTools/FalloutCore/Robotics/ProtectronDefOfs.cs new file mode 100644 index 0000000..0a558e6 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/ProtectronDefOfs.cs @@ -0,0 +1,57 @@ +using RimWorld; +using Verse; + +namespace FCP.Core.Robotics +{ + [DefOf] + public static class PawnKindDefOf_Protectron + { + [MayRequire("Rick.FCP.Robotics")] + public static PawnKindDef FCP_Pawnkind_Protectron_VersionA; + [MayRequire("Rick.FCP.Robotics")] + public static PawnKindDef FCP_Pawnkind_Protectron_VersionB; + [MayRequire("Rick.FCP.Robotics")] + public static PawnKindDef FCP_Pawnkind_Protectron_Construction; + [MayRequire("Rick.FCP.Robotics")] + public static PawnKindDef FCP_Pawnkind_Protectron_Police; + + static PawnKindDefOf_Protectron() + { + DefOfHelper.EnsureInitializedInCtor(typeof(PawnKindDefOf_Protectron)); + } + } + + [DefOf] + public static class ThingDefOf_Protectron + { + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Protectron; + + static ThingDefOf_Protectron() + { + DefOfHelper.EnsureInitializedInCtor(typeof(ThingDefOf_Protectron)); + } + } + + [DefOf] + public static class ThingDefOf_ProtectronLoadout + { + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Apparel_Protectron_Head_Default; + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Apparel_Protectron_Head_Construct; + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Apparel_Protectron_Hand_Default; + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Apparel_Protectron_Hand_Work; + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Apparel_Protectron_Hand_Gun; + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Gun_Protectron_Arm; + + static ThingDefOf_ProtectronLoadout() + { + DefOfHelper.EnsureInitializedInCtor(typeof(ThingDefOf_ProtectronLoadout)); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/QuestNode_Root_RobotCharacterJoin.cs b/Source/FCPTools/FalloutCore/Robotics/QuestNode_Root_RobotCharacterJoin.cs new file mode 100644 index 0000000..3bd968a --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/QuestNode_Root_RobotCharacterJoin.cs @@ -0,0 +1,33 @@ +using RimWorld; +using RimWorld.Planet; +using RimWorld.QuestGen; +using Verse; + +namespace FCP.Core.Robotics +{ + public class QuestNode_Root_RobotCharacterJoin : QuestNode_Root_RobotJoin + { + public SlateRef characterDef; + + public override Pawn GeneratePawn() + { + CharacterDef charDef = characterDef.GetValue(QuestGen.slate); + Pawn pawn; + WildRobotSpawn_Patch.Suppress = true; + try + { + pawn = UniqueCharactersTracker.Instance.GetOrGenPawn(charDef); + } + finally + { + WildRobotSpawn_Patch.Suppress = false; + } + + if (!pawn.IsWorldPawn()) + { + Find.WorldPawns.PassToWorld(pawn); + } + return pawn; + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/QuestNode_Root_RobotJoin.cs b/Source/FCPTools/FalloutCore/Robotics/QuestNode_Root_RobotJoin.cs new file mode 100644 index 0000000..0f4e9a2 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/QuestNode_Root_RobotJoin.cs @@ -0,0 +1,80 @@ +using RimWorld; +using RimWorld.Planet; +using RimWorld.QuestGen; +using Verse; + +namespace FCP.Core.Robotics +{ + public class QuestNode_Root_RobotJoin : QuestNode_Root_WandererJoin + { + private const int TimeoutTicks = 30000; + + public SlateRef kindDef; + + private string signalAccept; + private string signalReject; + + protected override void RunInt() + { + base.RunInt(); + Quest quest = QuestGen.quest; + quest.Delay(TimeoutTicks, delegate + { + QuestGen_End.End(quest, QuestEndOutcome.Fail); + }); + } + + public override Pawn GeneratePawn() + { + PawnKindDef kind = kindDef.GetValue(QuestGen.slate); + Pawn pawn; + WildRobotSpawn_Patch.Suppress = true; + try + { + pawn = PawnGenerator.GeneratePawn(kind); + } + finally + { + WildRobotSpawn_Patch.Suppress = false; + } + + if (!pawn.IsWorldPawn()) + { + Find.WorldPawns.PassToWorld(pawn); + } + return pawn; + } + + protected override void AddSpawnPawnQuestParts(Quest quest, Map map, Pawn pawn) + { + signalAccept = QuestGenUtility.HardcodedSignalWithQuestID("Accept"); + signalReject = QuestGenUtility.HardcodedSignalWithQuestID("Reject"); + + quest.Signal(signalAccept, delegate + { + quest.SetFaction(Gen.YieldSingle(pawn), Faction.OfPlayer); + quest.PawnsArrive(Gen.YieldSingle(pawn), null, map.Parent); + QuestGen_End.End(quest, QuestEndOutcome.Success); + }); + + quest.Signal(signalReject, delegate + { + QuestGen_End.End(quest, QuestEndOutcome.Fail); + }); + } + + [System.Obsolete] + public override void SendLetter(Quest quest, Pawn pawn) + { + TaggedString letterTitle = "FCP_LetterLabel_RobotJoins".Translate(pawn.Named("PAWN")).AdjustedFor(pawn); + TaggedString letterText = "FCP_Letter_RobotJoins".Translate(pawn.Named("PAWN")).AdjustedFor(pawn); + ChoiceLetter_AcceptJoinerScenario choiceLetter = (ChoiceLetter_AcceptJoinerScenario)LetterMaker.MakeLetter(letterTitle, letterText, FCPDefOf.FCP_Letter_AcceptRobotJoin); + choiceLetter.signalAccept = signalAccept; + choiceLetter.signalReject = signalReject; + choiceLetter.quest = quest; + choiceLetter.overrideMap = Find.AnyPlayerHomeMap; + choiceLetter.StartTimeout(TimeoutTicks); + Find.LetterStack.ReceiveLetter(choiceLetter); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/RecipeWorker_BuildRobot.cs b/Source/FCPTools/FalloutCore/Robotics/RecipeWorker_BuildRobot.cs new file mode 100644 index 0000000..563a2af --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/RecipeWorker_BuildRobot.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using RimWorld; +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class RobotBuildExtension : DefModExtension + { + public PawnKindDef kindDef; + } + + public class RecipeWorker_BuildRobot : RecipeWorker + { + public override void Notify_IterationCompleted(Pawn billDoer, List ingredients) + { + RobotBuildExtension ext = recipe.GetModExtension(); + if (ext?.kindDef == null) + { + return; + } + + Thing bench = billDoer.CurJob.GetTarget(TargetIndex.A).Thing; + IntVec3 spawnCell = bench?.InteractionCell ?? billDoer.Position; + + PawnGenerationRequest request = new PawnGenerationRequest(ext.kindDef, Faction.OfPlayer); + Pawn robot = PawnGenerator.GeneratePawn(request); + GenSpawn.Spawn(robot, spawnCell, billDoer.Map); + + CompRefuelable fuel = robot.GetComp(); + if (fuel != null && fuel.Fuel > 0f) + { + fuel.ConsumeFuel(fuel.Fuel); + } + + billDoer.skills.Learn(SkillDefOf.Crafting, 1f); + Messages.Message("FCP_BuildRobot_Done".Translate(billDoer.LabelShort, robot.LabelShort), robot, MessageTypeDefOf.PositiveEvent, historical: false); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/RobotPresetExtensions.cs b/Source/FCPTools/FalloutCore/Robotics/RobotPresetExtensions.cs new file mode 100644 index 0000000..e5159e9 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/RobotPresetExtensions.cs @@ -0,0 +1,20 @@ +using UnityEngine; +using Verse; + +namespace FCP.Core.Robotics +{ + public class SecuritronPresetExtension : DefModExtension + { + public ThingDef face; + public SecuritronWeapon weapon = SecuritronWeapon.Gun; + public float rocketsChance; + } + + public class ProtectronPresetExtension : DefModExtension + { + public bool hasHead = true; + public ThingDef head; + public ThingDef hand; + public Color? color; + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/RobotUpgradeUtility.cs b/Source/FCPTools/FalloutCore/Robotics/RobotUpgradeUtility.cs new file mode 100644 index 0000000..adbf8d2 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/RobotUpgradeUtility.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using Verse; + +namespace FCP.Core.Robotics +{ + public class RobotTierExtension : DefModExtension + { + public ResearchProjectDef researchPrerequisite; + public List upgradeCost = new List(); + } + + public static class RobotUpgradeUtility + { + public static bool CanAffordCost(Map map, List cost) + { + foreach (ThingDefCountClass entry in cost) + { + if (map.resourceCounter.GetCount(entry.thingDef) < entry.count) + { + return false; + } + } + return true; + } + + public static bool TryConsumeCost(Map map, List cost) + { + if (!CanAffordCost(map, cost)) + { + return false; + } + + foreach (ThingDefCountClass entry in cost) + { + int remaining = entry.count; + foreach (Thing thing in map.listerThings.ThingsOfDef(entry.thingDef).ToList()) + { + if (remaining <= 0) + { + break; + } + if (!thing.Spawned) + { + continue; + } + int consume = Math.Min(remaining, thing.stackCount); + thing.SplitOff(consume).Destroy(); + remaining -= consume; + } + } + return true; + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/RobotUtility.cs b/Source/FCPTools/FalloutCore/Robotics/RobotUtility.cs new file mode 100644 index 0000000..d0deeac --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/RobotUtility.cs @@ -0,0 +1,93 @@ +using System.Collections.Generic; +using System.Linq; +using RimWorld; +using UnityEngine; +using Verse; + +namespace FCP.Core.Robotics +{ + public interface IRobotTierProvider + { + bool IsThisRace(Pawn pawn); + PawnKindDef GetNextTier(PawnKindDef current); + void UpgradeTo(Pawn robot, PawnKindDef nextTier); + } + + public class EyebotTierProvider : IRobotTierProvider + { + public bool IsThisRace(Pawn pawn) => EyebotTierUtility.IsEyebot(pawn); + public PawnKindDef GetNextTier(PawnKindDef current) => EyebotTierUtility.GetNextTier(current); + public void UpgradeTo(Pawn robot, PawnKindDef nextTier) => EyebotTierUtility.UpgradeTo(robot, nextTier); + } + + public class SecuritronTierProvider : IRobotTierProvider + { + public bool IsThisRace(Pawn pawn) => pawn?.kindDef?.race == ThingDefOf_Securitron.FCP_Securitron; + public PawnKindDef GetNextTier(PawnKindDef current) => null; + public void UpgradeTo(Pawn robot, PawnKindDef nextTier) { } + } + + public class ProtectronTierProvider : IRobotTierProvider + { + public bool IsThisRace(Pawn pawn) => pawn?.kindDef?.race == ThingDefOf_Protectron.FCP_Protectron; + public PawnKindDef GetNextTier(PawnKindDef current) => null; + public void UpgradeTo(Pawn robot, PawnKindDef nextTier) { } + } + + public static class RobotUtility + { + private static readonly List Providers = new List + { + new EyebotTierProvider(), + new SecuritronTierProvider(), + new ProtectronTierProvider(), + }; + + public static bool IsAnyRobot(Pawn pawn) => Providers.Any(p => p.IsThisRace(pawn)); + + public static IRobotTierProvider GetProvider(Pawn pawn) => Providers.FirstOrDefault(p => p.IsThisRace(pawn)); + + public static void TouchGraphic(Thing thing) + { + if (thing != null) + { + _ = thing.Graphic; + } + } + + public static void TouchBodyColor(Pawn pawn) + { + CompColorable colorable = pawn?.GetComp(); + if (colorable == null || !colorable.Active) + { + return; + } + + GraphicData data = pawn.kindDef?.lifeStages?.FirstOrDefault()?.bodyGraphicData; + Graphic baseGraphic = data?.Graphic; + if (baseGraphic == null) + { + return; + } + + _ = baseGraphic.GetColoredVersion(baseGraphic.Shader, colorable.Color, baseGraphic.ColorTwo); + } + + public static Color GetBodyColor(Pawn pawn) + { + CompColorable colorable = pawn?.GetComp(); + if (colorable != null && colorable.Active) + { + return colorable.Color; + } + + PawnKindLifeStage lifeStage = pawn?.kindDef?.lifeStages?.FirstOrDefault(); + if (lifeStage?.bodyGraphicData != null) + { + return lifeStage.bodyGraphicData.color; + } + + return Color.white; + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/SecuritronDefOfs.cs b/Source/FCPTools/FalloutCore/Robotics/SecuritronDefOfs.cs new file mode 100644 index 0000000..c25c4a1 --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/SecuritronDefOfs.cs @@ -0,0 +1,63 @@ +using RimWorld; +using Verse; + +namespace FCP.Core.Robotics +{ + [DefOf] + public static class PawnKindDefOf_Securitron + { + [MayRequire("Rick.FCP.Robotics")] + public static PawnKindDef FCP_Pawnkind_Securitron_Normal; + [MayRequire("Rick.FCP.Robotics")] + public static PawnKindDef FCP_Pawnkind_Securitron_Police; + [MayRequire("Rick.FCP.Robotics")] + public static PawnKindDef FCP_Pawnkind_Securitron_Soldier; + [MayRequire("Rick.FCP.Robotics")] + public static PawnKindDef FCP_Pawnkind_Securitron_Berserk; + + static PawnKindDefOf_Securitron() + { + DefOfHelper.EnsureInitializedInCtor(typeof(PawnKindDefOf_Securitron)); + } + } + + [DefOf] + public static class ThingDefOf_Securitron + { + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Securitron; + + static ThingDefOf_Securitron() + { + DefOfHelper.EnsureInitializedInCtor(typeof(ThingDefOf_Securitron)); + } + } + + [DefOf] + public static class AbilityDefOf_Securitron + { + [MayRequire("Rick.FCP.Robotics")] + public static AbilityDef FCP_Ability_Securitron_Rockets; + + static AbilityDefOf_Securitron() + { + DefOfHelper.EnsureInitializedInCtor(typeof(AbilityDefOf_Securitron)); + } + } + + [DefOf] + public static class ThingDefOf_SecuritronLoadout + { + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Apparel_Securitron_RocketPod; + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Gun_Securitron_Arm; + [MayRequire("Rick.FCP.Robotics")] + public static ThingDef FCP_Gun_Securitron_GrenadeLauncher; + + static ThingDefOf_SecuritronLoadout() + { + DefOfHelper.EnsureInitializedInCtor(typeof(ThingDefOf_SecuritronLoadout)); + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/ThinkNode_ConditionalHasFuel.cs b/Source/FCPTools/FalloutCore/Robotics/ThinkNode_ConditionalHasFuel.cs new file mode 100644 index 0000000..c3b49da --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/ThinkNode_ConditionalHasFuel.cs @@ -0,0 +1,14 @@ +using Verse; +using Verse.AI; + +namespace FCP.Core.Robotics +{ + public class ThinkNode_ConditionalHasFuel : ThinkNode_Conditional + { + protected override bool Satisfied(Pawn pawn) + { + CompRefuelable fuel = pawn.GetComp(); + return fuel == null || fuel.HasFuel; + } + } +} diff --git a/Source/FCPTools/FalloutCore/Robotics/WildRobotSpawn_Patch.cs b/Source/FCPTools/FalloutCore/Robotics/WildRobotSpawn_Patch.cs new file mode 100644 index 0000000..c314b1b --- /dev/null +++ b/Source/FCPTools/FalloutCore/Robotics/WildRobotSpawn_Patch.cs @@ -0,0 +1,44 @@ +using HarmonyLib; +using RimWorld; +using RimWorld.Planet; +using Verse; + +namespace FCP.Core.Robotics +{ + public class WildRobotSpawnExtension : DefModExtension + { + public float hostileChance = 0.1f; + } + + [HarmonyPatch(typeof(PawnGenerator), nameof(PawnGenerator.GeneratePawn), new[] { typeof(PawnKindDef), typeof(Faction), typeof(PlanetTile?) })] + public static class WildRobotSpawn_Patch + { + [ThreadStatic] + internal static bool Suppress; + + public static void Postfix(PawnKindDef kindDef, Faction faction, ref Pawn __result) + { + if (faction != null || __result == null || Suppress) + { + return; + } + + WildRobotSpawnExtension ext = kindDef.GetModExtension(); + if (ext == null) + { + return; + } + + CompRefuelable fuel = __result.GetComp(); + if (fuel != null && fuel.Fuel > 0f) + { + fuel.ConsumeFuel(fuel.Fuel * Rand.Range(0f, 1f)); + } + + if (__result.Faction != Faction.OfMechanoids && Rand.Chance(ext.hostileChance)) + { + __result.SetFaction(Faction.OfMechanoids); + } + } + } +} diff --git a/Source/FCP_Lasers/FCP_Lasers.csproj b/Source/FCP_Lasers/FCP_Lasers.csproj deleted file mode 100644 index 985298a..0000000 --- a/Source/FCP_Lasers/FCP_Lasers.csproj +++ /dev/null @@ -1,36 +0,0 @@ - - - - FCP.Core.Laser - FCP.Core.Laser - 12 - enable - disable - false - - - - ../../1.6/Assemblies - false - none - - - - false - DEBUG;TRACE - - - - true - TRACE - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - \ No newline at end of file diff --git a/Source/FCP_Lasers/FCP_Lasers.csproj.lscache b/Source/FCP_Lasers/FCP_Lasers.csproj.lscache deleted file mode 100644 index 6512cf3..0000000 --- a/Source/FCP_Lasers/FCP_Lasers.csproj.lscache +++ /dev/null @@ -1,282 +0,0 @@ -version=1 - -# This file caches language service data to improve the performance of C# Dev Kit. -# It is not intended for manual editing. It can safely be deleted and will be -# regenerated automatically. For more information, see https://aka.ms/lscache -# -# To control where cache files are stored, use the following VS Code setting: -# "dotnet.projectsystem.cacheInProjectFolder": true - -[project] -language=C# -primary -lastDtbSucceeded - -[properties] -AssemblyName=FCP.Core.Laser -CommandLineArgsForDesignTimeEvaluation=-langversion:12 -define:DEBUG;TRACE -CompilerGeneratedFilesOutputPath= -MaxSupportedLangVersion=7.3 -ProjectAssetsFile=obj/project.assets.json -RootNamespace=FCP.Core.Laser -RunAnalyzers= -RunAnalyzersDuringLiveAnalysis= -SolutionPath=*Undefined* -TargetFrameworkIdentifier=.NETFramework -TargetPath=../../1.6/Assemblies/FCP.Core.Laser.dll -TargetRefPath= -TemporaryDependencyNodeTargetIdentifier=net472 - -[commandLineArguments] -/noconfig -/unsafe+ -/checked- -/nowarn:1701,1702,1701,1702 -/fullpaths -/nostdlib+ -/errorreport:prompt -/warn:4 -/define:DEBUG;TRACE;DEBUG;NETFRAMEWORK;NET472;NET20_OR_GREATER;NET30_OR_GREATER;NET35_OR_GREATER;NET40_OR_GREATER;NET45_OR_GREATER;NET451_OR_GREATER;NET452_OR_GREATER;NET46_OR_GREATER;NET461_OR_GREATER;NET462_OR_GREATER;NET47_OR_GREATER;NET471_OR_GREATER;NET472_OR_GREATER -/highentropyva+ -/nullable:disable -/debug- -/filealign:512 -/optimize- -/out:obj\Debug\FCP.Core.Laser.dll -/subsystemversion:6.00 -/target:library -/warnaserror- -/utf8output -/deterministic+ -/langversion:12 -/warnaserror+:NU1605 - -[sourceFiles] -/krafs.publicizer/2.3.0/contentfiles/cs/any/Publicizer/IgnoresAccessChecksToAttribute.cs - @folderNames=Publicizer -HotSwappableAttribute.cs -LaserProjectile.cs -LaserProperties.cs -obj/Debug/ - .NETFramework,Version=v4.7.2.AssemblyAttributes.cs - FCP_Lasers.GlobalUsings.g.cs -Properties/AssemblyInfo.cs -Utilities.cs - -[metadataReferences] -/v4.7.2/Facades/ - Microsoft.Win32.Primitives.dll - System.AppContext.dll - System.Collections.Concurrent.dll - System.Collections.dll - System.Collections.NonGeneric.dll - System.Collections.Specialized.dll - System.ComponentModel.Annotations.dll - System.ComponentModel.dll - System.ComponentModel.EventBasedAsync.dll - System.ComponentModel.Primitives.dll - System.ComponentModel.TypeConverter.dll - System.Console.dll - System.Data.Common.dll - System.Diagnostics.Contracts.dll - System.Diagnostics.Debug.dll - System.Diagnostics.FileVersionInfo.dll - System.Diagnostics.Process.dll - System.Diagnostics.StackTrace.dll - System.Diagnostics.TextWriterTraceListener.dll - System.Diagnostics.Tools.dll - System.Diagnostics.TraceSource.dll - System.Drawing.Primitives.dll - System.Dynamic.Runtime.dll - System.Globalization.Calendars.dll - System.Globalization.dll - System.Globalization.Extensions.dll - System.IO.Compression.ZipFile.dll - System.IO.dll - System.IO.FileSystem.dll - System.IO.FileSystem.DriveInfo.dll - System.IO.FileSystem.Primitives.dll - System.IO.FileSystem.Watcher.dll - System.IO.IsolatedStorage.dll - System.IO.MemoryMappedFiles.dll - System.IO.Pipes.dll - System.IO.UnmanagedMemoryStream.dll - System.Linq.dll - System.Linq.Expressions.dll - System.Linq.Parallel.dll - System.Linq.Queryable.dll - System.Net.Http.Rtc.dll - System.Net.NameResolution.dll - System.Net.NetworkInformation.dll - System.Net.Ping.dll - System.Net.Primitives.dll - System.Net.Requests.dll - System.Net.Security.dll - System.Net.Sockets.dll - System.Net.WebHeaderCollection.dll - System.Net.WebSockets.Client.dll - System.Net.WebSockets.dll - System.ObjectModel.dll - System.Reflection.dll - System.Reflection.Emit.dll - System.Reflection.Emit.ILGeneration.dll - System.Reflection.Emit.Lightweight.dll - System.Reflection.Extensions.dll - System.Reflection.Primitives.dll - System.Resources.Reader.dll - System.Resources.ResourceManager.dll - System.Resources.Writer.dll - System.Runtime.CompilerServices.VisualC.dll - System.Runtime.dll - System.Runtime.Extensions.dll - System.Runtime.Handles.dll - System.Runtime.InteropServices.dll - System.Runtime.InteropServices.RuntimeInformation.dll - System.Runtime.InteropServices.WindowsRuntime.dll - System.Runtime.Numerics.dll - System.Runtime.Serialization.Formatters.dll - System.Runtime.Serialization.Json.dll - System.Runtime.Serialization.Primitives.dll - System.Runtime.Serialization.Xml.dll - System.Security.Claims.dll - System.Security.Cryptography.Algorithms.dll - System.Security.Cryptography.Csp.dll - System.Security.Cryptography.Encoding.dll - System.Security.Cryptography.Primitives.dll - System.Security.Cryptography.X509Certificates.dll - System.Security.Principal.dll - System.Security.SecureString.dll - System.ServiceModel.Duplex.dll - System.ServiceModel.Http.dll - System.ServiceModel.NetTcp.dll - System.ServiceModel.Primitives.dll - System.ServiceModel.Security.dll - System.Text.Encoding.dll - System.Text.Encoding.Extensions.dll - System.Text.RegularExpressions.dll - System.Threading.dll - System.Threading.Overlapped.dll - System.Threading.Tasks.dll - System.Threading.Tasks.Parallel.dll - System.Threading.Thread.dll - System.Threading.ThreadPool.dll - System.Threading.Timer.dll - System.ValueTuple.dll - System.Xml.ReaderWriter.dll - System.Xml.XDocument.dll - System.Xml.XmlDocument.dll - System.Xml.XmlSerializer.dll - System.Xml.XPath.dll - System.Xml.XPath.XDocument.dll -/v4.7.2/ - System.IO.Compression.dll - System.Net.Http.dll -/krafs.rimworld.ref/1.6.4817-beta/ref/net472/ - Assembly-CSharp-firstpass.dll - com.rlabrecque.steamworks.net.dll - ISharpZipLib.dll - Mono.Security.dll - mscorlib.dll - NAudio.dll - netstandard.dll - NVorbis.dll - System.ComponentModel.Composition.dll - System.Configuration.dll - System.Core.dll - System.Data.DataSetExtensions.dll - System.Data.dll - System.dll - System.Drawing.dll - System.EnterpriseServices.dll - System.IO.Compression.FileSystem.dll - System.Numerics.dll - System.Runtime.Serialization.dll - System.Security.dll - System.ServiceModel.Internals.dll - System.Transactions.dll - System.Xml.dll - System.Xml.Linq.dll - Unity.AI.Navigation.dll - Unity.Burst.dll - Unity.Burst.Unsafe.dll - Unity.Collections.dll - Unity.Collections.LowLevel.ILSupport.dll - Unity.Mathematics.dll - Unity.MemoryProfiler.dll - Unity.Profiling.Core.dll - Unity.TextMeshPro.dll - UnityEngine.AccessibilityModule.dll - UnityEngine.AIModule.dll - UnityEngine.AndroidJNIModule.dll - UnityEngine.AnimationModule.dll - UnityEngine.ARModule.dll - UnityEngine.AssetBundleModule.dll - UnityEngine.AudioModule.dll - UnityEngine.ClothModule.dll - UnityEngine.ClusterInputModule.dll - UnityEngine.ClusterRendererModule.dll - UnityEngine.ContentLoadModule.dll - UnityEngine.CoreModule.dll - UnityEngine.CrashReportingModule.dll - UnityEngine.DirectorModule.dll - UnityEngine.dll - UnityEngine.DSPGraphModule.dll - UnityEngine.GameCenterModule.dll - UnityEngine.GIModule.dll - UnityEngine.GridModule.dll - UnityEngine.HotReloadModule.dll - UnityEngine.ImageConversionModule.dll - UnityEngine.IMGUIModule.dll - UnityEngine.InputLegacyModule.dll - UnityEngine.InputModule.dll - UnityEngine.JSONSerializeModule.dll - UnityEngine.LocalizationModule.dll - UnityEngine.NVIDIAModule.dll - UnityEngine.ParticleSystemModule.dll - UnityEngine.PerformanceReportingModule.dll - UnityEngine.Physics2DModule.dll - UnityEngine.PhysicsModule.dll - UnityEngine.ProfilerModule.dll - UnityEngine.PropertiesModule.dll - UnityEngine.RuntimeInitializeOnLoadManagerInitializerModule.dll - UnityEngine.ScreenCaptureModule.dll - UnityEngine.SharedInternalsModule.dll - UnityEngine.SpriteMaskModule.dll - UnityEngine.SpriteShapeModule.dll - UnityEngine.StreamingModule.dll - UnityEngine.SubstanceModule.dll - UnityEngine.SubsystemsModule.dll - UnityEngine.TerrainModule.dll - UnityEngine.TerrainPhysicsModule.dll - UnityEngine.TextCoreFontEngineModule.dll - UnityEngine.TextCoreTextEngineModule.dll - UnityEngine.TextRenderingModule.dll - UnityEngine.TilemapModule.dll - UnityEngine.TLSModule.dll - UnityEngine.UI.dll - UnityEngine.UIElementsModule.dll - UnityEngine.UIModule.dll - UnityEngine.UmbraModule.dll - UnityEngine.UnityAnalyticsCommonModule.dll - UnityEngine.UnityAnalyticsModule.dll - UnityEngine.UnityConnectModule.dll - UnityEngine.UnityCurlModule.dll - UnityEngine.UnityTestProtocolModule.dll - UnityEngine.UnityWebRequestAssetBundleModule.dll - UnityEngine.UnityWebRequestAudioModule.dll - UnityEngine.UnityWebRequestModule.dll - UnityEngine.UnityWebRequestTextureModule.dll - UnityEngine.UnityWebRequestWWWModule.dll - UnityEngine.VehiclesModule.dll - UnityEngine.VFXModule.dll - UnityEngine.VideoModule.dll - UnityEngine.VirtualTexturingModule.dll - UnityEngine.VRModule.dll - UnityEngine.WindModule.dll - UnityEngine.XRModule.dll -/lib.harmony/2.3.6/lib/net472/0Harmony.dll -obj/Debug/PublicizedAssemblies/Assembly-CSharp.43B2C1F0B45760F3BB3CF7F55D220E68/Assembly-CSharp.dll - -[analyzerConfigFiles] -../.editorconfig -obj/Debug/FCP_Lasers.GeneratedMSBuildEditorConfig.editorconfig diff --git a/Source/FCP_Lasers/FCP_Lasers.sln b/Source/FCP_Lasers/FCP_Lasers.sln deleted file mode 100644 index 2201c0d..0000000 --- a/Source/FCP_Lasers/FCP_Lasers.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.1.32228.430 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FCP_Lasers", "FCP_Lasers.csproj", "{97FA1308-3ED7-41D8-827D-0CC3A3291EE8}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {97FA1308-3ED7-41D8-827D-0CC3A3291EE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {97FA1308-3ED7-41D8-827D-0CC3A3291EE8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {97FA1308-3ED7-41D8-827D-0CC3A3291EE8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {97FA1308-3ED7-41D8-827D-0CC3A3291EE8}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {3A7CD2D1-4FAC-4365-AD2F-2D749A1FC724} - EndGlobalSection -EndGlobal diff --git a/Source/FCP_Lasers/Properties/AssemblyInfo.cs b/Source/FCP_Lasers/Properties/AssemblyInfo.cs deleted file mode 100644 index 24f3a2b..0000000 --- a/Source/FCP_Lasers/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("FCP.Core.Laser")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("FCP.Core.Laser")] -[assembly: AssemblyCopyright("Copyright © 2022")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("97fa1308-3ed7-41d8-827d-0cc3a3291ee8")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Source/FCP_Lasers/Utilities.cs b/Source/FCP_Lasers/Utilities.cs deleted file mode 100644 index 8d8ceba..0000000 --- a/Source/FCP_Lasers/Utilities.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Linq; -using Verse; - -namespace FCP.Core.Laser -{ - [HotSwappable] - [StaticConstructorOnStartup] - public static class Utilities - { - // Optional mod support removed for compilation - vehicle angle support requires those mods' assemblies - // Core functionality works fine without them - vehicle support can be added later if needed - - public static float GetBodyAngle(Thing thing) - { - // For now, just use the standard rotation angle - // Vehicle support would require Vehicles Framework and CVN MechanoidWarfare assemblies - return thing.Rotation.AsAngle; - } - } -} diff --git a/Source/PresettablePocketMap/Init.cs b/Source/PresettablePocketMap/Init.cs deleted file mode 100644 index f808242..0000000 --- a/Source/PresettablePocketMap/Init.cs +++ /dev/null @@ -1,13 +0,0 @@ -using HarmonyLib; - -namespace FCP.PocketMaps -{ - [StaticConstructorOnStartup] - public static class Init - { - static Init() - { - new Harmony("fcp.pocketmaps").PatchAll(); - } - } -} diff --git a/Source/PresettablePocketMap/PresettablePocketMap.csproj b/Source/PresettablePocketMap/PresettablePocketMap.csproj deleted file mode 100644 index 1cbe8ff..0000000 --- a/Source/PresettablePocketMap/PresettablePocketMap.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - FCP.PocketMaps - FCP_PresettablePocketMap - Presettable Pocket Maps - - - - portable - ../../1.6/Assemblies - DEBUG;TRACE - - - - none - ../../1.6/Assemblies - TRACE - - diff --git a/Source/PresettablePocketMap/PresettablePocketMap.csproj.lscache b/Source/PresettablePocketMap/PresettablePocketMap.csproj.lscache deleted file mode 100644 index b0889a2..0000000 --- a/Source/PresettablePocketMap/PresettablePocketMap.csproj.lscache +++ /dev/null @@ -1,281 +0,0 @@ -version=1 - -# This file caches language service data to improve the performance of C# Dev Kit. -# It is not intended for manual editing. It can safely be deleted and will be -# regenerated automatically. For more information, see https://aka.ms/lscache -# -# To control where cache files are stored, use the following VS Code setting: -# "dotnet.projectsystem.cacheInProjectFolder": true - -[project] -language=C# -primary -lastDtbSucceeded - -[properties] -AssemblyName=FCP_PresettablePocketMap -CommandLineArgsForDesignTimeEvaluation=-langversion:12 -define:DEBUG;TRACE -CompilerGeneratedFilesOutputPath= -MaxSupportedLangVersion=7.3 -ProjectAssetsFile=obj/project.assets.json -RootNamespace=FCP.PocketMaps -RunAnalyzers= -RunAnalyzersDuringLiveAnalysis= -SolutionPath=*Undefined* -TargetFrameworkIdentifier=.NETFramework -TargetPath=../../1.6/Assemblies/FCP_PresettablePocketMap.dll -TargetRefPath= -TemporaryDependencyNodeTargetIdentifier=net472 - -[commandLineArguments] -/noconfig -/unsafe- -/checked- -/nowarn:1701,1702,1701,1702 -/fullpaths -/nostdlib+ -/errorreport:prompt -/warn:4 -/define:DEBUG;TRACE;DEBUG;NETFRAMEWORK;NET472;NET20_OR_GREATER;NET30_OR_GREATER;NET35_OR_GREATER;NET40_OR_GREATER;NET45_OR_GREATER;NET451_OR_GREATER;NET452_OR_GREATER;NET46_OR_GREATER;NET461_OR_GREATER;NET462_OR_GREATER;NET47_OR_GREATER;NET471_OR_GREATER;NET472_OR_GREATER -/highentropyva+ -/debug+ -/debug:portable -/filealign:512 -/optimize- -/out:obj\Debug\FCP_PresettablePocketMap.dll -/subsystemversion:6.00 -/target:library -/warnaserror- -/utf8output -/deterministic+ -/langversion:12 -/warnaserror+:NU1605 - -[sourceFiles] -CompPocketMapControl.cs -GenStep_PresettableMapEntrance.cs -ModExtensionPresettablePocketMap.cs -obj/Debug/ - .NETFramework,Version=v4.7.2.AssemblyAttributes.cs - PresettablePocketMap.AssemblyInfo.cs - PresettablePocketMap.GlobalUsings.g.cs -PocketMapPrefabDef.cs -PresettableMapPortal.cs - -[metadataReferences] -/v4.7.2/Facades/ - Microsoft.Win32.Primitives.dll - System.AppContext.dll - System.Collections.Concurrent.dll - System.Collections.dll - System.Collections.NonGeneric.dll - System.Collections.Specialized.dll - System.ComponentModel.Annotations.dll - System.ComponentModel.dll - System.ComponentModel.EventBasedAsync.dll - System.ComponentModel.Primitives.dll - System.ComponentModel.TypeConverter.dll - System.Console.dll - System.Data.Common.dll - System.Diagnostics.Contracts.dll - System.Diagnostics.Debug.dll - System.Diagnostics.FileVersionInfo.dll - System.Diagnostics.Process.dll - System.Diagnostics.StackTrace.dll - System.Diagnostics.TextWriterTraceListener.dll - System.Diagnostics.Tools.dll - System.Diagnostics.TraceSource.dll - System.Drawing.Primitives.dll - System.Dynamic.Runtime.dll - System.Globalization.Calendars.dll - System.Globalization.dll - System.Globalization.Extensions.dll - System.IO.Compression.ZipFile.dll - System.IO.dll - System.IO.FileSystem.dll - System.IO.FileSystem.DriveInfo.dll - System.IO.FileSystem.Primitives.dll - System.IO.FileSystem.Watcher.dll - System.IO.IsolatedStorage.dll - System.IO.MemoryMappedFiles.dll - System.IO.Pipes.dll - System.IO.UnmanagedMemoryStream.dll - System.Linq.dll - System.Linq.Expressions.dll - System.Linq.Parallel.dll - System.Linq.Queryable.dll - System.Net.Http.Rtc.dll - System.Net.NameResolution.dll - System.Net.NetworkInformation.dll - System.Net.Ping.dll - System.Net.Primitives.dll - System.Net.Requests.dll - System.Net.Security.dll - System.Net.Sockets.dll - System.Net.WebHeaderCollection.dll - System.Net.WebSockets.Client.dll - System.Net.WebSockets.dll - System.ObjectModel.dll - System.Reflection.dll - System.Reflection.Emit.dll - System.Reflection.Emit.ILGeneration.dll - System.Reflection.Emit.Lightweight.dll - System.Reflection.Extensions.dll - System.Reflection.Primitives.dll - System.Resources.Reader.dll - System.Resources.ResourceManager.dll - System.Resources.Writer.dll - System.Runtime.CompilerServices.VisualC.dll - System.Runtime.dll - System.Runtime.Extensions.dll - System.Runtime.Handles.dll - System.Runtime.InteropServices.dll - System.Runtime.InteropServices.RuntimeInformation.dll - System.Runtime.InteropServices.WindowsRuntime.dll - System.Runtime.Numerics.dll - System.Runtime.Serialization.Formatters.dll - System.Runtime.Serialization.Json.dll - System.Runtime.Serialization.Primitives.dll - System.Runtime.Serialization.Xml.dll - System.Security.Claims.dll - System.Security.Cryptography.Algorithms.dll - System.Security.Cryptography.Csp.dll - System.Security.Cryptography.Encoding.dll - System.Security.Cryptography.Primitives.dll - System.Security.Cryptography.X509Certificates.dll - System.Security.Principal.dll - System.Security.SecureString.dll - System.ServiceModel.Duplex.dll - System.ServiceModel.Http.dll - System.ServiceModel.NetTcp.dll - System.ServiceModel.Primitives.dll - System.ServiceModel.Security.dll - System.Text.Encoding.dll - System.Text.Encoding.Extensions.dll - System.Text.RegularExpressions.dll - System.Threading.dll - System.Threading.Overlapped.dll - System.Threading.Tasks.dll - System.Threading.Tasks.Parallel.dll - System.Threading.Thread.dll - System.Threading.ThreadPool.dll - System.Threading.Timer.dll - System.ValueTuple.dll - System.Xml.ReaderWriter.dll - System.Xml.XDocument.dll - System.Xml.XmlDocument.dll - System.Xml.XmlSerializer.dll - System.Xml.XPath.dll - System.Xml.XPath.XDocument.dll -/v4.7.2/ - System.IO.Compression.dll - System.Net.Http.dll -/krafs.rimworld.ref/1.6.4817-beta/ref/net472/ - Assembly-CSharp-firstpass.dll - Assembly-CSharp.dll - com.rlabrecque.steamworks.net.dll - ISharpZipLib.dll - Mono.Security.dll - mscorlib.dll - NAudio.dll - netstandard.dll - NVorbis.dll - System.ComponentModel.Composition.dll - System.Configuration.dll - System.Core.dll - System.Data.DataSetExtensions.dll - System.Data.dll - System.dll - System.Drawing.dll - System.EnterpriseServices.dll - System.IO.Compression.FileSystem.dll - System.Numerics.dll - System.Runtime.Serialization.dll - System.Security.dll - System.ServiceModel.Internals.dll - System.Transactions.dll - System.Xml.dll - System.Xml.Linq.dll - Unity.AI.Navigation.dll - Unity.Burst.dll - Unity.Burst.Unsafe.dll - Unity.Collections.dll - Unity.Collections.LowLevel.ILSupport.dll - Unity.Mathematics.dll - Unity.MemoryProfiler.dll - Unity.Profiling.Core.dll - Unity.TextMeshPro.dll - UnityEngine.AccessibilityModule.dll - UnityEngine.AIModule.dll - UnityEngine.AndroidJNIModule.dll - UnityEngine.AnimationModule.dll - UnityEngine.ARModule.dll - UnityEngine.AssetBundleModule.dll - UnityEngine.AudioModule.dll - UnityEngine.ClothModule.dll - UnityEngine.ClusterInputModule.dll - UnityEngine.ClusterRendererModule.dll - UnityEngine.ContentLoadModule.dll - UnityEngine.CoreModule.dll - UnityEngine.CrashReportingModule.dll - UnityEngine.DirectorModule.dll - UnityEngine.dll - UnityEngine.DSPGraphModule.dll - UnityEngine.GameCenterModule.dll - UnityEngine.GIModule.dll - UnityEngine.GridModule.dll - UnityEngine.HotReloadModule.dll - UnityEngine.ImageConversionModule.dll - UnityEngine.IMGUIModule.dll - UnityEngine.InputLegacyModule.dll - UnityEngine.InputModule.dll - UnityEngine.JSONSerializeModule.dll - UnityEngine.LocalizationModule.dll - UnityEngine.NVIDIAModule.dll - UnityEngine.ParticleSystemModule.dll - UnityEngine.PerformanceReportingModule.dll - UnityEngine.Physics2DModule.dll - UnityEngine.PhysicsModule.dll - UnityEngine.ProfilerModule.dll - UnityEngine.PropertiesModule.dll - UnityEngine.RuntimeInitializeOnLoadManagerInitializerModule.dll - UnityEngine.ScreenCaptureModule.dll - UnityEngine.SharedInternalsModule.dll - UnityEngine.SpriteMaskModule.dll - UnityEngine.SpriteShapeModule.dll - UnityEngine.StreamingModule.dll - UnityEngine.SubstanceModule.dll - UnityEngine.SubsystemsModule.dll - UnityEngine.TerrainModule.dll - UnityEngine.TerrainPhysicsModule.dll - UnityEngine.TextCoreFontEngineModule.dll - UnityEngine.TextCoreTextEngineModule.dll - UnityEngine.TextRenderingModule.dll - UnityEngine.TilemapModule.dll - UnityEngine.TLSModule.dll - UnityEngine.UI.dll - UnityEngine.UIElementsModule.dll - UnityEngine.UIModule.dll - UnityEngine.UmbraModule.dll - UnityEngine.UnityAnalyticsCommonModule.dll - UnityEngine.UnityAnalyticsModule.dll - UnityEngine.UnityConnectModule.dll - UnityEngine.UnityCurlModule.dll - UnityEngine.UnityTestProtocolModule.dll - UnityEngine.UnityWebRequestAssetBundleModule.dll - UnityEngine.UnityWebRequestAudioModule.dll - UnityEngine.UnityWebRequestModule.dll - UnityEngine.UnityWebRequestTextureModule.dll - UnityEngine.UnityWebRequestWWWModule.dll - UnityEngine.VehiclesModule.dll - UnityEngine.VFXModule.dll - UnityEngine.VideoModule.dll - UnityEngine.VirtualTexturingModule.dll - UnityEngine.VRModule.dll - UnityEngine.WindModule.dll - UnityEngine.XRModule.dll -/lib.harmony/2.3.6/lib/net472/0Harmony.dll - -[analyzerConfigFiles] -../.editorconfig -obj/Debug/PresettablePocketMap.GeneratedMSBuildEditorConfig.editorconfig diff --git a/Source/PresettablePocketMap/PresettablePocketMap.sln b/Source/PresettablePocketMap/PresettablePocketMap.sln deleted file mode 100644 index f057178..0000000 --- a/Source/PresettablePocketMap/PresettablePocketMap.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.13.35825.156 d17.13 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PresettablePocketMap", "PresettablePocketMap.csproj", "{8B8AAE7E-DE81-478E-8AEF-D0E3F4AE91D8}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8B8AAE7E-DE81-478E-8AEF-D0E3F4AE91D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8B8AAE7E-DE81-478E-8AEF-D0E3F4AE91D8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B8AAE7E-DE81-478E-8AEF-D0E3F4AE91D8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8B8AAE7E-DE81-478E-8AEF-D0E3F4AE91D8}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {EFA754DA-AA91-46C1-8788-B01083641AF4} - EndGlobalSection -EndGlobal