Skip to content

Commit

Permalink
Merge branch 'master' into lesser_drone_minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben10083 authored Jul 29, 2023
2 parents b4789f4 + 4e8cdad commit 5a66c8a
Show file tree
Hide file tree
Showing 26 changed files with 3,328 additions and 2,269 deletions.
1 change: 1 addition & 0 deletions code/datums/entities/player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player)
note.player_id = id
note.text = note_text
note.date = "[time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")]"
note.round_id = GLOB.round_id
note.is_confidential = is_confidential
note.note_category = note_category
note.is_ban = is_ban
Expand Down
26 changes: 16 additions & 10 deletions code/datums/entities/player_note.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#define NOTE_ROUND_ID(note_entity) note_entity.round_id ? "(ID: [note_entity.round_id])" : ""

/datum/entity/player_note
var/player_id
var/admin_id
var/text
var/date
var/round_id
var/is_ban = FALSE
var/ban_time
var/is_confidential = FALSE
Expand All @@ -19,15 +22,16 @@ BSQL_PROTECT_DATUM(/datum/entity/player_note)
entity_type = /datum/entity/player_note
table_name = "player_notes"
field_types = list(
"player_id"=DB_FIELDTYPE_BIGINT,
"admin_id"=DB_FIELDTYPE_BIGINT,
"text"=DB_FIELDTYPE_STRING_MAX,
"date"=DB_FIELDTYPE_STRING_LARGE,
"is_ban"=DB_FIELDTYPE_INT,
"ban_time"=DB_FIELDTYPE_BIGINT,
"is_confidential"=DB_FIELDTYPE_INT,
"admin_rank"=DB_FIELDTYPE_STRING_MEDIUM,
"note_category" =DB_FIELDTYPE_INT,
"player_id" = DB_FIELDTYPE_BIGINT,
"admin_id" = DB_FIELDTYPE_BIGINT,
"text" = DB_FIELDTYPE_STRING_MAX,
"date" = DB_FIELDTYPE_STRING_LARGE,
"round_id" = DB_FIELDTYPE_BIGINT,
"is_ban" = DB_FIELDTYPE_INT,
"ban_time" = DB_FIELDTYPE_BIGINT,
"is_confidential" = DB_FIELDTYPE_INT,
"admin_rank" = DB_FIELDTYPE_STRING_MEDIUM,
"note_category" = DB_FIELDTYPE_INT,
)

/datum/entity_meta/player_note/on_read(datum/entity/player_note/note)
Expand Down Expand Up @@ -64,6 +68,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player_note)
var/is_ban
var/admin_ckey
var/date
var/round_id
var/ban_time
var/is_confidential
var/admin_rank
Expand All @@ -79,6 +84,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player_note)
"is_ban",
"admin_ckey" = "admin.ckey",
"date",
"round_id",
"ban_time",
"is_confidential",
"admin_rank",
Expand All @@ -88,4 +94,4 @@ BSQL_PROTECT_DATUM(/datum/entity/player_note)
/// Returns all notes associated with a CKEY, structured as a list of strings.
/proc/get_all_notes(player_ckey)
for(var/datum/view_record/note_view/note in DB_VIEW(/datum/view_record/note_view, DB_COMP("player_ckey", DB_EQUALS, player_ckey)))
LAZYADDASSOC(., "[note.note_category]", "\"[note.text]\", by [note.admin_ckey] ([note.admin_rank]) on [note.date]")
LAZYADDASSOC(., "[note.note_category]", "\"[note.text]\", by [note.admin_ckey] ([note.admin_rank]) on [note.date] ([note.round_id])")
5 changes: 5 additions & 0 deletions code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,11 @@ Additional game mode variables.
to_chat(xeno_candidate, SPAN_WARNING("The selected hive does not have a hive core to spawn from!"))
return

for(var/mob_name in hive.banished_ckeys)
if(hive.banished_ckeys[mob_name] == xeno_candidate.ckey)
to_chat(xeno_candidate, SPAN_WARNING("You are banished from the [hive], you may not rejoin unless the Queen re-admits you or dies."))
return

hive.hive_location.spawn_lesser_drone(xeno_candidate)

