forked from NebulaSS13/Nebula
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from NebulaSS13/dev
Updating Pyrelight from Neb dev.
- Loading branch information
Showing
347 changed files
with
4,437 additions
and
3,291 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
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
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,38 @@ | ||
// A subtype for items that can dismantle/demolish non-reinforced non-natural walls. | ||
/datum/extension/demolisher | ||
base_type = /datum/extension/demolisher | ||
expected_type = /obj/item | ||
var/demolish_delay = 6 SECONDS | ||
var/demolish_verb | ||
var/demolish_sound | ||
|
||
/datum/extension/demolisher/New(datum/holder, _delay, _verb, _sound) | ||
. = ..() | ||
if(_delay) | ||
demolish_delay = _delay | ||
if(_verb) | ||
demolish_verb = _verb | ||
if(_sound) | ||
demolish_sound = _sound | ||
|
||
/datum/extension/demolisher/proc/get_demolish_delay(turf/wall/wall) | ||
return demolish_delay + wall?.get_material()?.cut_delay | ||
|
||
/datum/extension/demolisher/proc/get_demolish_verb() | ||
return demolish_verb | ||
|
||
/datum/extension/demolisher/proc/get_demolish_sound() | ||
return demolish_sound | ||
|
||
/datum/extension/demolisher/proc/try_demolish(mob/user, turf/wall/wall) | ||
var/dismantle_verb = get_demolish_verb() | ||
var/dismantle_sound = get_demolish_sound() | ||
to_chat(user, SPAN_NOTICE("You begin [dismantle_verb] \the [wall].")) | ||
if(dismantle_sound) | ||
playsound(wall, dismantle_sound, 100, 1) | ||
var/cut_delay = max(0, get_demolish_delay(wall)) | ||
if(do_after(user, cut_delay, wall)) | ||
to_chat(user, SPAN_NOTICE("You finish [dismantle_verb] \the [wall].")) | ||
user.visible_message(SPAN_DANGER("\The [user] finishes [dismantle_verb] \the [wall]!")) | ||
wall.dismantle_turf() | ||
return TRUE |
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,13 @@ | ||
/datum/extension/demolisher/delicate | ||
demolish_verb = "dismantling" | ||
demolish_sound = 'sound/items/Crowbar.ogg' | ||
var/alternative_tools = "a sledgehammer or welding torch" // For overriding on medieval maps. | ||
|
||
/datum/extension/demolisher/delicate/try_demolish(mob/user, turf/wall/wall) | ||
if(!(wall.get_material()?.removed_by_welder)) | ||
return ..() | ||
to_chat(user, SPAN_WARNING("\The [wall] is too robust to be dismantled with \the [holder]; try [alternative_tools].")) | ||
return TRUE | ||
|
||
/datum/extension/demolisher/delicate/get_demolish_delay(turf/wall/wall) | ||
return ..() * 1.2 |
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,16 @@ | ||
/datum/extension/demolisher/energy | ||
demolish_sound = "sparks" | ||
demolish_verb = "slicing through" | ||
|
||
/datum/extension/demolisher/energy/try_demolish(mob/user, turf/wall/wall) | ||
var/obj/item/tool = holder | ||
if(!tool.is_special_cutting_tool()) | ||
return FALSE | ||
if(istype(tool, /obj/item/gun/energy/plasmacutter)) | ||
var/obj/item/gun/energy/plasmacutter/cutter = tool | ||
if(!cutter.slice(user)) | ||
return TRUE | ||
return ..() | ||
|
||
/datum/extension/demolisher/energy/get_demolish_delay(turf/wall/wall) | ||
return ..() * 0.5 |
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,22 @@ | ||
/datum/extension/demolisher/pick | ||
demolish_verb = "dismantling" | ||
demolish_sound = 'sound/items/Crowbar.ogg' | ||
|
||
/datum/extension/demolisher/pick/try_demolish(mob/user, turf/wall/wall) | ||
var/obj/item/pick = holder | ||
if(pick.material?.hardness < wall.get_material()?.hardness) | ||
to_chat(user, SPAN_WARNING("\The [holder] is not hard enough to cut through [wall.get_material().solid_name].")) | ||
return TRUE | ||
return ..() | ||
|
||
/datum/extension/demolisher/pick/get_demolish_delay(turf/wall/wall) | ||
var/obj/item/pick = holder | ||
return pick.get_expected_tool_use_delay(TOOL_PICK, ..()) | ||
|
||
/datum/extension/demolisher/pick/get_demolish_verb() | ||
var/obj/item/pick = holder | ||
return pick.get_tool_message(TOOL_PICK) | ||
|
||
/datum/extension/demolisher/pick/get_demolish_sound() | ||
var/obj/item/pick = holder | ||
return pick.get_tool_sound(TOOL_PICK) |
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,16 @@ | ||
/datum/extension/demolisher/welder | ||
demolish_verb = "cutting through" | ||
demolish_sound = 'sound/items/Welder.ogg' | ||
expected_type = /obj/item/weldingtool | ||
|
||
/datum/extension/demolisher/welder/try_demolish(mob/user, turf/wall/wall) | ||
if(!(wall.get_material()?.removed_by_welder)) | ||
to_chat(user, SPAN_WARNING("\The [wall] is too delicate to be dismantled with \the [holder]; try a hammer or crowbar.")) | ||
return TRUE | ||
var/obj/item/weldingtool/welder = holder | ||
if(welder.weld(0,user)) | ||
return ..() | ||
return TRUE | ||
|
||
/datum/extension/demolisher/welder/get_demolish_delay(turf/wall/wall) | ||
return ..() * 0.7 |
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.