Skip to content

Commit

Permalink
Make npc class id a string_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Coolthulhu committed Jun 8, 2016
1 parent 2c4fe34 commit 988e868
Show file tree
Hide file tree
Showing 16 changed files with 448 additions and 320 deletions.
2 changes: 2 additions & 0 deletions CataclysmWin.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@
<Unit filename="src/newcharacter.cpp" />
<Unit filename="src/npc.cpp" />
<Unit filename="src/npc.h" />
<Unit filename="src/npc_class.cpp" />
<Unit filename="src/npc_class.h" />
<Unit filename="src/npc_favor.h" />
<Unit filename="src/npcmove.cpp" />
<Unit filename="src/npctalk.cpp" />
Expand Down
2 changes: 2 additions & 0 deletions astyled_whitelist
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ src/morale.cpp
src/mtype.cpp
src/mutation_ui.cpp
src/name.cpp
src/npc_class.cpp
src/overlay_ordering.cpp
src/pathfinding.cpp
src/player_activity.cpp
Expand Down Expand Up @@ -149,6 +150,7 @@ src/morale.h
src/morale_types.h
src/mutation.h
src/name.h
src/npc_class.h
src/npc_favor.h
src/omdata.h
src/options.h
Expand Down
71 changes: 71 additions & 0 deletions data/json/npcs/classes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[
{
"type" : "npc_class",
"id" : "NC_NONE",
"name" : "No class"
},{
"type" : "npc_class",
"id" : "NC_EVAC_SHOPKEEP",
"name" : "Merchant"
},{
"type" : "npc_class",
"id" : "NC_SHOPKEEP",
"name" : "Shopkeep"
},{
"type" : "npc_class",
"id" : "NC_HACKER",
"name" : "Hacker"
},{
"type" : "npc_class",
"id" : "NC_DOCTOR",
"name" : "Doctor"
},{
"type" : "npc_class",
"id" : "NC_TRADER",
"name" : "Trader"
},{
"type" : "npc_class",
"id" : "NC_NINJA",
"name" : "Ninja"
},{
"type" : "npc_class",
"id" : "NC_COWBOY",
"name" : "Cowboy"
},{
"type" : "npc_class",
"id" : "NC_SCIENTIST",
"name" : "Scientist"
},{
"type" : "npc_class",
"id" : "NC_BOUNTY_HUNTER",
"name" : "Bounty Hunter"
},{
"type" : "npc_class",
"id" : "NC_THUG",
"name" : "Thug"
},{
"type" : "npc_class",
"id" : "NC_SCAVENGER",
"name" : "Scavenger"
},{
"type" : "npc_class",
"id" : "NC_ARSONIST",
"name" : "Arsonist"
},{
"type" : "npc_class",
"id" : "NC_HUNTER",
"name" : "Hunter"
},{
"type" : "npc_class",
"id" : "NC_SOLDIER",
"name" : "Soldier"
},{
"type" : "npc_class",
"id" : "NC_BARTENDER",
"name" : "Bartender"
},{
"type" : "npc_class",
"id" : "NC_JUNK_SHOPKEEP",
"name" : "Shopkeep"
}
]
64 changes: 32 additions & 32 deletions data/json/npcs/npc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"comment" : "Class is based on the enum in npc.h. The important ones are 0=NC_NONE, 2=NC_SHOPKEEP,",
"comment" : "3=NC_HACKER, 4=NC_DOCTOR, 5=NC_TRADER, 6=NC_NINJA, 7=NC_COWBOY, 8=NC_SCIENTIST,",
"comment" : "9=NC_BOUNTY_HUNTER, 10=NC_THUG, 11=NC_SCAVENGER, 13=NC_HUNTER, 14=NC_SOLDIER.",
"class" : 7,
"class" : "NC_COWBOY",
"comment" : "Attitude is based on the enum in npc.h. The important ones are 0=NPCATT_NULL, 1=NPCATT_TALK",
"comment" : "3=NPCATT_FOLLOW, 7=NPCATT_DEFEND, 10=NPCATT_KILL, and 11=NPCATT_FLEE",
"attitude" : 0,
Expand All @@ -24,7 +24,7 @@
"id" : "old_guard_soldier",
"comment" : "Generic guard for the old guard.",
"name+" : ", Soldier",
"class" : 14,
"class" : "NC_SOLDIER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_OLD_GUARD_SOLDIER",
Expand All @@ -34,7 +34,7 @@
"id" : "old_guard_necropolis_cpt",
"comment" : "Commander in Necropolis",
"name+" : ", CPT",
"class" : 14,
"class" : "NC_SOLDIER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_OLD_GUARD_NEC_CPT",
Expand All @@ -45,7 +45,7 @@
"id" : "old_guard_necropolis_commo",
"comment" : "In charge of outside communications in Necropolis",
"name+" : ", SFC",
"class" : 14,
"class" : "NC_SOLDIER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_OLD_GUARD_NEC_COMMO",
Expand All @@ -56,7 +56,7 @@
"id" : "evac_merchant",
"comment" : "Appears in the refugee center as shopkeeper with missions. Faction critical.",
"name+" : ", Merchant",
"class" : 1,
"class" : "NC_EVAC_SHOPKEEP",
"attitude" : 0,
"mission" : 3,
"chat" : "TALK_EVAC_MERCHANT",
Expand All @@ -67,7 +67,7 @@
"id" : "evac_broker",
"comment" : "Appears in the refugee center as a bulk trader. Promotes production of nonperishable food.",
"name+" : ", Broker",
"class" : 9,
"class" : "NC_BOUNTY_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_FREE_MERCHANT_STOCKS",
Expand All @@ -77,7 +77,7 @@
"id" : "evac_guard1",
"comment" : "Appears in the refugee center as a guard with custom dialogue.",
"name+" : ", Guard",
"class" : 9,
"class" : "NC_BOUNTY_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_EVAC_GUARD1",
Expand All @@ -87,7 +87,7 @@
"id" : "evac_guard2",
"comment" : "Appears in the refugee center as a guard with custom dialogue.",
"name+" : ", Guard",
"class" : 9,
"class" : "NC_BOUNTY_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_EVAC_GUARD2",
Expand All @@ -97,7 +97,7 @@
"id" : "evac_guard3",
"comment" : "Appears in the refugee center as a guard with custom dialogue.",
"name+" : ", Guard",
"class" : 9,
"class" : "NC_BOUNTY_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_EVAC_GUARD3",
Expand All @@ -107,7 +107,7 @@
"id" : "guard",
"comment" : "A generic guard for the Free Merchants faction.",
"name+" : ", Guard",
"class" : 9,
"class" : "NC_BOUNTY_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_GUARD",
Expand All @@ -117,7 +117,7 @@
"id" : "hostile_guard",
"comment" : "A generic hostile guard for the Free Merchants faction. For where the player shouldn't venture.'",
"name+" : ", Guard",
"class" : 9,
"class" : "NC_BOUNTY_HUNTER",
"attitude" : 10,
"mission" : 7,
"chat" : "TALK_DONE",
Expand All @@ -127,7 +127,7 @@
"id" : "ranch_foreman",
"comment" : "Appears at the ranch after you progress in the refugee center quests. Faction critical.",
"name+" : ", Foreman",
"class" : 9,
"class" : "NC_BOUNTY_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_RANCH_FOREMAN",
Expand All @@ -138,7 +138,7 @@
"id" : "ranch_construction_1",
"comment" : "Flavor",
"name+" : ", Carpenter",
"class" : 13,
"class" : "NC_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_RANCH_CONSTRUCTION_1",
Expand All @@ -148,7 +148,7 @@
"id" : "ranch_construction_2",
"comment" : "Construction skill trainer",
"name+" : ", Carpenter",
"class" : 10,
"class" : "NC_THUG",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_RANCH_CONSTRUCTION_2",
Expand All @@ -158,7 +158,7 @@
"id" : "ranch_woodcutter_1",
"comment" : "Can purchase wood",
"name+" : ", Lumberjack",
"class" : 7,
"class" : "NC_COWBOY",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_RANCH_WOODCUTTER",
Expand All @@ -168,7 +168,7 @@
"id" : "ranch__woodcutter_2",
"comment" : "Flavor",
"name+" : ", Woodworker",
"class" : 7,
"class" : "NC_COWBOY",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_RANCH_WOODCUTTER_2",
Expand All @@ -178,7 +178,7 @@
"id" : "ranch_crop_overseer",
"comment" : "Flavor",
"name+" : ", Crop Overseer",
"class" : 9,
"class" : "NC_BOUNTY_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_RANCH_CROP_OVERSEER",
Expand All @@ -188,7 +188,7 @@
"id" : "ranch_farmer_1",
"comment" : "Flavor",
"name+" : ", Farmer",
"class" : 10,
"class" : "NC_THUG",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_RANCH_FARMER_1",
Expand All @@ -198,7 +198,7 @@
"id" : "ranch_farmer_2",
"comment" : "Flavor",
"name+" : ", Farmer",
"class" : 13,
"class" : "NC_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_RANCH_FARMER_2",
Expand All @@ -208,7 +208,7 @@
"id" : "ranch_ill_1",
"comment" : "Flavor",
"name+" : ", Laborer",
"class" : 13,
"class" : "NC_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_RANCH_ILL_1",
Expand All @@ -219,7 +219,7 @@
"comment" : "Mission source for clinic. Provides medical attention.",
"name+" : ", Nurse",
"gender" : "female",
"class" : 13,
"class" : "NC_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_RANCH_NURSE",
Expand All @@ -230,7 +230,7 @@
"id" : "ranch_doctor",
"comment" : "Provides advanced medical attention.",
"name+" : ", Doctor",
"class" : 4,
"class" : "NC_DOCTOR",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_RANCH_DOCTOR",
Expand All @@ -240,7 +240,7 @@
"id" : "ranch_scrapper_1",
"comment" : "Flavor",
"name+" : ", Scrapper",
"class" : 13,
"class" : "NC_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_RANCH_SCRAPPER",
Expand All @@ -250,7 +250,7 @@
"id" : "ranch_scavenger_1",
"comment" : "Mission source, shopkeep",
"name+" : ", Scavenger Boss",
"class" : 16,
"class" : "NC_JUNK_SHOPKEEP",
"attitude" : 0,
"mission" : 3,
"chat" : "TALK_RANCH_SCAVENGER_1",
Expand All @@ -261,7 +261,7 @@
"id" : "ranch_bartender",
"comment" : "Mission source, shopkeep",
"name+" : ", Bartender",
"class" : 15,
"class" : "NC_BARTENDER",
"attitude" : 0,
"mission" : 3,
"chat" : "TALK_RANCH_BARKEEP",
Expand All @@ -272,7 +272,7 @@
"id" : "ranch_barber",
"comment" : "Provides hair cuts",
"name+" : ", Barber",
"class" : 13,
"class" : "NC_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_RANCH_BARBER",
Expand All @@ -282,7 +282,7 @@
"id" : "commune_guard",
"comment" : "A generic guard for the Tacoma Commune faction.",
"name+" : ", Guard",
"class" : 9,
"class" : "NC_BOUNTY_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_GUARD",
Expand All @@ -292,7 +292,7 @@
"id" : "scavenger_hunter",
"comment" : "Appears in the refugee center as a trader.",
"name+" : ", Hunter",
"class" : 13,
"class" : "NC_HUNTER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_EVAC_HUNTER",
Expand All @@ -302,7 +302,7 @@
"id" : "scavenger_merc",
"comment" : "Appears in the refugee center as a partner for hire.",
"name+" : ", Merc",
"class" : 7,
"class" : "NC_COWBOY",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_SCAVENGER_MERC",
Expand All @@ -314,7 +314,7 @@
"name+" : "Makayla Sanchez, Arsonist",
"comment" : "Gender is only referenced when the npc has a complete unique name",
"gender" : "female",
"class" : 12,
"class" : "NC_ARSONIST",
"attitude" : 0,
"mission" : 3,
"chat" : "TALK_ARSONIST",
Expand All @@ -324,7 +324,7 @@
"id" : "thug",
"comment" : "Generic melee focused guard for the Hell's Raiders faction.",
"name+" : ", Thug",
"class" : 10,
"class" : "NC_THUG",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_DONE",
Expand All @@ -334,7 +334,7 @@
"id" : "bandit",
"comment" : "Generic pistol/rifle focused guard for the Hell's Raiders faction.",
"name+" : ", Bandit",
"class" : 11,
"class" : "NC_SCAVENGER",
"attitude" : 0,
"mission" : 7,
"chat" : "TALK_DONE",
Expand Down
Loading

0 comments on commit 988e868

Please sign in to comment.