Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

holyshish #60

Merged
merged 1 commit into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Content.Server/Body/Systems/RespiratorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ public override void Update(float frameTime)
if (_mobState.IsDead(uid))
continue;

//_bodySystem.GetBodyOrgans<(EntityUid euid, LungComponent lc)>(uid, body);
//_bodySystem.
var organs = _bodySystem.GetBodyOrganComponents<LungComponent>(uid, body);
if(organs==null){
continue;
}

UpdateSaturation(uid, -(float) respirator.UpdateInterval.TotalSeconds, respirator);

if (!_mobState.IsIncapacitated(uid)) // cannot breathe in crit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- type: GuideHelp
guides:
- Security

- type: entity
name: seclite
parent: FlashlightSeclite
Expand Down Expand Up @@ -57,7 +57,7 @@
- type: GuideHelp
guides:
- Security

- type: entity
parent: WeaponEnergyGunMini
id: WeaponEnergyGunMiniRecharging
Expand All @@ -66,7 +66,7 @@
- type: BatterySelfRecharger
autoRecharge: true
autoRechargeRate: 10

- type: entity
parent: HoloprojectorSecurity
id: HoloprojectorSecurityRecharging
Expand All @@ -84,7 +84,7 @@
suffix: Lingering
components:
- type: Stack
stackType: Handcuffs
stackType: HandcuffsSt
baseLayer: handcuff
layerStates:
- handcuff
Expand All @@ -97,9 +97,9 @@
suffix: Lingering
components:
- type: Stack
stackType: Zipties
stackType: ZiptiesSt
baseLayer: cuff
layerStates:
- cuff
lingering: true
count: 15
count: 15
14 changes: 14 additions & 0 deletions Resources/Prototypes/Stray/Stack/other_stacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,17 @@
icon: { sprite: Objects/Misc/bureaucracy.rsi, state: paper }
spawn: SheetPrinter1
maxCount: 1

- type: stack
id: HandcuffsSt
name: Наручники
icon: { sprite: /Textures/Objects/Misc/handcuffs.rsi, state: handcuff }
spawn: HandcuffsLingering
maxCount: 15

- type: stack
id: ZiptiesSt
name: Стяжки
icon: { sprite: /Textures/Objects/Misc/zipties.rsi, state: cuff}
spawn: ZiptiesLingering
maxCount: 15
42 changes: 38 additions & 4 deletions Resources/Textures/Shaders/drunk.swsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,52 @@ const highp float DistortionScale = 0.01;

void fragment() {

highp float mod = mix(0.0, DistortionScale, boozePower);
highp vec2 aspect = vec2(1.0/SCREEN_PIXEL_SIZE.x, 1.0/SCREEN_PIXEL_SIZE.y);
highp float mod = mix(0.0, DistortionScale, boozePower);
highp vec2 coord = FRAGCOORD.xy * SCREEN_PIXEL_SIZE.xy;
highp float centergradient = boozePower/5;
highp float time = TIME * TimeScale;
highp float timesin = (sin(TIME * TimeScale) + 0.5) * 0.2;
highp float timecos = (cos(TIME * TimeScale) + 0.5) * 0.2;

//centergradient = zCircleGradient(aspect, FRAGCOORD.xy, 0.1, 3 / 1, 0.01 / 1, 1);

highp vec2 offset = vec2((mod * 1.5) * sin(time * 1.5), (mod * 2.0) * cos(time * 1.5 - 0.2));
offset += vec2((zFBM(coord * boozePower + timesin) - 0.5) * centergradient/2, (zFBM(coord * boozePower + timecos) - 0.5) * centergradient/2);

highp vec4 tex1 = zTextureSpec(SCREEN_TEXTURE, coord + offset);

if (boozePower > 0.5) {
offset = vec2((mod * 2.0 - DistortionScale) * sin(time * 0.333 - 0.2), (mod * 2.0 - DistortionScale) * cos(time * 0.333));
offset += vec2((zFBM(coord * boozePower *5 + timesin) - 0.5) * centergradient, (zFBM(coord * boozePower*5 + timecos) - 0.5) * centergradient);
tex1 = mix(tex1, zTextureSpec(SCREEN_TEXTURE, coord + offset), mix(0.0, 0.3, boozePower*2.0-1.0));
}

//highp vec3 col = vec3(0);
//if(boozePower>0.75){
// //col += zTextureSpec(SCREEN_TEXTURE, -coord );
// //col += texture(SCREEN_TEXTURE, vec2(UV.x,-UV.y)).xyz * (boozePower-0.75);
// //col += texture(SCREEN_TEXTURE, vec2(-UV.x,UV.y)).xyz * (boozePower-0.75);
// //col += texture(SCREEN_TEXTURE, vec2(UV.x,UV.y)).xyz * (boozePower-0.75);
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x+-10, offset.y)).xyz * 0.15;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x+ 10, offset.y)).xyz * 0.15;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x+-20,offset.y)).xyz * 0.12;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x+ 20,offset.y)).xyz * 0.12;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x+-30,offset.y)).xyz * 0.09;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x+ 30,offset.y)).xyz * 0.09;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x+-40,offset.y)).xyz * 0.05;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x+ 40,offset.y)).xyz * 0.05;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x, offset.y+-10)).xyz * 0.15;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x, offset.y+ 10)).xyz * 0.15;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x, offset.y+-20)).xyz * 0.12;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x, offset.y+ 20)).xyz * 0.12;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x, offset.y+-30)).xyz * 0.09;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x, offset.y+ 30)).xyz * 0.09;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x, offset.y+-40 )).xyz * 0.05;
// col += texture(SCREEN_TEXTURE, UV + vec2(offset.x, offset.y+ 40 )).xyz * 0.05;
//}

offset = vec2((mod * 1.0) * sin(time * 1.0 + 0.1), (mod * 1.0) * cos(time * 1.0));
COLOR = mix(tex1, zTextureSpec(SCREEN_TEXTURE, coord + offset), mix(0.0, 0.5, boozePower));
offset += vec2((zFBM(coord * boozePower + timesin) - 0.5) * centergradient, (zFBM(coord * boozePower + timecos) - 0.5) * centergradient);

COLOR = mix(tex1, zTextureSpec(SCREEN_TEXTURE, coord + offset), mix(0.0, 0.5, boozePower));//+vec4(vec3(col),max(0,boozePower-0.75))/5;
}
Loading