Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
-- ============================================================================
-- Nyxframework: nyx_services, nyx_logistics, nyx_vehicles & nyx_inventory
-- Migration: 067_livestock_slaughterhouse_and_refrigerated_logistics.sql
-- Description: Agricultural livestock husbandry, slaughterhouse processing,
-- carcass decay, refrigerated cold-chain logistics, and reefer
-- freight haulage tracking.
-- Engine: InnoDB | Charset: utf8mb4 | Collation: utf8mb4_unicode_ci
-- ============================================================================

SET FOREIGN_KEY_CHECKS = 0;

-- 1. Create livestock ranches table
CREATE TABLE IF NOT EXISTS `nyx_livestock_ranches` (
`ranch_id` VARCHAR(32) NOT NULL PRIMARY KEY,
`ranch_name` VARCHAR(64) NOT NULL,
`zone_name` VARCHAR(64) NOT NULL,
`cattle_head` INT NOT NULL DEFAULT 50,
`max_capacity` INT NOT NULL DEFAULT 200,
`feed_level` DECIMAL(5, 2) NOT NULL DEFAULT 100.00,
`health_index` DECIMAL(5, 2) NOT NULL DEFAULT 100.00,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
INDEX `idx_ranch_zone` (`zone_name`),
INDEX `idx_ranch_health` (`health_index`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 2. Create slaughterhouse facilities table
CREATE TABLE IF NOT EXISTS `nyx_slaughterhouses` (
`facility_id` VARCHAR(32) NOT NULL PRIMARY KEY,
`facility_name` VARCHAR(64) NOT NULL,
`cold_chain_temp_c` DECIMAL(4, 1) NOT NULL DEFAULT 2.0,
`cold_storage_capacity` INT NOT NULL DEFAULT 500,
`cleanliness_index` DECIMAL(5, 2) NOT NULL DEFAULT 100.00,
`total_carcasses_processed` INT NOT NULL DEFAULT 0,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
INDEX `idx_slaughter_temp` (`cold_chain_temp_c`),
INDEX `idx_slaughter_clean` (`cleanliness_index`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 3. Create refrigerated cold-chain telemetry logs table
CREATE TABLE IF NOT EXISTS `nyx_refrigerated_logs` (
`log_id` BIGINT AUTO_INCREMENT PRIMARY KEY,
`container_id` VARCHAR(64) NOT NULL,
`item_name` VARCHAR(64) NOT NULL,
`durability` DECIMAL(5, 2) NOT NULL DEFAULT 100.00,
`is_reefer_active` TINYINT(1) NOT NULL DEFAULT 1,
`temperature_c` DECIMAL(4, 1) NOT NULL DEFAULT 2.0,
`inspection_status` ENUM('PRISTINE', 'FRESH', 'STALE', 'SPOILED') NOT NULL DEFAULT 'PRISTINE',
`timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
INDEX `idx_reefer_container` (`container_id`),
INDEX `idx_reefer_item` (`item_name`),
INDEX `idx_reefer_status` (`inspection_status`),
INDEX `idx_reefer_timestamp` (`timestamp` DESC)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 4. Seed regional livestock ranches
INSERT INTO `nyx_livestock_ranches`
(`ranch_id`, `ranch_name`, `zone_name`, `cattle_head`, `max_capacity`, `feed_level`, `health_index`)
VALUES
('ranch_grapeseed', 'O\'Neil Grapeseed Livestock Ranch', 'Grapeseed', 120, 200, 100.00, 100.00),
('ranch_paleto', 'Paleto Bay Coastal Cattle Ranch', 'Paleto Bay', 80, 150, 95.00, 98.00)
ON DUPLICATE KEY UPDATE `ranch_name` = VALUES(`ranch_name`);

-- 5. Seed regional slaughterhouse facilities
INSERT INTO `nyx_slaughterhouses`
(`facility_id`, `facility_name`, `cold_chain_temp_c`, `cold_storage_capacity`, `cleanliness_index`, `total_carcasses_processed`)
VALUES
('slaughterhouse_cypress_flats', 'Cypress Flats Industrial Slaughterhouse', 2.0, 500, 100.00, 0),
('slaughterhouse_paleto', 'Paleto Meat Processing Plant', 1.5, 300, 96.50, 0)
ON DUPLICATE KEY UPDATE `facility_name` = VALUES(`facility_name`);

SET FOREIGN_KEY_CHECKS = 1;
69 changes: 69 additions & 0 deletions FiveM/nyx_inventory/shared/items.lua
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,75 @@ Nyx.Items.Registry = {
attachRot = { x = 0.0, y = 0.0, z = 0.0 }
}
},
['livestock_cattle'] = {
name = 'livestock_cattle',
label = 'Live Cattle Head',
weight = 100000,
stackable = false,
maxSlots = 1,
type = 'freight',
isHeavyFreight = true,
decayRate = 0.00,
description = 'Live cattle livestock head harvested from regional ranches for transit and slaughterhouse processing.',
client = {
model = `a_c_cow`,
animDict = 'anim@heists@box_carry@',
anim = 'idle'
}
},
['carcass_beef_raw'] = {
name = 'carcass_beef_raw',
label = 'Whole Raw Beef Carcass',
weight = 45000,
stackable = false,
maxSlots = 1,
type = 'food',
isHeavyFreight = true,
decayRate = 0.12,
description = 'Whole dressed beef carcass. Highly perishable; requires refrigerated storage or rapid butchering.',
client = {
model = `prop_box_wood02a`
}
},
['packaged_meat_cuts'] = {
name = 'packaged_meat_cuts',
label = 'Vacuum-Packed Premium Beef Cuts',
weight = 1000,
stackable = true,
maxStack = 20,
type = 'food',
decayRate = 0.05,
nutrition = 50,
description = 'Butchered and vacuum-sealed choice beef cuts for restaurants, supermarkets, and civil pantries.'
},
['pallet_refrigerated_beef'] = {
name = 'pallet_refrigerated_beef',
label = 'Chilled Beef Freight Pallet',
weight = 80000,
stackable = false,
maxSlots = 1,
type = 'freight',
isHeavyFreight = true,
decayRate = 0.01,
description = 'Cold-chain insured freight pallet of chilled beef cuts. Requires refrigerated freight transport.',
client = {
model = `prop_boxpile_06a`,
animDict = 'anim@heists@box_carry@',
anim = 'idle',
attachOffset = { x = 0.0, y = 0.48, z = -0.20 },
attachRot = { x = 0.0, y = 0.0, z = 0.0 }
}
},
['livestock_feed_sack'] = {
name = 'livestock_feed_sack',
label = 'Nutritional Livestock Feed Sack (25kg)',
weight = 25000,
stackable = true,
maxStack = 10,
type = 'freight',
decayRate = 0.00,
description = 'Enriched grain and cornmeal livestock feed sack for cattle ranch husbandry.'
},

-- Tools & Valuables
['tool_lockpick'] = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
-- ============================================================================
-- Nyxframework: nyx_services, nyx_logistics, nyx_vehicles & nyx_inventory
-- Migration: 067_livestock_slaughterhouse_and_refrigerated_logistics.sql
-- Description: Agricultural livestock husbandry, slaughterhouse processing,
-- carcass decay, refrigerated cold-chain logistics, and reefer
-- freight haulage tracking.
-- Engine: InnoDB | Charset: utf8mb4 | Collation: utf8mb4_unicode_ci
-- ============================================================================

SET FOREIGN_KEY_CHECKS = 0;

-- 1. Create livestock ranches table
CREATE TABLE IF NOT EXISTS `nyx_livestock_ranches` (
`ranch_id` VARCHAR(32) NOT NULL PRIMARY KEY,
`ranch_name` VARCHAR(64) NOT NULL,
`zone_name` VARCHAR(64) NOT NULL,
`cattle_head` INT NOT NULL DEFAULT 50,
`max_capacity` INT NOT NULL DEFAULT 200,
`feed_level` DECIMAL(5, 2) NOT NULL DEFAULT 100.00,
`health_index` DECIMAL(5, 2) NOT NULL DEFAULT 100.00,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
INDEX `idx_ranch_zone` (`zone_name`),
INDEX `idx_ranch_health` (`health_index`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 2. Create slaughterhouse facilities table
CREATE TABLE IF NOT EXISTS `nyx_slaughterhouses` (
`facility_id` VARCHAR(32) NOT NULL PRIMARY KEY,
`facility_name` VARCHAR(64) NOT NULL,
`cold_chain_temp_c` DECIMAL(4, 1) NOT NULL DEFAULT 2.0,
`cold_storage_capacity` INT NOT NULL DEFAULT 500,
`cleanliness_index` DECIMAL(5, 2) NOT NULL DEFAULT 100.00,
`total_carcasses_processed` INT NOT NULL DEFAULT 0,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
INDEX `idx_slaughter_temp` (`cold_chain_temp_c`),
INDEX `idx_slaughter_clean` (`cleanliness_index`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 3. Create refrigerated cold-chain telemetry logs table
CREATE TABLE IF NOT EXISTS `nyx_refrigerated_logs` (
`log_id` BIGINT AUTO_INCREMENT PRIMARY KEY,
`container_id` VARCHAR(64) NOT NULL,
`item_name` VARCHAR(64) NOT NULL,
`durability` DECIMAL(5, 2) NOT NULL DEFAULT 100.00,
`is_reefer_active` TINYINT(1) NOT NULL DEFAULT 1,
`temperature_c` DECIMAL(4, 1) NOT NULL DEFAULT 2.0,
`inspection_status` ENUM('PRISTINE', 'FRESH', 'STALE', 'SPOILED') NOT NULL DEFAULT 'PRISTINE',
`timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
INDEX `idx_reefer_container` (`container_id`),
INDEX `idx_reefer_item` (`item_name`),
INDEX `idx_reefer_status` (`inspection_status`),
INDEX `idx_reefer_timestamp` (`timestamp` DESC)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 4. Seed regional livestock ranches
INSERT INTO `nyx_livestock_ranches`
(`ranch_id`, `ranch_name`, `zone_name`, `cattle_head`, `max_capacity`, `feed_level`, `health_index`)
VALUES
('ranch_grapeseed', 'O\'Neil Grapeseed Livestock Ranch', 'Grapeseed', 120, 200, 100.00, 100.00),
('ranch_paleto', 'Paleto Bay Coastal Cattle Ranch', 'Paleto Bay', 80, 150, 95.00, 98.00)
ON DUPLICATE KEY UPDATE `ranch_name` = VALUES(`ranch_name`);

-- 5. Seed regional slaughterhouse facilities
INSERT INTO `nyx_slaughterhouses`
(`facility_id`, `facility_name`, `cold_chain_temp_c`, `cold_storage_capacity`, `cleanliness_index`, `total_carcasses_processed`)
VALUES
('slaughterhouse_cypress_flats', 'Cypress Flats Industrial Slaughterhouse', 2.0, 500, 100.00, 0),
('slaughterhouse_paleto', 'Paleto Meat Processing Plant', 1.5, 300, 96.50, 0)
ON DUPLICATE KEY UPDATE `facility_name` = VALUES(`facility_name`);

SET FOREIGN_KEY_CHECKS = 1;
7 changes: 7 additions & 0 deletions FiveM/nyx_logistics/shared/contracts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ Nyx.Logistics.FreightConfig = {
coords = vector3(2438.0, 4964.0, 46.0),
model = `prop_terminal_01`,
heading = 180.0
},
{
id = "terminal_cypress_slaughterhouse",
name = "Cypress Flats Slaughterhouse & Cold Logistics",
coords = vector3(960.5, -2180.2, 30.5),
model = `prop_terminal_01`,
heading = 90.0
}
}
}
26 changes: 26 additions & 0 deletions FiveM/nyx_logistics/shared/nodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,32 @@ Nyx.Logistics.Nodes.Registry = {
dict = 'amb@world_human_gardener_plant@male@base',
name = 'base'
}
},
['ranch_grapeseed'] = {
id = 'ranch_grapeseed',
label = 'O\'Neil Grapeseed Livestock Ranch',
resource = 'livestock_cattle',
maxReserve = 200,
regenRatePerHour = 20,
requiredTool = nil,
coords = vector3(2440.5, 4980.2, 45.0),
anim = {
dict = 'amb@world_human_gardener_plant@male@base',
name = 'base'
}
},
['ranch_paleto'] = {
id = 'ranch_paleto',
label = 'Paleto Bay Coastal Cattle Ranch',
resource = 'livestock_cattle',
maxReserve = 150,
regenRatePerHour = 15,
requiredTool = nil,
coords = vector3(-380.2, 6180.4, 31.0),
anim = {
dict = 'amb@world_human_gardener_plant@male@base',
name = 'base'
}
}
}

Expand Down
65 changes: 65 additions & 0 deletions FiveM/nyx_logistics/shared/recipes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,71 @@ Nyx.Logistics.Recipes.Registry = {
}
}
},
['cattle_slaughtering'] = {
key = 'cattle_slaughtering',
label = 'Livestock Cattle Slaughtering & Dressing',
facilityType = 'slaughterhouse',
processingTime = 30,
powerRequirementKw = 15,
inputs = {
{ item = 'livestock_cattle', amount = 1 }
},
outputs = {
{
item = 'carcass_beef_raw',
amount = 2,
metadata = {
durability = 100.0,
isSpoiled = false
}
}
}
},
['carcass_butchering'] = {
key = 'carcass_butchering',
label = 'Cold-Chain Carcass Butchering & Palletizing',
facilityType = 'slaughterhouse',
processingTime = 25,
powerRequirementKw = 20,
inputs = {
{ item = 'carcass_beef_raw', amount = 1 }
},
outputs = {
{
item = 'packaged_meat_cuts',
amount = 10,
metadata = {
durability = 100.0,
isSpoiled = false,
nutrition = 50
}
},
{
item = 'pallet_refrigerated_beef',
amount = 1,
metadata = {
durability = 100.0,
temperatureC = 2.0
}
}
}
},
['livestock_feed_mixing'] = {
key = 'livestock_feed_mixing',
label = 'Industrial Livestock Feed Compounding',
facilityType = 'refinery',
processingTime = 20,
powerRequirementKw = 10,
inputs = {
{ item = 'bulk_cornmeal', amount = 2 }
},
outputs = {
{
item = 'livestock_feed_sack',
amount = 1
}
}
},
['first_aid_pack'] = {
key = 'first_aid_pack',
label = 'Trauma First Aid Kit',
Expand Down
Loading
Loading