Skip to content

Commit

Permalink
Devil game mode
Browse files Browse the repository at this point in the history
Fixes more compile errors.  Down to 65 now.

updates << into to_chat

Down to 60 errors, also starts to port the codex gigas and law 666 for cyborg devils.

Fixes more compile errors.  Down to 41 now.

Replaces timers with spawns, and <<s with to_chats
40 compile errors.

Down to 34 compile errors.

whoops, actually down to 34 now.

Down to 25 compile errors.

Down to 15 compile errors, I'llprobably need some help at this point.

Woo!  Down to 7 compile errors.

Ported over devil hud.  Number of errors up to 19.

WOO!  It compiles.  It's completely untested, but it compiles.

Adds devils to traitor panel

Implements iron, silver and salt banes.

implements flashing lights bane

Selling your soul prevents cloning, and some other methods of revival.

Implements harvest bane

Merged and sorted icons/obj/bureaucracy.dmi

Adds toy codex gigas

Fixes compile errors, adds codex gigas sprite.

Lots of bug fixes.  Contracts work, devil revival is more consistant, etc

Adds missing icons for flaming contracts, summon pitchfork, summon wealth, employment cabinet, and sintouch.

Converts DEEP LORE explanations from hell to inferno incorporated.

Banishes the compile errors.

Devils come from hell again.

replaces offer drink obligation with a much more lore appropriate devil's fiddle reference
Also fixes contract bashing brain damage chance.

Undoes some changes I accidentally did to example config files.

Fixes up a few remaining bugs.

Puts in the codex gigas and employment contract cabinets.
 -- Lemon - I kinda skipped this one, I'll patch it back in later because
 map conflicts are suffering incarnate

Solves the devil law problem in a REALLY hacky snowflake way.

Fixes a few methods in which a hellbound can be revived.

Devils respawn with a limited number of appropriate items, instead of COMPLETELY naked upon corpse destruction.  Also adds lines to example config.

Updates devil laws to be less hacky.

Objective to sintouch x mortals now greentexts correctly.

Contracts no longer cause brain damage.  I didn't realize it was lethal on this codebase.  Oops.

Splits dust(visual_only) into dust() and dust_animation() procs

Fixes some defines.
Adds undef statements to improve compile times.

Fixes race changes from demonic form changes.

