Exemple #1
0
        // Function from file: transfer_valve.dm
        public override bool update_icon(dynamic new_state = null, dynamic new_icon = null, int?new_px = null, int?new_py = null)
        {
            Icon J = null;

            this.overlays.Cut();
            this.underlays = null;

            if (!Lang13.Bool(this.tank_one) && !Lang13.Bool(this.tank_two) && !Lang13.Bool(this.attached_device))
            {
                this.icon_state = "valve_1";
                return(false);
            }
            this.icon_state = "valve";

            if (Lang13.Bool(this.tank_one))
            {
                this.overlays.Add("" + this.tank_one.icon_state);
            }

            if (Lang13.Bool(this.tank_two))
            {
                J = new Icon(this.icon, "" + this.tank_two.icon_state);
                J.Shift(GlobalVars.WEST, 13);
                this.underlays.Add(J);
            }

            if (Lang13.Bool(this.attached_device))
            {
                this.overlays.Add("device");
            }
            return(false);
        }