Skip to content

Commit

Permalink
Move script implementation classes into new package
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed Jul 25, 2024
1 parent a8c7f5f commit b188138
Show file tree
Hide file tree
Showing 102 changed files with 387 additions and 170 deletions.
3 changes: 2 additions & 1 deletion src/games/stendhal/server/core/scripting/ScriptInJava.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* (C) Copyright 2003-2023 - Stendhal *
* (C) Copyright 2003-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand All @@ -22,6 +22,7 @@

import org.apache.log4j.Logger;

import games.stendhal.server.core.scripting.impl.Script;
import games.stendhal.server.entity.player.Player;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.core.scripting;
package games.stendhal.server.core.scripting.impl;

import java.util.Arrays;
import java.util.LinkedList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
* (C) Copyright 2003-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand All @@ -10,10 +10,11 @@
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.core.scripting;
package games.stendhal.server.core.scripting.impl;

import java.util.List;

import games.stendhal.server.core.scripting.ScriptingSandbox;
import games.stendhal.server.entity.player.Player;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
* (C) Copyright 2003-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand All @@ -10,10 +10,11 @@
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.core.scripting;
package games.stendhal.server.core.scripting.impl;

import java.util.List;

import games.stendhal.server.core.scripting.ScriptingSandbox;
import games.stendhal.server.entity.player.Player;