return TRUE
Expand Down
9 changes: 8 additions & 1 deletion code/game/machinery/vending/vendor_types/crew/synthetic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
list("Motion Detector", 5, /obj/item/device/motiondetector, null, VENDOR_ITEM_REGULAR),
list("Space Cleaner", 2, /obj/item/reagent_container/spray/cleaner, null, VENDOR_ITEM_REGULAR),
list("Whistle", 5, /obj/item/device/whistle, null, VENDOR_ITEM_REGULAR),
list("Machete Scabbard (Full)", 2, /obj/item/storage/large_holster/machete/full, null, VENDOR_ITEM_REGULAR)
list("Machete Scabbard (Full)", 2, /obj/item/storage/large_holster/machete/full, null, VENDOR_ITEM_REGULAR),
list("Stethoscope", 2, /obj/item/clothing/accessory/stethoscope, null, VENDOR_ITEM_REGULAR)

)

Expand Down Expand Up @@ -263,6 +264,12 @@ GLOBAL_LIST_INIT(cm_vending_clothing_synth_snowflake, list(
list("USCM RTO Pack", 12, /obj/item/storage/backpack/marine/satchel/rto, null, VENDOR_ITEM_REGULAR),
list("USCM Welderpack", 12, /obj/item/storage/backpack/marine/engineerpack, null, VENDOR_ITEM_REGULAR),
list("USCM Weldersatchel", 12, /obj/item/storage/backpack/marine/engineerpack/satchel, null, VENDOR_ITEM_REGULAR),

list("OTHER", 0, null, null, null),
list("Red Armband", 6, /obj/item/clothing/accessory/armband, null, VENDOR_ITEM_REGULAR),
list("Yellow Armband", 6, /obj/item/clothing/accessory/armband/engine, null, VENDOR_ITEM_REGULAR),
list("Green Armband", 6, /obj/item/clothing/accessory/armband/medgreen, null, VENDOR_ITEM_REGULAR),

))

/obj/structure/machinery/cm_vending/clothing/synth/snowflake
Expand Down
4 changes: 4 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1064,3 +1064,7 @@ cases. Override_icon_state should be a list.*/
animate(attack_image, alpha = 175, transform = copy_transform.Scale(0.75), pixel_x = 0, pixel_y = 0, pixel_z = 0, time = 3)
animate(time = 1)
animate(alpha = 0, time = 3, easing = CIRCULAR_EASING|EASE_OUT)

///Called by /mob/living/carbon/swap_hand() when hands are swapped
/obj/item/proc/hands_swapped(mob/living/carbon/swapper_of_hands)
return
4 changes: 2 additions & 2 deletions code/game/verbs/records.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
if(NOTE_YAUTJA)
color = "#114e11"

dat += "<font color=[color]>[N.text]</font> <i>by [admin_ckey] ([N.admin_rank])</i> on <i><font color=blue>[N.date]</i></font> "
dat += "<font color=[color]>[N.text]</font> <i>by [admin_ckey] ([N.admin_rank])</i> on <i><font color=blue>[N.date] [NOTE_ROUND_ID(N)]</i></font> "
dat += "<br><br>"

dat += "<br>"
Expand Down Expand Up @@ -168,7 +168,7 @@
continue
var/admin_ckey = N.admin_ckey

dat += "<font color=[color]>[N.text]</font> <i>by [admin_ckey] ([N.admin_rank])</i> on <i><font color=blue>[N.date]</i></font> "
dat += "<font color=[color]>[N.text]</font> <i>by [admin_ckey] ([N.admin_rank])</i> on <i><font color=blue>[N.date] [NOTE_ROUND_ID(N)]</i></font> "
///Can remove notes from anyone other than yourself, unless you're the host. So long as you have deletion access anyway.
if((can_del && target != get_player_from_key(key)) || ishost(usr))
dat += "<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];remove_wl_info=[key];remove_index=[N.id]'>Remove</A>"
Expand Down
4 changes: 2 additions & 2 deletions code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
if(N.is_ban)
var/time_d = N.ban_time ? "Banned for [N.ban_time] minutes | " : ""
color = "#880000" //Removed confidential check because we can't make confidential bans
dat += "<font color=[color]>[time_d][N.text]</font> <i>by [admin_ckey] ([N.admin_rank])</i>[confidential_text] on <i><font color=blue>[N.date]</i></font> "
dat += "<font color=[color]>[time_d][N.text]</font> <i>by [admin_ckey] ([N.admin_rank])</i>[confidential_text] on <i><font color=blue>[N.date] [NOTE_ROUND_ID(N)]</i></font> "
else
if(N.is_confidential)
color = "#AA0055"
Expand All @@ -102,7 +102,7 @@
else if(N.note_category == NOTE_YAUTJA)
color = "#114e11"

