diff --git a/ngsplanner_patch.sql b/ngsplanner_patch.sql index ec80bf1..5d3e7e8 100644 --- a/ngsplanner_patch.sql +++ b/ngsplanner_patch.sql @@ -3,4 +3,5 @@ CREATE TABLE "element" ("id" SERIAL UNIQUE PRIMARY KEY,"name" text); alter table augment add column element_id int; alter table augment add column icon text; alter table augment_type drop column icon; -alter table food add column rarity int; \ No newline at end of file +alter table food add column rarity int; +alter table food add column food_type text; \ No newline at end of file diff --git a/ngsplanner_schema.sql b/ngsplanner_schema.sql index 22ece55..99c41d4 100644 --- a/ngsplanner_schema.sql +++ b/ngsplanner_schema.sql @@ -26,7 +26,8 @@ CREATE TABLE "food" ( "hp_recovery" boolean, "popularity" int, "editors_choice" int, - "rarity" int + "rarity" int, + "food_type" text ); CREATE TABLE "class" ( diff --git a/ngsplanner_seed.sql b/ngsplanner_seed.sql index c7c863e..b6adc55 100644 --- a/ngsplanner_seed.sql +++ b/ngsplanner_seed.sql @@ -30,10 +30,10 @@ insert into food_mult(amount,potency,pp,dmg_res,hp,pp_consumption,pp_recovery,we insert into food_mult(amount,potency,pp,dmg_res,hp,pp_consumption,pp_recovery,weak_point_dmg,hp_recovery) values(1,1.05,10,1.05,1.05,1,1,1,1); -insert into food(name,description,icon,potency,pp,dmg_res,hp,pp_consumption,pp_recovery,weak_point_dmg,hp_recovery,popularity,editors_choice,rarity) - values('Rich Aelio Meat','Meat','',true,false,false,false,true,false,false,false,0,0,1); -insert into food(name,description,icon,potency,pp,dmg_res,hp,pp_consumption,pp_recovery,weak_point_dmg,hp_recovery,popularity,editors_choice,rarity) - values('Light Aelio Meat','Meat','',true,false,false,false,false,true,false,false,0,0,2); +insert into food(name,description,icon,potency,pp,dmg_res,hp,pp_consumption,pp_recovery,weak_point_dmg,hp_recovery,popularity,editors_choice,rarity,food_type) + values('Rich Aelio Meat','Meat','',true,false,false,false,true,false,false,false,0,0,1,'meat'); +insert into food(name,description,icon,potency,pp,dmg_res,hp,pp_consumption,pp_recovery,weak_point_dmg,hp_recovery,popularity,editors_choice,rarity,food_type) + values('Light Aelio Meat','Meat','',true,false,false,false,false,true,false,false,0,0,2,'meat'); insert into class(name,icon) values('Hunter','/icons/UINGSClassHu.png'); insert into class(name,icon) values('Fighter','/icons/UINGSClassFi.png'); diff --git a/server.js b/server.js index 3055adc..2a0146c 100644 --- a/server.js +++ b/server.js @@ -199,8 +199,8 @@ const ENDPOINTDATA=[ }, { endpoint:"food", - requiredfields:["name","rarity"], - optionalfields:["potency","pp","dmg_res","hp","pp_consumption","pp_recovery","weak_point_dmg","hp_recovery","popularity","editors_choice"], + requiredfields:["name","rarity","food_type"], + optionalfields:["potency","pp","dmg_res","hp","pp_consumption","pp_recovery","weak_point_dmg","hp_recovery","popularity","editors_choice","description","icon"], excludedfields:[] //Fields to not output in GET. }, {