More or less standardised separator comments in the code

This commit is contained in:
Maruno17
2024-06-27 21:21:26 +01:00
parent 225549bfce
commit 509a414f37
198 changed files with 1907 additions and 1263 deletions

View File

@@ -1,3 +1,6 @@
#===============================================================================
#
#===============================================================================
module PBDebug
@@log = []

View File

@@ -1,6 +1,8 @@
#===============================================================================
# To use the console, use the executable explicitly built with the console
# enabled on Windows. On Linux and macOS, just launch the executable directly
# from a terminal.
#===============================================================================
module Console
def self.setup_console
return unless $DEBUG
@@ -33,6 +35,9 @@ module Console
end
end
#===============================================================================
#
#===============================================================================
module Kernel
def echo(string)
return unless $DEBUG
@@ -48,14 +53,15 @@ end
Console.setup_console
#===============================================================================
# Console message formatting
# Console message formatting
#===============================================================================
module Console
module_function
#-----------------------------------------------------------------------------
# echo string into console (example shorthand for common options)
# echo string into console (example shorthand for common options)
#-----------------------------------------------------------------------------
# heading 1
def echo_h1(msg)
echoln markup_style("*** #{msg} ***", text: :brown)
@@ -130,6 +136,7 @@ module Console
#-----------------------------------------------------------------------------
# Markup options
#-----------------------------------------------------------------------------
def string_colors
{
default: "38", black: "30", red: "31", green: "32", brown: "33",

View File

@@ -4,6 +4,9 @@
class Reset < Exception
end
#===============================================================================
#
#===============================================================================
class EventScriptError < Exception
attr_accessor :event_message
@@ -13,6 +16,9 @@ class EventScriptError < Exception
end
end
#===============================================================================
#
#===============================================================================
def pbGetExceptionMessage(e, _script = "")
return e.event_message.dup if e.is_a?(EventScriptError) # Message with map/event ID generated elsewhere
emessage = e.message.dup

View File

@@ -1,4 +1,6 @@
#===============================================================================
# The Kernel module is extended to include the validate method.
#===============================================================================
module Kernel
private

View File

@@ -1,5 +1,7 @@
#===============================================================================
# The Deprecation module is used to warn game & plugin creators of deprecated
# methods.
#===============================================================================
module Deprecation
module_function
@@ -19,7 +21,10 @@ module Deprecation
end
end
# The Module class is extended to allow easy deprecation of instance and class methods.
#===============================================================================
# The Module class is extended to allow easy deprecation of instance and class
# methods.
#===============================================================================
class Module
private