dat += "<font color=[color]>[N.text]</font> <i>by [admin_ckey] ([N.admin_rank])</i>[confidential_text] on <i><font color=blue>[N.date]</i></font> "
dat += "<font color=[color]>[N.text]</font> <i>by [admin_ckey] ([N.admin_rank])</i>[confidential_text] on <i><font color=blue>[N.date] [NOTE_ROUND_ID(N)]</i></font> "
if(admin_ckey == usr.ckey || admin_ckey == "Adminbot" || ishost(usr))
dat += "<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];remove_player_info=[key];remove_index=[N.id]'>Remove</A>"

Expand Down
4 changes: 2 additions & 2 deletions code/modules/admin/tabs/admin_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@
if(N.is_ban)
var/ban_text = N.ban_time ? "Banned for [N.ban_time] | " : ""
color = "#880000"
dat += "<font color=[color]>[ban_text][N.text]</font> <i>by [admin_ckey] ([N.admin_rank])</i>[confidential_text] on <i><font color=blue>[N.date]</i></font> "
dat += "<font color=[color]>[ban_text][N.text]</font> <i>by [admin_ckey] ([N.admin_rank])</i>[confidential_text] on <i><font color=blue>[N.date] [NOTE_ROUND_ID(N)]</i></font> "
else
if(N.is_confidential)
color = "#AA0055"

dat += "<font color=[color]>[N.text]</font> <i>by [admin_ckey] ([N.admin_rank])</i>[confidential_text] on <i><font color=blue>[N.date]</i></font> "
dat += "<font color=[color]>[N.text]</font> <i>by [admin_ckey] ([N.admin_rank])</i>[confidential_text] on <i><font color=blue>[N.date] [NOTE_ROUND_ID(N)]</i></font> "
dat += "<br><br>"

dat += "<br>"
Expand Down
2 changes: 2 additions & 0 deletions code/modules/cm_marines/Donator_Items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
//DON'T GRAB STUFF BETWEEN THIS LINE
flags_inventory = ALLOWREBREATH
flags_inv_hide = HIDEEARS|HIDEEYES|HIDEFACE
flags_cold_protection = BODY_FLAG_HEAD
min_cold_protection_temperature = ICE_PLANET_MIN_COLD_PROT
//AND THIS LINE

//END MASK TEMPLATE
Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@
else
hud_used.l_hand_hud_object.icon_state = "hand_inactive"
hud_used.r_hand_hud_object.icon_state = "hand_active"
if(l_hand)
l_hand.hands_swapped(src)
if(r_hand)
r_hand.hands_swapped(src)
return

/mob/living/carbon/proc/activate_hand(selhand) //0 or "r" or "right" for right hand; 1 or "l" or "left" for left hand.
Expand Down
10 changes: 7 additions & 3 deletions code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,10 @@
//This is to prevent people from joining as Forsaken Huggers on the pred ship
to_chat(user, SPAN_WARNING("The hive has fallen, you can't join it!"))
return FALSE
for(var/mob_name in banished_ckeys)
if(banished_ckeys[mob_name] == user.ckey)
to_chat(user, SPAN_WARNING("You are banished from the [name], you may not rejoin unless the Queen re-admits you or dies."))
return FALSE

update_hugger_limit()

Expand Down Expand Up @@ -1084,11 +1088,11 @@
if(islesserdrone(mob))
current_lesser_drone_count++

if(lesser_drone_limit <= current_lesser_drone_count)
to_chat(user, SPAN_WARNING("[GLOB.hive_datum[hivenumber]] cannot support more lesser drones! Limit: <b>[current_lesser_drone_count]/[lesser_drone_limit]</b>"))
if(tgui_alert(user, "Are you sure you want to become a lesser drone?", "Confirmation", list("Yes", "No")) != "Yes")
return FALSE

if(tgui_alert(user, "Are you sure you want to become a lesser drone?", "Confirmation", list("Yes", "No")) != "Yes")
if(lesser_drone_limit <= current_lesser_drone_count)
to_chat(user, SPAN_WARNING("[GLOB.hive_datum[hivenumber]] cannot support more lesser drones! Limit: <b>[current_lesser_drone_count]/[lesser_drone_limit]</b>"))
return FALSE

