-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* incineryy * first * powerFist * i am stupid * Update code/modules/paperwork/paperbin.dm Co-authored-by: EgorDinamit <[email protected]> * hotfix * microlaser to scanner port * hotfix --------- Co-authored-by: EgorDinamit <[email protected]>
- Loading branch information
1 parent
196c272
commit 87bde44
Showing
13 changed files
with
290 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/obj/item/device/scanner/health/radioactive_microlaser //a health scanner that will give you aids and radiation | ||
origin_tech = list(TECH_MATERIAL = 2, TECH_ESOTERIC = 5) | ||
var/rads = 100 | ||
var/cooldown //when it will be ready to dispense rads | ||
var/delay = 4 SECONDS //how long we need to wait until we can dispense rads | ||
var/microlaserLevel = 1 | ||
|
||
/obj/item/device/scanner/health/radioactive_microlaser/examine(mob/user, distance) | ||
. = ..() | ||
if(istraitor(user) || user.skill_check(SKILL_MEDICAL, SKILL_TRAINED) || user.skill_check(SKILL_DEVICES, SKILL_TRAINED)) | ||
to_chat(user, "It might seem like a normal health analyzer, but you noticed a few differences here and there.") | ||
to_chat(user, "There's a dial on the side, it seems to be set to the number [microlaserLevel]. You can use <b>alt-click</b> to change the level.") | ||
|
||
/obj/item/device/scanner/health/radioactive_microlaser/scan(atom/A, mob/user) | ||
. = ..() | ||
if(cooldown > world.time) | ||
to_chat(user, SPAN_WARNING("<b>\The [src] is not yet done cooling down!</b>")) | ||
return | ||
if(isliving(A)) | ||
scan_data = medical_scan_action(A, user, src, mode) | ||
playsound(src, 'sound/effects/fastbeep.ogg', 20) | ||
SSradiation.radiate(A, rads) | ||
cooldown = world.time + delay | ||
return | ||
|
||
/obj/item/device/scanner/health/radioactive_microlaser/AltClick(mob/user) | ||
. = ..() | ||
switch(microlaserLevel) | ||
if(1) | ||
microlaserLevel = 2 | ||
playsound(src, 'sound/effects/flashlight.ogg', 20, extrarange = 2) | ||
to_chat(user, SPAN_NOTICE("You set \the [src] to level 2.")) | ||
rads = 200 | ||
delay = 40 SECONDS | ||
if(2) | ||
microlaserLevel = 3 | ||
playsound(src, 'sound/effects/flashlight.ogg', 20, extrarange = 2) | ||
to_chat(user, SPAN_NOTICE("You set \the [src] to level 3.")) | ||
rads = 300 | ||
delay = 1 MINUTE | ||
if(3) | ||
microlaserLevel = 1 | ||
playsound(src, 'sound/effects/flashlight.ogg', 20, extrarange = 2) | ||
to_chat(user, SPAN_NOTICE("You set \the [src] back to level 1.")) | ||
rads = 100 | ||
delay = 20 SECONDS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
///Defines for the pressure strength of the fist | ||
#define LOW_PRESSURE 1 | ||
#define MID_PRESSURE 2 | ||
#define HIGH_PRESSURE 3 | ||
|
||
/obj/item/melee/powerfist | ||
name = "power-fist" | ||
desc = "A metal gauntlet with a gas-powered piston ram ontop for that extra 'ompfh' in your punch." | ||
icon = 'icons/obj/weapons/melee_physical.dmi' | ||
icon_state = "powerfist" | ||
item_state = "powerfist" | ||
attack_verb = list("whacked", "power-fisted", "power-punched") | ||
force = 10 | ||
throwforce = 10 | ||
throw_range = 7 | ||
w_class = ITEM_SIZE_LARGE //its a damn power fist, its big | ||
var/fist_pressure_setting = LOW_PRESSURE | ||
var/gas_per_fist = 20 //amount of shit to use on pawnch, scales with pressure setting | ||
var/obj/item/tank/tank | ||
|
||
/obj/item/melee/powerfist/proc/pressure_setting_to_text(fist_pressure_setting) | ||
switch(fist_pressure_setting) | ||
if(LOW_PRESSURE) | ||
return "low" | ||
if(MID_PRESSURE) | ||
return "medium" | ||
if(HIGH_PRESSURE) | ||
return "high" | ||
else | ||
CRASH("Invalid pressure setting: [fist_pressure_setting]!") | ||
|
||
/obj/item/melee/powerfist/examine(mob/user, distance) | ||
. = ..() | ||
if(distance <= 1) | ||
if(tank) | ||
to_chat(user, SPAN_NOTICE("[icon2html(tank, user)] It has \a <b>[tank]</b> mounted on it.")) | ||
to_chat(user, SPAN_NOTICE("It can be removed with a <b>screwdriver</b>.")) | ||
else | ||
to_chat(user, "You'll need to get closer to see any more.") | ||
return | ||
to_chat(user, SPAN_NOTICE("Use a <b>wrench</b> to change the valve strength. Current strength is at <b>[pressure_setting_to_text(fist_pressure_setting)]</b> level.")) | ||
|
||
|
||
/obj/item/melee/powerfist/attackby(obj/item/W, mob/user) | ||
. = ..() | ||
if(istype(W, /obj/item/tank)) | ||
if(!user.unEquip(W, src)) //for some reason this allows it to actually move, hilarious | ||
return | ||
tank = W | ||
W.forceMove(src) | ||
to_chat(user, SPAN_NOTICE("You insert \the [W] into \the [src].")) | ||
return | ||
|
||
if(isScrewdriver(W)) | ||
if(tank) | ||
tank.forceMove(get_turf(user)) | ||
user.put_in_hands(tank) | ||
to_chat(user, SPAN_NOTICE("You detach \the [tank] from \the [src].")) | ||
tank = null | ||
else | ||
to_chat(user, SPAN_WARNING("No tank present!")) | ||
return | ||
|
||
if(isWrench(W)) | ||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) | ||
fist_pressure_setting = fist_pressure_setting >= HIGH_PRESSURE ? LOW_PRESSURE : fist_pressure_setting + 1 | ||
to_chat(user, SPAN_NOTICE("Piston strength set to [pressure_setting_to_text(fist_pressure_setting)]!")) | ||
return | ||
|
||
/obj/item/melee/powerfist/attack(mob/living/M, mob/living/user, target_zone, animate) | ||
. = ..() | ||
if(!user.a_intent == I_HURT) | ||
return | ||
if(!tank) | ||
to_chat(user, SPAN_WARNING("\The [src] doesn't have a tank!")) | ||
return | ||
var/affecting = user.get_organ_target() | ||
if(tank.air_contents.total_moles >= gas_per_fist*fist_pressure_setting) | ||
tank.air_contents.remove_volume(gas_per_fist*fist_pressure_setting) | ||
M.apply_damage(force*2*fist_pressure_setting, BRUTE, affecting) //might be a little too op... Too bad! | ||
return | ||
else | ||
src.visible_message(SPAN_WARNING("\The [src] lets out a dull hiss...")) | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.