Class: PFM::Environnement
- Includes:
- GameData::SystemTags
- Defined in:
- scripts/01200 PFM/00100 Global Systems/01200 Environnement.rb,
scripts/01200 PFM/00100 Global Systems/01201 Weather.rb
Overview
Environment management (Weather, Zone, etc…)
The global Environment object is stored in $env and $pokemon_party.env
Constant Summary collapse
- UNKNOWN_ZONE =
Unkonw location text
'Zone ???'
Constants included from GameData::SystemTags
GameData::SystemTags::AcroBike, GameData::SystemTags::AcroBikeRL, GameData::SystemTags::AcroBikeUD, GameData::SystemTags::BridgeRL, GameData::SystemTags::BridgeUD, GameData::SystemTags::CrackedSoil, GameData::SystemTags::DeepSwamp, GameData::SystemTags::Empty, GameData::SystemTags::HeadButt, GameData::SystemTags::Hole, GameData::SystemTags::JumpD, GameData::SystemTags::JumpL, GameData::SystemTags::JumpR, GameData::SystemTags::JumpU, GameData::SystemTags::MachBike, GameData::SystemTags::RapidsD, GameData::SystemTags::RapidsL, GameData::SystemTags::RapidsR, GameData::SystemTags::RapidsU, GameData::SystemTags::Road, GameData::SystemTags::RocketD, GameData::SystemTags::RocketL, GameData::SystemTags::RocketR, GameData::SystemTags::RocketRD, GameData::SystemTags::RocketRL, GameData::SystemTags::RocketRR, GameData::SystemTags::RocketRU, GameData::SystemTags::RocketU, GameData::SystemTags::SlopesL, GameData::SystemTags::SlopesR, GameData::SystemTags::StairsD, GameData::SystemTags::StairsL, GameData::SystemTags::StairsR, GameData::SystemTags::StairsU, GameData::SystemTags::SwampBorder, GameData::SystemTags::TCave, GameData::SystemTags::TGrass, GameData::SystemTags::TIce, GameData::SystemTags::TMount, GameData::SystemTags::TPond, GameData::SystemTags::TSand, GameData::SystemTags::TSea, GameData::SystemTags::TSnow, GameData::SystemTags::TTallGrass, GameData::SystemTags::TUnderWater, GameData::SystemTags::TWetSand, GameData::SystemTags::WaterFall, GameData::SystemTags::ZTag
Instance Attribute Summary collapse
-
#last_map_id ⇒ Integer
readonly
Last visited map ID.
-
#master_zone ⇒ Integer
readonly
The master zone (zone that show the pannel like city, unlike house of city).
-
#modified_worldmap_position ⇒ Array?
readonly
Return the modified worldmap position or nil.
-
#worldmap_custom_markers ⇒ Array
readonly
Custom markers on worldmap.
Instance Method Summary collapse
-
#add_worldmap_custom_icon(filename, worldmap_id, x, y, ox_mode = :center, oy_mode = :center)
Add the custom marker to the worldmap.
-
#apply_weather(id, duration = nil)
Apply a new weather to the current environment.
-
#building? ⇒ Boolean
Is the player inside a building (and not on a systemtag).
-
#can_fish? ⇒ Boolean
Can the player fish ?.
-
#cave? ⇒ Boolean
Is the player in a cave ?.
-
#convert_zone_type(system_tag) ⇒ Integer
Convert a system_tag to a zone_type.
-
#current_weather ⇒ Integer
Return the current weather id according to the game state (in battle or not).
-
#current_weather_db_symbol ⇒ Symbol
Return the db_symbol of the current weather.
-
#current_zone ⇒ Integer
(also: #get_current_zone)
Return the current zone in which the player is.
-
#current_zone_data ⇒ GameData::Zone
(also: #get_current_zone_data)
Return the zone data in which the player is.
-
#current_zone_name ⇒ String
Return the zone name in which the player is (master zone).
-
#day? ⇒ Boolean
Is it day time ?.
-
#decrease_weather_duration ⇒ Boolean
Decrease the weather duration, set it to normal (none = 0) if the duration is less than 0.
-
#fog? ⇒ Boolean
Is it foggy ?.
-
#get_event_delete_state(event_id, map_id = $game_map.map_id) ⇒ Boolean
Get the delete state of an event.
-
#get_worldmap(zone = @zone) ⇒ Integer
Get the worldmap from the zone.
-
#get_zone(x, y, worldmap_id = @worldmap) ⇒ GameData::Map?
Get the zone data in the worldmap.
-
#get_zone_pos(zone_id, worldmap_id = @worldmap) ⇒ Array(Integer, Integer)
Return the zone coordinate in the worldmap.
-
#get_zone_type(ice_prio = false) ⇒ Integer
Return the zone type.
-
#grass? ⇒ Boolean
Is the player standing in grass ?.
-
#hail? ⇒ Boolean
Does it hail ?.
-
#ice? ⇒ Boolean
Is the player on ice ?.
-
#initialize ⇒ Environnement
constructor
Create a new Environnement object.
-
#load_zone_information(data, index)
Load the zone information.
-
#morning? ⇒ Boolean
Is it morning time ?.
-
#mount? ⇒ Boolean
Is the player on a mount ?.
-
#night? ⇒ Boolean
Is it night time ?.
-
#normal? ⇒ Boolean
Is the weather normal.
-
#pond? ⇒ Boolean
Is the player on a pond/river ?.
-
#rain? ⇒ Boolean
Is it rainning?.
-
#remove_worldmap_custom_icon(filename, worldmap_id, x, y)
Remove all custom worldmap icons on the coords.
-
#reset_worldmap_position
Reset the modified worldmap position.
-
#reset_zone
Reset the zone informations to get the zone id with update_zone (Panel display).
-
#sand? ⇒ Boolean
Is the player on sand ?.
-
#sandstorm? ⇒ Boolean
Duuuuuuuuuuuuuuuuuuuuuuun Dun dun dun dun dun dun dun dun dun dun dun dundun dun dundundun dun dun dun dun dun dun dundun dundun.
-
#sea? ⇒ Boolean
Is the player on a sea/ocean ?.
-
#set_event_delete_state(event_id, map_id = $game_map.map_id, state = true)
Set the delete state of an event.
-
#set_worldmap_position(new_x, new_y, new_worldmap_id = nil)
Overwrite the zone worldmap position.
-
#snow? ⇒ Boolean
Is the player on snow or ice ?.
-
#sunny? ⇒ Boolean
Is it sunny?.
-
#sunset? ⇒ Boolean
Is it sunset time ?.
-
#tall_grass? ⇒ Boolean
Is the player standing in tall grass ?.
-
#under_water? ⇒ Boolean
Is the player underwater ?.
-
#update_zone ⇒ Integer, false
Update the zone informations, return the ID of the zone when the player enter in an other zone.
-
#very_tall_grass? ⇒ Boolean
Is the player standing in taller grass ?.
-
#visited_worldmap?(worldmap) ⇒ Boolean
Test if the given world map has been visited.
-
#visited_zone?(zone) ⇒ Boolean
Check if a zone has been visited.
-
#warp_zone ⇒ Integer
(also: #get_warp_zone)
Return the warp zone ID (where the player will teleport with skills).
-
#weather_duration ⇒ Numeric
(also: #get_weather_duration)
Return the current weather duration.
Methods included from GameData::SystemTags
Constructor Details
#initialize ⇒ Environnement
Create a new Environnement object
Instance Attribute Details
#last_map_id ⇒ Integer (readonly)
Last visited map ID
#master_zone ⇒ Integer (readonly)
Master zone are used inside Pokemon data
The master zone (zone that show the pannel like city, unlike house of city)
#modified_worldmap_position ⇒ Array? (readonly)
Return the modified worldmap position or nil
#worldmap_custom_markers ⇒ Array (readonly)
Custom markers on worldmap
Instance Method Details
#add_worldmap_custom_icon(filename, worldmap_id, x, y, ox_mode = :center, oy_mode = :center)
Add the custom marker to the worldmap
#apply_weather(id, duration = nil)
Apply a new weather to the current environment
#building? ⇒ Boolean
Is the player inside a building (and not on a systemtag)
#can_fish? ⇒ Boolean
Can the player fish ?
#cave? ⇒ Boolean
Is the player in a cave ?
#convert_zone_type(system_tag) ⇒ Integer
Convert a system_tag to a zone_type
#current_weather ⇒ Integer
Return the current weather id according to the game state (in battle or not)
#current_weather_db_symbol ⇒ Symbol
Return the db_symbol of the current weather
#current_zone ⇒ Integer Also known as: get_current_zone
Return the current zone in which the player is
#current_zone_data ⇒ GameData::Zone Also known as: get_current_zone_data
Return the zone data in which the player is
#current_zone_name ⇒ String
Return the zone name in which the player is (master zone)
#day? ⇒ Boolean
Is it day time ?
#decrease_weather_duration ⇒ Boolean
Decrease the weather duration, set it to normal (none = 0) if the duration is less than 0
#fog? ⇒ Boolean
Is it foggy ?
#get_event_delete_state(event_id, map_id = $game_map.map_id) ⇒ Boolean
Get the delete state of an event
#get_worldmap(zone = @zone) ⇒ Integer
Get the worldmap from the zone
#get_zone(x, y, worldmap_id = @worldmap) ⇒ GameData::Map?
Get the zone data in the worldmap
#get_zone_pos(zone_id, worldmap_id = @worldmap) ⇒ Array(Integer, Integer)
Return the zone coordinate in the worldmap
#get_zone_type(ice_prio = false) ⇒ Integer
Return the zone type
#grass? ⇒ Boolean
Is the player standing in grass ?
#hail? ⇒ Boolean
Does it hail ?
#ice? ⇒ Boolean
Is the player on ice ?
#load_zone_information(data, index)
Load the zone information
#morning? ⇒ Boolean
Is it morning time ?
#mount? ⇒ Boolean
Is the player on a mount ?
#night? ⇒ Boolean
Is it night time ?
#normal? ⇒ Boolean
Is the weather normal
#pond? ⇒ Boolean
Is the player on a pond/river ?
#rain? ⇒ Boolean
Is it rainning?
#remove_worldmap_custom_icon(filename, worldmap_id, x, y)
Remove all custom worldmap icons on the coords
#reset_worldmap_position
Reset the modified worldmap position
#reset_zone
Reset the zone informations to get the zone id with update_zone (Panel display)
#sand? ⇒ Boolean
Is the player on sand ?
#sandstorm? ⇒ Boolean
Duuuuuuuuuuuuuuuuuuuuuuun Dun dun dun dun dun dun dun dun dun dun dun dundun dun dundundun dun dun dun dun dun dun dundun dundun
#sea? ⇒ Boolean
Is the player on a sea/ocean ?
#set_event_delete_state(event_id, map_id = $game_map.map_id, state = true)
Set the delete state of an event
#set_worldmap_position(new_x, new_y, new_worldmap_id = nil)
Overwrite the zone worldmap position
#snow? ⇒ Boolean
Is the player on snow or ice ?
#sunny? ⇒ Boolean
Is it sunny?
#sunset? ⇒ Boolean
Is it sunset time ?
#tall_grass? ⇒ Boolean
Is the player standing in tall grass ?
#under_water? ⇒ Boolean
Is the player underwater ?
#update_zone ⇒ Integer, false
Update the zone informations, return the ID of the zone when the player enter in an other zone
Add the zone to the visited zone Array if the zone has not been visited yet
#very_tall_grass? ⇒ Boolean
Is the player standing in taller grass ?
#visited_worldmap?(worldmap) ⇒ Boolean
Test if the given world map has been visited
#visited_zone?(zone) ⇒ Boolean
Check if a zone has been visited
#warp_zone ⇒ Integer Also known as: get_warp_zone
Return the warp zone ID (where the player will teleport with skills)
#weather_duration ⇒ Numeric Also known as: get_weather_duration
Return the current weather duration