if(!user.client)
Expand Down
14 changes: 11 additions & 3 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1817,9 +1817,17 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed
UnregisterSignal(gun_user, list(COMSIG_MOB_MOUSEUP, COMSIG_MOB_MOUSEDOWN, COMSIG_MOB_MOUSEDRAG))

gun_user = to_set
RegisterSignal(gun_user, COMSIG_MOB_MOUSEDOWN, PROC_REF(start_fire))
RegisterSignal(gun_user, COMSIG_MOB_MOUSEDRAG, PROC_REF(change_target))
RegisterSignal(gun_user, COMSIG_MOB_MOUSEUP, PROC_REF(stop_fire))
if(gun_user)
RegisterSignal(gun_user, COMSIG_MOB_MOUSEDOWN, PROC_REF(start_fire))
RegisterSignal(gun_user, COMSIG_MOB_MOUSEDRAG, PROC_REF(change_target))
RegisterSignal(gun_user, COMSIG_MOB_MOUSEUP, PROC_REF(stop_fire))

/obj/item/weapon/gun/hands_swapped(mob/living/carbon/swapper_of_hands)
if(src == swapper_of_hands.get_active_hand())
set_gun_user(swapper_of_hands)
return

set_gun_user(null)

///Update the target if you draged your mouse
/obj/item/weapon/gun/proc/change_target(datum/source, atom/src_object, atom/over_object, turf/src_location, turf/over_location, src_control, over_control, params)
Expand Down
5 changes: 0 additions & 5 deletions html/changelogs/AutoChangeLog-pr-3917.yml

This file was deleted.

5 changes: 0 additions & 5 deletions html/changelogs/AutoChangeLog-pr-3990.yml

This file was deleted.

5 changes: 0 additions & 5 deletions html/changelogs/AutoChangeLog-pr-4006.yml

This file was deleted.

4 changes: 0 additions & 4 deletions html/changelogs/AutoChangeLog-pr-4017.yml

This file was deleted.

4 changes: 0 additions & 4 deletions html/changelogs/AutoChangeLog-pr-4019.yml

This file was deleted.

4 changes: 0 additions & 4 deletions html/changelogs/AutoChangeLog-pr-4021.yml

This file was deleted.

4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4025.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "Morrow"
delete-after: True
changes:
- bugfix: "Fixed holding two guns firing both"
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4026.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "Katskan"
delete-after: True
changes:
- rscadd: "Added a stethoscope, red, yellow, and white/green armband to synthetic vendors"
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4030.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "harryob"
delete-after: True
changes:
- admin: "notes applied to players now include the round id it was applied in"
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4031.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "Drathek"
delete-after: True
changes:
- bugfix: "Fix joining as facehugger or lesser drone not checking banishment."
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4032.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "realforest2001"
delete-after: True
changes:
- bugfix: "Donator custom masks now properly protect from cold weather."
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4034.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "Ben10083"
delete-after: True
changes:
- bugfix: "You can no longer circumvent the lesser drone limit by keeping the prompt open."
22 changes: 22 additions & 0 deletions html/changelogs/archive/2023-07.yml
Original file line number Diff line number Diff line change
Expand Up @@ -573,3 +573,25 @@
- balance: when facehugged, more paralyze chance with a smaller paralyze duration
- ui: during hugged effects, changes messaging to encourage new players to seek
help
2023-07-29:
GoldenDarkness55:
- balance: Shaking people up shortens stun durations by 6 instead of 3.
- balance: Player controlled facehuggers apply the same knockout duration as regular
ones.
Morrow:
- balance: 2.5 squad marines per 1 larva latejoin
SpartanBobby:
- rscadd: Added a new survivor to LV522 the FORECON sniper he spawns alone his only
company being the corpse of his dead battle buddy, good luck
- maptweak: Sweeping changes to LV522 including the reactor, north of engineering,
LZ1, the entire central area of the map, and north of fitness in an attempt
to see more of the colony used and to incentivize flanking
ghostsheet:
- bugfix: Advanced mini flamer can no longer nerf itself by changing mode.
- rscadd: HG 37-12 pump shotgun's intergrated stock no longer give any stat change.
ihatethisengine:
- rscadd: Added announcements for xenos about forming and breaking alliances.
- rscadd: Xenos with IFF tag now have a choice to stay loyal to USCM when Queen
decides to betray.
spartanbobby:
- maptweak: heavy changes to the research department
Loading

0 comments on commit 5a66c8a

Please sign in to comment.