forked from Mirrors/openclonk
Changed planet/ to LF line endings
parent
b474add380
commit
c32852379e
|
@ -1,24 +1,24 @@
|
|||
Artwork
|
||||
=======
|
||||
|
||||
Original Artwork (CC-BY 3.0)
|
||||
Florian Graier
|
||||
Tobias Zwick
|
||||
Andrew McConnochie
|
||||
Dustin Senos
|
||||
Günther Brammer
|
||||
Redwolf Design GmbH
|
||||
|
||||
Sources (CC-BY 2.0, http://creativecommons.org/licenses/by/2.0/)
|
||||
John Talbot - http://www.flickr.com/photos/laserstars/2322517542/
|
||||
Ricardo Martins - http://www.flickr.com/photos/redneck/479128746/
|
||||
Dominic Alves - http://www.flickr.com/photos/dominicspics/3300369368/
|
||||
|
||||
Sound effects
|
||||
=======
|
||||
See authors.txt in Sound.c4g
|
||||
|
||||
Scripts
|
||||
=======
|
||||
Redwolf Design GmbH
|
||||
|
||||
Artwork
|
||||
=======
|
||||
|
||||
Original Artwork (CC-BY 3.0)
|
||||
Florian Graier
|
||||
Tobias Zwick
|
||||
Andrew McConnochie
|
||||
Dustin Senos
|
||||
Günther Brammer
|
||||
Redwolf Design GmbH
|
||||
|
||||
Sources (CC-BY 2.0, http://creativecommons.org/licenses/by/2.0/)
|
||||
John Talbot - http://www.flickr.com/photos/laserstars/2322517542/
|
||||
Ricardo Martins - http://www.flickr.com/photos/redneck/479128746/
|
||||
Dominic Alves - http://www.flickr.com/photos/dominicspics/3300369368/
|
||||
|
||||
Sound effects
|
||||
=======
|
||||
See authors.txt in Sound.c4g
|
||||
|
||||
Scripts
|
||||
=======
|
||||
Redwolf Design GmbH
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
[Material]
|
||||
Name=Acid
|
||||
ColorAnimation=1
|
||||
Density=25
|
||||
Instable=1
|
||||
MaxAirSpeed=25
|
||||
MaxSlide=10000
|
||||
WindDrift=30
|
||||
Corrosive=75
|
||||
Placement=10
|
||||
TextureOverlay=acid
|
||||
[Material]
|
||||
Name=Acid
|
||||
ColorAnimation=1
|
||||
Density=25
|
||||
Instable=1
|
||||
MaxAirSpeed=25
|
||||
MaxSlide=10000
|
||||
WindDrift=30
|
||||
Corrosive=75
|
||||
Placement=10
|
||||
TextureOverlay=acid
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
[Material]
|
||||
Name=Coal
|
||||
Shape=3
|
||||
Density=50
|
||||
Friction=75
|
||||
DigFree=1
|
||||
BlastFree=1
|
||||
Blast2Object=COAL
|
||||
Dig2Object=COAL
|
||||
Dig2ObjectRatio=300
|
||||
Blast2ObjectRatio=300
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=1
|
||||
Placement=40
|
||||
TextureOverlay=coal
|
||||
OverlayType=8
|
||||
[Material]
|
||||
Name=Coal
|
||||
Shape=3
|
||||
Density=50
|
||||
Friction=75
|
||||
DigFree=1
|
||||
BlastFree=1
|
||||
Blast2Object=COAL
|
||||
Dig2Object=COAL
|
||||
Dig2ObjectRatio=300
|
||||
Blast2ObjectRatio=300
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=1
|
||||
Placement=40
|
||||
TextureOverlay=coal
|
||||
OverlayType=8
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
[Material]
|
||||
Name=DuroLava
|
||||
ColorAnimation=1
|
||||
Density=25
|
||||
Instable=1
|
||||
MaxAirSpeed=50
|
||||
MaxSlide=10000
|
||||
WindDrift=40
|
||||
Incindiary=1
|
||||
Placement=10
|
||||
TextureOverlay=lava_red
|
||||
PXSGfxSize=6
|
||||
PXSGfx=Lava
|
||||
PXSGfxRt=0,0,32,32,-16,-16
|
||||
[Material]
|
||||
Name=DuroLava
|
||||
ColorAnimation=1
|
||||
Density=25
|
||||
Instable=1
|
||||
MaxAirSpeed=50
|
||||
MaxSlide=10000
|
||||
WindDrift=40
|
||||
Incindiary=1
|
||||
Placement=10
|
||||
TextureOverlay=lava_red
|
||||
PXSGfxSize=6
|
||||
PXSGfx=Lava
|
||||
PXSGfxRt=0,0,32,32,-16,-16
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
[Material]
|
||||
Name=Earth
|
||||
Shape=2
|
||||
Density=50
|
||||
Friction=80
|
||||
DigFree=1
|
||||
BlastFree=1
|
||||
Dig2Object=ERTH
|
||||
Dig2ObjectRatio=200
|
||||
Dig2ObjectRequest=1
|
||||
Blast2PXSRatio=10
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=1
|
||||
Corrode=75
|
||||
Soil=1
|
||||
Placement=30
|
||||
TextureOverlay=earth_rough
|
||||
[Material]
|
||||
Name=Earth
|
||||
Shape=2
|
||||
Density=50
|
||||
Friction=80
|
||||
DigFree=1
|
||||
BlastFree=1
|
||||
Dig2Object=ERTH
|
||||
Dig2ObjectRatio=200
|
||||
Dig2ObjectRequest=1
|
||||
Blast2PXSRatio=10
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=1
|
||||
Corrode=75
|
||||
Soil=1
|
||||
Placement=30
|
||||
TextureOverlay=earth_rough
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
[Material]
|
||||
Name=Gold
|
||||
Shape=3
|
||||
Density=50
|
||||
Friction=100
|
||||
BlastFree=1
|
||||
Blast2Object=GOLD
|
||||
Blast2ObjectRatio=75
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=250
|
||||
Placement=50
|
||||
TextureOverlay=gold
|
||||
[Material]
|
||||
Name=Gold
|
||||
Shape=3
|
||||
Density=50
|
||||
Friction=100
|
||||
BlastFree=1
|
||||
Blast2Object=GOLD
|
||||
Blast2ObjectRatio=75
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=250
|
||||
Placement=50
|
||||
TextureOverlay=gold
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[Material]
|
||||
Name=Granite
|
||||
Shape=3
|
||||
Density=50
|
||||
Friction=100
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=250
|
||||
BlastShiftTo=Rock
|
||||
Placement=60
|
||||
TextureOverlay=granite
|
||||
[Material]
|
||||
Name=Granite
|
||||
Shape=3
|
||||
Density=50
|
||||
Friction=100
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=250
|
||||
BlastShiftTo=Rock
|
||||
Placement=60
|
||||
TextureOverlay=granite
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
[Material]
|
||||
Name=Ice
|
||||
Shape=1
|
||||
Density=50
|
||||
Friction=15
|
||||
DigFree=1
|
||||
BlastFree=1
|
||||
Blast2Object=ICE1
|
||||
Dig2Object=ICE1
|
||||
Dig2ObjectRatio=400
|
||||
Dig2ObjectRequest=1
|
||||
Blast2ObjectRatio=120
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=1
|
||||
Corrode=60
|
||||
TempConvStrength=3
|
||||
AboveTempConvert=10
|
||||
AboveTempConvertDir=1
|
||||
AboveTempConvertTo=Water
|
||||
Placement=21
|
||||
TextureOverlay=ice3
|
||||
[Material]
|
||||
Name=Ice
|
||||
Shape=1
|
||||
Density=50
|
||||
Friction=15
|
||||
DigFree=1
|
||||
BlastFree=1
|
||||
Blast2Object=ICE1
|
||||
Dig2Object=ICE1
|
||||
Dig2ObjectRatio=400
|
||||
Dig2ObjectRequest=1
|
||||
Blast2ObjectRatio=120
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=1
|
||||
Corrode=60
|
||||
TempConvStrength=3
|
||||
AboveTempConvert=10
|
||||
AboveTempConvertDir=1
|
||||
AboveTempConvertTo=Water
|
||||
Placement=21
|
||||
TextureOverlay=ice3
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
[Material]
|
||||
Name=Lava
|
||||
ColorAnimation=1
|
||||
Density=25
|
||||
Instable=1
|
||||
MaxAirSpeed=50
|
||||
MaxSlide=10000
|
||||
WindDrift=40
|
||||
Incindiary=1
|
||||
TempConvStrength=12
|
||||
BelowTempConvert=100
|
||||
BelowTempConvertTo=Ashes
|
||||
Placement=10
|
||||
TextureOverlay=lava_red
|
||||
PXSGfxSize=6
|
||||
PXSGfx=Lava
|
||||
PXSGfxRt=0,0,32,32,-16,-16
|
||||
[Material]
|
||||
Name=Lava
|
||||
ColorAnimation=1
|
||||
Density=25
|
||||
Instable=1
|
||||
MaxAirSpeed=50
|
||||
MaxSlide=10000
|
||||
WindDrift=40
|
||||
Incindiary=1
|
||||
TempConvStrength=12
|
||||
BelowTempConvert=100
|
||||
BelowTempConvertTo=Ashes
|
||||
Placement=10
|
||||
TextureOverlay=lava_red
|
||||
PXSGfxSize=6
|
||||
PXSGfx=Lava
|
||||
PXSGfxRt=0,0,32,32,-16,-16
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
[Material]
|
||||
Name=Ore
|
||||
Shape=3
|
||||
Density=50
|
||||
Friction=100
|
||||
BlastFree=1
|
||||
Blast2Object=ORE1
|
||||
Blast2ObjectRatio=100
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=1
|
||||
Placement=50
|
||||
TextureOverlay=ore
|
||||
[Material]
|
||||
Name=Ore
|
||||
Shape=3
|
||||
Density=50
|
||||
Friction=100
|
||||
BlastFree=1
|
||||
Blast2Object=ORE1
|
||||
Blast2ObjectRatio=100
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=1
|
||||
Placement=50
|
||||
TextureOverlay=ore
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
[Material]
|
||||
Name=Rock
|
||||
Shape=3
|
||||
Density=50
|
||||
Friction=100
|
||||
BlastFree=1
|
||||
Blast2Object=ROCK
|
||||
Blast2ObjectRatio=75
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=250
|
||||
Placement=50
|
||||
TextureOverlay=rock
|
||||
[Material]
|
||||
Name=Rock
|
||||
Shape=3
|
||||
Density=50
|
||||
Friction=100
|
||||
BlastFree=1
|
||||
Blast2Object=ROCK
|
||||
Blast2ObjectRatio=75
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=250
|
||||
Placement=50
|
||||
TextureOverlay=rock
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
[Material]
|
||||
Name=Sand
|
||||
Shape=2
|
||||
Density=50
|
||||
Friction=80
|
||||
DigFree=1
|
||||
BlastFree=1
|
||||
Dig2Object=SAND
|
||||
Dig2ObjectRatio=200
|
||||
Dig2ObjectRequest=1
|
||||
Blast2PXSRatio=10
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=1
|
||||
Corrode=75
|
||||
Soil=1
|
||||
Placement=30
|
||||
TextureOverlay=sand_rough
|
||||
[Material]
|
||||
Name=Sand
|
||||
Shape=2
|
||||
Density=50
|
||||
Friction=80
|
||||
DigFree=1
|
||||
BlastFree=1
|
||||
Dig2Object=SAND
|
||||
Dig2ObjectRatio=200
|
||||
Dig2ObjectRequest=1
|
||||
Blast2PXSRatio=10
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=1
|
||||
Corrode=75
|
||||
Soil=1
|
||||
Placement=30
|
||||
TextureOverlay=sand_rough
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
[Material]
|
||||
Name=Snow
|
||||
Shape=2
|
||||
Density=50
|
||||
Friction=40
|
||||
DigFree=1
|
||||
BlastFree=1
|
||||
Blast2PXSRatio=10
|
||||
Instable=1
|
||||
MaxAirSpeed=15
|
||||
MaxSlide=1
|
||||
WindDrift=70
|
||||
Corrode=60
|
||||
TempConvStrength=3
|
||||
InMatConvert=Water
|
||||
InMatConvertTo=Water
|
||||
InMatConvertDepth=5
|
||||
AboveTempConvert=5
|
||||
AboveTempConvertTo=Water
|
||||
Placement=20
|
||||
TextureOverlay=snow1
|
||||
PXSGfxSize=10
|
||||
PXSGfx=Snow
|
||||
PXSGfxRt=0,0,16,16,-8,-8
|
||||
Dig2Object=SNWB
|
||||
Dig2ObjectRatio=400
|
||||
Dig2ObjectRequest=1
|
||||
|
||||
[Reaction]
|
||||
Type=Convert
|
||||
TargetSpec=Incindiary
|
||||
ConvertMat=Water
|
||||
[Material]
|
||||
Name=Snow
|
||||
Shape=2
|
||||
Density=50
|
||||
Friction=40
|
||||
DigFree=1
|
||||
BlastFree=1
|
||||
Blast2PXSRatio=10
|
||||
Instable=1
|
||||
MaxAirSpeed=15
|
||||
MaxSlide=1
|
||||
WindDrift=70
|
||||
Corrode=60
|
||||
TempConvStrength=3
|
||||
InMatConvert=Water
|
||||
InMatConvertTo=Water
|
||||
InMatConvertDepth=5
|
||||
AboveTempConvert=5
|
||||
AboveTempConvertTo=Water
|
||||
Placement=20
|
||||
TextureOverlay=snow1
|
||||
PXSGfxSize=10
|
||||
PXSGfx=Snow
|
||||
PXSGfxRt=0,0,16,16,-8,-8
|
||||
Dig2Object=SNWB
|
||||
Dig2ObjectRatio=400
|
||||
Dig2ObjectRequest=1
|
||||
|
||||
[Reaction]
|
||||
Type=Convert
|
||||
TargetSpec=Incindiary
|
||||
ConvertMat=Water
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
[Material]
|
||||
Name=Sulphur
|
||||
Shape=3
|
||||
Density=50
|
||||
Friction=75
|
||||
DigFree=1
|
||||
BlastFree=1
|
||||
Dig2Object=SPHR
|
||||
Dig2ObjectRatio=200
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=1
|
||||
Corrode=90
|
||||
Blast2Object=SPHR
|
||||
Blast2ObjectRatio=80
|
||||
Placement=40
|
||||
TextureOverlay=sulphur
|
||||
[Material]
|
||||
Name=Sulphur
|
||||
Shape=3
|
||||
Density=50
|
||||
Friction=75
|
||||
DigFree=1
|
||||
BlastFree=1
|
||||
Dig2Object=SPHR
|
||||
Dig2ObjectRatio=200
|
||||
MaxAirSpeed=100
|
||||
MaxSlide=1
|
||||
Corrode=90
|
||||
Blast2Object=SPHR
|
||||
Blast2ObjectRatio=80
|
||||
Placement=40
|
||||
TextureOverlay=sulphur
|
||||
|
|
|
@ -1,66 +1,66 @@
|
|||
# Static Map Material/Texture Table
|
||||
# Index +128 for underground materials
|
||||
|
||||
10=Tunnel-tunnel
|
||||
11=Tunnel-tunnel
|
||||
|
||||
19=DuroLava-lava_red
|
||||
20=Water-water
|
||||
#21=Oil-Liquid
|
||||
22=Acid-acid
|
||||
23=Lava-lava_red
|
||||
24=DuroLava-lava_red
|
||||
25=Water-water
|
||||
#26=Oil-Smooth
|
||||
27=Acid-acid
|
||||
28=Lava-lava_red
|
||||
29=Earth-earth_dry
|
||||
30=Earth-earth_rough
|
||||
31=Earth-earth
|
||||
32=Earth-earth_rough
|
||||
#33=Ashes-Smooth3
|
||||
#34=Ashes-Rough
|
||||
#35=Ashes-Ridge
|
||||
|
||||
36=Ore-ore
|
||||
37=Ore-ore
|
||||
38=Ore-ore
|
||||
|
||||
40=Granite-granite
|
||||
41=Granite-granite
|
||||
42=Granite-rock
|
||||
|
||||
45=Gold-gold
|
||||
|
||||
50=Rock-rock
|
||||
51=Rock-rock_cracked
|
||||
52=Rock-rock
|
||||
|
||||
53=Sulphur-sulphur
|
||||
|
||||
54=Coal-coal
|
||||
|
||||
55=Sand-sand_rough
|
||||
#56=Sand-Smooth2
|
||||
#57=Sand-Smooth3
|
||||
|
||||
|
||||
|
||||
#59=FlyAshes-Smooth
|
||||
|
||||
#60=Crystal-Flare
|
||||
#61=Crystal-Structure
|
||||
#62=Crystal-Structure2
|
||||
|
||||
65=Ice-ice1
|
||||
66=Ice-ice2
|
||||
67=Ice-ice3
|
||||
68=Ice-ice3
|
||||
|
||||
70=Snow-snow1
|
||||
71=Snow-snow1
|
||||
72=Snow-snow1
|
||||
|
||||
#80=FlySand-Smooth2
|
||||
#81=FlySand-Smooth3
|
||||
# Static Map Material/Texture Table
|
||||
# Index +128 for underground materials
|
||||
|
||||
10=Tunnel-tunnel
|
||||
11=Tunnel-tunnel
|
||||
|
||||
19=DuroLava-lava_red
|
||||
20=Water-water
|
||||
#21=Oil-Liquid
|
||||
22=Acid-acid
|
||||
23=Lava-lava_red
|
||||
24=DuroLava-lava_red
|
||||
25=Water-water
|
||||
#26=Oil-Smooth
|
||||
27=Acid-acid
|
||||
28=Lava-lava_red
|
||||
29=Earth-earth_dry
|
||||
30=Earth-earth_rough
|
||||
31=Earth-earth
|
||||
32=Earth-earth_rough
|
||||
#33=Ashes-Smooth3
|
||||
#34=Ashes-Rough
|
||||
#35=Ashes-Ridge
|
||||
|
||||
36=Ore-ore
|
||||
37=Ore-ore
|
||||
38=Ore-ore
|
||||
|
||||
40=Granite-granite
|
||||
41=Granite-granite
|
||||
42=Granite-rock
|
||||
|
||||
45=Gold-gold
|
||||
|
||||
50=Rock-rock
|
||||
51=Rock-rock_cracked
|
||||
52=Rock-rock
|
||||
|
||||
53=Sulphur-sulphur
|
||||
|
||||
54=Coal-coal
|
||||
|
||||
55=Sand-sand_rough
|
||||
#56=Sand-Smooth2
|
||||
#57=Sand-Smooth3
|
||||
|
||||
|
||||
|
||||
#59=FlyAshes-Smooth
|
||||
|
||||
#60=Crystal-Flare
|
||||
#61=Crystal-Structure
|
||||
#62=Crystal-Structure2
|
||||
|
||||
65=Ice-ice1
|
||||
66=Ice-ice2
|
||||
67=Ice-ice3
|
||||
68=Ice-ice3
|
||||
|
||||
70=Snow-snow1
|
||||
71=Snow-snow1
|
||||
72=Snow-snow1
|
||||
|
||||
#80=FlySand-Smooth2
|
||||
#81=FlySand-Smooth3
|
||||
#82=FlySand-Smooth
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Material]
|
||||
Name=Tunnel
|
||||
Shape=2
|
||||
Placement=5
|
||||
TextureOverlay=tunnel
|
||||
[Material]
|
||||
Name=Tunnel
|
||||
Shape=2
|
||||
Placement=5
|
||||
TextureOverlay=tunnel
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Material]
|
||||
Name=Vehicle
|
||||
Density=100
|
||||
Friction=100
|
||||
[Material]
|
||||
Name=Vehicle
|
||||
Density=100
|
||||
Friction=100
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
[Material]
|
||||
Name=Water
|
||||
ColorAnimation=1
|
||||
Density=25
|
||||
Instable=1
|
||||
MaxAirSpeed=25
|
||||
MaxSlide=10000
|
||||
WindDrift=30
|
||||
Corrode=100
|
||||
Extinguisher=1
|
||||
TempConvStrength=3
|
||||
BelowTempConvert=-10
|
||||
BelowTempConvertTo=Ice
|
||||
Placement=10
|
||||
TextureOverlay=water
|
||||
[Material]
|
||||
Name=Water
|
||||
ColorAnimation=1
|
||||
Density=25
|
||||
Instable=1
|
||||
MaxAirSpeed=25
|
||||
MaxSlide=10000
|
||||
WindDrift=30
|
||||
Corrode=100
|
||||
Extinguisher=1
|
||||
TempConvStrength=3
|
||||
BelowTempConvert=-10
|
||||
BelowTempConvertTo=Ice
|
||||
Placement=10
|
||||
TextureOverlay=water
|
||||
|
|
|
@ -1,44 +1,44 @@
|
|||
[DefCore]
|
||||
id=CLNK
|
||||
Version=4,9,8,8
|
||||
Category=C4D_Living|C4D_SelectHomebase
|
||||
MaxUserSelect=10
|
||||
Width=16
|
||||
Height=20
|
||||
Offset=-8,-10
|
||||
Vertices=7
|
||||
VertexX=0,0,0,-2,2,-4,4
|
||||
VertexY=2,-7,9,-3,-3,3,3
|
||||
VertexCNAT=0,4,8,1,2,1,2
|
||||
VertexFriction=300,300,100,300,300,300,300
|
||||
Value=25
|
||||
Mass=50
|
||||
Components=CLNK=1
|
||||
Picture=192,100,32,40
|
||||
Collection=-8,-10,16,27
|
||||
ContactIncinerate=1
|
||||
Prey=1
|
||||
CrewMember=1
|
||||
Float=1
|
||||
ColorByOwner=1
|
||||
BorderBound=1
|
||||
StretchGrowth=1
|
||||
NoBurnDecay=1
|
||||
IncompleteActivity=1
|
||||
Oversize=1
|
||||
|
||||
[Physical]
|
||||
Energy=50000
|
||||
Breath=50000
|
||||
Walk=70000
|
||||
Jump=40000
|
||||
Scale=30000
|
||||
Hangle=30000
|
||||
Dig=40000
|
||||
Swim=60000
|
||||
Throw=50000
|
||||
Push=40000
|
||||
Fight=50000
|
||||
CanDig=1
|
||||
CanConstruct=1
|
||||
CanChop=1
|
||||
[DefCore]
|
||||
id=CLNK
|
||||
Version=4,9,8,8
|
||||
Category=C4D_Living|C4D_SelectHomebase
|
||||
MaxUserSelect=10
|
||||
Width=16
|
||||
Height=20
|
||||
Offset=-8,-10
|
||||
Vertices=7
|
||||
VertexX=0,0,0,-2,2,-4,4
|
||||
VertexY=2,-7,9,-3,-3,3,3
|
||||
VertexCNAT=0,4,8,1,2,1,2
|
||||
VertexFriction=300,300,100,300,300,300,300
|
||||
Value=25
|
||||
Mass=50
|
||||
Components=CLNK=1
|
||||
Picture=192,100,32,40
|
||||
Collection=-8,-10,16,27
|
||||
ContactIncinerate=1
|
||||
Prey=1
|
||||
CrewMember=1
|
||||
Float=1
|
||||
ColorByOwner=1
|
||||
BorderBound=1
|
||||
StretchGrowth=1
|
||||
NoBurnDecay=1
|
||||
IncompleteActivity=1
|
||||
Oversize=1
|
||||
|
||||
[Physical]
|
||||
Energy=50000
|
||||
Breath=50000
|
||||
Walk=70000
|
||||
Jump=40000
|
||||
Scale=30000
|
||||
Hangle=30000
|
||||
Dig=40000
|
||||
Swim=60000
|
||||
Throw=50000
|
||||
Push=40000
|
||||
Fight=50000
|
||||
CanDig=1
|
||||
CanConstruct=1
|
||||
CanChop=1
|
||||
|
|
|
@ -1 +1 @@
|
|||
Ein kleines aber robustes humanoides Wesen, gewitzt und flink, wenn gekonnt gesteuert.
|
||||
Ein kleines aber robustes humanoides Wesen, gewitzt und flink, wenn gekonnt gesteuert.
|
||||
|
|
|
@ -1 +1 @@
|
|||
A small but robust humanoid being. Witty and nimble, if skillfully controlled.
|
||||
A small but robust humanoid being. Witty and nimble, if skillfully controlled.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[DefCore]
|
||||
id=INVT
|
||||
Version=4,9,8
|
||||
Category=C4D_StaticBack | C4D_IgnoreFoW | C4D_Foreground | C4D_Parallax | C4D_MouseSelect
|
||||
Width=1
|
||||
Height=1
|
||||
Picture=0,0,64,64
|
||||
[DefCore]
|
||||
id=INVT
|
||||
Version=4,9,8
|
||||
Category=C4D_StaticBack | C4D_IgnoreFoW | C4D_Foreground | C4D_Parallax | C4D_MouseSelect
|
||||
Width=1
|
||||
Height=1
|
||||
Picture=0,0,64,64
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[DefCore]
|
||||
id=EMPT
|
||||
Version=4,9,8,8
|
||||
Category=C4D_Object
|
||||
Width=64
|
||||
Height=64
|
||||
Offset=-32,-32
|
||||
Picture=0,0,64,64
|
||||
Vertices=1
|
||||
[DefCore]
|
||||
id=EMPT
|
||||
Version=4,9,8,8
|
||||
Category=C4D_Object
|
||||
Width=64
|
||||
Height=64
|
||||
Offset=-32,-32
|
||||
Picture=0,0,64,64
|
||||
Vertices=1
|
||||
Collectible=1
|
|
@ -1,55 +1,55 @@
|
|||
#strict 2
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
||||
|
||||
func Departure(object pContainer)
|
||||
{
|
||||
Enter(pContainer);
|
||||
}
|
||||
|
||||
local pMaster;
|
||||
local iNumber;
|
||||
|
||||
func SetMaster(pNewMaster, iNewNumber)
|
||||
{
|
||||
SetCategory(C4D_StaticBack | C4D_IgnoreFoW | C4D_Foreground | C4D_Parallax | C4D_MouseSelect);
|
||||
this["Visibility"] = VIS_None;
|
||||
this["Parallaxity"] = [0,0];
|
||||
pMaster = pNewMaster;
|
||||
iNumber = iNewNumber;
|
||||
SetGraphics(Format("%d", iNumber+1),NUMB,3,GFXOV_MODE_IngamePicture);
|
||||
SetObjDrawTransform(300, 0,-1000*18, 0, 300, 1000*18, 3);
|
||||
SetGraphics("Spot", GetID(), 1, GFXOV_MODE_IngamePicture);
|
||||
}
|
||||
|
||||
func SetImage(pObj, bool fSelected)
|
||||
{
|
||||
if(fSelected)
|
||||
{
|
||||
SetClrModulation(RGB(255), 3); SetGraphics("Spot", GetID(), 1, GFXOV_MODE_IngamePicture);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetClrModulation(HSL(0,0,180), 3); SetGraphics(nil, nil, 1, 0);
|
||||
}
|
||||
if(!pObj)
|
||||
{
|
||||
SetGraphics(nil, nil, 2, 0);
|
||||
SetName(GetID()->GetName());
|
||||
return;
|
||||
}
|
||||
var idID = pObj->GetID();
|
||||
SetGraphics(nil, idID, 2, GFXOV_MODE_IngamePicture);
|
||||
if(fSelected)
|
||||
SetObjDrawTransform(1000, 0, 0, 0, 1000, 0, 2);
|
||||
else
|
||||
SetObjDrawTransform( 600, 0, 0, 0, 600, 0, 2);
|
||||
SetName(pObj->GetName());
|
||||
}
|
||||
|
||||
func MouseSelection(int iPlr)
|
||||
{
|
||||
if(iPlr == GetOwner()) pMaster->SelectNumber(iNumber);
|
||||
#strict 2
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
||||
|
||||
func Departure(object pContainer)
|
||||
{
|
||||
Enter(pContainer);
|
||||
}
|
||||
|
||||
local pMaster;
|
||||
local iNumber;
|
||||
|
||||
func SetMaster(pNewMaster, iNewNumber)
|
||||
{
|
||||
SetCategory(C4D_StaticBack | C4D_IgnoreFoW | C4D_Foreground | C4D_Parallax | C4D_MouseSelect);
|
||||
this["Visibility"] = VIS_None;
|
||||
this["Parallaxity"] = [0,0];
|
||||
pMaster = pNewMaster;
|
||||
iNumber = iNewNumber;
|
||||
SetGraphics(Format("%d", iNumber+1),NUMB,3,GFXOV_MODE_IngamePicture);
|
||||
SetObjDrawTransform(300, 0,-1000*18, 0, 300, 1000*18, 3);
|
||||
SetGraphics("Spot", GetID(), 1, GFXOV_MODE_IngamePicture);
|
||||
}
|
||||
|
||||
func SetImage(pObj, bool fSelected)
|
||||
{
|
||||
if(fSelected)
|
||||
{
|
||||
SetClrModulation(RGB(255), 3); SetGraphics("Spot", GetID(), 1, GFXOV_MODE_IngamePicture);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetClrModulation(HSL(0,0,180), 3); SetGraphics(nil, nil, 1, 0);
|
||||
}
|
||||
if(!pObj)
|
||||
{
|
||||
SetGraphics(nil, nil, 2, 0);
|
||||
SetName(GetID()->GetName());
|
||||
return;
|
||||
}
|
||||
var idID = pObj->GetID();
|
||||
SetGraphics(nil, idID, 2, GFXOV_MODE_IngamePicture);
|
||||
if(fSelected)
|
||||
SetObjDrawTransform(1000, 0, 0, 0, 1000, 0, 2);
|
||||
else
|
||||
SetObjDrawTransform( 600, 0, 0, 0, 600, 0, 2);
|
||||
SetName(pObj->GetName());
|
||||
}
|
||||
|
||||
func MouseSelection(int iPlr)
|
||||
{
|
||||
if(iPlr == GetOwner()) pMaster->SelectNumber(iNumber);
|
||||
}
|
|
@ -1 +1 @@
|
|||
Name=Leer
|
||||
Name=Leer
|
||||
|
|
|
@ -1 +1 @@
|
|||
Name=Empty
|
||||
Name=Empty
|
||||
|
|
|
@ -1,199 +1,199 @@
|
|||
#strict 2
|
||||
|
||||
static const INVT_MaxItems = 3;
|
||||
static const INVT_MaxTools = 1;
|
||||
|
||||
static const INVT_SymbolSize = 64;
|
||||
|
||||
local aInventory;
|
||||
local aTools;
|
||||
local aPictures;
|
||||
local iSelection;
|
||||
|
||||
func Initialize()
|
||||
{
|
||||
// 3 Inventory spaces
|
||||
aInventory = [0,0,0];
|
||||
// 1 Tool space
|
||||
aTools = [0];
|
||||
iSelection = 0;
|
||||
// parallaxity
|
||||
this["Parallaxity"] = [0,0];
|
||||
|
||||
this["Visibility"] = VIS_None;
|
||||
|
||||
SetPosition(30,-90);
|
||||
|
||||
SetClrModulation(RGBa(0,0,20,128));
|
||||
SetAction("Inventory");
|
||||
|
||||
// Create pictures
|
||||
var pPict;
|
||||
var OffX = INVT_SymbolSize/2, OffY = INVT_SymbolSize/2;
|
||||
aPictures = [];
|
||||
for(var iIndex = 0; iIndex < GetLength(aInventory)+GetLength(aTools); iIndex++)
|
||||
{
|
||||
pPict = CreateObject(EMPT, 0, 0, GetOwner());
|
||||
pPict->SetMaster(this, iIndex);
|
||||
aPictures[iIndex] = pPict;
|
||||
pPict->SetPosition(GetX()+OffX, GetY()+OffY);
|
||||
OffX += INVT_SymbolSize;
|
||||
if(iIndex == GetLength(aInventory)-1) OffX += INVT_SymbolSize;
|
||||
}
|
||||
|
||||
UpdateImage();
|
||||
}
|
||||
|
||||
func Show(fHide)
|
||||
{
|
||||
if(fHide)
|
||||
{
|
||||
for(var pPict in aPictures)
|
||||
pPict["Visibility"] = VIS_None;
|
||||
this["Visibility"] = VIS_None;
|
||||
}
|
||||
else
|
||||
{
|
||||
for(var pPict in aPictures)
|
||||
pPict["Visibility"] = VIS_Owner;
|
||||
this["Visibility"] = VIS_Owner;
|
||||
}
|
||||
}
|
||||
|
||||
local iOffset;
|
||||
func UpdateImage()
|
||||
{
|
||||
var iIndex = 0;
|
||||
var pObj;
|
||||
var idID;
|
||||
for(pObj in aInventory)
|
||||
{
|
||||
aPictures[iIndex]->SetImage(pObj, iSelection == iIndex);
|
||||
iIndex++;
|
||||
}
|
||||
for(pObj in aTools)
|
||||
{
|
||||
aPictures[iIndex]->SetImage(pObj, -1-iSelection+GetLength(aInventory) == iIndex);
|
||||
iIndex++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
func AddTool(object pObj)
|
||||
{
|
||||
var iIndex;
|
||||
// Find the first free slot
|
||||
while(iIndex < GetLength(aTools) && aTools[iIndex]) iIndex++;
|
||||
if(iIndex == GetLength(aTools)) return 0;
|
||||
// Add item
|
||||
aTools[iIndex] = pObj;
|
||||
UpdateImage();
|
||||
}
|
||||
|
||||
func RemTool(object pObj)
|
||||
{
|
||||
// Get Index
|
||||
var iIndex;
|
||||
for(var pTest in aTools)
|
||||
{
|
||||
if(pTest == pObj) break;
|
||||
iIndex++;
|
||||
}
|
||||
if(iIndex == GetLength(aTools)) return 0;
|
||||
aTools[iIndex] = 0;
|
||||
UpdateImage();
|
||||
}
|
||||
|
||||
func AddItem(object pObj)
|
||||
{
|
||||
if(pObj->~IsTool()) return AddTool(pObj);
|
||||
var iIndex;
|
||||
// Find the first free slot
|
||||
while(iIndex < GetLength(aInventory) && aInventory[iIndex]) iIndex++;
|
||||
if(iIndex == GetLength(aInventory)) return 0;
|
||||
// Add item
|
||||
aInventory[iIndex] = pObj;
|
||||
UpdateImage();
|
||||
}
|
||||
|
||||
func FreeSpace(object pObj)
|
||||
{
|
||||
var iIndex;
|
||||
if(pObj->~IsTool())
|
||||
{
|
||||
// Find the first free slot
|
||||
while(iIndex < GetLength(aTools) && aTools[iIndex]) iIndex++;
|
||||
if(iIndex == GetLength(aTools)) return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Find the first free slot
|
||||
while(iIndex < GetLength(aInventory) && aInventory[iIndex]) iIndex++;
|
||||
if(iIndex == GetLength(aInventory)) return 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
func RemItem(object pObj)
|
||||
{
|
||||
if(pObj->~IsTool()) return RemTool(pObj);
|
||||
// Get Index
|
||||
var iIndex;
|
||||
for(var pTest in aInventory)
|
||||
{
|
||||
if(pTest == pObj) break;
|
||||
iIndex++;
|
||||
}
|
||||
if(iIndex == GetLength(aInventory)) return 0;
|
||||
aInventory[iIndex] = 0;
|
||||
UpdateImage();
|
||||
}
|
||||
|
||||
func GetSelectedObj()
|
||||
{
|
||||
// Positiv counts are normal items
|
||||
if(iSelection >= 0) return aInventory[iSelection];
|
||||
// negativ counts are tools
|
||||
else return aTools[-1-iSelection];
|
||||
}
|
||||
|
||||
func SelectNumber(iIndex)
|
||||
{
|
||||
if(iIndex >= GetLength(aInventory)) iIndex = GetLength(aInventory)-iIndex-1;
|
||||
if(iIndex > 0)
|
||||
{
|
||||
if(iIndex >= GetLength(aInventory)) return false;
|
||||
iSelection = iIndex;
|
||||
UpdateImage();
|
||||
return true;
|
||||
}
|
||||
if(-1-iIndex >= GetLength(aTools)) return false;
|
||||
iSelection = iIndex;
|
||||
UpdateImage();
|
||||
return true;
|
||||
}
|
||||
|
||||
func SelectNext()
|
||||
{
|
||||
iSelection++;
|
||||
if(iSelection >= GetLength(aInventory)) iSelection = -GetLength(aTools);
|
||||
UpdateImage();
|
||||
}
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("ActMap", {
|
||||
Inventory = {
|
||||
Prototype = Action,
|
||||
Name = "Inventory",
|
||||
Procedure = DFA_NONE,
|
||||
Length = 1,
|
||||
Delay = 0,
|
||||
X = 0,
|
||||
Y = 0,
|
||||
Wdt = 330,
|
||||
Hgt = 74,
|
||||
OffX = -5,
|
||||
OffY = -5,
|
||||
}, }, def);
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
||||
#strict 2
|
||||
|
||||
static const INVT_MaxItems = 3;
|
||||
static const INVT_MaxTools = 1;
|
||||
|
||||
static const INVT_SymbolSize = 64;
|
||||
|
||||
local aInventory;
|
||||
local aTools;
|
||||
local aPictures;
|
||||
local iSelection;
|
||||
|
||||
func Initialize()
|
||||
{
|
||||
// 3 Inventory spaces
|
||||
aInventory = [0,0,0];
|
||||
// 1 Tool space
|
||||
aTools = [0];
|
||||
iSelection = 0;
|
||||
// parallaxity
|
||||
this["Parallaxity"] = [0,0];
|
||||
|
||||
this["Visibility"] = VIS_None;
|
||||
|
||||
SetPosition(30,-90);
|
||||
|
||||
SetClrModulation(RGBa(0,0,20,128));
|
||||
SetAction("Inventory");
|
||||
|
||||
// Create pictures
|
||||
var pPict;
|
||||
var OffX = INVT_SymbolSize/2, OffY = INVT_SymbolSize/2;
|
||||
aPictures = [];
|
||||
for(var iIndex = 0; iIndex < GetLength(aInventory)+GetLength(aTools); iIndex++)
|
||||
{
|
||||
pPict = CreateObject(EMPT, 0, 0, GetOwner());
|
||||
pPict->SetMaster(this, iIndex);
|
||||
aPictures[iIndex] = pPict;
|
||||
pPict->SetPosition(GetX()+OffX, GetY()+OffY);
|
||||
OffX += INVT_SymbolSize;
|
||||
if(iIndex == GetLength(aInventory)-1) OffX += INVT_SymbolSize;
|
||||
}
|
||||
|
||||
UpdateImage();
|
||||
}
|
||||
|
||||
func Show(fHide)
|
||||
{
|
||||
if(fHide)
|
||||
{
|
||||
for(var pPict in aPictures)
|
||||
pPict["Visibility"] = VIS_None;
|
||||
this["Visibility"] = VIS_None;
|
||||
}
|
||||
else
|
||||
{
|
||||
for(var pPict in aPictures)
|
||||
pPict["Visibility"] = VIS_Owner;
|
||||
this["Visibility"] = VIS_Owner;
|
||||
}
|
||||
}
|
||||
|
||||
local iOffset;
|
||||
func UpdateImage()
|
||||
{
|
||||
var iIndex = 0;
|
||||
var pObj;
|
||||
var idID;
|
||||
for(pObj in aInventory)
|
||||
{
|
||||
aPictures[iIndex]->SetImage(pObj, iSelection == iIndex);
|
||||
iIndex++;
|
||||
}
|
||||
for(pObj in aTools)
|
||||
{
|
||||
aPictures[iIndex]->SetImage(pObj, -1-iSelection+GetLength(aInventory) == iIndex);
|
||||
iIndex++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
func AddTool(object pObj)
|
||||
{
|
||||
var iIndex;
|
||||
// Find the first free slot
|
||||
while(iIndex < GetLength(aTools) && aTools[iIndex]) iIndex++;
|
||||
if(iIndex == GetLength(aTools)) return 0;
|
||||
// Add item
|
||||
aTools[iIndex] = pObj;
|
||||
UpdateImage();
|
||||
}
|
||||
|
||||
func RemTool(object pObj)
|
||||
{
|
||||
// Get Index
|
||||
var iIndex;
|
||||
for(var pTest in aTools)
|
||||
{
|
||||
if(pTest == pObj) break;
|
||||
iIndex++;
|
||||
}
|
||||
if(iIndex == GetLength(aTools)) return 0;
|
||||
aTools[iIndex] = 0;
|
||||
UpdateImage();
|
||||
}
|
||||
|
||||
func AddItem(object pObj)
|
||||
{
|
||||
if(pObj->~IsTool()) return AddTool(pObj);
|
||||
var iIndex;
|
||||
// Find the first free slot
|
||||
while(iIndex < GetLength(aInventory) && aInventory[iIndex]) iIndex++;
|
||||
if(iIndex == GetLength(aInventory)) return 0;
|
||||
// Add item
|
||||
aInventory[iIndex] = pObj;
|
||||
UpdateImage();
|
||||
}
|
||||
|
||||
func FreeSpace(object pObj)
|
||||
{
|
||||
var iIndex;
|
||||
if(pObj->~IsTool())
|
||||
{
|
||||
// Find the first free slot
|
||||
while(iIndex < GetLength(aTools) && aTools[iIndex]) iIndex++;
|
||||
if(iIndex == GetLength(aTools)) return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Find the first free slot
|
||||
while(iIndex < GetLength(aInventory) && aInventory[iIndex]) iIndex++;
|
||||
if(iIndex == GetLength(aInventory)) return 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
func RemItem(object pObj)
|
||||
{
|
||||
if(pObj->~IsTool()) return RemTool(pObj);
|
||||
// Get Index
|
||||
var iIndex;
|
||||
for(var pTest in aInventory)
|
||||
{
|
||||
if(pTest == pObj) break;
|
||||
iIndex++;
|
||||
}
|
||||
if(iIndex == GetLength(aInventory)) return 0;
|
||||
aInventory[iIndex] = 0;
|
||||
UpdateImage();
|
||||
}
|
||||
|
||||
func GetSelectedObj()
|
||||
{
|
||||
// Positiv counts are normal items
|
||||
if(iSelection >= 0) return aInventory[iSelection];
|
||||
// negativ counts are tools
|
||||
else return aTools[-1-iSelection];
|
||||
}
|
||||
|
||||
func SelectNumber(iIndex)
|
||||
{
|
||||
if(iIndex >= GetLength(aInventory)) iIndex = GetLength(aInventory)-iIndex-1;
|
||||
if(iIndex > 0)
|
||||
{
|
||||
if(iIndex >= GetLength(aInventory)) return false;
|
||||
iSelection = iIndex;
|
||||
UpdateImage();
|
||||
return true;
|
||||
}
|
||||
if(-1-iIndex >= GetLength(aTools)) return false;
|
||||
iSelection = iIndex;
|
||||
UpdateImage();
|
||||
return true;
|
||||
}
|
||||
|
||||
func SelectNext()
|
||||
{
|
||||
iSelection++;
|
||||
if(iSelection >= GetLength(aInventory)) iSelection = -GetLength(aTools);
|
||||
UpdateImage();
|
||||
}
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("ActMap", {
|
||||
Inventory = {
|
||||
Prototype = Action,
|
||||
Name = "Inventory",
|
||||
Procedure = DFA_NONE,
|
||||
Length = 1,
|
||||
Delay = 0,
|
||||
X = 0,
|
||||
Y = 0,
|
||||
Wdt = 330,
|
||||
Hgt = 74,
|
||||
OffX = -5,
|
||||
OffY = -5,
|
||||
}, }, def);
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Name=Inventory control
|
||||
Name=Inventory control
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
Clonk
|
||||
Fähnrich
|
||||
Leutnant
|
||||
Hauptmann
|
||||
Major
|
||||
Oberst
|
||||
Brigadegeneral
|
||||
Generalmajor
|
||||
Generalleutnant
|
||||
General
|
||||
Feldmarschall
|
||||
Kadett
|
||||
Fregattenkapitän
|
||||
Kapitän
|
||||
Konteradmiral
|
||||
Vizeadmiral
|
||||
Admiral
|
||||
Großadmiral
|
||||
Staatsrat
|
||||
Staatssekretär
|
||||
Kanzler
|
||||
Vizepräsident
|
||||
Präsident
|
||||
Ministerpräsident
|
||||
*%s Erster Klasse
|
||||
*%s Zweiten Grades
|
||||
*%s ohne Gleichen
|
||||
*Erhabener %s
|
||||
*%s der Spitzenklasse
|
||||
Clonk
|
||||
Fähnrich
|
||||
Leutnant
|
||||
Hauptmann
|
||||
Major
|
||||
Oberst
|
||||
Brigadegeneral
|
||||
Generalmajor
|
||||
Generalleutnant
|
||||
General
|
||||
Feldmarschall
|
||||
Kadett
|
||||
Fregattenkapitän
|
||||
Kapitän
|
||||
Konteradmiral
|
||||
Vizeadmiral
|
||||
Admiral
|
||||
Großadmiral
|
||||
Staatsrat
|
||||
Staatssekretär
|
||||
Kanzler
|
||||
Vizepräsident
|
||||
Präsident
|
||||
Ministerpräsident
|
||||
*%s Erster Klasse
|
||||
*%s Zweiten Grades
|
||||
*%s ohne Gleichen
|
||||
*Erhabener %s
|
||||
*%s der Spitzenklasse
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
Clonk
|
||||
Ensign
|
||||
Lieutenant
|
||||
Captain
|
||||
Major
|
||||
Lieutenant Colonel
|
||||
Colonel
|
||||
Brigade General
|
||||
Major General
|
||||
Lieutenant General
|
||||
General
|
||||
Midshipman
|
||||
Commander
|
||||
Commodore
|
||||
Rear-Admiral
|
||||
Vice-Admiral
|
||||
Admiral
|
||||
Fleet Admiral
|
||||
Counsellor of State
|
||||
Secretary of State
|
||||
Chancellor
|
||||
Vice President
|
||||
President
|
||||
Premier
|
||||
*%s First Class
|
||||
*%s Second Degree
|
||||
*%s Without Equal
|
||||
*Sublime %s
|
||||
*Exalted %s
|
||||
Clonk
|
||||
Ensign
|
||||
Lieutenant
|
||||
Captain
|
||||
Major
|
||||
Lieutenant Colonel
|
||||
Colonel
|
||||
Brigade General
|
||||
Major General
|
||||
Lieutenant General
|
||||
General
|
||||
Midshipman
|
||||
Commander
|
||||
Commodore
|
||||
Rear-Admiral
|
||||
Vice-Admiral
|
||||
Admiral
|
||||
Fleet Admiral
|
||||
Counsellor of State
|
||||
Secretary of State
|
||||
Chancellor
|
||||
Vice President
|
||||
President
|
||||
Premier
|
||||
*%s First Class
|
||||
*%s Second Degree
|
||||
*%s Without Equal
|
||||
*Sublime %s
|
||||
*Exalted %s
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,8 @@
|
|||
CtxConstructionDesc=Bauauftrag
|
||||
CtxConstructionMaterial=Baumaterial
|
||||
CtxHomeDesc=Zurück zur Basis
|
||||
CtxRelease=Entlassen
|
||||
CtxChop=Fällen
|
||||
CtrlMenuDesc=Menü
|
||||
TxtDescend=Abspringen
|
||||
TxtEnergysupply=Energieversorgung
|
||||
CtxConstructionDesc=Bauauftrag
|
||||
CtxConstructionMaterial=Baumaterial
|
||||
CtxHomeDesc=Zurück zur Basis
|
||||
CtxRelease=Entlassen
|
||||
CtxChop=Fällen
|
||||
CtrlMenuDesc=Menü
|
||||
TxtDescend=Abspringen
|
||||
TxtEnergysupply=Energieversorgung
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
CtxConstructionDesc=Construction
|
||||
CtxConstructionMaterial=Construction material
|
||||
CtxHomeDesc=Back to base
|
||||
CtxRelease=Release
|
||||
CtxChop=Chop
|
||||
CtrlMenuDesc=Menu
|
||||
TxtDescend=Jump off
|
||||
TxtEnergysupply=Energy supply
|
||||
CtxConstructionDesc=Construction
|
||||
CtxConstructionMaterial=Construction material
|
||||
CtxHomeDesc=Back to base
|
||||
CtxRelease=Release
|
||||
CtxChop=Chop
|
||||
CtrlMenuDesc=Menu
|
||||
TxtDescend=Jump off
|
||||
TxtEnergysupply=Energy supply
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
[Particle]
|
||||
Name=Blast
|
||||
MaxCount=300
|
||||
InitFn=StdInit
|
||||
ExecFn=StdExec
|
||||
DrawFn=Std
|
||||
Face=0,0,40,40,-20,-20
|
||||
Delay=1
|
||||
AlphaFade=1
|
||||
Repeats=1
|
||||
Reverse=1
|
||||
Additive=1
|
||||
[Particle]
|
||||
Name=Blast
|
||||
MaxCount=300
|
||||
InitFn=StdInit
|
||||
ExecFn=StdExec
|
||||
DrawFn=Std
|
||||
Face=0,0,40,40,-20,-20
|
||||
Delay=1
|
||||
AlphaFade=1
|
||||
Repeats=1
|
||||
Reverse=1
|
||||
Additive=1
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
[Particle]
|
||||
Name=ExploSmoke
|
||||
MaxCount=800
|
||||
InitFn=StdInit
|
||||
ExecFn=StdExec
|
||||
DrawFn=Std
|
||||
Face=0,0,64,64,-32,-32
|
||||
Delay=0
|
||||
Repeats=1
|
||||
[Particle]
|
||||
Name=ExploSmoke
|
||||
MaxCount=800
|
||||
InitFn=StdInit
|
||||
ExecFn=StdExec
|
||||
DrawFn=Std
|
||||
Face=0,0,64,64,-32,-32
|
||||
Delay=0
|
||||
Repeats=1
|
||||
AlphaFade=1
|
||||
FadeDelay=2
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
[DefCore]
|
||||
|
||||
id=ACDR
|
||||
|
||||
Version=4,9,8
|
||||
|
||||
Category=C4D_StaticBack|C4D_Environment
|
||||
|
||||
MaxUserSelect=1
|
||||
|
||||
Width=1
|
||||
|
||||
Height=1
|
||||
|
||||
Value=1
|
||||
|
||||
Picture=0,0,64,64
|
||||
|
||||
[DefCore]
|
||||
|
||||
id=ACDR
|
||||
|
||||
Version=4,9,8
|
||||
|
||||
Category=C4D_StaticBack|C4D_Environment
|
||||
|
||||
MaxUserSelect=1
|
||||
|
||||
Width=1
|
||||
|
||||
Height=1
|
||||
|
||||
Value=1
|
||||
|
||||
Picture=0,0,64,64
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#strict 2
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
||||
#strict 2
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Name=Säureregen
|
||||
Name=Säureregen
|
||||
|
|
|
@ -1 +1 @@
|
|||
Name=Acid Rain
|
||||
Name=Acid Rain
|
||||
|
|
|
@ -1,44 +1,44 @@
|
|||
[DefCore]
|
||||
|
||||
id=CLOD
|
||||
|
||||
Version=4,9,8
|
||||
|
||||
Category=C4D_Vehicle|C4D_Foreground
|
||||
|
||||
MaxUserSelect=25
|
||||
|
||||
Timer=25
|
||||
|
||||
TimerCall=TimedEvents
|
||||
|
||||
Width=128
|
||||
|
||||
Height=64
|
||||
|
||||
Offset=-110,-55
|
||||
|
||||
Vertices=3
|
||||
|
||||
VertexX=-40,40,0
|
||||
|
||||
VertexY=0,0,40
|
||||
|
||||
Mass=1
|
||||
|
||||
Picture=0,0,220,110
|
||||
|
||||
Exclusive=1
|
||||
|
||||
Components=CLWD=1
|
||||
|
||||
Oversize=1
|
||||
|
||||
StretchGrowth=1
|
||||
|
||||
|
||||
|
||||
[Physical]
|
||||
|
||||
Float=20
|
||||
|
||||
[DefCore]
|
||||
|
||||
id=CLOD
|
||||
|
||||
Version=4,9,8
|
||||
|
||||
Category=C4D_Vehicle|C4D_Foreground
|
||||
|
||||
MaxUserSelect=25
|
||||
|
||||
Timer=25
|
||||
|
||||
TimerCall=TimedEvents
|
||||
|
||||
Width=128
|
||||
|
||||
Height=64
|
||||
|
||||
Offset=-110,-55
|
||||
|
||||
Vertices=3
|
||||
|
||||
VertexX=-40,40,0
|
||||
|
||||
VertexY=0,0,40
|
||||
|
||||
Mass=1
|
||||
|
||||
Picture=0,0,220,110
|
||||
|
||||
Exclusive=1
|
||||
|
||||
Components=CLWD=1
|
||||
|
||||
Oversize=1
|
||||
|
||||
StretchGrowth=1
|
||||
|
||||
|
||||
|
||||
[Physical]
|
||||
|
||||
Float=20
|
||||
|
||||
|
|
|
@ -1,189 +1,189 @@
|
|||
/*--- Cloud ---*/
|
||||
|
||||
#strict 2
|
||||
|
||||
local szMat, iSize, iCondensing;
|
||||
local iSearchY;
|
||||
local iWaitTime;
|
||||
local iAcidity;
|
||||
local iStrikeChance;
|
||||
|
||||
protected func Initialize()
|
||||
{
|
||||
//Cloud defaults and modifiers
|
||||
iCondensing = 0;
|
||||
iSize = RandomX(300,500);
|
||||
SetClrModulation(RGB(255,255,255));
|
||||
iSearchY = 0;
|
||||
var iGrowth = Random(75);
|
||||
iAcidity=0;
|
||||
iWaitTime = RandomX(130,190);
|
||||
var iGraphics = RandomX(1,3);
|
||||
|
||||
if(iGraphics == 1) SetGraphics("");
|
||||
if(iGraphics == 2) SetGraphics("1");
|
||||
if(iGraphics == 3) SetGraphics("2");
|
||||
DoCon(iGrowth);
|
||||
SetAction("Fly");
|
||||
|
||||
//Push low flying clouds up to proper height
|
||||
while(MaterialDepthCheck(GetX(),GetY(),"Sky",150)!=true)
|
||||
{
|
||||
SetPosition(GetX(),GetY()-1);
|
||||
}
|
||||
|
||||
//Failsafe for stupid grounded clouds
|
||||
if(GetMaterial(0,30)!=Material("Sky")) SetPosition(GetX(), GetY()-180);
|
||||
|
||||
}
|
||||
|
||||
public func Precipitation()
|
||||
{
|
||||
var iLaunch;
|
||||
|
||||
if (GetTemperature() < 0 && iAcidity==0) szMat="Snow";
|
||||
if (GetTemperature()>=1 && iAcidity==0) szMat="Water";
|
||||
if (iAcidity>=1) szMat="Acid";
|
||||
|
||||
//Reroute function to Evaporation if cloud is growing
|
||||
if(iCondensing == 1) return(Evaporation());
|
||||
if(iSize <= 50 && iAcidity==0) iCondensing = 1;
|
||||
|
||||
//water-snow precipitation
|
||||
if(iWaitTime == 0 && szMat!="Acid")
|
||||
{
|
||||
RainDrop();
|
||||
(iSize = --iSize);
|
||||
}
|
||||
|
||||
//acid precipitation
|
||||
if(iWaitTime == 0 && szMat=="Acid")
|
||||
{
|
||||
RainDrop();
|
||||
(iAcidity = --iAcidity);
|
||||
}
|
||||
//Lightning Strike; only during rain
|
||||
if(iWaitTime <= 0 && iSize >= 650 && Random(100) >= 100-(iStrikeChance/16) && szMat=="Water") LaunchLightning(GetX(), GetY() + 20, -20, 41, +5, 15);
|
||||
}
|
||||
|
||||
public func TimedEvents()
|
||||
{
|
||||
var iRight = LandscapeWidth()-10;
|
||||
|
||||
if(iWaitTime != 0) (iWaitTime = --iWaitTime);
|
||||
WindDirection();
|
||||
CloudShade();
|
||||
//Makes clouds loop around map;
|
||||
if(GetX() >= iRight) SetPosition(12, GetY());
|
||||
if(GetX() <= 10) SetPosition(LandscapeWidth()-12, GetY());
|
||||
if(GetY() <= 5) SetPosition(0,6);
|
||||
if(GetYDir()!=0) SetYDir(0);
|
||||
|
||||
while(Stuck()) SetPosition(GetX(),GetY()-5);
|
||||
}
|
||||
|
||||
protected func Evaporation() //Creates a search line every x-amount(currently five) of pixels to check for water beneath the cloud
|
||||
{
|
||||
var iSearchX = GetX();
|
||||
var iPrecision = 5;
|
||||
|
||||
if(iSize >= 700 || iAcidity>=100)
|
||||
{
|
||||
(iCondensing = 0);
|
||||
(iSearchY = 0);
|
||||
(iWaitTime = RandomX(130,190));
|
||||
}
|
||||
//line below prevents clouds evaporating through solids
|
||||
if(GetMaterial(0, iSearchY) != Material("Water") && GetMaterial(0, iSearchY) != Material("Acid") && GetMaterial(0, iSearchY) != Material("Sky")) return(iSearchY=0);
|
||||
if(GetMaterial(0, iSearchY) == Material("Water"))
|
||||
{
|
||||
ExtractMaterialAmount(0, iSearchY,Material("Water"), 3) &&
|
||||
(iSize = iSize+3);
|
||||
}
|
||||
if(ObjectCount(Find_ID(ACDR))>=1 && GetMaterial(0, iSearchY) == Material("Acid")) ExtractMaterialAmount(0, iSearchY,Material("Acid"), 3) &&
|
||||
(iAcidity = iAcidity+3);
|
||||
if(GetMaterial(0, iSearchY) != Material("Water") && GetMaterial(0, iSearchY) != Material("Acid"))
|
||||
iSearchY = iSearchY + iPrecision;
|
||||
if(iSearchY >= LandscapeHeight()-GetY()) (iSearchY = 0);
|
||||
}
|
||||
|
||||
private func CloudShade()
|
||||
{
|
||||
//Shades the clouds based on iSize: the water density value of the cloud.
|
||||
var iShade = iSize*425/1000;
|
||||
var iShade2 = iSize-600;
|
||||
var iShade3 = (iAcidity*255/100)/2;
|
||||
|
||||
if(iSize <= 600) SetObjAlpha(iShade);
|
||||
if(iSize > 600) SetObjAlpha(255);
|
||||
if(iSize > 600 && szMat=="Water") SetClrModulation(RGBa(255-iShade2,255-iShade2,255-iShade2, 255));
|
||||
if(iAcidity >= 1) SetClrModulation(RGBa(255-iShade3,255,255-iShade3, 255-iShade));
|
||||
}
|
||||
|
||||
public func RainDrop()
|
||||
{
|
||||
CastPXS(szMat, 1, 1, RandomX(-50, 50));
|
||||
}
|
||||
|
||||
//Sven2's alpha function
|
||||
global func SetObjAlpha(int byAlpha, pObj)
|
||||
{
|
||||
var dwClrMod=GetClrModulation(pObj);
|
||||
|
||||
if (!dwClrMod) dwClrMod = byAlpha<<24; else dwClrMod = dwClrMod & 16777215 | byAlpha<<24;
|
||||
return(SetClrModulation(dwClrMod, pObj));
|
||||
}
|
||||
|
||||
//For use as scenario setting. Can work after initialize, if you really want to.
|
||||
global func AdjustLightningFrequency(int iFreq)
|
||||
{
|
||||
for(var Cloud in FindObjects(Find_ID(CLOD)))
|
||||
Cloud->SetLightningFrequency(iFreq);
|
||||
return(iFreq);
|
||||
}
|
||||
|
||||
//Routes the global adjust function's variable to the clouds.
|
||||
public func SetLightningFrequency(int iFreq)
|
||||
{
|
||||
iStrikeChance=iFreq;
|
||||
}
|
||||
|
||||
private func WindDirection()
|
||||
{
|
||||
var iWind = GetWind();
|
||||
|
||||
if(iWind >= 7) SetXDir(Random(355),1000);
|
||||
if(iWind <= -7) SetXDir(-Random(355),1000);
|
||||
if(iWind < 6 && iWind > -6) SetXDir();
|
||||
}
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("ActMap", {
|
||||
Fly = {
|
||||
Prototype = Action,
|
||||
Name = "Fly",
|
||||
Procedure = DFA_FLOAT,
|
||||
X = 0,
|
||||
Y = 0,
|
||||
Wdt = 220,
|
||||
Hgt = 110,
|
||||
Length = 1,
|
||||
Delay = 15,
|
||||
NextAction = "Fly",
|
||||
TurnAction = "Turn",
|
||||
StartCall = "Precipitation",
|
||||
},
|
||||
Turn = {
|
||||
Prototype = Action,
|
||||
Name = "Turn",
|
||||
Procedure = DFA_FLOAT,
|
||||
Length = 1,
|
||||
Delay = 1,
|
||||
X = 0,
|
||||
Y = 0,
|
||||
Wdt = 220,
|
||||
Hgt = 110,
|
||||
NextAction = "Fly",
|
||||
}, }, def);
|
||||
SetProperty("Name", "Cloud", def);
|
||||
}
|
||||
/*--- Cloud ---*/
|
||||
|
||||
#strict 2
|
||||
|
||||
local szMat, iSize, iCondensing;
|
||||
local iSearchY;
|
||||
local iWaitTime;
|
||||
local iAcidity;
|
||||
local iStrikeChance;
|
||||
|
||||
protected func Initialize()
|
||||
{
|
||||
//Cloud defaults and modifiers
|
||||
iCondensing = 0;
|
||||
iSize = RandomX(300,500);
|
||||
SetClrModulation(RGB(255,255,255));
|
||||
iSearchY = 0;
|
||||
var iGrowth = Random(75);
|
||||
iAcidity=0;
|
||||
iWaitTime = RandomX(130,190);
|
||||
var iGraphics = RandomX(1,3);
|
||||
|
||||
if(iGraphics == 1) SetGraphics("");
|
||||
if(iGraphics == 2) SetGraphics("1");
|
||||
if(iGraphics == 3) SetGraphics("2");
|
||||
DoCon(iGrowth);
|
||||
SetAction("Fly");
|
||||
|
||||
//Push low flying clouds up to proper height
|
||||
while(MaterialDepthCheck(GetX(),GetY(),"Sky",150)!=true)
|
||||
{
|
||||
SetPosition(GetX(),GetY()-1);
|
||||
}
|
||||
|
||||
//Failsafe for stupid grounded clouds
|
||||
if(GetMaterial(0,30)!=Material("Sky")) SetPosition(GetX(), GetY()-180);
|
||||
|
||||
}
|
||||
|
||||
public func Precipitation()
|
||||
{
|
||||
var iLaunch;
|
||||
|
||||
if (GetTemperature() < 0 && iAcidity==0) szMat="Snow";
|
||||
if (GetTemperature()>=1 && iAcidity==0) szMat="Water";
|
||||
if (iAcidity>=1) szMat="Acid";
|
||||
|
||||
//Reroute function to Evaporation if cloud is growing
|
||||
if(iCondensing == 1) return(Evaporation());
|
||||
if(iSize <= 50 && iAcidity==0) iCondensing = 1;
|
||||
|
||||
//water-snow precipitation
|
||||
if(iWaitTime == 0 && szMat!="Acid")
|
||||
{
|
||||
RainDrop();
|
||||
(iSize = --iSize);
|
||||
}
|
||||
|
||||
//acid precipitation
|
||||
if(iWaitTime == 0 && szMat=="Acid")
|
||||
{
|
||||
RainDrop();
|
||||
(iAcidity = --iAcidity);
|
||||
}
|
||||
//Lightning Strike; only during rain
|
||||
if(iWaitTime <= 0 && iSize >= 650 && Random(100) >= 100-(iStrikeChance/16) && szMat=="Water") LaunchLightning(GetX(), GetY() + 20, -20, 41, +5, 15);
|
||||
}
|
||||
|
||||
public func TimedEvents()
|
||||
{
|
||||
var iRight = LandscapeWidth()-10;
|
||||
|
||||
if(iWaitTime != 0) (iWaitTime = --iWaitTime);
|
||||
WindDirection();
|
||||
CloudShade();
|
||||
//Makes clouds loop around map;
|
||||
if(GetX() >= iRight) SetPosition(12, GetY());
|
||||
if(GetX() <= 10) SetPosition(LandscapeWidth()-12, GetY());
|
||||
if(GetY() <= 5) SetPosition(0,6);
|
||||
if(GetYDir()!=0) SetYDir(0);
|
||||
|
||||
while(Stuck()) SetPosition(GetX(),GetY()-5);
|
||||
}
|
||||
|
||||
protected func Evaporation() //Creates a search line every x-amount(currently five) of pixels to check for water beneath the cloud
|
||||
{
|
||||
var iSearchX = GetX();
|
||||
var iPrecision = 5;
|
||||
|
||||
if(iSize >= 700 || iAcidity>=100)
|
||||
{
|
||||
(iCondensing = 0);
|
||||
(iSearchY = 0);
|
||||
(iWaitTime = RandomX(130,190));
|
||||
}
|
||||
//line below prevents clouds evaporating through solids
|
||||
if(GetMaterial(0, iSearchY) != Material("Water") && GetMaterial(0, iSearchY) != Material("Acid") && GetMaterial(0, iSearchY) != Material("Sky")) return(iSearchY=0);
|
||||
if(GetMaterial(0, iSearchY) == Material("Water"))
|
||||
{
|
||||
ExtractMaterialAmount(0, iSearchY,Material("Water"), 3) &&
|
||||
(iSize = iSize+3);
|
||||
}
|
||||
if(ObjectCount(Find_ID(ACDR))>=1 && GetMaterial(0, iSearchY) == Material("Acid")) ExtractMaterialAmount(0, iSearchY,Material("Acid"), 3) &&
|
||||
(iAcidity = iAcidity+3);
|
||||
if(GetMaterial(0, iSearchY) != Material("Water") && GetMaterial(0, iSearchY) != Material("Acid"))
|
||||
iSearchY = iSearchY + iPrecision;
|
||||
if(iSearchY >= LandscapeHeight()-GetY()) (iSearchY = 0);
|
||||
}
|
||||
|
||||
private func CloudShade()
|
||||
{
|
||||
//Shades the clouds based on iSize: the water density value of the cloud.
|
||||
var iShade = iSize*425/1000;
|
||||
var iShade2 = iSize-600;
|
||||
var iShade3 = (iAcidity*255/100)/2;
|
||||
|
||||
if(iSize <= 600) SetObjAlpha(iShade);
|
||||
if(iSize > 600) SetObjAlpha(255);
|
||||
if(iSize > 600 && szMat=="Water") SetClrModulation(RGBa(255-iShade2,255-iShade2,255-iShade2, 255));
|
||||
if(iAcidity >= 1) SetClrModulation(RGBa(255-iShade3,255,255-iShade3, 255-iShade));
|
||||
}
|
||||
|
||||
public func RainDrop()
|
||||
{
|
||||
CastPXS(szMat, 1, 1, RandomX(-50, 50));
|
||||
}
|
||||
|
||||
//Sven2's alpha function
|
||||
global func SetObjAlpha(int byAlpha, pObj)
|
||||
{
|
||||
var dwClrMod=GetClrModulation(pObj);
|
||||
|
||||
if (!dwClrMod) dwClrMod = byAlpha<<24; else dwClrMod = dwClrMod & 16777215 | byAlpha<<24;
|
||||
return(SetClrModulation(dwClrMod, pObj));
|
||||
}
|
||||
|
||||
//For use as scenario setting. Can work after initialize, if you really want to.
|
||||
global func AdjustLightningFrequency(int iFreq)
|
||||
{
|
||||
for(var Cloud in FindObjects(Find_ID(CLOD)))
|
||||
Cloud->SetLightningFrequency(iFreq);
|
||||
return(iFreq);
|
||||
}
|
||||
|
||||
//Routes the global adjust function's variable to the clouds.
|
||||
public func SetLightningFrequency(int iFreq)
|
||||
{
|
||||
iStrikeChance=iFreq;
|
||||
}
|
||||
|
||||
private func WindDirection()
|
||||
{
|
||||
var iWind = GetWind();
|
||||
|
||||
if(iWind >= 7) SetXDir(Random(355),1000);
|
||||
if(iWind <= -7) SetXDir(-Random(355),1000);
|
||||
if(iWind < 6 && iWind > -6) SetXDir();
|
||||
}
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("ActMap", {
|
||||
Fly = {
|
||||
Prototype = Action,
|
||||
Name = "Fly",
|
||||
Procedure = DFA_FLOAT,
|
||||
X = 0,
|
||||
Y = 0,
|
||||
Wdt = 220,
|
||||
Hgt = 110,
|
||||
Length = 1,
|
||||
Delay = 15,
|
||||
NextAction = "Fly",
|
||||
TurnAction = "Turn",
|
||||
StartCall = "Precipitation",
|
||||
},
|
||||
Turn = {
|
||||
Prototype = Action,
|
||||
Name = "Turn",
|
||||
Procedure = DFA_FLOAT,
|
||||
Length = 1,
|
||||
Delay = 1,
|
||||
X = 0,
|
||||
Y = 0,
|
||||
Wdt = 220,
|
||||
Hgt = 110,
|
||||
NextAction = "Fly",
|
||||
}, }, def);
|
||||
SetProperty("Name", "Cloud", def);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
[DefCore]
|
||||
id=CLDP
|
||||
Version=4,9,8
|
||||
Category=C4D_StaticBack|C4D_Environment
|
||||
MaxUserSelect=2
|
||||
Width=1
|
||||
Height=1
|
||||
Value=1
|
||||
Picture=0,0,64,64
|
||||
[DefCore]
|
||||
id=CLDP
|
||||
Version=4,9,8
|
||||
Category=C4D_StaticBack|C4D_Environment
|
||||
MaxUserSelect=2
|
||||
Width=1
|
||||
Height=1
|
||||
Value=1
|
||||
Picture=0,0,64,64
|
||||
|
|
|
@ -1,39 +1,39 @@
|
|||
/*-- Cloud Placer --*/
|
||||
|
||||
#strict 2
|
||||
|
||||
//Great thanks to Maikel for the following function provided
|
||||
protected func FindPosInMat(int &iToX, int &iToY, string sMat, int iXStart, int iYStart, int iWidth, int iHeight, int iSize)
|
||||
{
|
||||
var iX, iY;
|
||||
for(var i = 0; i < 500; i++)
|
||||
{
|
||||
iX = iXStart+Random(iWidth);
|
||||
iY = iYStart+Random(iHeight);
|
||||
if(GetMaterial(AbsX(iX),AbsY(iY))==Material(sMat) &&
|
||||
GetMaterial(AbsX(iX+iSize),AbsY(iY+iSize))==Material(sMat) &&
|
||||
GetMaterial(AbsX(iX+iSize),AbsY(iY-iSize))==Material(sMat) &&
|
||||
GetMaterial(AbsX(iX-iSize),AbsY(iY-iSize))==Material(sMat) &&
|
||||
GetMaterial(AbsX(iX-iSize),AbsY(iY+iSize))==Material(sMat))
|
||||
{
|
||||
iToX = iX; iToY = iY;
|
||||
return true; // Location found.
|
||||
}
|
||||
}
|
||||
return false; // No location found.
|
||||
}
|
||||
protected func Initialize()
|
||||
{
|
||||
var iX, iY;
|
||||
var iCount = LandscapeWidth()/65; //Determines how many clouds should be on a map
|
||||
|
||||
while(iCount!=0)
|
||||
{
|
||||
if(FindPosInMat(iX, iY, "Sky", 0,0,LandscapeWidth(), LandscapeHeight()) && MaterialDepthCheck(iX,iY,"Sky",200)==true) CreateObject(CLOD, iX, iY, NO_OWNER) && (iCount=--iCount);
|
||||
}
|
||||
AdjustLightningFrequency(GetScenarioVal("Lightning"));
|
||||
}
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
||||
/*-- Cloud Placer --*/
|
||||
|
||||
#strict 2
|
||||
|
||||
//Great thanks to Maikel for the following function provided
|
||||
protected func FindPosInMat(int &iToX, int &iToY, string sMat, int iXStart, int iYStart, int iWidth, int iHeight, int iSize)
|
||||
{
|
||||
var iX, iY;
|
||||
for(var i = 0; i < 500; i++)
|
||||
{
|
||||
iX = iXStart+Random(iWidth);
|
||||
iY = iYStart+Random(iHeight);
|
||||
if(GetMaterial(AbsX(iX),AbsY(iY))==Material(sMat) &&
|
||||
GetMaterial(AbsX(iX+iSize),AbsY(iY+iSize))==Material(sMat) &&
|
||||
GetMaterial(AbsX(iX+iSize),AbsY(iY-iSize))==Material(sMat) &&
|
||||
GetMaterial(AbsX(iX-iSize),AbsY(iY-iSize))==Material(sMat) &&
|
||||
GetMaterial(AbsX(iX-iSize),AbsY(iY+iSize))==Material(sMat))
|
||||
{
|
||||
iToX = iX; iToY = iY;
|
||||
return true; // Location found.
|
||||
}
|
||||
}
|
||||
return false; // No location found.
|
||||
}
|
||||
protected func Initialize()
|
||||
{
|
||||
var iX, iY;
|
||||
var iCount = LandscapeWidth()/65; //Determines how many clouds should be on a map
|
||||
|
||||
while(iCount!=0)
|
||||
{
|
||||
if(FindPosInMat(iX, iY, "Sky", 0,0,LandscapeWidth(), LandscapeHeight()) && MaterialDepthCheck(iX,iY,"Sky",200)==true) CreateObject(CLOD, iX, iY, NO_OWNER) && (iCount=--iCount);
|
||||
}
|
||||
AdjustLightningFrequency(GetScenarioVal("Lightning"));
|
||||
}
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Name=Wolken
|
||||
Name=Wolken
|
||||
|
|
|
@ -1 +1 @@
|
|||
Name=Clouds
|
||||
Name=Clouds
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[DefCore]
|
||||
id=HUDC
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack | C4D_Environment
|
||||
[DefCore]
|
||||
id=HUDC
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack | C4D_Environment
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
DE:Controller
|
||||
US:Controller
|
||||
DE:Controller
|
||||
US:Controller
|
||||
|
|
|
@ -1,310 +1,310 @@
|
|||
#strict 2
|
||||
|
||||
/*
|
||||
Per-Player Controller (HUD)
|
||||
Author: Newton
|
||||
|
||||
Creates and removes the crew selectors as well as reorders them and
|
||||
manages when a crew changes it's controller. Responsible for taking
|
||||
care of the action (inventory) bar.
|
||||
*/
|
||||
|
||||
// TODO -
|
||||
// following callbacks missing:
|
||||
// ...? - entire player is eliminated
|
||||
|
||||
local actionbar;
|
||||
local wealth;
|
||||
|
||||
protected func Construction()
|
||||
{
|
||||
actionbar = CreateArray();
|
||||
|
||||
// find all clonks of this crew which do not have a selector yet (and can have one)
|
||||
for(var i=GetCrewCount(GetOwner())-1; i >= 0; --i)
|
||||
{
|
||||
var crew = GetCrew(GetOwner(),i);
|
||||
if(!(crew->HUDAdapter())) continue;
|
||||
|
||||
var sel = crew->GetSelector();
|
||||
if(!sel)
|
||||
CreateSelectorFor(crew);
|
||||
}
|
||||
|
||||
// reorder the crew selectors
|
||||
ReorderCrewSelectors();
|
||||
|
||||
// wealth display
|
||||
wealth = CreateObject(WEAL,0,0,GetOwner());
|
||||
wealth->SetPosition(-16-WEAL->GetDefHeight()/2,8+WEAL->GetDefHeight()/2);
|
||||
wealth->Update();
|
||||
}
|
||||
|
||||
protected func OnWealthChanged(int plr)
|
||||
{
|
||||
if(plr != GetOwner()) return;
|
||||
if(wealth) wealth->Update();
|
||||
}
|
||||
|
||||
protected func OnClonkRecruitment(object clonk, int plr)
|
||||
{
|
||||
// not my business
|
||||
if(plr != GetOwner()) return;
|
||||
|
||||
if(!(clonk->HUDAdapter())) return;
|
||||
|
||||
// not enabled
|
||||
if(!clonk->GetCrewEnabled()) return;
|
||||
|
||||
// if the clonk already has a hud, it means that he belonged to another
|
||||
// crew. So we need another handling here in this case.
|
||||
var sel;
|
||||
if(sel = clonk->GetSelector())
|
||||
{
|
||||
var owner = sel->GetOwner();
|
||||
sel->UpdateController();
|
||||
|
||||
// reorder stuff in the other one
|
||||
var othercontroller = FindObject(Find_ID(GetID()), Find_Owner(owner));
|
||||
othercontroller->ReorderCrewSelectors();
|
||||
}
|
||||
// create new crew selector
|
||||
else
|
||||
{
|
||||
CreateSelectorFor(clonk);
|
||||
}
|
||||
|
||||
// reorder the crew selectors
|
||||
ReorderCrewSelectors();
|
||||
}
|
||||
|
||||
protected func OnClonkDeRecruitment(object clonk, int plr)
|
||||
{
|
||||
// not my business
|
||||
if(plr != GetOwner()) return;
|
||||
if(!(clonk->HUDAdapter())) return;
|
||||
|
||||
OnCrewDisabled(clonk);
|
||||
}
|
||||
|
||||
protected func OnClonkDeath(object clonk, int killer)
|
||||
{
|
||||
if(clonk->GetController() != GetOwner()) return;
|
||||
if(!(clonk->HUDAdapter())) return;
|
||||
|
||||
OnCrewDisabled(clonk);
|
||||
}
|
||||
|
||||
public func OnCrewDisabled(object clonk)
|
||||
{
|
||||
// notify the hud and reorder
|
||||
clonk->GetSelector()->CrewGone();
|
||||
ReorderCrewSelectors();
|
||||
}
|
||||
|
||||
public func OnCrewEnabled(object clonk)
|
||||
{
|
||||
CreateSelectorFor(clonk);
|
||||
ReorderCrewSelectors();
|
||||
}
|
||||
|
||||
// call from HUDAdapter (Clonk)
|
||||
public func OnCrewSelection(object clonk, bool deselect)
|
||||
{
|
||||
|
||||
// selected
|
||||
if(!deselect)
|
||||
{
|
||||
// TODO: what if two clonks are selected? Which clonk gets the actionbar?
|
||||
|
||||
// fill actionbar
|
||||
// inventory
|
||||
var i;
|
||||
for(i = 0; i < clonk->MaxContentsCount(); ++i)
|
||||
{
|
||||
ActionButton(clonk,i,clonk->GetItem(i),ACTIONTYPE_INVENTORY);
|
||||
}
|
||||
ClearButtons(i);
|
||||
|
||||
// and start effect to monitor vehicles and structures...
|
||||
AddEffect("IntSearchInteractionObjects",clonk,1,10,this,nil,i);
|
||||
}
|
||||
else
|
||||
{
|
||||
// remove effect
|
||||
RemoveEffect("IntSearchInteractionObjects",clonk,0);
|
||||
ClearButtons();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public func FxIntSearchInteractionObjectsStart(object target, int num, int temp, startAt)
|
||||
{
|
||||
if(temp != 0) return;
|
||||
EffectVar(0,target,num) = startAt;
|
||||
EffectCall(target,num,"Timer",target,num,0);
|
||||
}
|
||||
|
||||
public func FxIntSearchInteractionObjectsTimer(object target, int num, int time)
|
||||
{
|
||||
|
||||
// find vehicles & structures
|
||||
var startAt = EffectVar(0,target,num);
|
||||
var i = startAt;
|
||||
|
||||
var vehicles = CreateArray();
|
||||
var pushed = nil;
|
||||
|
||||
var exclusive = false;
|
||||
|
||||
// if contained, search for vehicles that are inside the buildings to push out
|
||||
if((!target->Contained()))
|
||||
{
|
||||
// target->FindObjects(Find_AtPoint(0,0),Find_OCF(OCF_Grab),Find_NoContainer());
|
||||
// doesnt work!! -> BUG! (TODO)
|
||||
|
||||
vehicles = FindObjects(Find_AtPoint(target->GetX()-GetX(),target->GetY()-GetY()),Find_OCF(OCF_Grab),Find_NoContainer());
|
||||
|
||||
// don't forget the vehicle that the clonk is pushing (might not be found
|
||||
// by the findobjects because it is not at that point)
|
||||
if(target->GetProcedure() == "PUSH" && (pushed = target->GetActionTarget()))
|
||||
{
|
||||
// if the pushed vehicle has been found, we can just continue
|
||||
var inside = false;
|
||||
for(var vehicle in vehicles)
|
||||
if(vehicle == pushed)
|
||||
inside = true;
|
||||
|
||||
// otherwise we must add it before the rest
|
||||
if(!inside)
|
||||
{
|
||||
ActionButton(target,i,pushed,ACTIONTYPE_VEHICLE);
|
||||
if(actionbar[i]->Selected()) exclusive = true;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vehicles = FindObjects(Find_OCF(OCF_Grab),Find_Container(target->Contained()));
|
||||
}
|
||||
|
||||
for(var vehicle in vehicles)
|
||||
{
|
||||
ActionButton(target,i,vehicle,ACTIONTYPE_VEHICLE);
|
||||
if(actionbar[i]->Selected()) exclusive = true;
|
||||
++i;
|
||||
}
|
||||
|
||||
var structures = FindObjects(Find_AtPoint(target->GetX()-GetX(),target->GetY()-GetY()),Find_OCF(OCF_Entrance),Find_NoContainer());
|
||||
for(var structure in structures)
|
||||
{
|
||||
ActionButton(target,i,structure,ACTIONTYPE_STRUCTURE);
|
||||
if(actionbar[i]->Selected()) exclusive = true;
|
||||
++i;
|
||||
}
|
||||
|
||||
//Message("found %d vehicles and %d structures",target,GetLength(vehicles),GetLength(structures));
|
||||
|
||||
ClearButtons(i);
|
||||
|
||||
// if a vehicle or structure is selected, the hands need to be removed
|
||||
// from the inventory
|
||||
actionbar[target->GetSelected()]->UpdateHands();
|
||||
actionbar[target->GetSelected(true)]->UpdateHands();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// call from HUDAdapter (Clonk)
|
||||
public func OnSelectionChanged(int old, int new)
|
||||
{
|
||||
//Log("selection changed from %d to %d", old, new);
|
||||
// update both old and new
|
||||
actionbar[old]->UpdateSelectionStatus();
|
||||
actionbar[new]->UpdateSelectionStatus();
|
||||
}
|
||||
|
||||
// call from HUDAdapter (Clonk)
|
||||
public func OnSlotObjectChanged(int slot)
|
||||
{
|
||||
//Log("slot %d changed", slot);
|
||||
var obj = GetCursor(GetOwner())->GetItem(slot);
|
||||
actionbar[slot]->SetObject(obj, ACTIONTYPE_INVENTORY, slot);
|
||||
}
|
||||
|
||||
private func ActionButton(object forClonk, int pos, object interaction, int actiontype)
|
||||
{
|
||||
var size = ACBT->GetDefWidth();
|
||||
var spacing = 12 + size;
|
||||
|
||||
// don't forget the spacings between inventory - vehicle,structure
|
||||
var extra = 0;
|
||||
if(forClonk->MaxContentsCount() <= pos) extra = 80;
|
||||
|
||||
var bt = actionbar[pos];
|
||||
// no object yet... create it
|
||||
if(!bt)
|
||||
{
|
||||
bt = CreateObject(ACBT,0,0,GetOwner());
|
||||
}
|
||||
|
||||
bt->SetPosition(64 + pos * spacing + extra, -16 - size/2);
|
||||
|
||||
bt->SetCrew(forClonk);
|
||||
bt->SetObject(interaction,actiontype,pos);
|
||||
|
||||
actionbar[pos] = bt;
|
||||
return bt;
|
||||
}
|
||||
|
||||
private func ClearButtons(int start)
|
||||
{
|
||||
|
||||
// make rest invisible
|
||||
for(var j = start; j < GetLength(actionbar); ++j)
|
||||
{
|
||||
// we don't have to remove them all the time, no?
|
||||
if(actionbar[j])
|
||||
actionbar[j]->Clear();
|
||||
}
|
||||
}
|
||||
|
||||
// hotkey control
|
||||
public func ControlHotkey(int hotindex)
|
||||
{
|
||||
if(GetLength(actionbar) <= hotindex) return false;
|
||||
|
||||
actionbar[hotindex]->~MouseSelection(GetOwner());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private func CreateSelectorFor(object clonk)
|
||||
{
|
||||
var selector = CreateObject(CSLR,10,10,-1);
|
||||
selector->SetCrew(clonk);
|
||||
clonk->SetSelector(selector);
|
||||
return selector;
|
||||
}
|
||||
|
||||
public func ReorderCrewSelectors()
|
||||
{
|
||||
// somehow new crew gets sorted at the beginning
|
||||
// because we dont want that, the for loop starts from the end
|
||||
var j = 0;
|
||||
for(var i=GetCrewCount(GetOwner())-1; i >= 0; --i)
|
||||
{
|
||||
var spacing = 12;
|
||||
var crew = GetCrew(GetOwner(),i);
|
||||
var sel = crew->GetSelector();
|
||||
if(sel)
|
||||
{
|
||||
sel->SetPosition(32 + j * (CSLR->GetDefWidth() + spacing) + CSLR->GetDefWidth()/2, 16+CSLR->GetDefHeight()/2);
|
||||
if(j+1 == 10) sel->SetHotkey(0);
|
||||
else if(j+1 < 10) sel->SetHotkey(j+1);
|
||||
}
|
||||
|
||||
j++;
|
||||
}
|
||||
}
|
||||
#strict 2
|
||||
|
||||
/*
|
||||
Per-Player Controller (HUD)
|
||||
Author: Newton
|
||||
|
||||
Creates and removes the crew selectors as well as reorders them and
|
||||
manages when a crew changes it's controller. Responsible for taking
|
||||
care of the action (inventory) bar.
|
||||
*/
|
||||
|
||||
// TODO -
|
||||
// following callbacks missing:
|
||||
// ...? - entire player is eliminated
|
||||
|
||||
local actionbar;
|
||||
local wealth;
|
||||
|
||||
protected func Construction()
|
||||
{
|
||||
actionbar = CreateArray();
|
||||
|
||||
// find all clonks of this crew which do not have a selector yet (and can have one)
|
||||
for(var i=GetCrewCount(GetOwner())-1; i >= 0; --i)
|
||||
{
|
||||
var crew = GetCrew(GetOwner(),i);
|
||||
if(!(crew->HUDAdapter())) continue;
|
||||
|
||||
var sel = crew->GetSelector();
|
||||
if(!sel)
|
||||
CreateSelectorFor(crew);
|
||||
}
|
||||
|
||||
// reorder the crew selectors
|
||||
ReorderCrewSelectors();
|
||||
|
||||
// wealth display
|
||||
wealth = CreateObject(WEAL,0,0,GetOwner());
|
||||
wealth->SetPosition(-16-WEAL->GetDefHeight()/2,8+WEAL->GetDefHeight()/2);
|
||||
wealth->Update();
|
||||
}
|
||||
|
||||
protected func OnWealthChanged(int plr)
|
||||
{
|
||||
if(plr != GetOwner()) return;
|
||||
if(wealth) wealth->Update();
|
||||
}
|
||||
|
||||
protected func OnClonkRecruitment(object clonk, int plr)
|
||||
{
|
||||
// not my business
|
||||
if(plr != GetOwner()) return;
|
||||
|
||||
if(!(clonk->HUDAdapter())) return;
|
||||
|
||||
// not enabled
|
||||
if(!clonk->GetCrewEnabled()) return;
|
||||
|
||||
// if the clonk already has a hud, it means that he belonged to another
|
||||
// crew. So we need another handling here in this case.
|
||||
var sel;
|
||||
if(sel = clonk->GetSelector())
|
||||
{
|
||||
var owner = sel->GetOwner();
|
||||
sel->UpdateController();
|
||||
|
||||
// reorder stuff in the other one
|
||||
var othercontroller = FindObject(Find_ID(GetID()), Find_Owner(owner));
|
||||
othercontroller->ReorderCrewSelectors();
|
||||
}
|
||||
// create new crew selector
|
||||
else
|
||||
{
|
||||
CreateSelectorFor(clonk);
|
||||
}
|
||||
|
||||
// reorder the crew selectors
|
||||
ReorderCrewSelectors();
|
||||
}
|
||||
|
||||
protected func OnClonkDeRecruitment(object clonk, int plr)
|
||||
{
|
||||
// not my business
|
||||
if(plr != GetOwner()) return;
|
||||
if(!(clonk->HUDAdapter())) return;
|
||||
|
||||
OnCrewDisabled(clonk);
|
||||
}
|
||||
|
||||
protected func OnClonkDeath(object clonk, int killer)
|
||||
{
|
||||
if(clonk->GetController() != GetOwner()) return;
|
||||
if(!(clonk->HUDAdapter())) return;
|
||||
|
||||
OnCrewDisabled(clonk);
|
||||
}
|
||||
|
||||
public func OnCrewDisabled(object clonk)
|
||||
{
|
||||
// notify the hud and reorder
|
||||
clonk->GetSelector()->CrewGone();
|
||||
ReorderCrewSelectors();
|
||||
}
|
||||
|
||||
public func OnCrewEnabled(object clonk)
|
||||
{
|
||||
CreateSelectorFor(clonk);
|
||||
ReorderCrewSelectors();
|
||||
}
|
||||
|
||||
// call from HUDAdapter (Clonk)
|
||||
public func OnCrewSelection(object clonk, bool deselect)
|
||||
{
|
||||
|
||||
// selected
|
||||
if(!deselect)
|
||||
{
|
||||
// TODO: what if two clonks are selected? Which clonk gets the actionbar?
|
||||
|
||||
// fill actionbar
|
||||
// inventory
|
||||
var i;
|
||||
for(i = 0; i < clonk->MaxContentsCount(); ++i)
|
||||
{
|
||||
ActionButton(clonk,i,clonk->GetItem(i),ACTIONTYPE_INVENTORY);
|
||||
}
|
||||
ClearButtons(i);
|
||||
|
||||
// and start effect to monitor vehicles and structures...
|
||||
AddEffect("IntSearchInteractionObjects",clonk,1,10,this,nil,i);
|
||||
}
|
||||
else
|
||||
{
|
||||
// remove effect
|
||||
RemoveEffect("IntSearchInteractionObjects",clonk,0);
|
||||
ClearButtons();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public func FxIntSearchInteractionObjectsStart(object target, int num, int temp, startAt)
|
||||
{
|
||||
if(temp != 0) return;
|
||||
EffectVar(0,target,num) = startAt;
|
||||
EffectCall(target,num,"Timer",target,num,0);
|
||||
}
|
||||
|
||||
public func FxIntSearchInteractionObjectsTimer(object target, int num, int time)
|
||||
{
|
||||
|
||||
// find vehicles & structures
|
||||
var startAt = EffectVar(0,target,num);
|
||||
var i = startAt;
|
||||
|
||||
var vehicles = CreateArray();
|
||||
var pushed = nil;
|
||||
|
||||
var exclusive = false;
|
||||
|
||||
// if contained, search for vehicles that are inside the buildings to push out
|
||||
if((!target->Contained()))
|
||||
{
|
||||
// target->FindObjects(Find_AtPoint(0,0),Find_OCF(OCF_Grab),Find_NoContainer());
|
||||
// doesnt work!! -> BUG! (TODO)
|
||||
|
||||
vehicles = FindObjects(Find_AtPoint(target->GetX()-GetX(),target->GetY()-GetY()),Find_OCF(OCF_Grab),Find_NoContainer());
|
||||
|
||||
// don't forget the vehicle that the clonk is pushing (might not be found
|
||||
// by the findobjects because it is not at that point)
|
||||
if(target->GetProcedure() == "PUSH" && (pushed = target->GetActionTarget()))
|
||||
{
|
||||
// if the pushed vehicle has been found, we can just continue
|
||||
var inside = false;
|
||||
for(var vehicle in vehicles)
|
||||
if(vehicle == pushed)
|
||||
inside = true;
|
||||
|
||||
// otherwise we must add it before the rest
|
||||
if(!inside)
|
||||
{
|
||||
ActionButton(target,i,pushed,ACTIONTYPE_VEHICLE);
|
||||
if(actionbar[i]->Selected()) exclusive = true;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vehicles = FindObjects(Find_OCF(OCF_Grab),Find_Container(target->Contained()));
|
||||
}
|
||||
|
||||
for(var vehicle in vehicles)
|
||||
{
|
||||
ActionButton(target,i,vehicle,ACTIONTYPE_VEHICLE);
|
||||
if(actionbar[i]->Selected()) exclusive = true;
|
||||
++i;
|
||||
}
|
||||
|
||||
var structures = FindObjects(Find_AtPoint(target->GetX()-GetX(),target->GetY()-GetY()),Find_OCF(OCF_Entrance),Find_NoContainer());
|
||||
for(var structure in structures)
|
||||
{
|
||||
ActionButton(target,i,structure,ACTIONTYPE_STRUCTURE);
|
||||
if(actionbar[i]->Selected()) exclusive = true;
|
||||
++i;
|
||||
}
|
||||
|
||||
//Message("found %d vehicles and %d structures",target,GetLength(vehicles),GetLength(structures));
|
||||
|
||||
ClearButtons(i);
|
||||
|
||||
// if a vehicle or structure is selected, the hands need to be removed
|
||||
// from the inventory
|
||||
actionbar[target->GetSelected()]->UpdateHands();
|
||||
actionbar[target->GetSelected(true)]->UpdateHands();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// call from HUDAdapter (Clonk)
|
||||
public func OnSelectionChanged(int old, int new)
|
||||
{
|
||||
//Log("selection changed from %d to %d", old, new);
|
||||
// update both old and new
|
||||
actionbar[old]->UpdateSelectionStatus();
|
||||
actionbar[new]->UpdateSelectionStatus();
|
||||
}
|
||||
|
||||
// call from HUDAdapter (Clonk)
|
||||
public func OnSlotObjectChanged(int slot)
|
||||
{
|
||||
//Log("slot %d changed", slot);
|
||||
var obj = GetCursor(GetOwner())->GetItem(slot);
|
||||
actionbar[slot]->SetObject(obj, ACTIONTYPE_INVENTORY, slot);
|
||||
}
|
||||
|
||||
private func ActionButton(object forClonk, int pos, object interaction, int actiontype)
|
||||
{
|
||||
var size = ACBT->GetDefWidth();
|
||||
var spacing = 12 + size;
|
||||
|
||||
// don't forget the spacings between inventory - vehicle,structure
|
||||
var extra = 0;
|
||||
if(forClonk->MaxContentsCount() <= pos) extra = 80;
|
||||
|
||||
var bt = actionbar[pos];
|
||||
// no object yet... create it
|
||||
if(!bt)
|
||||
{
|
||||
bt = CreateObject(ACBT,0,0,GetOwner());
|
||||
}
|
||||
|
||||
bt->SetPosition(64 + pos * spacing + extra, -16 - size/2);
|
||||
|
||||
bt->SetCrew(forClonk);
|
||||
bt->SetObject(interaction,actiontype,pos);
|
||||
|
||||
actionbar[pos] = bt;
|
||||
return bt;
|
||||
}
|
||||
|
||||
private func ClearButtons(int start)
|
||||
{
|
||||
|
||||
// make rest invisible
|
||||
for(var j = start; j < GetLength(actionbar); ++j)
|
||||
{
|
||||
// we don't have to remove them all the time, no?
|
||||
if(actionbar[j])
|
||||
actionbar[j]->Clear();
|
||||
}
|
||||
}
|
||||
|
||||
// hotkey control
|
||||
public func ControlHotkey(int hotindex)
|
||||
{
|
||||
if(GetLength(actionbar) <= hotindex) return false;
|
||||
|
||||
actionbar[hotindex]->~MouseSelection(GetOwner());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private func CreateSelectorFor(object clonk)
|
||||
{
|
||||
var selector = CreateObject(CSLR,10,10,-1);
|
||||
selector->SetCrew(clonk);
|
||||
clonk->SetSelector(selector);
|
||||
return selector;
|
||||
}
|
||||
|
||||
public func ReorderCrewSelectors()
|
||||
{
|
||||
// somehow new crew gets sorted at the beginning
|
||||
// because we dont want that, the for loop starts from the end
|
||||
var j = 0;
|
||||
for(var i=GetCrewCount(GetOwner())-1; i >= 0; --i)
|
||||
{
|
||||
var spacing = 12;
|
||||
var crew = GetCrew(GetOwner(),i);
|
||||
var sel = crew->GetSelector();
|
||||
if(sel)
|
||||
{
|
||||
sel->SetPosition(32 + j * (CSLR->GetDefWidth() + spacing) + CSLR->GetDefWidth()/2, 16+CSLR->GetDefHeight()/2);
|
||||
if(j+1 == 10) sel->SetHotkey(0);
|
||||
else if(j+1 < 10) sel->SetHotkey(j+1);
|
||||
}
|
||||
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[DefCore]
|
||||
id=BAR0
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack
|
||||
Width=110
|
||||
Height=19
|
||||
Offset=-55,-10
|
||||
[DefCore]
|
||||
id=BAR0
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack
|
||||
Width=110
|
||||
Height=19
|
||||
Offset=-55,-10
|
||||
Rotate=1
|
|
@ -1,2 +1,2 @@
|
|||
DE:Leiste
|
||||
DE:Leiste
|
||||
US:Bar
|
|
@ -1,74 +1,74 @@
|
|||
#strict 2
|
||||
|
||||
/*
|
||||
Progress-Bar element
|
||||
Author: Newton
|
||||
|
||||
This object can show an unlimited amount of progress bars in different
|
||||
locations, sizes and colors. Using this basic funcionality, one could create
|
||||
floating health bars attached to clonks or include the bars as layers into
|
||||
(HUD) objects.
|
||||
This object is used by the crew selector.
|
||||
*/
|
||||
|
||||
local offsx, offsy, layer, width, height;
|
||||
|
||||
protected func Construction()
|
||||
{
|
||||
offsx = CreateArray();
|
||||
offsy = CreateArray();
|
||||
width = CreateArray();
|
||||
height = CreateArray();
|
||||
layer = CreateArray();
|
||||
}
|
||||
|
||||
public func SetBarOffset(int x, int y, int num)
|
||||
{
|
||||
offsx[num] = x;
|
||||
offsy[num] = y;
|
||||
}
|
||||
|
||||
public func RemoveBarLayers(int la)
|
||||
{
|
||||
// remove layers
|
||||
SetGraphics(nil,nil,la);
|
||||
SetGraphics(nil,nil,la+1);
|
||||
}
|
||||
|
||||
public func SetBarLayers(int la, int num)
|
||||
{
|
||||
RemoveBarLayers(la);
|
||||
|
||||
// new layers
|
||||
layer[num] = la;
|
||||
SetGraphics("Empty",BAR0,layer[num],GFXOV_MODE_Base);
|
||||
SetGraphics("Bar",BAR0,layer[num]+1,GFXOV_MODE_Base);
|
||||
}
|
||||
|
||||
public func SetBarDimensions(int wdt, int hgt, int num)
|
||||
{
|
||||
width[num] = 1000 * wdt / BAR0->GetDefWidth();
|
||||
height[num] = 1000 * hgt / BAR0->GetDefHeight();
|
||||
}
|
||||
|
||||
public func SetBarProgress(int promille, int num)
|
||||
{
|
||||
// not existing
|
||||
if(GetLength(layer) <= num) return false;
|
||||
|
||||
// width/height not set == 1000
|
||||
if(!width[num]) width[num] = 1000;
|
||||
if(!height[num]) height[num] = 1000;
|
||||
|
||||
var w = BAR0->GetDefWidth()/2;
|
||||
|
||||
// the bar does not start on the left side of the graphics... correct this
|
||||
var graphicscorrect = 100;
|
||||
|
||||
var baroffset = offsx[num]*1000 - width[num]*w * (1000-promille)/(1000+graphicscorrect);
|
||||
|
||||
SetObjDrawTransform(width[num],0,offsx[num]*1000, 0, height[num], offsy[num]*1000, layer[num]);
|
||||
SetObjDrawTransform((promille * width[num])/1000,0, baroffset, 0, height[num], offsy[num]*1000, layer[num]+1);
|
||||
|
||||
return true;
|
||||
}
|
||||
#strict 2
|
||||
|
||||
/*
|
||||
Progress-Bar element
|
||||
Author: Newton
|
||||
|
||||
This object can show an unlimited amount of progress bars in different
|
||||
locations, sizes and colors. Using this basic funcionality, one could create
|
||||
floating health bars attached to clonks or include the bars as layers into
|
||||
(HUD) objects.
|
||||
This object is used by the crew selector.
|
||||
*/
|
||||
|
||||
local offsx, offsy, layer, width, height;
|
||||
|
||||
protected func Construction()
|
||||
{
|
||||
offsx = CreateArray();
|
||||
offsy = CreateArray();
|
||||
width = CreateArray();
|
||||
height = CreateArray();
|
||||
layer = CreateArray();
|
||||
}
|
||||
|
||||
public func SetBarOffset(int x, int y, int num)
|
||||
{
|
||||
offsx[num] = x;
|
||||
offsy[num] = y;
|
||||
}
|
||||
|
||||
public func RemoveBarLayers(int la)
|
||||
{
|
||||
// remove layers
|
||||
SetGraphics(nil,nil,la);
|
||||
SetGraphics(nil,nil,la+1);
|
||||
}
|
||||
|
||||
public func SetBarLayers(int la, int num)
|
||||
{
|
||||
RemoveBarLayers(la);
|
||||
|
||||
// new layers
|
||||
layer[num] = la;
|
||||
SetGraphics("Empty",BAR0,layer[num],GFXOV_MODE_Base);
|
||||
SetGraphics("Bar",BAR0,layer[num]+1,GFXOV_MODE_Base);
|
||||
}
|
||||
|
||||
public func SetBarDimensions(int wdt, int hgt, int num)
|
||||
{
|
||||
width[num] = 1000 * wdt / BAR0->GetDefWidth();
|
||||
height[num] = 1000 * hgt / BAR0->GetDefHeight();
|
||||
}
|
||||
|
||||
public func SetBarProgress(int promille, int num)
|
||||
{
|
||||
// not existing
|
||||
if(GetLength(layer) <= num) return false;
|
||||
|
||||
// width/height not set == 1000
|
||||
if(!width[num]) width[num] = 1000;
|
||||
if(!height[num]) height[num] = 1000;
|
||||
|
||||
var w = BAR0->GetDefWidth()/2;
|
||||
|
||||
// the bar does not start on the left side of the graphics... correct this
|
||||
var graphicscorrect = 100;
|
||||
|
||||
var baroffset = offsx[num]*1000 - width[num]*w * (1000-promille)/(1000+graphicscorrect);
|
||||
|
||||
SetObjDrawTransform(width[num],0,offsx[num]*1000, 0, height[num], offsy[num]*1000, layer[num]);
|
||||
SetObjDrawTransform((promille * width[num])/1000,0, baroffset, 0, height[num], offsy[num]*1000, layer[num]+1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[DefCore]
|
||||
id=CSLR
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack | C4D_IgnoreFoW | C4D_Foreground | C4D_Parallax | C4D_MouseSelect
|
||||
Width=64
|
||||
Height=64
|
||||
Offset=-32,-32
|
||||
[DefCore]
|
||||
id=CSLR
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack | C4D_IgnoreFoW | C4D_Foreground | C4D_Parallax | C4D_MouseSelect
|
||||
Width=64
|
||||
Height=64
|
||||
Offset=-32,-32
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
DE:Crew selektieren
|
||||
US:Select crew
|
||||
DE:Crew selektieren
|
||||
US:Select crew
|
||||
|
|
|
@ -1,341 +1,341 @@
|
|||
#strict 2
|
||||
#include BAR0
|
||||
|
||||
/*
|
||||
Crew selector HUD
|
||||
Author: Newton
|
||||
|
||||
For each crew member, one of these HUD elements exist in the top bar.
|
||||
It shows the rank, health, breath and magic bars as well as the title
|
||||
(or portrait) and is clickable. If clicked, the associated crew member
|
||||
get's selected.
|
||||
HUD elements are passive, they don't update their status by themselves
|
||||
but rely on the HUD controller to be notified of any changes.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
TODO: Callback when the name is changed
|
||||
*/
|
||||
|
||||
local crew, breathbar, magicbar, hotkey, cleared;
|
||||
|
||||
public func BarSpacing() { return -4; }
|
||||
public func HealthBarHeight() { return 14; }
|
||||
public func BreathBarHeight() { return 8; }
|
||||
public func MagicBarHeight() { return 14; }
|
||||
|
||||
/*
|
||||
usage of layers:
|
||||
-----------------
|
||||
layer 0 - unused
|
||||
layer 1 - title
|
||||
layer 2,3 - health bar
|
||||
layer 4,5 - breath bar
|
||||
layer 6,7 - magic bar
|
||||
|
||||
layer 10,11 - rank
|
||||
layer 12 - hotkey
|
||||
*/
|
||||
|
||||
/*
|
||||
The crew selector needs to be notified when
|
||||
-------------------
|
||||
...his clonk...
|
||||
+ changes his energy -> UpdateHealthBar()
|
||||
+ changes his breath -> UpdateBreathBar()
|
||||
+ changes his magic energy -> UpdateMagicBar()
|
||||
+ (temporarily) changes his physical (energy, breath, magic energy) -> see above
|
||||
+ gains a rank -> UpdateRank()
|
||||
+ is selected/is deselected as cursor -> UpdateSelectionStatus()
|
||||
+ changes it's title graphic (either by SetGraphics or by ChangeDef) -> UpdateTitleGraphic()
|
||||
|
||||
*/
|
||||
|
||||
protected func Construction()
|
||||
{
|
||||
_inherited();
|
||||
|
||||
breathbar = false;
|
||||
magicbar = false;
|
||||
hotkey = false;
|
||||
cleared = false;
|
||||
|
||||
// parallaxity
|
||||
this["Parallaxity"] = [0,0];
|
||||
|
||||
// visibility
|
||||
this["Visibility"] = VIS_None;
|
||||
|
||||
// health bar
|
||||
SetBarLayers(2,0);
|
||||
SetBarOffset(0,BarOffset(0),0);
|
||||
SetBarDimensions(GetDefWidth(),HealthBarHeight(),0);
|
||||
SetClrModulation(RGB(200,0,0),3);
|
||||
}
|
||||
|
||||
public func MouseSelection(int plr)
|
||||
{
|
||||
if(!crew) return false;
|
||||
if(plr != GetOwner()) return false;
|
||||
if(!(crew->GetCrewEnabled())) false;
|
||||
|
||||
// stop previously selected crew
|
||||
StopSelected();
|
||||
|
||||
// set cursor if not disabled etc.
|
||||
UnselectCrew(plr);
|
||||
return SelectCrew(plr,crew, true);
|
||||
}
|
||||
|
||||
public func SetCrew(object c)
|
||||
{
|
||||
crew = c;
|
||||
UpdateHealthBar();
|
||||
UpdateBreathBar();
|
||||
UpdateMagicBar();
|
||||
UpdateTitleGraphic();
|
||||
UpdateRank();
|
||||
UpdateController();
|
||||
UpdateSelectionStatus();
|
||||
UpdateName();
|
||||
|
||||
this["Visibility"] = VIS_Owner;
|
||||
}
|
||||
|
||||
public func SetHotkey(int num)
|
||||
{
|
||||
if(num < 0 || num > 9)
|
||||
{
|
||||
SetGraphics(nil,nil,12);
|
||||
hotkey = false;
|
||||
return;
|
||||
}
|
||||
|
||||
hotkey = true;
|
||||
var name = Format("%d",num);
|
||||
SetGraphics(name,NUMB,12,GFXOV_MODE_IngamePicture);
|
||||
SetObjDrawTransform(300,0,16000,0,300,-30000, 12);
|
||||
SetClrModulation(HSL(0,0,180),12);
|
||||
}
|
||||
|
||||
private func ClearMessage()
|
||||
{
|
||||
if(cleared) return;
|
||||
CustomMessage("",this,crew->GetOwner());
|
||||
cleared = true;
|
||||
}
|
||||
|
||||
public func CrewGone()
|
||||
{
|
||||
RemoveObject();
|
||||
}
|
||||
|
||||
public func UpdateController()
|
||||
{
|
||||
if(!crew) return;
|
||||
// visibility
|
||||
SetOwner(crew->GetController());
|
||||
// name
|
||||
SetName(Format("$TxtSelect$",crew->GetName()));
|
||||
}
|
||||
|
||||
public func UpdateSelectionStatus()
|
||||
{
|
||||
if(!crew) return;
|
||||
if(!hotkey) return;
|
||||
|
||||
if(crew->GetCrewSelected())
|
||||
{
|
||||
SetClrModulation(HSL(0,0,250),12);
|
||||
SetObjDrawTransform(500,0,16000,0,500,-30000, 12);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetClrModulation(HSL(0,0,180),12);
|
||||
SetObjDrawTransform(300,0,16000,0,300,-30000, 12);
|
||||
}
|
||||
}
|
||||
|
||||
public func UpdateRank()
|
||||
{
|
||||
if(!crew) return;
|
||||
|
||||
// different rank symbols for different clonks possible
|
||||
var idRank = crew->~RanksID();
|
||||
if(!idRank) idRank = RANK;
|
||||
|
||||
var rank = crew->GetRank();
|
||||
var nrank = rank % DefinitionCall(idRank,"RegularRankCount");
|
||||
var brank = rank / DefinitionCall(idRank,"RegularRankCount");
|
||||
|
||||
var rankx = -1000 * GetDefWidth()/2 + 10000;
|
||||
var ranky = -15000;
|
||||
|
||||
SetGraphics(nil,idRank,10,GFXOV_MODE_Action,Format("Rank%d",nrank));
|
||||
SetObjDrawTransform(1000,0,rankx,0,1000,ranky, 10);
|
||||
|
||||
// extra rank (the star if the clonk is too experienced for normal ranks)
|
||||
if(brank % DefinitionCall(idRank,"ExtraRankCount"))
|
||||
{
|
||||
SetGraphics(nil,RANK,11,GFXOV_MODE_Action,Format("RankExtra%d",brank));
|
||||
SetObjDrawTransform(1000,0,rankx-6000,0,1000,ranky-4000, 11);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGraphics(nil,nil,11);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func UpdateTitleGraphic()
|
||||
{
|
||||
if(!crew) return;
|
||||
|
||||
//SetGraphics(nil,crew->GetID(),1,GFXOV_MODE_Object,nil,nil,crew);
|
||||
|
||||
SetGraphics(nil,crew->GetID(),1,GFXOV_MODE_IngamePicture);
|
||||
|
||||
// doesn't work:
|
||||
//SetColorDw(crew->GetColorDw());
|
||||
}
|
||||
|
||||
public func UpdateHealthBar(bool nocall)
|
||||
{
|
||||
if(!crew) return;
|
||||
var phys = crew->GetPhysical("Energy");
|
||||
var promille;
|
||||
if(phys == 0) promille = 0;
|
||||
else promille = 1000 * crew->GetEnergy() / (phys / 1000);
|
||||
|
||||
// if this function has not been called by UpdateMagicBar
|
||||
if(!nocall)
|
||||
{
|
||||
ClearMessage();
|
||||
UpdateMagicBar(true);
|
||||
SetBarProgress(promille,0);
|
||||
UpdateName();
|
||||
}
|
||||
if(promille > 0)
|
||||
CustomMessage(Format("@<c dddd00>%d</c>",crew->GetEnergy()), this, crew->GetOwner(), -32*(1000-promille)/1000, 45 + BarOffset(0), nil, nil, nil, MSG_Multiple);
|
||||
}
|
||||
|
||||
public func UpdateBreathBar()
|
||||
{
|
||||
if(!crew) return;
|
||||
var phys = crew->GetPhysical("Breath");
|
||||
var promille;
|
||||
if(phys == 0) promille = 0;
|
||||
else promille = 1000 * crew->GetBreath() / (phys / 1000);
|
||||
|
||||
// remove breath bar if full breath
|
||||
if(promille == 1000)
|
||||
{
|
||||
if(breathbar)
|
||||
RemoveBreathBar();
|
||||
}
|
||||
// add breath bar if there is none
|
||||
else
|
||||
{
|
||||
if(!breathbar)
|
||||
AddBreathBar();
|
||||
|
||||
SetBarProgress(promille,1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func UpdateMagicBar(bool nocall)
|
||||
{
|
||||
if(!crew) return;
|
||||
var phys = crew->GetPhysical("Magic");
|
||||
var promille = 0;
|
||||
if(phys != 0) promille = 1000 * crew->GetMagicEnergy() / (phys / 1000);
|
||||
|
||||
// if this function has not been called by UpdateHealthBar
|
||||
if(!nocall)
|
||||
{
|
||||
ClearMessage();
|
||||
UpdateHealthBar(true);
|
||||
UpdateName();
|
||||
}
|
||||
|
||||
// remove magic bar if no physical magic!
|
||||
if(phys == 0)
|
||||
{
|
||||
if(magicbar)
|
||||
RemoveMagicBar();
|
||||
}
|
||||
// add magic bar if there is none
|
||||
else
|
||||
{
|
||||
if(!magicbar)
|
||||
AddMagicBar();
|
||||
|
||||
if(promille > 0)
|
||||
CustomMessage(Format("@<c 1188cc>%d</c>",crew->GetMagicEnergy()), this, crew->GetOwner(), -32*(1000-promille)/1000, 45 + BarOffset(1), nil, nil, nil, MSG_Multiple);
|
||||
|
||||
if(!nocall)
|
||||
SetBarProgress(promille,2);
|
||||
}
|
||||
}
|
||||
|
||||
private func UpdateName()
|
||||
{
|
||||
CustomMessage(Format("@%s",crew->GetName()), this, crew->GetOwner(), 0, 65, nil, nil, nil, MSG_Multiple);
|
||||
cleared = false;
|
||||
}
|
||||
|
||||
private func BarOffset(int num)
|
||||
{
|
||||
var offset = GetDefWidth()/2 + HealthBarHeight()/2 + num * BarSpacing();
|
||||
if(num > 0) offset += HealthBarHeight();
|
||||
if(num > 1) offset += MagicBarHeight();
|
||||
return offset;
|
||||
}
|
||||
|
||||
private func AddBreathBar()
|
||||
{
|
||||
var num = 1;
|
||||
if(magicbar) num = 2;
|
||||
|
||||
// breath bar
|
||||
SetBarLayers(4,1);
|
||||
SetBarOffset(0,BarOffset(num),1);
|
||||
SetBarDimensions(GetDefWidth(),BreathBarHeight(),1);
|
||||
SetClrModulation(RGB(0,200,200),5);
|
||||
|
||||
breathbar = true;
|
||||
}
|
||||
|
||||
private func RemoveBreathBar()
|
||||
{
|
||||
RemoveBarLayers(4);
|
||||
|
||||
breathbar = false;
|
||||
|
||||
// update position of magic bar (if any)
|
||||
if(magicbar)
|
||||
SetBarOffset(0,BarOffset(1),2);
|
||||
}
|
||||
|
||||
private func AddMagicBar()
|
||||
{
|
||||
SetBarLayers(6,2);
|
||||
SetBarOffset(0,BarOffset(1),2);
|
||||
SetBarDimensions(GetDefWidth(),MagicBarHeight(),2);
|
||||
SetClrModulation(RGB(0,0,200),7);
|
||||
|
||||
magicbar = true;
|
||||
|
||||
// update position of breath bar (if any)
|
||||
if(breathbar)
|
||||
SetBarOffset(0,BarOffset(2),1);
|
||||
}
|
||||
|
||||
private func RemoveMagicBar()
|
||||
{
|
||||
RemoveBarLayers(6);
|
||||
|
||||
magicbar = false;
|
||||
#strict 2
|
||||
#include BAR0
|
||||
|
||||
/*
|
||||
Crew selector HUD
|
||||
Author: Newton
|
||||
|
||||
For each crew member, one of these HUD elements exist in the top bar.
|
||||
It shows the rank, health, breath and magic bars as well as the title
|
||||
(or portrait) and is clickable. If clicked, the associated crew member
|
||||
get's selected.
|
||||
HUD elements are passive, they don't update their status by themselves
|
||||
but rely on the HUD controller to be notified of any changes.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
TODO: Callback when the name is changed
|
||||
*/
|
||||
|
||||
local crew, breathbar, magicbar, hotkey, cleared;
|
||||
|
||||
public func BarSpacing() { return -4; }
|
||||
public func HealthBarHeight() { return 14; }
|
||||
public func BreathBarHeight() { return 8; }
|
||||
public func MagicBarHeight() { return 14; }
|
||||
|
||||
/*
|
||||
usage of layers:
|
||||
-----------------
|
||||
layer 0 - unused
|
||||
layer 1 - title
|
||||
layer 2,3 - health bar
|
||||
layer 4,5 - breath bar
|
||||
layer 6,7 - magic bar
|
||||
|
||||
layer 10,11 - rank
|
||||
layer 12 - hotkey
|
||||
*/
|
||||
|
||||
/*
|
||||
The crew selector needs to be notified when
|
||||
-------------------
|
||||
...his clonk...
|
||||
+ changes his energy -> UpdateHealthBar()
|
||||
+ changes his breath -> UpdateBreathBar()
|
||||
+ changes his magic energy -> UpdateMagicBar()
|
||||
+ (temporarily) changes his physical (energy, breath, magic energy) -> see above
|
||||
+ gains a rank -> UpdateRank()
|
||||
+ is selected/is deselected as cursor -> UpdateSelectionStatus()
|
||||
+ changes it's title graphic (either by SetGraphics or by ChangeDef) -> UpdateTitleGraphic()
|
||||
|
||||
*/
|
||||
|
||||
protected func Construction()
|
||||
{
|
||||
_inherited();
|
||||
|
||||
breathbar = false;
|
||||
magicbar = false;
|
||||
hotkey = false;
|
||||
cleared = false;
|
||||
|
||||
// parallaxity
|
||||
this["Parallaxity"] = [0,0];
|
||||
|
||||
// visibility
|
||||
this["Visibility"] = VIS_None;
|
||||
|
||||
// health bar
|
||||
SetBarLayers(2,0);
|
||||
SetBarOffset(0,BarOffset(0),0);
|
||||
SetBarDimensions(GetDefWidth(),HealthBarHeight(),0);
|
||||
SetClrModulation(RGB(200,0,0),3);
|
||||
}
|
||||
|
||||
public func MouseSelection(int plr)
|
||||
{
|
||||
if(!crew) return false;
|
||||
if(plr != GetOwner()) return false;
|
||||
if(!(crew->GetCrewEnabled())) false;
|
||||
|
||||
// stop previously selected crew
|
||||
StopSelected();
|
||||
|
||||
// set cursor if not disabled etc.
|
||||
UnselectCrew(plr);
|
||||
return SelectCrew(plr,crew, true);
|
||||
}
|
||||
|
||||
public func SetCrew(object c)
|
||||
{
|
||||
crew = c;
|
||||
UpdateHealthBar();
|
||||
UpdateBreathBar();
|
||||
UpdateMagicBar();
|
||||
UpdateTitleGraphic();
|
||||
UpdateRank();
|
||||
UpdateController();
|
||||
UpdateSelectionStatus();
|
||||
UpdateName();
|
||||
|
||||
this["Visibility"] = VIS_Owner;
|
||||
}
|
||||
|
||||
public func SetHotkey(int num)
|
||||
{
|
||||
if(num < 0 || num > 9)
|
||||
{
|
||||
SetGraphics(nil,nil,12);
|
||||
hotkey = false;
|
||||
return;
|
||||
}
|
||||
|
||||
hotkey = true;
|
||||
var name = Format("%d",num);
|
||||
SetGraphics(name,NUMB,12,GFXOV_MODE_IngamePicture);
|
||||
SetObjDrawTransform(300,0,16000,0,300,-30000, 12);
|
||||
SetClrModulation(HSL(0,0,180),12);
|
||||
}
|
||||
|
||||
private func ClearMessage()
|
||||
{
|
||||
if(cleared) return;
|
||||
CustomMessage("",this,crew->GetOwner());
|
||||
cleared = true;
|
||||
}
|
||||
|
||||
public func CrewGone()
|
||||
{
|
||||
RemoveObject();
|
||||
}
|
||||
|
||||
public func UpdateController()
|
||||
{
|
||||
if(!crew) return;
|
||||
// visibility
|
||||
SetOwner(crew->GetController());
|
||||
// name
|
||||
SetName(Format("$TxtSelect$",crew->GetName()));
|
||||
}
|
||||
|
||||
public func UpdateSelectionStatus()
|
||||
{
|
||||
if(!crew) return;
|
||||
if(!hotkey) return;
|
||||
|
||||
if(crew->GetCrewSelected())
|
||||
{
|
||||
SetClrModulation(HSL(0,0,250),12);
|
||||
SetObjDrawTransform(500,0,16000,0,500,-30000, 12);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetClrModulation(HSL(0,0,180),12);
|
||||
SetObjDrawTransform(300,0,16000,0,300,-30000, 12);
|
||||
}
|
||||
}
|
||||
|
||||
public func UpdateRank()
|
||||
{
|
||||
if(!crew) return;
|
||||
|
||||
// different rank symbols for different clonks possible
|
||||
var idRank = crew->~RanksID();
|
||||
if(!idRank) idRank = RANK;
|
||||
|
||||
var rank = crew->GetRank();
|
||||
var nrank = rank % DefinitionCall(idRank,"RegularRankCount");
|
||||
var brank = rank / DefinitionCall(idRank,"RegularRankCount");
|
||||
|
||||
var rankx = -1000 * GetDefWidth()/2 + 10000;
|
||||
var ranky = -15000;
|
||||
|
||||
SetGraphics(nil,idRank,10,GFXOV_MODE_Action,Format("Rank%d",nrank));
|
||||
SetObjDrawTransform(1000,0,rankx,0,1000,ranky, 10);
|
||||
|
||||
// extra rank (the star if the clonk is too experienced for normal ranks)
|
||||
if(brank % DefinitionCall(idRank,"ExtraRankCount"))
|
||||
{
|
||||
SetGraphics(nil,RANK,11,GFXOV_MODE_Action,Format("RankExtra%d",brank));
|
||||
SetObjDrawTransform(1000,0,rankx-6000,0,1000,ranky-4000, 11);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGraphics(nil,nil,11);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func UpdateTitleGraphic()
|
||||
{
|
||||
if(!crew) return;
|
||||
|
||||
//SetGraphics(nil,crew->GetID(),1,GFXOV_MODE_Object,nil,nil,crew);
|
||||
|
||||
SetGraphics(nil,crew->GetID(),1,GFXOV_MODE_IngamePicture);
|
||||
|
||||
// doesn't work:
|
||||
//SetColorDw(crew->GetColorDw());
|
||||
}
|
||||
|
||||
public func UpdateHealthBar(bool nocall)
|
||||
{
|
||||
if(!crew) return;
|
||||
var phys = crew->GetPhysical("Energy");
|
||||
var promille;
|
||||
if(phys == 0) promille = 0;
|
||||
else promille = 1000 * crew->GetEnergy() / (phys / 1000);
|
||||
|
||||
// if this function has not been called by UpdateMagicBar
|
||||
if(!nocall)
|
||||
{
|
||||
ClearMessage();
|
||||
UpdateMagicBar(true);
|
||||
SetBarProgress(promille,0);
|
||||
UpdateName();
|
||||
}
|
||||
if(promille > 0)
|
||||
CustomMessage(Format("@<c dddd00>%d</c>",crew->GetEnergy()), this, crew->GetOwner(), -32*(1000-promille)/1000, 45 + BarOffset(0), nil, nil, nil, MSG_Multiple);
|
||||
}
|
||||
|
||||
public func UpdateBreathBar()
|
||||
{
|
||||
if(!crew) return;
|
||||
var phys = crew->GetPhysical("Breath");
|
||||
var promille;
|
||||
if(phys == 0) promille = 0;
|
||||
else promille = 1000 * crew->GetBreath() / (phys / 1000);
|
||||
|
||||
// remove breath bar if full breath
|
||||
if(promille == 1000)
|
||||
{
|
||||
if(breathbar)
|
||||
RemoveBreathBar();
|
||||
}
|
||||
// add breath bar if there is none
|
||||
else
|
||||
{
|
||||
if(!breathbar)
|
||||
AddBreathBar();
|
||||
|
||||
SetBarProgress(promille,1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func UpdateMagicBar(bool nocall)
|
||||
{
|
||||
if(!crew) return;
|
||||
var phys = crew->GetPhysical("Magic");
|
||||
var promille = 0;
|
||||
if(phys != 0) promille = 1000 * crew->GetMagicEnergy() / (phys / 1000);
|
||||
|
||||
// if this function has not been called by UpdateHealthBar
|
||||
if(!nocall)
|
||||
{
|
||||
ClearMessage();
|
||||
UpdateHealthBar(true);
|
||||
UpdateName();
|
||||
}
|
||||
|
||||
// remove magic bar if no physical magic!
|
||||
if(phys == 0)
|
||||
{
|
||||
if(magicbar)
|
||||
RemoveMagicBar();
|
||||
}
|
||||
// add magic bar if there is none
|
||||
else
|
||||
{
|
||||
if(!magicbar)
|
||||
AddMagicBar();
|
||||
|
||||
if(promille > 0)
|
||||
CustomMessage(Format("@<c 1188cc>%d</c>",crew->GetMagicEnergy()), this, crew->GetOwner(), -32*(1000-promille)/1000, 45 + BarOffset(1), nil, nil, nil, MSG_Multiple);
|
||||
|
||||
if(!nocall)
|
||||
SetBarProgress(promille,2);
|
||||
}
|
||||
}
|
||||
|
||||
private func UpdateName()
|
||||
{
|
||||
CustomMessage(Format("@%s",crew->GetName()), this, crew->GetOwner(), 0, 65, nil, nil, nil, MSG_Multiple);
|
||||
cleared = false;
|
||||
}
|
||||
|
||||
private func BarOffset(int num)
|
||||
{
|
||||
var offset = GetDefWidth()/2 + HealthBarHeight()/2 + num * BarSpacing();
|
||||
if(num > 0) offset += HealthBarHeight();
|
||||
if(num > 1) offset += MagicBarHeight();
|
||||
return offset;
|
||||
}
|
||||
|
||||
private func AddBreathBar()
|
||||
{
|
||||
var num = 1;
|
||||
if(magicbar) num = 2;
|
||||
|
||||
// breath bar
|
||||
SetBarLayers(4,1);
|
||||
SetBarOffset(0,BarOffset(num),1);
|
||||
SetBarDimensions(GetDefWidth(),BreathBarHeight(),1);
|
||||
SetClrModulation(RGB(0,200,200),5);
|
||||
|
||||
breathbar = true;
|
||||
}
|
||||
|
||||
private func RemoveBreathBar()
|
||||
{
|
||||
RemoveBarLayers(4);
|
||||
|
||||
breathbar = false;
|
||||
|
||||
// update position of magic bar (if any)
|
||||
if(magicbar)
|
||||
SetBarOffset(0,BarOffset(1),2);
|
||||
}
|
||||
|
||||
private func AddMagicBar()
|
||||
{
|
||||
SetBarLayers(6,2);
|
||||
SetBarOffset(0,BarOffset(1),2);
|
||||
SetBarDimensions(GetDefWidth(),MagicBarHeight(),2);
|
||||
SetClrModulation(RGB(0,0,200),7);
|
||||
|
||||
magicbar = true;
|
||||
|
||||
// update position of breath bar (if any)
|
||||
if(breathbar)
|
||||
SetBarOffset(0,BarOffset(2),1);
|
||||
}
|
||||
|
||||
private func RemoveMagicBar()
|
||||
{
|
||||
RemoveBarLayers(6);
|
||||
|
||||
magicbar = false;
|
||||
}
|
|
@ -1,2 +1,2 @@
|
|||
DE:Elemente
|
||||
US:Elements
|
||||
DE:Elemente
|
||||
US:Elements
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[DefCore]
|
||||
id=ACBT
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack | C4D_IgnoreFoW | C4D_Foreground | C4D_Parallax | C4D_MouseSelect
|
||||
Width=64
|
||||
Height=64
|
||||
Offset=-32,-32
|
||||
[DefCore]
|
||||
id=ACBT
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack | C4D_IgnoreFoW | C4D_Foreground | C4D_Parallax | C4D_MouseSelect
|
||||
Width=64
|
||||
Height=64
|
||||
Offset=-32,-32
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
DE:Auswählen
|
||||
US:Select
|
||||
DE:Auswählen
|
||||
US:Select
|
||||
|
|
|
@ -1,315 +1,315 @@
|
|||
#strict 2
|
||||
|
||||
/*
|
||||
Object selector HUD
|
||||
Author: Newton
|
||||
|
||||
For each inventory item (and each vehicle, house etc on the same pos)
|
||||
one of this objects exists in the bottom bar. If clicked, the associated
|
||||
object is selected (inventory item is selected, vehicle is grabbed
|
||||
or ungrabbed, house is entered or exited...).
|
||||
|
||||
HUD elements are passive, they don't update their status by themselves
|
||||
but rely on the clonk to update their status.
|
||||
|
||||
This object works only for crew members that included the standard clonk
|
||||
controls (see Libraries.c4d/ClonkControl.c4d)
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
usage of layers:
|
||||
-----------------
|
||||
layer 0 - unused
|
||||
layer 1 - title
|
||||
layer 2 - actionicon
|
||||
layer 3,4 - hands
|
||||
|
||||
layer 12 - hotkey
|
||||
|
||||
*/
|
||||
|
||||
local selected, crew, hotkey, myobject, actiontype;
|
||||
|
||||
static const ACTIONTYPE_INVENTORY = 0;
|
||||
static const ACTIONTYPE_VEHICLE = 1;
|
||||
static const ACTIONTYPE_STRUCTURE = 2;
|
||||
|
||||
private func HandSize() { return 400; }
|
||||
private func IconSize() { return 500; }
|
||||
|
||||
protected func Construction()
|
||||
{
|
||||
_inherited();
|
||||
|
||||
selected = 0;
|
||||
hotkey = 0;
|
||||
myobject = nil;
|
||||
|
||||
// parallaxity
|
||||
this["Parallaxity"] = [0,0];
|
||||
|
||||
// visibility
|
||||
this["Visibility"] = VIS_None;
|
||||
}
|
||||
|
||||
public func MouseSelection(int plr)
|
||||
{
|
||||
|
||||
if(!crew) return false;
|
||||
if(plr != GetOwner()) {
|
||||
return false;
|
||||
}
|
||||
// invisible...
|
||||
if(this["Visibility"] != VIS_Owner) return false;
|
||||
// object is in inventory
|
||||
if(actiontype == ACTIONTYPE_INVENTORY)
|
||||
{
|
||||
crew->SelectItem(hotkey-1);
|
||||
return true;
|
||||
}
|
||||
|
||||
// no object
|
||||
if(!myobject) return false;
|
||||
|
||||
// object is a pushable vehicle
|
||||
if(actiontype == ACTIONTYPE_VEHICLE)
|
||||
{
|
||||
var proc = crew->GetProcedure();
|
||||
|
||||
// object is inside building -> activate
|
||||
if(crew->Contained() && myobject->Contained() == crew->Contained())
|
||||
{
|
||||
crew->SetCommand("Activate",myobject);
|
||||
return true;
|
||||
}
|
||||
// crew is currently pushing vehicle
|
||||
else if(proc == "PUSH")
|
||||
{
|
||||
// which is mine -> let go
|
||||
if(crew->GetActionTarget() == myobject)
|
||||
PlayerObjectCommand(plr, false, "UnGrab");
|
||||
else
|
||||
PlayerObjectCommand(plr, false, "Grab", myobject);
|
||||
|
||||
return true;
|
||||
}
|
||||
// grab
|
||||
else if(proc == "WALK")
|
||||
{
|
||||
PlayerObjectCommand(plr, false, "Grab", myobject);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// object is a building
|
||||
if(actiontype == ACTIONTYPE_STRUCTURE)
|
||||
{
|
||||
// inside? -> exit
|
||||
if(crew->Contained() == myobject)
|
||||
{
|
||||
PlayerObjectCommand(plr, false, "Exit");
|
||||
return true;
|
||||
}
|
||||
// outside? -> enter
|
||||
else if(crew->CanEnter())
|
||||
{
|
||||
PlayerObjectCommand(plr, false, "Enter", myobject);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// TODO: more script choices... Selection-Callbacks for all objects
|
||||
}
|
||||
|
||||
public func Clear()
|
||||
{
|
||||
myobject = nil;
|
||||
actiontype = -1;
|
||||
hotkey = 0;
|
||||
this["Visibility"] = VIS_None;
|
||||
}
|
||||
|
||||
public func SetObject(object obj, int type, int pos)
|
||||
{
|
||||
if(actiontype != ACTIONTYPE_INVENTORY)
|
||||
if(obj == myobject)
|
||||
if(type == actiontype)
|
||||
if(pos+1 == hotkey)
|
||||
return UpdateSelectionStatus();
|
||||
|
||||
this["Visibility"] = VIS_Owner;
|
||||
|
||||
actiontype = type;
|
||||
myobject = obj;
|
||||
hotkey = pos+1;
|
||||
|
||||
RemoveEffect("IntRemoveGuard",myobject);
|
||||
|
||||
if(!myobject)
|
||||
{
|
||||
SetGraphics(nil,nil,1);
|
||||
SetName(Format("$TxtSlot$",hotkey));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGraphics(nil,myobject->GetID(),1,GFXOV_MODE_IngamePicture);
|
||||
if(actiontype == nil)
|
||||
{
|
||||
if(myobject->Contained() == crew) actiontype = ACTIONTYPE_INVENTORY;
|
||||
else if(myobject->GetDefGrab()) actiontype = ACTIONTYPE_VEHICLE;
|
||||
else if(myobject->GetDefCoreVal("Entrance","DefCore",2) != nil) actiontype = ACTIONTYPE_STRUCTURE;
|
||||
}
|
||||
|
||||
SetName(Format("$TxtSelect$",myobject->GetName()));
|
||||
|
||||
// create an effect which monitors whether the object is removed
|
||||
if(actiontype == ACTIONTYPE_INVENTORY)
|
||||
AddEffect("IntRemoveGuard",myobject,1,0,this);
|
||||
}
|
||||
|
||||
ShowHotkey();
|
||||
UpdateSelectionStatus();
|
||||
}
|
||||
|
||||
public func FxIntRemoveGuardStop(object target, int num, int reason, bool temp)
|
||||
{
|
||||
if(reason == 3)
|
||||
if(target == myobject)
|
||||
SetObject(nil,0,hotkey-1);
|
||||
}
|
||||
|
||||
public func SetCrew(object c)
|
||||
{
|
||||
if(crew == c) return;
|
||||
|
||||
crew = c;
|
||||
SetOwner(c->GetOwner());
|
||||
|
||||
this["Visibility"] = VIS_Owner;
|
||||
}
|
||||
|
||||
public func ShowHotkey()
|
||||
{
|
||||
if(hotkey > 10 || hotkey <= 0)
|
||||
{
|
||||
SetGraphics(nil,nil,12);
|
||||
}
|
||||
else
|
||||
{
|
||||
var num = hotkey;
|
||||
if(hotkey == 10) num = 0;
|
||||
var name = Format("%d",num);
|
||||
SetGraphics(name,NUMB,12,GFXOV_MODE_IngamePicture);
|
||||
SetObjDrawTransform(300,0,16000,0,300,-34000, 12);
|
||||
SetClrModulation(RGB(160,0,0),12);
|
||||
}
|
||||
}
|
||||
|
||||
public func Selected()
|
||||
{
|
||||
return selected;
|
||||
}
|
||||
|
||||
public func UpdateSelectionStatus()
|
||||
{
|
||||
|
||||
// determine...
|
||||
var sel = 0;
|
||||
|
||||
if(actiontype == ACTIONTYPE_VEHICLE)
|
||||
if(crew->GetProcedure() == "PUSH" && crew->GetActionTarget() == myobject)
|
||||
sel = 1;
|
||||
|
||||
if(actiontype == ACTIONTYPE_STRUCTURE)
|
||||
if(crew->Contained() == myobject)
|
||||
sel = 1;
|
||||
|
||||
if(actiontype == ACTIONTYPE_INVENTORY)
|
||||
{
|
||||
if(crew->GetSelected() == hotkey-1)
|
||||
sel = 1;
|
||||
if(crew->GetSelected(true) == hotkey-1)
|
||||
sel = 2;
|
||||
}
|
||||
|
||||
selected = sel;
|
||||
|
||||
// and set the icon...
|
||||
if(selected)
|
||||
{
|
||||
SetClrModulation(RGB(220,0,0),12);
|
||||
SetObjDrawTransform(500,0,16000,0,500,-34000, 12);
|
||||
|
||||
if(actiontype == ACTIONTYPE_VEHICLE)
|
||||
{
|
||||
SetGraphics("LetGo",GetID(),2,GFXOV_MODE_Base);
|
||||
SetName(Format("$TxtUnGrab$",myobject->GetName()));
|
||||
}
|
||||
|
||||
if(actiontype == ACTIONTYPE_STRUCTURE)
|
||||
{
|
||||
SetGraphics("Exit",GetID(),2,GFXOV_MODE_Base);
|
||||
SetName(Format("$TxtExit$",myobject->GetName()));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetClrModulation(RGB(160,0,0),12);
|
||||
SetObjDrawTransform(300,0,16000,0,300,-34000, 12);
|
||||
|
||||
if(actiontype == ACTIONTYPE_VEHICLE)
|
||||
{
|
||||
if(!(myobject->Contained()))
|
||||
{
|
||||
SetGraphics("Grab",GetID(),2,GFXOV_MODE_Base);
|
||||
SetName(Format("$TxtGrab$",myobject->GetName()));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGraphics("Exit",GetID(),2,GFXOV_MODE_Base);
|
||||
SetName(Format("$TxtPushOut$",myobject->GetName()));
|
||||
}
|
||||
}
|
||||
if(actiontype == ACTIONTYPE_STRUCTURE)
|
||||
{
|
||||
SetGraphics("Enter",GetID(),2,GFXOV_MODE_Base);
|
||||
SetName(Format("$TxtEnter$",myobject->GetName()));
|
||||
}
|
||||
}
|
||||
SetObjDrawTransform(IconSize(),0,-16000,0,IconSize(),20000, 2);
|
||||
|
||||
UpdateHands();
|
||||
}
|
||||
|
||||
public func UpdateHands()
|
||||
{
|
||||
// the hands...
|
||||
var hands = selected;
|
||||
// .. are not displayed for inventory if the clonk is inside
|
||||
// a building or is pushing something because the controls
|
||||
// are redirected to those objects
|
||||
if(actiontype == ACTIONTYPE_INVENTORY)
|
||||
if(crew->Contained() || crew->GetProcedure() == "PUSH")
|
||||
hands = 0;
|
||||
|
||||
if(hands)
|
||||
{
|
||||
if(hands == 1 || actiontype != ACTIONTYPE_INVENTORY)
|
||||
{
|
||||
SetGraphics("One",GetID(),3,GFXOV_MODE_Base);
|
||||
SetObjDrawTransform(HandSize(),0,-16000,0,HandSize(),-12000, 3);
|
||||
}
|
||||
else SetGraphics(nil,nil,3);
|
||||
if(hands == 2 || actiontype != ACTIONTYPE_INVENTORY)
|
||||
{
|
||||
SetGraphics("Two",GetID(),4,GFXOV_MODE_Base);
|
||||
SetObjDrawTransform(HandSize(),0,8000,0,HandSize(),-12000, 4);
|
||||
}
|
||||
else SetGraphics(nil,nil,4);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGraphics(nil,nil,3);
|
||||
SetGraphics(nil,nil,4);
|
||||
}
|
||||
}
|
||||
#strict 2
|
||||
|
||||
/*
|
||||
Object selector HUD
|
||||
Author: Newton
|
||||
|
||||
For each inventory item (and each vehicle, house etc on the same pos)
|
||||
one of this objects exists in the bottom bar. If clicked, the associated
|
||||
object is selected (inventory item is selected, vehicle is grabbed
|
||||
or ungrabbed, house is entered or exited...).
|
||||
|
||||
HUD elements are passive, they don't update their status by themselves
|
||||
but rely on the clonk to update their status.
|
||||
|
||||
This object works only for crew members that included the standard clonk
|
||||
controls (see Libraries.c4d/ClonkControl.c4d)
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
usage of layers:
|
||||
-----------------
|
||||
layer 0 - unused
|
||||
layer 1 - title
|
||||
layer 2 - actionicon
|
||||
layer 3,4 - hands
|
||||
|
||||
layer 12 - hotkey
|
||||
|
||||
*/
|
||||
|
||||
local selected, crew, hotkey, myobject, actiontype;
|
||||
|
||||
static const ACTIONTYPE_INVENTORY = 0;
|
||||
static const ACTIONTYPE_VEHICLE = 1;
|
||||
static const ACTIONTYPE_STRUCTURE = 2;
|
||||
|
||||
private func HandSize() { return 400; }
|
||||
private func IconSize() { return 500; }
|
||||
|
||||
protected func Construction()
|
||||
{
|
||||
_inherited();
|
||||
|
||||
selected = 0;
|
||||
hotkey = 0;
|
||||
myobject = nil;
|
||||
|
||||
// parallaxity
|
||||
this["Parallaxity"] = [0,0];
|
||||
|
||||
// visibility
|
||||
this["Visibility"] = VIS_None;
|
||||
}
|
||||
|
||||
public func MouseSelection(int plr)
|
||||
{
|
||||
|
||||
if(!crew) return false;
|
||||
if(plr != GetOwner()) {
|
||||
return false;
|
||||
}
|
||||
// invisible...
|
||||
if(this["Visibility"] != VIS_Owner) return false;
|
||||
// object is in inventory
|
||||
if(actiontype == ACTIONTYPE_INVENTORY)
|
||||
{
|
||||
crew->SelectItem(hotkey-1);
|
||||
return true;
|
||||
}
|
||||
|
||||
// no object
|
||||
if(!myobject) return false;
|
||||
|
||||
// object is a pushable vehicle
|
||||
if(actiontype == ACTIONTYPE_VEHICLE)
|
||||
{
|
||||
var proc = crew->GetProcedure();
|
||||
|
||||
// object is inside building -> activate
|
||||
if(crew->Contained() && myobject->Contained() == crew->Contained())
|
||||
{
|
||||
crew->SetCommand("Activate",myobject);
|
||||
return true;
|
||||
}
|
||||
// crew is currently pushing vehicle
|
||||
else if(proc == "PUSH")
|
||||
{
|
||||
// which is mine -> let go
|
||||
if(crew->GetActionTarget() == myobject)
|
||||
PlayerObjectCommand(plr, false, "UnGrab");
|
||||
else
|
||||
PlayerObjectCommand(plr, false, "Grab", myobject);
|
||||
|
||||
return true;
|
||||
}
|
||||
// grab
|
||||
else if(proc == "WALK")
|
||||
{
|
||||
PlayerObjectCommand(plr, false, "Grab", myobject);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// object is a building
|
||||
if(actiontype == ACTIONTYPE_STRUCTURE)
|
||||
{
|
||||
// inside? -> exit
|
||||
if(crew->Contained() == myobject)
|
||||
{
|
||||
PlayerObjectCommand(plr, false, "Exit");
|
||||
return true;
|
||||
}
|
||||
// outside? -> enter
|
||||
else if(crew->CanEnter())
|
||||
{
|
||||
PlayerObjectCommand(plr, false, "Enter", myobject);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// TODO: more script choices... Selection-Callbacks for all objects
|
||||
}
|
||||
|
||||
public func Clear()
|
||||
{
|
||||
myobject = nil;
|
||||
actiontype = -1;
|
||||
hotkey = 0;
|
||||
this["Visibility"] = VIS_None;
|
||||
}
|
||||
|
||||
public func SetObject(object obj, int type, int pos)
|
||||
{
|
||||
if(actiontype != ACTIONTYPE_INVENTORY)
|
||||
if(obj == myobject)
|
||||
if(type == actiontype)
|
||||
if(pos+1 == hotkey)
|
||||
return UpdateSelectionStatus();
|
||||
|
||||
this["Visibility"] = VIS_Owner;
|
||||
|
||||
actiontype = type;
|
||||
myobject = obj;
|
||||
hotkey = pos+1;
|
||||
|
||||
RemoveEffect("IntRemoveGuard",myobject);
|
||||
|
||||
if(!myobject)
|
||||
{
|
||||
SetGraphics(nil,nil,1);
|
||||
SetName(Format("$TxtSlot$",hotkey));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGraphics(nil,myobject->GetID(),1,GFXOV_MODE_IngamePicture);
|
||||
if(actiontype == nil)
|
||||
{
|
||||
if(myobject->Contained() == crew) actiontype = ACTIONTYPE_INVENTORY;
|
||||
else if(myobject->GetDefGrab()) actiontype = ACTIONTYPE_VEHICLE;
|
||||
else if(myobject->GetDefCoreVal("Entrance","DefCore",2) != nil) actiontype = ACTIONTYPE_STRUCTURE;
|
||||
}
|
||||
|
||||
SetName(Format("$TxtSelect$",myobject->GetName()));
|
||||
|
||||
// create an effect which monitors whether the object is removed
|
||||
if(actiontype == ACTIONTYPE_INVENTORY)
|
||||
AddEffect("IntRemoveGuard",myobject,1,0,this);
|
||||
}
|
||||
|
||||
ShowHotkey();
|
||||
UpdateSelectionStatus();
|
||||
}
|
||||
|
||||
public func FxIntRemoveGuardStop(object target, int num, int reason, bool temp)
|
||||
{
|
||||
if(reason == 3)
|
||||
if(target == myobject)
|
||||
SetObject(nil,0,hotkey-1);
|
||||
}
|
||||
|
||||
public func SetCrew(object c)
|
||||
{
|
||||
if(crew == c) return;
|
||||
|
||||
crew = c;
|
||||
SetOwner(c->GetOwner());
|
||||
|
||||
this["Visibility"] = VIS_Owner;
|
||||
}
|
||||
|
||||
public func ShowHotkey()
|
||||
{
|
||||
if(hotkey > 10 || hotkey <= 0)
|
||||
{
|
||||
SetGraphics(nil,nil,12);
|
||||
}
|
||||
else
|
||||
{
|
||||
var num = hotkey;
|
||||
if(hotkey == 10) num = 0;
|
||||
var name = Format("%d",num);
|
||||
SetGraphics(name,NUMB,12,GFXOV_MODE_IngamePicture);
|
||||
SetObjDrawTransform(300,0,16000,0,300,-34000, 12);
|
||||
SetClrModulation(RGB(160,0,0),12);
|
||||
}
|
||||
}
|
||||
|
||||
public func Selected()
|
||||
{
|
||||
return selected;
|
||||
}
|
||||
|
||||
public func UpdateSelectionStatus()
|
||||
{
|
||||
|
||||
// determine...
|
||||
var sel = 0;
|
||||
|
||||
if(actiontype == ACTIONTYPE_VEHICLE)
|
||||
if(crew->GetProcedure() == "PUSH" && crew->GetActionTarget() == myobject)
|
||||
sel = 1;
|
||||
|
||||
if(actiontype == ACTIONTYPE_STRUCTURE)
|
||||
if(crew->Contained() == myobject)
|
||||
sel = 1;
|
||||
|
||||
if(actiontype == ACTIONTYPE_INVENTORY)
|
||||
{
|
||||
if(crew->GetSelected() == hotkey-1)
|
||||
sel = 1;
|
||||
if(crew->GetSelected(true) == hotkey-1)
|
||||
sel = 2;
|
||||
}
|
||||
|
||||
selected = sel;
|
||||
|
||||
// and set the icon...
|
||||
if(selected)
|
||||
{
|
||||
SetClrModulation(RGB(220,0,0),12);
|
||||
SetObjDrawTransform(500,0,16000,0,500,-34000, 12);
|
||||
|
||||
if(actiontype == ACTIONTYPE_VEHICLE)
|
||||
{
|
||||
SetGraphics("LetGo",GetID(),2,GFXOV_MODE_Base);
|
||||
SetName(Format("$TxtUnGrab$",myobject->GetName()));
|
||||
}
|
||||
|
||||
if(actiontype == ACTIONTYPE_STRUCTURE)
|
||||
{
|
||||
SetGraphics("Exit",GetID(),2,GFXOV_MODE_Base);
|
||||
SetName(Format("$TxtExit$",myobject->GetName()));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetClrModulation(RGB(160,0,0),12);
|
||||
SetObjDrawTransform(300,0,16000,0,300,-34000, 12);
|
||||
|
||||
if(actiontype == ACTIONTYPE_VEHICLE)
|
||||
{
|
||||
if(!(myobject->Contained()))
|
||||
{
|
||||
SetGraphics("Grab",GetID(),2,GFXOV_MODE_Base);
|
||||
SetName(Format("$TxtGrab$",myobject->GetName()));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGraphics("Exit",GetID(),2,GFXOV_MODE_Base);
|
||||
SetName(Format("$TxtPushOut$",myobject->GetName()));
|
||||
}
|
||||
}
|
||||
if(actiontype == ACTIONTYPE_STRUCTURE)
|
||||
{
|
||||
SetGraphics("Enter",GetID(),2,GFXOV_MODE_Base);
|
||||
SetName(Format("$TxtEnter$",myobject->GetName()));
|
||||
}
|
||||
}
|
||||
SetObjDrawTransform(IconSize(),0,-16000,0,IconSize(),20000, 2);
|
||||
|
||||
UpdateHands();
|
||||
}
|
||||
|
||||
public func UpdateHands()
|
||||
{
|
||||
// the hands...
|
||||
var hands = selected;
|
||||
// .. are not displayed for inventory if the clonk is inside
|
||||
// a building or is pushing something because the controls
|
||||
// are redirected to those objects
|
||||
if(actiontype == ACTIONTYPE_INVENTORY)
|
||||
if(crew->Contained() || crew->GetProcedure() == "PUSH")
|
||||
hands = 0;
|
||||
|
||||
if(hands)
|
||||
{
|
||||
if(hands == 1 || actiontype != ACTIONTYPE_INVENTORY)
|
||||
{
|
||||
SetGraphics("One",GetID(),3,GFXOV_MODE_Base);
|
||||
SetObjDrawTransform(HandSize(),0,-16000,0,HandSize(),-12000, 3);
|
||||
}
|
||||
else SetGraphics(nil,nil,3);
|
||||
if(hands == 2 || actiontype != ACTIONTYPE_INVENTORY)
|
||||
{
|
||||
SetGraphics("Two",GetID(),4,GFXOV_MODE_Base);
|
||||
SetObjDrawTransform(HandSize(),0,8000,0,HandSize(),-12000, 4);
|
||||
}
|
||||
else SetGraphics(nil,nil,4);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGraphics(nil,nil,3);
|
||||
SetGraphics(nil,nil,4);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
TxtSlot=Slot %d auswählen
|
||||
TxtSelect=%s auswählen
|
||||
TxtGrab=%s anfassen
|
||||
TxtUnGrab=%s loslassen
|
||||
TxtEnter=%s betreten
|
||||
TxtExit=%s verlassen
|
||||
TxtSlot=Slot %d auswählen
|
||||
TxtSelect=%s auswählen
|
||||
TxtGrab=%s anfassen
|
||||
TxtUnGrab=%s loslassen
|
||||
TxtEnter=%s betreten
|
||||
TxtExit=%s verlassen
|
||||
TxtPushOut=%s hinausschieben
|
|
@ -1,7 +1,7 @@
|
|||
TxtSlot=Select slot %d
|
||||
TxtSelect=Select %s
|
||||
TxtGrab=Grab %s
|
||||
TxtUnGrab=Let go %s
|
||||
TxtEnter=Enter %s
|
||||
TxtExit=Exit %s
|
||||
TxtSlot=Select slot %d
|
||||
TxtSelect=Select %s
|
||||
TxtGrab=Grab %s
|
||||
TxtUnGrab=Let go %s
|
||||
TxtEnter=Enter %s
|
||||
TxtExit=Exit %s
|
||||
TxtPushOut=Push %s out
|
|
@ -1,7 +1,7 @@
|
|||
[DefCore]
|
||||
id=WEAL
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack | C4D_IgnoreFoW | C4D_Foreground | C4D_Parallax
|
||||
Width=64
|
||||
Height=64
|
||||
Offset=-32,-32
|
||||
[DefCore]
|
||||
id=WEAL
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack | C4D_IgnoreFoW | C4D_Foreground | C4D_Parallax
|
||||
Width=64
|
||||
Height=64
|
||||
Offset=-32,-32
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
DE:Clunker
|
||||
US:Clunkers
|
||||
DE:Clunker
|
||||
US:Clunkers
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
|
||||
protected func Construction()
|
||||
{
|
||||
// parallaxity
|
||||
this["Parallaxity"] = [0,0];
|
||||
// visibility
|
||||
this["Visibility"] = VIS_Owner;
|
||||
}
|
||||
|
||||
public func Update()
|
||||
{
|
||||
var val = GetWealth(GetOwner());
|
||||
|
||||
CustomMessage(Format("@%d",val), this, GetOwner(), 0, 75);
|
||||
|
||||
var num;
|
||||
if(val < 180) num = 4;
|
||||
if(val < 120) num = 3;
|
||||
if(val < 70) num = 2;
|
||||
if(val < 30) num = 1;
|
||||
if(val < 10) num = 0;
|
||||
|
||||
SetGraphics(Format("%d",num));
|
||||
|
||||
protected func Construction()
|
||||
{
|
||||
// parallaxity
|
||||
this["Parallaxity"] = [0,0];
|
||||
// visibility
|
||||
this["Visibility"] = VIS_Owner;
|
||||
}
|
||||
|
||||
public func Update()
|
||||
{
|
||||
var val = GetWealth(GetOwner());
|
||||
|
||||
CustomMessage(Format("@%d",val), this, GetOwner(), 0, 75);
|
||||
|
||||
var num;
|
||||
if(val < 180) num = 4;
|
||||
if(val < 120) num = 3;
|
||||
if(val < 70) num = 2;
|
||||
if(val < 30) num = 1;
|
||||
if(val < 10) num = 0;
|
||||
|
||||
SetGraphics(Format("%d",num));
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
[DefCore]
|
||||
id=HUDS
|
||||
Version=4,9,5
|
||||
[DefCore]
|
||||
id=HUDS
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack
|
|
@ -1,2 +1,2 @@
|
|||
DE:HUD selektierbar
|
||||
US:HUD selectable
|
||||
DE:HUD selektierbar
|
||||
US:HUD selectable
|
||||
|
|
|
@ -1,108 +1,108 @@
|
|||
/*
|
||||
HUD Adapter
|
||||
Author: Newton
|
||||
|
||||
Clonk-side scripts for the HUD. This object basically redirects the
|
||||
engine callbacks for the clonk to the HUD. All crew members that
|
||||
are to be shown in the HUD have to include this object and return
|
||||
_inherited(); if they overload one of the callbacks used here.
|
||||
|
||||
Requires the ClonkControl.c4d to be included in the clonk too.
|
||||
*/
|
||||
|
||||
local HUDselector, HUDcontroller;
|
||||
|
||||
public func SetSelector(object sel) { HUDselector = sel; }
|
||||
public func GetSelector() { return HUDselector; }
|
||||
|
||||
public func HUDAdapter()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// hotkey control
|
||||
public func ControlHotkey(int hotindex)
|
||||
{
|
||||
if(HUDcontroller) return HUDcontroller->ControlHotkey(hotindex);
|
||||
}
|
||||
|
||||
/* Engine callbacks */
|
||||
|
||||
// bootstrap the hud
|
||||
protected func Recruitment(int iPlr)
|
||||
{
|
||||
HUDcontroller = FindObject(Find_ID(HUDC),Find_Owner(iPlr));
|
||||
if(!HUDcontroller)
|
||||
HUDcontroller = CreateObject(HUDC,10,10,iPlr);
|
||||
return _inherited(iPlr,...);
|
||||
}
|
||||
|
||||
// calls to the crew selector hud
|
||||
protected func OnPromotion() { if(HUDselector) HUDselector->UpdateRank(); return _inherited(...); }
|
||||
protected func OnEnergyChange() { if(HUDselector) HUDselector->UpdateHealthBar(); return _inherited(...); }
|
||||
protected func OnBreathChange() { if(HUDselector) HUDselector->UpdateBreathBar(); return _inherited(...); }
|
||||
protected func OnMagicEnergyChange() { if(HUDselector) HUDselector->UpdateMagicBar(); return _inherited(...); }
|
||||
|
||||
protected func OnPhysicalChange(string physical, int change, int mode)
|
||||
{
|
||||
|
||||
if(HUDselector)
|
||||
{
|
||||
|
||||
// all physicals are resetted
|
||||
if(!physical)
|
||||
{
|
||||
HUDselector->UpdateHealthBar();
|
||||
HUDselector->UpdateBreathBar();
|
||||
HUDselector->UpdateMagicBar();
|
||||
}
|
||||
else if(physical == "Energy") HUDselector->UpdateHealthBar();
|
||||
else if(physical == "Breath") HUDselector->UpdateBreathBar();
|
||||
else if(physical == "Magic") HUDselector->UpdateMagicBar();
|
||||
}
|
||||
return _inherited(physical,change,mode,...);
|
||||
}
|
||||
|
||||
// calls to both crew selector and controller
|
||||
|
||||
protected func CrewSelection(bool unselect)
|
||||
{
|
||||
if(HUDselector) HUDselector->UpdateSelectionStatus();
|
||||
if(HUDcontroller) HUDcontroller->OnCrewSelection(this,unselect);
|
||||
return _inherited(unselect,...);
|
||||
}
|
||||
|
||||
// call from ClonkControl.c4d (self)
|
||||
protected func OnSelectionChanged(int old, int new)
|
||||
{
|
||||
// update selection status in hud
|
||||
if(HUDcontroller) HUDcontroller->OnSelectionChanged(old, new);
|
||||
return _inherited(old,new,...);
|
||||
}
|
||||
|
||||
// calls to controller
|
||||
|
||||
protected func OnCrewEnabled()
|
||||
{
|
||||
if(HUDcontroller) HUDcontroller->OnCrewEnabled(this);
|
||||
return _inherited(...);
|
||||
}
|
||||
|
||||
protected func OnCrewDisabled()
|
||||
{
|
||||
if(HUDcontroller) HUDcontroller->OnCrewDisabled(this);
|
||||
return _inherited(...);
|
||||
}
|
||||
|
||||
// from ClonkControl.c4d
|
||||
protected func OnSlotFull(int slot)
|
||||
{
|
||||
if(HUDcontroller) HUDcontroller->OnSlotObjectChanged(slot);
|
||||
return _inherited(slot,...);
|
||||
}
|
||||
|
||||
protected func OnSlotEmpty(int slot)
|
||||
{
|
||||
if(HUDcontroller) HUDcontroller->OnSlotObjectChanged(slot);
|
||||
return _inherited(slot,...);
|
||||
/*
|
||||
HUD Adapter
|
||||
Author: Newton
|
||||
|
||||
Clonk-side scripts for the HUD. This object basically redirects the
|
||||
engine callbacks for the clonk to the HUD. All crew members that
|
||||
are to be shown in the HUD have to include this object and return
|
||||
_inherited(); if they overload one of the callbacks used here.
|
||||
|
||||
Requires the ClonkControl.c4d to be included in the clonk too.
|
||||
*/
|
||||
|
||||
local HUDselector, HUDcontroller;
|
||||
|
||||
public func SetSelector(object sel) { HUDselector = sel; }
|
||||
public func GetSelector() { return HUDselector; }
|
||||
|
||||
public func HUDAdapter()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// hotkey control
|
||||
public func ControlHotkey(int hotindex)
|
||||
{
|
||||
if(HUDcontroller) return HUDcontroller->ControlHotkey(hotindex);
|
||||
}
|
||||
|
||||
/* Engine callbacks */
|
||||
|
||||
// bootstrap the hud
|
||||
protected func Recruitment(int iPlr)
|
||||
{
|
||||
HUDcontroller = FindObject(Find_ID(HUDC),Find_Owner(iPlr));
|
||||
if(!HUDcontroller)
|
||||
HUDcontroller = CreateObject(HUDC,10,10,iPlr);
|
||||
return _inherited(iPlr,...);
|
||||
}
|
||||
|
||||
// calls to the crew selector hud
|
||||
protected func OnPromotion() { if(HUDselector) HUDselector->UpdateRank(); return _inherited(...); }
|
||||
protected func OnEnergyChange() { if(HUDselector) HUDselector->UpdateHealthBar(); return _inherited(...); }
|
||||
protected func OnBreathChange() { if(HUDselector) HUDselector->UpdateBreathBar(); return _inherited(...); }
|
||||
protected func OnMagicEnergyChange() { if(HUDselector) HUDselector->UpdateMagicBar(); return _inherited(...); }
|
||||
|
||||
protected func OnPhysicalChange(string physical, int change, int mode)
|
||||
{
|
||||
|
||||
if(HUDselector)
|
||||
{
|
||||
|
||||
// all physicals are resetted
|
||||
if(!physical)
|
||||
{
|
||||
HUDselector->UpdateHealthBar();
|
||||
HUDselector->UpdateBreathBar();
|
||||
HUDselector->UpdateMagicBar();
|
||||
}
|
||||
else if(physical == "Energy") HUDselector->UpdateHealthBar();
|
||||
else if(physical == "Breath") HUDselector->UpdateBreathBar();
|
||||
else if(physical == "Magic") HUDselector->UpdateMagicBar();
|
||||
}
|
||||
return _inherited(physical,change,mode,...);
|
||||
}
|
||||
|
||||
// calls to both crew selector and controller
|
||||
|
||||
protected func CrewSelection(bool unselect)
|
||||
{
|
||||
if(HUDselector) HUDselector->UpdateSelectionStatus();
|
||||
if(HUDcontroller) HUDcontroller->OnCrewSelection(this,unselect);
|
||||
return _inherited(unselect,...);
|
||||
}
|
||||
|
||||
// call from ClonkControl.c4d (self)
|
||||
protected func OnSelectionChanged(int old, int new)
|
||||
{
|
||||
// update selection status in hud
|
||||
if(HUDcontroller) HUDcontroller->OnSelectionChanged(old, new);
|
||||
return _inherited(old,new,...);
|
||||
}
|
||||
|
||||
// calls to controller
|
||||
|
||||
protected func OnCrewEnabled()
|
||||
{
|
||||
if(HUDcontroller) HUDcontroller->OnCrewEnabled(this);
|
||||
return _inherited(...);
|
||||
}
|
||||
|
||||
protected func OnCrewDisabled()
|
||||
{
|
||||
if(HUDcontroller) HUDcontroller->OnCrewDisabled(this);
|
||||
return _inherited(...);
|
||||
}
|
||||
|
||||
// from ClonkControl.c4d
|
||||
protected func OnSlotFull(int slot)
|
||||
{
|
||||
if(HUDcontroller) HUDcontroller->OnSlotObjectChanged(slot);
|
||||
return _inherited(slot,...);
|
||||
}
|
||||
|
||||
protected func OnSlotEmpty(int slot)
|
||||
{
|
||||
if(HUDcontroller) HUDcontroller->OnSlotObjectChanged(slot);
|
||||
return _inherited(slot,...);
|
||||
}
|
|
@ -1,2 +1,2 @@
|
|||
DE:Funktionalitäten
|
||||
US:Functionalities
|
||||
DE:Funktionalitäten
|
||||
US:Functionalities
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
DE:Ressourcen
|
||||
US:Resources
|
||||
DE:Ressourcen
|
||||
US:Resources
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[DefCore]
|
||||
id=NUMB
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack
|
||||
Picture=0,0,64,64
|
||||
Width=64
|
||||
Height=64
|
||||
[DefCore]
|
||||
id=NUMB
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack
|
||||
Picture=0,0,64,64
|
||||
Width=64
|
||||
Height=64
|
||||
Offset=-32,-32
|
|
@ -1,2 +1,2 @@
|
|||
DE:Ziffer
|
||||
US:Number
|
||||
DE:Ziffer
|
||||
US:Number
|
||||
|
|
|
@ -1,115 +1,115 @@
|
|||
[Action]
|
||||
Name=Rank0
|
||||
Facet=0,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank1
|
||||
Facet=16,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank2
|
||||
Facet=32,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank3
|
||||
Facet=48,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank4
|
||||
Facet=64,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank5
|
||||
Facet=80,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank6
|
||||
Facet=96,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank7
|
||||
Facet=112,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank8
|
||||
Facet=128,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank9
|
||||
Facet=144,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank10
|
||||
Facet=160,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank11
|
||||
Facet=176,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank12
|
||||
Facet=192,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank13
|
||||
Facet=208,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank14
|
||||
Facet=224,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank15
|
||||
Facet=240,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank16
|
||||
Facet=256,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank17
|
||||
Facet=272,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank18
|
||||
Facet=288,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank19
|
||||
Facet=304,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank20
|
||||
Facet=320,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank21
|
||||
Facet=336,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank22
|
||||
Facet=352,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank23
|
||||
Facet=368,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank24
|
||||
Facet=384,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=RankExtra1
|
||||
Facet=400,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=RankExtra2
|
||||
Facet=416,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=RankExtra3
|
||||
Facet=432,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=RankExtra4
|
||||
[Action]
|
||||
Name=Rank0
|
||||
Facet=0,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank1
|
||||
Facet=16,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank2
|
||||
Facet=32,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank3
|
||||
Facet=48,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank4
|
||||
Facet=64,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank5
|
||||
Facet=80,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank6
|
||||
Facet=96,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank7
|
||||
Facet=112,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank8
|
||||
Facet=128,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank9
|
||||
Facet=144,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank10
|
||||
Facet=160,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank11
|
||||
Facet=176,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank12
|
||||
Facet=192,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank13
|
||||
Facet=208,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank14
|
||||
Facet=224,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank15
|
||||
Facet=240,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank16
|
||||
Facet=256,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank17
|
||||
Facet=272,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank18
|
||||
Facet=288,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank19
|
||||
Facet=304,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank20
|
||||
Facet=320,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank21
|
||||
Facet=336,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank22
|
||||
Facet=352,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank23
|
||||
Facet=368,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=Rank24
|
||||
Facet=384,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=RankExtra1
|
||||
Facet=400,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=RankExtra2
|
||||
Facet=416,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=RankExtra3
|
||||
Facet=432,0,16,16
|
||||
|
||||
[Action]
|
||||
Name=RankExtra4
|
||||
Facet=448,0,16,16
|
|
@ -1,8 +1,8 @@
|
|||
[DefCore]
|
||||
id=RANK
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack
|
||||
Picture=0,0,16,16
|
||||
Width=16
|
||||
Height=16
|
||||
[DefCore]
|
||||
id=RANK
|
||||
Version=4,9,5
|
||||
Category=C4D_StaticBack
|
||||
Picture=0,0,16,16
|
||||
Width=16
|
||||
Height=16
|
||||
Offset=-8,-8
|
|
@ -1,2 +1,2 @@
|
|||
DE:Zeichen
|
||||
US:Character
|
||||
DE:Zeichen
|
||||
US:Character
|
||||
|
|
|
@ -1,105 +1,105 @@
|
|||
/*
|
||||
Standard rank definition
|
||||
Author: Newton
|
||||
|
||||
This is a ressource object in which the rank graphics and the rank names
|
||||
are stored. Any (crew) object can freely define which rank graphics it
|
||||
wants to use by defining the function func RanksID() { return [myrankid] }.
|
||||
Any other ranks definition should include this object
|
||||
*/
|
||||
|
||||
global func GetRankName(int rank)
|
||||
{
|
||||
var idRank;
|
||||
|
||||
// extra rank definition
|
||||
if(this)
|
||||
idRank = this->~RanksID();
|
||||
if(!idRank)
|
||||
idRank = RANK;
|
||||
|
||||
return DefinitionCall(idRank,"RankName",rank);
|
||||
}
|
||||
|
||||
public func RankName(int rank, int extra)
|
||||
{
|
||||
if(rank < 0) return nil;
|
||||
var rrank = rank % RegularRankCount();
|
||||
var erank = (rank / RegularRankCount() % ExtraRankCount());
|
||||
|
||||
// here you see the limits of C4Script
|
||||
// r=Format("$Rank%d",rrank); is not possible
|
||||
var r,e;
|
||||
if(rrank==0) r="$Rank0$";
|
||||
else if(rrank==1) r="$Rank1$";
|
||||
else if(rrank==2) r="$Rank2$";
|
||||
else if(rrank==3) r="$Rank3$";
|
||||
else if(rrank==4) r="$Rank4$";
|
||||
else if(rrank==5) r="$Rank5$";
|
||||
else if(rrank==6) r="$Rank6$";
|
||||
else if(rrank==7) r="$Rank7$";
|
||||
else if(rrank==8) r="$Rank8$";
|
||||
else if(rrank==9) r="$Rank9$";
|
||||
else if(rrank==10) r="$Rank10$";
|
||||
else if(rrank==11) r="$Rank11$";
|
||||
else if(rrank==12) r="$Rank12$";
|
||||
else if(rrank==13) r="$Rank13$";
|
||||
else if(rrank==14) r="$Rank14$";
|
||||
else if(rrank==15) r="$Rank15$";
|
||||
else if(rrank==16) r="$Rank16$";
|
||||
else if(rrank==17) r="$Rank17$";
|
||||
else if(rrank==18) r="$Rank18$";
|
||||
else if(rrank==19) r="$Rank19$";
|
||||
else if(rrank==20) r="$Rank20$";
|
||||
else if(rrank==21) r="$Rank21$";
|
||||
else if(rrank==22) r="$Rank22$";
|
||||
else if(rrank==23) r="$Rank23$";
|
||||
else if(rrank==24) r="$Rank24$";
|
||||
|
||||
if(erank==1) e = Format("$RankExtra1$",r);
|
||||
else if(erank==2) e = Format("$RankExtra2$",r);
|
||||
else if(erank==3) e = Format("$RankExtra3$",r);
|
||||
else if(erank==4) e = Format("$RankExtra4$",r);
|
||||
|
||||
if(erank) return e;
|
||||
else return r;
|
||||
}
|
||||
|
||||
public func RegularRankCount() { return 25; }
|
||||
public func ExtraRankCount() { return 4; }
|
||||
|
||||
func Definition(def) {
|
||||
def["ActMap"] = {
|
||||
|
||||
Rank0 = { Prototype = Action, Name = "Rank0", X = 0, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank1 = { Prototype = Action, Name = "Rank1", X = 16, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank2 = { Prototype = Action, Name = "Rank2", X = 32, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank3 = { Prototype = Action, Name = "Rank3", X = 48, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank4 = { Prototype = Action, Name = "Rank4", X = 64, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank5 = { Prototype = Action, Name = "Rank5", X = 80, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank6 = { Prototype = Action, Name = "Rank6", X = 96, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank7 = { Prototype = Action, Name = "Rank7", X = 112, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank8 = { Prototype = Action, Name = "Rank8", X = 128, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank9 = { Prototype = Action, Name = "Rank9", X = 144, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank10 = { Prototype = Action, Name = "Rank10", X = 160, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank11 = { Prototype = Action, Name = "Rank11", X = 176, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank12 = { Prototype = Action, Name = "Rank12", X = 192, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank13 = { Prototype = Action, Name = "Rank13", X = 208, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank14 = { Prototype = Action, Name = "Rank14", X = 224, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank15 = { Prototype = Action, Name = "Rank15", X = 240, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank16 = { Prototype = Action, Name = "Rank16", X = 256, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank17 = { Prototype = Action, Name = "Rank17", X = 272, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank18 = { Prototype = Action, Name = "Rank18", X = 288, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank19 = { Prototype = Action, Name = "Rank19", X = 304, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank20 = { Prototype = Action, Name = "Rank20", X = 320, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank21 = { Prototype = Action, Name = "Rank21", X = 336, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank22 = { Prototype = Action, Name = "Rank22", X = 352, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank23 = { Prototype = Action, Name = "Rank23", X = 368, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank24 = { Prototype = Action, Name = "Rank24", X = 384, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
RankExtra1 = { Prototype = Action, Name = "RankExtra1", X = 400, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
RankExtra2 = { Prototype = Action, Name = "RankExtra2", X = 416, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
RankExtra3 = { Prototype = Action, Name = "RankExtra3", X = 432, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
RankExtra4 = { Prototype = Action, Name = "RankExtra4", X = 448, Y = 0, Wdt = 16, Hgt = 16 }
|
||||
|
||||
};
|
||||
/*
|
||||
Standard rank definition
|
||||
Author: Newton
|
||||
|
||||
This is a ressource object in which the rank graphics and the rank names
|
||||
are stored. Any (crew) object can freely define which rank graphics it
|
||||
wants to use by defining the function func RanksID() { return [myrankid] }.
|
||||
Any other ranks definition should include this object
|
||||
*/
|
||||
|
||||
global func GetRankName(int rank)
|
||||
{
|
||||
var idRank;
|
||||
|
||||
// extra rank definition
|
||||
if(this)
|
||||
idRank = this->~RanksID();
|
||||
if(!idRank)
|
||||
idRank = RANK;
|
||||
|
||||
return DefinitionCall(idRank,"RankName",rank);
|
||||
}
|
||||
|
||||
public func RankName(int rank, int extra)
|
||||
{
|
||||
if(rank < 0) return nil;
|
||||
var rrank = rank % RegularRankCount();
|
||||
var erank = (rank / RegularRankCount() % ExtraRankCount());
|
||||
|
||||
// here you see the limits of C4Script
|
||||
// r=Format("$Rank%d",rrank); is not possible
|
||||
var r,e;
|
||||
if(rrank==0) r="$Rank0$";
|
||||
else if(rrank==1) r="$Rank1$";
|
||||
else if(rrank==2) r="$Rank2$";
|
||||
else if(rrank==3) r="$Rank3$";
|
||||
else if(rrank==4) r="$Rank4$";
|
||||
else if(rrank==5) r="$Rank5$";
|
||||
else if(rrank==6) r="$Rank6$";
|
||||
else if(rrank==7) r="$Rank7$";
|
||||
else if(rrank==8) r="$Rank8$";
|
||||
else if(rrank==9) r="$Rank9$";
|
||||
else if(rrank==10) r="$Rank10$";
|
||||
else if(rrank==11) r="$Rank11$";
|
||||
else if(rrank==12) r="$Rank12$";
|
||||
else if(rrank==13) r="$Rank13$";
|
||||
else if(rrank==14) r="$Rank14$";
|
||||
else if(rrank==15) r="$Rank15$";
|
||||
else if(rrank==16) r="$Rank16$";
|
||||
else if(rrank==17) r="$Rank17$";
|
||||
else if(rrank==18) r="$Rank18$";
|
||||
else if(rrank==19) r="$Rank19$";
|
||||
else if(rrank==20) r="$Rank20$";
|
||||
else if(rrank==21) r="$Rank21$";
|
||||
else if(rrank==22) r="$Rank22$";
|
||||
else if(rrank==23) r="$Rank23$";
|
||||
else if(rrank==24) r="$Rank24$";
|
||||
|
||||
if(erank==1) e = Format("$RankExtra1$",r);
|
||||
else if(erank==2) e = Format("$RankExtra2$",r);
|
||||
else if(erank==3) e = Format("$RankExtra3$",r);
|
||||
else if(erank==4) e = Format("$RankExtra4$",r);
|
||||
|
||||
if(erank) return e;
|
||||
else return r;
|
||||
}
|
||||
|
||||
public func RegularRankCount() { return 25; }
|
||||
public func ExtraRankCount() { return 4; }
|
||||
|
||||
func Definition(def) {
|
||||
def["ActMap"] = {
|
||||
|
||||
Rank0 = { Prototype = Action, Name = "Rank0", X = 0, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank1 = { Prototype = Action, Name = "Rank1", X = 16, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank2 = { Prototype = Action, Name = "Rank2", X = 32, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank3 = { Prototype = Action, Name = "Rank3", X = 48, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank4 = { Prototype = Action, Name = "Rank4", X = 64, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank5 = { Prototype = Action, Name = "Rank5", X = 80, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank6 = { Prototype = Action, Name = "Rank6", X = 96, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank7 = { Prototype = Action, Name = "Rank7", X = 112, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank8 = { Prototype = Action, Name = "Rank8", X = 128, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank9 = { Prototype = Action, Name = "Rank9", X = 144, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank10 = { Prototype = Action, Name = "Rank10", X = 160, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank11 = { Prototype = Action, Name = "Rank11", X = 176, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank12 = { Prototype = Action, Name = "Rank12", X = 192, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank13 = { Prototype = Action, Name = "Rank13", X = 208, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank14 = { Prototype = Action, Name = "Rank14", X = 224, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank15 = { Prototype = Action, Name = "Rank15", X = 240, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank16 = { Prototype = Action, Name = "Rank16", X = 256, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank17 = { Prototype = Action, Name = "Rank17", X = 272, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank18 = { Prototype = Action, Name = "Rank18", X = 288, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank19 = { Prototype = Action, Name = "Rank19", X = 304, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank20 = { Prototype = Action, Name = "Rank20", X = 320, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank21 = { Prototype = Action, Name = "Rank21", X = 336, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank22 = { Prototype = Action, Name = "Rank22", X = 352, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank23 = { Prototype = Action, Name = "Rank23", X = 368, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
Rank24 = { Prototype = Action, Name = "Rank24", X = 384, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
RankExtra1 = { Prototype = Action, Name = "RankExtra1", X = 400, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
RankExtra2 = { Prototype = Action, Name = "RankExtra2", X = 416, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
RankExtra3 = { Prototype = Action, Name = "RankExtra3", X = 432, Y = 0, Wdt = 16, Hgt = 16 },
|
||||
RankExtra4 = { Prototype = Action, Name = "RankExtra4", X = 448, Y = 0, Wdt = 16, Hgt = 16 }
|
||||
|
||||
};
|
||||
}
|
|
@ -1,29 +1,29 @@
|
|||
Rank0=Clonk
|
||||
Rank1=Fähnrich
|
||||
Rank2=Leutnant
|
||||
Rank3=Hauptmann
|
||||
Rank4=Major
|
||||
Rank5=Oberst
|
||||
Rank6=Brigadegeneral
|
||||
Rank7=Generalmajor
|
||||
Rank8=Generalleutnant
|
||||
Rank9=General
|
||||
Rank10=Feldmarschall
|
||||
Rank11=Kadett
|
||||
Rank12=Fregattenkapitän
|
||||
Rank13=Kapitän
|
||||
Rank14=Konteradmiral
|
||||
Rank15=Vizeadmiral
|
||||
Rank16=Admiral
|
||||
Rank17=Großadmiral
|
||||
Rank18=Staatsrat
|
||||
Rank19=Staatssekretär
|
||||
Rank20=Kanzler
|
||||
Rank21=Vizepräsident
|
||||
Rank22=Präsident
|
||||
Rank23=Ministerpräsident
|
||||
Rank24=Konsul
|
||||
RankExtra1=%s Erster Klasse
|
||||
RankExtra2=%s Zweiten Grades
|
||||
RankExtra3=%s ohne Gleichen
|
||||
RankExtra4=Erhabener %s
|
||||
Rank0=Clonk
|
||||
Rank1=Fähnrich
|
||||
Rank2=Leutnant
|
||||
Rank3=Hauptmann
|
||||
Rank4=Major
|
||||
Rank5=Oberst
|
||||
Rank6=Brigadegeneral
|
||||
Rank7=Generalmajor
|
||||
Rank8=Generalleutnant
|
||||
Rank9=General
|
||||
Rank10=Feldmarschall
|
||||
Rank11=Kadett
|
||||
Rank12=Fregattenkapitän
|
||||
Rank13=Kapitän
|
||||
Rank14=Konteradmiral
|
||||
Rank15=Vizeadmiral
|
||||
Rank16=Admiral
|
||||
Rank17=Großadmiral
|
||||
Rank18=Staatsrat
|
||||
Rank19=Staatssekretär
|
||||
Rank20=Kanzler
|
||||
Rank21=Vizepräsident
|
||||
Rank22=Präsident
|
||||
Rank23=Ministerpräsident
|
||||
Rank24=Konsul
|
||||
RankExtra1=%s Erster Klasse
|
||||
RankExtra2=%s Zweiten Grades
|
||||
RankExtra3=%s ohne Gleichen
|
||||
RankExtra4=Erhabener %s
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
Rank0=Clonk
|
||||
Rank1=Ensign
|
||||
Rank2=Lieutenant
|
||||
Rank3=Captain
|
||||
Rank4=Major
|
||||
Rank5=Lieutenant Colonel
|
||||
Rank6=Colonel
|
||||
Rank7=Brigade General
|
||||
Rank8=Major General
|
||||
Rank9=Lieutenant General
|
||||
Rank10=General
|
||||
Rank11=Midshipman
|
||||
Rank12=Commander
|
||||
Rank13=Commodore
|
||||
Rank14=Rear-Admiral
|
||||
Rank15=Vice-Admiral
|
||||
Rank16=Admiral
|
||||
Rank17=Fleet Admiral
|
||||
Rank18=Counsellor of State
|
||||
Rank19=Secretary of State
|
||||
Rank20=Chancellor
|
||||
Rank21=Vice President
|
||||
Rank22=President
|
||||
Rank23=Premier
|
||||
Rank24=Konsul
|
||||
RankExtra1=%s First Class
|
||||
RankExtra2=%s Second Degree
|
||||
RankExtra3=%s Without Equal
|
||||
RankExtra4=Exalted %s
|
||||
Rank0=Clonk
|
||||
Rank1=Ensign
|
||||
Rank2=Lieutenant
|
||||
Rank3=Captain
|
||||
Rank4=Major
|
||||
Rank5=Lieutenant Colonel
|
||||
Rank6=Colonel
|
||||
Rank7=Brigade General
|
||||
Rank8=Major General
|
||||
Rank9=Lieutenant General
|
||||
Rank10=General
|
||||
Rank11=Midshipman
|
||||
Rank12=Commander
|
||||
Rank13=Commodore
|
||||
Rank14=Rear-Admiral
|
||||
Rank15=Vice-Admiral
|
||||
Rank16=Admiral
|
||||
Rank17=Fleet Admiral
|
||||
Rank18=Counsellor of State
|
||||
Rank19=Secretary of State
|
||||
Rank20=Chancellor
|
||||
Rank21=Vice President
|
||||
Rank22=President
|
||||
Rank23=Premier
|
||||
Rank24=Konsul
|
||||
RankExtra1=%s First Class
|
||||
RankExtra2=%s Second Degree
|
||||
RankExtra3=%s Without Equal
|
||||
RankExtra4=Exalted %s
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
C4D_HUD:
|
||||
+ parallax
|
||||
+ über allem, über fow
|
||||
+ für mausklicks, maus-drag-and-drops etc zugänglich
|
||||
+ bekommt die GameCallEx calls mit
|
||||
+ kein Zoom!
|
||||
|
||||
----
|
||||
Funktion: SetViewportBorder(top/bottom, pixels) - verkleinert den Viewport so dass Platz ist für HUD-Elemente die nix verdecken
|
||||
|
||||
|
||||
-----
|
||||
|
||||
C4D_HUD:
|
||||
+ parallax
|
||||
+ über allem, über fow
|
||||
+ für mausklicks, maus-drag-and-drops etc zugänglich
|
||||
+ bekommt die GameCallEx calls mit
|
||||
+ kein Zoom!
|
||||
|
||||
----
|
||||
Funktion: SetViewportBorder(top/bottom, pixels) - verkleinert den Viewport so dass Platz ist für HUD-Elemente die nix verdecken
|
||||
|
||||
|
||||
-----
|
||||
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
[DefCore]
|
||||
id=BPDR
|
||||
Version=4,9,10,10
|
||||
Category=C4D_Material|C4D_Object
|
||||
MaxUserSelect=50
|
||||
Width=8
|
||||
Height=8
|
||||
Offset=-4,-4
|
||||
Picture=8,0,16,16
|
||||
Vertices=2
|
||||
VertexX=0,0
|
||||
VertexY=3,-3
|
||||
VertexFriction=50,50
|
||||
Components=SLFR=1;COAL=1;
|
||||
Value=10
|
||||
Mass=12
|
||||
Rotate=1
|
||||
ContactIncinerate=1
|
||||
BlastIncinerate=5
|
||||
[DefCore]
|
||||
id=BPDR
|
||||
Version=4,9,10,10
|
||||
Category=C4D_Material|C4D_Object
|
||||
MaxUserSelect=50
|
||||
Width=8
|
||||
Height=8
|
||||
Offset=-4,-4
|
||||
Picture=8,0,16,16
|
||||
Vertices=2
|
||||
VertexX=0,0
|
||||
VertexY=3,-3
|
||||
VertexFriction=50,50
|
||||
Components=SLFR=1;COAL=1;
|
||||
Value=10
|
||||
Mass=12
|
||||
Rotate=1
|
||||
ContactIncinerate=1
|
||||
BlastIncinerate=5
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
/*-- Black Powder --*/
|
||||
|
||||
#strict 2
|
||||
|
||||
protected func Incineration()
|
||||
{
|
||||
Schedule("Explode(20)", 90);
|
||||
}
|
||||
|
||||
func IsAlchemyProduct() { return 1; }
|
||||
func AlchemyProcessTime() { return 100; }
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Collectible", 1, def);
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
||||
/*-- Black Powder --*/
|
||||
|
||||
#strict 2
|
||||
|
||||
protected func Incineration()
|
||||
{
|
||||
Schedule("Explode(20)", 90);
|
||||
}
|
||||
|
||||
func IsAlchemyProduct() { return 1; }
|
||||
func AlchemyProcessTime() { return 100; }
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Collectible", 1, def);
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
[DefCore]
|
||||
id=BARL
|
||||
Version=4,10,0,0
|
||||
Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase
|
||||
MaxUserSelect=5
|
||||
Value=16
|
||||
Mass=20
|
||||
TimerCall=Check
|
||||
Width=16
|
||||
Height=16
|
||||
Offset=-8,-8
|
||||
Vertices=4
|
||||
VertexX=-2,2,-2,2
|
||||
VertexY=-7,-7,7,7
|
||||
VertexFriction=60,60,60,60
|
||||
Components=WOOD=1;METL=1;
|
||||
Rebuy=1
|
||||
Collectible=1
|
||||
ContactIncinerate=2
|
||||
Rotate=1
|
||||
[DefCore]
|
||||
id=BARL
|
||||
Version=4,10,0,0
|
||||
Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase
|
||||
MaxUserSelect=5
|
||||
Value=16
|
||||
Mass=20
|
||||
TimerCall=Check
|
||||
Width=16
|
||||
Height=16
|
||||
Offset=-8,-8
|
||||
Vertices=4
|
||||
VertexX=-2,2,-2,2
|
||||
VertexY=-7,-7,7,7
|
||||
VertexFriction=60,60,60,60
|
||||
Components=WOOD=1;METL=1;
|
||||
Rebuy=1
|
||||
Collectible=1
|
||||
ContactIncinerate=2
|
||||
Rotate=1
|
||||
Float=1
|
|
@ -1,19 +1,19 @@
|
|||
[DefCore]
|
||||
id=MBRL
|
||||
Version=4,10,0,0
|
||||
Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase
|
||||
MaxUserSelect=5
|
||||
Value=16
|
||||
Mass=20
|
||||
TimerCall=Check
|
||||
Width=16
|
||||
Height=16
|
||||
Offset=-8,-8
|
||||
Vertices=4
|
||||
VertexX=-2,2,-2,2
|
||||
VertexY=-7,-7,7,7
|
||||
VertexFriction=60,60,60,60
|
||||
Components=METL=2;
|
||||
Rebuy=1
|
||||
Collectible=1
|
||||
[DefCore]
|
||||
id=MBRL
|
||||
Version=4,10,0,0
|
||||
Category=C4D_Object|C4D_SelectMaterial|C4D_SelectKnowledge|C4D_SelectHomebase
|
||||
MaxUserSelect=5
|
||||
Value=16
|
||||
Mass=20
|
||||
TimerCall=Check
|
||||
Width=16
|
||||
Height=16
|
||||
Offset=-8,-8
|
||||
Vertices=4
|
||||
VertexX=-2,2,-2,2
|
||||
VertexY=-7,-7,7,7
|
||||
VertexFriction=60,60,60,60
|
||||
Components=METL=2;
|
||||
Rebuy=1
|
||||
Collectible=1
|
||||
Rotate=1
|
|
@ -1,23 +1,23 @@
|
|||
/*-- Metal Barrel --*/
|
||||
|
||||
#strict 2
|
||||
#include BARL
|
||||
|
||||
private func Hit()
|
||||
{
|
||||
if(iVolume< 50) Sound(" "); //Hollow clonk sound
|
||||
if(iVolume> 51) Sound(" "); //Solid clonk sound
|
||||
if(iVolume>=1 && Closed==false)
|
||||
{
|
||||
if(GBackLiquid(0,iDrain) && GetMaterial(0,iDrain)!=szLiquid) return 0;
|
||||
else EmptyBarrel(GetR());
|
||||
Sound(" "); //water splash sound should be added when available -Ringwaul
|
||||
}
|
||||
}
|
||||
|
||||
private func Check()
|
||||
{
|
||||
if(GetMaterial(0,iDrain)== Material("Acid") && Closed==false) FillBarrel("Acid");
|
||||
if(GetMaterial(0,iDrain)== Material("Lava") && Closed==false) FillBarrel("Lava");
|
||||
return (_inherited());
|
||||
/*-- Metal Barrel --*/
|
||||
|
||||
#strict 2
|
||||
#include BARL
|
||||
|
||||
private func Hit()
|
||||
{
|
||||
if(iVolume< 50) Sound(" "); //Hollow clonk sound
|
||||
if(iVolume> 51) Sound(" "); //Solid clonk sound
|
||||
if(iVolume>=1 && Closed==false)
|
||||
{
|
||||
if(GBackLiquid(0,iDrain) && GetMaterial(0,iDrain)!=szLiquid) return 0;
|
||||
else EmptyBarrel(GetR());
|
||||
Sound(" "); //water splash sound should be added when available -Ringwaul
|
||||
}
|
||||
}
|
||||
|
||||
private func Check()
|
||||
{
|
||||
if(GetMaterial(0,iDrain)== Material("Acid") && Closed==false) FillBarrel("Acid");
|
||||
if(GetMaterial(0,iDrain)== Material("Lava") && Closed==false) FillBarrel("Lava");
|
||||
return (_inherited());
|
||||
}
|
|
@ -1,87 +1,87 @@
|
|||
/*-- Wooden Barrel --*/
|
||||
|
||||
#strict 2
|
||||
|
||||
local szLiquid;
|
||||
local iVolume;
|
||||
local Closed;
|
||||
local iDrain;
|
||||
|
||||
local debug;
|
||||
|
||||
protected func Initialize()
|
||||
{
|
||||
iVolume=0;
|
||||
Closed=false;
|
||||
iDrain=3+RandomX(0,2); //Vertical offset of liquid intake from barrel center
|
||||
|
||||
debug=0;
|
||||
}
|
||||
|
||||
private func Hit()
|
||||
{
|
||||
Sound("WoodHit");
|
||||
if(iVolume>=1 && Closed==false) {
|
||||
if(GBackLiquid(0,iDrain) && GetMaterial(0,iDrain)!=szLiquid) return 0;
|
||||
EmptyBarrel(GetR());
|
||||
Sound(" "); //water splash sound should be added when available -Ringwaul
|
||||
}
|
||||
}
|
||||
|
||||
private func Check()
|
||||
{
|
||||
//Fills Barrel with specified liquid from if submerged
|
||||
var iSource=iDrain+RandomX(0,4);
|
||||
|
||||
if(GetMaterial(0,iSource)== Material("Water") && Closed==false) FillBarrel("Water");
|
||||
//if(GetMaterial(0,iSource)== Material("Oil") && Closed==false) FillBarrel("Oil"); //No oil material in current build -Ringwaul/Dec10
|
||||
|
||||
if(iVolume==0) SetGraphics() && szLiquid=nil;
|
||||
|
||||
//Debug/Testing Purposes
|
||||
if(debug == 1) Message("Volume:|%d|Liquid:|%s", this(), iVolume, szLiquid);
|
||||
}
|
||||
|
||||
private func FillBarrel(string szMat)
|
||||
{
|
||||
var iCapacity=300;
|
||||
|
||||
if(iVolume>=1 && szMat!=szLiquid) return 0;
|
||||
while(iVolume!=iCapacity && GetMaterial(0,iDrain)== Material(szMat))
|
||||
{
|
||||
ExtractLiquid(0,iDrain);
|
||||
iVolume=++iVolume;
|
||||
}
|
||||
szLiquid=szMat;
|
||||
}
|
||||
|
||||
private func EmptyBarrel(int iAngle, int iStrength)
|
||||
{
|
||||
if(!iAngle) iAngle=0;
|
||||
if(!iStrength) iStrength=30;
|
||||
CastPXS(szLiquid, iVolume,iStrength,0,0,iAngle,30);
|
||||
iVolume=0;
|
||||
}
|
||||
|
||||
public func ControlUse(object pByClonk, int iX, int iY)
|
||||
{
|
||||
if(Closed==true) Closed=false && Sound(" "); //Wood scrape sound
|
||||
|
||||
var AimAngle=Angle(0,0, iX, iY);
|
||||
if(iVolume>=1)
|
||||
{
|
||||
EmptyBarrel(AimAngle,50);
|
||||
if( iX > 1) Contained()->SetDir(1);
|
||||
if( iX < -1 ) Contained()->SetDir(0);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
public func IsTool() { return 0; }
|
||||
|
||||
public func IsToolProduct() { return 1; }
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Collectible", 1, def);
|
||||
SetProperty("Name", "$Name$", def);
|
||||
/*-- Wooden Barrel --*/
|
||||
|
||||
#strict 2
|
||||
|
||||
local szLiquid;
|
||||
local iVolume;
|
||||
local Closed;
|
||||
local iDrain;
|
||||
|
||||
local debug;
|
||||
|
||||
protected func Initialize()
|
||||
{
|
||||
iVolume=0;
|
||||
Closed=false;
|
||||
iDrain=3+RandomX(0,2); //Vertical offset of liquid intake from barrel center
|
||||
|
||||
debug=0;
|
||||
}
|
||||
|
||||
private func Hit()
|
||||
{
|
||||
Sound("WoodHit");
|
||||
if(iVolume>=1 && Closed==false) {
|
||||
if(GBackLiquid(0,iDrain) && GetMaterial(0,iDrain)!=szLiquid) return 0;
|
||||
EmptyBarrel(GetR());
|
||||
Sound(" "); //water splash sound should be added when available -Ringwaul
|
||||
}
|
||||
}
|
||||
|
||||
private func Check()
|
||||
{
|
||||
//Fills Barrel with specified liquid from if submerged
|
||||
var iSource=iDrain+RandomX(0,4);
|
||||
|
||||
if(GetMaterial(0,iSource)== Material("Water") && Closed==false) FillBarrel("Water");
|
||||
//if(GetMaterial(0,iSource)== Material("Oil") && Closed==false) FillBarrel("Oil"); //No oil material in current build -Ringwaul/Dec10
|
||||
|
||||
if(iVolume==0) SetGraphics() && szLiquid=nil;
|
||||
|
||||
//Debug/Testing Purposes
|
||||
if(debug == 1) Message("Volume:|%d|Liquid:|%s", this(), iVolume, szLiquid);
|
||||
}
|
||||
|
||||
private func FillBarrel(string szMat)
|
||||
{
|
||||
var iCapacity=300;
|
||||
|
||||
if(iVolume>=1 && szMat!=szLiquid) return 0;
|
||||
while(iVolume!=iCapacity && GetMaterial(0,iDrain)== Material(szMat))
|
||||
{
|
||||
ExtractLiquid(0,iDrain);
|
||||
iVolume=++iVolume;
|
||||
}
|
||||
szLiquid=szMat;
|
||||
}
|
||||
|
||||
private func EmptyBarrel(int iAngle, int iStrength)
|
||||
{
|
||||
if(!iAngle) iAngle=0;
|
||||
if(!iStrength) iStrength=30;
|
||||
CastPXS(szLiquid, iVolume,iStrength,0,0,iAngle,30);
|
||||
iVolume=0;
|
||||
}
|
||||
|
||||
public func ControlUse(object pByClonk, int iX, int iY)
|
||||
{
|
||||
if(Closed==true) Closed=false && Sound(" "); //Wood scrape sound
|
||||
|
||||
var AimAngle=Angle(0,0, iX, iY);
|
||||
if(iVolume>=1)
|
||||
{
|
||||
EmptyBarrel(AimAngle,50);
|
||||
if( iX > 1) Contained()->SetDir(1);
|
||||
if( iX < -1 ) Contained()->SetDir(0);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
public func IsTool() { return 0; }
|
||||
|
||||
public func IsToolProduct() { return 1; }
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Collectible", 1, def);
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
|
@ -1,19 +1,19 @@
|
|||
[DefCore]
|
||||
id=DYNA
|
||||
Version=4,9,8,8
|
||||
Category=16
|
||||
Width=3
|
||||
Height=12
|
||||
Offset=-2,-6
|
||||
Mass=8
|
||||
Value=10
|
||||
Picture=4,0,64,64
|
||||
Vertices=3
|
||||
VertexX=-2,0,+2
|
||||
VertexY=6,-6,6
|
||||
VertexFriction=90,90,90
|
||||
Collectible=1
|
||||
Rotate=1
|
||||
ContactIncinerate=1
|
||||
BlastIncinerate=1
|
||||
[DefCore]
|
||||
id=DYNA
|
||||
Version=4,9,8,8
|
||||
Category=16
|
||||
Width=3
|
||||
Height=12
|
||||
Offset=-2,-6
|
||||
Mass=8
|
||||
Value=10
|
||||
Picture=4,0,64,64
|
||||
Vertices=3
|
||||
VertexX=-2,0,+2
|
||||
VertexY=6,-6,6
|
||||
VertexFriction=90,90,90
|
||||
Collectible=1
|
||||
Rotate=1
|
||||
ContactIncinerate=1
|
||||
BlastIncinerate=1
|
||||
Rebuy=1
|
|
@ -1,2 +1,2 @@
|
|||
DE:Dynamit
|
||||
DE:Dynamit
|
||||
US:Dynamite
|
|
@ -1,115 +1,115 @@
|
|||
#strict 2
|
||||
|
||||
// The dynamite is not a weapon but a mining tool
|
||||
public func ControlUse(object clonk)
|
||||
{
|
||||
// if already activated, nothing (so, throw)
|
||||
if(GetAction() == "Fuse")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var x = 0, y = 0;
|
||||
|
||||
// hangling
|
||||
if(WildcardMatch(clonk->GetAction(),"Hangle*"))
|
||||
{
|
||||
y = -clonk->GetDefHeight()/2;
|
||||
}
|
||||
// climbing
|
||||
else if(WildcardMatch(clonk->GetAction(), "Climb*"))
|
||||
{
|
||||
x = clonk->GetDefWidth()/2;
|
||||
if(clonk->GetDir() == DIR_Left) x = -x;
|
||||
}
|
||||
// something else
|
||||
else
|
||||
{
|
||||
// no wall -> put into ground
|
||||
if(!getWall(x, y, clonk))
|
||||
{
|
||||
// contact to ground
|
||||
if(clonk->GetContact(-1) & CNAT_Bottom)
|
||||
{
|
||||
y = clonk->GetDefHeight()/2;
|
||||
}
|
||||
// probably flying or swimming
|
||||
else
|
||||
{
|
||||
// nothing
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Fuse
|
||||
Fuse();
|
||||
|
||||
// put into ...
|
||||
Sound("Connect");
|
||||
Exit(x*6/10, y + GetDefHeight()/2, Angle(x,y,0,0) + RandomX(-25,25));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public func Fuse()
|
||||
{
|
||||
if(GetAction() != "Fuse")
|
||||
{
|
||||
Sound("Fuse");
|
||||
SetAction("Fuse");
|
||||
}
|
||||
}
|
||||
|
||||
// returns true if there is a wall in direction in which "clonk" looks
|
||||
// and puts the offset to the wall into "xo, yo" - looking from the clonk
|
||||
private func getWall(&xo, &yo, object clonk)
|
||||
{
|
||||
var wdt = clonk->GetDefWidth();
|
||||
var dir = clonk->GetDir()*2-1;
|
||||
var x = (wdt/2)*dir;
|
||||
var s = false;
|
||||
if(GBackSolid(x, 0)) { xo = x; yo = 0; return true; }
|
||||
if(GBackSolid(x, -5)) { xo = x; yo = -5; return true; }
|
||||
if(GBackSolid(x, +5)) { xo = x; yo = +5; return true; }
|
||||
return false;
|
||||
}
|
||||
|
||||
protected func Hit() { Sound("WoodHit*"); }
|
||||
|
||||
protected func Incineration() { Extinguish(); Fuse(); }
|
||||
|
||||
protected func RejectEntrance()
|
||||
{
|
||||
return GetAction() == "Fuse";
|
||||
}
|
||||
|
||||
private func Fusing() {
|
||||
// Effekt
|
||||
if(GetActTime() < 120)
|
||||
{
|
||||
var h = GetDefHeight()/2;
|
||||
CastParticles("Spark",1,20,Sin(GetR(),h),-Cos(GetR(),h),15,25,RGB(255,200,0),RGB(255,255,150));
|
||||
}
|
||||
// Explosion
|
||||
else if(GetActTime() > 140)
|
||||
Explode(18);
|
||||
}
|
||||
|
||||
protected func Definition(def) {
|
||||
def["Name"] = "Dynamite";
|
||||
def["ActMap"] = {
|
||||
Fuse = {
|
||||
Prototype = Action,
|
||||
Name = "Fuse",
|
||||
Procedure = DFA_FLOAT,
|
||||
NextAction = "Fuse",
|
||||
Delay = 1,
|
||||
Length = 1,
|
||||
FacetBase = 1,
|
||||
Sound = "Fusing",
|
||||
StartCall = "Fusing"
|
||||
}
|
||||
};
|
||||
}
|
||||
#strict 2
|
||||
|
||||
// The dynamite is not a weapon but a mining tool
|
||||
public func ControlUse(object clonk)
|
||||
{
|
||||
// if already activated, nothing (so, throw)
|
||||
if(GetAction() == "Fuse")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var x = 0, y = 0;
|
||||
|
||||
// hangling
|
||||
if(WildcardMatch(clonk->GetAction(),"Hangle*"))
|
||||
{
|
||||
y = -clonk->GetDefHeight()/2;
|
||||
}
|
||||
// climbing
|
||||
else if(WildcardMatch(clonk->GetAction(), "Climb*"))
|
||||
{
|
||||
x = clonk->GetDefWidth()/2;
|
||||
if(clonk->GetDir() == DIR_Left) x = -x;
|
||||
}
|
||||
// something else
|
||||
else
|
||||
{
|
||||
// no wall -> put into ground
|
||||
if(!getWall(x, y, clonk))
|
||||
{
|
||||
// contact to ground
|
||||
if(clonk->GetContact(-1) & CNAT_Bottom)
|
||||
{
|
||||
y = clonk->GetDefHeight()/2;
|
||||
}
|
||||
// probably flying or swimming
|
||||
else
|
||||
{
|
||||
// nothing
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Fuse
|
||||
Fuse();
|
||||
|
||||
// put into ...
|
||||
Sound("Connect");
|
||||
Exit(x*6/10, y + GetDefHeight()/2, Angle(x,y,0,0) + RandomX(-25,25));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public func Fuse()
|
||||
{
|
||||
if(GetAction() != "Fuse")
|
||||
{
|
||||
Sound("Fuse");
|
||||
SetAction("Fuse");
|
||||
}
|
||||
}
|
||||
|
||||
// returns true if there is a wall in direction in which "clonk" looks
|
||||
// and puts the offset to the wall into "xo, yo" - looking from the clonk
|
||||
private func getWall(&xo, &yo, object clonk)
|
||||
{
|
||||
var wdt = clonk->GetDefWidth();
|
||||
var dir = clonk->GetDir()*2-1;
|
||||
var x = (wdt/2)*dir;
|
||||
var s = false;
|
||||
if(GBackSolid(x, 0)) { xo = x; yo = 0; return true; }
|
||||
if(GBackSolid(x, -5)) { xo = x; yo = -5; return true; }
|
||||
if(GBackSolid(x, +5)) { xo = x; yo = +5; return true; }
|
||||
return false;
|
||||
}
|
||||
|
||||
protected func Hit() { Sound("WoodHit*"); }
|
||||
|
||||
protected func Incineration() { Extinguish(); Fuse(); }
|
||||
|
||||
protected func RejectEntrance()
|
||||
{
|
||||
return GetAction() == "Fuse";
|
||||
}
|
||||
|
||||
private func Fusing() {
|
||||
// Effekt
|
||||
if(GetActTime() < 120)
|
||||
{
|
||||
var h = GetDefHeight()/2;
|
||||
CastParticles("Spark",1,20,Sin(GetR(),h),-Cos(GetR(),h),15,25,RGB(255,200,0),RGB(255,255,150));
|
||||
}
|
||||
// Explosion
|
||||
else if(GetActTime() > 140)
|
||||
Explode(18);
|
||||
}
|
||||
|
||||
protected func Definition(def) {
|
||||
def["Name"] = "Dynamite";
|
||||
def["ActMap"] = {
|
||||
Fuse = {
|
||||
Prototype = Action,
|
||||
Name = "Fuse",
|
||||
Procedure = DFA_FLOAT,
|
||||
NextAction = "Fuse",
|
||||
Delay = 1,
|
||||
Length = 1,
|
||||
FacetBase = 1,
|
||||
Sound = "Fusing",
|
||||
StartCall = "Fusing"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
[Particle]
|
||||
Name=Spark
|
||||
MaxCount=1000
|
||||
InitFn=StdInit
|
||||
ExecFn=StdExec
|
||||
CollisionFn=Die
|
||||
DrawFn=Std
|
||||
Face=0,0,16,16,-8,-8
|
||||
Delay=0
|
||||
Repeats=1
|
||||
GravityAcc=100
|
||||
VertexCount=1
|
||||
VertexY=50
|
||||
AlphaFade=8
|
||||
Additive=1
|
||||
[Particle]
|
||||
Name=Spark
|
||||
MaxCount=1000
|
||||
InitFn=StdInit
|
||||
ExecFn=StdExec
|
||||
CollisionFn=Die
|
||||
DrawFn=Std
|
||||
Face=0,0,16,16,-8,-8
|
||||
Delay=0
|
||||
Repeats=1
|
||||
GravityAcc=100
|
||||
VertexCount=1
|
||||
VertexY=50
|
||||
AlphaFade=8
|
||||
Additive=1
|
||||
RByV=1
|
|
@ -1,16 +1,16 @@
|
|||
[DefCore]
|
||||
id=ERTH
|
||||
Version=4,10,0,0
|
||||
Category=C4D_Object
|
||||
Width=6
|
||||
Height=6
|
||||
Offset=-3,-3
|
||||
Vertices=3
|
||||
VertexX=0,1,-1
|
||||
VertexY=1,-1,-1
|
||||
VertexFriction=100
|
||||
Mass=12
|
||||
Components=ILOA=1
|
||||
Collectible=1
|
||||
Fragile=1
|
||||
Rotate=1
|
||||
[DefCore]
|
||||
id=ERTH
|
||||
Version=4,10,0,0
|
||||
Category=C4D_Object
|
||||
Width=6
|
||||
Height=6
|
||||
Offset=-3,-3
|
||||
Vertices=3
|
||||
VertexX=0,1,-1
|
||||
VertexY=1,-1,-1
|
||||
VertexFriction=100
|
||||
Mass=12
|
||||
Components=ILOA=1
|
||||
Collectible=1
|
||||
Fragile=1
|
||||
Rotate=1
|
||||
|
|
|
@ -1 +1 @@
|
|||
Um transportfähige Erdklumpen auszugraben, während des Grabens erneut einmal auf 'Graben' klicken.
|
||||
Um transportfähige Erdklumpen auszugraben, während des Grabens erneut einmal auf 'Graben' klicken.
|
||||
|
|
|
@ -1 +1 @@
|
|||
Hit 'dig' again while digging to create chunks that can be picked up.
|
||||
Hit 'dig' again while digging to create chunks that can be picked up.
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
/*--- Earth ---*/
|
||||
|
||||
#strict 2
|
||||
|
||||
protected func Hit()
|
||||
{
|
||||
CastPXS("Earth", 225, 18);
|
||||
Sound("EarthHit*");
|
||||
RemoveObject();
|
||||
return 1;
|
||||
}
|
||||
|
||||
func IsAlchemContainer() { return true; }
|
||||
func AlchemProcessTime() { return 120; }
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Collectible", 1, def);
|
||||
SetProperty("Name", "$Name$", def);
|
||||
/*--- Earth ---*/
|
||||
|
||||
#strict 2
|
||||
|
||||
protected func Hit()
|
||||
{
|
||||
CastPXS("Earth", 225, 18);
|
||||
Sound("EarthHit*");
|
||||
RemoveObject();
|
||||
return 1;
|
||||
}
|
||||
|
||||
func IsAlchemContainer() { return true; }
|
||||
func AlchemProcessTime() { return 120; }
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Collectible", 1, def);
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
|
@ -1 +1 @@
|
|||
Name=Erdklumpen
|
||||
Name=Erdklumpen
|
||||
|
|
|
@ -1 +1 @@
|
|||
Name=Chunk of Dirt
|
||||
Name=Chunk of Dirt
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
[DefCore]
|
||||
id=METL
|
||||
Version=4,10,0,0
|
||||
Category=C4D_Object|C4D_SelectMaterial|C4D_SelectHomebase
|
||||
MaxUserSelect=25
|
||||
Width=14
|
||||
Height=13
|
||||
Offset=-6,-6
|
||||
Vertices=3
|
||||
VertexX=-4,4
|
||||
VertexY=2,-2
|
||||
VertexCNAT=1,2,16
|
||||
VertexFriction=30,30
|
||||
Value=8
|
||||
Mass=12
|
||||
Components=ORE1=1
|
||||
Rebuy=1
|
||||
Collectible=1
|
||||
[DefCore]
|
||||
id=METL
|
||||
Version=4,10,0,0
|
||||
Category=C4D_Object|C4D_SelectMaterial|C4D_SelectHomebase
|
||||
MaxUserSelect=25
|
||||
Width=14
|
||||
Height=13
|
||||
Offset=-6,-6
|
||||
Vertices=3
|
||||
VertexX=-4,4
|
||||
VertexY=2,-2
|
||||
VertexCNAT=1,2,16
|
||||
VertexFriction=30,30
|
||||
Value=8
|
||||
Mass=12
|
||||
Components=ORE1=1
|
||||
Rebuy=1
|
||||
Collectible=1
|
||||
Rotate=1
|
|
@ -1,13 +1,13 @@
|
|||
/*--- Metal ---*/
|
||||
|
||||
#strict 2
|
||||
|
||||
protected func Hit()
|
||||
{
|
||||
Sound("MetalHit*");
|
||||
return 1;
|
||||
}
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
||||
/*--- Metal ---*/
|
||||
|
||||
#strict 2
|
||||
|
||||
protected func Hit()
|
||||
{
|
||||
Sound("MetalHit*");
|
||||
return 1;
|
||||
}
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Name", "$Name$", def);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Name=Metall
|
||||
Name=Metall
|
||||
|
|
|
@ -1 +1 @@
|
|||
Name=Metal
|
||||
Name=Metal
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
[DefCore]
|
||||
id=COAL
|
||||
Version=4,9,10,10
|
||||
Category=C4D_Material|C4D_Object
|
||||
MaxUserSelect=50
|
||||
Width=8
|
||||
Height=8
|
||||
Offset=-4,-4
|
||||
Picture=0,0,8,8
|
||||
Vertices=2
|
||||
VertexX=0,0
|
||||
VertexY=3,-3
|
||||
VertexFriction=75,75
|
||||
Components=WOOD=2;
|
||||
Value=4
|
||||
Mass=9
|
||||
Rotate=1
|
||||
ContactIncinerate=1
|
||||
BlastIncinerate=5
|
||||
[DefCore]
|
||||
id=COAL
|
||||
Version=4,9,10,10
|
||||
Category=C4D_Material|C4D_Object
|
||||
MaxUserSelect=50
|
||||
Width=8
|
||||
Height=8
|
||||
Offset=-4,-4
|
||||
Picture=0,0,8,8
|
||||
Vertices=2
|
||||
VertexX=0,0
|
||||
VertexY=3,-3
|
||||
VertexFriction=75,75
|
||||
Components=WOOD=2;
|
||||
Value=4
|
||||
Mass=9
|
||||
Rotate=1
|
||||
ContactIncinerate=1
|
||||
BlastIncinerate=5
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#strict 2
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Collectible", 1, def);
|
||||
SetProperty("Name", "Coal", def);
|
||||
}
|
||||
#strict 2
|
||||
|
||||
func Definition(def) {
|
||||
SetProperty("Collectible", 1, def);
|
||||
SetProperty("Name", "Coal", def);
|
||||
}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
[DefCore]
|
||||
id=GOLD
|
||||
Version=4,10,0,0
|
||||
Category=C4D_Object|C4D_SelectMaterial
|
||||
MaxUserSelect=100
|
||||
Width=6
|
||||
Height=6
|
||||
Offset=-3,-3
|
||||
Vertices=3
|
||||
VertexX=0,1,-1
|
||||
VertexY=1,-1,-1
|
||||
VertexFriction=40,40,40
|
||||
Value=25
|
||||
Mass=12
|
||||
Components=GOLD=1
|
||||
Rebuy=0
|
||||
Rotate=1
|
||||
StretchGrowth=1
|
||||
Oversize=1
|
||||
[DefCore]
|
||||
id=GOLD
|
||||
Version=4,10,0,0
|
||||
Category=C4D_Object|C4D_SelectMaterial
|
||||
MaxUserSelect=100
|
||||
Width=6
|
||||
Height=6
|
||||
Offset=-3,-3
|
||||
Vertices=3
|
||||
VertexX=0,1,-1
|
||||
VertexY=1,-1,-1
|
||||
VertexFriction=40,40,40
|
||||
Value=25
|
||||
Mass=12
|
||||
Components=GOLD=1
|
||||
Rebuy=0
|
||||
Rotate=1
|
||||
StretchGrowth=1
|
||||
Oversize=1
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue