Advertisement
DManstrator

Miss Conkit 2013

Aug 19th, 2013
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. /*--- Originaler Conkit ---*/
  2.  
  3. protected func CreateConstructionSite(idType)
  4. {
  5. // Nur wenn der Clonk steht und sich im Freien befindet
  6. if (GetAction(Contained()) ne "Walk") return(0);
  7. if (Contained(Contained())) return(0);
  8. // Pruefen, ob das Gebaeude hier gebaut werden kann
  9. if (idType->~RejectConstruction(0, 10, Contained()) ) return(0);
  10. // Besitzer setzen für CreateConstruction
  11. SetOwner(GetOwner(Contained()));
  12. // Baustelle erschaffen
  13. var pSite;
  14. if (!(pSite = CreateConstruction(idType, 0, 10, GetOwner(Contained()), 1, 1,1))) return(0);
  15. // Meldung
  16. Message("$TxtConstructions$", Contained(), GetName(pSite));
  17. // Bausatz verbrauchen
  18. RemoveObject();
  19. return(1);
  20. }
  21.  
  22.  
  23. /*--- Neuer Conkit ---*/
  24.  
  25. protected func CreateConstructionSite(idType)
  26. {
  27. // Nur wenn der Clonk steht und sich im Freien befindet
  28. if (GetAction(Contained()) ne "Walk") return(0);
  29. if (Contained(Contained())) return(0);
  30. // Pruefen, ob das Gebaeude hier gebaut werden kann
  31. if (idType->~RejectConstruction(0, 10, Contained()) ) return(0);
  32. // Besitzer setzen für CreateConstruction
  33. SetOwner(GetOwner(Contained()));
  34. // Baustelle erschaffen
  35. var pSite;
  36. if (!(pSite = CreateConstruction(idType, 0, 10, GetOwner(Contained()), 1, 1,1))) return(0);
  37. if (!fConkit[GetPlayerTeam(GetOwner())])
  38. if (AddEffect("FirstBuilding", pSite, 200, 20, 0, CNKT))
  39. fConkit[GetPlayerTeam(GetOwner())]=true;
  40. // Meldung
  41. Message("$TxtConstructions$", Contained(), GetName(pSite));
  42. // Bausatz verbrauchen
  43. RemoveObject();
  44. return(1);
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement