Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

E2: wiring - allow entity:wirelink() on other ENTS #184

Merged
merged 2 commits into from

2 participants

@natrim

E2: wiring - allow entity:wirelink() on other ENTS that have outputs or inputs

  • fixes CAF wirelink problem

E2 wiring: dont need inputs and outputs on dewiring

  • fixes being not able to dewire when ENT removes inputs/outputs
@Nebual Nebual merged commit 9fd9b4d into wiremod:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 16, 2012
  1. @natrim

    E2: wiring - allow entity:wirelink() on other ENTS

    natrim authored natrim committed
     that have outputs or inputs
     - fixes CAF wirelink problem
  2. @natrim

    E2 wiring: dont need inputs and outputs on dewiring

    natrim authored natrim committed
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 3 deletions.
  1. +2 −3 lua/entities/gmod_wire_expression2/core/custom/wiring.lua
View
5 lua/entities/gmod_wire_expression2/core/custom/wiring.lua
@@ -101,7 +101,7 @@ __e2setcost(25)
e2function wirelink entity:wirelink()
if not IsValid(this) then return nil end
if not isOwner(self, this) then return nil end
- if not this.IsWire then return nil end -- dont do it on non-wire
+ if not this.Inputs and not this.Outputs then return nil end
if !this.extended then
this.extended = true
RefreshSpecialOutputs(this)
@@ -113,11 +113,10 @@ end
e2function number entity:removeWirelink()
if not IsValid(this) then return 0 end
if not isOwner(self, this) then return 0 end
- if not this.IsWire then return 0 end -- dont do it on non-wire
if !this.extended then return 0 end
this.extended = false
RefreshSpecialOutputs(this)
return 1
end
-__e2setcost(nil) -- temporary
+__e2setcost(nil)
Something went wrong with that request. Please try again.