OSDN Git Service

[Refactor] #40414 Moved create_ration() from spells2.c/h to spells-floor.c/h
authorHourier <hourier@users.sourceforge.jp>
Fri, 5 Jun 2020 12:09:52 +0000 (21:09 +0900)
committerHourier <hourier@users.sourceforge.jp>
Fri, 5 Jun 2020 12:11:03 +0000 (21:11 +0900)
src/spell/spells-object.c
src/spell/spells-object.h
src/spell/spells2.c
src/spell/spells2.h

index bef8eee..dcd401f 100644 (file)
@@ -41,6 +41,7 @@
 #include "player/player-effects.h"
 #include "player/player-status.h"
 #include "spell/spells3.h"
+#include "sv-definition/sv-food-types.h"
 #include "util/util.h"
 #include "view/display-main-window.h"
 
@@ -1436,3 +1437,14 @@ void brand_weapon(player_type *caster_ptr, int brand_type)
        chg_virtue(caster_ptr, V_ENCHANT, 2);
        calc_android_exp(caster_ptr);
 }
+
+bool create_ration(player_type *creature_ptr)
+{
+       object_type *q_ptr;
+       object_type forge;
+       q_ptr = &forge;
+       object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_RATION));
+       (void)drop_near(creature_ptr, q_ptr, -1, creature_ptr->y, creature_ptr->x);
+       msg_print(_("食事を料理して作った。", "You cook some food."));
+       return TRUE;
+}
index f9461ed..6c7e5f4 100644 (file)
@@ -16,6 +16,7 @@ void get_bloody_moon_flags(object_type *o_ptr);
 void phlogiston(player_type *caster_ptr);
 bool bless_weapon(player_type *caster_ptr);
 bool pulish_shield(player_type *caster_ptr);
+bool create_ration(player_type *crature_ptr);
 
 /*
  * Bit flags for the "enchant()" function
index 8b7902f..f17d287 100644 (file)
@@ -233,22 +233,6 @@ bool android_inside_weapon(player_type *creature_ptr)
 }
 
 
-bool create_ration(player_type *creature_ptr)
-{
-       object_type *q_ptr;
-       object_type forge;
-       q_ptr = &forge;
-
-       /* Create the food ration */
-       object_prep(q_ptr, lookup_kind(TV_FOOD, SV_FOOD_RATION));
-
-       /* Drop the object from heaven */
-       (void)drop_near(creature_ptr, q_ptr, -1, creature_ptr->y, creature_ptr->x);
-       msg_print(_("食事を料理して作った。", "You cook some food."));
-       return TRUE;
-}
-
-
 void hayagake(player_type *creature_ptr)
 {
        if (creature_ptr->action == ACTION_HAYAGAKE)
index 74eb8e8..cad82a8 100644 (file)
@@ -8,7 +8,6 @@ bool cast_wrath_of_the_god(player_type* caster_ptr, HIT_POINT dam, POSITION rad)
 void cast_wonder(player_type* caster_ptr, DIRECTION dir);
 bool vampirism(player_type* caster_ptr);
 bool android_inside_weapon(player_type* creature_ptr);
-bool create_ration(player_type* crature_ptr);
 void hayagake(player_type* creature_ptr);
 bool double_attack(player_type* creature_ptr);
 bool comvert_hp_to_mp(player_type* creature_ptr);