/**
Expand Down
12 changes: 12 additions & 0 deletions src/games/stendhal/server/core/scripting/impl/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/***************************************************************************
* Copyright © 2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.core.scripting.impl;
4 changes: 2 additions & 2 deletions src/games/stendhal/server/script/AbstractOfflineAction.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
* (C) Copyright 2003-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand All @@ -20,7 +20,7 @@

import games.stendhal.server.core.engine.StendhalRPRuleProcessor;
import games.stendhal.server.core.engine.StendhalRPWorld;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.player.Player;
import marauroa.common.game.IRPZone;
import marauroa.common.game.RPObject;
Expand Down
4 changes: 2 additions & 2 deletions src/games/stendhal/server/script/AdminMaker.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
* (C) Copyright 2003-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand All @@ -23,9 +23,9 @@
import games.stendhal.server.core.config.annotations.ServerModeUtil;
import games.stendhal.server.core.engine.SingletonRepository;
import games.stendhal.server.core.engine.StendhalRPZone;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.ScriptingNPC;
import games.stendhal.server.core.scripting.ScriptingSandbox;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.item.Item;
import games.stendhal.server.entity.item.StackableItem;
import games.stendhal.server.entity.npc.ChatAction;
Expand Down
4 changes: 2 additions & 2 deletions src/games/stendhal/server/script/AdminPortal.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2011 - Stendhal *
* (C) Copyright 2003-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand All @@ -14,7 +14,7 @@

import java.util.List;

import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.mapstuff.portal.LevelCheckingPortal;
import games.stendhal.server.entity.mapstuff.portal.Portal;
import games.stendhal.server.entity.player.Player;
Expand Down
4 changes: 2 additions & 2 deletions src/games/stendhal/server/script/AdminSign.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2011 - Stendhal *
* (C) Copyright 2003-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand All @@ -17,7 +17,7 @@
import java.util.Map;

import games.stendhal.common.MathHelper;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.mapstuff.sign.Sign;
import games.stendhal.server.entity.player.Player;

Expand Down
4 changes: 2 additions & 2 deletions src/games/stendhal/server/script/AlterLoot.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright © 2020 - Arianne *
* Copyright © 2020-2024 - Arianne *
***************************************************************************
***************************************************************************
* *
Expand All @@ -16,7 +16,7 @@

import games.stendhal.common.NotificationType;
import games.stendhal.server.core.engine.SingletonRepository;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.player.Player;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/games/stendhal/server/script/AlterQuest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import games.stendhal.server.constants.StandardMessages;
import games.stendhal.server.core.engine.SingletonRepository;
import games.stendhal.server.core.engine.StendhalRPRuleProcessor;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.player.Player;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/games/stendhal/server/script/BetManager.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2023 - Stendhal *
* (C) Copyright 2003-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand All @@ -23,9 +23,9 @@
import games.stendhal.common.parser.Sentence;
import games.stendhal.server.core.engine.SingletonRepository;
import games.stendhal.server.core.events.TurnListener;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.ScriptingNPC;
import games.stendhal.server.core.scripting.ScriptingSandbox;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.Entity;
import games.stendhal.server.entity.item.ConsumableItem;
import games.stendhal.server.entity.item.Item;
Expand Down
4 changes: 2 additions & 2 deletions src/games/stendhal/server/script/BugInspect.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
* (C) Copyright 2003-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand All @@ -22,7 +22,7 @@
import games.stendhal.server.core.engine.SingletonRepository;
import games.stendhal.server.core.engine.Task;
import games.stendhal.server.core.events.TurnListener;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.item.StackableItem;
import games.stendhal.server.entity.player.Player;
import marauroa.common.game.RPObject;
Expand Down
4 changes: 2 additions & 2 deletions src/games/stendhal/server/script/ChangeDaytime.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* (C) Copyright 2023 - Faiumoni e.V. *
* (C) Copyright 2023-2024 - Faiumoni e.V. *
***************************************************************************
***************************************************************************
* *
Expand All @@ -17,7 +17,7 @@

import games.stendhal.server.core.rp.DaylightPhase;
import games.stendhal.server.core.rp.DaylightUpdater;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.player.Player;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/games/stendhal/server/script/ChangeMap.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* (C) Copyright 2003-2015 - Faiumoni e.V. *
* (C) Copyright 2003-2024 - Faiumoni e.V. *
***************************************************************************
***************************************************************************
* *
Expand All @@ -20,7 +20,7 @@
import games.stendhal.server.core.engine.SingletonRepository;
import games.stendhal.server.core.engine.StendhalRPWorld;
import games.stendhal.server.core.engine.StendhalRPZone;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.player.Player;
import marauroa.common.game.IRPZone;

Expand Down
4 changes: 2 additions & 2 deletions src/games/stendhal/server/script/CommerceExchange.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright © 2003-2023 - Arianne *
* Copyright © 2003-2024 - Arianne *
***************************************************************************
***************************************************************************
* *
Expand All @@ -16,7 +16,7 @@
import games.stendhal.common.NotificationType;
import games.stendhal.server.constants.StandardMessages;
import games.stendhal.server.core.engine.SingletonRepository;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.player.Player;


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
* (C) Copyright 2003-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand All @@ -22,7 +22,7 @@
import games.stendhal.server.core.engine.StendhalRPWorld;
import games.stendhal.server.core.engine.StendhalRPZone;
import games.stendhal.server.core.events.TurnListener;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.item.Item;
import games.stendhal.server.entity.item.StackableItem;
import games.stendhal.server.entity.player.Player;
Expand Down
13 changes: 12 additions & 1 deletion src/games/stendhal/server/script/CountObjects.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
/* $Id$ */
/***************************************************************************
* Copyright © 2007-2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.script;

import java.util.Iterator;
Expand All @@ -7,7 +18,7 @@
import games.stendhal.server.core.engine.SingletonRepository;
import games.stendhal.server.core.engine.StendhalRPWorld;
import games.stendhal.server.core.engine.StendhalRPZone;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.player.Player;
import marauroa.common.game.IRPZone;
import marauroa.common.game.RPObject;
Expand Down
4 changes: 2 additions & 2 deletions src/games/stendhal/server/script/CountUnusedSprites.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* Copyright © 2003-2022 - Arianne *
* Copyright © 2003-2024 - Arianne *
***************************************************************************
***************************************************************************
* *
Expand Down Expand Up @@ -31,7 +31,7 @@
import games.stendhal.server.core.engine.SingletonRepository;
import games.stendhal.server.core.rule.defaultruleset.DefaultCreature;
import games.stendhal.server.core.rule.defaultruleset.DefaultItem;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.player.Player;


Expand Down
4 changes: 2 additions & 2 deletions src/games/stendhal/server/script/CreateRaid.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2023 - Stendhal *
* (C) Copyright 2003-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand All @@ -19,7 +19,7 @@

import games.stendhal.common.Rand;
import games.stendhal.server.core.engine.StendhalRPZone;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.creature.Creature;
import games.stendhal.server.entity.creature.RaidCreature;
import games.stendhal.server.entity.player.Player;
Expand Down
13 changes: 12 additions & 1 deletion src/games/stendhal/server/script/CreaturesRatioCalculator.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
/* $Id$ */
/***************************************************************************
* Copyright © 2012-2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.script;

import java.util.Collection;
Expand All @@ -8,7 +19,7 @@
import org.apache.log4j.Logger;

import games.stendhal.server.core.engine.SingletonRepository;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.creature.Creature;
import games.stendhal.server.entity.creature.impl.DropItem;
import games.stendhal.server.entity.npc.behaviour.impl.BuyerBehaviour;
Expand Down
4 changes: 2 additions & 2 deletions src/games/stendhal/server/script/DBLogging.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* (C) Copyright 2020 - Stendhal *
* (C) Copyright 2020-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand All @@ -14,7 +14,7 @@
import java.util.List;

import games.stendhal.common.NotificationType;
import games.stendhal.server.core.scripting.ScriptImpl;
import games.stendhal.server.core.scripting.impl.ScriptImpl;
import games.stendhal.server.entity.player.Player;
import marauroa.server.db.command.DBCommandQueueLogger;

Expand Down
2 changes: 1 addition & 1 deletion src/games/stendhal/server/script/DebugWeather.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import games.stendhal.server.constants.StandardMessages;
import games.stendhal.server.core.engine.StendhalRPZone;
import games.stendhal.server.core.rp.WeatherUpdater;
import games.stendhal.server.core.scripting.AbstractAdminScript;
import games.stendhal.server.core.scripting.impl.AbstractAdminScript;
import marauroa.common.Pair;


Expand Down
Loading

0 comments on commit b188138

Please sign in to comment.