Changeset 402c07212c0463d29ea0bed37253311b835a35c9
- Timestamp:
- 06/06/07 17:41:05
(1 year ago)
- Author:
- Christopher Jung <bktheg@web.de>
- git-committer:
- Christopher Jung <bktheg@web.de> 1181144465 +0200
- git-parent:
[c8ee59d2fe333f9b95e559ad648ea8877def4ada]
- git-author:
- Christopher Jung <bktheg@web.de> 1181144465 +0200
- Message:
Forschung auf Hibernate umgestellt
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r3924571 |
r402c072 |
|
| 21 | 21 | import java.util.ArrayList; |
|---|
| 22 | 22 | import java.util.List; |
|---|
| 23 | | import java.util.Map; |
|---|
| 24 | | |
|---|
| 25 | | import net.driftingsouls.ds2.server.Forschung; |
|---|
| | 23 | |
|---|
| 26 | 24 | import net.driftingsouls.ds2.server.cargo.Cargo; |
|---|
| 27 | 25 | import net.driftingsouls.ds2.server.cargo.ResourceEntry; |
|---|
| 28 | 26 | import net.driftingsouls.ds2.server.cargo.ResourceList; |
|---|
| 29 | 27 | import net.driftingsouls.ds2.server.config.Rassen; |
|---|
| | 28 | import net.driftingsouls.ds2.server.entities.Forschung; |
|---|
| 30 | 29 | import net.driftingsouls.ds2.server.framework.Common; |
|---|
| 31 | 30 | import net.driftingsouls.ds2.server.framework.Configuration; |
|---|
| … | … | |
| 151 | 150 | boolean first = true; |
|---|
| 152 | 151 | |
|---|
| 153 | | Map<Integer,Forschung> map = Forschung.getSpecial("", "name"); |
|---|
| 154 | | for( Forschung tech : map.values() ) { |
|---|
| | 152 | List<Forschung> forschungen = context.query("from Forschung order by name", Forschung.class); |
|---|
| | 153 | for( Forschung tech : forschungen ) { |
|---|
| 155 | 154 | if( !Rassen.get().rasse(user.getRace()).isMemberIn(tech.getRace()) ) { |
|---|
| 156 | 155 | continue; |
|---|
| … | … | |
| 198 | 197 | echo.append("<img style=\"vertical-align:middle\" src=\""+Configuration.getSetting("URL")+"data/interface/time.gif\" alt=\"Dauer\" />"+tech.getTime()+" "); |
|---|
| 199 | 198 | |
|---|
| 200 | | Cargo costs = new Cargo( Cargo.Type.STRING, tech.getCosts() ); |
|---|
| | 199 | Cargo costs = tech.getCosts(); |
|---|
| 201 | 200 | costs.setOption( Cargo.Option.SHOWMASS, false ); |
|---|
| 202 | 201 | |
|---|
| … | … | |
| 293 | 292 | } |
|---|
| 294 | 293 | |
|---|
| 295 | | Cargo techCosts = new Cargo( Cargo.Type.STRING, tech.getCosts() ); |
|---|
| | 294 | Cargo techCosts = tech.getCosts(); |
|---|
| 296 | 295 | techCosts.setOption( Cargo.Option.SHOWMASS, false ); |
|---|
| 297 | 296 | |
|---|
| rc8ee59d |
r402c072 |
|
| 21 | 21 | import java.util.List; |
|---|
| 22 | 22 | |
|---|
| 23 | | import net.driftingsouls.ds2.server.Forschung; |
|---|
| 24 | 23 | import net.driftingsouls.ds2.server.bases.Building; |
|---|
| 25 | 24 | import net.driftingsouls.ds2.server.bases.Core; |
|---|
| … | … | |
| 32 | 31 | import net.driftingsouls.ds2.server.config.Weapons; |
|---|
| 33 | 32 | import net.driftingsouls.ds2.server.entities.Ammo; |
|---|
| | 33 | import net.driftingsouls.ds2.server.entities.Forschung; |
|---|
| 34 | 34 | import net.driftingsouls.ds2.server.framework.Common; |
|---|
| 35 | 35 | import net.driftingsouls.ds2.server.framework.Configuration; |
|---|
| … | … | |
| 146 | 146 | |
|---|
| 147 | 147 | // Kosten |
|---|
| 148 | | Cargo costs = new Cargo( Cargo.Type.STRING, this.research.getCosts() ); |
|---|
| | 148 | Cargo costs = this.research.getCosts(); |
|---|
| 149 | 149 | costs.setOption( Cargo.Option.SHOWMASS, false ); |
|---|
| 150 | 150 | |
|---|
| rc8ee59d |
r402c072 |
|
| 24 | 24 | import java.util.Map.Entry; |
|---|
| 25 | 25 | |
|---|
| 26 | | import org.apache.commons.lang.StringEscapeUtils; |
|---|
| 27 | | import org.apache.commons.lang.StringUtils; |
|---|
| 28 | | |
|---|
| 29 | | import net.driftingsouls.ds2.server.Forschung; |
|---|
| 30 | 26 | import net.driftingsouls.ds2.server.cargo.Cargo; |
|---|
| 31 | 27 | import net.driftingsouls.ds2.server.cargo.ItemCargoEntry; |
|---|
| … | … | |
| 47 | 43 | import net.driftingsouls.ds2.server.config.Weapons; |
|---|
| 48 | 44 | import net.driftingsouls.ds2.server.entities.Ammo; |
|---|
| | 45 | import net.driftingsouls.ds2.server.entities.Forschung; |
|---|
| 49 | 46 | import net.driftingsouls.ds2.server.framework.Common; |
|---|
| 50 | 47 | import net.driftingsouls.ds2.server.framework.Configuration; |
|---|
| … | … | |
| 59 | 56 | import net.driftingsouls.ds2.server.ships.ShipTypeData; |
|---|
| 60 | 57 | import net.driftingsouls.ds2.server.ships.ShipTypes; |
|---|
| | 58 | |
|---|
| | 59 | import org.apache.commons.lang.StringEscapeUtils; |
|---|
| | 60 | import org.apache.commons.lang.StringUtils; |
|---|
| 61 | 61 | |
|---|
| 62 | 62 | /** |
|---|
| rc8ee59d |
r402c072 |
|
| 22 | 22 | import java.util.Map; |
|---|
| 23 | 23 | |
|---|
| 24 | | import org.apache.commons.lang.StringUtils; |
|---|
| 25 | | |
|---|
| 26 | | import net.driftingsouls.ds2.server.Forschung; |
|---|
| 27 | 24 | import net.driftingsouls.ds2.server.cargo.Cargo; |
|---|
| 28 | 25 | import net.driftingsouls.ds2.server.cargo.ResourceEntry; |
|---|
| … | … | |
| 33 | 30 | import net.driftingsouls.ds2.server.config.Weapon; |
|---|
| 34 | 31 | import net.driftingsouls.ds2.server.config.Weapons; |
|---|
| | 32 | import net.driftingsouls.ds2.server.entities.Forschung; |
|---|
| 35 | 33 | import net.driftingsouls.ds2.server.framework.Common; |
|---|
| 36 | 34 | import net.driftingsouls.ds2.server.framework.Context; |
|---|
| … | … | |
| 43 | 41 | import net.driftingsouls.ds2.server.ships.ShipClasses; |
|---|
| 44 | 42 | import net.driftingsouls.ds2.server.ships.ShipTypes; |
|---|
| | 43 | |
|---|
| | 44 | import org.apache.commons.lang.StringUtils; |
|---|
| 45 | 45 | |
|---|
| 46 | 46 | /** |
|---|
| r3924571 |
r402c072 |
|
| 25 | 25 | import java.util.Map; |
|---|
| 26 | 26 | |
|---|
| 27 | | import net.driftingsouls.ds2.server.Forschung; |
|---|
| 28 | 27 | import net.driftingsouls.ds2.server.cargo.Cargo; |
|---|
| 29 | 28 | import net.driftingsouls.ds2.server.cargo.Resources; |
|---|
| | 29 | import net.driftingsouls.ds2.server.entities.Forschung; |
|---|
| 30 | 30 | import net.driftingsouls.ds2.server.framework.Common; |
|---|
| 31 | 31 | import net.driftingsouls.ds2.server.framework.Context; |
|---|
| … | … | |
| 284 | 284 | Forschung forschung = Forschung.getInstance(a); |
|---|
| 285 | 285 | if( forschung != null ) { |
|---|
| 286 | | Cargo cargo = new Cargo(Cargo.Type.STRING, forschung.getCosts()); |
|---|
| | 286 | Cargo cargo = forschung.getCosts(); |
|---|
| 287 | 287 | ress.put( i, ress.get(i) + cargo.getResourceCount( Resources.SILIZIUM ) ); |
|---|
| 288 | 288 | resi.put(i, resi.get(i) + cargo.getResourceCount( Resources.ISOCHIPS ) ); |
|---|
| rf27e593 |
r402c072 |
|
| 23 | 23 | import java.util.Map; |
|---|
| 24 | 24 | |
|---|
| 25 | | import org.apache.commons.lang.StringEscapeUtils; |
|---|
| 26 | | |
|---|
| 27 | | import net.driftingsouls.ds2.server.Forschung; |
|---|
| 28 | 25 | import net.driftingsouls.ds2.server.cargo.Cargo; |
|---|
| 29 | 26 | import net.driftingsouls.ds2.server.cargo.ResourceEntry; |
|---|
| … | … | |
| 31 | 28 | import net.driftingsouls.ds2.server.config.Rasse; |
|---|
| 32 | 29 | import net.driftingsouls.ds2.server.config.Rassen; |
|---|
| | 30 | import net.driftingsouls.ds2.server.entities.Forschung; |
|---|
| 33 | 31 | import net.driftingsouls.ds2.server.framework.Common; |
|---|
| 34 | 32 | import net.driftingsouls.ds2.server.framework.Configuration; |
|---|
| … | … | |
| 39 | 37 | import net.driftingsouls.ds2.server.framework.pipeline.generators.DSGenerator; |
|---|
| 40 | 38 | import net.driftingsouls.ds2.server.framework.templates.TemplateEngine; |
|---|
| | 39 | |
|---|
| | 40 | import org.apache.commons.lang.StringEscapeUtils; |
|---|
| 41 | 41 | |
|---|
| 42 | 42 | /** |
|---|
| … | … | |
| 173 | 173 | |
|---|
| 174 | 174 | // Kosten der Forschung ausgeben |
|---|
| 175 | | Cargo costs = new Cargo(Cargo.Type.STRING, result.getCosts()); |
|---|
| | 175 | Cargo costs = result.getCosts(); |
|---|
| 176 | 176 | costs.setOption(Cargo.Option.SHOWMASS, false); |
|---|
| 177 | 177 | |
|---|
| r3924571 |
r402c072 |
|
| 21 | 21 | import java.util.HashSet; |
|---|
| 22 | 22 | |
|---|
| 23 | | import net.driftingsouls.ds2.server.Forschung; |
|---|
| 24 | 23 | import net.driftingsouls.ds2.server.comm.PM; |
|---|
| | 24 | import net.driftingsouls.ds2.server.entities.Forschung; |
|---|
| 25 | 25 | import net.driftingsouls.ds2.server.framework.Common; |
|---|
| 26 | 26 | import net.driftingsouls.ds2.server.framework.User; |
|---|
| r6422552 |
r402c072 |
|
| 25 | 25 | <mapping class="net.driftingsouls.ds2.server.entities.FactionShopEntry" /> |
|---|
| 26 | 26 | <mapping class="net.driftingsouls.ds2.server.entities.FactionShopOrder" /> |
|---|
| 27 | | <!-- forschungen [net.driftingsouls.ds2.server.Forschung migrieren] --> |
|---|
| | 27 | <mapping class="net.driftingsouls.ds2.server.entities.Forschung" /> |
|---|
| 28 | 28 | <mapping class="net.driftingsouls.ds2.server.entities.Forschungszentrum" /> |
|---|
| 29 | 29 | <!-- global_sectortemplates [net.driftingsouls.ds2.server.SectorTemplateManager migrieren] --> |
|---|