赴爱 发表于 2025-4-20 03:18:42

汉化


-----------------------------------------------------------------------------------------------------------
------------------------------------------- VEHICLE SERVICING ---------------------------------------------
-----------------------------------------------------------------------------------------------------------
--
-- In here you can modify the various wearable vehicle parts. Please don't remove any options in here as
-- it could have undesirable effects, and instead just disable servicing altogether in config.lua if you
-- don't want this functionality to be enabled.
--
-- Read on for explanations of what each of the options mean in here
--
-----------------------------------------------------------------------------------------------------------
--enableDamage            Enable or disable this specific part. Disabling it means that it won't wear
--                            as the vehicle drives, and will remain at 100%
-----------------------------------------------------------------------------------------------------------
--lifespanInKm            This is probably the ONLY option you should mess with. This allows you to
--                            configure how quickly parts wear and need replacing based on mileage
--
--                            250 = 0% health of the part after 250km and will noticely affect the vehicle
-----------------------------------------------------------------------------------------------------------
--itemName                  The name of the required item to replace the part
-----------------------------------------------------------------------------------------------------------
--itemQuantity            The number of the above item required to replace the part
-----------------------------------------------------------------------------------------------------------
--restricted                Either "combustion" or "electric". Restricts parts to a certain engine type
-----------------------------------------------------------------------------------------------------------

Config.Servicing = {
suspension = {
    enableDamage = true,
    lifespanInKm = 1000,
    itemName = "suspension_parts",
    itemQuantity = 1
},
tyres = {
    enableDamage = true,
    lifespanInKm = 250,
    itemName = "tyre_replacement",
    itemQuantity = 4
},
brakePads = {
    enableDamage = true,
    lifespanInKm = 500,
    itemName = "brakepad_replacement",
    itemQuantity = 4
},

--
-- Combustion engines only
--
engineOil = {
    enableDamage = true,
    lifespanInKm = 100,
    itemName = "engine_oil",
    itemQuantity = 1,
    restricted = "combustion",
},
clutch = {
    enableDamage = true,
    lifespanInKm = 500,
    itemName = "clutch_replacement",
    itemQuantity = 1,
    restricted = "combustion",
},
airFilter = {
    enableDamage = true,
    lifespanInKm = 250,
    itemName = "air_filter",
    itemQuantity = 1,
    restricted = "combustion",
},
sparkPlugs = {
    enableDamage = true,
    lifespanInKm = 150,
    itemName = "spark_plug",
    itemQuantity = 4,
    restricted = "combustion",
},

--
-- Electric vehicles only
--
evMotor = {
    enableDamage = true,
    electric = true,
    lifespanInKm = 2000,
    itemName = "ev_motor",
    itemQuantity = 1,
    restricted = "electric",
},
evBattery = {
    enableDamage = true,
    electric = true,
    lifespanInKm = 500,
    itemName = "ev_battery",
    itemQuantity = 1,
    restricted = "electric",
},
evCoolant = {
    enableDamage = true,
    electric = true,
    lifespanInKm = 250,
    itemName = "ev_coolant",
    itemQuantity = 1,
    restricted = "electric",
}
}


ChatGPT 发表于 2025-4-20 03:19:00

下面是该段代码的中文翻译和注释:


-----------------------------------------------------------------------------------------------------------
------------------------------------------- 车辆维修 ---------------------------------------------
-----------------------------------------------------------------------------------------------------------
--
-- 在这里你可以修改各种可穿戴的车辆部件。请不要删除这里的任何选项,因为
-- 这可能会导致不良后果,如果你不希望启用此功能,请在config.lua中禁用整个维修功能。
--
-- 请继续阅读以了解这里每个选项的含义
--
-----------------------------------------------------------------------------------------------------------
--enableDamage            启用或禁用此特定部件。禁用后意味着车辆行驶时
--                            它不会磨损,并将保持在100%
-----------------------------------------------------------------------------------------------------------
--lifespanInKm            这可能是你唯一应该更改的选项。它允许你配置
--                            根据里程数,部件磨损和需要更换的速度
--
--                            250 = 部件在250公里后健康值为0%,并将明显影响车辆
-----------------------------------------------------------------------------------------------------------
--itemName                  更换该部件所需的物品名称
-----------------------------------------------------------------------------------------------------------
--itemQuantity            更换该部件所需的上述物品数量
-----------------------------------------------------------------------------------------------------------
--restricted                限制为“燃烧”或“电动”。将部件限制为特定发动机类型
-----------------------------------------------------------------------------------------------------------

Config.Servicing = {
suspension = {
    enableDamage = true,      -- 启用悬架部件的磨损
    lifespanInKm = 1000,       -- 悬架在1000公里后磨损
    itemName = "suspension_parts",-- 更换悬架所需的物品名称
    itemQuantity = 1            -- 更换悬架所需的物品数量
},
tyres = {
    enableDamage = true,      
    lifespanInKm = 250,         
    itemName = "tyre_replacement",
    itemQuantity = 4            
},
brakePads = {
    enableDamage = true,      
    lifespanInKm = 500,         
    itemName = "brakepad_replacement",
    itemQuantity = 4            
},

--
-- 仅限燃烧内燃机
--
engineOil = {
    enableDamage = true,      
    lifespanInKm = 100,         
    itemName = "engine_oil",   
    itemQuantity = 1,         
    restricted = "combustion",-- 仅限燃烧发动机
},
clutch = {
    enableDamage = true,      
    lifespanInKm = 500,         
    itemName = "clutch_replacement",
    itemQuantity = 1,         
    restricted = "combustion",
},
airFilter = {
    enableDamage = true,      
    lifespanInKm = 250,         
    itemName = "air_filter",
    itemQuantity = 1,         
    restricted = "combustion",
},
sparkPlugs = {
    enableDamage = true,      
    lifespanInKm = 150,         
    itemName = "spark_plug",   
    itemQuantity = 4,         
    restricted = "combustion",
},

--
-- 仅限电动车辆
--
evMotor = {
    enableDamage = true,      
    electric = true,         
    lifespanInKm = 2000,      
    itemName = "ev_motor",      
    itemQuantity = 1,         
    restricted = "electric",   
},
evBattery = {
    enableDamage = true,      
    electric = true,         
    lifespanInKm = 500,         
    itemName = "ev_battery",   
    itemQuantity = 1,         
    restricted = "electric",   
},
evCoolant = {
    enableDamage = true,      
    electric = true,         
    lifespanInKm = 250,         
    itemName = "ev_coolant",   
    itemQuantity = 1,         
    restricted = "electric",   
}
}


以上代码配置了车辆各个可维修部件的相关信息,包括是否启用磨损、部件寿命、所需物品名称和数量等。在这段代码中,`server.lua`或`client.lua`的使用需要根据具体的功能比较。如果只是用于服务配置,则通常在`server.lua`中进行处理,涉及到网络交互时,可以放在`client.lua`中。由于这段配置主要是设置,通常放在`server.lua`中。
页: [1]
查看完整版本: 汉化