mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-01-17 00:05:07 -05:00
* Code compiles - execution NOT tested * updating gitignore * Removed intellij settings files * Removed more intellij files * Added exclusion for JDK classes. * Fixed purchasing script for vendors that have listed coin types. * Updated script to not kick off until the entire preload is complete. * adds static name entry for Solo movie poster and tcg9 vendor entry * clean up empty and orphaned object templates * adds placeholder black market (static) spawns * corrects entries for the video game table to correctly set it in tcg series 2 and remove series 1 console errors * Updated gitignore and removed intellij project files * Fixed appearance reference for thranta payroll and kashyyyk door, added skipLosCheck objvar due to cannit see issue. Requires updated src * Fixed appearance and template for terminal (#2) * Fixed appearance and template for terminal (#3) * Fixed appearance and template for terminal (#4) * Deleted another faulty/orphaned object template * Fixed gcw ranks option on frog. Only issue is that it doesn't award the officer commands or badges. * Fixed some unneeded java 11 changes
153 lines
2.6 KiB
Java
Executable File
153 lines
2.6 KiB
Java
Executable File
/*
|
|
Title: modifiable_int
|
|
Description: A modifiable int wrapper.
|
|
*/
|
|
|
|
package script;
|
|
|
|
public class modifiable_int extends Number implements Comparable
|
|
{
|
|
private int m_data;
|
|
|
|
|
|
/**
|
|
* Class default constructor.
|
|
*/
|
|
public modifiable_int()
|
|
{
|
|
m_data = 0;
|
|
} // modifiable_int()
|
|
|
|
/**
|
|
* Class constructor.
|
|
*
|
|
* @param data the value of the class
|
|
*/
|
|
public modifiable_int(int data)
|
|
{
|
|
m_data = data;
|
|
} // modifiable_int(int)
|
|
|
|
/**
|
|
* Clone function.
|
|
*
|
|
* @return a copy of this object
|
|
*/
|
|
public Object clone()
|
|
{
|
|
return new modifiable_int(m_data);
|
|
} // clone
|
|
|
|
/**
|
|
* Changes the value of the class.
|
|
*
|
|
* @param data the new value of the class
|
|
*/
|
|
public void set(int data)
|
|
{
|
|
m_data = data;
|
|
} // set(int)
|
|
|
|
/**
|
|
* Changes the value of the class.
|
|
*
|
|
* @param data the new value of the class
|
|
*/
|
|
public void set(modifiable_int data)
|
|
{
|
|
m_data = data.m_data;
|
|
} // set(modifiable_int)
|
|
|
|
/**
|
|
* Returns the class value as it's default type.
|
|
*
|
|
* @return the class value.
|
|
*/
|
|
public int value()
|
|
{
|
|
return m_data;
|
|
} // value
|
|
|
|
/**
|
|
* Returns the class value as a double.
|
|
*
|
|
* @return the class value.
|
|
*/
|
|
public double doubleValue()
|
|
{
|
|
return m_data;
|
|
} // doubleValue
|
|
|
|
/**
|
|
* Returns the class value as a float.
|
|
*
|
|
* @return the class value.
|
|
*/
|
|
public float floatValue()
|
|
{
|
|
return m_data;
|
|
} // floatValue
|
|
|
|
/**
|
|
* Returns the class value as an int.
|
|
*
|
|
* @return the class value.
|
|
*/
|
|
public int intValue()
|
|
{
|
|
return m_data;
|
|
} // intValue
|
|
|
|
/**
|
|
* Returns the class value as a long.
|
|
*
|
|
* @return the class value.
|
|
*/
|
|
public long longValue()
|
|
{
|
|
return m_data;
|
|
} // longValue
|
|
|
|
/**
|
|
* Conversion function.
|
|
*
|
|
* @return the id as a string.
|
|
*/
|
|
public String toString()
|
|
{
|
|
return Integer.valueOf(m_data).toString();
|
|
} // toString
|
|
|
|
/**
|
|
* Compares this to a generic object.
|
|
*
|
|
* @returns <, =, or > 0 if the object is a modifiable_int, else throws
|
|
* ClassCastException
|
|
*/
|
|
public int compareTo(Object o) throws ClassCastException
|
|
{
|
|
return compareTo((modifiable_int)o);
|
|
} // compareTo(Object)
|
|
|
|
/**
|
|
* Compares this to another string_id.
|
|
*
|
|
* @returns <, =, or > 0
|
|
*/
|
|
public int compareTo(modifiable_int src)
|
|
{
|
|
return m_data - src.m_data;
|
|
} // compareTo(modifiable_int)
|
|
|
|
/**
|
|
* Compares this to a generic object.
|
|
*
|
|
* @returns true if the objects have the same data, false if not
|
|
*/
|
|
public boolean equals(Object o)
|
|
{
|
|
return (compareTo(o) == 0);
|
|
} // equals
|
|
|
|
} // modifiable_int
|