Fixes small runtime error. (Which somehow didn't break anything?)

Implements lots of small changes/corrections suggested by CrazyLemon64

I still need to test these changes, along with other potential issues he brought up.

Fixes harvest bane and power contracts.  Also adds a few </span> tag enders.

Corrects some edge cases with revival contracts.

Fixes compile error.

Reverts unneccecary change to item/weapon/reagent_containers

Cleans up the code for readability.

Prevents cloning of hellbound individuals.

Latejoins now properly have employment contracts added to employment cabinets (provided they still exist)

Infernal contracts are no longer rendered unreadable by fire and alcohol.

All fireproof paper remains readable after being fireballed, not just infernal contracts.  (Though infernal contracts are the only fireproof paper atm)

Fixes an edge case problem with cloning.

Adds is_revivable proc to mind.

Removes snowflake code involving preventing soulseller resurrection.

Indulges in the sin of sloth, and copies tg's lazy list macros

Proc calls that transform the user no longer go to a null target

Fixes devil UI, human regression will keep appearance, and adds danceoff

Devil's base forms no longer suffocate inside the devil

Fixes runtimes, gets stuff working

The arch devil can now blast down walls with their pitchfork

EXTERMINATE ALL SPIRITS

Activates devil clause in voice of god

Fawks Mcclood

Feature P A R I T Y

Fixes devil bugs from testing

- Does a death refactor to make sure that diabolical resurrection works

- Walls no longer leave girders when blasted by the devil

- Getting a new body gives you a rudimentary amount of equipment to work
with to get out of maintenance or whereever

Does all the icons in a single commit on their own because icon

conflicts suck

Starting point of extra devil rebalance/fixes

Ports devil friends

Also oops tramples all over Fethas' corpse PR that's still up I need
to take care of that one

Styling fixes
  • Loading branch information
lordpidey authored and alex-gh committed Jan 13, 2019
1 parent 95be219 commit 29c9aca
Show file tree
Hide file tree
Showing 101 changed files with 4,248 additions and 142 deletions.
57 changes: 57 additions & 0 deletions code/__DEFINES/contracts.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#define CONTRACT_POWER "Power"
#define CONTRACT_WEALTH "Wealth"
#define CONTRACT_PRESTIGE "Prestige"
#define CONTRACT_MAGIC "Magic"
#define CONTRACT_REVIVE "Revive"
#define CONTRACT_KNOWLEDGE "Knowledge"
#define CONTRACT_UNWILLING "Unwilling"
// FIXME: Implement these
#define CONTRACT_ETALENT "Engineering Talent"
#define CONTRACT_CTALENT "Chemistry Talent"
#define CONTRACT_RETURNDEAD "Return Dead"
#define CONTRACT_AUGMENT "Cybernetic Augmentations"
#define CONTRACT_CANDY "Endless Candy"
#define CONTRACT_ECHANCE "An Extra Chance"
#define CONTRACT_ATECH "Advanced Technology"
#define CONTRACT_DEVILSMACHINE "Devil's Machinery"
#define CONTRACT_YOUTH "Eternal Youth"
#define CONTRACT_FOOD "Food"
#define CONTRACT_SPACE "Space Gear"
#define CONTRACT_CALAMITY "Calamity"

#define BANE_SALT "salt"
#define BANE_LIGHT "light"
#define BANE_IRON "iron"
#define BANE_WHITECLOTHES "whiteclothes"
#define BANE_SILVER "silver"
#define BANE_HARVEST "harvest"
#define BANE_TOOLBOX "toolbox"

#define OBLIGATION_FOOD "food"
#define OBLIGATION_FIDDLE "fiddle"
#define OBLIGATION_DANCEOFF "danceoff"
#define OBLIGATION_GREET "greet"
#define OBLIGATION_PRESENCEKNOWN "presenceknown"
#define OBLIGATION_SAYNAME "sayname"
#define OBLIGATION_ANNOUNCEKILL "announcekill"
#define OBLIGATION_ANSWERTONAME "answername"

#define BAN_HURTWOMAN "hurtwoman"
#define BAN_HURTMAN "hurtman"
#define BAN_CHAPEL "chapel"
#define BAN_HURTPRIEST "hurtpriest"
#define BAN_AVOIDWATER "avoidwater"
#define BAN_STRIKEUNCONCIOUS "strikeunconcious"
#define BAN_HURTLIZARD "hurtlizard"
#define BAN_HURTANIMAL "hurtanimal"

#define BANISH_WATER "water"
#define BANISH_COFFIN "coffin"
#define BANISH_FORMALDYHIDE "embalm"
#define BANISH_RUNES "runes"
#define BANISH_CANDLES "candles"
#define BANISH_DESTRUCTION "destruction"
#define BANISH_FUNERAL_GARB "funeral"

#define LORE 1
#define LAW 2
3 changes: 2 additions & 1 deletion code/__DEFINES/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@
#define ANTAG_HUD_VAMPIRE 17
#define ANTAG_HUD_ABDUCTOR 18
#define DATA_HUD_ABDUCTOR 19
#define ANTAG_HUD_DEVIL 20

// Notification action types
#define NOTIFY_JUMP "jump"
#define NOTIFY_ATTACK "attack"
#define NOTIFY_FOLLOW "orbit"
#define NOTIFY_FOLLOW "orbit"
10 changes: 10 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@

#define STATUS_UPDATE_NONE 0
#define STATUS_UPDATE_ALL (~0)
#define INVISIBILITY_ABSTRACT 101

#define isliving(A) (istype((A), /mob/living))
#define iscarbon(A) (istype((A), /mob/living/carbon))
#define ishuman(A) (istype((A), /mob/living/carbon/human))
#define isbrain(A) (istype((A), /mob/living/carbon/brain))
#define isalien(A) (istype((A), /mob/living/carbon/alien))
#define isalienadult(A) (istype((A), /mob/living/carbon/alien/humanoid))
#define islarva(A) (istype((A), /mob/living/carbon/alien/larva))
#define isslime(A) (istype((A), /mob/living/carbon/slime))
#define UNHEALING_EAR_DAMAGE 100

//Human sub-species
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#define ROLE_REVENANT "revenant"
#define ROLE_HOG_GOD "hand of god: god" // We're prolly gonna port this one day or another
#define ROLE_HOG_CULTIST "hand of god: cultist"
#define ROLE_DEVIL "devil"
#define ROLE_RAIDER "vox raider"
#define ROLE_TRADER "trader"
#define ROLE_VAMPIRE "vampire"
Expand Down Expand Up @@ -73,4 +74,5 @@ var/global/list/special_roles = list(
ROLE_MORPH,
ROLE_TRADER,
ROLE_GSPIDER,
ROLE_DEVIL = /datum/game_mode/devil/devil_agents,
)
2 changes: 1 addition & 1 deletion code/__HELPERS/lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -791,4 +791,4 @@ proc/dd_sortedObjectList(list/incoming)
while(start < end)
L.Swap(start++, end--)

return L
return L
8 changes: 8 additions & 0 deletions code/_globalvars/lists/devil.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//what could possibly go wrong
var/list/devil_machines = typecacheof(/obj/item/circuitboard, TRUE) - list(
/obj/item/circuitboard/shuttle,
/obj/item/circuitboard/swfdoor,
/obj/item/circuitboard/olddoor,
/obj/item/circuitboard/computer,
/obj/item/circuitboard/machine
)
1 change: 1 addition & 0 deletions code/_onclick/hud/_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
//Middle left indicators
#define ui_lingchemdisplay "WEST:6,CENTER-1:15"
#define ui_lingstingdisplay "WEST:6,CENTER-3:11"
#define ui_devilsouldisplay "WEST:6,CENTER-1:15"

//Lower center, persistant menu
#define ui_sstore1 "CENTER-5:10,SOUTH:5"
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/alien.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
inv_slots[inv.slot_id] = inv
inv.update_icon()

/datum/hud/alien/persistant_inventory_update()
/datum/hud/alien/persistent_inventory_update()
if(!mymob)
return
var/mob/living/carbon/alien/humanoid/H = mymob
Expand Down
89 changes: 89 additions & 0 deletions code/_onclick/hud/devil.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@

//Soul counter is stored with the humans, it does weird when you place it here apparently...


/datum/hud/devil/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
..()

var/obj/screen/using
var/obj/screen/inventory/inv_box

using = new /obj/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drop_throw
static_inventory += using

mymob.pullin = new /obj/screen/pull()
mymob.pullin.icon = ui_style
mymob.pullin.update_icon(mymob)
mymob.pullin.screen_loc = ui_pull_resist
static_inventory += mymob.pullin

inv_box = new /obj/screen/inventory/hand()
inv_box.name = "right hand"
inv_box.icon = ui_style
inv_box.icon_state = "hand_r"
inv_box.screen_loc = ui_rhand
inv_box.slot_id = slot_r_hand
static_inventory += inv_box

inv_box = new /obj/screen/inventory/hand()
inv_box.name = "left hand"
inv_box.icon = ui_style
inv_box.icon_state = "hand_l"
inv_box.screen_loc = ui_lhand
inv_box.slot_id = slot_l_hand
static_inventory += inv_box

using = new /obj/screen/swap_hand()
using.name = "hand"
using.icon = ui_style
using.icon_state = "swap_1"
using.screen_loc = ui_swaphand1
using.layer = 19
static_inventory += using

using = new /obj/screen/swap_hand()
using.name = "hand"
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand2
using.layer = 19
static_inventory += using

mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = ui_style
mymob.zone_sel.update_icon(mymob)

lingchemdisplay = new /obj/screen/ling/chems()
devilsouldisplay = new /obj/screen/devil/soul_counter
infodisplay += devilsouldisplay

for(var/obj/screen/inventory/inv in static_inventory)
if(inv.slot_id)
inv.hud = src
inv_slots[inv.slot_id] = inv
inv.update_icon()


/datum/hud/devil/persistent_inventory_update()
if(!mymob)
return
var/mob/living/carbon/true_devil/D = mymob

if(hud_version != HUD_STYLE_NOHUD)
if(D.r_hand)
D.r_hand.screen_loc = ui_rhand
D.client.screen += D.r_hand
if(D.l_hand)
D.l_hand.screen_loc = ui_lhand
D.client.screen += D.l_hand
else
if(D.r_hand)
D.r_hand.screen_loc = null
if(D.l_hand)
D.l_hand.screen_loc = null

/mob/living/carbon/true_devil/create_mob_hud()
if(client && !hud_used)
hud_used = new /datum/hud/devil(src, ui_style2icon(client.prefs.UI_style))
7 changes: 5 additions & 2 deletions code/_onclick/hud/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
var/obj/screen/move_intent
var/obj/screen/module_store_icon

var/obj/screen/devil/soul_counter/devilsouldisplay

var/list/static_inventory = list() //the screen objects which are static
var/list/toggleable_inventory = list() //the screen objects which can be hidden
var/list/hotkeybuttons = list() //the buttons that can be used via hotkeys
Expand Down Expand Up @@ -79,6 +81,7 @@
alien_plasma_display = null
vampire_blood_display = null
nightvisionicon = null
devilsouldisplay = null

mymob = null
return ..()
Expand Down Expand Up @@ -155,7 +158,7 @@
mymob.client.screen -= infodisplay

hud_version = display_hud_version
persistant_inventory_update()
persistent_inventory_update()
mymob.update_action_buttons(1)
reorganize_alerts()
reload_fullscreen()
Expand All @@ -171,7 +174,7 @@
/datum/hud/proc/hidden_inventory_update()
return

/datum/hud/proc/persistant_inventory_update()
/datum/hud/proc/persistent_inventory_update()
return

//Triggered when F12 is pressed (Unless someone changed something in the DMF)
Expand Down
34 changes: 33 additions & 1 deletion code/_onclick/hud/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,35 @@
var/mob/living/carbon/U = usr
U.unset_sting()

/obj/screen/devil
invisibility = INVISIBILITY_ABSTRACT

/obj/screen/devil/soul_counter
icon = 'icons/mob/screen_gen.dmi'
name = "souls owned"
icon_state = "Devil-6"
screen_loc = ui_devilsouldisplay

/obj/screen/devil/soul_counter/proc/update_counter(souls = 0)
invisibility = 0
maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#FF0000'>[souls]</font></div>"
switch(souls)
if(0,null)
icon_state = "Devil-1"
if(1,2)
icon_state = "Devil-2"
if(3 to 5)
icon_state = "Devil-3"
if(6 to 8)
icon_state = "Devil-4"
if(9 to INFINITY)
icon_state = "Devil-5"
else
icon_state = "Devil-6"

/obj/screen/devil/soul_counter/proc/clear()
invisibility = INVISIBILITY_ABSTRACT

/obj/screen/ling/chems
name = "chemical storage"
icon_state = "power_display"
Expand Down Expand Up @@ -337,6 +366,9 @@
lingstingdisplay = new /obj/screen/ling/sting()
infodisplay += lingstingdisplay

devilsouldisplay = new /obj/screen/devil/soul_counter
infodisplay += devilsouldisplay

mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = ui_style
mymob.zone_sel.update_icon(mymob)
Expand Down Expand Up @@ -393,7 +425,7 @@
if(H.wear_mask) H.wear_mask.screen_loc = null
if(H.head) H.head.screen_loc = null

/datum/hud/human/persistant_inventory_update()
/datum/hud/human/persistent_inventory_update()
if(!mymob)
return
var/mob/living/carbon/human/H = mymob
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
M.lastattacker = user

user.do_attack_animation(M)
M.attacked_by(src, user, def_zone)
. = M.attacked_by(src, user, def_zone)

add_attack_logs(user, M, "Attacked with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])", (M.ckey && force > 0 && damtype != STAMINA) ? null : ATKLOG_ALMOSTALL)

Expand Down
31 changes: 31 additions & 0 deletions code/datums/ai_laws.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
/datum/ai_law/zero/get_index()
return 0

/datum/ai_law/sixsixsix/get_index()
return 666


/datum/ai_laws
var/name = "Unknown Laws"
var/law_header = "Prime Directives"
Expand All @@ -27,9 +31,11 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
var/list/datum/ai_law/inherent_laws = list()
var/list/datum/ai_law/supplied_laws = list()
var/list/datum/ai_law/ion/ion_laws = list()
var/list/datum/ai_law/sixsixsix/devil_laws = list()
var/list/datum/ai_law/sorted_laws = list()

var/state_zeroth = 0
var/list/state_devil = list()
var/list/state_ion = list()
var/list/state_inherent = list()
var/list/state_supplied = list()
Expand Down Expand Up @@ -58,6 +64,9 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen

for(var/ion_law in ion_laws)
sorted_laws += ion_law

for(var/evil_law in devil_laws)
sorted_laws += evil_law

if(zeroth_law)
sorted_laws += zeroth_law
Expand Down Expand Up @@ -117,6 +126,21 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
zeroth_law_borg = null
sorted_laws.Cut()

/datum/ai_laws/proc/set_sixsixsix_law(var/law)
if(!law)
return

for(var/datum/ai_law/AL in devil_laws)
if(AL.law == law)
return

var/new_law = new/datum/ai_law/sixsixsix(law)
devil_laws += new_law
if(state_devil.len < devil_laws.len)
state_devil += 1

sorted_laws.Cut()

/datum/ai_laws/proc/add_ion_law(var/law)
if(!law)
return
Expand Down Expand Up @@ -185,6 +209,9 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen

/datum/ai_law/ion/delete_law(var/datum/ai_laws/laws)
laws.internal_delete_law(laws.ion_laws, laws.state_ion, src)

/datum/ai_law/sixsixsix/delete_law(var/datum/ai_laws/laws)
laws.internal_delete_law(laws.devil_laws, laws.state_devil, src)

/datum/ai_law/inherent/delete_law(var/datum/ai_laws/laws)
laws.internal_delete_law(laws.inherent_laws, laws.state_inherent, src)
Expand All @@ -210,6 +237,10 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
zeroth_law = null
zeroth_law_borg = null

/datum/ai_laws/proc/clear_sixsixsix_laws()
devil_laws.Cut()
sorted_laws.Cut()

/datum/ai_laws/proc/clear_ion_laws()
ion_laws.Cut()
sorted_laws.Cut()
Expand Down
Loading

0 comments on commit 29c9aca

Please sign in to comment.