Implement torch

This commit is contained in:
2022-07-14 01:11:48 +01:00
parent 2a5b512d61
commit bfe9073808
4 changed files with 21 additions and 4 deletions
+15 -1
View File
@@ -54,7 +54,7 @@ heldItemSPic :: HeldItemType -> Item -> SPic
heldItemSPic ht it = case ht of
FLATSHIELD -> flatShieldEquipSPic
FORCEFIELDGUN -> defSPic
TORCH -> defSPic
TORCH -> noPic $ torchShape
BANGSTICK i -> noPic $ baseStickShapeX it i <> stickClip it
PISTOL -> noPic $ baseStickShape <> makeTinClipAt pi (V3 5 2 0) it
REVOLVER -> noPic $ baseStickShape <> revolverClip it
@@ -102,6 +102,20 @@ heldItemSPic ht it = case ht of
SHATTERGUN -> shatterGunSPic
HELDDETECTOR dt -> noPic (colorSH (detectorColor dt) $ upperPrismPoly 3 $ rectWH 2 2)
torchShape :: Shape
torchShape = colorSH blue
$ translateSHf 0 1.5 side
<> translateSHf 0 (-1.5) side
<> translateSHz 2.5 top
<> translateSHz (-0.5) bot
<> translateSHf (-3) 0 back
where
side = upperPrismPoly 3 $ rectXH 10 0.5
top = upperPrismPoly 0.5 $ rectXH 10 2
bot = upperPrismPoly 0.5 $ rectXH 9 2
back = upperPrismPoly 3 $ rectXH 1 2
modulesSPic :: Item -> SPic
modulesSPic _ = mempty